endpoint including temperature and distance sensors
Dependencies: mbed mbedConnectorInterface mbedEndpointNetwork TrashSensors
Fork of TempAndDistTest by
resource/TemperatureResource.h@6:bbea44df21e8, 2015-05-05 (annotated)
- Committer:
- coyotebush
- Date:
- Tue May 05 05:18:03 2015 +0000
- Revision:
- 6:bbea44df21e8
Add TemperatureResource
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 |