FreeRTOScpp
|
Statically Created Task Wrapper. More...
#include <TaskCPP.h>
Public Member Functions | |
TaskS (char const *name, void(*taskfun)(void *), TaskPriority priority_, void *myParm=0) | |
Constructor. | |
TaskHandle_t | getTaskHandle () const |
Get Task Handle. | |
bool | give () |
Notify a Task as a semaphore. | |
void | give_ISR (portBASE_TYPE &waswoken) |
bool | notify (uint32_t value, eNotifyAction act) |
Notify a Task. | |
bool | notify_ISR (uint32_t value, eNotifyAction act, portBASE_TYPE &waswoken) |
bool | notify_query (uint32_t value, eNotifyAction act, uint32_t &old) |
bool | notify_query_ISR (uint32_t value, eNotifyAction act, uint32_t &old, portBASE_TYPE &waswoken) |
void | priority (TaskPriority priority_) |
Set Task priority. | |
void | resume () |
Resume the Task. | |
void | suspend () |
Suspend the Task. | |
Static Public Member Functions | |
static void | delay (TickType_t time) |
Delay for a period of time. | |
static uint32_t | take (bool clear=true, TickType_t ticks=portMAX_DELAY) |
Wait for a task Give notification. | |
static uint32_t | wait (uint32_t clearEnter, uint32_t clearExit=0xFFFFFFFF, uint32_t *value=nullptr, TickType_t ticks=portMAX_DELAY) |
Wait for task notification. | |
Protected Attributes | |
TaskHandle_t | taskHandle |
Handle for the task we are managing. | |
Statically Created Task Wrapper.
Create the specified task with a provided task function.
stackDepth | Size of the stack to give to the task |
If the Task object is destroyed, the class will be deleted (if deletion has been enabled)
|
inline |
Constructor.
name | The name of the task. |
taskfun | The function implementing the task, should have type void (*taskfun)(void *) |
priority_ | The priority of the task. Use the TaskPriority enum values or a related value converted to a TaskPriority |
myParm | the parameter passed to taskFun. Defaults to NULL. |
Upon construction the task will be created.
|
inlinestaticinherited |
Delay for a period of time.
time | the number of ticks to delay |
This is a static member function as it affects the CALLING task, not the task it might be called on
|
inlineinherited |
Get Task Handle.
|
inlineinherited |
Notify a Task as a semaphore.
Sends a notification to a task using a semaphore based protocol. Generally the task should we using the take() function to receive the notification.
Referenced by TaskClassS< stackDepth >::TaskClassS().
|
inlineinherited |
|
inlineinherited |
Notify a Task.
Generic Task Notification operation
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
Set Task priority.
Only available if INCLUDE_vTaskPrioritySet == 1
priority_ | The TaskPriority to give the Task. |
|
inlineinherited |
Resume the Task.
Only available if INCLUDE_vTaskSuspend == 1
|
inlineinherited |
Suspend the Task.
Only available if INCLUDE_vTaskSuspend == 1
|
inlinestaticinherited |
Wait for a task Give notification.
Specialized wait() designed to work with the give()/give_ISR() notifications.
clear | Flag to indicate if the action on succesful take is to clear (True) or decrement (False) the notification value. Effectively decides between a binary (True) or counting (False) semaphore behavior. |
ticks | The time to wait for the semaphore. |
Referenced by taskcpp_task_thunk().
|
inlinestaticinherited |
Wait for task notification.
|
protectedinherited |
Handle for the task we are managing.