nn::boss::Task::StartImmediate Member Function

Syntax

nn::Result StartImmediate(
     void
);

Arguments

None.

Return Values

Returns the function's execution result. Returns one of the Result values listed below.
Value Description
ResultSuccess Successfully issued instruction to start task immediately.
ResultInvalidTaskId The task ID pointer is NULL or a zero-length string.
ResultTaskNotExist The specified task ID was not found. Confirm whether it is registered yet.
ResultIpcNotSessionInitialized Either the session is not initialized or there are incompatible permissions. This Result is returned if this function is called before the Initialize or InitializePrivileged function. Always call the Initialize or InitializePrivileged function first when you use the BOSS library.
A value other than the above. Unexpected error (see boss_Result.h for error details).

Description

Starts a task immediately. This can only be called after infrastructure connections are enabled. Because this allows a task to be executed before its scheduled time, it is suitable for as-needed immediate execution of tasks that would normally run in the background. When you specify immediate execution, you can run a task at the highest priority even if it means interrupting other running tasks. The Start function differs from this one in that its execution time has already arrived and, if communications are interrupted, it does not enter the "resume" state but instead gives an error for the task execution result. Another point to note is that when you want to execute only the target task and only once, you must set its execution count to 1. Setting it to a value more than 1 will cause it to auto-run in the background like a normal task until its execution count reaches zero. See ac::Connect for information about how to enable infrastructure connections.

Revision History

2010/09/16
Initial version.

CONFIDENTIAL