F´ Flight Software - C/C++ Documentation NASA-v1.6.0
A framework for building embedded system applications to NASA flight quality standards.
|
forward declaration More...
#include <Os/Task.hpp>
Classes | |
struct | TaskRoutineWrapper |
Public Types | |
enum | TaskStatus { TASK_OK , TASK_INVALID_PARAMS , TASK_INVALID_STACK , TASK_UNKNOWN_ERROR , TASK_INVALID_AFFINITY , TASK_DELAY_ERROR , TASK_JOIN_ERROR , TASK_ERROR_RESOURCES , TASK_ERROR_PERMISSION } |
typedef void(* | taskRoutine) (void *ptr) |
prototype for task routine started in task context | |
Public Member Functions | |
Task () | |
constructor | |
virtual | ~Task () |
destructor | |
TaskStatus | start (const Fw::StringBase &name, taskRoutine routine, void *arg, NATIVE_UINT_TYPE priority=TASK_DEFAULT, NATIVE_UINT_TYPE stackSize=TASK_DEFAULT, NATIVE_UINT_TYPE cpuAffinity=TASK_DEFAULT, NATIVE_UINT_TYPE identifier=TASK_DEFAULT) |
start the task | |
DEPRECATED (TaskStatus start(const Fw::StringBase &name, NATIVE_INT_TYPE identifier, NATIVE_INT_TYPE priority, NATIVE_INT_TYPE stackSize, taskRoutine routine, void *arg, NATIVE_INT_TYPE cpuAffinity=static_cast< NATIVE_INT_TYPE >(TASK_DEFAULT)), "Please switch to start(Fw::StringBase &name, taskRoutine routine, void* arg, NATIVE_UINT_TYPE priority, NATIVE_UINT_TYPE stackSize, NATIVE_UINT_TYPE cpuAffinity, NATIVE_UINT_TYPE identifier)") | |
start the task | |
I32 | getIdentifier () |
get the identifier for the task | |
TaskStatus | join (void **value_ptr) |
Wait for task to finish. | |
void | suspend (bool onPurpose=false) |
suspend task | |
void | resume () |
resume execution of task | |
bool | wasSuspended () |
returns whether or not task was suspended on purpose | |
bool | isSuspended () |
check with OS to see if it is suspended already | |
bool | isStarted () |
check to see if task is started | |
void | setStarted (bool started) |
set task to started when thread is fully up. Avoids a VxWorks race condition. | |
POINTER_CAST | getRawHandle () |
Static Public Member Functions | |
static TaskId | getOsIdentifier () |
static TaskStatus | delay (NATIVE_UINT_TYPE msecs) |
delay the task | |
static NATIVE_INT_TYPE | getNumTasks () |
static void | registerTaskRegistry (TaskRegistry *registry) |
Static Public Attributes | |
static const NATIVE_UINT_TYPE | TASK_DEFAULT = std::numeric_limits<PlatformUIntType>::max() |
typedef void(* Os::Task::taskRoutine) (void *ptr) |
enum Os::Task::TaskStatus |
|
static |
Os::Task::DEPRECATED | ( | TaskStatus | startconst Fw::StringBase &name, NATIVE_INT_TYPE identifier, NATIVE_INT_TYPE priority, NATIVE_INT_TYPE stackSize, taskRoutine routine, void *arg, NATIVE_INT_TYPE cpuAffinity=static_cast< NATIVE_INT_TYPE >(TASK_DEFAULT), |
"Please switch to start(Fw::StringBase &name, taskRoutine routine, void* arg, NATIVE_UINT_TYPE priority, NATIVE_UINT_TYPE stackSize, NATIVE_UINT_TYPE cpuAffinity, NATIVE_UINT_TYPE identifier)" | |||
) |
start the task
I32 Os::Task::getIdentifier | ( | ) |
get the identifier for the task
Definition at line 17 of file TaskCommon.cpp.
|
static |
Definition at line 12 of file TaskCommon.cpp.
POINTER_CAST Os::Task::getRawHandle | ( | ) |
Returns the task-handle owned by this task
Definition at line 33 of file TaskCommon.cpp.
bool Os::Task::isStarted | ( | ) |
check to see if task is started
Definition at line 21 of file TaskCommon.cpp.
bool Os::Task::isSuspended | ( | ) |
Task::TaskStatus Os::Task::join | ( | void ** | value_ptr | ) |
|
static |
Definition at line 37 of file TaskCommon.cpp.
void Os::Task::setStarted | ( | bool | started | ) |
set task to started when thread is fully up. Avoids a VxWorks race condition.
Definition at line 25 of file TaskCommon.cpp.
Task::TaskStatus Os::Task::start | ( | const Fw::StringBase & | name, |
taskRoutine | routine, | ||
void * | arg, | ||
NATIVE_UINT_TYPE | priority = TASK_DEFAULT , |
||
NATIVE_UINT_TYPE | stackSize = TASK_DEFAULT , |
||
NATIVE_UINT_TYPE | cpuAffinity = TASK_DEFAULT , |
||
NATIVE_UINT_TYPE | identifier = TASK_DEFAULT |
||
) |
void Os::Task::suspend | ( | bool | onPurpose = false | ) |
bool Os::Task::wasSuspended | ( | ) |
returns whether or not task was suspended on purpose
Definition at line 29 of file TaskCommon.cpp.
|
static |