Ac
Command queue Packet
Added on v1.0.0
TCP
HTTP
Defines the command queue packet for the Layrz Protocol, which is used to queue commands for execution by the server to the device.
Example Usage
<Ac>COMMAND+DEFINITION;CRC16</Ac>
Parameter | Type | Description | Example |
---|---|---|---|
COMMAND+DEFINITION | COMMAND+DEFINITION | Defines the command spec | N/A |
CRC16 | string | Cyclic Redundancy Check for error checking | 1234 |
Command Definition COMMAND+DEFINITION
COMMAND_ID;COMMAND_NAME;EXTRA+ARGS;CRC16
Parameter | Type | Description | Example |
---|---|---|---|
COMMAND_ID | int | ID of the command to execute, this ID is the same that the device will return on the Pc packet | 1 |
COMMAND_NAME | string | Is the name of the command to execute. | get_config |
EXTRA+ARGS | EXTRA+ARGS | Additional arguments that you need to send to the command, this is a key-value pair of parameters that the command will use to execute. | N/A |
CRC16 | integer | Cyclic Redundancy Check for error checking. | 1234 |
Extra Arguments EXTRA+ARGS
PARAMETER1:VALUE1,PARAMETER2:VALUE2,...
Parameter | Type | Description |
---|---|---|
PARAMETER1,PARAMETER2 | string | Name of the parameter to send |
VALUE1,VALUE2 | any | Value of the parameter to send |
Example
gps.is.fixed:true,event.name:motion_detected
Considerations
- When you are on TCP, this packet can be sent without any kind of interaction by the server. OnHTTP, this packet will return as replacement of the Ar or Ao packets, depending on the packet that was sent before.
- The
COMMAND+DEFINITION
can beN
, depending of the number of commands that you want to queue.