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.
TTask.h
00001 /** 00002 * @file TTask.h 00003 * @brief Cette classe est le modele des 3 taches de controle. 00004 * @author Salco 00005 * @version 2.00 00006 * @date 11 mars 2015 00007 */ 00008 #ifndef TTASK_H 00009 #define TTASK_H 00010 00011 #include "AnsiGraphicalConsole.h "//pt une bonne ider 00012 #include "settingDebug.h" 00013 00014 #include "mouvement.h" 00015 #include "OSNAPprotocoleDefine.h" 00016 #include "CtrlBridge.h" 00017 00018 class TTask 00019 { 00020 private: 00021 int m_priorityCount;//m_countCycle; 00022 int m_priority;//m_cycleSet; 00023 //bool startSignal; 00024 00025 00026 protected: 00027 static TTask *ptrThis; 00028 string m_ListDesModules; 00029 CtrlBridge* m_CtrlBridge; 00030 00031 public: 00032 TTask(int priority=0) { 00033 m_priority=priority; 00034 m_priorityCount=0; 00035 m_CtrlBridge = m_CtrlBridge->getInstance(); 00036 00037 } 00038 virtual ~TTask() { 00039 } 00040 00041 virtual void exec(void) { 00042 if(m_priorityCount >= m_priority) { 00043 m_priorityCount=0; 00044 this->task(); 00045 } else 00046 m_priorityCount++; 00047 } 00048 00049 //virtual void signalStart(void); 00050 virtual void task(void) = 0; 00051 00052 void setPriority(int value) { 00053 m_priority = value; 00054 } 00055 int getPriority() { 00056 return m_priority; 00057 } 00058 00059 }; 00060 #endif // TTASK_H
Generated on Tue Jul 12 2022 19:04:22 by
1.7.2