From 33613a85afc4b1481367fbe92a17ee59c240250b Mon Sep 17 00:00:00 2001 From: Sven Eisenhauer Date: Fri, 10 Nov 2023 15:11:48 +0100 Subject: add new repo --- .../Praktikum1/Aufgabe3/src/Task.h | 117 +++++++++++++++++++++ 1 file changed, 117 insertions(+) create mode 100644 Master/Real-Time Systems/Praktikum1/Aufgabe3/src/Task.h (limited to 'Master/Real-Time Systems/Praktikum1/Aufgabe3/src/Task.h') 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 +#include +#include + +class Task; + +typedef vector 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_ */ -- cgit v1.2.3