endpoint including temperature and distance sensors
Dependencies: mbed mbedConnectorInterface mbedEndpointNetwork TrashSensors
Fork of TempAndDistTest by
resource/TemperatureResource.h@11:ac0ff76a6deb, 2015-05-25 (annotated)
- Committer:
- coyotebush
- Date:
- Mon May 25 03:21:11 2015 +0000
- Revision:
- 11:ac0ff76a6deb
- Parent:
- 6:bbea44df21e8
Move sensor code into library
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
coyotebush | 6:bbea44df21e8 | 1 | #ifndef TEMPERATURE_RESOURCE_H |
coyotebush | 6:bbea44df21e8 | 2 | #define TEMPERATURE_RESOURCE_H |
coyotebush | 6:bbea44df21e8 | 3 | |
coyotebush | 6:bbea44df21e8 | 4 | #include "DynamicResource.h" |
coyotebush | 6:bbea44df21e8 | 5 | #include "GroveTemp.h" |
coyotebush | 6:bbea44df21e8 | 6 | |
coyotebush | 6:bbea44df21e8 | 7 | class TemperatureResource : public DynamicResource { |
coyotebush | 6:bbea44df21e8 | 8 | public: |
coyotebush | 6:bbea44df21e8 | 9 | TemperatureResource(const Logger *logger, const char *name, GroveTempSensor *sensor, const bool observable = false) |
coyotebush | 6:bbea44df21e8 | 10 | : DynamicResource(logger, name, "TemperatureResource", SN_GRS_GET_ALLOWED, observable), sensor(sensor) |
coyotebush | 6:bbea44df21e8 | 11 | {} |
coyotebush | 6:bbea44df21e8 | 12 | |
coyotebush | 6:bbea44df21e8 | 13 | virtual string get(); |
coyotebush | 6:bbea44df21e8 | 14 | private: |
coyotebush | 6:bbea44df21e8 | 15 | GroveTempSensor *sensor; |
coyotebush | 6:bbea44df21e8 | 16 | }; |
coyotebush | 6:bbea44df21e8 | 17 | |
coyotebush | 6:bbea44df21e8 | 18 | #endif |