Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: NaturalTinyShell_ice libmDot-12Sept mbed-rtos mbed
Fork of ICE by
Diff: src/OutputTask/OutputTask.h
- Revision:
- 74:03ccf04998b5
- Parent:
- 72:3754b352f156
- Child:
- 77:43e0a3d9e536
diff -r 3750cc5251e9 -r 03ccf04998b5 src/OutputTask/OutputTask.h
--- 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
