mavsdk::LogFiles Class Reference

#include: log_files.h


Allow to download log files from the vehicle after a flight is complete. For log streaming during flight check the logging plugin.

Data Structures

struct Entry

struct ProgressData

Public Types

Type Description
enum Result Possible results returned for calibration commands.
std::function< void(Result)> ResultCallback Callback type for asynchronous LogFiles calls.
std::function< void(Result, std::vector< Entry >)> GetEntriesCallback Callback type for get_entries_async.
std::function< void(LogFiles::Result, ProgressData)> DownloadLogFileCallback Callback type for download_log_file_async.

Public Member Functions

Type Name Description
  LogFiles (System & system) Constructor. Creates the plugin for a specific System.
  LogFiles (std::shared_ptr< System > system) Constructor. Creates the plugin for a specific System.
  ~LogFiles () Destructor (internal use only).
  LogFiles (const LogFiles & other) Copy constructor.
void get_entries_async (const GetEntriesCallback callback) Get List of log files.
std::pair< Result, std::vector< LogFiles::Entry > > get_entries () const Get List of log files.
void download_log_file_async (uint32_t id, std::string path, DownloadLogFileCallback callback) Download log file.
const LogFiles & operator= (const LogFiles &)=delete Equality operator (object is not copyable).

Constructor & Destructor Documentation

LogFiles()

mavsdk::LogFiles::LogFiles(System &system)

Constructor. Creates the plugin for a specific System.

The plugin is typically created as shown below:

auto log_files = LogFiles(system);

Parameters

  • System& system - The specific system associated with this plugin.

LogFiles()

mavsdk::LogFiles::LogFiles(std::shared_ptr< System > system)

Constructor. Creates the plugin for a specific System.

The plugin is typically created as shown below:

auto log_files = LogFiles(system);

Parameters

  • std::shared_ptr< System > system - The specific system associated with this plugin.

~LogFiles()

mavsdk::LogFiles::~LogFiles()

Destructor (internal use only).

LogFiles()

mavsdk::LogFiles::LogFiles(const LogFiles &other)

Copy constructor.

Parameters

Member Typdef Documentation

typedef ResultCallback

using mavsdk::LogFiles::ResultCallback =  std::function<void(Result)>

Callback type for asynchronous LogFiles calls.

typedef GetEntriesCallback

using mavsdk::LogFiles::GetEntriesCallback =  std::function<void(Result, std::vector<Entry>)>

Callback type for get_entries_async.

typedef DownloadLogFileCallback

using mavsdk::LogFiles::DownloadLogFileCallback =  std::function<void(LogFiles::Result, ProgressData)>

Callback type for download_log_file_async.

Member Enumeration Documentation

enum Result

Possible results returned for calibration commands.

Value Description
Unknown Unknown result.
Success Request succeeded.
Next Progress update.
NoLogfiles No log files found.
Timeout A timeout happened.
InvalidArgument Invalid argument.
FileOpenFailed File open failed.

Member Function Documentation

get_entries_async()

void mavsdk::LogFiles::get_entries_async(const GetEntriesCallback callback)

Get List of log files.

This function is non-blocking. See 'get_entries' for the blocking counterpart.

Parameters

get_entries()

std::pair<Result, std::vector<LogFiles::Entry> > mavsdk::LogFiles::get_entries() const

Get List of log files.

This function is blocking. See 'get_entries_async' for the non-blocking counterpart.

Returns

 std::pair< Result, std::vector< LogFiles::Entry > > - Result of request.

download_log_file_async()

void mavsdk::LogFiles::download_log_file_async(uint32_t id, std::string path, DownloadLogFileCallback callback)

Download log file.

Parameters

operator=()

const LogFiles& mavsdk::LogFiles::operator=(const LogFiles &)=delete

Equality operator (object is not copyable).

Parameters

Returns

 const LogFiles & -

© Dronecode 2017-2020. License: CC BY 4.0            Updated: 2021-02-08 13:41:53

results matching ""

    No results matching ""