nn::boss::Task::GetState Member Function

Syntax

TaskStateCode GetState(
     bool acknowledge = false,
     u32 * pCount = NULL,
     u8 * pStepID = NULL
);

Arguments

Name Description
in acknowledge Stores the "execution complete" status once a task finishes execution so that the execution results can be checked. Calling the function with this flag set to true clears the "execution complete" status. 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.)

Return Values

Returns a code indicating the task state.

Description

Gets the task state. In most cases, tasks transition from step 1 through 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 due to a call to Cancel). State transitions may occur in a short period of time. Accordingly, the function may not always return all states.

Revision History

2010/09/16
Initial version.

CONFIDENTIAL