Erick / Mbed 2 deprecated ICE_BLE_TEST

Dependencies:   NaturalTinyShell_ice libmDot-12Sept mbed-rtos mbed

Fork of ICE by Erick

Revision:
74:03ccf04998b5
Parent:
72:3754b352f156
Child:
77:43e0a3d9e536
--- a/src/OutputTask/OutputTask.h	Fri Sep 16 21:44:38 2016 +0000
+++ b/src/OutputTask/OutputTask.h	Mon Sep 19 12:54:55 2016 +0000
@@ -1,6 +1,9 @@
 #ifndef OUTPUTTASK_H
 #define OUTPUTTASK_H
 
+#include <string>
+#include <stdio.h>
+
 void OutputTask(void const *args);
 void DisplayOutputs(void);
 
@@ -11,4 +14,29 @@
     CONTROL_ON  = 1
 } ControlState;
 
+
+/*****************************************************************************
+ * Control class 
+ ****************************************************************************/
+class Control
+{
+private:
+    std::string          id;
+    unsigned int    priority;
+    ControlState    state;
+public:
+    Control(std::string id, unsigned int priority, ControlState state) :
+        id(id), priority(priority), state(state) {}
+    void display() {
+        printf("[%s | %s | %u]",
+               id.c_str(), (state == CONTROL_ON) ? "ON" : "OFF", priority);
+    }
+    //void setId(string id) id(id) { }
+    std::string getId() {
+        return id;
+    }
+    void setState(ControlState _state) {
+        state = _state;
+    }
+};
 #endif
\ No newline at end of file