Command General Format All commands are encoded in ASCII. Some data represent Hex number
also encoded in ASCII; for example the hex number 1F would be
transmitted in two bytes: "F" then "1". If the Hex represents a bit-map,
its least significant bit corresponds to GPIO-1.
Multibyte words are transmitted least significant byte first.
The general command format is as following:
STX ADDR CMD [ ARGS ] ETX
where
STX is the ASCII start-of-text control character.
ADDR is the address of the intended unit. This is given
as a one-digit Hex number (1 byte).
CMD is the name of the command (1 byte).
ARGS is a sequence of argument bytes, if applicable.
ETX is the ASCII end-of-text control character.
Action and setup commands do not cause any response from the unit back
to the host. Query commands cause a response from the unit in the following
format:
STX ADDR ALM [ DATA ] ETX
where
STX is the ASCII start-of-text control character.
ADDR is the address of the unit being responding.
ALM is the alarm code in the unit (1 byte). "0" means no alarm
condition.
DATA (if applicable) is a sequence of bytes which format and
content varies depending of the command being responded.
ETX is the ASCII control character end-of-text.
Address "0" is reserved for SETUP commands. The unit Firmware will ignore setup commands
and possibly raise an alarm condition if a setup command is received while the address
configured in the unit is other than zero.
Address "F" means: broadcast. Commands sent with this address will be processed for all
units with disregard of their programmed address.
Broadcasting is restricted to the following commands, resulting in error otherwise:
SET_ALM
SET_RESET
|