blip  0.1
Sensor Class Reference

A class representing a sensor. More...

#include <Sensor.hpp>

Public Types

enum  Type {
  Type_Unknown = -1, Type_Accelerometer = 1, Type_Gravity, Type_Gyroscope,
  Type_Light, Type_LinearAcceleration, Type_MagneticField, Type_Orientation,
  Type_Pressure, Type_Proximity, Type_RotationVector, Type_Temperature
}
 Sensor types. More...
 

Public Member Functions

 ~Sensor () throw ()
 Destructor. More...
 
Type getType () const throw ()
 Get the sensor type. More...
 
float getResolution () const throw ()
 Get the sensor's resolution, in the sensor's unit. More...
 
timespan_us_t getMinimumDelay () const throw ()
 Get the minimum delay between two events for the sensor, in microseconds. More...
 
const char * getVendor () const throw ()
 Get the sensor's vendor. More...
 
const char * getName () const throw ()
 Get the sensor's name. More...
 

Static Public Attributes

static const float STANDARD_GRAVITY = ASENSOR_STANDARD_GRAVITY
 The Earth's gravity in m/s2. More...
 
static const float MAGNETIC_FIELD_EARTH_MIN = ASENSOR_MAGNETIC_FIELD_EARTH_MIN
 The minimum magnetic field on the Earth's surface in uT. More...
 
static const float MAGNETIC_FIELD_EARTH_MAX = ASENSOR_MAGNETIC_FIELD_EARTH_MAX
 The maximum magnetic field on the Earth's surface in uT. More...
 

Detailed Description

A class representing a sensor.

Author
Mark Lindner

Member Enumeration Documentation

◆ Type

enum Type

Sensor types.

Enumerator
Type_Unknown 
Type_Accelerometer 
Type_Gravity 
Type_Gyroscope 
Type_Light 
Type_LinearAcceleration 
Type_MagneticField 
Type_Orientation 
Type_Pressure 
Type_Proximity 
Type_RotationVector 
Type_Temperature 

Constructor & Destructor Documentation

◆ ~Sensor()

~Sensor ( )
throw (
)

Destructor.

Member Function Documentation

◆ getMinimumDelay()

timespan_us_t getMinimumDelay ( ) const
throw (
)

Get the minimum delay between two events for the sensor, in microseconds.

May return 0 to indicate that an event is only sent when the sensor's measurement changes.

◆ getName()

const char * getName ( ) const
throw (
)

Get the sensor's name.

◆ getResolution()

float getResolution ( ) const
throw (
)

Get the sensor's resolution, in the sensor's unit.

◆ getType()

Sensor::Type getType ( ) const
throw (
)

Get the sensor type.

◆ getVendor()

const char * getVendor ( ) const
throw (
)

Get the sensor's vendor.

Member Data Documentation

◆ MAGNETIC_FIELD_EARTH_MAX

const float MAGNETIC_FIELD_EARTH_MAX = ASENSOR_MAGNETIC_FIELD_EARTH_MAX
static

The maximum magnetic field on the Earth's surface in uT.

◆ MAGNETIC_FIELD_EARTH_MIN

const float MAGNETIC_FIELD_EARTH_MIN = ASENSOR_MAGNETIC_FIELD_EARTH_MIN
static

The minimum magnetic field on the Earth's surface in uT.

◆ STANDARD_GRAVITY

const float STANDARD_GRAVITY = ASENSOR_STANDARD_GRAVITY
static

The Earth's gravity in m/s2.


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