dronecode_sdk::System Class Reference

#include: system.h


This class represents a system, made up of one or more components (e.g. autopilot, cameras, servos, gimbals, etc).

System objects are used to interact with UAVs (including their components) and standalone cameras. They are not created directly by application code, but are returned by the DronecodeSDK class.

Public Member Functions

Type Name Description
  ~System () Destructor.
  System (const System &)=delete Copy constructor (object is not copyable).
bool has_autopilot () const Checks whether the system has an autopilot.
bool is_standalone () const Checks whether the system is a standalone (non-autopilot).
bool has_camera (int camera_id=-1)const Checks whether the system has a camera with the given camera ID.
bool has_gimbal () const Checks whether the system has a gimbal.
bool is_connected () const Checks if the system is connected.
uint64_t get_uuid () const Get the UUID of the system.
void register_component_discovered_callback (discover_callback_t callback)const Register a callback to be called when a component is discovered.
const System & operator= (const System &)=delete Equality operator (object is not copyable).

Constructor & Destructor Documentation

~System()

dronecode_sdk::System::~System()

Destructor.

System()

dronecode_sdk::System::System(const System &)=delete

Copy constructor (object is not copyable).

Parameters

Member Function Documentation

has_autopilot()

bool dronecode_sdk::System::has_autopilot() const

Checks whether the system has an autopilot.

Returns

 bool - true if it has an autopilot, false otherwise.

is_standalone()

bool dronecode_sdk::System::is_standalone() const

Checks whether the system is a standalone (non-autopilot).

Returns

 bool - true if stand alone, false otherwise.

has_camera()

bool dronecode_sdk::System::has_camera(int camera_id=-1) const

Checks whether the system has a camera with the given camera ID.

A System may have several cameras, with IDs starting from 0. When called without passing a camera ID, it checks whether the system has any camera.

Parameters

  • int camera_id - ID of the camera starting from 0 onwards.

Returns

 bool - true if camera with the given camera ID is found, false otherwise.

has_gimbal()

bool dronecode_sdk::System::has_gimbal() const

Checks whether the system has a gimbal.

Returns

 bool - true if the system has a gimbal, false otherwise.

is_connected()

bool dronecode_sdk::System::is_connected() const

Checks if the system is connected.

A system is connected when heartbeats are arriving (discovered and not timed out).

Returns

 bool - true if the system is connected.

get_uuid()

uint64_t dronecode_sdk::System::get_uuid() const

Get the UUID of the system.

Returns

 uint64_t - UUID of system.

register_component_discovered_callback()

void dronecode_sdk::System::register_component_discovered_callback(discover_callback_t callback) const

Register a callback to be called when a component is discovered.

Parameters

  • discover_callback_t callback - a function of type void(ComponentType) which will be called with the component type of the new component.

operator=()

const System& dronecode_sdk::System::operator=(const System &)=delete

Equality operator (object is not copyable).

Parameters

Returns

 const System & -

© Dronecode 2017. License: CC BY 4.0            Updated: 2018-11-07 01:25:57

results matching ""

    No results matching ""