Kallisto Linux API
Library for interacting with Kallisto devices
sensor_manager.hpp
Go to the documentation of this file.
1 
42 #ifndef SENSOR_MANAGER_HPP
43 #define SENSOR_MANAGER_HPP
44 
45 #include <string>
46 #include <vector>
47 
48 #include "../../util/error/kallisto_error.hpp"
49 #include "../../hardware/hal/sensors/sensor.hpp"
50 #include "../../hardware/hal/sensors/sensor_event_listener.hpp"
51 
52 namespace kallisto {
53 namespace core {
54 
55 //Forward declarations
56 class KallistoCore;
57 class KallistoCoreImpl;
58 
59 class SensorManager {
60  friend class KallistoCore; //Only KallistoCore can create managers
61 
62 private:
63  KallistoCoreImpl& m_core;
64 
69 
73  ~SensorManager();
74 
78  SensorManager(SensorManager const&) = delete;
79  SensorManager(SensorManager&&) = delete;
80  void operator=(SensorManager const&) = delete;
81  void operator=(SensorManager &&) = delete;
82 
83 public:
84 
91  std::vector<hardware::Sensor*> getSensors();
92 
102  std::vector<hardware::Sensor*> getSensors(hardware::Sensor::SensorType type);
103 
112  std::vector<hardware::Sensor*> getSensors(std::string address);
113 
126 
138  hardware::Sensor* getSensor(hardware::Sensor::SensorType type, std::string address);
139 
160  error::KallistoDetailedResult registerListener(hardware::SensorEventListener& listener, hardware::Sensor& sensor, const std::chrono::microseconds delay);
161 
179 
193 
204 
205 };
206 
207 } /* namepsace core */
208 } /* namepsace kallisto */
209 #endif // SENSOR_MANAGER_HPP
Definition: sensor.hpp:53
error::KallistoDetailedResult registerListener(hardware::SensorEventListener &listener, hardware::Sensor &sensor, const std::chrono::microseconds delay)
Definition: bluetooth_adapter.hpp:52
std::vector< hardware::Sensor * > getSensors()
hardware::Sensor * getSensor(hardware::Sensor::SensorType type)
Class that encapsulates a result.
Definition: kallisto_error.hpp:81
error::KallistoDetailedResult unregisterListener(hardware::SensorEventListener &listener, hardware::Sensor &sensor)
SensorType
Definition: sensor.hpp:60
Definition: kallisto_core.hpp:57
Definition: sensor_manager.hpp:58
Definition: sensor_event_listener.hpp:123
Definition: kallisto_core_impl.hpp:69