10 #ifndef PLEN2_PROTOCOL_H
11 #define PLEN2_PROTOCOL_H
73 for (uint8_t index = 0; index <
LENGTH; index++)
132 #endif // PLEN2_PROTOCOL_H
Definition: AccelerationGyroSensor.h:16
Ready.
Definition: Protocol.h:42
char data[LENGTH]
Actual buffer instance.
Definition: Protocol.h:64
bool accept()
Accept buffered string considering internal state.
State m_state
Definition: Protocol.h:81
Buffer()
Constructor.
Definition: Protocol.h:70
virtual void beforeHook()
User-defined hook that runs before transitState()
Definition: Protocol.h:62
Buffer m_buffer
Definition: Protocol.h:80
void m_abort()
Abort analysis.
virtual void afterHook()
User-defined hook that runs after transitState()
void readByte(char byte)
Read a character, and store it in the ring buffer.
virtual ~Protocol()
Destructor.
Definition: Protocol.h:100
Abstract parser interface.
Definition: Parser.h:83
Analysis class of the PLEN2's protocol.
Definition: Protocol.h:34
uint8_t m_store_length
Definition: Protocol.h:82
bool m_installing
Definition: Protocol.h:83
Will receive string that might be COMMAND.
Definition: Protocol.h:44
uint8_t position
Current iterator's position.
Definition: Protocol.h:65
Will receive string that might be HEADER. (Alias of state READY.)
Definition: Protocol.h:43
Will receive string that might be ARGUMENTS.
Definition: Protocol.h:45
Buffer struct.
Definition: Protocol.h:52
State
List of the internal states.
Definition: Protocol.h:40
Utility::AbstractParser * m_parser[STATE_EOE]
Definition: Protocol.h:84
void transitState()
Transit internal state.
Summation of the states.
Definition: Protocol.h:46