API interface for task Notifications.
More...
|
bool | qOS::core::notify (notifyMode mode, task &Task, void *eventData=nullptr) noexcept |
| Sends a notification generating an asynchronous event. If mode = notifyMode::SIMPLE, the method marks the task as ready for execution and the scheduler planner will launch the task immediately according to the scheduling rules (even if task is disabled) and setting the trigger flag to trigger::byNotificationSimple. If mode = notifyMode::QUEUED, the notification will insert the notification in the FIFO priority queue. The scheduler get this notification as an asynchronous event and the task will be ready for execution according to the queue order (determined by priority), even if task is in a disabled or sleep operational state. When extracted, the scheduler will set trigger flag to trigger::byNotificationQueued. Specific user-data can be passed through, and will be available inside the event_t::EventData field, only in corresponding launch. If the task is in a SLEEP operation state, the scheduler will change the operational state to AWAKEN setting the SHUTDOWN bit. Specific user-data can be passed through, and will be available in the respective callback inside the qOS::event_t::EventData field.
|
|
bool | qOS::core::notify (notifyMode mode, void *eventData=nullptr) noexcept |
| Try to spread a notification among all the tasks in the scheduling scheme.
|
|
bool | qOS::core::hasPendingNotifications (const task &Task) const noexcept |
| Check if the supplied task has pending notifications.
|
|
API interface for task Notifications.
◆ notifyMode
An enum that defines the modes in which a notification can be delivered.
Enumerator |
---|
SIMPLE | To notify a task using the simple approach.
|
QUEUED | To notify a task using the FIFO priority queue.
|
◆ hasPendingNotifications()
bool qOS::core::hasPendingNotifications |
( |
const task & | Task | ) |
const |
|
noexcept |
Check if the supplied task has pending notifications.
- Note
- Operation will be performed in the next scheduling cycle.
- Parameters
-
- Returns
true
if the task has pending notifications, false
if not.
◆ notify() [1/2]
bool qOS::core::notify |
( |
notifyMode | mode, |
|
|
task & | Task, |
|
|
void * | eventData = nullptr ) |
|
noexcept |
Sends a notification generating an asynchronous event. If mode = notifyMode::SIMPLE, the method marks the task as ready for execution and the scheduler planner will launch the task immediately according to the scheduling rules (even if task is disabled) and setting the trigger
flag to trigger::byNotificationSimple. If mode = notifyMode::QUEUED, the notification will insert the notification in the FIFO priority queue. The scheduler get this notification as an asynchronous event and the task will be ready for execution according to the queue order (determined by priority), even if task is in a disabled or sleep operational state. When extracted, the scheduler will set trigger
flag to trigger::byNotificationQueued. Specific user-data can be passed through, and will be available inside the event_t::EventData field, only in corresponding launch. If the task is in a SLEEP
operation state, the scheduler will change the operational state to AWAKEN
setting the SHUTDOWN
bit. Specific user-data can be passed through, and will be available in the respective callback inside the qOS::event_t::EventData field.
- Parameters
-
- Returns
true
on success. Otherwise false
.
◆ notify() [2/2]
bool qOS::core::notify |
( |
notifyMode | mode, |
|
|
void * | eventData = nullptr ) |
|
noexcept |
Try to spread a notification among all the tasks in the scheduling scheme.
- Note
- Operation will be performed in the next scheduling cycle.
- Parameters
-
- Returns
true
if success. false
if any other spread operation is in progress.