Back to I/O and Power Commands
CMD_IOPWR_CLRLATCH

Command:              CMD_IOPWR_CLRLATCH
Destination:          SD_IOPWR
Destination Channel:  1

Description
Clients use this command to read and clear 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 before it is cleared.

Command data format

Latched Digital Inputs To Clear padding
1 byte 3 bytes

Latched Digital Inputs To Clear

A one or zero for each latched input should be stored sequentially in the data byte starting with bit 0, the least significant byte. A value of one will cause the latched input to be cleared after being read. A value of zero will leave the latched state as is.

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 before it is cleared. 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 this 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 time between reading the latched digital inputs and clearing them amounts to a few micro seconds. This means that it is possible to miss digital input pulses that are shorter than a few micro seconds.

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|