|
1 <?xml version="1.0" encoding="utf-8"?> |
|
2 <!-- Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies) All rights reserved. --> |
|
3 <!-- This component and the accompanying materials are made available under the terms of the License |
|
4 "Eclipse Public License v1.0" which accompanies this distribution, |
|
5 and is available at the URL "http://www.eclipse.org/legal/epl-v10.html". --> |
|
6 <!-- Initial Contributors: |
|
7 Nokia Corporation - initial contribution. |
|
8 Contributors: |
|
9 --> |
|
10 <!DOCTYPE concept |
|
11 PUBLIC "-//OASIS//DTD DITA Concept//EN" "concept.dtd"> |
|
12 <concept id="GUID-2751DBB8-D882-5803-9881-1C1F7B4FE413" xml:lang="en"><title>IRPrinting: |
|
13 Infrared Printing</title><prolog><metadata><keywords/></metadata></prolog><conbody> |
|
14 <section><title>Download</title> <p>Click on the following link to download |
|
15 the example: <xref href="guid-6013a680-57f9-415b-8851-c4fa63356636/zips/guid-604c093c-92b0-47fc-8bbc-252008d64c0b.zip" scope="external">ServerClientSide.zip</xref></p>Download some additional files |
|
16 required by the example: <xref href="guid-6013a680-57f9-415b-8851-c4fa63356636/zips/guid-16f2a07d-2ace-4a32-b383-6f1352dfd72e.zip" scope="external">CommonFiles</xref><p>Click: <xref href="guid-6013a680-57f9-415b-8851-c4fa63356636/guid-604c093c-92b0-47fc-8bbc-252008d64c0b.html" scope="peer">browse</xref> to view the example code. </p>View the additional |
|
17 files: <xref href="guid-6013a680-57f9-415b-8851-c4fa63356636/guid-16f2a07d-2ace-4a32-b383-6f1352dfd72e.html" scope="peer">browse</xref>. </section> |
|
18 <section><title>Description</title> <p>IRPrinting illustrates the use of the <xref href="GUID-9B83CDD4-FC94-51A0-AC67-CD04BCAFEF08.dita">Serial Communications Server</xref> for |
|
19 infra-red communications, such as to an IrDA-capable printer. See the IrDA |
|
20 Serial Overview for more information. </p> <p>The example: </p> <ul> |
|
21 <li id="GUID-BEE653D6-2610-53F9-8FCB-43CDCDB54F37"><p>Creates a connection |
|
22 to the Comms server </p> </li> |
|
23 <li id="GUID-AABB1768-6DD4-589F-9262-213EC3AC90C7"><p>Loads the Comms server |
|
24 module that supports infra-red (“IrCOMM”) </p> </li> |
|
25 <li id="GUID-FEF32A75-0089-511C-B2BA-EF108B3EB4A4"><p>Opens a port </p> </li> |
|
26 <li id="GUID-33D11CA2-00F1-5E22-A266-FC112F4F2CE5"><p>Writes a short message |
|
27 to the port </p> </li> |
|
28 <li id="GUID-EB95FD29-2963-5866-92B0-65CF5DAAD437"><p>Closes the port </p> </li> |
|
29 <li id="GUID-4489D37F-8C6C-5BFB-9CB6-5F52376C21C7"><p>Closes the Comms server </p> </li> |
|
30 </ul> <p>The write operation times out with an error after four seconds if |
|
31 it is not successful, as will occur if no receiver is present. </p> </section> |
|
32 <section><title>Class Summary</title><p><xref href="GUID-3B4E8ED5-72F7-3E51-B188-3C1045526DDF.dita"><apiname>RComm</apiname></xref>: serial port</p><p><xref href="GUID-6B3CA99B-ABF2-32EA-935D-23AE5AE2C306.dita"><apiname>RCommServ</apiname></xref>: |
|
33 Comms server </p></section> |
|
34 <section><title>Build</title> <p>The source code includes the two project |
|
35 files needed for building: <filepath>bld.inf</filepath> and the <filepath>.mmp</filepath> file. </p> <p> <xref href="GUID-3100800B-B2F7-50EF-BD4C-3C345ECCB2A5.dita">Symbian platform build process</xref> describes |
|
36 how to build this application, which results in an executable called <filepath>\epoc32\release\<target>\<urel |
|
37 or udeb>\IRPRINTING.EXE</filepath>. </p> </section> |
|
38 <section><title>Usage</title> <p>Run the executable <filepath>IRPRINTING.EXE</filepath>. </p> <p>Executables |
|
39 for the emulator targets <filepath>wins</filepath> and <filepath>winscw</filepath> can |
|
40 be run on your PC. Executables for ARM targets must be copied to your target |
|
41 platform before being run. </p> </section> |
|
42 </conbody></concept> |