DUNE: Uniform Navigational Environment  2016.05.0
Sensors::Klein3500::Parser Class Reference

Public Types

enum  State { ST_CMD, ST_SIZE, ST_DATA }
 

Public Member Functions

 Parser (void)
 
 ~Parser (void)
 
bool parse (uint8_t byte, Packet *pkt)
 
State getState (void) const
 
PacketgetPacket (void)
 

Member Enumeration Documentation

Enumerator
ST_CMD 
ST_SIZE 
ST_DATA 

Constructor & Destructor Documentation

Sensors::Klein3500::Parser::Parser ( void  )
inline
Sensors::Klein3500::Parser::~Parser ( void  )
inline

Member Function Documentation

Packet* Sensors::Klein3500::Parser::getPacket ( void  )
inline
State Sensors::Klein3500::Parser::getState ( void  ) const
inline
bool Sensors::Klein3500::Parser::parse ( uint8_t  byte,
Packet pkt 
)
inline

Parse one byte of data.

Parameters
[in]bytedata byte.
[in]pktdestination packet.
Returns
true if a message was parsed, falsed otherwise.

References Sensors::Klein3500::Packet::getData(), Sensors::Klein3500::Packet::getSize(), Sensors::Klein3500::Packet::setCommand(), Sensors::Klein3500::Packet::setSize(), ST_CMD, ST_DATA, and ST_SIZE.

Referenced by Sensors::Klein3500::CommandLink::readDataPage().

Collaboration diagram for Sensors::Klein3500::Parser:
Collaboration graph