Lowest Level Wrapper.
More...
#include <TaskCPP.h>
|
| TaskBase (TaskHandle_t handle) |
| Constructor.
|
|
virtual | ~TaskBase () |
| Destructor.
|
|
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 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.
|
|
|
| TaskBase () |
| Default Constructor: Needs a subclass to fill in the handle later, so protected.
|
|
|
TaskHandle_t | taskHandle |
| Handle for the task we are managing.
|
|
Lowest Level Wrapper.
Create the specified task with a provided task function.
If the TaskBase object is destroyed, the FreeRTOS Task will be deleted (if deletion has been enabled)
- Todo
- Fully implement task manipulation functions
◆ TaskBase() [1/3]
Default Constructor: Needs a subclass to fill in the handle later, so protected.
◆ TaskBase() [2/3]
TaskBase::TaskBase |
( |
TaskHandle_t | handle | ) |
|
|
inline |
◆ ~TaskBase()
virtual TaskBase::~TaskBase |
( |
| ) |
|
|
inlinevirtual |
Destructor.
If deletion is enabled, delete the task.
◆ TaskBase() [3/3]
◆ delay()
static void TaskBase::delay |
( |
TickType_t | time | ) |
|
|
inlinestatic |
Delay for a period of time.
- Parameters
-
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
◆ getTaskHandle()
TaskHandle_t TaskBase::getTaskHandle |
( |
| ) |
const |
|
inline |
Get Task Handle.
- Returns
- the task handle.
◆ give()
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().
◆ give_ISR()
void TaskBase::give_ISR |
( |
portBASE_TYPE & | waswoken | ) |
|
|
inline |
◆ notify()
bool TaskBase::notify |
( |
uint32_t | value, |
|
|
eNotifyAction | act ) |
|
inline |
Notify a Task.
Generic Task Notification operation
◆ notify_ISR()
bool TaskBase::notify_ISR |
( |
uint32_t | value, |
|
|
eNotifyAction | act, |
|
|
portBASE_TYPE & | waswoken ) |
|
inline |
◆ notify_query()
bool TaskBase::notify_query |
( |
uint32_t | value, |
|
|
eNotifyAction | act, |
|
|
uint32_t & | old ) |
|
inline |
◆ notify_query_ISR()
bool TaskBase::notify_query_ISR |
( |
uint32_t | value, |
|
|
eNotifyAction | act, |
|
|
uint32_t & | old, |
|
|
portBASE_TYPE & | waswoken ) |
|
inline |
◆ operator=()
void TaskBase::operator= |
( |
TaskBase const & | | ) |
|
|
privatedelete |
◆ priority()
Set Task priority.
Only available if INCLUDE_vTaskPrioritySet == 1
- Parameters
-
priority_ | The TaskPriority to give the Task. |
◆ resume()
void TaskBase::resume |
( |
| ) |
|
|
inline |
Resume the Task.
Only available if INCLUDE_vTaskSuspend == 1
◆ suspend()
void TaskBase::suspend |
( |
| ) |
|
|
inline |
Suspend the Task.
Only available if INCLUDE_vTaskSuspend == 1
◆ take()
static uint32_t TaskBase::take |
( |
bool | clear = true, |
|
|
TickType_t | ticks = portMAX_DELAY ) |
|
inlinestatic |
Wait for a task Give notification.
Specialized wait() designed to work with the give()/give_ISR() notifications.
- Parameters
-
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. |
- Returns
- Returns the notification word (prior to being adjusted for the take() ), Will be zero if the take() timed out.
Referenced by taskcpp_task_thunk().
◆ wait()
static uint32_t TaskBase::wait |
( |
uint32_t | clearEnter, |
|
|
uint32_t | clearExit = 0xFFFFFFFF, |
|
|
uint32_t * | value = nullptr, |
|
|
TickType_t | ticks = portMAX_DELAY ) |
|
inlinestatic |
Wait for task notification.
◆ taskHandle
TaskHandle_t TaskBase::taskHandle |
|
protected |
Handle for the task we are managing.
The documentation for this class was generated from the following file: