Erick / Mbed 2 deprecated ICE_BLE_TEST

Dependencies:   NaturalTinyShell_ice libmDot-12Sept mbed-rtos mbed

Fork of ICE by Erick

Revision:
217:d5a2ff093319
Parent:
164:7cecd731882e
Child:
262:696cd48bb04a
diff -r b30d94ecfa84 -r d5a2ff093319 src/ConfigurationHandler/Controls/ManualControl.h
--- a/src/ConfigurationHandler/Controls/ManualControl.h	Mon Oct 10 16:07:40 2016 +0000
+++ b/src/ConfigurationHandler/Controls/ManualControl.h	Tue Oct 11 12:24:28 2016 +0000
@@ -19,35 +19,79 @@
     string          output;             // output 
     unsigned int    type;               // timed, continuous, setpoint
     unsigned int    priority;           // control priority
-    unsigned int    duration;
-    float           setpoint;
+    unsigned int    duration;           // in seconds (not implemented)
+    float           setpoint;           // setpoint (not implemented)
     unsigned int    state;              // ON or OFF
     unsigned int    percent;            // analog/manual value
     
     enum State {
-        STATE_INIT,
-        STATE_STARTUP,
-        STATE_CONTROL_ON,
-        STATE_CONTROL_OFF
+        STATE_INIT,                     // init
+        STATE_STARTUP,                  // control has been started
+        STATE_CONTROL_ON,               // control is ON
+        STATE_CONTROL_OFF               // control is OFF
     };
     State           currentState;
     
 public:
+    // ctor
     ManualControl() {};
+    // dtor
     ~ManualControl() {
         printf("\r%s destructor invoked\n", __func__);
     }
     // load a control from the control file
     bool load(string filename);
+    
+    // start a control
+    void start(void);
+    
+    // update a control (this is called periodically)
+    int update(void);
+    
+    // power an output 
+    int powerOutput(void);
+    
+    // unregister a control
+    int unregisterControl(void);
+    
+    // display the control 
+    void display(void);
+    
     string getControlFile(void) const {
         return controlFile;
     }
     
-    void    start(void);
-    int     update(void);
-    int     powerOutput(void);
-    int     unregisterControl();
-    void    display(void);
+    string getId(void) const { 
+        return id;
+    }
+    
+    string getOutput(void) const {
+        return output;
+    }
+    
+    unsigned int getType(void) const {
+        return type;
+    }
+    
+    unsigned int getPriority(void) const {
+        return priority;
+    }
+    
+    unsigned int getDuration(void) const {
+        return duration;
+    }
+    
+    float getSetpoint(void) const {
+        return setpoint;
+    }
+    
+    unsigned int getState(void) const {
+        return state;
+    }
+    
+    unsigned int getPercent(void) const {
+        return percent;
+    }
 };
 
 #endif