X2 Standard  Version 1.24
powercontroldriverinterface.h
1 #ifndef _PowerControlDriverInterface_H
2 #define _PowerControlDriverInterface_H
3 
4 #ifdef THESKYX_FOLDER_TREE
5 #include "imagingsystem/hardware/interfaces/licensed/driverrootinterface.h"
6 #include "imagingsystem/hardware/interfaces/licensed/linkinterface.h"
7 #include "imagingsystem/hardware/interfaces/licensed/deviceinfointerface.h"
8 #include "imagingsystem/hardware/interfaces/licensed/driverinfointerface.h"
9 #else
10 #include "../../licensedinterfaces/driverrootinterface.h"
11 #include "../../licensedinterfaces/linkinterface.h"
12 #include "../../licensedinterfaces/deviceinfointerface.h"
13 #include "../../licensedinterfaces/driverinfointerface.h"
14 #endif
15 
29 {
30 public:
31  virtual ~PowerControlDriverInterface(){}
32 
37  virtual int queryAbstraction(const char* pszName, void** ppVal) = 0;
39 
43  virtual int establishLink(void) = 0;
44  virtual int terminateLink(void) = 0;
45  virtual bool isLinked(void) const = 0;
46  virtual bool isEstablishLinkAbortable(void) const { return false; }
48 
52  virtual void driverInfoDetailedInfo(BasicStringInterface& str) const = 0;
53  virtual double driverInfoVersion(void) const = 0;
55 
56  //
60  virtual void deviceInfoNameShort(BasicStringInterface& str) const = 0;
61  virtual void deviceInfoNameLong(BasicStringInterface& str) const = 0;
64  virtual void deviceInfoModel(BasicStringInterface& str) = 0;
66 
70  virtual int numberOfCircuits(int& nNumber)
71  {
72  nNumber = 0;
73  return 0;
74  }
75 
80  virtual int circuitState(const int& nZeroBasedIndex, bool& bZeroForOffOneForOn)
81  {
82  (void)nZeroBasedIndex;
83  bZeroForOffOneForOn = 0;
84  return 0;
85  }
86 
91  virtual int setCircuitState(const int& nZeroBasedIndex, const bool& bZeroForOffOneForOn)
92  {
93  (void)nZeroBasedIndex;
94  (void)bZeroForOffOneForOn;
95  return 0;
96  }
97 };
98 
99 #endif
PowerControlDriverInterface::queryAbstraction
virtual int queryAbstraction(const char *pszName, void **ppVal)=0
PowerControlDriverInterface::terminateLink
virtual int terminateLink(void)=0
PowerControlDriverInterface::deviceInfoNameShort
virtual void deviceInfoNameShort(BasicStringInterface &str) const =0
PowerControlDriverInterface
The PowerControlDriverInterface allows an X2 implementor to a write X2 power control driver.
Definition: powercontroldriverinterface.h:29
DriverRootInterface
The DriverRootInterface is the foundation for all X2 device drivers.
Definition: driverrootinterface.h:21
PowerControlDriverInterface::establishLink
virtual int establishLink(void)=0
PowerControlDriverInterface::numberOfCircuits
virtual int numberOfCircuits(int &nNumber)
Definition: powercontroldriverinterface.h:70
PowerControlDriverInterface::deviceInfoModel
virtual void deviceInfoModel(BasicStringInterface &str)=0
PowerControlDriverInterface::deviceType
virtual DeviceType deviceType(void)
Definition: powercontroldriverinterface.h:36
PowerControlDriverInterface::deviceInfoDetailedDescription
virtual void deviceInfoDetailedDescription(BasicStringInterface &str) const =0
DriverInfoInterface
The DriverInfoInterface provides X2 implementors a standarized way to provide driver specific informa...
Definition: driverinfointerface.h:15
PowerControlDriverInterface::deviceInfoNameLong
virtual void deviceInfoNameLong(BasicStringInterface &str) const =0
PowerControlDriverInterface::circuitState
virtual int circuitState(const int &nZeroBasedIndex, bool &bZeroForOffOneForOn)
Definition: powercontroldriverinterface.h:80
PowerControlDriverInterface::driverInfoDetailedInfo
virtual void driverInfoDetailedInfo(BasicStringInterface &str) const =0
HardwareInfoInterface
The HardwareInfoInterface provides X2 implementors a standarized way to provide hardware specific inf...
Definition: deviceinfointerface.h:15
DriverRootInterface::DeviceType
DeviceType
Definition: driverrootinterface.h:26
PowerControlDriverInterface::setCircuitState
virtual int setCircuitState(const int &nZeroBasedIndex, const bool &bZeroForOffOneForOn)
Definition: powercontroldriverinterface.h:91
PowerControlDriverInterface::deviceInfoFirmwareVersion
virtual void deviceInfoFirmwareVersion(BasicStringInterface &str)=0
PowerControlDriverInterface::isLinked
virtual bool isLinked(void) const =0
PowerControlDriverInterface::driverInfoVersion
virtual double driverInfoVersion(void) const =0
DriverRootInterface::DT_POWERCONTROL
@ DT_POWERCONTROL
Definition: driverrootinterface.h:39
BasicStringInterface
The BasicStringInterface allows a string as an output.
Definition: basicstringinterface.h:17
X2 Examples
(C) Software Bisque, Inc. All rights reserved.