QGroundControl
Ground Control Station for MAVLink Drones
Loading...
Searching...
No Matches
PX4ULogUtility::MessageHandler Class Reference

#include <PX4ULogUtility.h>

+ Inheritance diagram for PX4ULogUtility::MessageHandler:
+ Collaboration diagram for PX4ULogUtility::MessageHandler:

Public Member Functions

 MessageHandler (const std::string &messageName, const MessageCallback &callback, QString &errorMsg)
 
virtual ~MessageHandler ()=default
 
void error (const std::string &msg, bool is_recoverable) override
 
void messageFormat (const ulog_cpp::MessageFormat &message_format) override
 
void addLoggedMessage (const ulog_cpp::AddLoggedMessage &add_logged_message) override
 
void headerComplete () override
 
void data (const ulog_cpp::Data &data) override
 
bool hadFatalError () const
 Check if a fatal error occurred during parsing.
 
bool isHeaderComplete () const
 Check if the ULog header was successfully parsed.
 
int messageCount () const
 Get the number of messages processed.
 
bool hasMessageFormat () const
 Check if the target message format was found.
 

Detailed Description

Generic streaming handler for ULog messages by name Filters messages by name and calls a callback for each matching message

Definition at line 60 of file PX4ULogUtility.h.

Constructor & Destructor Documentation

◆ MessageHandler()

PX4ULogUtility::MessageHandler::MessageHandler ( const std::string &  messageName,
const MessageCallback callback,
QString &  errorMsg 
)
explicit

Create a handler that filters for a specific message type

Parameters
messageNameName of the message to filter for (e.g., "camera_capture")
callbackFunction called for each matching message
errorMsgReference to store error messages

Definition at line 55 of file PX4ULogUtility.cc.

◆ ~MessageHandler()

virtual PX4ULogUtility::MessageHandler::~MessageHandler ( )
virtualdefault

Member Function Documentation

◆ addLoggedMessage()

void PX4ULogUtility::MessageHandler::addLoggedMessage ( const ulog_cpp::AddLoggedMessage &  add_logged_message)
override

Definition at line 82 of file PX4ULogUtility.cc.

◆ data()

void PX4ULogUtility::MessageHandler::data ( const ulog_cpp::Data &  data)
override

Definition at line 97 of file PX4ULogUtility.cc.

References data().

Referenced by data().

◆ error()

void PX4ULogUtility::MessageHandler::error ( const std::string &  msg,
bool  is_recoverable 
)
override

Definition at line 64 of file PX4ULogUtility.cc.

◆ hadFatalError()

bool PX4ULogUtility::MessageHandler::hadFatalError ( ) const
inline

Check if a fatal error occurred during parsing.

Definition at line 79 of file PX4ULogUtility.h.

◆ hasMessageFormat()

bool PX4ULogUtility::MessageHandler::hasMessageFormat ( ) const
inline

Check if the target message format was found.

Definition at line 88 of file PX4ULogUtility.h.

◆ headerComplete()

void PX4ULogUtility::MessageHandler::headerComplete ( )
override

Definition at line 89 of file PX4ULogUtility.cc.

◆ isHeaderComplete()

bool PX4ULogUtility::MessageHandler::isHeaderComplete ( ) const
inline

Check if the ULog header was successfully parsed.

Definition at line 82 of file PX4ULogUtility.h.

◆ messageCount()

int PX4ULogUtility::MessageHandler::messageCount ( ) const
inline

Get the number of messages processed.

Definition at line 85 of file PX4ULogUtility.h.

◆ messageFormat()

void PX4ULogUtility::MessageHandler::messageFormat ( const ulog_cpp::MessageFormat &  message_format)
override

Definition at line 75 of file PX4ULogUtility.cc.


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