19 class GimbalInterface;
21 class StreamInterface;
28 class PayloadInterface :
public Component {
30 friend class ComponentHandler;
32 virtual void register_stream(std::shared_ptr<StreamInterface> stream) = 0;
34 virtual void register_gimbal(std::shared_ptr<GimbalInterface> gimbal) = 0;
36 virtual void register_lrf(std::shared_ptr<LRFInterface> lrf) = 0;
38 [[nodiscard]]
virtual std::string get_version()
const = 0;
40 [[nodiscard]]
virtual unsigned int get_port()
const = 0;
42 [[nodiscard]]
virtual const std::vector<std::shared_ptr<const StreamInterface>>& get_streams_const()
const = 0;
44 [[nodiscard]]
virtual const std::vector<std::shared_ptr<const GimbalInterface>>& get_gimbals_const()
const = 0;
46 [[nodiscard]]
virtual const std::vector<std::shared_ptr<const LRFInterface>>& get_lrfs_const()
const = 0;
48 virtual void execute_action(std::string mission_name,
unsigned int waypoint_idx) = 0;
54 virtual void set_port(
unsigned int port) = 0;
56 virtual std::vector<std::shared_ptr<StreamInterface>>& get_streams() = 0;
57 virtual std::vector<std::shared_ptr<GimbalInterface>>& get_gimbals() = 0;
58 virtual std::vector<std::shared_ptr<LRFInterface>>& get_lrfs() = 0;
60 virtual std::shared_ptr<StreamInterface> get_active_stream() = 0;
61 virtual std::shared_ptr<GimbalInterface> get_active_gimbal() = 0;
62 virtual std::shared_ptr<LRFInterface> get_active_lrf() = 0;
84 Payload(
const std::string& name, std::string version);
97 Payload(
const std::string& name, std::string version,
unsigned int port,
const std::string& uuid);
141 [[nodiscard]] const std::vector<std::shared_ptr<const StreamInterface>>&
get_streams_const() const final;
148 [[nodiscard]] const std::vector<std::shared_ptr<const GimbalInterface>>&
get_gimbals_const() const final;
155 [[nodiscard]] const std::vector<std::shared_ptr<const LRFInterface>>&
get_lrfs_const() const final;
165 void execute_action(std::
string mission_name,
unsigned int waypoint_idx) override;
168 std::
string m_version;
172 unsigned int m_active_stream_idx;
173 unsigned int m_active_gimbal_idx;
174 unsigned int m_active_lrf_idx;
176 std::vector<std::shared_ptr<StreamInterface>> m_streams;
177 std::vector<std::shared_ptr<GimbalInterface>> m_gimbals;
178 std::vector<std::shared_ptr<LRFInterface>> m_lrfs;
180 void set_port(
unsigned int port) final;
182 std::vector<std::shared_ptr<StreamInterface>>& get_streams() final;
183 std::vector<std::shared_ptr<GimbalInterface>>& get_gimbals() final;
184 std::vector<std::shared_ptr<LRFInterface>>& get_lrfs() final;
186 std::shared_ptr<StreamInterface> get_active_stream() final;
187 std::shared_ptr<GimbalInterface> get_active_gimbal() final;
188 std::shared_ptr<LRFInterface> get_active_lrf() final;
The base camera class.
Definition camera.h:188
Holds the common info for all SDK components.
Definition component.h:18
Component()=default
The default constructor.
The base infrared/thermal camera class.
Definition camera.h:661
const std::vector< std::shared_ptr< const StreamInterface > > & get_streams_const() const final
Get the streams.
Payload(const std::string &name, std::string version)
Creates a new 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.
const std::vector< std::shared_ptr< const LRFInterface > > & get_lrfs_const() const final
Get the LRFInterfaces.
const std::vector< std::shared_ptr< const GimbalInterface > > & get_gimbals_const() const final
Get the gimbals.
unsigned int get_port() const final
Returns the port of the payload service.
void execute_action(std::string mission_name, unsigned int waypoint_idx) override
Execute actions at waypoints.
void register_gimbal(std::shared_ptr< GimbalInterface > gimbal) final
Registers a new gimbal as part of the payload.
Payload(const std::string &name, 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.