OpenCPN Partial API docs
Loading...
Searching...
No Matches
NavMsgBus Class Reference

The raw message layer, a singleton. More...

#include <comm_navmsg_bus.h>

Inheritance diagram for NavMsgBus:
DriverListener

Public Member Functions

NavMsgBusoperator= (NavMsgBus &)=delete
 
 NavMsgBus (const NavMsgBus &)=delete
 
void SendMessage (std::shared_ptr< const NavMsg > message, std::shared_ptr< const NavAddr > address)
 Send a message to given destination using suitable driver.
 
void Notify (std::shared_ptr< const NavMsg > message)
 Accept message received by driver, make it available for upper layers.
 
void Notify (const AbstractCommDriver &driver)
 Handle changes in driver list.
 
const std::set< std::string > & GetActiveMessages ()
 Return list of message types sent or received.
 

Static Public Member Functions

static NavMsgBusGetInstance ()
 

Public Attributes

EventVar new_msg_event
 Notified without data when new message type(s) are detected.
 

Detailed Description

The raw message layer, a singleton.

Definition at line 40 of file comm_navmsg_bus.h.

Member Function Documentation

◆ GetActiveMessages()

const std::set< std::string > & NavMsgBus::GetActiveMessages ( )
inline

Return list of message types sent or received.

Definition at line 59 of file comm_navmsg_bus.h.

◆ GetInstance()

NavMsgBus & NavMsgBus::GetInstance ( )
static

Definition at line 39 of file comm_navmsg_bus.cpp.

◆ Notify() [1/2]

void NavMsgBus::Notify ( const AbstractCommDriver driver)
virtual

Handle changes in driver list.

Implements DriverListener.

Definition at line 45 of file comm_navmsg_bus.cpp.

◆ Notify() [2/2]

void NavMsgBus::Notify ( std::shared_ptr< const NavMsg message)
virtual

Accept message received by driver, make it available for upper layers.

Implements DriverListener.

Definition at line 28 of file comm_navmsg_bus.cpp.

Member Data Documentation

◆ new_msg_event

EventVar NavMsgBus::new_msg_event

Notified without data when new message type(s) are detected.

Definition at line 62 of file comm_navmsg_bus.h.


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