|
Page date Wed Feb 23 13:41:09 2011 . | Improve this page |
OSTask
== OSTask(const char *pName, const OSStack_t *pStack, unsigned short stackSize, OSTaskPriority_t priority = OSTask::DEFAULT_PRIORITY) == Description
Initialize the task object with the list of parameters received.
Parameters
:* pName - name of the task.
:* pStack - pointer to the memory region used by this task as stack.
:* stackSize - the size of the stack.
:* priority - task’s priority.
Return value
:* none
Description
Initialize the task object with the list of parameters received.
Parameters
:* pName - name of the task.
:* entryPoint - pointer to the function executed by this task.
:* pStack - pointer to the memory region used by this task as stack.
:* stackSize - the size of the stack.
:* priority - task’s priority.
Return value
:* none
Description
Destroy this object.
Parameters
:* none
Return value
:* none
Description
Main function task, overridden by actual implementation. This function is used if no entryPoint is registered (see the constructors section).
Parameters
:* none
Return value
:* none
Description
Suspend the task and remove it from the ready list.
Parameters
:* none
Return value
:* none
Description
Resume the task, previously suspended by inserting it into the ready list.
Parameters
:* none
Return value
:* none
Description
Check if the task is suspended.
Parameters
:* none
Return value
:* TRUE if the task is suspended.
Description
Check if the task is waiting on an event.
Parameters
:* none
Return value
:* TRUE if the task is waiting.
Description
Set the virtual watchdog expire interval (in seconds). It requires the definition of OS_INCLUDE_OSTASK_VIRTUALWATCHDOG.
Parameters
:* seconds - the interval expressed in seconds
Return value
:* none
Description
If the virtual watchdog interval expires, the MCU is reset using the hardware module watchdog. It requires the definition of OS_INCLUDE_OSTASK_VIRTUALWATCHDOG.
Parameters
:* none
Return value
:* none
Description
Return TRUE if the task can go to sleep, FALSE otherwise. It is required the definition of OS_INCLUDE_OSTASK_SLEEP.
Parameters
:* none
Return value
:* TRUE if the task can go to sleep.
Description
Return the task name.
Parameters
:* none
Return value
:* Task’s name.
Description
Return the address of the stack bottom. Stack grows from high address to low address, so this is the maximum address the stack can grow.
Parameters
:* none
Return value
:* The address of the bottom of the stack.
Description
Return the current stack pointer of the task. This value is stored only during context switch, so the running task will not get the actual value.
Parameters
:* none
Return value
:* The address of the current stack pointer of the task.
Description
Return the stack size given at task creation.
Parameters
:* none
Return value
:* The stack size.
Description
Return the task ID.
Parameters
:* none
Return value
:* The task ID.
Description
Return the task’s context.
Parameters
:* none
Return value
:* The task context.
Description
Return task priority. Higher means better priority.
Parameters
:* none
Return value
:* The task priority.
Description
Set task priority.
Parameters
:* none
Return value
:* none
Description
Return the event the task is waiting for. Cancelling a waiting task can be done by notifying this event with a return value of OS_EVENT_WAIT_RETURN_CANCELED.
Parameters
:* none
Return value
:* The event the task is waiting for.
Description
Set the event the task is waiting for.
Parameters
:* event - the event the task is waiting for.
Return value
:* none
Description
Return the maximum usage of the stack, in bytes.
Parameters
:* none
Return value
:* The maximum usage of the stack, in bytes.
Description
Allow task to be put to sleep.
Parameters
:* status - if is TRUE the task can be put at sleep.
Return value
:* none
== int eventNotify(OSEvent_t event, OSEventWaitReturn_t ret = OSEventWaitReturn::OS_VOID) == Description
Wake up this task if it waits for the event received as parameter.
Parameters
:* event - the event used to wake up the tasks.
:* ret - suplimentary information used to determine more informations about the source of the event.
Return value
:* none
Description
The SP is saved in this variable at contextSave and restored from here at contextRestore.