1 #ifndef __blip_SensorManager_hpp 2 #define __blip_SensorManager_hpp 12 struct ASensorEventQueue;
13 struct ASensorManager;
94 static const int EVENT_BUF_SIZE;
96 ASensorManager* _sensorMgr;
97 std::vector<Sensor*> _sensors;
98 ASensorEventQueue* _queue;
99 ASensorEvent* _eventBuf;
100 std::deque<SensorEvent*> _events;
107 #endif // __blip_SensorManager_hpp Type
Sensor types.
Definition: Sensor.hpp:25
bool setSensorEventRate(Sensor *sensor, timespan_us_t rate)
Set the rate, in microseconds, at which the given sensor will send events to the application.
Definition: SensorManager.cpp:162
bool enableSensor(Sensor *sensor)
Enable the given sensor, so that the application may begin receiving events from it.
Definition: SensorManager.cpp:146
An abstract base class for sensor events.
Definition: SensorEvent.hpp:20
int getSensorCount() const
Get the number of sensors in the system.
Definition: SensorManager.cpp:56
WAV file format details at: https://ccrma.stanford.edu/courses/422/projects/WaveFormat/.
Definition: AccelerometerSensorEvent.cpp:3
~SensorManager()
Destructor.
Definition: SensorManager.cpp:47
An abstract base class for all "native" (C++) Android activities.
Definition: NativeActivity.hpp:71
A class representing a sensor.
Definition: Sensor.hpp:17
bool disableSensor(Sensor *sensor)
Disable the given sensor, so that the application will no longer receive events from it...
Definition: SensorManager.cpp:154
A class that provides access to the hardware sensors.
Definition: SensorManager.hpp:23
Sensor * getDefaultSensor(Sensor::Type type)
Get the default sensor for the given sensor type.
Definition: SensorManager.cpp:75
Sensor * getSensor(int index)
Get the sensor at the given index.
Definition: SensorManager.cpp:64
uint64_t timespan_us_t
A time interval, measured in microseconds.
Definition: Blip.hpp:30