1<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 2<html xml:lang="en-US" lang="en-US" xmlns="http://www.w3.org/1999/xhtml"> 3 <head> 4 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 5 <meta http-equiv="Content-Style-Type" content="text/css" /> 6 <link rel="stylesheet" href="../../css/manpage.css" type="text/css" /> 7 <title>RegisterImmediateTask</title> 8 </head> 9 <body> 10 <h1><CODE><a href="../../nn/Overview.html">nn</a>::<a href="../../nn/boss/Overview.html">boss</a>::RegisterImmediateTask</CODE> Function</h1> 11 <h2>Syntax</h2> 12 <div class="section"> 13 <pre class="definition"> 14<a href="../../nn/Result/Overview.html">nn::Result</a> RegisterImmediateTask( 15 <a href="../../nn/boss/Task/Overview.html">Task</a> * pTask, 16 <a href="../../nn/boss/TaskAction/Overview.html">TaskAction</a> * pAction, 17 <a href="../../nn/boss/TaskPolicy/Overview.html">TaskPolicy</a> * pPolicy = NULL, 18 <a href="../../nn/boss/TaskOption/Overview.html">TaskOption</a> * pOption = NULL, 19 <a href="../../nn_types/u8.html">u8</a> taskStep = DEFAULT_STEP_ID 20); 21</pre> 22 </div> 23 <h2>Parameters</h2> 24 <div class="section"> 25 <table class="arguments"> 26 <thead> 27 <tr> 28 <td width="15" /> 29 <th>Name</th> 30 <td>Description</td> 31 </tr> 32 </thead> 33 <tr> 34 <td>in</td> 35 <th>pTask</th> 36 <td>Specifies a task by task ID.</td> 37 </tr> 38 <tr> 39 <td>in</td> 40 <th>pAction</th> 41 <td>Specifies a task action.</td> 42 </tr> 43 <tr> 44 <td>in</td> 45 <th>pPolicy</th> 46 <td>Specifies a task policy. (Optional.)</td> 47 </tr> 48 <tr> 49 <td>in</td> 50 <th>pOption</th> 51 <td>Specifies task options. (Can be omitted)<br />Note: This parameter is not currently supported because it is used with extended features. Do not specify it.</td> 52 </tr> 53 <tr> 54 <td>in</td> 55 <th>taskStep</th> 56 <td>Specifies a task step ID. (Can be omitted if there is only one task execution step)<br /><B>Note</B>: This parameter is for a feature extension and is currently not supported. Do not specify it.</td> 57 </tr> </table> 58 </div> 59 <h2>Return Values</h2> 60 <div class="section">Returns the function's execution result. Returns one of the <a href="../../nn/Result/Overview.html"><CODE>Result</CODE></a> values listed below.<br /> <br /> 61 <table class="arguments"> 62 <thead> 63 <tr> 64 <th>Value</th> 65 <td>Description</td> 66 </tr> 67 </thead> 68 <tr> 69 <th>Result::IsSuccess</th> 70 <td>Registration successful.</td> 71 </tr> 72 <tr> 73 <th>ResultInvalidTaskId</th> 74 <td>The <SPAN class="argument">pTask</SPAN> argument is <CODE>NULL</CODE>.<br /> Alternatively, the <SPAN class="argument">pTask</SPAN> argument is uninitialized, or the pointer of the task ID specified by <SPAN class="argument">pTask</SPAN> is <CODE>NULL</CODE> or an empty string.</td> 75 </tr> 76 <tr> 77 <th>ResultInvalidAction</th> 78 <td>The <CODE>pAction</CODE> parameter is <CODE>NULL</CODE>.</td> 79 </tr> 80 <tr> 81 <th>ResultActionCodeOutOfRange</th> 82 <td>The task action code is out of range. Confirm that it is in the range of <CODE><a href="../../nn/boss/Action.html">Action</a></CODE>.</td> 83 </tr> 84 <tr> 85 <th>ResultInvalidUrl</th> 86 <td>The URL string pointer is <CODE>NULL</CODE> or a zero-length string.</td> 87 </tr> 88 <tr> 89 <th>ResultApInfoTypeOutOfRange</th> 90 <td>The AP information type is out of range. Confirm that it is in the range of <CODE><a href="../../nn/boss/ApInfoType.html">ApInfoType</a></CODE>.</td> 91 </tr> 92 <tr> 93 <th>ResultCfgInfoTypeOutOfRange</th> 94 <td>The Cfg information type is out of range. Confirm that it is in the range of <CODE><a href="../../nn/boss/ApInfoType.html">ApInfoType</a></CODE>.</td> 95 </tr> 96 <tr> 97 <th>ResultInvalidFilePath</th> 98 <td>The file path string pointer is <CODE>NULL</CODE> or a zero-length string.</td> 99 </tr> 100 <tr> 101 <th>ResultInvalidOption</th> 102 <td>The <CODE>pOption</CODE> parameter is uninitialized or the option code is out of range. Confirm that it is in the range of <CODE><a href="../../nn/boss/ExecOption.html">ExecOption</a></CODE>.</td> 103 </tr> 104 <tr> 105 <th>ResultStorageNotFound</th> 106 <td>Storage has not been registered for the corresponding application ID.</td> 107 </tr> 108 <tr> 109 <th>ResultDatabaseFull</th> 110 <td>BOSS storage and tasks cannot be registered because the maximum number of registered application IDs and tasks has been reached.</td> 111 </tr> 112 <tr> 113 <th>ResultFileAccess</th> 114 <td>Failed to access a file.<BR> This <a href="../../nn/Result/Overview.html"><CODE>Result</CODE></a> is returned when the SD Card is removed or data is corrupted.</td> 115 </tr> 116 <tr> 117 <th>ResultIpcNotSessionInitialized</th> 118 <td>The session has not been initialized.<BR> This <CODE><a href="../../nn/Result/Overview.html">Result</a></CODE> is returned if this function is called before the <CODE><a href="../../nn/boss/Initialize.html">Initialize</A></CODE> function. Always call the <a href="../../nn/boss/Initialize.html"><CODE>Initialize</CODE></a> function first when using the BOSS library.</td> 119 </tr> 120 <tr> 121 <th>A value other than the above</th> 122 <td>Unexpected error (see <CODE>boss_Result.h</CODE> for error details).</td> 123 </tr> 124 </table> </div> 125 <h2>Description</h2> 126 <div class="section"> 127 <p>Registers an immediately executing task.</p><p>To register an immediately executing task, you must first prepare an instance of a subclass of the <a href="../../nn/boss/TaskAction/Overview.html"><CODE>TaskAction</CODE></a> class.<br /> See the topic for each class for more information on which attributes must be set.</p><p>After you have finished registering a task, you can reuse each of these instances, as necessary, by calling the <CODE>Initialize</CODE> function. A task execution instruction can be issued by calling the <CODE><a href="../../nn/boss/Task/StartImmediate.html">nn::boss::FgOnlyTask::StartImmediate()</a></CODE> function for a registered task.</p><p> </p><p><b>Common Task Registration Errors</b></p><p>1. If BOSS storage has not been registered when registering an NADL task (<a href="../../nn/boss/ResultStorageNotFound/Overview.html"><CODE>ResultStorageNotFound</CODE></a>).<br /> Register BOSS storage for NADL task using <a href="../../nn/boss/RegisterStorage.html"><CODE>RegisterStorage</CODE></a>.</p><!-- write here --></div> 128 <h2>Revision History</h2> 129 <div class="section"> 130 <dl class="history"> 131 <dt>2011/10/27</dt> 132 <dd>Initial version.<br /> 133 </dd> 134 </dl> 135 </div> 136 <hr><p>CONFIDENTIAL</p></body> 137</html>