Search   
Home  Print View  

 

GP-LOGIC

Branch Content

Query Commands

GET_STATUS

CMD: 't'
DATA: none

RESPONSE:

The unit responds with a bit-map of GPIO states (1 if active, 0 if not active). The number of bytes depends of the unit model; for example, a unit with 16 GPIOs will response with four bytes of data: each one being a Hex digit (encoded in ASCII) equivalent to 4 bits.

Bit positions in the bit-map represent GPIO numbers (either GPIs or GPOs, depending of unit configuration). The least significant bit of the first byte corresponds to GPIO-1 and so on.

GET_SETUP

Reads the current setup as stored in the FLASH.

CMD: 's'
DATA: none

RESPONSE:

The unit responds with the following sequence of bytes:

  * Unit address --> 1 bytes

  * Unit GPIOs count --> 2 bytes.

  * Bit-map of GPIOs directions (1 for input, 0 for output) --> 1 byte for every 4 bits.

  * Bit-map of GPO modes (1 for PULSE, 0 for LATCH). Bits for GPIO numbers configured as
    input are set to 0. --> 1 byte (Hex) for every 4 bits.

  * Default PULSE duration in 50ms increments --> 2 bytes.
    
  * PULSE duration in 50ms increments of each GPO configured as PULSE with no default
    duration.
    --> For each: 2 bytes GPO number, 2 bytes duration.
  

GET_ADDR

This is a broadcast command (ADDR="F"). Units respond at random intervals to avoid collision.

CMD: 'a'
DATA: none

RESPONSE:

No data is present in the response frame.
This command can be used for auto-discovered purposes.

GET_VERSION

Get Firmware version.

CMD: 'v'
DATA: none

RESPONSE:

Response from the unit contains three Hex numbers (6 bytes) representing the mayor, minor and built number respectively (2 hex digits each) of the Firmware version. First byte (least significant) is the built number.

GET_PROTO

Get protocol version supported by unit Firmware. Protocol version consists of a single decimal digit.

CMD: 'V'
DATA: none

RESPONSE:

Response from the unit contains a two digits Hex number (2 bytes) representing serial protocol version.

Online Manuals -- this software is based on Help Books running at melissa