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>RequireToConfirmId</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>::RequireToConfirmId</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> RequireToConfirmId(
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);
20</pre>
21    </div>
22<h2>Arguments</h2>
23    <div class="section">
24      <table class="arguments">
25        <thead>
26          <tr>
27            <td width="15" />
28<th>Name</th>
29<td>Description</td>
30          </tr>
31        </thead>
32        <tr>
33<td>in</td>
34<th>subId</th>
35<td>Communication mode ID.</td>
36        </tr>
37        <tr>
38<td>in</td>
39<th>communicationId</th>
40<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>
41        </tr>
42        <tr>
43<td>in</td>
44<th>passphrase[]</th>
45<td>String that is the seed for the encryption key.</td>
46        </tr>
47        <tr>
48<td>in</td>
49<th>passphraseLength</th>
50<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>
51        </tr> </table>
52    </div>
53<h2>Return Values</h2>
54<div class="section">Returns whether confirmation succeeded.<br /> <br />
55      <table class="arguments">
56        <thead>
57          <tr>
58<th>Value</th>
59<td>Description</td>
60          </tr>
61        </thead>
62        <tr>
63<th><CODE>Result::IsSuccess</CODE></th>
64<td>Process was successful.</td>
65        </tr>
66        <tr>
67<th><CODE>ResultNotConnected</CODE></th>
68<td>Not in the connected state.</td>
69        </tr>
70        <tr>
71<th><CODE>ResultPacketFull</CODE></th>
72<td>Insufficient management region for packet.</td>
73        </tr>
74        <tr>
75<th><CODE>ResultBufferInsufficient</CODE></th>
76<td>Insufficient save region for packet.</td>
77        </tr>
78        <tr>
79<th><CODE>ResultCannotConfirmId</CODE></th>
80<td>The connection partner has a different <SPAN class="argument">communicationId</SPAN> or <SPAN class="argument">subId</SPAN>.</td>
81        </tr>
82        <tr>
83<th><CODE>ResultMachineSleep</CODE></th>
84<td>Sleeping because the system is in Sleep Mode.</td>
85        </tr>
86        <tr>
87<th><CODE>ResultFatalError</CODE></th>
88<td>The IR module may be malfunctioning.</td>
89        </tr>
90      </table> </div>
91<h2>Description</h2>
92    <div class="section">
93<p>Requests confirmation of the communication mode ID and communication 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>In order for this process to succeed, the communication partner must execute <CODE>WaitToConfirmId</CODE> with the same specified communication ID and communication mode ID. To send and receive data with the <CODE>Send</CODE> and <CODE>Receive</CODE> functions, you must first use this function and the <CODE>WaitToConfirmId</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><STRONG>Note</STRONG>: 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>
94<h2>Revision History</h2>
95    <div class="section">
96      <dl class="history">
97        <dt>2011/09/28</dt>
98<dd>Added information on buffer size restrictions.<br />
99        </dd>
100        <dt>2011/08/30</dt>
101<dd>Initial version.<br />
102        </dd>
103      </dl>
104    </div>
105  <hr><p>CONFIDENTIAL</p></body>
106</html>