PX4 Firmware
PX4 Autopilot Software http://px4.io
MavlinkLogHandler Class Reference

#include <mavlink_log_handler.h>

Collaboration diagram for MavlinkLogHandler:

Public Member Functions

 MavlinkLogHandler (Mavlink *mavlink)
 
void handle_message (const mavlink_message_t *msg)
 
void send (const hrt_abstime t)
 Handle sending of messages. More...
 
unsigned get_size ()
 

Private Member Functions

void _log_message (const mavlink_message_t *msg)
 
void _log_request_list (const mavlink_message_t *msg)
 
void _log_request_data (const mavlink_message_t *msg)
 
void _log_request_erase (const mavlink_message_t *msg)
 
void _log_request_end (const mavlink_message_t *msg)
 
size_t _log_send_listing ()
 
size_t _log_send_data ()
 

Private Attributes

LogListHelper_pLogHandlerHelper
 
Mavlink_mavlink
 

Detailed Description

Definition at line 91 of file mavlink_log_handler.h.

Constructor & Destructor Documentation

◆ MavlinkLogHandler()

MavlinkLogHandler::MavlinkLogHandler ( Mavlink mavlink)

Definition at line 82 of file mavlink_log_handler.cpp.

Member Function Documentation

◆ _log_message()

void MavlinkLogHandler::_log_message ( const mavlink_message_t *  msg)
private

◆ _log_request_data()

void MavlinkLogHandler::_log_request_data ( const mavlink_message_t *  msg)
private

Definition at line 192 of file mavlink_log_handler.cpp.

References _pLogHandlerHelper, LogListHelper::current_log_data_offset, LogListHelper::current_log_data_remaining, LogListHelper::current_log_filename, LogListHelper::current_log_index, LogListHelper::current_log_size, LogListHelper::current_status, LogListHelper::get_entry(), LogListHelper::log_count, LogListHelper::LOG_HANDLER_IDLE, LogListHelper::LOG_HANDLER_SENDING_DATA, LogListHelper::open_for_transmit(), and PX4LOG_WARN.

Referenced by handle_message().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ _log_request_end()

void MavlinkLogHandler::_log_request_end ( const mavlink_message_t *  msg)
private

Definition at line 265 of file mavlink_log_handler.cpp.

References _pLogHandlerHelper, and PX4LOG_WARN.

Referenced by handle_message().

Here is the caller graph for this function:

◆ _log_request_erase()

void MavlinkLogHandler::_log_request_erase ( const mavlink_message_t *  msg)
private

Definition at line 248 of file mavlink_log_handler.cpp.

References _pLogHandlerHelper, LogListHelper::delete_all(), and kLogRoot.

Referenced by handle_message().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ _log_request_list()

void MavlinkLogHandler::_log_request_list ( const mavlink_message_t *  msg)
private

Definition at line 153 of file mavlink_log_handler.cpp.

References _pLogHandlerHelper, LogListHelper::current_status, LogListHelper::last_entry, LogListHelper::log_count, LogListHelper::LOG_HANDLER_IDLE, LogListHelper::LOG_HANDLER_LISTING, LogListHelper::next_entry, and PX4LOG_WARN.

Referenced by handle_message().

Here is the caller graph for this function:

◆ _log_send_data()

size_t MavlinkLogHandler::_log_send_data ( )
private

Definition at line 309 of file mavlink_log_handler.cpp.

References _mavlink, _pLogHandlerHelper, LogListHelper::current_log_data_offset, LogListHelper::current_log_data_remaining, LogListHelper::current_log_index, LogListHelper::current_status, Mavlink::get_channel(), LogListHelper::get_log_data(), and LogListHelper::LOG_HANDLER_IDLE.

Referenced by send().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ _log_send_listing()

size_t MavlinkLogHandler::_log_send_listing ( )
private

Definition at line 277 of file mavlink_log_handler.cpp.

References _mavlink, _pLogHandlerHelper, LogListHelper::current_status, Mavlink::get_channel(), LogListHelper::get_entry(), LogListHelper::last_entry, LogListHelper::log_count, LogListHelper::LOG_HANDLER_IDLE, LogListHelper::next_entry, and PX4LOG_WARN.

Referenced by send().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ get_size()

unsigned MavlinkLogHandler::get_size ( )

Definition at line 114 of file mavlink_log_handler.cpp.

References _pLogHandlerHelper, LogListHelper::current_status, LogListHelper::LOG_HANDLER_LISTING, and LogListHelper::LOG_HANDLER_SENDING_DATA.

Referenced by send().

Here is the caller graph for this function:

◆ handle_message()

void MavlinkLogHandler::handle_message ( const mavlink_message_t *  msg)

Definition at line 91 of file mavlink_log_handler.cpp.

References _log_request_data(), _log_request_end(), _log_request_erase(), and _log_request_list().

Referenced by MavlinkReceiver::Run().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ send()

void MavlinkLogHandler::send ( const hrt_abstime  t)

Handle sending of messages.

Call this regularly at a fixed frequency.

Parameters
tcurrent time

Definition at line 132 of file mavlink_log_handler.cpp.

References _log_send_data(), _log_send_listing(), _mavlink, _pLogHandlerHelper, LogListHelper::current_status, Mavlink::get_free_tx_buf(), get_size(), LogListHelper::LOG_HANDLER_LISTING, LogListHelper::LOG_HANDLER_SENDING_DATA, and MAX_BYTES_SEND.

Referenced by MavlinkReceiver::Run().

Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ _mavlink

Mavlink* MavlinkLogHandler::_mavlink
private

Definition at line 118 of file mavlink_log_handler.h.

Referenced by _log_send_data(), _log_send_listing(), and send().

◆ _pLogHandlerHelper

LogListHelper* MavlinkLogHandler::_pLogHandlerHelper
private

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