Serial Communication Protocol; General Format Of A Command; General Format Of An Answer - Adcon A73 addWAVE Series User Manual

Rtus
Table of Contents

Advertisement

Serial communication protocol

3.3 Serial communication protocol
This protocol is based on a master sending commands and a node answering; the
whole communication is conducted in plain ASCII, as strings. When exchanging
numbers, they are represented in decimal format. All commands are terminated
with a CR/LF combination. All responses (answers) are terminated with the #
character.

3.3.1 General format of a command

The commands have the following format:
ID Command Param1 Param2 ... ParamN
Note:
Not all of the commands can be relayed remotely.

3.3.2 General format of an answer

The answers have the following format:
ID Command Result1 Result2 ... ResultN ErrResult #
The answer string can contain any number of spaces or CR/LF characters between
its components; however, after the terminator (#) no other characters are allowed.
28
ID is the destination device. If you include an ID as part of a command, the
node checks whether ID=ownID. If it does, the node executes the
command on itself. If the ID is not the node's ID, the node executes the
command on a remote device, if such an ID exists. If the ID is missing, this
implies that the command is addressed locally.
Command is the command proper, which can be composed of a variable
string of characters (for example, SLOT). Each node can implement a set
of commands depending on the functionality of the node itself. However,
as a minimum requirement, a node recognizes the CMDS command, which
returns a list with the commands recognized by the node.
Param1 Param2 ... ParamN represent the parameters, which are
command dependent. If you type no parameters when you issue a
command, it is the equivalent of querying for information (the GET version
of a command). If you type parameters, you are issuing the SET version of
a command and are setting the command to the parameters you typed.
ID is the answering device. If a command was further routed, it is the ID of
the end device. The answer must always contain the ID on return.
Command is the string representing the original command. It is supplied so
that a master can distinguish between the answers it is waiting for, and
out-of-band notifications (which may come, for example, over the radio port
of a node). As with the ID, the command name must be always supplied.
Result1 Result2 ... ResultN are the result values returned by the
remote node. If the ErrResult is not zero, all other possible characters
and/or strings until the end of the line may be ignored.
ErrResult shows whether the command was successfully executed. If
this value is 0, the command was successfully executed. If this value is
other than 0, the command failed. The number may further indicate the
error type. (See also "Returned errors list" on page 54.)

Advertisement

Table of Contents
loading

This manual is also suitable for:

A733A731A733gsmA732

Table of Contents