blip  0.1
ProximitySensorEvent.hpp
Go to the documentation of this file.
1 #ifndef __blip_ProximitySensorEvent_hpp
2 #define __blip_ProximitySensorEvent_hpp
3 
4 #include <blip/Blip.hpp>
5 #include <blip/SensorEvent.hpp>
6 
7 namespace blip {
8 
15 {
16  public:
17 
19  ProximitySensorEvent(time_ms_t eventTime, const float values[16]);
23  virtual ~ProximitySensorEvent();
24 
26  inline float getDistance() const
27  { return(getValue(0)); }
28 
29  private:
30 
31  CCXX_COPY_DECLS(ProximitySensorEvent);
32 };
33 
34 } // namespace blip
35 
36 #endif // __blip_ProximitySensorEvent_hpp
float getValue(int index) const
Get a sensor value.
float getDistance() const
Get the distance to the nearby object.
Definition: ProximitySensorEvent.hpp:26
An abstract base class for sensor events.
Definition: SensorEvent.hpp:20
WAV file format details at: https://ccrma.stanford.edu/courses/422/projects/WaveFormat/.
Definition: AccelerometerSensorEvent.cpp:3
A proximity sensor event, which measures the distance to a nearby object.
Definition: ProximitySensorEvent.hpp:14
virtual ~ProximitySensorEvent()
Destructor.
Definition: ProximitySensorEvent.cpp:17