22 #include <arpa/inet.h> 108 uint32_t payload_length_32 = 0;
109 memcpy(&payload_length_32,&message_buffer[4],4);
124 std::cout.setf(std::ios::hex,std::ios::basefield);
125 std::cout <<
"Checksum: " << (
unsigned int)
GetChecksum() << std::endl;
126 std::cout <<
"Service code: " << (
unsigned int)
GetServiceCode() << std::endl;
127 std::cout <<
"Service subcode: " << (
unsigned int)
GetServiceSubcode() << std::endl;
128 std::cout << std::flush;
142 uint8_t checksum = 0;
143 for (uint32_t i = 0; i < length; i++) {
#define SICK_LD_MSG_HEADER_LEN
Sick LD message header length in bytes.
#define SICK_LD_MSG_TRAILER_LEN
Sick LD length of the message trailer.
#define SICK_LD_MSG_PAYLOAD_MAX_LEN
Sick LD maximum payload length.
Defines simple utility functions for working with the Sick LD.
Defines the class SickLDMessage.