property LineError : Word
Returns a non-zero value if line errors have occurred since the last call to LineError.
It returns 0 if no errors were detected or the port is not yet open. Otherwise, it returns a numeric value from the following list that indicates the most severe pending error:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Line errors can occur during calls to any GetXxx or PutXxx method of the port. If your application must detect line errors, it should check LineError after each such call or group of calls, or it should install an OnTriggerLineError event handler.
The following example checks for line errors after receiving data with GetBlock:
ApxComPort.GetBlock(DataBlock, DataLen);
if ApxComPort.LineError <> 0 then
...error handling
See also: OnTriggerLineError