#include <parser.h>
Public Member Functions | |
virtual void | Clear () |
Reset and prepare for a new raw data packet. | |
virtual void | SetIds (uint8_t RecType, uint32_t UniqueId) |
Stores the IDs. | |
virtual void | ParseHeader (const Data &data, size_t &offset) |
Called to parse the header portion of the raw data packet. | |
virtual void | ParseFields (const Data &data, size_t &offset, const IConverter *ic) |
Called to parse sub fields in the raw data packet. | |
virtual void | Store () |
Called at the very end of record parsing, and used to store the final packet somewhere, either in memory, disk, etc. |
Call Init() and the protocol will be dumped to stdout and no parsing will be done.
Do NOT derive your own personal parser classes from this, unless you are perfectly confident that you will catch future API changes on the devel tree without the compiler's help.
Definition at line 94 of file parser.h.
virtual void Barry::NullParser::Clear | ( | ) | [inline, virtual] |
virtual void Barry::NullParser::ParseFields | ( | const Data & | data, | |
size_t & | offset, | |||
const IConverter * | ic | |||
) | [inline, virtual] |
Called to parse sub fields in the raw data packet.
The same data is passed as was passed in ParseHeader, only the offset will be updated if it was advanced during the header parsing.
Implements Barry::Parser.
virtual void Barry::NullParser::ParseHeader | ( | const Data & | data, | |
size_t & | offset | |||
) | [inline, virtual] |
Called to parse the header portion of the raw data packet.
data contains the entire packet, and offset contains the location at which to start parsing.
Implements Barry::Parser.
virtual void Barry::NullParser::SetIds | ( | uint8_t | RecType, | |
uint32_t | UniqueId | |||
) | [inline, virtual] |
virtual void Barry::NullParser::Store | ( | ) | [inline, virtual] |
Called at the very end of record parsing, and used to store the final packet somewhere, either in memory, disk, etc.
Implements Barry::Parser.