DUNE: Uniform Navigational Environment  2017.01.0
Actuators::AMC::Parser Class Reference

Detailed Description

Message Parser for AMC motor controller.

Author
Pedro Gonçalves

Classes

struct  AMCMotorState
 

Public Types

enum  AMCParserStates { PS_PREAMBLE, PS_DATA, PS_CS }
 

Public Member Functions

 Parser (void)
 
 ~Parser (void)
 
bool parse (uint8_t byte)
 
bool translate (void)
 

Public Attributes

AMCMotorState m_motor
 

Member Enumeration Documentation

State machine states.

Enumerator
PS_PREAMBLE 

Read preamble.

PS_DATA 

Data received.

PS_CS 

Read checksum.

Constructor & Destructor Documentation

Actuators::AMC::Parser::Parser ( void  )
inline
Actuators::AMC::Parser::~Parser ( void  )
inline

Member Function Documentation

bool Actuators::AMC::Parser::parse ( uint8_t  byte)
inline

Parse message received.

References PS_CS, PS_DATA, and PS_PREAMBLE.

Referenced by Actuators::AMC::Task::checkSerialPort().

Member Data Documentation

Collaboration diagram for Actuators::AMC::Parser:
Collaboration graph