nn::boss::Task::GetState Member FunctionTaskStateCode GetState( bool acknowledge = false, u32 * pCount = NULL, u8 * pStepId = NULL );
| Name | Description | |
|---|---|---|
| in | acknowledge | Once a task finishes running, this stores the "task is complete" state so that the task's execution results can be checked. Calling the function with this flag set to true clears the "complete" state. Tasks whose execution counts are non-zero are rescheduled immediately after the previous task execution completes. This causes the return value to switch to TASK_WAITING_TIMER the next time the function is called. (Optional.) |
| out | pCount | Returns the execution count. (Optional.) |
| out | pStepId |
Returns the task step ID. (Optional.) |
Gets the task state.
In most cases, task states transition from state 1 through state 5 below.
(1) TASK_REGISTERED (task registered)
(2) TASK_WAITING_TIMER (waiting for time after Start function is called)
(3) TASK_WAITING (waiting for execution)
(4) TASK_RUNNING or TASK_RETRY (task is running)
(5) TASK_DONE or TASK_ERROR (task is complete)
There are also two special states, TASK_PAUSED (paused) and TASK_STOPPED (stopped by a call to Cancel).
Note: Because state transitions sometimes occur in a short period of time, the function may not always be able to get all states.
CONFIDENTIAL