mavsdk::ComponentInformationServer Class Reference

#include: component_information_server.h


Provide 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 ComponentInformationServer calls.
std::function< void(FloatParamUpdate)> FloatParamCallback Callback type for subscribe_float_param.

Public Member Functions

Type Name Description
  ComponentInformationServer (System & system) Constructor. Creates the plugin for a specific System.
  ComponentInformationServer (std::shared_ptr< System > system) Constructor. Creates the plugin for a specific System.
  ~ComponentInformationServer () Destructor (internal use only).
  ComponentInformationServer (const ComponentInformationServer & other) Copy constructor.
Result provide_float_param (FloatParam param)const Provide a param of type float.
void subscribe_float_param (FloatParamCallback callback) Subscribe to float param updates.
const ComponentInformationServer & operator= (const ComponentInformationServer &)=delete Equality operator (object is not copyable).

Constructor & Destructor Documentation

ComponentInformationServer()

mavsdk::ComponentInformationServer::ComponentInformationServer(System &system)

Constructor. Creates the plugin for a specific System.

The plugin is typically created as shown below:

auto component_information_server = ComponentInformationServer(system);

Parameters

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

ComponentInformationServer()

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

Constructor. Creates the plugin for a specific System.

The plugin is typically created as shown below:

auto component_information_server = ComponentInformationServer(system);

Parameters

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

~ComponentInformationServer()

mavsdk::ComponentInformationServer::~ComponentInformationServer()

Destructor (internal use only).

ComponentInformationServer()

mavsdk::ComponentInformationServer::ComponentInformationServer(const ComponentInformationServer &other)

Copy constructor.

Parameters

Member Typdef Documentation

typedef ResultCallback

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

Callback type for asynchronous ComponentInformationServer calls.

typedef FloatParamCallback

using mavsdk::ComponentInformationServer::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.
DuplicateParam Duplicate param.
InvalidParamStartValue Invalid start param value.
InvalidParamDefaultValue Invalid default param value.
InvalidParamName Invalid param name.
NoSystem No system is connected.

Member Function Documentation

provide_float_param()

Result mavsdk::ComponentInformationServer::provide_float_param(FloatParam param) const

Provide a param of type float.

This function is blocking.

Parameters

Returns

Result - Result of request.

subscribe_float_param()

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

Subscribe to float param updates.

Parameters

operator=()

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

Equality operator (object is not copyable).

Parameters

Returns

 const ComponentInformationServer & -

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

results matching ""

    No results matching ""