Windows apps
Collapse the table of content
Expand the table of content

ErrorReceived Event

[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]

Represents the method that handles the error event of a SerialPort object.

Namespace:  System.IO.Ports
Assembly:  Microsoft.SPOT.Hardware.SerialPort (in Microsoft.SPOT.Hardware.SerialPort.dll)

public event SerialErrorReceivedEventHandler ErrorReceived

Error events can be caused by any of the items in the SerialError enumeration. Because the operating system determines whether to raise this event or not, not all parity errors may be reported.

DataReceived and ErrorReceived events may be called out of order, and there may be a slight delay between when the underlying stream reports the error and when code can when the event handler is executed. Only one event handler can execute at a time.

If a parity error occurs on the trailing byte of a stream, an extra byte will be added to the input buffer with a value of 126.

Show:
© 2017 Microsoft