Analysis class of the PLEN2's protocol. More...
#include <Protocol.h>
Classes | |
class | Buffer |
Buffer struct. More... | |
Public Member Functions | |
Protocol () | |
Constructor. More... | |
virtual | ~Protocol () |
Destructor. More... | |
void | readByte (char byte) |
Read a character, and store it in the ring buffer. More... | |
bool | accept () |
Accept buffered string considering internal state. More... | |
void | transitState () |
Transit internal state. More... | |
virtual void | beforeHook () |
User-defined hook that runs before transitState() More... | |
virtual void | afterHook () |
User-defined hook that runs after transitState() More... | |
Protected Types | |
enum | State { READY, HEADER_INCOMING = 0, COMMAND_INCOMING, ARGUMENTS_INCOMING, STATE_EOE } |
List of the internal states. More... | |
Protected Member Functions | |
void | m_abort () |
Abort analysis. More... | |
Protected Attributes | |
Buffer | m_buffer |
State | m_state |
uint8_t | m_store_length |
bool | m_installing |
Utility::AbstractParser * | m_parser [STATE_EOE] |
Analysis class of the PLEN2's protocol.
The class only analyses the command line given, so you should override the event handler(s) by inheriting the class yourself.
Please see the virtual methods to get more details.
|
protected |
PLEN2::Protocol::Protocol | ( | ) |
Constructor.
|
inlinevirtual |
Destructor.
bool PLEN2::Protocol::accept | ( | ) |
Accept buffered string considering internal state.
|
virtual |
User-defined hook that runs after transitState()
|
virtual |
User-defined hook that runs before transitState()
|
protected |
Abort analysis.
void PLEN2::Protocol::readByte | ( | char | byte | ) |
Read a character, and store it in the ring buffer.
[in] | byte | A character. |
void PLEN2::Protocol::transitState | ( | ) |
Transit internal state.
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |