Firmware
Public Member Functions | Static Public Member Functions | List of all members
MavlinkULog Class Reference

ULog streaming class. More...

#include <mavlink_ulog.h>

Public Member Functions

void stop ()
 stop the stream. More...
 
int handle_update (mavlink_channel_t channel)
 periodic update method: check for ulog stream messages and handle retransmission. More...
 
void handle_ack (mavlink_logging_ack_t ack)
 ack from mavlink for a data message
 
void start_ack_received ()
 this is called when we got an vehicle_command_ack from the logger
 
float current_data_rate () const
 
float maximum_data_rate () const
 
int get_ulog_stream_fd () const
 

Static Public Member Functions

static void initialize ()
 initialize: call this once on startup (this function is not thread-safe!)
 
static MavlinkULogtry_start (int datarate, float max_rate_factor, uint8_t target_system, uint8_t target_component)
 try to start a new stream. More...
 

Detailed Description

ULog streaming class.

At most one instance (stream) can exist, assigned to a specific mavlink channel.

Member Function Documentation

§ handle_update()

int MavlinkULog::handle_update ( mavlink_channel_t  channel)

periodic update method: check for ulog stream messages and handle retransmission.

Returns
0 on success, <0 otherwise

§ stop()

void MavlinkULog::stop ( void  )

stop the stream.

It also deletes the singleton object, so make sure cleanup all pointers to it. thread-safe

§ try_start()

MavlinkULog * MavlinkULog::try_start ( int  datarate,
float  max_rate_factor,
uint8_t  target_system,
uint8_t  target_component 
)
static

try to start a new stream.

This fails if a stream is already running. thread-safe

Parameters
dataratemaximum link data rate in B/s
max_rate_factorlet ulog streaming use a maximum of max_rate_factor * datarate
target_systemID for mavlink message
target_componentID for mavlink message
Returns
instance, or nullptr

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