00001 #ifndef ROC_AbbDevice 00002 #define ROC_AbbDevice 00003 00004 #ifndef DABC_Device 00005 #include "dabc/Device.h" 00006 #endif 00007 00008 #include "roc/AbbContext.h" 00009 00010 #include <vector> 00011 00012 namespace roc { 00013 00014 class AbbTransport; 00015 00016 extern const char* OpticPathPar; 00017 00018 class AbbDevice : public dabc::Device { 00019 00020 friend class AbbTransport; 00021 00022 protected: 00023 AbbContextRef fContext; 00024 00025 AbbTransport* fTransport; 00026 00027 bool fDaqRunning; 00028 00029 std::vector<unsigned> fPathes; 00031 bool fUseDlmForStartStopDaq; 00033 virtual int ExecuteCommand(dabc::Command cmd); 00034 00035 virtual void ObjectCleanup(); 00036 00037 public: 00038 00039 enum { UndefinedOpticPath = 0xff }; 00040 00041 AbbDevice(const char* name, const char* thrdname, dabc::Command cmd); 00042 virtual ~AbbDevice(); 00043 00044 virtual const char* ClassName() const; 00045 00046 bool IsConnected() const { return fContext.daemon()!=0; } 00047 00048 virtual dabc::Transport* CreateTransport(dabc::Command cmd, dabc::Reference port); 00049 00050 static unsigned GetOpticPath(const char* abbname); 00051 static unsigned GetOpticRetPath(unsigned path); 00052 }; 00053 00054 } 00055 00056 #endif