Serial.ClearToSend
From Xojo Documentation
This item was deprecated in version 2019r2. Please use SerialConnection.ClearToSend as a replacement. |
Read-Only Property (As Boolean )
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
// 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: