Back to I/O and Power Commands
CMD_IOPWR_GETLATCH

Command:              CMD_IOPWR_GETLATCH
Destination:          SD_IOPWR
Destination Channel:  1

Description
Clients use this command to read the latched digital input values. The value of each latched 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

Latched Digital Input States padding
1 byte 3 bytes

Latched Digital Input States

The state of each latched digital input is stored sequentially in the return byte starting at bit 0, the least significant bit. The latched inputs are cleared to zero during the power up sequence. Once an input is set (goes to the one state), the latched value is set to one and stays at one until it is explicitly cleared with either an ioctl() call to the /gryphon/dev/ginp device or a CMD_IOPWR_CLRLATCH command. Any latched input with a value of zero means that that input has not been set to one since the last time that it was cleared.

The current state of the digital inputs driving the latched digital inputs may be read with the CMD_IOPWR_GETINP command.


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|