Serial.ClearToSend

From Xojo Documentation

Revision as of 19:08, 3 September 2020 by THill (talk | contribs) (Text replacement - "{{Deprecated|" to "{{DeprecatedItem|")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

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

New in 5.5

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.
Dim i As Integer

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

The HighLow function simply returns the printable message. It is:

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