mavsdk::ComponentInformation Class Reference

#include: component_information.h


Access component information such as parameters.

Data Structures

struct FloatParam

struct FloatParamUpdate

Public Types

Type Description
enum Result Possible results returned for param requests.
std::function< void(Result)> ResultCallback Callback type for asynchronous ComponentInformation calls.
std::function< void(FloatParamUpdate)> FloatParamCallback Callback type for subscribe_float_param.

Public Member Functions

Type Name Description
  ComponentInformation (System & system) Constructor. Creates the plugin for a specific System.
  ComponentInformation (std::shared_ptr< System > system) Constructor. Creates the plugin for a specific System.
  ~ComponentInformation () Destructor (internal use only).
  ComponentInformation (const ComponentInformation & other) Copy constructor.
std::pair< Result, std::vector< ComponentInformation::FloatParam > > access_float_params () const List available float params.
void subscribe_float_param (FloatParamCallback callback) Subscribe to float param changes/updates.
const ComponentInformation & operator= (const ComponentInformation &)=delete Equality operator (object is not copyable).

Constructor & Destructor Documentation

ComponentInformation()

mavsdk::ComponentInformation::ComponentInformation(System &system)

Constructor. Creates the plugin for a specific System.

The plugin is typically created as shown below:

auto component_information = ComponentInformation(system);

Parameters

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

ComponentInformation()

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

Constructor. Creates the plugin for a specific System.

The plugin is typically created as shown below:

auto component_information = ComponentInformation(system);

Parameters

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

~ComponentInformation()

mavsdk::ComponentInformation::~ComponentInformation()

Destructor (internal use only).

ComponentInformation()

mavsdk::ComponentInformation::ComponentInformation(const ComponentInformation &other)

Copy constructor.

Parameters

Member Typdef Documentation

typedef ResultCallback

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

Callback type for asynchronous ComponentInformation calls.

typedef FloatParamCallback

using mavsdk::ComponentInformation::FloatParamCallback =  std::function<void(FloatParamUpdate)>

Callback type for subscribe_float_param.

Member Enumeration Documentation

enum Result

Possible results returned for param requests.

Value Description
Unknown Unknown result.
Success Request succeeded.
NoSystem No system is connected.

Member Function Documentation

access_float_params()

std::pair<Result, std::vector<ComponentInformation::FloatParam> > mavsdk::ComponentInformation::access_float_params() const

List available float params.

This function is blocking.

Returns

 std::pair< Result, std::vector< ComponentInformation::FloatParam > > - Result of request.

subscribe_float_param()

void mavsdk::ComponentInformation::subscribe_float_param(FloatParamCallback callback)

Subscribe to float param changes/updates.

Parameters

operator=()

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

Equality operator (object is not copyable).

Parameters

Returns

 const ComponentInformation & -

© Dronecode 2017-2020. License: CC BY 4.0            Updated: 2022-05-26 20:06:59

results matching ""

    No results matching ""