SickToolbox::SickLDMessage Class Reference

A class to represent all messages sent to and from the Sick LD unit. More...

#include <c++/drivers/ld/sickld-1.0/SickLDMessage.hh>

Inheritance diagram for SickToolbox::SickLDMessage:

Inheritance graph
[legend]
Collaboration diagram for SickToolbox::SickLDMessage:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 SickLDMessage ()
 A default constructor.
 SickLDMessage (const uint8_t *const payload_buffer, const unsigned int payload_length)
 Another constructor.
 SickLDMessage (const uint8_t *const message_buffer)
 Another constructor.
void BuildMessage (const uint8_t *const payload_buffer, const unsigned int payload_length)
 Constructs a Sick LD message given parameter values.
void ParseMessage (const uint8_t *const message_buffer)
 Parses a sequence of bytes into a SickLDMessage object.
uint8_t GetServiceCode () const
uint8_t GetServiceSubcode () const
uint8_t GetChecksum () const
void Print () const
 Print the message contents.
 ~SickLDMessage ()

Detailed Description

A class to represent all messages sent to and from the Sick LD unit.


Constructor & Destructor Documentation

SickToolbox::SickLDMessage::SickLDMessage (  ) 

A default constructor.

A standard constructor

SickToolbox::SickLDMessage::SickLDMessage ( const uint8_t *const   payload_buffer,
const unsigned int  payload_length 
)

Another constructor.

Constructs a packet by using BuildMessage

SickToolbox::SickLDMessage::SickLDMessage ( const uint8_t *const   message_buffer  ) 

Another constructor.

Constructs a packet using ParseMessage()

SickToolbox::SickLDMessage::~SickLDMessage (  ) 

Destructor


Member Function Documentation

void SickToolbox::SickLDMessage::BuildMessage ( const uint8_t *const   payload_buffer,
const unsigned int  payload_length 
)

Constructs a Sick LD message given parameter values.

Construct a well-formed raw packet

Reimplemented from SickToolbox::SickMessage< SICK_LD_MSG_HEADER_LEN, SICK_LD_MSG_PAYLOAD_MAX_LEN, SICK_LD_MSG_TRAILER_LEN >.

void SickToolbox::SickLDMessage::ParseMessage ( const uint8_t *const   message_buffer  )  [virtual]

Parses a sequence of bytes into a SickLDMessage object.

Populates fields from a (well-formed) raw packet

Implements SickToolbox::SickMessage< SICK_LD_MSG_HEADER_LEN, SICK_LD_MSG_PAYLOAD_MAX_LEN, SICK_LD_MSG_TRAILER_LEN >.

uint8_t SickToolbox::SickLDMessage::GetServiceCode (  )  const [inline]

Get the length of the service code associated with the message

uint8_t SickToolbox::SickLDMessage::GetServiceSubcode (  )  const [inline]

Get the service sub-code associated with the message

uint8_t SickToolbox::SickLDMessage::GetChecksum (  )  const [inline]

Get the checksum for the packet

void SickToolbox::SickLDMessage::Print (  )  const [virtual]

Print the message contents.

A debugging function that prints the contents of the frame.

Reimplemented from SickToolbox::SickMessage< SICK_LD_MSG_HEADER_LEN, SICK_LD_MSG_PAYLOAD_MAX_LEN, SICK_LD_MSG_TRAILER_LEN >.


The documentation for this class was generated from the following files:
Generated on Thu Mar 20 09:41:46 2008 for sicktoolbox-1.0 by  doxygen 1.5.1