Kallisto Linux API
Library for interacting with Kallisto devices
KallistoSensorProvider Class Reference
Inheritance diagram for KallistoSensorProvider:
Collaboration diagram for KallistoSensorProvider:

Public Member Functions

virtual ~KallistoSensorProvider ()
 
std::vector< std::unique_ptr< SensorImpl > > provide (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)
 
- Public Member Functions inherited from SensorProvider
 SensorProvider ()
 
virtual ~SensorProvider ()
 

Constructor & Destructor Documentation

◆ ~KallistoSensorProvider()

virtual ~KallistoSensorProvider ( )
inlinevirtual

Destructor

Here is the call graph for this function:

Member Function Documentation

◆ provide()

std::vector<std::unique_ptr<SensorImpl> > provide ( 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 
)
virtual

Should provide a list of sensors, if they are present in the device.

The parameter manufacturer_data should be used to check if a device contains a given sensor so a custom device should advertise which sensors are available.

If BluetoothScannerConfiguration#getLegacyDiscovery() is disabled, all BLE operations requested to the BluetoothDispatcher will fail and the calls BluetoothDispatcher#getServices() and BluetoothDispatcher#getCharacteristics(UUID) will report empty data.

If BluetoothScannerConfiguration#getLegacyDiscovery() is enabled, BLE operations can used to identify the available sensors by using their UUID, for example.

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. Each key represents an company ID and each value is a byte array of the service 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

Implements SensorProvider.


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