API interface for the built-in-task Event Flags.
More...
|
using | qOS::taskFlag_t |
| A 32-bit unsigned integer type to hold the task flags.
|
|
API interface for the built-in-task Event Flags.
◆ taskFlag_t
A 32-bit unsigned integer type to hold the task flags.
◆ EVENT_FLAG()
Event flag selector function.
- Parameters
-
[in] | i | The 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] | Task | The task node. |
[in] | flagsToCheck | A 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] | clearOnExit | If 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] | checkForAll | Used 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] | Task | The task node. |
[in] | tFlags | The flags to modify. Can be combined with a bitwise OR. EVENT_FLAG(1) | EVENT_FLAG(2) | ... | EVENT_FLAG(20) |
[in] | action | true to set the flags or false to clear them. |
- Returns
true
on success. Otherwise return false
.
◆ eventFlagsRead()
Returns the current value of the task's EventFlags.
- Parameters
-
- Returns
- The EventFlag value of the task.