GetErrorStatus Method
Returns and clears the state of all incoming status lines.
Syntax
Visual Basic
object.GetErrorStatus ParityError, FramingError, OverrunError
Visual C++
object.GetErrorStatus(long &ParityError, long &FramingError, long &OverrunError)
Delphi
object.GetErrorStatus(out ParityError: Integer; out
FramingError: Integer;
out OverrunError: Integer)
| Part
| Description |
| object |
An object expression that evaluates to a PortController object. |
ParityError |
A long value that indicates if a parity error has occurred (0 = FALSE). |
FramingError |
A long value that indicates if a framing error has occurred (0 = FALSE). |
OverrunError |
A long value that indicates if a overrun error has occurred (0 = FALSE). |
Example
Visual Basic
Dim ParityError As Long
Dim FramingError As Long
Dim OverrunError As Long
myPortController.GetErrorStatus ParityError, FramingError, OverrunError
Visual C++
long lParityError, lFramingError, lOverrunError;
m_myPortController.GetErrorStatus(&lParityError, &lFramingError, &lOverrunError);
Delphi
var iParityError, iFramingError, iOverrunError: Integer; // declare variable in the proper place
myPortController.GetErrorStatus(iParityError, iFramingError, iOverrunError);
Remarks
Calling this method automatically clears any error state after the error information is returned.
Returns
The long values ParityError, FramingError, and OverrunError by reference where 0 is false and a non-zero value is true.
Errors
Calling the GetErrorStatus method while the port is closed is not permitted
and will cause PortController to throw a "Port is closed" exception.
See Also
Error Event
|