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</title> 51 </head> 52 <body> 53<h1><CODE><a href="../../../nn/Overview.html">nn</a>::<a href="../../../nn/ir/Overview.html">ir</a>::CTR</CODE> Namespace</h1> 54<h2>Description</h2> 55 <div class="section"> 56<p>The namespace of the <a href="../../../nn/ir/CTR/Overview.html">CTR</a> library for infrared communication between systems. <br />(This namespace can also be written without the <CODE>::CTR</CODE> portion.)</p><P> 57 58■ <B>Note:</B> Supporting Sleep Mode<br /> 59 60When the system transitions to Sleep Mode while the IR library is in use, the ongoing connection status and any ongoing connection authentication is forced to terminate. In addition, any unsent packets and any data not yet processed by the <CODE>Receive</CODE> function are destroyed.<br />If the system was in the connected state, that means that no disconnection request was sent to the communication partner, so if necessary call the <CODE>Disconnect</CODE> function and confirm that the function has completed before transitioning to Sleep Mode.</P><P> 61 62■ <B>Note:</B> Handling Malfunctions<br /> 63 64If there is a possibility that the IR is malfunctioning, all functions that return <CODE>Result</CODE> will invariably return <CODE>ResultFatalError</CODE> (with the exception of the <CODE>Finalize</CODE> function). IR communication becomes unusable after this, so finalize the IR library.<br /> 65 66Although there is a possibility that the IR module is malfunctioning, it may recover if the user turns the system off and on again. For this reason, we recommend you display a message to the user explaining the possibility of a malfunction and what to do about it.<br /></P></div> 67 <a name="class" id="class"> 68<h2>Classes</h2> 69 <div class="section"> 70 <table class="members"> 71 <tr> 72 <th> 73<a href="../../../nn/ir/CTR/Communicator/Overview.html"><CODE>nn::ir::CTR::Communicator</CODE></a> 74 </th> 75<td>Class that supports IR communication between CTR systems.</td> 76 </tr> 77 <tr> 78 <th> 79<a href="../../../nn/ir/CTR/ResultNotInitialized/Overview.html"><CODE>nn::ir::CTR::ResultNotInitialized</CODE></a> 80 </th> 81<td>Indicates that the IR library has not been initialized.</td> 82 </tr> 83 <tr> 84 <th> 85<a href="../../../nn/ir/CTR/ResultAlreadyInitialized/Overview.html"><CODE>nn::ir::CTR::ResultAlreadyInitialized</CODE></a> 86 </th> 87<td>Indicates that the IR library has already been initialized.</td> 88 </tr> 89 <tr> 90 <th> 91<a href="../../../nn/ir/CTR/ResultInvalidSize/Overview.html"><CODE>nn::ir::CTR::ResultInvalidSize</CODE></a> 92 </th> 93<td>Indicates that the size of an argument value is incorrect.</td> 94 </tr> 95 <tr> 96 <th> 97<a href="../../../nn/ir/CTR/ResultInvalidEnumValue/Overview.html"><CODE>nn::ir::CTR::ResultInvalidEnumValue</CODE></a> 98 </th> 99<td>Indicates that an argument value exceeds the range.</td> 100 </tr> 101 <tr> 102 <th> 103<a href="../../../nn/ir/CTR/ResultOutOfRange/Overview.html"><CODE>nn::ir::CTR::ResultOutOfRange</CODE></a> 104 </th> 105<td>Indicates that a parameter specification is out of range.</td> 106 </tr> 107 <tr> 108 <th> 109<a href="../../../nn/ir/CTR/ResultNoData/Overview.html"><CODE>nn::ir::CTR::ResultNoData</CODE></a> 110 </th> 111<td>Indicates that there are no values to be gotten.</td> 112 </tr> 113 <tr> 114 <th> 115<a href="../../../nn/ir/CTR/ResultOutOfResource/Overview.html"><CODE>nn::ir::CTR::ResultOutOfResource</CODE></a> 116 </th> 117<td>Indicates a resource insufficiency.</td> 118 </tr> 119 <tr> 120 <th> 121<a href="../../../nn/ir/CTR/ResultFatalError/Overview.html"><CODE>nn::ir::CTR::ResultFatalError</CODE></a> 122 </th> 123<td>Indicates that the IR module may be malfunctioning.</td> 124 </tr> 125 <tr> 126 <th> 127<a href="../../../nn/ir/CTR/ResultPerformanceError/Overview.html">nn::ir::CTR::ResultPerformanceError</a> 128 </th> 129<td>Indicates that an error related to system performance or CTR performance at a high baud-rate setting occurred.</td> 130 </tr> 131 <tr> 132 <th> 133<a href="../../../nn/ir/CTR/ResultFramingError/Overview.html">nn::ir::CTR::ResultFramingError</a> 134 </th> 135<td>Indicates that a receive data framing error occurred.</td> 136 </tr> 137 <tr> 138 <th> 139<a href="../../../nn/ir/CTR/ResultOverrunError/Overview.html">nn::ir::CTR::ResultOverrunError</a> 140 </th> 141<td>Indicates that the receiving process could not keep pace with the device's data receive speed.</td> 142 </tr> 143 <tr> 144 <th> 145<a href="../../../nn/ir/CTR/ResultModuleOtherError/Overview.html">nn::ir::CTR::ResultModuleOtherError</a> 146 </th> 147<td>Indicates that some other unknown error relating to the IR module occurred.</td> 148 </tr> 149 <tr> 150 <th> 151<a href="../../../nn/ir/CTR/ResultMachineSleep/Overview.html"><CODE>nn::ir::CTR::ResultMachineSleep</CODE></a> 152 </th> 153<td>Indicates sleeping because the system is in Sleep Mode.</td> 154 </tr> 155 <tr> 156 <th> 157<a href="../../../nn/ir/CTR/ResultSignatureNotFound/Overview.html"><CODE>nn::ir::CTR::ResultSignatureNotFound</CODE></a> 158 </th> 159<td>Could not find signature in the received data indicating the start of the packet.</td> 160 </tr> 161 <tr> 162 <th> 163<a href="../../../nn/ir/CTR/ResultdifferentSessionId/Overview.html"><CODE>nn::ir::CTR::ResultdifferentSessionId</CODE></a> 164 </th> 165<td>The packet's session ID is not correct.</td> 166 </tr> 167 <tr> 168 <th> 169<a href="../../../nn/ir/CTR/ResultInvalidCrc/Overview.html">nn::ir::CTR::ResultInvalidCrc</a> 170 </th> 171<td>Indicates an incorrect result from verifying the CRC of the received data.</td> 172 </tr> 173 <tr> 174 <th> 175<a href="../../../nn/ir/CTR/ResultFollowingDataNotExist/Overview.html"><CODE>nn::ir::CTR::ResultFollowingDataNotExist</CODE></a> 176 </th> 177<td>Indicates that the subsequent data necessary for parsing the packet does not exist.</td> 178 </tr> 179 <tr> 180 <th> 181<a href="../../../nn/ir/CTR/ResultAlreadyConnected/Overview.html"><CODE>nn::ir::CTR::ResultAlreadyConnected</CODE></a> 182 </th> 183<td>Already in the connected state.</td> 184 </tr> 185 <tr> 186 <th> 187<a href="../../../nn/ir/CTR/ResultAlreadyTryingToConnect/Overview.html"><CODE>nn::ir::CTR::ResultAlreadyTryingToConnect</CODE></a> 188 </th> 189<td>In the process of connecting.</td> 190 </tr> 191 <tr> 192 <th> 193<a href="../../../nn/ir/CTR/ResultNotConnected/Overview.html"><CODE>nn::ir::CTR::ResultNotConnected</CODE></a> 194 </th> 195<td>Not connected.</td> 196 </tr> 197 <tr> 198 <th> 199<a href="../../../nn/ir/CTR/ResultBufferFull/Overview.html"><CODE>nn::ir::CTR::ResultBufferFull</CODE></a> 200 </th> 201<td>Buffer is full.</td> 202 </tr> 203 <tr> 204 <th> 205<a href="../../../nn/ir/CTR/ResultPacketFull/Overview.html"><CODE>nn::ir::CTR::ResultPacketFull</CODE></a> 206 </th> 207<td>Packet is full.</td> 208 </tr> 209 <tr> 210 <th> 211<a href="../../../nn/ir/CTR/ResultBufferInsufficient/Overview.html"><CODE>nn::ir::CTR::ResultBufferInsufficient</CODE></a> 212 </th> 213<td>Buffer is not large enough.</td> 214 </tr> 215 <tr> 216 <th> 217<a href="../../../nn/ir/CTR/ResultTimeout/Overview.html"><CODE>nn::ir::CTR::ResultTimeout</CODE></a> 218 </th> 219<td>A timeout has occurred.</td> 220 </tr> 221 <tr> 222 <th> 223<a href="../../../nn/ir/CTR/ResultPeripheral/Overview.html">nn::ir::CTR::ResultPeripheral</a> 224 </th> 225<td>Error from the communication partner.</td> 226 </tr> 227 <tr> 228 <th> 229<a href="../../../nn/ir/CTR/ResultCannotConfirmId/Overview.html"><CODE>nn::ir::CTR::ResultCannotConfirmId</CODE></a> 230 </th> 231<td>Could not confirm ID of communication partner.</td> 232 </tr> 233 <tr> 234 <th> 235<a href="../../../nn/ir/CTR/ResultInvalidData/Overview.html">nn::ir::CTR::ResultInvalidData</a> 236 </th> 237<td>Invalid data.</td> 238 </tr> </table> 239 </div> 240 </a> <a name="enum" id="enum"> 241<h2>Enumerated Types</h2> 242 <div class="section"> 243 <table class="members"> 244 <tr> 245 <td width="100"> </td> 246 <th> 247<a href="../../../nn/ir/CTR/BaudRate.html"><CODE>BaudRate</CODE></a> 248 </th> 249<td>Enumerated type that represents the baud rates that can be used for infrared communication.</td> 250 </tr> 251 <tr> 252 <td width="100"> </td> 253 <th> 254<a href="../../../nn/ir/CTR/ConnectionStatus.html"><CODE>ConnectionStatus</CODE></a> 255 </th> 256<td>Enumerated type that represents the connection status with another device.</td> 257 </tr> 258 <tr> 259 <td width="100"> </td> 260 <th> 261<a href="../../../nn/ir/CTR/TryingToConnectStatus.html"><CODE>TryingToConnectStatus</CODE></a> 262 </th> 263<td>Enumerated type that represents the status of the connection authentication process with another device.</td> 264 </tr> 265 <tr> 266 <td width="100"> </td> 267 <th> 268<a href="../../../nn/ir/CTR/MachineId.html"><CODE>MachineId</CODE></a> 269 </th> 270<td>Enumerated type that represents the IDs assigned to devices.</td> 271 </tr> 272 <tr> 273 <td width="100"> </td> 274 <th> 275<a href="../../../nn/ir/CTR/ConnectionRole.html"><CODE>ConnectionRole</CODE></a> 276 </th> 277<td>Enumerated type that represents whether the local system is server or client in the established connection.</td> 278 </tr> </table> 279 </div> 280 </a> <a name="constant" id="constant"> 281<h2>Constants</h2> 282 <div class="section"> 283 <table class="members"> 284 <tr> 285 <td width="100"> </td> 286 <th> 287<span class="argument"><a href="../../../nn/ir/CTR/FREE_PACKET_BORDER_SIZE.html"><CODE>FREE_PACKET_BORDER_SIZE</CODE></a></span> 288 </th> 289<td width="100"><CODE>const size_t</CODE></td> 290<td>Threshold value at which the total size of the header and footer appended to the data in a packet changes. When equal to or greater than this, the header size becomes <CODE>FREE_PACKET_HEADER_FOOTER_SIZE_OVER_BORDER</CODE>. When less than this, the header size becomes <CODE>FREE_PACKET_HEADER_FOOTER_SIZE_UNDER_BORDER</CODE>.</td> 291 </tr> 292 <tr> 293 <td width="100"> </td> 294 <th> 295<span class="argument"><a href="../../../nn/ir/CTR/FREE_PACKET_HEADER_FOOTER_SIZE_UNDER_BORDER.html"><CODE>FREE_PACKET_HEADER_FOOTER_SIZE_UNDER_BORDER</CODE></a></span> 296 </th> 297<td width="100"><CODE>const size_t</CODE></td> 298<td>The total size of the header and footer appended to the data in a packet when the data size is less than <CODE>FREE_PACKET_BORDER_SIZE</CODE>.</td> 299 </tr> 300 <tr> 301 <td width="100"> </td> 302 <th> 303<span class="argument"><a href="../../../nn/ir/CTR/FREE_PACKET_HEADER_FOOTER_SIZE_OVER_BORDER.html"><CODE>FREE_PACKET_HEADER_FOOTER_SIZE_OVER_BORDER</CODE></a></span> 304 </th> 305<td width="100"><CODE>const size_t</CODE></td> 306<td>The total size of the header and footer appended to the data in a packet when the data size is equal to or larger than <CODE>FREE_PACKET_BORDER_SIZE</CODE>.</td> 307 </tr> 308 <tr> 309 <td width="100"> </td> 310 <th> 311<span class="argument"><a href="../../../nn/ir/CTR/PAYLOAD_SIZE_MAX.html"><CODE>PAYLOAD_SIZE_MAX</CODE></a></span> 312 </th> 313<td width="100"><CODE>const size_t</CODE></td> 314<td>The maximum amount of data that can be sent or received.</td> 315 </tr> 316 <tr> 317 <td width="100"> </td> 318 <th> 319<span class="argument"><a href="../../../nn/ir/CTR/NECESSARY_BUFFER_SIZE_FOR_CONNECTION.html"><CODE>NECESSARY_BUFFER_SIZE_FOR_CONNECTION</CODE></a></span> 320 </th> 321<td width="100"><CODE>const size_t</CODE></td> 322<td>The required size of the receive (or send) buffer in order to connect.</td> 323 </tr> 324 <tr> 325 <td width="100"> </td> 326 <th> 327<span class="argument"><a href="../../../nn/ir/CTR/CONNECTION_REQUEST_PACKET_SIZE.html"><CODE>CONNECTION_REQUEST_PACKET_SIZE</CODE></a></span> 328 </th> 329<td width="100"><CODE>const size_t</CODE></td> 330<td>The size of the connection-request packet.</td> 331 </tr> 332 <tr> 333 <td width="100"> </td> 334 <th> 335<span class="argument"><a href="../../../nn/ir/CTR/CONNECTION_REPLY_PACKET_SIZE.html"><CODE>CONNECTION_REPLY_PACKET_SIZE</CODE></a></span> 336 </th> 337<td width="100"><CODE>const size_t</CODE></td> 338<td>The size of the connection-reply packet.</td> 339 </tr> 340 <tr> 341 <td width="100"> </td> 342 <th> 343<span class="argument"><a href="../../../nn/ir/CTR/MANAGEMENT_BUFFER_ALLIGNMENT_SIZE.html"><CODE>MANAGEMENT_BUFFER_ALLIGNMENT_SIZE</CODE></a></span> 344 </th> 345<td width="100"><CODE>const size_t</CODE></td> 346<td>The per-entry size in the packet management table.</td> 347 </tr> </table> 348 </div> 349 </a> 350<h2>Revision History</h2> 351 <div class="section"> 352 <dl class="history"> 353 <dt>2011/08/30</dt> 354<dd>Initial version.<br /> 355 </dd> 356 </dl> 357 </div> 358 <hr><p>CONFIDENTIAL</p></body> 359</html>