OpenCPN Partial API docs
|
The global driver registry, a singleton. More...
#include <comm_drv_registry.h>
Public Member Functions | |
void | Activate (DriverPtr driver) |
Add driver to list of active drivers. | |
void | Deactivate (DriverPtr &driver) |
Remove driver from list of active drivers. | |
void | CloseAllDrivers () |
Close and destroy all drivers completely. | |
const std::vector< DriverPtr > & | GetDrivers () const |
Static Public Member Functions | |
static CommDriverRegistry & | GetInstance () |
Public Attributes | |
EventVar | evt_driverlist_change |
Notified by all driverlist updates. | |
EventVar | evt_dump_stats |
Notified when receiving –remote –dump_stat on local API. | |
EventVar | evt_comm_overrun |
Notified with a printable message on first detected overrun. | |
EventVar | evt_driver_stats |
Regularly notified by drivers with a DriverStats shared_ptr. | |
EventVar | evt_driver_msg |
Notified for messages from drivers. | |
The global driver registry, a singleton.
Drivers are registered here when activated, transport layer finds them.
Also used as exchange point for some driver related events>.
This interface is not synchronized and must only be used from main thread. The exception is the various EventVar which can be notified from driver threads. As usual, listening to these events must be done in main thread.
Definition at line 45 of file comm_drv_registry.h.
void CommDriverRegistry::Activate | ( | DriverPtr | driver | ) |
Add driver to list of active drivers.
Definition at line 32 of file comm_drv_registry.cpp.
void CommDriverRegistry::CloseAllDrivers | ( | ) |
Close and destroy all drivers completely.
Definition at line 53 of file comm_drv_registry.cpp.
void CommDriverRegistry::Deactivate | ( | DriverPtr & | driver | ) |
Remove driver from list of active drivers.
Definition at line 42 of file comm_drv_registry.cpp.
const std::vector< DriverPtr > & CommDriverRegistry::GetDrivers | ( | ) | const |
Definition at line 49 of file comm_drv_registry.cpp.
|
static |
Definition at line 59 of file comm_drv_registry.cpp.
EventVar CommDriverRegistry::evt_comm_overrun |
Notified with a printable message on first detected overrun.
Definition at line 68 of file comm_drv_registry.h.
EventVar CommDriverRegistry::evt_driver_msg |
Notified for messages from drivers.
The generated event contains:
Definition at line 79 of file comm_drv_registry.h.
EventVar CommDriverRegistry::evt_driver_stats |
Regularly notified by drivers with a DriverStats shared_ptr.
Definition at line 71 of file comm_drv_registry.h.
EventVar CommDriverRegistry::evt_driverlist_change |
Notified by all driverlist updates.
Definition at line 62 of file comm_drv_registry.h.
EventVar CommDriverRegistry::evt_dump_stats |
Notified when receiving –remote –dump_stat on local API.
Definition at line 65 of file comm_drv_registry.h.