Break Property
Sets and returns the state of the break signal.
Syntax
Visual Basic
object.Break [ = value ]
Visual C++
object.GetBreak()
object.SetBreak(value)
Delphi
object.Break [: = value ]
| Part
| Description |
| object |
An object expression that evaluates to a PortController object. |
| value |
A boolean value representing the state of the break signal.
|
Example
Visual Basic
'Set break
myPortController.Break = True
'Get break status
Dim breakStatus As Boolean
breakStatus = myPortController.Break
Visual C++
// Set break
m_myPortController.SetBreak(true);
// Get break status
BOOL breakStatus = m_myPortController.GetBreak();
Delphi
// Set break
myPortController.Break := Ord(breakStatus);
// Get break status
var breakStatus: boolean; // declare variable in the proper place
breakStatus := myPortController.Break <> 0;
Remarks
All data in the transmit queue is cleared when the Break property is
set to true.
Default
False
Returns
The boolean value TRUE if the break signal is on, FALSE otherwise.
Errors
Setting this value while the port is closed causes the PortController to throw
a "Port is closed" exception. You may read this value while the port is closed but the returned value
is meaningless as it does not represent the current or initial break state of the port.
See Also
BreakSignal Event, Dsr, Rts, SendXon(), SendXoff()
|