BeeeOn Gateway  v2020.3.1-2-g6f737dc
Platform to interconnect the IoT world
Public Member Functions | Protected Member Functions
BeeeOn::HciInfoReporter Class Reference

HciInfoReporter periodically collects and reports statistics information about HCI interfaces in the system. Reporting is done via the HciListener interface. More...

#include <HciInfoReporter.h>

Inheritance diagram for BeeeOn::HciInfoReporter:
BeeeOn::StoppableLoop BeeeOn::HotplugListener BeeeOn::Loggable

Public Member Functions

void setStatisticsInterval (const Poco::Timespan &interval)
 
void setHciManager (HciInterfaceManager::Ptr manager)
 
void setEventsExecutor (AsyncExecutor::Ptr executor)
 
void registerListener (HciListener::Ptr listener)
 
void onAdd (const HotplugEvent &event) override
 Check the given event whether it is a bluetooth controller. Every matching controller is added to the list and statistics for it are reported periodically. More...
 
void onRemove (const HotplugEvent &event) override
 Check the given event whether it is a bluetooth controller. The method allows to unplug a device and stop reporting for it. More...
 
void start () override
 Start the periodic reporting loop.
 
void stop () override
 Stop the periodic reporting loop.
 
- Public Member Functions inherited from BeeeOn::HotplugListener
virtual void onChange (const HotplugEvent &event)
 
virtual void onMove (const HotplugEvent &event)
 

Protected Member Functions

std::set< std::string > dongles () const
 

Additional Inherited Members

- Public Types inherited from BeeeOn::StoppableLoop
typedef Poco::SharedPtr
< StoppableLoop
Ptr
 
- Public Types inherited from BeeeOn::HotplugListener
typedef Poco::SharedPtr
< HotplugListener
Ptr
 

Detailed Description

HciInfoReporter periodically collects and reports statistics information about HCI interfaces in the system. Reporting is done via the HciListener interface.

The HciInfoReporter depends on the hotplug system. It can serve any bluetooth controller notified via the onAdd() event. Information about multiple compatible HCI devices can be collected this way.

Compatible HCI devices is recognized by method HciUtil::hotplugMatch().

Member Function Documentation

void HciInfoReporter::onAdd ( const HotplugEvent event)
overridevirtual

Check the given event whether it is a bluetooth controller. Every matching controller is added to the list and statistics for it are reported periodically.

See Also
HciUtil::hotplugMatch()

Reimplemented from BeeeOn::HotplugListener.

void HciInfoReporter::onRemove ( const HotplugEvent event)
overridevirtual

Check the given event whether it is a bluetooth controller. The method allows to unplug a device and stop reporting for it.

See Also
HciUtil::hotplugMatch()

Reimplemented from BeeeOn::HotplugListener.

void HciInfoReporter::registerListener ( HciListener::Ptr  listener)

Register listener of bluetooth events.

void HciInfoReporter::setEventsExecutor ( AsyncExecutor::Ptr  executor)

Set executor for delivering events.

void HciInfoReporter::setHciManager ( HciInterfaceManager::Ptr  manager)

Set HciInterfaceManager implementation.

void HciInfoReporter::setStatisticsInterval ( const Poco::Timespan &  interval)

Set interval of periodic bluetooth statistics generation.


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