FesaDeviceServer.h

Go to the documentation of this file.
00001 // Copyright CERN 2012 - Developed in collaboration with GSI
00002 
00003 #ifndef FESA_DEVICE_SERVER_H_
00004 #define FESA_DEVICE_SERVER_H_
00005 
00006 #include <fesa-core/Utilities/Mutex.h>
00007 #include <fesa-core/Utilities/Thread.h>
00008 
00009 #include <cmw-rda/DeviceServerBase.h>
00010 
00011 #include <string>
00012 
00013 namespace fesa
00014 {
00015 
00016 class AbstractDevice;
00017 class AbstractServerDeviceClass;
00018 class ProcessConfiguration;
00019 class Property;
00020 class SubscriptionTreeManager;
00021 
00029 class FesaDeviceServer: public rdaDeviceServerBase, public Thread
00030 {
00031   public:
00032     static void initCMW();
00033 
00037     FesaDeviceServer(const std::string& name, const ProcessConfiguration* processConfiguration, SubscriptionTreeManager* subscriptionTreeManager);
00038 
00042     ~FesaDeviceServer();
00043 
00052     rdaData* get(const rdaIOPoint& iop, const rdaData& ctx);
00053 
00062     void set(const rdaIOPoint& iop, const rdaData& ctx, const rdaData& value);
00063 
00071     void monitorOn(const rdaIOPoint& iop, const rdaData& ctx, rdaValueChangeListener* listener);
00072 
00079     void monitorOff(const rdaIOPoint& iop, rdaValueChangeListener* listener);
00080 
00081     void start();
00082 
00083     bool useFastUpdate();
00084 
00085   private:
00086 
00090     void run();
00091 
00096     void runDeviceServer();
00097 
00105     void decodeIOPoint(const rdaIOPoint& iop, AbstractServerDeviceClass*& srvDeviceClass, Property*& prop, AbstractDevice*& device,
00106                        std::string& cycleSelector);
00107 
00108     // If we delete the about method we could remove this friend
00109     friend class AbstractServerEquipment;
00110 
00114     bool isRTProcessDown();
00115 
00119     SubscriptionTreeManager* pTreeManager_;
00120 
00124     bool firstUpdateAcquisitionEnabled_;
00125 
00129     bool firstUpdateSettingEnabled_;
00130 
00134     Mutex mutex_;
00135 
00136 };
00137 
00138 } // fesa
00139 
00140 #endif // FESA_DEVICE_SERVER_H_

Generated on 18 Jan 2013 for Fesa by  doxygen 1.6.1