lib para o framework sgam
Dependencies: MPU6050 Grove_temperature
Dependents: example_smart-grid
peripheral/Sensor.h
- Committer:
- AndersonIctus
- Date:
- 2019-06-03
- Revision:
- 4:f21aab30658a
- Parent:
- 3:f998244e9f80
- Child:
- 5:caecc2426bbb
File content as of revision 4:f21aab30658a:
#ifndef SGAM_SENSOR_H #define SGAM_SENSOR_H #include "mbed.h" template <class T> class Sensor { public: Sensor() { } ; ~Sensor(){ }; virtual T getValue() = 0; virtual void setCallbackReadOcurred( void* (*callback)(T* value), float timeout ) = 0; protected: T* value; void* (*callback)(T* value); // callback que deve ser configurado e chamado posteriormente ! virtual void run(float timeout) = 0; virtual void acceptDataEvent(T* data) = 0; }; #endif // SGAM_SENSOR_H