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::FplMessage Class Reference

One message in the log. More...

#include <fpl.hpp>

Public Member Functions

int Parse (const uint8_t *data, const uint32_t size)
 Parse message from buffer.
 
const std::vector< uint8_t > & Raw () const
 Get message.
 
const uint8_t * RawData () const
 Get message data.
 
uint32_t RawSize () const
 Get message size.
 
FplType PayloadType () const
 Get payload (log) type.
 
const uint8_t * PayloadData () const
 Get payload data.
 
uint32_t PayloadSize () const
 Get payload size.
 
void SetBlob (const uint8_t *data, const uint32_t size)
 Make message a BLOB.
 

Public Attributes

uint64_t file_pos_
 Offset in logfile of the log message.
 
uint64_t file_size_
 Size in the logfile of the log message.
 
uint64_t file_seq_
 Message sequence counter in logfile.
 

Static Public Attributes

static constexpr std::uint32_t MAX_SIZE = 2000000
 Maximum message size.
 
static constexpr std::size_t MAX_NAME_LEN = 100
 Maximum length of (file, topic, ...) names.
 

Detailed Description

One message in the log.

Definition at line 74 of file fpl.hpp.

Member Function Documentation

◆ Parse()

int fpsdk::common::fpl::FplMessage::Parse ( const uint8_t * data,
const uint32_t size )

Parse message from buffer.

Parameters
[in]dataPointer to start of message data
[in]sizeSize of message data
Returns
0 if the data is not a valid message, -1 if the size is too small to decide, or the message size (>0) if a valid message was found and loaded

◆ Raw()

const std::vector< uint8_t > & fpsdk::common::fpl::FplMessage::Raw ( ) const

Get message.

Returns
a reference to the message data

◆ RawData()

const uint8_t * fpsdk::common::fpl::FplMessage::RawData ( ) const

Get message data.

Returns
a pointer to the message data (size = Size())

◆ RawSize()

uint32_t fpsdk::common::fpl::FplMessage::RawSize ( ) const

Get message size.

Returns
the size of the message (data = Data())

◆ PayloadType()

FplType fpsdk::common::fpl::FplMessage::PayloadType ( ) const

Get payload (log) type.

Returns
type of the payload

◆ PayloadData()

const uint8_t * fpsdk::common::fpl::FplMessage::PayloadData ( ) const

Get payload data.

Returns
a pointer to the payload data

◆ PayloadSize()

uint32_t fpsdk::common::fpl::FplMessage::PayloadSize ( ) const

Get payload size.

Returns
size of the payload data

◆ SetBlob()

void fpsdk::common::fpl::FplMessage::SetBlob ( const uint8_t * data,
const uint32_t size )

Make message a BLOB.

Parameters
[in]dataThe data
[in]sizeThe size of the data

Member Data Documentation

◆ file_pos_

uint64_t fpsdk::common::fpl::FplMessage::file_pos_

Offset in logfile of the log message.

Definition at line 133 of file fpl.hpp.

◆ file_size_

uint64_t fpsdk::common::fpl::FplMessage::file_size_

Size in the logfile of the log message.

Definition at line 134 of file fpl.hpp.

◆ file_seq_

uint64_t fpsdk::common::fpl::FplMessage::file_seq_

Message sequence counter in logfile.

Definition at line 135 of file fpl.hpp.

◆ MAX_SIZE

std::uint32_t fpsdk::common::fpl::FplMessage::MAX_SIZE = 2000000
staticconstexpr

Maximum message size.

Definition at line 137 of file fpl.hpp.

◆ MAX_NAME_LEN

std::size_t fpsdk::common::fpl::FplMessage::MAX_NAME_LEN = 100
staticconstexpr

Maximum length of (file, topic, ...) names.

Definition at line 138 of file fpl.hpp.


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