Changes

1,827 bytes added ,  14:25, 31 October 2018
Line 474: Line 474:  
|-
 
|-
 
| AVL packet id (1 byte) || Module IMEI || AVL data array
 
| AVL packet id (1 byte) || Module IMEI || AVL data array
 +
|}
 +
 +
AVL packet id (1 byte) – id identifying this AVL packet
 +
Module IMEI – IMEI of a sending module encoded the same as with TCP
 +
AVL data array – array of encoded AVL data
 +
 +
 +
{| class="wikitable"
 +
|-
 +
! colspan="3" align="center" style="background: black; color: white;"|Server response to AVL data packet
 +
|-
 +
| AVL packet id (1 byte) ||Number of accepted AVL elements (1 byte)
 +
|}
 +
 +
 +
AVL packet id (1 byte) – id of received AVL data packet
 +
 +
AVL packet id (1 byte) – id of received AVL data packet
 +
 +
Number of AVL data elements accepted (1 byte) – number of AVL data array entries from the beginning of array, which were accepted by the server.
 +
 +
Scenario:
 +
 +
Module sends UDP channel packet with encapsulated AVL data packet (Packet type=1 or 0). If packet type is 0, server should respond with valid UDP channel acknowledgment packet. Since server should respond to the AVL data packet, UDP channel acknowledgment is not necessary in this scenario, so Packet type=1 is recommended.
 +
 +
Server sends UDP channel packet with encapsulated response (Packet type=1 – this packet should not require acknowledgment)
 +
 +
Module validates AVL packet id and Number of accepted AVL elements. If server response with valid AVL packet id is not received within configured timeout, module can retry sending.
 +
 +
 +
Example:
 +
Module sends the data:
 +
 +
{| class="wikitable"
 +
|-
 +
! style="background: black; color: white;"|UDP channel header !!style="background: black; color: white;"| AVL packet header !!style="background: black; color: white;"| AVL data array
 +
|-
 +
| Len – 253,
 +
Id – 0xCAFE,
 +
Packet type – 01 (without ACK)
 +
|| AVL packet id – 0xDD,
 +
IMEI – 1234567890123456
 +
|| CodecId – 08,
 +
NumberOfData – 2.
 +
(Encoded using continuous bit stream)
 +
 +
|-
 +
| 00FDCAFE01 || DD000F3133343536373839303132333435 || 0802…(data elements)…02
 +
|}