 |
F´ Flight Software - C/C++ Documentation
NASA-v1.6.0
A framework for building embedded system applications to NASA flight quality standards.
|
Go to the documentation of this file.
45 "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)");
53 void suspend(
bool onPurpose =
false);
68 POINTER_CAST m_handle;
75 bool m_suspendedOnPurpose;
bool wasSuspended()
returns whether or not task was suspended on purpose
void setStarted(bool started)
set task to started when thread is fully up. Avoids a VxWorks race condition.
virtual void removeTask(Task *task)=0
remove a task from the registry
void suspend(bool onPurpose=false)
suspend task
@ TASK_UNKNOWN_ERROR
unexpected error return value
@ TASK_ERROR_PERMISSION
permissions error setting-up tasks
bool isStarted()
check to see if task is started
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
@ TASK_ERROR_RESOURCES
unable to allocate more tasks
void resume()
resume execution of task
TaskRegistry()
constructor for task registry
void(* taskRoutine)(void *ptr)
prototype for task routine started in task context
static void registerTaskRegistry(TaskRegistry *registry)
static TaskId getOsIdentifier()
taskRoutine routine
contains the task entrypoint
static const NATIVE_UINT_TYPE TASK_DEFAULT
virtual void addTask(Task *task)=0
Add a task to the registry.
@ TASK_INVALID_AFFINITY
unable to set the task affinity
@ TASK_OK
message sent/received okay
unsigned int NATIVE_UINT_TYPE
native unsigned integer type declaration
@ TASK_INVALID_PARAMS
started task with invalid parameters
@ TASK_DELAY_ERROR
error trying to delay the task
virtual ~TaskRegistry()
destructor for task registry
I32 getIdentifier()
get the identifier for 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
POINTER_CAST getRawHandle()
static TaskStatus delay(NATIVE_UINT_TYPE msecs)
delay the task
virtual ~Task()
destructor
static NATIVE_INT_TYPE getNumTasks()
bool isSuspended()
check with OS to see if it is suspended already
Declares ISF basic types.
void * arg
contains the task entrypoint pointer
int NATIVE_INT_TYPE
native integer type declaration
@ TASK_INVALID_STACK
started with invalid stack size
@ TASK_JOIN_ERROR
error trying to join the task
TaskStatus join(void **value_ptr)
Wait for task to finish.