Proof of concept for distance and temperature monitoring
Dependencies: mbed mbedConnectorInterface mbedEndpointNetwork
Diff: resource/DistanceResource.h
- Revision:
- 7:939fdc8df95b
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/resource/DistanceResource.h Wed May 06 02:53:36 2015 +0000 @@ -0,0 +1,18 @@ +#ifndef DISTANCE_RESOURCE_H +#define DISTANCE_RESOURCE_H + +#include "DynamicResource.h" +#include "hcsr04.h" + +class DistanceResource : public DynamicResource { +public: + DistanceResource(const Logger *logger, const char *name, HCSR04 *sensor, const bool observable = false) + : DynamicResource(logger, name, "DistanceResource", SN_GRS_GET_ALLOWED, observable), sensor(sensor) + {} + + virtual string get(); +private: + HCSR04 *sensor; +}; + +#endif \ No newline at end of file