![]() |
SuperTinyKernel™ RTOS 1.06.0
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)=0 |
| 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 ()=0 |
| Called by the kernel before removal from the scheduling (see stk::KERNEL_DYNAMIC). | |
| virtual int32_t | GetWeight () const =0 |
| Get static base weight of the task. | |
| virtual TId | GetId () const =0 |
| Get task Id set by application. | |
| virtual const char * | GetTraceName () const =0 |
| Get task trace name set by application. | |
| virtual 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 () |
| Get available stack space. | |
Interface for a user task.
Usage example:
Definition at line 490 of file stk_common.h.
|
pure virtual |
Get hardware access mode of the user task.
Implemented in 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().
|
pure virtual |
Get task Id set by application.
Implemented in 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().
|
pure virtualinherited |
Get pointer to the stack memory.
Implemented in 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, 16U, stk::SwitchStrategyFP32, stk::PlatformDefault >::AllocateNewTask(), GetStackSpace(), stk::Kernel< stk::KERNEL_DYNAMIC|stk::KERNEL_SYNC, 16U, stk::SwitchStrategyFP32, stk::PlatformDefault >::StateSwitch(), and stk::Kernel< stk::KERNEL_DYNAMIC|stk::KERNEL_SYNC, 16U, stk::SwitchStrategyFP32, stk::PlatformDefault >::StateWake().
|
pure virtualinherited |
Get number of elements of the stack memory array.
Implemented in 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 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 252 of file stk_common.h.
References GetStack(), GetStackSize(), and STK_STACK_MEMORY_FILLER.
Referenced by osThreadGetStackSpace().
|
pure virtual |
Get task trace name set by application.
NULL if unused. Implemented in stk::Task< _StackSize, _AccessMode >, stk::TaskW< _Weight, _StackSize, _AccessMode >, stk::time::TimerHost::TimerWorkerTask, StkThread, and TaskWrapper.
|
pure virtual |
Get static base weight of the task.
Implemented in stk::Task< _StackSize, _AccessMode >, stk::TaskW< _Weight, _StackSize, _AccessMode >, stk::time::TimerHost::TimerWorkerTask, StkThread, and TaskWrapper.
|
pure virtual |
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). |
Implemented in stk::Task< _StackSize, _AccessMode >, stk::TaskW< _Weight, _StackSize, _AccessMode >, stk::time::TimerHost::TimerWorkerTask, StkThread, and TaskWrapper.
|
pure virtual |
Called by the kernel before removal from the scheduling (see stk::KERNEL_DYNAMIC).
Implemented in 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, 16U, stk::SwitchStrategyFP32, stk::PlatformDefault >::RemoveTask().
|
pure virtual |
Entry point of the user task.
Kernel is configured as KERNEL_STATIC, the body must contain an infinite loop. Implemented in stk::time::TimerHost::TimerWorkerTask, StkThread, and TaskWrapper.