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

#include <ULogUtility.h>

+ Inheritance diagram for ULogUtility::MessageHandler:
+ Collaboration diagram for ULogUtility::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 63 of file ULogUtility.h.

Constructor & Destructor Documentation

◆ MessageHandler()

ULogUtility::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 ULogUtility.cc.

◆ ~MessageHandler()

virtual ULogUtility::MessageHandler::~MessageHandler ( )
virtualdefault

Member Function Documentation

◆ addLoggedMessage()

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

Definition at line 82 of file ULogUtility.cc.

◆ data()

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

Definition at line 97 of file ULogUtility.cc.

References data().

Referenced by data().

◆ error()

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

Definition at line 64 of file ULogUtility.cc.

◆ hadFatalError()

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

Check if a fatal error occurred during parsing.

Definition at line 82 of file ULogUtility.h.

◆ hasMessageFormat()

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

Check if the target message format was found.

Definition at line 91 of file ULogUtility.h.

◆ headerComplete()

void ULogUtility::MessageHandler::headerComplete ( )
override

Definition at line 89 of file ULogUtility.cc.

◆ isHeaderComplete()

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

Check if the ULog header was successfully parsed.

Definition at line 85 of file ULogUtility.h.

◆ messageCount()

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

Get the number of messages processed.

Definition at line 88 of file ULogUtility.h.

◆ messageFormat()

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

Definition at line 75 of file ULogUtility.cc.


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