Back to I/O and Power Commands
CMD_IOPWR_GETPOWER

Command:              CMD_IOPWR_GETPOWER 
Destination:          SD_IOPWR
Destination Channel:  1

Description
Clients use this command to read the state of the digital inputs at startup. The value of each digital input is stored sequentially in the return byte starting at bit 0, the least significant bit.

Command data format
No command data

Response data format

Digital Input States at Startup padding
1 byte 3 bytes

Digital Input States at Startup

The state of each digital input at startup is stored sequentially starting at bit 0, the least significant bit.

This command can be used to determine which digital input caused the unit to be powered up. The device driver for /gryphon/dev/gpwr reads and clears the latched state of the digital inputs during its initialization and stores the values internally. If other digital inputs are set before the latched inputs are read, more than one bit in the data byte will be set.


Response return codes
RESP_OK Execution of the command was successful.
RESP_UNSUPPORTED The command is not supported
RESP_AUTH_FAIL The client ID specified in the source channel field is not authorized to execute this command. (This response may be the result of the client not having registered with the CMD_SERVER_REG command.)
RESP_UNKNOWN_ERR An unknown error occurred.


|Top|