Fixposition SDK 0.0.0-heads/main-0-g7b59b93
Collection of c++ libraries and apps for use with Fixposition products
Loading...
Searching...
No Matches
fpsdk::common::fpl::FplParser Class Reference

Logfile parser. More...

#include <fpl.hpp>

Public Member Functions

bool Add (const uint8_t *data, const std::size_t size)
 Add data to parser.
 
void Reset ()
 Reset parser.
 
bool Process (FplMessage &log_msg)
 Process data in parser, return message.
 

Detailed Description

Logfile parser.

Definition at line 161 of file fpl.hpp.

Member Function Documentation

◆ Add()

bool fpsdk::common::fpl::FplParser::Add ( const uint8_t * data,
const std::size_t size )

Add data to parser.

Parameters
[in]dataPointer to data, can be NULL, in which case size is ignored
[in]sizeSize of data, can be <= 0, in which case data is ignored

The suggested chunk size to add to the parser is FplMessage::MAX_SIZE

Returns
true if data was added to the parser, false if there was not enough space left (parser overflow)

◆ Reset()

void fpsdk::common::fpl::FplParser::Reset ( )

Reset parser.

Resets the parser state and discards all collected data.

◆ Process()

bool fpsdk::common::fpl::FplParser::Process ( FplMessage & log_msg)

Process data in parser, return message.

Parameters
[out]log_msgThe detected message
Returns
true if a message was detected, false otherwise (meaning: not enough data in parser). Note that also in the false case the log_msg may be modified.

The documentation for this class was generated from the following file: