navcom::msg_t Class Reference

#include <navcom_msg.H>

List of all members.

Public Member Functions

 msg_t ()
unsigned decode (unsigned size_, unsigned char const *data_)
bool valid () const
unsigned size () const
unsigned char const * data () const
u8_t stx () const
u8_t preamble1 () const
u8_t preamble2 () const
u8_t command () const
u16_t length () const
u8_t cksum () const
u8_t etx () const

Static Public Attributes

static unsigned const MAX_SIZE = 65543
static u8_t const STX = 0x02
static u8_t const PREAMBLE1 = 0x99
static u8_t const PREAMBLE2 = 0x66
static u8_t const ETX = 0x03

Static Protected Member Functions

static unsigned skip_to_stx (unsigned size_, unsigned char const *data_)

Protected Attributes

bool m_valid
unsigned m_size
u8_t const * m_data

Static Protected Attributes

static unsigned const STX_OFFSET = 0
static unsigned const PREAMBLE1_OFFSET = 1
static unsigned const PREAMBLE2_OFFSET = 2
static unsigned const COMMAND_OFFSET = 3
static unsigned const LENGTH_OFFSET = 4
static unsigned const ENVELOPE_SIZE = 4
static unsigned const MIN_SIZE = 8

Constructor & Destructor Documentation

navcom::msg_t::msg_t (  )  [inline]

Member Function Documentation

u8_t navcom::msg_t::cksum (  )  const [inline]

References m_data, and m_size.

Referenced by decode().

u8_t navcom::msg_t::command (  )  const [inline]

References COMMAND_OFFSET, and m_data.

unsigned char const* navcom::msg_t::data (  )  const [inline]

References m_data.

unsigned msg_t::decode ( unsigned  size_,
unsigned char const *  data_ 
)
u8_t navcom::msg_t::etx (  )  const [inline]

References m_data, and m_size.

Referenced by decode().

u16_t navcom::msg_t::length (  )  const [inline]

References LENGTH_OFFSET, and m_data.

u8_t navcom::msg_t::preamble1 (  )  const [inline]

References m_data, and PREAMBLE1_OFFSET.

u8_t navcom::msg_t::preamble2 (  )  const [inline]

References m_data, and PREAMBLE2_OFFSET.

unsigned navcom::msg_t::size (  )  const [inline]

References m_size.

unsigned msg_t::skip_to_stx ( unsigned  size_,
unsigned char const *  data_ 
) [static, protected]

References STX, and stx().

Referenced by decode().

u8_t navcom::msg_t::stx (  )  const [inline]

References m_data, and STX_OFFSET.

Referenced by skip_to_stx().

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

References m_valid.

Referenced by main().


Member Data Documentation

unsigned const navcom::msg_t::COMMAND_OFFSET = 3 [static, protected]

Referenced by command(), and decode().

unsigned const navcom::msg_t::ENVELOPE_SIZE = 4 [static, protected]

Referenced by decode().

u8_t const navcom::msg_t::ETX = 0x03 [static]

Referenced by decode().

unsigned const navcom::msg_t::LENGTH_OFFSET = 4 [static, protected]

Referenced by decode(), and length().

u8_t const* navcom::msg_t::m_data [protected]
unsigned navcom::msg_t::m_size [protected]

Referenced by cksum(), decode(), etx(), and size().

bool navcom::msg_t::m_valid [protected]

Referenced by decode(), and valid().

unsigned const navcom::msg_t::MAX_SIZE = 65543 [static]
unsigned const navcom::msg_t::MIN_SIZE = 8 [static, protected]

Referenced by decode().

u8_t const navcom::msg_t::PREAMBLE1 = 0x99 [static]

Referenced by decode().

unsigned const navcom::msg_t::PREAMBLE1_OFFSET = 1 [static, protected]

Referenced by decode(), and preamble1().

u8_t const navcom::msg_t::PREAMBLE2 = 0x66 [static]

Referenced by decode().

unsigned const navcom::msg_t::PREAMBLE2_OFFSET = 2 [static, protected]

Referenced by decode(), and preamble2().

u8_t const navcom::msg_t::STX = 0x02 [static]

Referenced by decode(), and skip_to_stx().

unsigned const navcom::msg_t::STX_OFFSET = 0 [static, protected]

Referenced by decode(), and stx().


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