mavsdk::Transponder Class Reference

#include: transponder.h


Allow users to get ADS-B information and set ADS-B update rates.

Data Structures

struct AdsbVehicle

Public Types

Type Description
enum AdsbEmitterType ADSB classification for the type of vehicle emitting the transponder signal.
enum Result Possible results returned for transponder requests.
std::function< void(Result)> ResultCallback Callback type for asynchronous Transponder calls.
std::function< void(AdsbVehicle)> TransponderCallback Callback type for subscribe_transponder.

Public Member Functions

Type Name Description
  Transponder (System & system) Constructor. Creates the plugin for a specific System.
  Transponder (std::shared_ptr< System > system) Constructor. Creates the plugin for a specific System.
  ~Transponder () Destructor (internal use only).
  Transponder (const Transponder & other) Copy constructor.
void subscribe_transponder (TransponderCallback callback) Subscribe to 'transponder' updates.
AdsbVehicle transponder () const Poll for 'AdsbVehicle' (blocking).
void set_rate_transponder_async (double rate_hz, const ResultCallback callback) Set rate to 'transponder' updates.
Result set_rate_transponder (double rate_hz)const Set rate to 'transponder' updates.
const Transponder & operator= (const Transponder &)=delete Equality operator (object is not copyable).

Constructor & Destructor Documentation

Transponder()

mavsdk::Transponder::Transponder(System &system)

Constructor. Creates the plugin for a specific System.

The plugin is typically created as shown below:

auto transponder = Transponder(system);

Parameters

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

Transponder()

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

Constructor. Creates the plugin for a specific System.

The plugin is typically created as shown below:

auto transponder = Transponder(system);

Parameters

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

~Transponder()

mavsdk::Transponder::~Transponder()

Destructor (internal use only).

Transponder()

mavsdk::Transponder::Transponder(const Transponder &other)

Copy constructor.

Parameters

Member Typdef Documentation

typedef ResultCallback

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

Callback type for asynchronous Transponder calls.

typedef TransponderCallback

using mavsdk::Transponder::TransponderCallback =  std::function<void(AdsbVehicle)>

Callback type for subscribe_transponder.

Member Enumeration Documentation

enum AdsbEmitterType

ADSB classification for the type of vehicle emitting the transponder signal.

Value Description
NoInfo No emitter info..
Light Light emitter..
Small Small emitter..
Large Large emitter..
HighVortexLarge High vortex emitter..
Heavy Heavy emitter..
HighlyManuv Highly maneuverable emitter..
Rotocraft Rotorcraft emitter..
Unassigned Unassigned emitter..
Glider Glider emitter..
LighterAir Lighter air emitter..
Parachute Parachute emitter..
UltraLight Ultra light emitter..
Unassigned2 Unassigned2 emitter..
Uav UAV emitter..
Space Space emitter..
Unassgined3 Unassigned3 emitter..
EmergencySurface Emergency emitter..
ServiceSurface Service surface emitter..
PointObstacle Point obstacle emitter..

enum Result

Possible results returned for transponder requests.

Value Description
Unknown Unknown result.
Success Success: the transponder command was accepted by the vehicle.
NoSystem No system connected.
ConnectionError Connection error.
Busy Vehicle is busy.
CommandDenied Command refused by vehicle.
Timeout Request timed out.

Member Function Documentation

subscribe_transponder()

void mavsdk::Transponder::subscribe_transponder(TransponderCallback callback)

Subscribe to 'transponder' updates.

Parameters

transponder()

AdsbVehicle mavsdk::Transponder::transponder() const

Poll for 'AdsbVehicle' (blocking).

Returns

AdsbVehicle - One AdsbVehicle update.

set_rate_transponder_async()

void mavsdk::Transponder::set_rate_transponder_async(double rate_hz, const ResultCallback callback)

Set rate to 'transponder' updates.

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

Parameters

set_rate_transponder()

Result mavsdk::Transponder::set_rate_transponder(double rate_hz) const

Set rate to 'transponder' updates.

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

Parameters

  • double rate_hz -

Returns

Result - Result of request.

operator=()

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

Equality operator (object is not copyable).

Parameters

Returns

 const Transponder & -

© Dronecode 2017-2020. License: CC BY 4.0            Updated: 2021-04-14 07:04:25

results matching ""

    No results matching ""