Data Sheet
For C-Style programming, the Request Object is defined as below
typedef struct{
uint8 cmdRequest; // the command requested
uint8 notUsed[3]; // the padding at the end of the structure
} Ep_Request;
Example of EasyProtocol
In-depth Case Study
TransducerM uses Little Endian conversion when mapping data to the memory.
For example, if the Host Computer receives a complete data package stream (hexadecimal format) from TransducerM:
aa551423ec4100a0f53813afb6043f6d5200bff380994192b9
where 0xaa is the first byte received, and 0xb9 is the last byte.
From section 'Overview of EasyProtocol' on page 26 we know that,
The orange part '14' represents the Package Length. In this case 0x14 = 20(decimal), which means the content followed by
0x14 consists of 20 bytes, i.e. '23ec4100a0f53813afb6043f6d5200bff3809941' which are in total 20 bytes.
The purple section '23ec4100' represents the Payload Information, which is interpreted by bit fields. By converting
hexadecimal '23ec4100' into binary format, we get:
Hexadecimal 0x23 0xec 0x41 0x00
Binary Format
Bit endianness: Big-endian
This is what we are used to when hand writing, however,
this is not how it is stored in the machines' memory.
00100011
MSB→ LSB
Bit offset 0→7
11101100 01000001 00000000
Binary Format
Bit endianness: Little-endian.
We are using this format.
11000100
LSB→ MSB
Bit offset 0→7
00110111 10000010 00000000
Recall section 'Overview of EasyProtocol', we can now divide the bits into four bit fields:
Payload Information bit fields Bits
Binary
(Little-endian)
Convert to Big-endian Meaning
Object Identifier
(Data and Command Type, CMD)
7 1100010
0100011 (Binary) = 23 (Hex) =
35 (Decimal)
The Object contained in the
Payload Content is roll-pitch-yaw
data. Refer to descriptions on 'Roll,
Pitch, Yaw' on page 28.
Reserved 3 000 000
This field should always be zero,
otherwise ignore the data stream.
Source device ID of the package
(FROM_ID)
11 11011110000
00001111011 (Binary) = 123
(Decimal)
The roll-pitch-yaw data is sent from
TransducerM with Node ID 123
Destination device ID of the package
(TO_ID)
11 01000000000
00000000010 (Binary) = 2
(Decimal)
The roll-pitch-data is sent to the
Host computer. The Host computer
always has a ID number of 2.
The grey part 'a0f53813afb6043f6d5200bff3809941' represents the Payload Content. Now we put these bytes into a table shown
as below.
Memory offset
per byte
+0 +1 +2 +3 +4 +5 +6 +7 ... +12 +13 +14 +15
Content 0xa0 0xf5 0x38 0x13 0xaf 0xb6 0x04 0x3f ... 0xf3 0x80 0x99 0x41
Copyright © 2015-2019 SYD Dynamics ApS | www.syd-dynamics.com Page 32 / 33