3#include "TinyRobotics/utils/LoggerClass.h"
4#include "TinyRobotics/vehicles/Vehicle.h"
6namespace tinyrobotics {
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
40 for (
auto& stream : p_handlers) {
41 stream->onMessage(msg);
48 for (
auto& stream : p_handlers) {
49 stream->onMessage(msg);
56 for (
auto& stream : p_handlers) {
57 stream->onMessage(msg);
A generic 3D coordinate class for robotics, navigation, and spatial calculations.
Definition: Coordinate.h:57
Represents a geodetic GPS coordinate with latitude, longitude, and optional altitude.
Definition: GPSCoordinate.h:52
A message handler that forwards messages to multiple registered handlers.
Definition: MessageBus.h:29
std::vector< MessageHandler * > p_handlers
Get the number of registered handlers.
Definition: MessageBus.h:70
bool onMessage(const Message< Coordinate< float > > &msg) override
Forward incoming messages to all registered handlers.
Definition: MessageBus.h:47
bool onMessage(const Message< GPSCoordinate > &msg) override
Forward incoming messages to all registered handlers.
Definition: MessageBus.h:55
MessageBus()=default
Default constructor.
bool onMessage(const Message< float > &msg) override
Forward incoming messages to all registered handlers.
Definition: MessageBus.h:39
void clear()
Removes all registere handlers from the bus.
Definition: MessageBus.h:63
void add(MessageHandler &stream)
Definition: MessageBus.h:36
Interface for handling messages in the TinyRobotics framework.
Definition: MessageHandler.h:18
Generic message structure for communication, parameterized by value type.
Definition: Message.h:72