Core Base Classes for the Light Endpoints

Dependencies:   BufferedSerial

Dependents:   mbed_mqtt_endpoint_ublox_ethernet mbed_mqtt_endpoint_ublox_cellular mbed_nsp_endpoint_ublox_cellular mbed_nsp_endpoint_ublox_ethernet ... more

Revision:
9:90fadae5489a
Parent:
1:5d332fa199ce
Child:
16:fda7dbb8b47a
--- a/Light.h	Mon Feb 24 22:25:18 2014 +0000
+++ b/Light.h	Tue Feb 25 05:27:29 2014 +0000
@@ -27,21 +27,35 @@
 
 class Light {
     private:
-        ErrorHandler    *m_error_handler;
-        ResourceFactory *m_resources;
-        void            *m_endpoint;
-        Transport       *m_transports[NUM_TRANSPORTS];
-        char             m_name[LIGHT_NAME_LEN];
+        ErrorHandler      *m_error_handler;
+        ResourceFactory   *m_resources;
+        void              *m_endpoint;
+        Transport         *m_transports[NUM_TRANSPORTS];
+        char               m_name[LIGHT_NAME_LEN];
+        
+        void              *m_dimmer_action;
+        void              *m_switch_action;
     
     public:
         Light(ErrorHandler *error_handler,Transport *transports[NUM_TRANSPORTS],int instance,void *endpoint);
         virtual ~Light();
        
-       Transport *getTransport(int index);
-       char *getName();
+        Transport *getTransport(int index);
+        char *getName();
               
-       ErrorHandler *logger();
-       ResourceFactory *resources();
+        ErrorHandler *logger();
+        ResourceFactory *resources();
+        
+        void  setDimmerAction(void *dimmer_action);
+        void  setSwitchAction(void *switch_action);
+    
+        virtual void on();
+        virtual void off();
+        virtual void dim(int value);   
+        
+    protected:
+        void *getDimmerAction();
+        void *getSwitchAction();     
 };
 
 #endif // _LIGHT_H_
\ No newline at end of file