OS  v1.7.5
Documentation
Loading...
Searching...
No Matches
qOS::event_t Class Reference

The task argument with all the regarding information of the task execution. More...

#include <task.hpp>

Public Member Functions

bool firstCall (void) const noexcept
 Checks whether the task is running for the first time. Can be used for data initialization purposes.
 
bool firstIteration (void) const noexcept
 Checks whether the current pass is the first iteration of the task. The value returned by this method will be only true when time-elapsed events occurs and the Iteration counter has been parameterized. Asynchronous events never change the task iteration counter, consequently doesn't have effect in this flag.
 
bool lastIteration (void) const noexcept
 Checks whether the current pass is the last iteration of the task. The value returned by this method will be only true when time-elapsed events occurs and the Iteration counter has been parameterized. Asynchronous events never change the task iteration counter, consequently doesn't have effect in the value returned by this method.
 
trigger getTrigger (void) const noexcept
 Get the event source that triggers the task execution. Possible values are described in the qOS::trigger enum.
 
clock_t startDelay (void) const noexcept
 return the number of epochs between current system time and point in time when the task was marked as READY. Can be used to keep track when current task's execution took place relative to when it was scheduled A value of 0 (zero) indicates that task started right on time per schedule.This parameter will be only available on timed tasks. when qOS::trigger == trigger::byTimeElapsed
 
taskthisTask (void) noexcept
 return the current task node being evaluated
 

Public Attributes

void * TaskData
 Task arguments defined at the time of its creation. (Storage-Pointer)
 
void * EventData
 Associated data of the event. Specific data will reside here according to the event source. This field will have a nullptr value when the trigger gets one of this values: trigger::byTimeElapsed, trigger::byEventFlags and trigger::byNoReadyTasks.
 

Detailed Description

The task argument with all the regarding information of the task execution.

Note
Should be used only inside task-callbacks as the only input argument.

Member Function Documentation

◆ firstCall()

bool qOS::event_t::firstCall ( void ) const
inlinenoexcept

Checks whether the task is running for the first time. Can be used for data initialization purposes.

◆ firstIteration()

bool qOS::event_t::firstIteration ( void ) const
inlinenoexcept

Checks whether the current pass is the first iteration of the task. The value returned by this method will be only true when time-elapsed events occurs and the Iteration counter has been parameterized. Asynchronous events never change the task iteration counter, consequently doesn't have effect in this flag.

◆ getTrigger()

trigger qOS::event_t::getTrigger ( void ) const
inlinenoexcept

Get the event source that triggers the task execution. Possible values are described in the qOS::trigger enum.

◆ lastIteration()

bool qOS::event_t::lastIteration ( void ) const
inlinenoexcept

Checks whether the current pass is the last iteration of the task. The value returned by this method will be only true when time-elapsed events occurs and the Iteration counter has been parameterized. Asynchronous events never change the task iteration counter, consequently doesn't have effect in the value returned by this method.

◆ startDelay()

clock_t qOS::event_t::startDelay ( void ) const
inlinenoexcept

return the number of epochs between current system time and point in time when the task was marked as READY. Can be used to keep track when current task's execution took place relative to when it was scheduled A value of 0 (zero) indicates that task started right on time per schedule.This parameter will be only available on timed tasks. when qOS::trigger == trigger::byTimeElapsed

◆ thisTask()

task & qOS::event_t::thisTask ( void )
inlinenoexcept

return the current task node being evaluated

Member Data Documentation

◆ EventData

void* qOS::event_t::EventData

Associated data of the event. Specific data will reside here according to the event source. This field will have a nullptr value when the trigger gets one of this values: trigger::byTimeElapsed, trigger::byEventFlags and trigger::byNoReadyTasks.

◆ TaskData

void* qOS::event_t::TaskData

Task arguments defined at the time of its creation. (Storage-Pointer)