SuperTinyKernel™ RTOS 1.05.3
Lightweight, high-performance, deterministic, bare-metal C++ RTOS for resource-constrained embedded systems. MIT Open Source License.
Loading...
Searching...
No Matches
stk::Kernel< TMode, TSize, TStrategy, TPlatform >::KernelTask::HrtInfo Class Reference

Per-task Hard Real-Time (HRT) scheduling metadata. More...

#include <stk.h>

Public Member Functions

 HrtInfo ()
void Clear ()
 Clear all fields, ready for slot re-use or re-activation.

Public Attributes

Timeout periodicity
 Activation period in ticks: the task is re-activated every this many ticks.
Timeout deadline
 Maximum allowed active duration in ticks (relative to switch-in). Exceeding this triggers OnDeadlineMissed().
Timeout duration
 Ticks spent in the active (non-sleeping) state in the current period. Incremented by UpdateTaskState(); reset to 0 on switch-out.
volatile bool done
 Set to true when the task signals work completion (via Yield() or on exit). Triggers HrtOnSwitchedOut() at the next context switch.

Detailed Description

template<uint8_t TMode, uint32_t TSize, class TStrategy, class TPlatform>
class stk::Kernel< TMode, TSize, TStrategy, TPlatform >::KernelTask::HrtInfo

Per-task Hard Real-Time (HRT) scheduling metadata.

Note
Allocated only when TMode includes KERNEL_HRT. Zero-size in SRT mode.

Definition at line 317 of file stk.h.

Constructor & Destructor Documentation

◆ HrtInfo()

template<uint8_t TMode, uint32_t TSize, class TStrategy, class TPlatform>
stk::Kernel< TMode, TSize, TStrategy, TPlatform >::KernelTask::HrtInfo::HrtInfo ( )
inline

Definition at line 319 of file stk.h.

319 : periodicity(0), deadline(0), duration(0), done(false)
320 {}
volatile bool done
Set to true when the task signals work completion (via Yield() or on exit). Triggers HrtOnSwitchedOut...
Definition stk.h:335
Timeout deadline
Maximum allowed active duration in ticks (relative to switch-in). Exceeding this triggers OnDeadlineM...
Definition stk.h:333
Timeout periodicity
Activation period in ticks: the task is re-activated every this many ticks.
Definition stk.h:332
Timeout duration
Ticks spent in the active (non-sleeping) state in the current period. Incremented by UpdateTaskState(...
Definition stk.h:334

References deadline, done, duration, and periodicity.

Member Function Documentation

◆ Clear()

template<uint8_t TMode, uint32_t TSize, class TStrategy, class TPlatform>
void stk::Kernel< TMode, TSize, TStrategy, TPlatform >::KernelTask::HrtInfo::Clear ( )
inline

Clear all fields, ready for slot re-use or re-activation.

Definition at line 324 of file stk.h.

325 {
326 periodicity = 0;
327 deadline = 0;
328 duration = 0;
329 done = false;
330 }

References deadline, done, duration, and periodicity.

Member Data Documentation

◆ deadline

template<uint8_t TMode, uint32_t TSize, class TStrategy, class TPlatform>
Timeout stk::Kernel< TMode, TSize, TStrategy, TPlatform >::KernelTask::HrtInfo::deadline

Maximum allowed active duration in ticks (relative to switch-in). Exceeding this triggers OnDeadlineMissed().

Definition at line 333 of file stk.h.

Referenced by Clear(), and HrtInfo().

◆ done

template<uint8_t TMode, uint32_t TSize, class TStrategy, class TPlatform>
volatile bool stk::Kernel< TMode, TSize, TStrategy, TPlatform >::KernelTask::HrtInfo::done

Set to true when the task signals work completion (via Yield() or on exit). Triggers HrtOnSwitchedOut() at the next context switch.

Definition at line 335 of file stk.h.

Referenced by Clear(), and HrtInfo().

◆ duration

template<uint8_t TMode, uint32_t TSize, class TStrategy, class TPlatform>
Timeout stk::Kernel< TMode, TSize, TStrategy, TPlatform >::KernelTask::HrtInfo::duration

Ticks spent in the active (non-sleeping) state in the current period. Incremented by UpdateTaskState(); reset to 0 on switch-out.

Definition at line 334 of file stk.h.

Referenced by Clear(), and HrtInfo().

◆ periodicity

template<uint8_t TMode, uint32_t TSize, class TStrategy, class TPlatform>
Timeout stk::Kernel< TMode, TSize, TStrategy, TPlatform >::KernelTask::HrtInfo::periodicity

Activation period in ticks: the task is re-activated every this many ticks.

Definition at line 332 of file stk.h.

Referenced by Clear(), and HrtInfo().


The documentation for this class was generated from the following file: