mavsdk::Info Class Reference

#include: info.h


Provide information about the hardware and/or software of a system.

Data Structures

struct FlightInfo

struct Identification

struct Product

struct Version

Public Types

Type Description
enum Result Possible results returned for info requests.
std::function< void(Result)> ResultCallback Callback type for asynchronous Info calls.

Public Member Functions

Type Name Description
  Info (System & system) Constructor. Creates the plugin for a specific System.
  Info (std::shared_ptr< System > system) Constructor. Creates the plugin for a specific System.
  ~Info () Destructor (internal use only).
  Info (const Info & other) Copy constructor.
std::pair< Result, Info::FlightInfo > get_flight_information () const Get flight information of the system.
std::pair< Result, Info::Identification > get_identification () const Get the identification of the system.
std::pair< Result, Info::Product > get_product () const Get product information of the system.
std::pair< Result, Info::Version > get_version () const Get the version information of the system.
std::pair< Result, double > get_speed_factor () const Get the speed factor of a simulation (with lockstep a simulation can run faster or slower than realtime).
const Info & operator= (const Info &)=delete Equality operator (object is not copyable).

Constructor & Destructor Documentation

Info()

mavsdk::Info::Info(System &system)

Constructor. Creates the plugin for a specific System.

The plugin is typically created as shown below:

auto info = Info(system);

Parameters

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

Info()

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

Constructor. Creates the plugin for a specific System.

The plugin is typically created as shown below:

auto info = Info(system);

Parameters

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

~Info()

mavsdk::Info::~Info()

Destructor (internal use only).

Info()

mavsdk::Info::Info(const Info &other)

Copy constructor.

Parameters

  • const Info& other -

Member Typdef Documentation

typedef ResultCallback

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

Callback type for asynchronous Info calls.

Member Enumeration Documentation

enum Result

Possible results returned for info requests.

Value Description
Unknown Unknown result.
Success Request succeeded.
InformationNotReceivedYet Information has not been received yet.

Member Function Documentation

get_flight_information()

std::pair<Result, Info::FlightInfo> mavsdk::Info::get_flight_information() const

Get flight information of the system.

This function is blocking.

Returns

 std::pair< Result, Info::FlightInfo > - Result of request.

get_identification()

std::pair<Result, Info::Identification> mavsdk::Info::get_identification() const

Get the identification of the system.

This function is blocking.

Returns

 std::pair< Result, Info::Identification > - Result of request.

get_product()

std::pair<Result, Info::Product> mavsdk::Info::get_product() const

Get product information of the system.

This function is blocking.

Returns

 std::pair< Result, Info::Product > - Result of request.

get_version()

std::pair<Result, Info::Version> mavsdk::Info::get_version() const

Get the version information of the system.

This function is blocking.

Returns

 std::pair< Result, Info::Version > - Result of request.

get_speed_factor()

std::pair<Result, double> mavsdk::Info::get_speed_factor() const

Get the speed factor of a simulation (with lockstep a simulation can run faster or slower than realtime).

This function is blocking.

Returns

 std::pair< Result, double > - Result of request.

operator=()

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

Equality operator (object is not copyable).

Parameters

Returns

 const Info & -

© Dronecode 2017-2020. License: CC BY 4.0            Updated: 2020-11-24 09:25:30

results matching ""

    No results matching ""