nn::boss::RegisterImmediateTask Functionnn::Result RegisterImmediateTask( Task * pTask, TaskAction * pAction, TaskPolicy * pPolicy = NULL, TaskOption * pOption = NULL, u8 taskStep = DEFAULT_STEP_ID );
| Name | Description | |
|---|---|---|
| in | pTask | Specifies a task by task ID. |
| in | pAction | Specifies a task action. |
| in | pPolicy | Specifies a task policy. (Optional.) |
| in | pOption | Specifies task options. (Can be omitted) Note: This parameter is not currently supported because it is used with extended features. Do not specify it. |
| in | taskStep | Specifies a task step ID. (Can be omitted if there is only one task execution step) Note: This parameter is for a feature extension and is currently not supported. Do not specify it. |
Result values listed below.| Value | Description |
|---|---|
| Result::IsSuccess | Registration successful. |
| ResultInvalidTaskId | The pTask argument is NULL.Alternatively, the pTask argument is uninitialized, or the pointer of the task ID specified by pTask is NULL or an empty string. |
| ResultInvalidAction | The pAction parameter is NULL. |
| ResultActionCodeOutOfRange | The task action code is out of range. Confirm that it is in the range of Action. |
| ResultInvalidUrl | The URL string pointer is NULL or a zero-length string. |
| ResultApInfoTypeOutOfRange | The AP information type is out of range. Confirm that it is in the range of ApInfoType. |
| ResultCfgInfoTypeOutOfRange | The Cfg information type is out of range. Confirm that it is in the range of ApInfoType. |
| ResultInvalidFilePath | The file path string pointer is NULL or a zero-length string. |
| ResultInvalidOption | The pOption parameter is uninitialized or the option code is out of range. Confirm that it is in the range of ExecOption. |
| ResultStorageNotFound | Storage has not been registered for the corresponding application ID. |
| ResultDatabaseFull | BOSS storage and tasks cannot be registered because the maximum number of registered application IDs and tasks has been reached. |
| ResultFileAccess | Failed to access a file. This Result is returned when the SD Card is removed or data is corrupted. |
| ResultIpcNotSessionInitialized | The session has not been initialized. This Result is returned if this function is called before the Initialize function. Always call the Initialize function first when using the BOSS library. |
| A value other than the above | Unexpected error (see boss_Result.h for error details). |
Registers an immediately executing task.
To register an immediately executing task, you must first prepare an instance of a subclass of the TaskAction class.
See the topic for each class for more information on which attributes must be set.
After you have finished registering a task, you can reuse each of these instances, as necessary, by calling the Initialize function. A task execution instruction can be issued by calling the nn::boss::FgOnlyTask::StartImmediate() function for a registered task.
Common Task Registration Errors
1. If BOSS storage has not been registered when registering an NADL task (ResultStorageNotFound).
Register BOSS storage for NADL task using RegisterStorage.
CONFIDENTIAL