51 BuildMessage(dest_address,payload_buffer,payload_length);
73 const unsigned int payload_length )
115 uint16_t payload_length_16 = 0;
116 memcpy(&payload_length_16,&message_buffer[2],2);
151 std::cout.setf(std::ios::hex,std::ios::basefield);
152 std::cout <<
"Checksum: " << (
unsigned int)
GetChecksum() << std::endl;
153 std::cout <<
"Dest. Addr.: " << (
unsigned int)
GetDestAddress() << std::endl;
154 std::cout <<
"Command Code: " << (
unsigned int)
GetCommandCode() << std::endl;
155 std::cout << std::flush;
172 uCrc16 = abData[0] = 0;
173 while (data_length-- )
175 abData[1] = abData[0];
179 uCrc16 = (uCrc16 & 0x7fff) << 1;
186 uCrc16 ^=
MKSHORT(abData[0],abData[1]);
Defines simple utility functions for working with the Sick LMS 2xx laser range finder units...
#define SICK_PLS_MSG_HEADER_LEN
Sick LMS message length in bytes.
#define CRC16_GEN_POL
Used to compute CRCs.
Definition of class SickPLSMessage.
#define SICK_PLS_MSG_PAYLOAD_MAX_LEN
Sick LMS max payload length in bytes.
#define SICK_PLS_MSG_TRAILER_LEN
Sick LMS message trailer length in bytes.