OpenCPN Partial API docs
CommDriverRegistry Class Referencefinal

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 ()
 

Static Public Member Functions

static CommDriverRegistryGetInstance ()
 

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_msg
 Notified for messages from drivers. More...
 

Detailed Description

The global driver registry, a singleton.

Drivers register here when activated, transport layer finds them.

Also used as exchange point for messages for USB devices hotplug events.

Definition at line 40 of file comm_drv_registry.h.

Member Function Documentation

◆ GetDrivers()

const std::vector< DriverPtr > & CommDriverRegistry::GetDrivers ( )
Returns
List of all activated drivers.

Definition at line 52 of file comm_drv_registry.cpp.

Member Data Documentation

◆ evt_driver_msg

EventVar CommDriverRegistry::evt_driver_msg

Notified for messages from drivers.

The generated event contains:

  • A wxLogLevel stored as an int.
  • A string is with a prefix from originating driver class name e. g., "CommDriverN2KSerial: Something happened"

Definition at line 71 of file comm_drv_registry.h.


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