Data Sheet

EasyProtocol
This section describes how EasyProtocol layer is implemented.
Overview of EasyProtocol
The EasyProtocol layer provides a service to convert between Objects and Raw data streams. As illustrated by Figure 40. A
Data Package is a Raw data stream representation of an Object. Both are carrying the same main information.
The Raw data stream of a complete Data Package consists of
Package Head
(2 Bytes)
Package Length
(1 Byte)
Payload Checksum
(2 Bytes)
0xAA 0x55 0x04~0xff Payload
Information
(4 Bytes)
Payload Content
(x number of byte)
CRC first
byte
CRC second
byte
The Package Head consists of 2 bytes which have fixed values: 0xAA and 0x55 (hexadecimal).
The Package Length consists of 1 byte referring to the total number of bytes of the Payload fields (which includes Payload
Information and Payload Content).
The Payload Information consists of 4 bytes, meaning 32 bits, which are divided into the following bit fields.
Payload Information Bit Fields
Bits
(MSB to LSB)
Comment
Object Identifier (Data and Command Type, CMD) 7 Object type identifier. Each Object has a unique identifier.
Reserved 3
IMPORTANT: Should always be set to zero. Package with non-
zero value in this field should be rejected as error might have
occurred.
Source device ID of the package (FROM_ID) 11
If the package is sent from TransducerM, this field has a value
equal to Node Id described in 'TransducerM – Node ID,
Firmware Version, UUID' on page 13.
Destination device ID of the package (TO_ID) 11
The receiver can implement a filter and reject packages which
are not addressed to itself.
For example, when using C/C++ language, the bit field can be defined as follows:
#define EP_CMD_BITS_ (7)
#define EP_RES_BITS_ (3)
#define EP_ID_BITS_ (11)
typedef struct{
uint32_t cmd : EP_CMD_BITS_;
uint32_t res : EP_RES_BITS_;
uint32_t fromId : EP_ID_BITS_;
uint32_t toId : EP_ID_BITS_;
} Ep_Header;
Copyright © 2015-2019 SYD Dynamics ApS | www.syd-dynamics.com Page 26 / 33
Figure 40: EasyProtocol Layer - Input Output Illustration