OS  v7.3.3
Documentation
Loading...
Searching...
No Matches

API interface for task Notifications. More...

Collaboration diagram for Notifications:

Enumerations

enum  qTask_NotifyMode_t { qTask_NotifyNULL , qTask_NotifySimple , qTask_NotifyQueued }
 An enum that defines the modes in which a notification can be spread. More...
 
enum  qTask_ClrParam_t {
  qTask_ClearIterations , qTask_ClearTimeElapsed , qTask_ClearCycles , qTask_ClearSimpleNotifications ,
  qTask_ClearQueuedNotifications , qTask_ClearNotifications
}
 An enum that defines the parameters than can be cleared for a task. More...
 

Functions

qBool_t qOS_Notification_Spread (void *eventData, const qTask_NotifyMode_t mode)
 Try to spread a notification among all the tasks in the scheduling scheme.
 
qBool_t qTask_Notification_Send (qTask_t *const Task, void *eventData)
 Sends a simple notification generating an asynchronous event. This method marks the task as ready for execution, therefore, the planner will launch the task immediately according to the scheduling rules (even if task is disabled) and setting the qEvent_t::Trigger flag to byNotificationSimple. Specific user-data can be passed through, and will be available in the respective callback inside the qEvent_t::EventData field.
 
qBool_t qTask_Notification_Queue (qTask_t *const Task, void *eventData)
 Insert a notification in the FIFO priority queue. The scheduler get this notification as an asynchronous event, therefor, 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 qEvent_t::Trigger flag to byNotificationQueued. Specific user-data can be passed through, and will be available inside the qEvent_t::EventData field, only in corresponding launch. If the task is in a qSleep operation state, the scheduler will change the operational state to qAwaken setting the SHUTDOWN bit.
 
qBool_t qTask_HasPendingNotifications (const qTask_t *const Task)
 Check if the task has pending notifications.
 

Detailed Description

API interface for task Notifications.

Enumeration Type Documentation

◆ qTask_ClrParam_t

An enum that defines the parameters than can be cleared for a task.

Enumerator
qTask_ClearIterations 

To clear the number of iterations performed by the task.

qTask_ClearTimeElapsed 

To clear the time elapsed by the task.

qTask_ClearCycles 

To clear the number of cycles performed by the task.

qTask_ClearSimpleNotifications 

To clear the notification value.

qTask_ClearQueuedNotifications 

To clear all queued notifications.

qTask_ClearNotifications 

To clear all notifications, simple and queued.

◆ qTask_NotifyMode_t

An enum that defines the modes in which a notification can be spread.

Enumerator
qTask_NotifyNULL 

Do not use this value. Used only internally.

qTask_NotifySimple 

To notify a task using the simple approach.

qTask_NotifyQueued 

To notify a task using the FIFO priority queue.

Function Documentation

◆ qOS_Notification_Spread()

qBool_t qOS_Notification_Spread ( void * eventData,
const qTask_NotifyMode_t mode )

Try to spread a notification among all the tasks in the scheduling scheme.

Note
Operation will be performed in the next scheduling cycle.
See also
qTask_Notification_Send(), qTask_Notification_Queue()
Parameters
[in]eventDataSpecific event user-data.
[in]modethe method used to spread the event: qTask_NotifySimple or qTask_NotifyQueued.
Returns
qTrue if success. qFalse if any other spread operation is in progress.

◆ qTask_HasPendingNotifications()

qBool_t qTask_HasPendingNotifications ( const qTask_t *const Task)

Check if the task has pending notifications.

Parameters
[in]TaskPointer to the task node.
Returns
qTrue if the function asserts, otherwise returns qFalse.

◆ qTask_Notification_Queue()

qBool_t qTask_Notification_Queue ( qTask_t *const Task,
void * eventData )

Insert a notification in the FIFO priority queue. The scheduler get this notification as an asynchronous event, therefor, 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 qEvent_t::Trigger flag to byNotificationQueued. Specific user-data can be passed through, and will be available inside the qEvent_t::EventData field, only in corresponding launch. If the task is in a qSleep operation state, the scheduler will change the operational state to qAwaken setting the SHUTDOWN bit.

See also
qTask_Notification_Send(), qOS_Notification_Spread()
Parameters
[in]TaskPointer to the task node.
[in]eventDataSpecific event user-data.
Returns
Returns qTrue if the event has been inserted in the queue, or qFalse if an error occurred (The queue exceeds the size).

◆ qTask_Notification_Send()

qBool_t qTask_Notification_Send ( qTask_t *const Task,
void * eventData )

Sends a simple notification generating an asynchronous event. This method marks the task as ready for execution, therefore, the planner will launch the task immediately according to the scheduling rules (even if task is disabled) and setting the qEvent_t::Trigger flag to byNotificationSimple. Specific user-data can be passed through, and will be available in the respective callback inside the qEvent_t::EventData field.

See also
qTask_Notification_Queue(), qOS_Notification_Spread()
Parameters
[in]TaskPointer to the task node.
[in]eventDataSpecific event user-data.
Returns
qTrue on success. Otherwise qFalse.