X2 Standard
Version 1.24
|
The X2PowerControl example. More...
#include <x2powercontrol.h>
Public Types | |
enum | { X2_POWER_CONTROL_CIRCUITS = 8 } |
Public Types inherited from DriverRootInterface | |
enum | DeviceType { DT_UNKNOWN = 0, DT_MOUNT = 1, DT_FOCUSER = 2, DT_CAMERA = 3, DT_FILTERWHEEL = 4, DT_DOME = 5, DT_ROTATOR = 6, DT_WEATHER = 7, DT_GPSTFP = 8, DT_VIDEO = 9, DT_OTA =10, DT_AO =11, DT_POWERCONTROL =12, DT_PRIVATE_A =13 } |
Public Member Functions | |
X2PowerControl (const char *pszDisplayName, const int &nInstanceIndex, SerXInterface *pSerXIn, TheSkyXFacadeForDriversInterface *pTheSkyXIn, SleeperInterface *pSleeperIn, BasicIniUtilInterface *pIniUtilIn, LoggerInterface *pLoggerIn, MutexInterface *pIOMutexIn, TickCountInterface *pTickCountIn) | |
DriverRootInterface Implementation | |
See DriverRootInterface. | |
virtual int | queryAbstraction (const char *pszName, void **ppVal) |
DriverInfoInterface Implementation | |
See DriverInfoInterface. | |
virtual void | driverInfoDetailedInfo (BasicStringInterface &str) const |
virtual double | driverInfoVersion (void) const |
HardwareInfoInterface Implementation | |
virtual void | deviceInfoNameShort (BasicStringInterface &str) const |
virtual void | deviceInfoNameLong (BasicStringInterface &str) const |
virtual void | deviceInfoDetailedDescription (BasicStringInterface &str) const |
virtual void | deviceInfoFirmwareVersion (BasicStringInterface &str) |
virtual void | deviceInfoModel (BasicStringInterface &str) |
Public Member Functions inherited from PowerControlDriverInterface | |
virtual DeviceType | deviceType (void) |
virtual bool | isEstablishLinkAbortable (void) const |
Public Member Functions inherited from LinkInterface | |
virtual bool | isEstablishLinkAbortable (void) |
LinkInterface Implementation | |
See LinkInterface. | |
virtual int | establishLink (void) |
virtual int | terminateLink (void) |
virtual bool | isLinked (void) const |
virtual int | numberOfCircuits (int &nNumber) |
virtual int | circuitState (const int &nIndex, bool &bZeroForOffOneForOn) |
virtual int | setCircuitState (const int &nIndex, const bool &bZeroForOffOneForOn) |
The X2PowerControl example.
Use this example as a template to write an X2PowerControl driver.
|
virtual |
Called by TheSky to determine (read) the current state of a circuit.
nZeroBasedIndex | (in) the index of the circuit, starting at zero to 1-number of circuits. |
bZeroForOffOneForOn | (out) the current state of a circuit. Set bZeroForOffOneForOn to zero (0) to indcate the circuit is off and one (1) to indcate the circuit is on. |
Reimplemented from PowerControlDriverInterface.
|
virtual |
Return a detailed device description.
Implements PowerControlDriverInterface.
|
virtual |
Return the firmware version, if available.
Implements PowerControlDriverInterface.
|
virtual |
Return the device model name.
Implements PowerControlDriverInterface.
|
virtual |
Return a detailed device name.
Implements PowerControlDriverInterface.
|
virtual |
Return a short device name.
Implements PowerControlDriverInterface.
|
virtual |
Return detailed information about the driver.
Implements PowerControlDriverInterface.
|
virtual |
Return a version number.
Implements PowerControlDriverInterface.
|
virtual |
Connect (link) to the device.
Implements PowerControlDriverInterface.
|
virtual |
Return true if there is a connection, otherwise return false.
Implements PowerControlDriverInterface.
|
virtual |
Return the number of circuits (outlets) that can be controlled by this power control device.
nNumber | (out) the number of circuits controlled by this power control device. This method will be called once after a successfull establishLink(). |
Reimplemented from PowerControlDriverInterface.
|
virtual |
Return a pointer to well defined interface.
Implements PowerControlDriverInterface.
|
virtual |
Called by TheSky to set the state of a circuit.
nZeroBasedIndex | (in) the index of the circuit, starting at zero to 1-number of circuits. |
bZeroForOffOneForOn | (in) the desired state of a circuit. bZeroForOffOneForOn will be zero (0) to set the circuit off and one (1) to set the circuit on. |
Reimplemented from PowerControlDriverInterface.
|
virtual |
Disconnect from the device.
Implements PowerControlDriverInterface.