26#ifndef _COMMDRIVERREGISTRY_H__
27#define _COMMDRIVERREGISTRY_H__
30#include "observable_evtvar.h"
32using DriverPtr = std::unique_ptr<AbstractCommDriver>;
54 const std::vector<DriverPtr>&
GetDrivers()
const;
81 std::vector<DriverPtr> drivers;
92DriverPtr&
FindDriver(
const std::vector<DriverPtr>& drivers,
93 const std::string& iface,
94 const NavAddr::Bus _bus = NavAddr::Bus::Undef);
The global driver registry, a singleton.
EventVar evt_driver_stats
Regularly notified by drivers with a DriverStats shared_ptr.
EventVar evt_driver_msg
Notified for messages from drivers.
void Deactivate(DriverPtr &driver)
Remove driver from list of active drivers.
void Activate(DriverPtr driver)
Add driver to list of active drivers.
const std::vector< DriverPtr > & GetDrivers() const
EventVar evt_driverlist_change
Notified by all driverlist updates.
void CloseAllDrivers()
Close and destroy all drivers completely.
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.
Generic event handling between MVC Model and Controller based on a shared EventVar variable.
Communication driver layer.
DriverPtr & FindDriver(const std::vector< DriverPtr > &drivers, const std::string &iface, const NavAddr::Bus _bus=NavAddr::Bus::Undef)
Search list of drivers for a driver with given interface string.