Rts Property
Sets and returns the state of the request-to-send signal.
Syntax
Visual Basic
object.Rts [ = value ]
Visual C++
object.GetRts()
object.SetRts(value)
Delphi
object.Rts [ := value ]
| Part
| Description |
| object |
An object expression that evaluates to a PortController object. |
| value |
A boolean value representing the state of the RTS signal.
|
Example
Visual Basic
'Set RTS
myPortController.Rts = True
'Get RTS
Dim rts As Boolean
rts = myPortController.Rts
Visual C++
// Set RTS
m_myPortController.SetRts(true);
// Get RTS
BOOL bRts = m_myPortController.GetRts();
Delphi
// Set RTS
myPortController.Rts := Ord(True);
// Get RTS
var bRTS: boolean; // declare variable in the proper place.
bRts := myPortController.Rts <> 0;
Remarks
When RTS/CTS handshaking is enabled the RTS line fluctuates between on and off.
Reading the Rts property returns the current value of the fluctuating RTS line.
Returns
The boolean value TRUE if the RTS signal is on, FALSE otherwise.
Errors
Attempting to set the RTS state while RTS/CTS handshaking is enabled
is not permitted and will cause the PortController to throw a "Unable to set Rts value while
RTS/CTS handshaking is enabled" exception.
See Also
Dsr, Break, SendXon(), SendXoff()
|