![]() |
SuperTinyKernel™ RTOS 1.06.x
Lightweight, high-performance, deterministic, bare-metal C++ RTOS for resource-constrained embedded systems. MIT Open Source License.
|
Interface for a user task. More...
#include <stk_common.h>
Public Member Functions | |
| virtual void | Run ()=0 |
| Entry point of the user task. | |
| virtual EAccessMode | GetAccessMode () const =0 |
| Get hardware access mode of the user task. | |
| virtual void | OnDeadlineMissed (uint32_t duration) |
| Called by the scheduler if deadline of the task is missed when Kernel is operating in Hard Real-Time mode (see stk::KERNEL_HRT). | |
| virtual void | OnExit () |
| Called by the kernel before removal from the scheduling (see stk::KERNEL_DYNAMIC). | |
| virtual Weight | GetWeight () const |
| Get static base weight of the task. | |
| TId | GetId () const |
| Get task Id set by application. | |
| virtual const char * | GetTraceName () const |
| Get task trace name set by application. | |
| virtual const Word * | GetStack () const =0 |
| Get pointer to the stack memory. | |
| virtual size_t | GetStackSize () const =0 |
| Get number of elements of the stack memory array. | |
| virtual size_t | GetStackSizeBytes () const =0 |
| Get size of the memory in bytes. | |
| virtual size_t | GetStackSpace () const |
| Get available stack space. | |
Interface for a user task.
Usage example:
Definition at line 588 of file stk_common.h.
|
pure virtual |
Get hardware access mode of the user task.
Implemented in FrtosTask, stk::Task< _StackSize, _AccessMode >, stk::TaskW< _Weight, _StackSize, _AccessMode >, stk::time::TimerHost::TimerWorkerTask, StkThread, and TaskWrapper.
Referenced by stk::Kernel< TMode, TSize, TStrategy, TPlatform >::KernelTask::Bind().
|
inline |
Get task Id set by application.
Implementation of ITask::GetId, see ITask. Placed here as it depends on GetTidFromUserTask.
Definition at line 234 of file stk_helper.h.
References stk::GetTidFromUserTask().
Referenced by stk::Kernel< TMode, TSize, TStrategy, TPlatform >::KernelTask::Bind(), and stk_task_get_id().
|
pure virtualinherited |
Get pointer to the stack memory.
Implemented in FrtosTask, stk::StackMemoryWrapper< _StackSize >, stk::StackMemoryWrapper< STACK_SIZE_MIN >, stk::StackMemoryWrapper<((32U))>, stk::Task< _StackSize, _AccessMode >, stk::TaskW< _Weight, _StackSize, _AccessMode >, stk::time::TimerHost::TimerWorkerTask, StkThread, and TaskWrapper.
Referenced by stk::Kernel< stk::KERNEL_DYNAMIC|stk::KERNEL_SYNC|stk::KERNEL_TICKLESS, 16U, stk::SwitchStrategyFP32, stk::PlatformDefault >::AllocateNewTask(), GetStackSpace(), stk::Kernel< stk::KERNEL_DYNAMIC|stk::KERNEL_SYNC|stk::KERNEL_TICKLESS, 16U, stk::SwitchStrategyFP32, stk::PlatformDefault >::StateSwitch(), and stk::Kernel< stk::KERNEL_DYNAMIC|stk::KERNEL_SYNC|stk::KERNEL_TICKLESS, 16U, stk::SwitchStrategyFP32, stk::PlatformDefault >::StateWake().
|
pure virtualinherited |
Get number of elements of the stack memory array.
Implemented in FrtosTask, stk::StackMemoryWrapper< _StackSize >, stk::StackMemoryWrapper< STACK_SIZE_MIN >, stk::StackMemoryWrapper<((32U))>, stk::Task< _StackSize, _AccessMode >, stk::TaskW< _Weight, _StackSize, _AccessMode >, stk::time::TimerHost::TimerWorkerTask, StkThread, and TaskWrapper.
Referenced by GetStackSpace().
|
pure virtualinherited |
Get size of the memory in bytes.
Implemented in FrtosTask, stk::StackMemoryWrapper< _StackSize >, stk::StackMemoryWrapper< STACK_SIZE_MIN >, stk::StackMemoryWrapper<((32U))>, stk::Task< _StackSize, _AccessMode >, stk::TaskW< _Weight, _StackSize, _AccessMode >, stk::time::TimerHost::TimerWorkerTask, StkThread, and TaskWrapper.
|
inlinevirtualinherited |
Get available stack space.
Definition at line 318 of file stk_common.h.
References stk::ArrayView< T >::GetSize(), GetStack(), GetStackSize(), and STK_STACK_MEMORY_FILLER.
Referenced by FrtosTask::GetStackHighWaterMark(), and osThreadGetStackSpace().
|
inlinevirtual |
Get task trace name set by application.
NULL if unused. Reimplemented in FrtosTask, stk::time::TimerHost::TimerWorkerTask, StkThread, and TaskWrapper.
Definition at line 648 of file stk_common.h.
|
inlinevirtual |
Get static base weight of the task.
Reimplemented in FrtosTask, stk::TaskW< _Weight, _StackSize, _AccessMode >, stk::time::TimerHost::TimerWorkerTask, StkThread, and TaskWrapper.
Definition at line 635 of file stk_common.h.
References stk::DEFAULT_WEIGHT.
Referenced by stk::ISyncObject::FindWeightHigherThan().
|
inlinevirtual |
Called by the scheduler if deadline of the task is missed when Kernel is operating in Hard Real-Time mode (see stk::KERNEL_HRT).
| [in] | duration | Elapsed active time in ticks at the point the deadline was detected. Always greater than the task's configured deadline (ticks). |
Reimplemented in FrtosTask, stk::time::TimerHost::TimerWorkerTask, StkThread, and TaskWrapper.
Definition at line 618 of file stk_common.h.
References STK_UNUSED.
|
inlinevirtual |
Called by the kernel before removal from the scheduling (see stk::KERNEL_DYNAMIC).
Reimplemented in FrtosTask, stk::time::TimerHost::TimerWorkerTask, StkThread, and TaskWrapper.
Definition at line 628 of file stk_common.h.
|
pure virtual |
Entry point of the user task.
Kernel is configured as KERNEL_STATIC, the body must contain an infinite loop. Implemented in FrtosTask, stk::time::TimerHost::TimerWorkerTask, StkThread, and TaskWrapper.