OS  v1.7.5
Documentation
Loading...
Searching...
No Matches

API interface for the built-in-task Event Flags. More...

Collaboration diagram for Event Flags:

Typedefs

using qOS::taskFlag_t
 A 32-bit unsigned integer type to hold the task flags.
 

Functions

constexpr taskFlag_t qOS::EVENT_FLAG (index_t i)
 Event flag selector function.
 
bool qOS::core::eventFlagsModify (task &Task, const taskFlag_t tFlags, const bool action) noexcept
 Modify the EventFlags for the provided task.
 
taskFlag_t qOS::core::eventFlagsRead (task &Task) const noexcept
 Returns the current value of the task's EventFlags.
 
bool qOS::core::eventFlagsCheck (task &Task, taskFlag_t flagsToCheck, const bool clearOnExit=true, const bool checkForAll=false) noexcept
 Check for flags set to true inside the task Event-Flags.
 

Detailed Description

API interface for the built-in-task Event Flags.

Typedef Documentation

◆ taskFlag_t

A 32-bit unsigned integer type to hold the task flags.

Function Documentation

◆ EVENT_FLAG()

taskFlag_t qOS::EVENT_FLAG ( index_t i)
constexpr

Event flag selector function.

Parameters
[in]iThe desired event-flag, a value between 1 and 20
Returns
The event flag mask identifier.

◆ eventFlagsCheck()

bool qOS::core::eventFlagsCheck ( task & Task,
taskFlag_t flagsToCheck,
const bool clearOnExit = true,
const bool checkForAll = false )
noexcept

Check for flags set to true inside the task Event-Flags.

Parameters
[in]TaskThe task node.
[in]flagsToCheckA bitwise value that indicates the flags to test inside the EventFlags. Can be combined with a bitwise OR. EVENT_FLAG(1) | EVENT_FLAG(2) | ... | EVENT_FLAG(20)
[in]clearOnExitIf is set to true then any flags set in the value passed as the FlagsToCheck parameter will be cleared in the event group before this function returns only when the condition is meet.
[in]checkForAllUsed to create either a logical AND test (where all flags must be set) or a logical OR test (where one or more flags must be set) as follows:

If is set to true, this API will return true when either all the flags set in the value passed as the flagsToCheck parameter are set in the task's EventFlags.

If is set to false, this API will return true when any of the flags set in the value passed as the flagsToCheck parameter are set in the task's EventFlags.

Returns
true if the condition is meet, otherwise return false.

◆ eventFlagsModify()

bool qOS::core::eventFlagsModify ( task & Task,
const taskFlag_t tFlags,
const bool action )
noexcept

Modify the EventFlags for the provided task.

Note
Any EventFlag set will cause a task activation.
Parameters
[in]TaskThe task node.
[in]tFlagsThe flags to modify. Can be combined with a bitwise OR. EVENT_FLAG(1) | EVENT_FLAG(2) | ... | EVENT_FLAG(20)
[in]actiontrue to set the flags or false to clear them.
Returns
true on success. Otherwise return false.

◆ eventFlagsRead()

taskFlag_t qOS::core::eventFlagsRead ( task & Task) const
noexcept

Returns the current value of the task's EventFlags.

Parameters
TaskThe task node.
Returns
The EventFlag value of the task.