Communication Protocol 3000
4Communication Protocol 3000
= Carriage return (ASCII 13 = 0x0D) = Line feed (ASCII 10 = 0x0A)
= Space (ASCII 32 = 0x20)
4.1 Host message format
start | Address (optional) | body | delimiter |
# | Destination_id@ | message |
|
4.1.1Simple command
(Commands string with only one command without addressing):
start |
|
| body | delimiter |
# | Command | SP | Parameter_1,Parameter_2,… |
|
Device message format:
start | Address (optional) | body | delimiter |
~ | Sender_id@ | message |
|
4.1.2 Device long response (Echoing command)
start | Address (optional) |
|
| body |
| delimiter | |
~ | Sender_id@ | command | SP | [param1 ,param2 … | ]result |
|
|
4.2Command parts details
Command:
Sequence of ASCII letters
Command will be separated from parameters with at least single space.
Parameters:
Sequence of
Message string:
Every command must be entered as part of a message string that begins with message starting char and ends with message closing char. Note that string can contain more than one command separated by pipe ("") char.
Message starting char:
'#' for host command\query. '~' for machine response.
Device address:
K_Net Device ID followed by '@' char.
Query sign = '?', will follow after some commands to define query request.
Message closing char =
Host messages - Carriage Return (ASCII 13), will be referred to by in this document. Machine messages - Carriage Return (ASCII 13) +
Spaces between parameters or command parts will be ignored.
11