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>WaitToConfirmId</title> 8 </head> 9 <body> 10<h1><CODE><a href="../../../../nn/Overview.html">nn</a>::<a href="../../../../nn/ir/Overview.html">ir</a>::<a href="../../../../nn/ir/CTR/Overview.html">CTR</a>::<a href="../../../../nn/ir/CTR/Communicator/Overview.html">Communicator</a>::WaitToConfirmId</CODE> Member Function</h1> 11<h2>Syntax</h2> 12 <div class="section"> 13 <pre class="definition"> 14static <a href="../../../../nn/Result/Overview.html">Result</a> WaitToConfirmId( 15 <a href="../../../../nn_types/u8.html">u8</a> subId, 16 <a href="../../../../nn_types/bit32.html">bit32</a> communicationId, 17 const char passphrase[], 18 size_t passphraseLength, 19 <a href="../../../../nn/fnd/TimeSpan/Overview.html">nn::fnd::TimeSpan</a> timeout 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>subId</th> 36<td>Communication mode ID.</td> 37 </tr> 38 <tr> 39<td>in</td> 40<th>communicationId</th> 41<td>The communication ID. Specify the value generated by the <a href="../../../../nn/ir/CTR/Communicator/CreateCommunicationId.html"><CODE>nn::ir::Communicator::CreateCommunicationId</CODE></a> function.</td> 42 </tr> 43 <tr> 44<td>in</td> 45<th>passphrase[]</th> 46<td>String that is the seed for the encryption key.</td> 47 </tr> 48 <tr> 49<td>in</td> 50<th>passphraseLength</th> 51<td>Length of <SPAN class="argument">passphrase</SPAN>. Specify a value that is at least <CODE>IR_PASSPHRASE_LENGTH_MIN</CODE>, but no larger than <CODE>IR_PASSPHRASE_LENGTH_MAX</CODE>.</td> 52 </tr> 53 <tr> 54<td>in</td> 55<th>timeout</th> 56<td>Specify the amount of time to wait for a request.</td> 57 </tr> </table> 58 </div> 59<h2>Return Values</h2> 60<div class="section">Returns whether confirmation succeeded.<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><CODE>Result::IsSuccess</CODE></th> 70<td>Process was successful.</td> 71 </tr> 72 <tr> 73<th><CODE>ResultNotConnected</CODE></th> 74<td>Not in the connected state.</td> 75 </tr> 76 <tr> 77<th><CODE>ResultPacketFull</CODE></th> 78<td>Insufficient management region for packet.</td> 79 </tr> 80 <tr> 81<th><CODE>ResultBufferInsufficient</CODE></th> 82<td>Insufficient save region for packet.</td> 83 </tr> 84 <tr> 85<th><CODE>ResultCannotConfirmId</CODE></th> 86<td>The connection partner has a different <SPAN class="argument">communicationId</SPAN> or <SPAN class="argument">subId</SPAN>.</td> 87 </tr> 88 <tr> 89<th><CODE>ResultMachineSleep</CODE></th> 90<td>Sleeping because the system is in Sleep Mode.</td> 91 </tr> 92 <tr> 93<th><CODE>ResultFatalError</CODE></th> 94<td>The IR module may be malfunctioning.</td> 95 </tr> 96 </table> </div> 97<h2>Description</h2> 98 <div class="section"> 99<p>Waits for request to confirm communication ID and communication mode ID.</p><p>Execute this function after a connection has been established with the communication partner using either <CODE>WaitConnection</CODE>, <CODE>RequireConnection</CODE> or <CODE>AutoConnection</CODE>.</p><p>For confirmation to succeed, after this function executes the communication partner must call <CODE>RequireToConfirmId</CODE>, specifying the same communication ID and communication mode ID used here. To send and receive data using the <CODE>Send</CODE> and <CODE>Receive</CODE> functions, you must first use this function and the <CODE>RequireToConfirmId</CODE> function to confirm IDs.</p><p>For IDs to be confirmed, both regions used to save incoming and outgoing packets must be at least 32 bytes, and the size of the management region must be at least the value returned by <CODE>GetManagementSize(1)</CODE>. If these conditions are not met, IDs will always fail to be confirmed.</p><p><B>Note:</B> One <CODE>nnos::Event</CODE> object is used while this function is executing. Be aware of the upper limit for <CODE>Event</CODE> objects.</p><!-- write here --></div> 100<h2>Revision History</h2> 101 <div class="section"> 102 <dl class="history"> 103 <dt>2011/10/05</dt> 104<dd>Fixed typos.<br /> 105 </dd> 106 <dt>2011/09/28</dt> 107<dd>Added information on buffer size restrictions.<br /> 108 </dd> 109 <dt>2011/08/30</dt> 110<dd>Initial version.<br /> 111 </dd> 112 </dl> 113 </div> 114 <hr><p>CONFIDENTIAL</p></body> 115</html>