User Guide
54A0049_7.0_EN / Leddar Pixell – User Guide 101 | 127
Element Header Structure
Some protocol concepts described later make use of elements for transmitting data. Each element has a
header, optionally followed by data.
Table 35: Element header definition
Item
Size (bytes)
Description
Element code
2
Unique element identifier
Element count
2
If the element data is an array, this is the length of the array.
Element size
4
Size of the element data. If the element data is an array,
this is the size of a single element data entry. The full
element data size is “element count” x “element size.” In all
cases, the element size excludes the element header.
Total
8
N/A
Protocol Concept A – Structure-Based
A first protocol concept used by some server protocol versions is described as follows:
Host
→
Sensor
Request header
(8 bytes)
Request data
Answer header
(16 bytes)
Answer data
On the Leddar Pixell, only the identification server uses this protocol concept for reasons of backward
compatibility of the sensor discovery system.
In this protocol concept, the request and answer data are data structures associated with the request code.
If the data structure needs to be changed over time, a new request code will be assigned. Another way of
supporting new data structures is to rely on the data size specified in the request header. As long as new
structures have different sizes, the right structure definition can be loaded.
A major issue with this protocol version is the difficulty to update the data format associated with a given
request code. Because of this, protocol concept B is used for the configuration and data servers.
Protocol Concept B – Element Based
This second protocol concept is now preferred in newer products because of its flexibility. It is described as
follows:
Host
Request header
(8 bytes)
Element 1 header
(8 bytes)
Element 1
data
Element 2 header
(8 bytes)
Element 2
data
(…)
Sensor
Answer header
(16 bytes)
Element 1 header
(8 bytes)
Element 1
data
Element 2 header
(8 bytes)
Element 2
data
(…)