X2 Standard  Version 1.24
All Classes Functions Enumerations Enumerator Modules Pages
List of all members
PowerControlDriverInterface Class Referenceabstract

The PowerControlDriverInterface allows an X2 implementor to a write X2 power control driver. More...

#include <powercontroldriverinterface.h>

Inheritance diagram for PowerControlDriverInterface:
DriverRootInterface LinkInterface HardwareInfoInterface DriverInfoInterface X2PowerControl

Public Member Functions

DriverRootInterface Implementation
virtual DeviceType deviceType (void)
 
virtual int queryAbstraction (const char *pszName, void **ppVal)=0
 
LinkInterface Implementation
virtual int establishLink (void)=0
 
virtual int terminateLink (void)=0
 
virtual bool isLinked (void) const =0
 
virtual bool isEstablishLinkAbortable (void) const
 
DriverInfoInterface Implementation
virtual void driverInfoDetailedInfo (BasicStringInterface &str) const =0
 
virtual double driverInfoVersion (void) const =0
 
HardwareInfoInterface Implementation
virtual void deviceInfoNameShort (BasicStringInterface &str) const =0
 
virtual void deviceInfoNameLong (BasicStringInterface &str) const =0
 
virtual void deviceInfoDetailedDescription (BasicStringInterface &str) const =0
 
virtual void deviceInfoFirmwareVersion (BasicStringInterface &str)=0
 
virtual void deviceInfoModel (BasicStringInterface &str)=0
 
virtual int numberOfCircuits (int &nNumber)
 
virtual int circuitState (const int &nZeroBasedIndex, bool &bZeroForOffOneForOn)
 
virtual int setCircuitState (const int &nZeroBasedIndex, const bool &bZeroForOffOneForOn)
 

Additional Inherited Members

- 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
}
 

Detailed Description

The PowerControlDriverInterface allows an X2 implementor to a write X2 power control driver.

See the X2PowerControl for an example.

Power control capabilities were added to TheSky build 12391 and later, released roughly in October 2019. Use the TheSkyXFacadeForDriversInterface::build() method to react by either requiring a certain minimum build or gracefully degrading functionality.

See also
The related, optional interface CircuitLabelsInterface
The related, optional interface SetCircuitLabelsInterface

Member Function Documentation

◆ circuitState()

virtual int PowerControlDriverInterface::circuitState ( const int &  nZeroBasedIndex,
bool &  bZeroForOffOneForOn 
)
inlinevirtual

Called by TheSky to determine (read) the current state of a circuit.

Parameters
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 in X2PowerControl.

◆ deviceInfoDetailedDescription()

virtual void PowerControlDriverInterface::deviceInfoDetailedDescription ( BasicStringInterface str) const
pure virtual

Return a detailed device description.

Implements HardwareInfoInterface.

Implemented in X2PowerControl.

◆ deviceInfoFirmwareVersion()

virtual void PowerControlDriverInterface::deviceInfoFirmwareVersion ( BasicStringInterface str)
pure virtual

Return the firmware version, if available.

Implements HardwareInfoInterface.

Implemented in X2PowerControl.

◆ deviceInfoModel()

virtual void PowerControlDriverInterface::deviceInfoModel ( BasicStringInterface str)
pure virtual

Return the device model name.

Implements HardwareInfoInterface.

Implemented in X2PowerControl.

◆ deviceInfoNameLong()

virtual void PowerControlDriverInterface::deviceInfoNameLong ( BasicStringInterface str) const
pure virtual

Return a detailed device name.

Implements HardwareInfoInterface.

Implemented in X2PowerControl.

◆ deviceInfoNameShort()

virtual void PowerControlDriverInterface::deviceInfoNameShort ( BasicStringInterface str) const
pure virtual

Return a short device name.

Implements HardwareInfoInterface.

Implemented in X2PowerControl.

◆ deviceType()

virtual DeviceType PowerControlDriverInterface::deviceType ( void  )
inlinevirtual

Returns the type of device.

Implements DriverRootInterface.

◆ driverInfoDetailedInfo()

virtual void PowerControlDriverInterface::driverInfoDetailedInfo ( BasicStringInterface str) const
pure virtual

Return detailed information about the driver.

Implements DriverInfoInterface.

Implemented in X2PowerControl.

◆ driverInfoVersion()

virtual double PowerControlDriverInterface::driverInfoVersion ( void  ) const
pure virtual

Return a version number.

Implements DriverInfoInterface.

Implemented in X2PowerControl.

◆ establishLink()

virtual int PowerControlDriverInterface::establishLink ( void  )
pure virtual

Connect (link) to the device.

Implements LinkInterface.

Implemented in X2PowerControl.

◆ isLinked()

virtual bool PowerControlDriverInterface::isLinked ( void  ) const
pure virtual

Return true if there is a connection, otherwise return false.

Implements LinkInterface.

Implemented in X2PowerControl.

◆ numberOfCircuits()

virtual int PowerControlDriverInterface::numberOfCircuits ( int &  nNumber)
inlinevirtual

Return the number of circuits (outlets) that can be controlled by this power control device.

Parameters
nNumber(out) the number of circuits controlled by this power control device. This method will be called once after a successfull establishLink().

Reimplemented in X2PowerControl.

◆ queryAbstraction()

virtual int PowerControlDriverInterface::queryAbstraction ( const char *  pszName,
void **  ppVal 
)
pure virtual

Return a pointer to well defined interface.

Implements DriverRootInterface.

Implemented in X2PowerControl.

◆ setCircuitState()

virtual int PowerControlDriverInterface::setCircuitState ( const int &  nZeroBasedIndex,
const bool &  bZeroForOffOneForOn 
)
inlinevirtual

Called by TheSky to set the state of a circuit.

Parameters
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 in X2PowerControl.

◆ terminateLink()

virtual int PowerControlDriverInterface::terminateLink ( void  )
pure virtual

Disconnect from the device.

Implements LinkInterface.

Implemented in X2PowerControl.


The documentation for this class was generated from the following file:
X2 Examples
(C) Software Bisque, Inc. All rights reserved.