sick::msg_t Class Reference

#include <sick_msg.H>

Inheritance diagram for sick::msg_t:
sick::msg_0x20_t sick::msg_0x77_t sick::msg_0x90_t sick::msg_0xA0_t sick::msg_0xB0_t sick::msg_0xB1_t sick::msg_0xC4_t sick::msg_0xF5_t

List of all members.

Public Member Functions

 msg_t ()
 msg_t (msg_t const *msg)
unsigned decode (unsigned char const *buf, unsigned buf_size)
void print (unsigned char const *buf, unsigned buf_size) const
bool valid (void) const
unsigned size (void) const
bool is_ack (void) const
bool is_nak (void) const
unsigned stx (void) const
unsigned msg_id (void) const
unsigned address (void) const
unsigned msg_len (void) const
unsigned checksum (void) const

Static Public Attributes

static unsigned const STX = 0x02
static unsigned const ACK = 0x06
static unsigned const NAK = 0x15

Static Protected Member Functions

static unsigned calc_crc (unsigned char const *data, unsigned size)
static unsigned skip_to_stx (unsigned char const *data, unsigned size)

Protected Attributes

bool m_valid
unsigned m_size
unsigned char const * m_data

Static Protected Attributes

static unsigned const ENVELOPE_SIZE = 6
static unsigned const HEADER_SIZE = 4
static unsigned const FOOTER_SIZE = 2
static unsigned const ADDRESS_OFFSET = 1
static unsigned const MSG_LEN_OFFSET = 2
static unsigned const MSG_ID_OFFSET = 4

Friends

class msg_builder_t

Constructor & Destructor Documentation

msg_t::msg_t (  ) 
msg_t::msg_t ( msg_t const *  msg  ) 

Member Function Documentation

unsigned sick::msg_t::address ( void   )  const [inline]

References ADDRESS_OFFSET, and m_data.

unsigned msg_t::calc_crc ( unsigned char const *  data,
unsigned  size 
) [static, protected]
unsigned sick::msg_t::checksum ( void   )  const [inline]

References HEADER_SIZE, m_data, and msg_len().

unsigned msg_t::decode ( unsigned char const *  buf,
unsigned  buf_size 
)
bool sick::msg_t::is_ack ( void   )  const [inline]

References ACK, m_data, m_size, and m_valid.

Referenced by main().

bool sick::msg_t::is_nak ( void   )  const [inline]

References m_data, m_size, m_valid, and NAK.

unsigned sick::msg_t::msg_id ( void   )  const [inline]

References m_data, and MSG_ID_OFFSET.

Referenced by main().

unsigned sick::msg_t::msg_len ( void   )  const [inline]
void msg_t::print ( unsigned char const *  buf,
unsigned  buf_size 
) const
unsigned sick::msg_t::size ( void   )  const [inline]

References m_size.

Referenced by main(), and print().

unsigned msg_t::skip_to_stx ( unsigned char const *  data,
unsigned  size 
) [static, protected]

References STX, and stx().

Referenced by decode().

unsigned sick::msg_t::stx ( void   )  const [inline]

References m_data.

Referenced by skip_to_stx().

bool sick::msg_t::valid ( void   )  const [inline]

References m_valid.

Referenced by main().


Friends And Related Function Documentation

friend class msg_builder_t [friend]

Member Data Documentation

unsigned const sick::msg_t::ACK = 0x06 [static]

Referenced by decode(), is_ack(), and print().

unsigned const sick::msg_t::ADDRESS_OFFSET = 1 [static, protected]
unsigned const sick::msg_t::ENVELOPE_SIZE = 6 [static, protected]
unsigned const sick::msg_t::FOOTER_SIZE = 2 [static, protected]

Referenced by decode(), and print().

unsigned const sick::msg_t::HEADER_SIZE = 4 [static, protected]
unsigned char const* sick::msg_t::m_data [protected]

Referenced by address(), sick::msg_0x77_t::availability(), sick::msg_0xB1_t::baud_rate(), sick::msg_0xF5_t::beam_dis(), sick::msg_0xC4_t::beam_flags(), sick::msg_0xB0_t::beam_flags(), sick::msg_0xF5_t::beam_reflect(), sick::msg_0x77_t::blanking(), sick::msg_0x77_t::blanking_multiple_eval(), sick::msg_0xB1_t::boot_prom_sw_version(), checksum(), sick::msg_0x77_t::contour_a_beg_angle(), sick::msg_0x77_t::contour_a_end_angle(), sick::msg_0x77_t::contour_a_neg_tolerance(), sick::msg_0x77_t::contour_a_pos_tolerance(), sick::msg_0x77_t::contour_a_reference(), sick::msg_0x77_t::contour_b_beg_angle(), sick::msg_0x77_t::contour_b_end_angle(), sick::msg_0x77_t::contour_b_neg_tolerance(), sick::msg_0x77_t::contour_b_pos_tolerance(), sick::msg_0x77_t::contour_b_reference(), sick::msg_0x77_t::contour_c_beg_angle(), sick::msg_0x77_t::contour_c_end_angle(), sick::msg_0x77_t::contour_c_neg_tolerance(), sick::msg_0x77_t::contour_c_pos_tolerance(), sick::msg_0x77_t::contour_c_reference(), sick::msg_0x77_t::dazzling_multiple_eval(), decode(), sick::msg_0xF5_t::dgram_index(), sick::msg_0xC4_t::dgram_index(), sick::msg_0xB0_t::dgram_index(), sick::msg_0x77_t::field_a_b_subtractive(), sick::msg_0x77_t::field_b_c_restart_time(), sick::msg_0xC4_t::first_reflect_val(), is_ack(), is_nak(), sick::msg_0xB1_t::laser_enabled(), sick::msg_0xC4_t::last_reflect_val(), sick::msg_0xB1_t::manufacturer_code(), sick::msg_0x77_t::measuring_mode(), msg_id(), msg_len(), sick::msg_0x77_t::multiple_eval(), sick::msg_0xF5_t::num_beams(), sick::msg_0xF5_t::num_ranges(), sick::msg_0xC4_t::num_reflect_val(), sick::msg_0xB1_t::operating_mode(), sick::msg_0x77_t::pixel_eval(), sick::msg_0xC4_t::reflectivity(), sick::msg_0x77_t::restart(), sick::msg_0x77_t::restart_time(), sick::msg_0xF5_t::scan_flags(), sick::msg_0xC4_t::scan_flags(), sick::msg_0xB0_t::scan_flags(), sick::msg_0xF5_t::scan_index(), sick::msg_0xC4_t::scan_index(), sick::msg_0xB0_t::scan_index(), sick::msg_0x77_t::sensitivity(), sick::msg_0x77_t::single_eval_mode(), sick::msg_0xB1_t::status(), stx(), sick::msg_0x20_t::sub_command(), sick::msg_0xA0_t::success(), sick::msg_0xB1_t::sw_version(), sick::msg_0x77_t::temporary_field(), sick::msg_0xB1_t::units(), sick::msg_0x77_t::units(), and sick::msg_0x90_t::version().

unsigned sick::msg_t::m_size [protected]

Referenced by decode(), is_ack(), is_nak(), and size().

bool sick::msg_t::m_valid [protected]

Referenced by decode(), is_ack(), is_nak(), and valid().

unsigned const sick::msg_t::MSG_ID_OFFSET = 4 [static, protected]
unsigned const sick::msg_t::MSG_LEN_OFFSET = 2 [static, protected]
unsigned const sick::msg_t::NAK = 0x15 [static]

Referenced by is_nak().

unsigned const sick::msg_t::STX = 0x02 [static]

The documentation for this class was generated from the following files:

Generated on Fri Apr 9 10:45:12 2010 for drivers by  doxygen 1.6.1