Erick / Mbed 2 deprecated ICE_BLE_TEST

Dependencies:   NaturalTinyShell_ice libmDot-12Sept mbed-rtos mbed

Fork of ICE by Erick

Revision:
96:807f04bd5256
Child:
97:5cf6ab71dcd0
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/ConfigurationHandler/Controls/ManualControl.h	Wed Sep 21 12:54:41 2016 +0000
@@ -0,0 +1,44 @@
+/******************************************************************************
+ *
+ * File:                ManualControl.h
+ * Desciption:          ICE Manual Control Class
+ *
+ *****************************************************************************/
+#ifndef MANUALCONTROL_H
+#define MANUALCONTROL_H
+
+#include <string>
+
+using namespace std;
+
+class ManualControl
+{
+private:
+    string          controlFile;        // name of the control file
+    string          id;                 // identifier
+    unsigned int    type;               // timed, continuous, setpoint
+    unsigned int    priority;           // control priority
+    unsigned int    duration;
+    float           setpoint;
+    enum State { OFF = 0, ON = 1 } ;   
+    State           state;
+    unsigned int    percent;            // analog/manual value
+    
+public:
+    ManualControl() {};
+    ~ManualControl() {
+        printf("\r%s destructor invoked\n", __func__);
+    }
+    // load a control from the control file
+    bool load(string filename);
+    string getControlFile(void) const {
+        return controlFile;
+    }
+    
+    int start(void);
+    int update(void);
+    int unregisterControl();
+    void display(void);
+};
+
+#endif