44 static NavMsgBus& GetInstance();
46 NavMsgBus& operator=(NavMsgBus&) =
delete;
47 NavMsgBus(
const NavMsgBus&) =
delete;
51 std::shared_ptr<const NavAddr> address);
60 void Notify(std::shared_ptr<const NavMsg> message);
73 NavMsgBus() =
default;
75 std::set<std::string> m_active_messages;
Common interface for all drivers.
Interface for handling incoming messages.
void SendMessage(std::shared_ptr< const NavMsg > message, std::shared_ptr< const NavAddr > address)
Send a message to given destination using suitable driver.
const std::set< std::string > & GetActiveMessages()
Return list of message types sent or received.
obs::EventVar new_msg_event
Notified without data when new message type(s) are detected.
bool RegisterKey(const std::string &key)
Register a message type in list the GetActiveMessages() list.
void Notify(std::shared_ptr< const NavMsg > message)
Accept message received by driver, make it available for upper layers.
Generic event handling between for example MVC Model and Controller based on a shared EventVar variab...
Communication driver layer.
A common variable shared between producer and consumer which supports Listen() and Notify().