....

Dependencies:   Library_Cntrl Library_Misc_cuboid

Fork of cuboid_balance_ros by Ruprecht Altenburger

Revision:
0:acf871f26563
diff -r 000000000000 -r acf871f26563 Signal.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Signal.h	Fri Mar 08 13:34:59 2019 +0000
@@ -0,0 +1,37 @@
+/*
+ * Signal.h
+ * Copyright (c) 2017, ZHAW
+ * All rights reserved.
+ */
+
+#ifndef SIGNAL_H_
+#define SIGNAL_H_
+
+#include <cstdlib>
+#include <stdint.h>
+#include <mbed.h>
+#include "rtos.h"
+#include <Mutex.h>
+
+/**
+ * This class manages the handling of unique signal flags to trigger rtos threads.
+ */
+class Signal {
+    
+    public:
+        
+                        Signal();
+        virtual         ~Signal();
+        virtual int32_t read();
+                        operator int32_t();
+        
+    private:
+        
+        static int32_t  signals;    // variable that holds all assigned signal flags
+        int32_t         signal;     // signal flag of this object
+        Mutex           mutex;      // mutex to lock critical sections
+};
+
+#endif /* SIGNAL_H_ */
+
+