Pd
Data Packet
Added on v1.0.0
TCP
HTTP
Defines the main packet of the Layrz Protocol, which is used to send data from the device to the server. This packet is the most flexible and can be used to send any type of data, such as sensor readings, device status, or any other information that the device needs to communicate with the server.
Example Usage
<Pd>UNIX;LATITUDE;LONGITUDE;ALTITUDE;SPEED;DIRECTION;HDOP;EXTRA+ARGS;CRC16</Pd>
Parameter | Type | Description | Example |
---|---|---|---|
UNIX | float | UNIX timestamps defined in seconds of the message | 1753306994 |
LATITUDE | float | Defines the latitude of the message, send empty if is not available | 8.98293776 |
LONGITUDE | float | Defines the longitude of the message, send empty if is not available | -79.51847453 |
ALTITUDE | float | Defines the altitude of the message, send empty if is not available | 10.0 |
SPEED | float | Defines the speed of the message, send empty if is not available | 0.0 |
DIRECTION | float | Defines the direction of the message, send empty if is not available | 25.0 |
HDOP | float | Defines the HDOP (Horizontal Dilution of Precision) of the message, send empty if is not available | 0.3 |
EXTRA+ARGS | EXTRA+ARGS | Additional information that you need to send into the server | N/A |
CRC16 | integer | Cyclic Redundancy Check for error checking. | 1234 |
Extra Arguments EXTRA+ARGS
PARAMETER1:VALUE1,PARAMETER2:VALUE2,PARAMETER3:VALUE3,PARAMETER4:VALUE4,PARAMETER5:VALUE5,...
Parameter | Type | Description |
---|---|---|
PARAMETER1,PARAMETER2,PARAMETER3,PARAMETER4,PARAMETER5 | string | Name of the parameter to send |
VALUE1,VALUE2,VALUE3,VALUE4,VALUE5 | any | Value of the parameter to send |
Example
ambient.temperature:25.0,luminosity:1000,battery.level:75,gps.is.fixed:true,event.name:motion_detected