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 AdsbAltitudeType Altitude type used in AdsbVehicle message.
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.
Handle< AdsbVehicle > TransponderHandle Handle 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 () override Destructor (internal use only).
  Transponder (const Transponder & other) Copy constructor.
TransponderHandle subscribe_transponder (const TransponderCallback & callback) Subscribe to 'transponder' updates.
void unsubscribe_transponder (TransponderHandle handle) Unsubscribe from subscribe_transponder.
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() override

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.

typedef TransponderHandle

using mavsdk::Transponder::TransponderHandle =  Handle<AdsbVehicle>

Handle 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 AdsbAltitudeType

Altitude type used in AdsbVehicle message.

Value Description
PressureQnh Altitude reported from a Baro source using QNH reference.
Geometric Altitude reported from a GNSS source.

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()

TransponderHandle mavsdk::Transponder::subscribe_transponder(const TransponderCallback &callback)

Subscribe to 'transponder' updates.

Parameters

Returns

TransponderHandle -

unsubscribe_transponder()

void mavsdk::Transponder::unsubscribe_transponder(TransponderHandle handle)

Unsubscribe from subscribe_transponder.

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 & -

© MAVSDK Development Team 2017-2023. License: CC BY 4.0            Updated: 2023-12-27 03:58:12

results matching ""

    No results matching ""