SerialDevice.ErrorReceived Event
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Event handler that is invoked when error occurs on the serial port.
// Register
event_token ErrorReceived(TypedEventHandler<SerialDevice, ErrorReceivedEventArgs const&> const& handler) const;
// Revoke with event_token
void ErrorReceived(event_token const* cookie) const;
// Revoke with event_revoker
SerialDevice::ErrorReceived_revoker ErrorReceived(auto_revoke_t, TypedEventHandler<SerialDevice, ErrorReceivedEventArgs const&> const& handler) const;
public event TypedEventHandler<SerialDevice,ErrorReceivedEventArgs> ErrorReceived;
function onErrorReceived(eventArgs) { /* Your code */ }
serialDevice.addEventListener("errorreceived", onErrorReceived);
serialDevice.removeEventListener("errorreceived", onErrorReceived);
- or -
serialDevice.onerrorreceived = onErrorReceived;
Public Custom Event ErrorReceived As TypedEventHandler(Of SerialDevice, ErrorReceivedEventArgs)
Event Type
Remarks
This event is used to detect and respond to errors when communicating data through a serial port. When an error condition occurs, the ErrorReceived event handler is invoked and error information is received in an ErrorReceivedEventArgs object. Determine the type of error by retrieving the Error property of the ErrorReceivedEventArgs class. Those property values are defined in the SerialError enumeration.