Core Base Classes for the Light Endpoints
Dependents: mbed_mqtt_endpoint_ublox_ethernet mbed_mqtt_endpoint_ublox_cellular mbed_nsp_endpoint_ublox_cellular mbed_nsp_endpoint_ublox_ethernet ... more
Diff: LightSwitchAction.h
- Revision:
- 21:cfdaee0a2b50
- Parent:
- 9:90fadae5489a
- Child:
- 87:e9d77e9f9eae
diff -r f2dbbd852e08 -r cfdaee0a2b50 LightSwitchAction.h --- a/LightSwitchAction.h Wed Feb 26 18:59:01 2014 +0000 +++ b/LightSwitchAction.h Wed Feb 26 21:29:18 2014 +0000 @@ -25,6 +25,9 @@ // what we act upon #include "Light.h" +// the resource we are bound to +#define SWITCH_RESOURCE "/lt/0/on" + class LightSwitchAction : public Action { private: Light *m_light; @@ -32,9 +35,8 @@ public: LightSwitchAction(ErrorHandler *error_handler,Light *light); virtual ~LightSwitchAction(); - - ErrorHandler *logger(); - + + void toggle(); void on(); void off();