libPocuter  1.0
Support library for programming the Pocuter
PocuterLightSensor.h
Go to the documentation of this file.
1 #ifndef POCUTERLIGHTSENSOR_H
2 #define POCUTERLIGHTSENSOR_H
3 #include <stdint.h>
4 
10  public:
11  enum LIGHTERROR {
14  };
15  enum LIGHTEVENT {
19  };
20 
21 
22  typedef void (lightEventHandler)(LIGHTEVENT, void*);
36  virtual LIGHTERROR registerEventHandler(lightEventHandler* h, uint16_t limit, uint16_t tollerance, void* u) = 0;
37 
38 
43  virtual void unregisterEventHandler() = 0;
44 
49  virtual uint16_t getValue() = 0;
50 
51  private:
52 
53 };
54 
55 
56 #endif /* POCUTERLIGHTSENSOR_H */
57 
PocuterLightSensor::LIGHT_TOLLERANCE_CHANGED
@ LIGHT_TOLLERANCE_CHANGED
Definition: PocuterLightSensor.h:18
PocuterLightSensor::LIGHTERROR
LIGHTERROR
Definition: PocuterLightSensor.h:11
PocuterLightSensor::registerEventHandler
virtual LIGHTERROR registerEventHandler(lightEventHandler *h, uint16_t limit, uint16_t tollerance, void *u)=0
register an event callback
PocuterLightSensor::lightEventHandler
void() lightEventHandler(LIGHTEVENT, void *)
Definition: PocuterLightSensor.h:22
PocuterLightSensor::LIGHTERROR_UNKNOWN
@ LIGHTERROR_UNKNOWN
Definition: PocuterLightSensor.h:13
PocuterLightSensor::unregisterEventHandler
virtual void unregisterEventHandler()=0
unregister the event handler
PocuterLightSensor
options to access the Pocuter light sensor
Definition: PocuterLightSensor.h:9
PocuterLightSensor::LIGHT_UNDER_LIMIT
@ LIGHT_UNDER_LIMIT
Definition: PocuterLightSensor.h:17
PocuterLightSensor::getValue
virtual uint16_t getValue()=0
poll the light value
PocuterLightSensor::LIGHTERROR_OK
@ LIGHTERROR_OK
Definition: PocuterLightSensor.h:12
PocuterLightSensor::LIGHTEVENT
LIGHTEVENT
Definition: PocuterLightSensor.h:15
PocuterLightSensor::LIGHT_ABOVE_LIMIT
@ LIGHT_ABOVE_LIMIT
Definition: PocuterLightSensor.h:16