Kallisto Linux API
Library for interacting with Kallisto devices
SensorFactory Class Reference

Public Member Functions

 SensorFactory ()
 
 ~SensorFactory ()
 
error::KallistoDetailedResult registerProvider (std::unique_ptr< SensorProvider > provider)
 
error::KallistoDetailedResult unregisterProvider (std::unique_ptr< SensorProvider > provider)
 
std::vector< std::unique_ptr< SensorImpl > > build (Kallisto &kallisto, const std::map< std::string, std::vector< uint8_t >> &service_data, const std::map< uint16_t, std::vector< uint8_t > > &manufacturer_data, util::Executor &event_dispatcher, bluetooth::BluetoothDispatcher &bluetooth_dispatcher, TimeSynchronizer &sensor_synchonizer)
 

Constructor & Destructor Documentation

◆ SensorFactory()

SensorFactory ( )
inline

Constructor

◆ ~SensorFactory()

~SensorFactory ( )
inline

Destructor

Member Function Documentation

◆ build()

std::vector<std::unique_ptr<SensorImpl> > build ( Kallisto kallisto,
const std::map< std::string, std::vector< uint8_t >> &  service_data,
const std::map< uint16_t, std::vector< uint8_t > > &  manufacturer_data,
util::Executor event_dispatcher,
bluetooth::BluetoothDispatcher bluetooth_dispatcher,
TimeSynchronizer sensor_synchonizer 
)
inline

Builds a sensor list containing all sensors found within the passed device by the registered providers.

Parameters
kallistoThe device under discovery.
service_dataThe advertised service data of the device. Each key represent an UUID and each value is a byte array of the service data. Will be empty if there was no data.
manufacturer_dataThe advertised manufacturer data of the device. Will be empty if there was no data.
event_dispatcherInterface for the sensors to send events. The sensor should run the callbacks using this executor.
bluetooth_dispatcherInterface to perform BLE operations. Should be saved to allow interaction with the remote device.
sensor_synchonizerInterface to sync the sensor events timestamps.
Returns
A list of sensors available in the device

◆ registerProvider()

error::KallistoDetailedResult registerProvider ( std::unique_ptr< SensorProvider provider)
inline

Registers a new provider in the factory.

Parameters
providerThe new sensor provider.
Returns
A detailed result.
Here is the call graph for this function:

◆ unregisterProvider()

error::KallistoDetailedResult unregisterProvider ( std::unique_ptr< SensorProvider provider)
inline

Unregisters a previously registered provider.

Parameters
providerThe sensor provider to be removed.
Returns
A detailed result.
Here is the call graph for this function:

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