42 #ifndef KALLISTO_SENSOR_HPP 43 #define KALLISTO_SENSOR_HPP 48 #include "../../../../bluetooth/device/bluetooth_dispatcher.hpp" 49 #include "../sensor.hpp" 50 #include "../sensor_impl.hpp" 59 class KallistoSensor :
public SensorImpl,
public bluetooth::BluetoothDispatcher::NotificationListener {
68 std::chrono::microseconds
m_delay = std::chrono::microseconds(0);
75 KallistoSensor(std::string name, std::string address, std::string vendor,
unsigned int version,
SensorType type, std::string string_type,
76 ReportingMode reporting_mode,
unsigned int identifier,
float max_range,
float resolution,
float power, std::chrono::microseconds min_delay,
77 std::chrono::microseconds max_delay, util::Executor& event_dispatcher, bluetooth::BluetoothDispatcher& bluetooth_dispatcher, TimeSynchronizer* sensor_synchronizer,
78 std::string service_uuid, std::string configuration_char_uuid, std::string data_char_uuid);
89 error::KallistoDetailedResult
start(std::map<std::string, const void*> parameters, InternalSensorEventListener internal_listener);
99 error::KallistoDetailedResult
update(std::map<std::string, const void*> parameters);
113 error::KallistoDetailedResult
stop(
bool link_loss);
123 void onNotification(std::string address, std::string service_uuid, std::string characteristic_uuid,
const std::vector<unsigned char>& values);
134 virtual std::vector<unsigned char>
parseConfiguration(
bool enable, std::chrono::microseconds delay) = 0;
142 virtual std::vector<SensorEvent>
parseData(
const std::vector<unsigned char>& data) = 0;
165 #endif // KALLISTO_MOTION_SENSOR_HPP error::KallistoDetailedResult start(std::map< std::string, const void *> parameters, InternalSensorEventListener internal_listener)
Definition: bluetooth_adapter.hpp:52
std::string m_configuration_char_uuid
Definition: kallisto_sensor.hpp:63
std::string m_data_char_uuid
Definition: kallisto_sensor.hpp:65
virtual std::vector< unsigned char > parseConfiguration(bool enable, std::chrono::microseconds delay)=0
SensorType
Definition: sensor.hpp:60
std::chrono::microseconds m_delay
Definition: kallisto_sensor.hpp:67
void onNotification(std::string address, std::string service_uuid, std::string characteristic_uuid, const std::vector< unsigned char > &values)
error::KallistoDetailedResult stop(bool link_loss)
std::map< std::string, const void * > getParameters()
virtual std::vector< SensorEvent > parseData(const std::vector< unsigned char > &data)=0
KallistoSensor(std::string name, std::string address, std::string vendor, unsigned int version, SensorType type, std::string string_type, ReportingMode reporting_mode, unsigned int identifier, float max_range, float resolution, float power, std::chrono::microseconds min_delay, std::chrono::microseconds max_delay, util::Executor &event_dispatcher, bluetooth::BluetoothDispatcher &bluetooth_dispatcher, TimeSynchronizer *sensor_synchronizer, std::string service_uuid, std::string configuration_char_uuid, std::string data_char_uuid)
void operator=(KallistoSensor const &)=delete
InternalSensorEventListener m_listener
Definition: kallisto_sensor.hpp:69
std::function< void(SensorEvent &event)> InternalSensorEventListener
Definition: sensor_impl.hpp:65
std::string m_service_uuid
Definition: kallisto_sensor.hpp:61
error::KallistoDetailedResult update(std::map< std::string, const void *> parameters)
virtual ~KallistoSensor()
ReportingMode
Definition: sensor.hpp:126