Initial contribution of Documentation_content according to Feature bug 1266 bug 1268 bug 1269 bug 1270 bug 1372 bug 1374 bug 1375 bug 1379 bug 1380 bug 1381 bug 1382 bug 1383 bug 1385
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies) All rights reserved. -->
<!-- This component and the accompanying materials are made available under the terms of the License
"Eclipse Public License v1.0" which accompanies this distribution,
and is available at the URL "http://www.eclipse.org/legal/epl-v10.html". -->
<!-- Initial Contributors:
Nokia Corporation - initial contribution.
Contributors:
-->
<!DOCTYPE concept
PUBLIC "-//OASIS//DTD DITA Concept//EN" "concept.dtd">
<concept id="GUID-35D49549-1F4D-583F-A45D-9B557A207DD2" xml:lang="en"><title>GlassTerm:
glass teletype terminal</title><prolog><metadata><keywords/></metadata></prolog><conbody>
<section><title>Download</title> <p>Click on the following link to download
the example: <xref href="guid-6013a680-57f9-415b-8851-c4fa63356636/zips/guid-e132f025-ded6-4ae4-8a4d-dc50d344b55b.zip" scope="external">GlassTerm.zip</xref></p>Download some additional files 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-e132f025-ded6-4ae4-8a4d-dc50d344b55b.html" scope="peer">browse</xref> to view the example code. </p>View the additional
files: <xref href="guid-6013a680-57f9-415b-8851-c4fa63356636/guid-16f2a07d-2ace-4a32-b383-6f1352dfd72e.html" scope="peer">browse</xref>. </section>
<section><title>Description</title> <p>GlassTerm is a terminal application
with configurable handshaking that illustrates the use of the Serial Communications
API. </p> </section>
<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>:
Comms server</p><p><xref href="GUID-076DD315-CE3F-3640-BAB4-0FC51C906820.dita"><apiname>TCommCaps</apiname></xref>: serial port capabilities
(in package buffer) </p><p><xref href="GUID-BF099B27-4E8A-3765-A6A8-DB88DB4F4F2E.dita"><apiname>TCommConfig</apiname></xref>: serial port configuration
(in package buffer) </p><p><xref href="GUID-E0B34F3E-D4C4-3232-B8B1-7DB35B454646.dita"><apiname>TRequestStatus</apiname></xref>: asynchronous
request status </p><p><xref href="GUID-A6E4627A-A3AE-3B64-9E5C-710EE15C5595.dita"><apiname>TSerialInfo</apiname></xref>: serial protocol information </p></section>
<section><title>Build</title> <p>The source code for this example application
can be found in the directory: </p> <p> <filepath>examples\SerialComms\ServerClientSide\GlassTerm</filepath> </p> <p>It
may be in the directory in which you installed Symbian OS, or it may be in <filepath>src\common\developerlibrary\</filepath>.
It includes the two project 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">The
Symbian OS build process</xref> describes how to build this application, which
results in an executable called <filepath>\epoc32\release\<target>\<urel
or udeb>\GLASSTERM.EXE</filepath>. </p> </section>
<section><title>Usage</title> <ol id="GUID-1DB8E591-3818-51E6-BDE0-89FFE8B6F96A">
<li id="GUID-A399AF4D-E821-5341-9645-B7F0FA42B76A"><p>Run the executable <filepath>GLASSTERM.EXE</filepath>. </p> <p>Executables
for the emulator targets <filepath>wins</filepath> and <filepath>winscw</filepath> can
be run on your PC. Executables for ARM targets must be copied to your target
platform before being run. </p> </li>
<li id="GUID-BD9D8050-474C-5FD0-8485-08CED5D8AEEF"><p>Once running, the glass
teletype application performs two simple functions: </p> <ul>
<li id="GUID-3384ABA3-13A8-57F7-BE4F-7CC322BDA464"><p>Read any key presses
and send the characters to the serial port. </p> </li>
<li id="GUID-A44E9991-D87A-5E20-BC01-91454379BFF8"><p>Receive any incoming
characters from the serial port and display them on screen. </p> </li>
</ul> <p>It sends and receives at 19200 baud, 8 data bits, no parity, 1 stop
bit. </p> </li>
</ol> <p>In order to see the application working, you must make a suitable
serial port connection. A simple way is to connect a PC and a Symbian OS phone,
and run the application on both machines simultaneously. (Before doing this,
make sure to close down any other applications using the serial port on the
PC, and set the phone's <systemoutput>Link To Desktop</systemoutput> option
to <systemoutput>Off</systemoutput>). Characters typed on one machine are
then echoed to the application on the other. </p> </section>
</conbody></concept>