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 288 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 290 of file stk.h.

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

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 295 of file stk.h.

296 {
297 periodicity = 0;
298 deadline = 0;
299 duration = 0;
300 done = false;
301 }

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 304 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 306 of file stk.h.

Referenced by Clear(), HrtInfo(), and stk::Kernel< TMode, TSize, TStrategy, TPlatform >::StateSwitch().

◆ 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 305 of file stk.h.

Referenced by Clear(), HrtInfo(), and stk::Kernel< TMode, TSize, TStrategy, TPlatform >::UpdateTaskState().

◆ 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 303 of file stk.h.

Referenced by Clear(), and HrtInfo().


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