A class that provides access to the hardware sensors.
More...
#include <SensorManager.hpp>
A class that provides access to the hardware sensors.
- Author
- Mark Lindner
◆ ~SensorManager()
◆ disableSensor()
bool disableSensor |
( |
Sensor * |
sensor | ) |
|
Disable the given sensor, so that the application will no longer receive events from it.
- Parameters
-
sensor | The sensor to disable. |
- Returns
- true if the sensor was successfully disabled, false otherwise.
◆ enableSensor()
bool enableSensor |
( |
Sensor * |
sensor | ) |
|
Enable the given sensor, so that the application may begin receiving events from it.
- Parameters
-
sensor | The sensor to enable. |
- Returns
- true if the sensor was successfully enabled, false otherwise.
◆ getDefaultSensor()
Get the default sensor for the given sensor type.
- Parameters
-
- Returns
- The default sensor, or NULL if there are no sensors of the given type.
◆ getSensor()
Sensor * getSensor |
( |
int |
index | ) |
|
Get the sensor at the given index.
- Parameters
-
- Returns
- The sensor.
- Exceptions
-
OutOfBoundsException | If index is invalid. |
◆ getSensorCount()
int getSensorCount |
( |
| ) |
const |
Get the number of sensors in the system.
◆ setSensorEventRate()
Set the rate, in microseconds, at which the given sensor will send events to the application.
- Parameters
-
sensor | The sensor. |
rate | The new rate, in microseconds. The rate must be greater than or equal to the value returned by Sensor::getMinimumDelay() for the given sensor. |
- Returns
- true if the sensor event rate was successfully changed, false otherwise.
The documentation for this class was generated from the following files: