#include <c++/drivers/lms/sicklms-1.0/SickLMSMessage.hh>
Inheritance diagram for SickToolbox::SickLMSMessage:
Public Member Functions | |
SickLMSMessage () | |
A default constructor. | |
SickLMSMessage (const uint8_t dest_address, const uint8_t *const payload_buffer, const unsigned int payload_length) | |
A constructor for building a message from the given parameter values. | |
SickLMSMessage (uint8_t *const message_buffer) | |
A constructor for parsing a byte sequence into a message object. | |
void | BuildMessage (uint8_t dest_address, const uint8_t *const payload_buffer, const unsigned int payload_length) |
Consructs a message object from given parameter values. | |
void | ParseMessage (const uint8_t *const message_buffer) |
Parses a sequence of bytes into a well-formed message. | |
uint8_t | GetDestAddress () const |
uint8_t | GetCommandCode () const |
uint8_t | GetStatusByte () const |
uint16_t | GetChecksum () const |
void | Clear () |
Reset all internal fields and buffers associated with the object. | |
void | Print () const |
Print the message contents. | |
~SickLMSMessage () | |
Protected Attributes | |
uint16_t | _checksum |
This class helps to construct messages to be sent to the Sick. It also provides a container for received messages to be parsed into.
SickToolbox::SickLMSMessage::SickLMSMessage | ( | ) |
A default constructor.
Default constructor. Constructs an empty message (not well-formed!).
SickToolbox::SickLMSMessage::SickLMSMessage | ( | const uint8_t | dest_address, | |
const uint8_t *const | payload_buffer, | |||
const unsigned int | payload_length | |||
) |
A constructor for building a message from the given parameter values.
Constructs a frame by using BuildMessage().
SickToolbox::SickLMSMessage::SickLMSMessage | ( | uint8_t *const | message_buffer | ) |
A constructor for parsing a byte sequence into a message object.
Constructs a frame using ParseMessage().
SickToolbox::SickLMSMessage::~SickLMSMessage | ( | ) |
Destructor
void SickToolbox::SickLMSMessage::BuildMessage | ( | uint8_t | dest_address, | |
const uint8_t *const | payload_buffer, | |||
const unsigned int | payload_length | |||
) |
Consructs a message object from given parameter values.
Constructs a well-formed raw frame from input fields.
void SickToolbox::SickLMSMessage::ParseMessage | ( | const uint8_t *const | message_buffer | ) | [virtual] |
Parses a sequence of bytes into a well-formed message.
Populates fields from a (well-formed) raw frame.
Implements SickToolbox::SickMessage< SICK_LMS_MSG_HEADER_LEN, SICK_LMS_MSG_PAYLOAD_MAX_LEN, SICK_LMS_MSG_TRAILER_LEN >.
uint8_t SickToolbox::SickLMSMessage::GetDestAddress | ( | ) | const [inline] |
Gets the address of the frame.
uint8_t SickToolbox::SickLMSMessage::GetCommandCode | ( | ) | const [inline] |
Gets the command code associated with the message
uint8_t SickToolbox::SickLMSMessage::GetStatusByte | ( | ) | const [inline] |
Gets the status byte from an LMS response message (NOTE: only applies to Sick LMS response telegrams!)
uint16_t SickToolbox::SickLMSMessage::GetChecksum | ( | ) | const [inline] |
Gets the checksum for the message.
void SickToolbox::SickLMSMessage::Clear | ( | ) | [virtual] |
Reset all internal fields and buffers associated with the object.
Reset the data associated with this message (for initialization purposes)
Reimplemented from SickToolbox::SickMessage< SICK_LMS_MSG_HEADER_LEN, SICK_LMS_MSG_PAYLOAD_MAX_LEN, SICK_LMS_MSG_TRAILER_LEN >.
void SickToolbox::SickLMSMessage::Print | ( | ) | const [virtual] |
Print the message contents.
A debugging function that prints the contents of the message.
Reimplemented from SickToolbox::SickMessage< SICK_LMS_MSG_HEADER_LEN, SICK_LMS_MSG_PAYLOAD_MAX_LEN, SICK_LMS_MSG_TRAILER_LEN >.
uint16_t SickToolbox::SickLMSMessage::_checksum [protected] |
The checksum (CRC16)