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;
52 virtual void set_port(
unsigned int port) = 0;
54 virtual std::vector<std::shared_ptr<StreamInterface>>& get_streams() = 0;
55 virtual std::vector<std::shared_ptr<GimbalInterface>>& get_gimbals() = 0;
56 virtual std::vector<std::shared_ptr<LRFInterface>>& get_lrfs() = 0;
58 virtual std::shared_ptr<StreamInterface> get_active_stream() = 0;
59 virtual std::shared_ptr<GimbalInterface> get_active_gimbal() = 0;
60 virtual std::shared_ptr<LRFInterface> get_active_lrf() = 0;
82 Payload(
const std::string& name,
const std::string& version);
95 Payload(
const std::string& name,
const std::string& version,
unsigned int port,
const std::string& uuid);
139 [[nodiscard]] const std::vector<std::shared_ptr<const StreamInterface>>&
get_streams_const() const final;
146 [[nodiscard]] const std::vector<std::shared_ptr<const GimbalInterface>>&
get_gimbals_const() const final;
153 [[nodiscard]] const std::vector<std::shared_ptr<const LRFInterface>>&
get_lrfs_const() const final;
156 std::
string m_version;
160 unsigned int m_active_stream_idx;
161 unsigned int m_active_gimbal_idx;
162 unsigned int m_active_lrf_idx;
164 std::vector<std::shared_ptr<StreamInterface>> m_streams;
165 std::vector<std::shared_ptr<GimbalInterface>> m_gimbals;
166 std::vector<std::shared_ptr<LRFInterface>> m_lrfs;
168 void set_port(
unsigned int port) final;
170 std::vector<std::shared_ptr<StreamInterface>>& get_streams() final;
171 std::vector<std::shared_ptr<GimbalInterface>>& get_gimbals() final;
172 std::vector<std::shared_ptr<LRFInterface>>& get_lrfs() final;
174 std::shared_ptr<StreamInterface> get_active_stream() final;
175 std::shared_ptr<GimbalInterface> get_active_gimbal() final;
176 std::shared_ptr<LRFInterface> get_active_lrf() final;
Component()=default
The default constructor.
The class containing all of the payload configurations.
Definition payload.h:71
const std::vector< std::shared_ptr< const StreamInterface > > & get_streams_const() const final
Get the streams.
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.
Payload(const std::string &name, const std::string &version, unsigned int port, const std::string &uuid)
Internal payload constructor.
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 register_gimbal(std::shared_ptr< GimbalInterface > gimbal) final
Registers a new gimbal as part of the payload.
void register_stream(std::shared_ptr< StreamInterface > stream) final
Registers a new stream as part of the payload.
Payload(const std::string &name, const std::string &version)
Creates a new payload.