summaryrefslogtreecommitdiffstats
path: root/Master/Real-Time Systems/Praktikum1/Aufgabe3/src/Task.h
diff options
context:
space:
mode:
Diffstat (limited to 'Master/Real-Time Systems/Praktikum1/Aufgabe3/src/Task.h')
-rw-r--r--Master/Real-Time Systems/Praktikum1/Aufgabe3/src/Task.h117
1 files changed, 117 insertions, 0 deletions
diff --git a/Master/Real-Time Systems/Praktikum1/Aufgabe3/src/Task.h b/Master/Real-Time Systems/Praktikum1/Aufgabe3/src/Task.h
new file mode 100644
index 0000000..bd8c773
--- /dev/null
+++ b/Master/Real-Time Systems/Praktikum1/Aufgabe3/src/Task.h
@@ -0,0 +1,117 @@
+/*
+ * Task.h
+ *
+ * Created on: 31.10.2010
+ * Author: sven
+ */
+
+#ifndef TASK_H_
+#define TASK_H_
+
+#ifndef GLOBAL_H_
+ #include "Global.h"
+#endif
+
+#include <string>
+#include <vector>
+#include <cmath>
+
+class Task;
+
+typedef vector<Task> task_set;
+
+class Task {
+public:
+ Task();
+ Task(char*,int,int,int);
+ virtual ~Task();
+
+ void dump() const;
+ void dumpStep() const;
+ void execute();
+ void requeue();
+ void checkPeriod();
+
+ int getStepCounter() const
+ {
+ return m_stepCounter;
+ }
+
+ void setStepCounter(int m_stepCounter)
+ {
+ this->m_stepCounter = m_stepCounter;
+ }
+
+ int getActC() const
+ {
+ return m_actC;
+ }
+
+ int getActD() const
+ {
+ return m_actD;
+ }
+
+ string getName() const
+ {
+ return m_Name;
+ }
+
+ int getOrigC() const
+ {
+ return m_origC;
+ }
+
+ int getOrigD() const
+ {
+ return m_origD;
+ }
+
+ int getOrigP() const
+ {
+ return m_origP;
+ }
+
+ void setActC(int m_actC)
+ {
+ this->m_actC = m_actC;
+ }
+
+ void setActD(int m_actD)
+ {
+ this->m_actD = m_actD;
+ }
+
+ void setName(string m_Name)
+ {
+ this->m_Name = m_Name;
+ }
+
+ void setOrigC(int m_origC)
+ {
+ this->m_origC = m_origC;
+ }
+
+ void setOrigD(int m_origD)
+ {
+ this->m_origD = m_origD;
+ }
+
+ void setOrigP(int m_origP)
+ {
+ this->m_origP = m_origP;
+ }
+ int getNextDeadline();
+
+private:
+ string m_Name;
+ int m_origC;
+ int m_origP;
+ int m_origD;
+ int m_actC;
+ int m_actD;
+ int m_stepCounter;
+ int m_absoluteStepCounter;
+};
+
+#endif /* TASK_H_ */