|
Instrument Neutral Distributed Interface INDI 2.2.5
|
#include <indipowerinterface.h>
Public Types | |
| enum | { POWER_HAS_DC_OUT = 1 << 0 , POWER_HAS_DEW_OUT = 1 << 1 , POWER_HAS_VARIABLE_OUT = 1 << 2 , POWER_HAS_VOLTAGE_SENSOR = 1 << 3 , POWER_HAS_OVERALL_CURRENT = 1 << 4 , POWER_HAS_PER_PORT_CURRENT = 1 << 5 , POWER_HAS_LED_TOGGLE = 1 << 6 , POWER_HAS_AUTO_DEW = 1 << 7 , POWER_HAS_POWER_CYCLE = 1 << 8 , POWER_HAS_USB_TOGGLE = 1 << 9 , POWER_HAS_OVER_VOLTAGE_PROTECTION = 1 << 10 , POWER_HAS_OVER_VOTALGE_PROTECTION = POWER_HAS_OVER_VOLTAGE_PROTECTION , POWER_OFF_ON_DISCONNECT = 1 << 11 } |
Public Member Functions | |
| uint32_t | GetCapability () const |
| GetPowerCapability returns the capability of the Power device. | |
| void | SetCapability (uint32_t cap) |
| SetPowerCapability sets the Power capabilities. All capabilities must be initialized. | |
| bool | HasDCOutput () |
| bool | HasDewOutput () |
| bool | HasVariableOutput () |
| bool | HasVoltageSensor () |
| bool | HasOverallCurrent () |
| bool | HasPerPortCurrent () |
| bool | HasLEDToggle () |
| bool | HasAutoDew () |
| bool | HasUSBPort () |
| bool | HasOverVoltageProtection () |
| bool | ShouldPowerOffOnDisconnect () |
Public Attributes | |
| enum INDI::PowerInterface:: { ... } | PowerCapability |
Protected Types | |
| enum | { SENSOR_VOLTAGE , SENSOR_CURRENT , SENSOR_POWER , N_POWER_SENSORS } |
Protected Member Functions | |
| PowerInterface (DefaultDevice *defaultDevice) | |
| void | initProperties (const char *groupName, size_t nPowerPorts=0, size_t nDewPorts=0, size_t nVariablePorts=0, size_t nAutoDewPorts=0, size_t nUSBPorts=0) |
| Initialize Power properties. It is recommended to call this function within initProperties() of your primary device. | |
| bool | updateProperties () |
| updateProperties Define or Delete Power properties based on the connection status of the base device | |
| bool | processNumber (const char *dev, const char *name, double values[], char *names[], int n) |
| Process Power number properties. | |
| bool | processSwitch (const char *dev, const char *name, ISState *states, char *names[], int n) |
| Process Power switch properties. | |
| bool | processText (const char *dev, const char *name, char *texts[], char *names[], int n) |
| Process Power text properties. | |
| virtual bool | SetPowerPort (size_t port, bool enabled) |
| SetPowerPort Set power port on/off. | |
| virtual bool | SetDewPort (size_t port, bool enabled, double dutyCycle) |
| SetDewPort Set DEW/Dew port duty cycle. | |
| virtual bool | SetVariablePort (size_t port, bool enabled, double voltage) |
| SetVariablePort Set variable voltage port. | |
| virtual bool | SetLEDEnabled (bool enabled) |
| SetLEDEnabled Enable/disable power LEDs. | |
| virtual bool | SetAutoDewEnabled (size_t port, bool enabled) |
| SetAutoDewEnabled Enable/disable automatic dew control. | |
| virtual bool | CyclePower () |
| CyclePower Cycle power to all ports. | |
| virtual bool | SetUSBPort (size_t port, bool enabled) |
| SetUSBPort Set USB port on/off. | |
| bool | saveConfigItems (FILE *fp) |
| saveConfigItems Save power properties in config file | |
Definition at line 34 of file indipowerinterface.h.
| anonymous enum |
Definition at line 41 of file indipowerinterface.h.
|
protected |
| Enumerator | |
|---|---|
| SENSOR_VOLTAGE | Input voltage |
| SENSOR_CURRENT | Total current draw |
| SENSOR_POWER | Total power consumption |
| N_POWER_SENSORS | Number of power sensors |
Definition at line 258 of file indipowerinterface.h.
|
explicitprotected |
Definition at line 32 of file indipowerinterface.cpp.
|
protectedvirtual |
CyclePower Cycle power to all ports.
Reimplemented in CheapoDC, MyDCP4ESP, PegasusPPB, PegasusPPBA, PegasusUPB, PegasusUPB3, SVBONYPowerBox, TerransPowerBoxGoV2, TerransPowerBoxProV2, and USBDewpoint.
Definition at line 535 of file indipowerinterface.cpp.
|
inline |
GetPowerCapability returns the capability of the Power device.
Definition at line 61 of file indipowerinterface.h.
|
inline |
Definition at line 134 of file indipowerinterface.h.
|
inline |
Definition at line 78 of file indipowerinterface.h.
|
inline |
Definition at line 86 of file indipowerinterface.h.
|
inline |
Definition at line 126 of file indipowerinterface.h.
|
inline |
Definition at line 110 of file indipowerinterface.h.
|
inline |
Definition at line 151 of file indipowerinterface.h.
|
inline |
Definition at line 118 of file indipowerinterface.h.
|
inline |
Definition at line 142 of file indipowerinterface.h.
|
inline |
Definition at line 94 of file indipowerinterface.h.
|
inline |
Definition at line 102 of file indipowerinterface.h.
|
protected |
Initialize Power properties. It is recommended to call this function within initProperties() of your primary device.
| groupName | Group or tab name to be used to define Power properties. |
| nPowerPorts | Number of 12V power ports |
| nDewPorts | Number of DEW/Dew heater ports |
| nVariablePorts | Number of variable voltage ports |
| nAutoDewPorts | Number of Auto Dew ports |
| nUSBPorts | Number of USB ports |
Definition at line 55 of file indipowerinterface.cpp.
|
protected |
Process Power number properties.
Definition at line 463 of file indipowerinterface.cpp.
|
protected |
Process Power switch properties.
Definition at line 554 of file indipowerinterface.cpp.
|
protected |
Process Power text properties.
Definition at line 726 of file indipowerinterface.cpp.
|
protected |
saveConfigItems Save power properties in config file
| fp | Pointer to config file |
Definition at line 806 of file indipowerinterface.cpp.
|
protectedvirtual |
SetAutoDewEnabled Enable/disable automatic dew control.
| enabled | True to enable, false to disable |
Reimplemented in CheapoDC, CelestronDewPower, MyDCP4ESP, myDewControllerPro, PegasusPPB, PegasusPPBA, PegasusSPB, PegasusUPB, PegasusUPB3, SVBONYPowerBox, TerransPowerBoxGoV2, TerransPowerBoxProV2, and USBDewpoint.
Definition at line 528 of file indipowerinterface.cpp.
|
inline |
SetPowerCapability sets the Power capabilities. All capabilities must be initialized.
| cap | pointer to Power capability struct. |
Definition at line 70 of file indipowerinterface.h.
|
protectedvirtual |
SetDewPort Set DEW/Dew port duty cycle.
| port | Port number starting from 0 |
| enabled | True to turn on, false to turn off |
| dutyCycle | Duty cycle value 0-100 |
Reimplemented in CheapoDC, CelestronDewPower, GeminiPBH, MyDCP4ESP, myDewControllerPro, PegasusPPB, PegasusPPBA, PegasusSPB, PegasusUPB, PegasusUPB3, SVBONYPowerBox, TerransPowerBoxGoV2, TerransPowerBoxProV2, and USBDewpoint.
Definition at line 777 of file indipowerinterface.cpp.
|
protectedvirtual |
SetLEDEnabled Enable/disable power LEDs.
| enabled | True to enable LEDs, false to disable |
Reimplemented in CheapoDC, CelestronDewPower, MyDCP4ESP, PegasusPPB, PegasusPPBA, PegasusSPB, PegasusUPB, PegasusUPB3, SVBONYPowerBox, TerransPowerBoxGoV2, TerransPowerBoxProV2, and USBDewpoint.
Definition at line 793 of file indipowerinterface.cpp.
|
protectedvirtual |
SetPowerPort Set power port on/off.
| port | Port number starting from 0 |
| enabled | True to turn on, false to turn off |
Reimplemented in CheapoDC, CelestronDewPower, GeminiPBH, MyDCP4ESP, PegasusPPB, PegasusPPBA, PegasusSPB, PegasusUPB, PegasusUPB3, SVBONYPowerBox, TerransPowerBoxGoV2, TerransPowerBoxProV2, and USBDewpoint.
Definition at line 770 of file indipowerinterface.cpp.
|
protectedvirtual |
SetUSBPort Set USB port on/off.
| port | Port number starting from 0 |
| enabled | True to turn on, false to turn off |
Reimplemented in CheapoDC, GeminiPBH, MyDCP4ESP, PegasusPPB, PegasusPPBA, PegasusSPB, PegasusUPB, PegasusUPB3, SVBONYPowerBox, TerransPowerBoxGoV2, TerransPowerBoxProV2, and USBDewpoint.
Definition at line 799 of file indipowerinterface.cpp.
|
protectedvirtual |
SetVariablePort Set variable voltage port.
| port | Port number starting from 0 |
| enabled | True to turn on, false to turn off |
| voltage | Target voltage |
Reimplemented in CheapoDC, CelestronDewPower, MyDCP4ESP, PegasusPPB, PegasusSPB, PegasusUPB, PegasusUPB3, SVBONYPowerBox, TerransPowerBoxGoV2, TerransPowerBoxProV2, and USBDewpoint.
Definition at line 785 of file indipowerinterface.cpp.
|
inline |
Definition at line 160 of file indipowerinterface.h.
|
protected |
updateProperties Define or Delete Power properties based on the connection status of the base device
Definition at line 347 of file indipowerinterface.cpp.
|
protected |
Definition at line 295 of file indipowerinterface.h.
|
protected |
Definition at line 308 of file indipowerinterface.h.
|
protected |
Definition at line 277 of file indipowerinterface.h.
|
protected |
Definition at line 276 of file indipowerinterface.h.
|
protected |
Definition at line 278 of file indipowerinterface.h.
|
protected |
Definition at line 275 of file indipowerinterface.h.
|
protected |
Definition at line 292 of file indipowerinterface.h.
|
protected |
Definition at line 305 of file indipowerinterface.h.
|
protected |
Definition at line 286 of file indipowerinterface.h.
|
protected |
Definition at line 307 of file indipowerinterface.h.
| enum { ... } INDI::PowerInterface::PowerCapability |
|
protected |
Definition at line 304 of file indipowerinterface.h.
|
protected |
Definition at line 271 of file indipowerinterface.h.
|
protected |
Definition at line 272 of file indipowerinterface.h.
|
protected |
Definition at line 270 of file indipowerinterface.h.
|
protected |
Definition at line 302 of file indipowerinterface.h.
|
protected |
Definition at line 289 of file indipowerinterface.h.
|
protected |
Definition at line 267 of file indipowerinterface.h.
|
protected |
Definition at line 309 of file indipowerinterface.h.
|
protected |
Definition at line 299 of file indipowerinterface.h.
|
protected |
Definition at line 298 of file indipowerinterface.h.
|
protected |
Definition at line 310 of file indipowerinterface.h.
|
protected |
Definition at line 283 of file indipowerinterface.h.
|
protected |
Definition at line 281 of file indipowerinterface.h.
|
protected |
Definition at line 282 of file indipowerinterface.h.