SerialConnection.ClearToSend

From Xojo Documentation

You are currently browsing the old Xojo documentation site. Please visit the new Xojo documentation site!

Read-Only Property (As Boolean )
BooleanValue = aSerialConnection.ClearToSend

New in 2019r2

Supported for all project types and targets.

Use to read the state of the ClearToSend line.

Sample Code

The code below is from Examples/Communication/Serial/Line State Change Tester:

// Loop over each line that has changed and print
// out the new state of the line.
Var i As Integer

For Each i In changedLines
Select Case i
Case SerialConnection.LineCTS
MessageBox("CTS is now " + HighLow(Me.ClearToSend))
Case SerialConnection.LineRTS
MessageBox("RTS is now " + HighLow(Me.RequestToSend))
Case SerialConnection.LineDCD
MessageBox("DCD is now " + HighLow(Me.DataCarrierDetect))
Case SerialConnection.LineDSR
MessageBox("DSR is now " + HighLow(Me.DataSetReady))
Case SerialConnection.LineDTR
MessageBox("DTR is now " + HighLow(Me.DataTerminalReady))
Case SerialConnection.LineRI
MessageBox("RI is now " + HighLow(Me.RingIndicator))
End Select
Next

The HighLow function returns the printable message. It is:

If b Then
Return "asserted"
Else
Return "negated"
End If