endpoint including temperature and distance sensors

Dependencies:   mbed mbedConnectorInterface mbedEndpointNetwork TrashSensors

Fork of TempAndDistTest by Tim Ambrose

Committer:
coyotebush
Date:
Mon May 25 03:21:11 2015 +0000
Revision:
11:ac0ff76a6deb
Parent:
7:939fdc8df95b
Move sensor code into library

Who changed what in which revision?

UserRevisionLine numberNew contents of line
coyotebush 7:939fdc8df95b 1 #ifndef DISTANCE_RESOURCE_H
coyotebush 7:939fdc8df95b 2 #define DISTANCE_RESOURCE_H
coyotebush 7:939fdc8df95b 3
coyotebush 7:939fdc8df95b 4 #include "DynamicResource.h"
coyotebush 7:939fdc8df95b 5 #include "hcsr04.h"
coyotebush 7:939fdc8df95b 6
coyotebush 7:939fdc8df95b 7 class DistanceResource : public DynamicResource {
coyotebush 7:939fdc8df95b 8 public:
coyotebush 7:939fdc8df95b 9 DistanceResource(const Logger *logger, const char *name, HCSR04 *sensor, const bool observable = false)
coyotebush 7:939fdc8df95b 10 : DynamicResource(logger, name, "DistanceResource", SN_GRS_GET_ALLOWED, observable), sensor(sensor)
coyotebush 7:939fdc8df95b 11 {}
coyotebush 7:939fdc8df95b 12
coyotebush 7:939fdc8df95b 13 virtual string get();
coyotebush 7:939fdc8df95b 14 private:
coyotebush 7:939fdc8df95b 15 HCSR04 *sensor;
coyotebush 7:939fdc8df95b 16 };
coyotebush 7:939fdc8df95b 17
coyotebush 7:939fdc8df95b 18 #endif