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 <style type="text/css"><!-- 8 span.static_style 9 { 10 font-size : 8pt; 11 color : white; 12 font-weight : bold; 13 background : #44f; 14 border-left : solid 1px #aaf; 15 border-top : solid 1px #aaf; 16 border-right : solid 1px #00c; 17 border-bottom : solid 1px #00c; 18 padding-left : 2px; 19 padding-right : 2px; 20 } 21 22 span.virtual_style 23 { 24 font-size : 8pt; 25 color : white; 26 font-weight : bold; 27 background : #0a0; 28 border-left : solid 1px #0f0; 29 border-top : solid 1px #0f0; 30 border-right : solid 1px #060; 31 border-bottom : solid 1px #060; 32 padding-left : 2px; 33 padding-right : 2px; 34 } 35 36 span.protected_style 37 { 38 font-size : 8pt; 39 color : white; 40 font-weight : bold; 41 background : #444; 42 border-left : solid 1px #ccc; 43 border-top : solid 1px #ccc; 44 border-right : solid 1px #222; 45 border-bottom : solid 1px #222; 46 padding-left : 2px; 47 padding-right : 2px; 48 } 49 --></style> 50<title>nn::ir::CTR::Communicator</title> 51 </head> 52 <body> 53<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>::Communicator</CODE> Class</h1> 54<h2>Syntax</h2> 55 <div class="section"> 56 <pre class="definition">class Communicator</pre> 57 </div> 58<h2>Description</h2> 59 <div class="section"> 60<p>Class that supports IR communication between CTR systems.</p><!-- write here --></div> 61 <a name="constant" id="constant"> 62<h2>Member Constants</h2> 63 <div class="section"> 64 <table class="members"> 65 <tr> 66<th class="category" colspan="4">Passphrase String Length</th> 67 </tr> 68 <tr> 69 <td width="100"> 70<span class="static_style" title="static">S</span> 71 </td> 72 <th> 73<span class="argument"><a href="../../../../nn/ir/CTR/Communicator/IR_PASSPHRASE_LENGTH_MIN.html"><CODE>IR_PASSPHRASE_LENGTH_MIN</CODE></a></span> 74 </th> 75<td width="100">const size_t</td> 76<td>Minimum size of the passphrase for generating the encrypted key used in communication.</td> 77 </tr> 78 <tr> 79 <td width="100"> 80<span class="static_style" title="static">S</span> 81 </td> 82 <th> 83<span class="argument"><a href="../../../../nn/ir/CTR/Communicator/IR_PASSPHRASE_LENGTH_MAX.html"><CODE>IR_PASSPHRASE_LENGTH_MAX</CODE></a></span> 84 </th> 85<td width="100"><CODE>const size_t</CODE></td> 86<td>Maximum size of the passphrase for generating the encryption key used in communication.</td> 87 </tr> </table> 88 </div> 89 </a> <a name="function" id="function"> 90<h2>Member Functions</h2> 91 <div class="section"> 92 <table class="members"> 93 <tr> 94<th class="category" colspan="3">Initialize/Finalize</th> 95 </tr> 96 <tr> 97 <td width="100"> 98<span class="static_style" title="static">S</span> </td> 99 <th> 100<a href="../../../../nn/ir/CTR/Communicator/Initialize.html"><CODE>Initialize</CODE></a> 101 </th> 102<td>Initializes the IR library.</td> 103 </tr> 104 <tr> 105 <td width="100"> 106<span class="static_style" title="static">S</span> </td> 107 <th> 108<a href="../../../../nn/ir/CTR/Communicator/Finalize.html"><CODE>Finalize</CODE></a> 109 </th> 110<td>Finalizes the IR library.</td> 111 </tr> 112 <tr> 113<th class="category" colspan="3">Authenticated Connection</th> 114 </tr> 115 <tr> 116 <td width="100"> 117<span class="static_style" title="static">S</span> </td> 118 <th> 119<a href="../../../../nn/ir/CTR/Communicator/WaitConnection.html"><CODE>WaitConnection</CODE></a> 120 </th> 121<td>Waits for a connection request and then tries making an authenticated connection.</td> 122 </tr> 123 <tr> 124 <td width="100"> 125<span class="static_style" title="static">S</span> </td> 126 <th> 127<a href="../../../../nn/ir/CTR/Communicator/RequireConnection.html"><CODE>RequireConnection</CODE></a> 128 </th> 129<td>Sends a connection request to the partner <a href="../../../../nn/ir/CTR/Overview.html">CTR</a> and tries to make an authenticated connection.</td> 130 </tr> 131 <tr> 132 <td width="100"> 133<span class="static_style" title="static">S</span> </td> 134 <th> 135<a href="../../../../nn/ir/CTR/Communicator/AutoConnection.html"><CODE>AutoConnection</CODE></a> 136 </th> 137<td>Tries to make an authenticated connection.</td> 138 </tr> 139 <tr> 140 <td width="100"> 141<span class="static_style" title="static">S</span> </td> 142 <th> 143<a href="../../../../nn/ir/CTR/Communicator/GetConnectionRole.html"><CODE>GetConnectionRole</CODE></a> 144 </th> 145<td>Gets the connection role.</td> 146 </tr> 147 <tr> 148<th class="category" colspan="3">Networks (Creating, Destroying, Connecting, and Disconnecting)</th> 149 </tr> 150 <tr> 151 <td width="100"> 152<span class="static_style" title="static">S</span> </td> 153 <th> 154<a href="../../../../nn/ir/CTR/Communicator/CreateCommunicationId.html"><CODE>CreateCommunicationId</CODE></a> 155 </th> 156<td>Generates a communication ID from a unique ID.</td> 157 </tr> 158 <tr> 159 <td width="100"> 160<span class="static_style" title="static">S</span> </td> 161 <th> 162<a href="../../../../nn/ir/CTR/Communicator/IsConfirmedId.html"><CODE>IsConfirmedId</CODE></a> 163 </th> 164<td>Indicates whether the unique ID and communication ID have been confirmed. You must perform this confirmation before sending or receiving data.</td> 165 </tr> 166 <tr> 167 <td width="100"> 168<span class="static_style" title="static">S</span> </td> 169 <th> 170<a href="../../../../nn/ir/CTR/Communicator/RequireToConfirmId.html"><CODE>RequireToConfirmId</CODE></a> 171 </th> 172<td>Requests confirmation of the communication mode ID and communication ID.</td> 173 </tr> 174 <tr> 175 <td width="100"> 176<span class="static_style" title="static">S</span> </td> 177 <th> 178<a href="../../../../nn/ir/CTR/Communicator/WaitToConfirmId.html"><CODE>WaitToConfirmId</CODE></a> 179 </th> 180<td>Waits for request to confirm communication ID and communication mode ID.</td> 181 </tr> 182 <tr> 183<th class="category" colspan="3">Disconnection</th> 184 </tr> 185 <tr> 186 <td width="100"> 187<span class="static_style" title="static">S</span> </td> 188 <th> 189<a href="../../../../nn/ir/CTR/Communicator/Disconnect.html"><CODE>Disconnect</CODE></a> 190 </th> 191<td>Disconnects the current connection. Also, aborts the connection authentication process.</td> 192 </tr> 193 <tr> 194<th class="category" colspan="3">Events</th> 195 </tr> 196 <tr> 197 <td width="100"> 198<span class="static_style" title="static">S</span> </td> 199 <th> 200<a href="../../../../nn/ir/CTR/Communicator/GetReceiveEvent.html"><CODE>GetReceiveEvent</CODE></a> 201 </th> 202<td>Gets the event used for detection when reception of the packet is complete.</td> 203 </tr> 204 <tr> 205 <td width="100"> 206<span class="static_style" title="static">S</span> </td> 207 <th> 208<a href="../../../../nn/ir/CTR/Communicator/GetSendEvent.html"><CODE>GetSendEvent</CODE></a> 209 </th> 210<td>Gets the event used for detection when the sending of a packet is complete.</td> 211 </tr> 212 <tr> 213 <td width="100"> 214<span class="static_style" title="static">S</span> </td> 215 <th> 216<a href="../../../../nn/ir/CTR/Communicator/GetConnectionStatusEvent.html"><CODE>GetConnectionStatusEvent</CODE></a> 217 </th> 218<td>Gets events that are used to detect changes in the state of the IR library.</td> 219 </tr> 220 <tr> 221<th class="category" colspan="3">Receive/Send</th> 222 </tr> 223 <tr> 224 <td width="100"> 225<span class="static_style" title="static">S</span> </td> 226 <th> 227<a href="../../../../nn/ir/CTR/Communicator/Receive.html"><CODE>Receive</CODE></a> 228 </th> 229<td>Receives data.</td> 230 </tr> 231 <tr> 232 <td width="100"> 233<span class="static_style" title="static">S</span> </td> 234 <th> 235<a href="../../../../nn/ir/CTR/Communicator/Send.html"><CODE>Send</CODE></a> 236 </th> 237<td>Sends the specified data.</td> 238 </tr> 239 <tr> 240<th class="category" colspan="3">Status Retrieval</th> 241 </tr> 242 <tr> 243 <td width="100"> 244<span class="static_style" title="static">S</span> </td> 245 <th> 246<a href="../../../../nn/ir/CTR/Communicator/GetLatestReceiveErrorResult.html"><CODE>GetLatestReceiveErrorResult</CODE></a> 247 </th> 248<td>Gets the <CODE><a href="../../../../nn/Result/Overview.html">Result</a></CODE> of the most recent error that occurred in the receiving process.</td> 249 </tr> 250 <tr> 251 <td width="100"> 252<span class="static_style" title="static">S</span> </td> 253 <th> 254<a href="../../../../nn/ir/CTR/Communicator/GetLatestSendErrorResult.html"><CODE>GetLatestSendErrorResult</CODE></a> 255 </th> 256<td>Gets the <CODE><a href="../../../../nn/Result/Overview.html">Result</a></CODE> of the most recent error that occurred in the send process.</td> 257 </tr> 258 <tr> 259 <td width="100"> 260<span class="static_style" title="static">S</span> </td> 261 <th> 262<a href="../../../../nn/ir/CTR/Communicator/GetConnectionStatus.html"><CODE>GetConnectionStatus</CODE></a> 263 </th> 264<td>Gets the connection status.</td> 265 </tr> 266 <tr> 267 <td width="100"> 268<span class="static_style" title="static">S</span> </td> 269 <th> 270<a href="../../../../nn/ir/CTR/Communicator/GetTryingToConnectStatus.html"><CODE>GetTryingToConnectStatus</CODE></a> 271 </th> 272<td>Gets the status of the connection process.</td> 273 </tr> 274 <tr> 275 <td width="100"> 276<span class="static_style" title="static">S</span> </td> 277 <th> 278<a href="../../../../nn/ir/CTR/Communicator/GetReceiveSizeFreeAndUsed.html"><CODE>GetReceiveSizeFreeAndUsed</CODE></a> 279 </th> 280<td>Returns values for available space, used space, number of available entries, and used entries in the regions used to save and manage received packets.</td> 281 </tr> 282 <tr> 283 <td width="100"> 284<span class="static_style" title="static">S</span> </td> 285 <th> 286<a href="../../../../nn/ir/CTR/Communicator/GetSendSizeFreeAndUsed.html"><CODE>GetSendSizeFreeAndUsed</CODE></a> 287 </th> 288<td>Returns values for available space, used space, number of available entries, and used entries in the regions for saving and managing outgoing packets.</td> 289 </tr> 290 <tr> 291 <td width="100"> 292<span class="static_style" title="static">S</span> </td> 293 <th> 294<a href="../../../../nn/ir/CTR/Communicator/GetNextReceiveDataSize.html"><CODE>GetNextReceiveDataSize</CODE></a> 295 </th> 296<td>Returns the size of data that will be received in the next call to the <CODE>Receive</CODE> function.</td> 297 </tr> 298 <tr> 299<th class="category" colspan="3">Clear Operations</th> 300 </tr> 301 <tr> 302 <td width="100"> 303<span class="static_style" title="static">S</span> </td> 304 <th> 305<a href="../../../../nn/ir/CTR/Communicator/ClearReceiveBuffer.html"><CODE>ClearReceiveBuffer</CODE></a> 306 </th> 307<td>Destroys all received packets and unparsed data.</td> 308 </tr> 309 <tr> 310 <td width="100"> 311<span class="static_style" title="static">S</span> </td> 312 <th> 313<a href="../../../../nn/ir/CTR/Communicator/ClearSendBuffer.html"><CODE>ClearSendBuffer</CODE></a> 314 </th> 315<td>Destroys all packets scheduled for sending.</td> 316 </tr> 317 <tr> 318 <td width="100"> 319<span class="static_style" title="static">S</span> </td> 320 <th> 321<a href="../../../../nn/ir/CTR/Communicator/DropNextReceiveData.html"><CODE>DropNextReceiveData</CODE></a> 322 </th> 323<td>Ignore the data that is expected to come in the next call to the <CODE>Receive</CODE> function and move to the next set of receive data after that.</td> 324 </tr> 325 <tr> 326<th class="category" colspan="3">Other</th> 327 </tr> 328 <tr> 329 <td width="100"> 330<span class="static_style" title="static">S</span> </td> 331 <th> 332<a href="../../../../nn/ir/CTR/Communicator/GetManagementSize.html"><CODE>GetManagementSize</CODE></a> 333 </th> 334<td>Calculates the size required for the region used to manage recevied or outgoing packets.</td> 335 </tr> 336 <tr> 337 <td width="100"> 338<span class="static_style" title="static">S</span> </td> 339 <th> 340<a href="../../../../nn/ir/CTR/Communicator/GetPacketSize.html"><CODE>GetPacketSize</CODE></a> 341 </th> 342<td>Calculates the size required for saving one data packet in the buffer used internally by the IR library. This size is equal to the size calculated by the <CODE>CalculateBufferSizeToCommunicate</CODE> function plus the fixed-size header and footer.</td> 343 </tr> 344 <tr> 345 <td width="100"> 346<span class="static_style" title="static">S</span> </td> 347 <th> 348<a href="../../../../nn/ir/CTR/Communicator/GetReservedSize.html"><CODE>GetReservedSize</CODE></a> 349 </th> 350<td>Returns the size of the reserved region of the buffer used internally by the IR library.</td> 351 </tr> 352 <tr> 353 <td width="100"> 354<span class="static_style" title="static">S</span> </td> 355 <th> 356<a href="../../../../nn/ir/CTR/Communicator/CalculateBufferSizeToCommunicate.html"><CODE>CalculateBufferSizeToCommunicate</CODE></a> 357 </th> 358<td>The size of buffer required in order to use the <CODE>Send</CODE> and <CODE>Receive</CODE> functions.</td> 359 </tr> </table> 360 </div> 361 </a> 362<h2>Revision History</h2> 363 <div class="section"> 364 <dl class="history"> 365 <dt>2011/10/05</dt> 366<dd>Changed <I>one packet</I> to <CODE>GetManagementSize(1)</CODE> to describe restrictions specific to the packet management region for each function.<br /> 367 </dd> 368 <dt>2011/09/28</dt> 369<dd>Added buffer size restrictions to <CODE>RequireToConfirmId</CODE> and <CODE>WaitToConfirmId</CODE>.<br /> 370 </dd> 371 <dt>2011/08/30</dt> 372<dd>Initial version.<br /> 373 </dd> 374 </dl> 375 </div> 376 <hr><p>CONFIDENTIAL</p></body> 377</html>