44 "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)");
52 void suspend(
bool onPurpose =
false);
74 bool m_suspendedOnPurpose;
PlatformPointerCastType POINTER_CAST
PlatformIntType NATIVE_INT_TYPE
PlatformUIntType NATIVE_UINT_TYPE
C++-compatible configuration header for fprime configuration.
bool wasSuspended()
returns whether or not task was suspended on purpose
static TaskStatus delay(NATIVE_UINT_TYPE msecs)
delay the task
I32 getIdentifier()
get the identifier for the task
virtual ~Task()
destructor
bool isSuspended()
check with OS to see if it is suspended already
void suspend(bool onPurpose=false)
suspend task
static const NATIVE_UINT_TYPE TASK_DEFAULT
void(* taskRoutine)(void *ptr)
prototype for task routine started in task context
static TaskId getOsIdentifier()
TaskStatus join(void **value_ptr)
Wait for task to finish.
@ TASK_ERROR_PERMISSION
permissions error setting-up tasks
@ TASK_OK
message sent/received okay
@ TASK_INVALID_STACK
started with invalid stack size
@ TASK_DELAY_ERROR
error trying to delay the task
@ TASK_INVALID_PARAMS
started task with invalid parameters
@ TASK_INVALID_AFFINITY
unable to set the task affinity
@ TASK_ERROR_RESOURCES
unable to allocate more tasks
@ TASK_UNKNOWN_ERROR
unexpected error return value
@ TASK_JOIN_ERROR
error trying to join the task
void resume()
resume execution of task
bool isStarted()
check to see if task is started
static void registerTaskRegistry(TaskRegistry *registry)
void setStarted(bool started)
set task to started when thread is fully up. Avoids a VxWorks race condition.
POINTER_CAST getRawHandle()
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
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
static NATIVE_INT_TYPE getNumTasks()
virtual void addTask(Task *task)=0
Add a task to the registry.
TaskRegistry()
constructor for task registry
virtual ~TaskRegistry()
destructor for task registry
virtual void removeTask(Task *task)=0
remove a task from the registry
taskRoutine routine
contains the task entrypoint
void * arg
contains the task entrypoint pointer