Initial contribution of the Adaptation Documentation.
<?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 xml:lang="en" id="GUID-C258D231-4B08-51C4-BA09-8C61239666E0"><title>RS232 Control Lines</title><prolog><metadata><keywords/></metadata></prolog><conbody><p>This section describes the <codeph>RComm::Signal</codeph> and <codeph>RComm::SetSignal</codeph> APIs. </p> <p>While the handshaking facilities allow an application to ignore the status of the control lines, the levels of the control lines can be read at any time using the <xref href="GUID-3B4E8ED5-72F7-3E51-B188-3C1045526DDF.dita#GUID-3B4E8ED5-72F7-3E51-B188-3C1045526DDF/GUID-B2A751BB-6784-31B8-8808-F5BFC087427B"><apiname>RComm::Signals()</apiname></xref> member function. This is a bit field that needs to be masked with the <codeph>KCapsSignalXXX</codeph> bitmasks. The status of the output lines as well as the input lines is returned. </p> <p>However, when a value of 0 is returned for any bit, the meaning is ambiguous. The value could mean that a particular signal is low, or that reading its status is not supported. For example, if the <keyword>RNG</keyword> Ring Indicator input is not supported, the value returned by <codeph>Signals(&KSignalRNG)</codeph> would always be 0 even if the serial port was attached to a ringing telephone. </p> <p>This is something that can be checked using <codeph>Caps()</codeph>. The <codeph>KCapsSignalXXX</codeph> bitmasks can be used with the <codeph>TCommCaps</codeph> version of <codeph>iSignals</codeph> to find out what signals are supported. For example <xref href="GUID-1143A8A7-829B-38EB-95C6-DB116801BB84.dita"><apiname>KCapsSignalCTSSupported</apiname></xref>. </p> <p>Only the voltage levels on the output lines can be set. This can be done at any time. The recommended method is using the inline function <xref href="GUID-B6392845-B724-35FF-80A5-3911B64535B9.dita"><apiname>SetSignals()</apiname></xref> which takes two integers as parameters. The first is a bitmask for the signals to be set and the second is a bitmask for the values to be read. These masks are the same signal line constants as those defined for getting signal levels, but only those relating to the RTS and DTR lines are valid. </p> </conbody></concept>