F´ Flight Software - C/C++ Documentation  devel
A framework for building embedded system applications to NASA flight quality standards.
Task.hpp
Go to the documentation of this file.
1 // ======================================================================
2 // \title Os/Stub/Task.hpp
3 // \brief stub definitions for Os::Task
4 // ======================================================================
5 #include "Os/Task.hpp"
6 
7 #ifndef OS_STUB_TASK_HPP
8 #define OS_STUB_TASK_HPP
9 namespace Os {
10 namespace Stub {
11 namespace Task {
12 
14 class StubTaskHandle : public TaskHandle {};
15 
17 class StubTask : public TaskInterface {
18  public:
20  StubTask() = default;
21 
23  ~StubTask() override = default;
24 
26  void onStart() override;
27 
34  Status join() override;
35 
43  void suspend(SuspensionType suspensionType) override;
44 
49  void resume() override;
50 
58  Status _delay(Fw::TimeInterval interval) override;
59 
62  TaskHandle* getHandle() override;
63 
74  bool isCooperative() override;
75 
82  Status start(const Arguments& arguments) override;
83 };
84 
85 }
86 }
87 }
88 #endif // End OS_STUB_TASK_HPP
Test task handle.
Definition: Task.hpp:14
Implementation of task.
Definition: Task.hpp:17
void suspend(SuspensionType suspensionType) override
suspend the task given the suspension type
Definition: Task.cpp:18
Status _delay(Fw::TimeInterval interval) override
delay the current task
Definition: Task.cpp:34
bool isCooperative() override
determine if the task requires cooperative multitasking
Definition: Task.cpp:30
StubTask()=default
Constructor.
void resume() override
resume a suspended task
Definition: Task.cpp:20
void onStart() override
perform required task start actions
Definition: Task.cpp:10
Status start(const Arguments &arguments) override
start the task
Definition: Task.cpp:26
Status join() override
block until the task has ended
Definition: Task.cpp:14
TaskHandle * getHandle() override
return the underlying task handle (implementation specific)
Definition: Task.cpp:22
~StubTask() override=default
Destructor.
Task handle representation.
Definition: Task.hpp:24