OpenCPN Partial API docs
Loading...
Searching...
No Matches
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 () const
 

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_stats
 Regularly notified by drivers with a DriverStats shared_ptr.
 
EventVar evt_driver_msg
 Notified for messages from drivers.
 

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

◆ Activate()

void CommDriverRegistry::Activate ( DriverPtr  driver)

Add driver to list of active drivers.

Definition at line 32 of file comm_drv_registry.cpp.

◆ CloseAllDrivers()

void CommDriverRegistry::CloseAllDrivers ( )

Close and destroy all drivers completely.

Definition at line 53 of file comm_drv_registry.cpp.

◆ Deactivate()

void CommDriverRegistry::Deactivate ( DriverPtr &  driver)

Remove driver from list of active drivers.

Definition at line 42 of file comm_drv_registry.cpp.

◆ GetDrivers()

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

Definition at line 49 of file comm_drv_registry.cpp.

◆ GetInstance()

CommDriverRegistry & CommDriverRegistry::GetInstance ( )
static

Definition at line 59 of file comm_drv_registry.cpp.

Member Data Documentation

◆ evt_comm_overrun

EventVar CommDriverRegistry::evt_comm_overrun

Notified with a printable message on first detected overrun.

Definition at line 63 of file comm_drv_registry.h.

◆ 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 74 of file comm_drv_registry.h.

◆ evt_driver_stats

EventVar CommDriverRegistry::evt_driver_stats

Regularly notified by drivers with a DriverStats shared_ptr.

Definition at line 66 of file comm_drv_registry.h.

◆ evt_driverlist_change

EventVar CommDriverRegistry::evt_driverlist_change

Notified by all driverlist updates.

Definition at line 57 of file comm_drv_registry.h.

◆ evt_dump_stats

EventVar CommDriverRegistry::evt_dump_stats

Notified when receiving –remote –dump_stat on local API.

Definition at line 60 of file comm_drv_registry.h.


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