Saltware / Mbed 2 deprecated Water Play

Dependencies:   mbed DRV88255 TextLCD Ping mbed-rtos

Revision:
10:fd4670ec0806
Parent:
9:b3674516729d
Child:
38:930469a33001
diff -r b3674516729d -r fd4670ec0806 Controller.h
--- a/Controller.h	Fri Jun 10 12:56:53 2016 +0000
+++ b/Controller.h	Fri Jun 10 22:21:04 2016 +0000
@@ -1,10 +1,36 @@
 #ifndef __CONTROLLER_H__
 #define __CONTROLLER_H__
 
+#include <string>
+
+#include "rtos.h"
+
 class Controller {
     public:
+        Controller(bool threaded, int interval_ms);
+
         virtual void update() = 0;
-        virtual float getValue() = 0;   
+        
+        virtual std::string get_name() = 0;
+        
+        bool is_threaded();
+        
+        void run();
+                
+        int get_interval_ms();
+        
+        void set_priority(osPriority priority);
+        
+        osPriority get_priority();
+                
+    private:
+        bool threaded;
+        bool has_spawned;
+        Thread *ctrl_thread;
+        int interval_ms;
+        osPriority prio;
+        
+        static void thread_stub(void const *args);
 };
 
 #endif
\ No newline at end of file