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: Light.h
- Revision:
- 134:58e7537a8c5f
- Parent:
- 105:759dee018363
- Child:
- 144:e4d24c2c8f18
diff -r 667409048c68 -r 58e7537a8c5f Light.h --- a/Light.h Thu Mar 27 02:58:30 2014 +0000 +++ b/Light.h Fri Mar 28 16:24:12 2014 +0000 @@ -19,11 +19,8 @@ #ifndef _LIGHT_H_ #define _LIGHT_H_ -// Transport support -#include "Transport.h" - -// ResourceFactory -#include "ResourceFactory.h" +// Base class support +#include "Personality.h" // Philips Light Support #include "PhilipsLight.h" @@ -31,19 +28,11 @@ // External LED Light Support #include "ExternalLEDLight.h" -class Light { +class Light : public Personality { private: - ErrorHandler *m_error_handler; - ResourceFactory *m_resources; - void *m_endpoint; - Transport *m_transports[NUM_TRANSPORTS]; - char m_name[LIGHT_NAME_LEN+1]; - void *m_dimmer_action; void *m_switch_action; - int m_ioc_id; - PhilipsLight *m_pl; ExternalLEDLight *m_ext_led; @@ -58,14 +47,7 @@ public: Light(ErrorHandler *error_handler,Transport *transports[NUM_TRANSPORTS],int instance,void *endpoint); virtual ~Light(); - - Transport *getTransport(int index); - char *getName(); - ResourceFactory *getResourceFactory(); - - ErrorHandler *logger(); - ResourceFactory *resources(); - + void setDimmerAction(void *dimmer_action); void setSwitchAction(void *switch_action); @@ -73,10 +55,7 @@ virtual void off(); void blink(); virtual void dim(int value); - - void setIOCID(int id); - int getIOCID(); - + void updateDirection(); void blinkLight(); @@ -94,7 +73,6 @@ void manageBlinkingThread(); void startBlinkingThread(); void stopBlinkingThread(); - }; #endif // _LIGHT_H_ \ No newline at end of file