Flyby SDK v0.3.0
Loading...
Searching...
No Matches
flyby::Payload Class Reference

The class containing all of the payload configurations. More...

#include <payload.h>

Inheritance diagram for flyby::Payload:
Collaboration diagram for flyby::Payload:

Public Member Functions

 Payload (const std::string &name, const std::string &version)
 Creates a new payload.
 
 Payload (const std::string &name, const std::string &version, unsigned int port, const std::string &uuid)
 Internal payload constructor.
 
void register_stream (std::shared_ptr< StreamInterface > stream) final
 Registers a new stream as part of the payload.
 
void register_gimbal (std::shared_ptr< GimbalInterface > gimbal) final
 Registers a new gimbal as part of the payload.
 
void register_lrf (std::shared_ptr< LRFInterface > lrf) final
 Registers a new laser range finder as part of the payload.
 
std::string get_version () const final
 Returns the version of the payload service.
 
unsigned int get_port () const final
 Returns the port of the payload service.
 
const std::vector< std::shared_ptr< const StreamInterface > > & get_streams_const () const final
 Get the streams.
 
const std::vector< std::shared_ptr< const GimbalInterface > > & get_gimbals_const () const final
 Get the gimbals.
 
const std::vector< std::shared_ptr< const LRFInterface > > & get_lrfs_const () const final
 Get the LRFInterfaces.
 

Detailed Description

The class containing all of the payload configurations.

This class automatically handles registration of payload components and is fully handled by the Drone class. This class should be extended by creating and registering all of the payload components in the constructor.

Constructor & Destructor Documentation

◆ Payload() [1/2]

flyby::Payload::Payload ( const std::string & name,
const std::string & version )

Creates a new payload.

The constructor is responsible for registering all of the payload components, and should be overridden.

Parameters
name- The name of the payload
version- The version of the payload service

◆ Payload() [2/2]

flyby::Payload::Payload ( const std::string & name,
const std::string & version,
unsigned int port,
const std::string & uuid )

Internal payload constructor.

Note that this constructor should not be used, since the port will be overwritten. This is only used internally.

Parameters
name- The name of the payload
version- The version of the payload service
port- The port to communicate over
uuid- The UUID of the payload

Member Function Documentation

◆ get_gimbals_const()

const std::vector< std::shared_ptr< const GimbalInterface > > & flyby::Payload::get_gimbals_const ( ) const
nodiscardfinal

Get the gimbals.

Returns
A vector of const gimbal pointers

◆ get_lrfs_const()

const std::vector< std::shared_ptr< const LRFInterface > > & flyby::Payload::get_lrfs_const ( ) const
nodiscardfinal

Get the LRFInterfaces.

Returns
A vector of const LRFInterface pointers

◆ get_port()

unsigned int flyby::Payload::get_port ( ) const
nodiscardfinal

Returns the port of the payload service.

Returns
An int containing the port

◆ get_streams_const()

const std::vector< std::shared_ptr< const StreamInterface > > & flyby::Payload::get_streams_const ( ) const
nodiscardfinal

Get the streams.

Returns
A vector of const stream pointers

◆ get_version()

std::string flyby::Payload::get_version ( ) const
nodiscardfinal

Returns the version of the payload service.

Returns
A string containing the version

◆ register_gimbal()

void flyby::Payload::register_gimbal ( std::shared_ptr< GimbalInterface > gimbal)
final

Registers a new gimbal as part of the payload.

Parameters
gimbal- The gimbal to register

◆ register_lrf()

void flyby::Payload::register_lrf ( std::shared_ptr< LRFInterface > lrf)
final

Registers a new laser range finder as part of the payload.

Parameters
lrf- The LRFInterface to register

◆ register_stream()

void flyby::Payload::register_stream ( std::shared_ptr< StreamInterface > stream)
final

Registers a new stream as part of the payload.

Parameters
stream- The stream to register

The documentation for this class was generated from the following file: