mavsdk::LogStreaming Class Reference ​
#include: log_streaming.h
Provide log streaming data.
Data Structures ​
struct LogStreamingRaw
Public Types ​
Type | Description |
---|---|
enum Result | Possible results returned for logging requests. |
std::function< void(Result)> ResultCallback | Callback type for asynchronous LogStreaming calls. |
std::function< void(LogStreamingRaw)> LogStreamingRawCallback | Callback type for subscribe_log_streaming_raw. |
Handle< LogStreamingRaw > LogStreamingRawHandle | Handle type for subscribe_log_streaming_raw. |
Public Member Functions ​
Type | Name | Description |
---|---|---|
 | LogStreaming (System & system) | Constructor. Creates the plugin for a specific System. |
 | LogStreaming (std::shared_ptr< System > system) | Constructor. Creates the plugin for a specific System. |
 | ~LogStreaming () override | Destructor (internal use only). |
 | LogStreaming (const LogStreaming & other) | Copy constructor. |
void | start_log_streaming_async (const ResultCallback callback) | Start streaming logging data. |
Result | start_log_streaming () const | Start streaming logging data. |
void | stop_log_streaming_async (const ResultCallback callback) | Stop streaming logging data. |
Result | stop_log_streaming () const | Stop streaming logging data. |
LogStreamingRawHandle | subscribe_log_streaming_raw (const LogStreamingRawCallback & callback) | Subscribe to logging messages. |
void | unsubscribe_log_streaming_raw (LogStreamingRawHandle handle) | Unsubscribe from subscribe_log_streaming_raw. |
const LogStreaming & | operator= (const LogStreaming &)=delete | Equality operator (object is not copyable). |
Constructor & Destructor Documentation ​
LogStreaming() ​
mavsdk::LogStreaming::LogStreaming(System &system)
Constructor. Creates the plugin for a specific System.
The plugin is typically created as shown below:
auto log_streaming = LogStreaming(system);
Parameters
- System& system - The specific system associated with this plugin.
LogStreaming() ​
mavsdk::LogStreaming::LogStreaming(std::shared_ptr< System > system)
Constructor. Creates the plugin for a specific System.
The plugin is typically created as shown below:
auto log_streaming = LogStreaming(system);
Parameters
- std::shared_ptr< System > system - The specific system associated with this plugin.
~LogStreaming() ​
mavsdk::LogStreaming::~LogStreaming() override
Destructor (internal use only).
LogStreaming() ​
mavsdk::LogStreaming::LogStreaming(const LogStreaming &other)
Copy constructor.
Parameters
- const LogStreaming& other -
Member Typdef Documentation ​
typedef ResultCallback ​
using mavsdk::LogStreaming::ResultCallback = std::function<void(Result)>
Callback type for asynchronous LogStreaming calls.
typedef LogStreamingRawCallback ​
using mavsdk::LogStreaming::LogStreamingRawCallback = std::function<void(LogStreamingRaw)>
Callback type for subscribe_log_streaming_raw.
typedef LogStreamingRawHandle ​
using mavsdk::LogStreaming::LogStreamingRawHandle = Handle<LogStreamingRaw>
Handle type for subscribe_log_streaming_raw.
Member Enumeration Documentation ​
enum Result ​
Possible results returned for logging requests.
Value | Description |
---|---|
Success | Request succeeded. |
NoSystem | No system connected. |
ConnectionError | Connection error. |
Busy | System busy. |
CommandDenied | Command denied. |
Timeout | Timeout. |
Unsupported | Unsupported. |
Unknown | Unknown error. |
Member Function Documentation ​
start_log_streaming_async() ​
void mavsdk::LogStreaming::start_log_streaming_async(const ResultCallback callback)
Start streaming logging data.
This function is non-blocking. See 'start_log_streaming' for the blocking counterpart.
Parameters
- const ResultCallback callback -
start_log_streaming() ​
Result mavsdk::LogStreaming::start_log_streaming() const
Start streaming logging data.
This function is blocking. See 'start_log_streaming_async' for the non-blocking counterpart.
Returns
 Result - Result of request.
stop_log_streaming_async() ​
void mavsdk::LogStreaming::stop_log_streaming_async(const ResultCallback callback)
Stop streaming logging data.
This function is non-blocking. See 'stop_log_streaming' for the blocking counterpart.
Parameters
- const ResultCallback callback -
stop_log_streaming() ​
Result mavsdk::LogStreaming::stop_log_streaming() const
Stop streaming logging data.
This function is blocking. See 'stop_log_streaming_async' for the non-blocking counterpart.
Returns
 Result - Result of request.
subscribe_log_streaming_raw() ​
LogStreamingRawHandle mavsdk::LogStreaming::subscribe_log_streaming_raw(const LogStreamingRawCallback &callback)
Subscribe to logging messages.
Parameters
- const LogStreamingRawCallback& callback -
Returns
unsubscribe_log_streaming_raw() ​
void mavsdk::LogStreaming::unsubscribe_log_streaming_raw(LogStreamingRawHandle handle)
Unsubscribe from subscribe_log_streaming_raw.
Parameters
- LogStreamingRawHandle handle -
operator=() ​
const LogStreaming & mavsdk::LogStreaming::operator=(const LogStreaming &)=delete
Equality operator (object is not copyable).
Parameters
- const LogStreaming& -
Returns
 const LogStreaming & -