Compartir a través de


SerialDevice.ErrorReceived Evento

Definición

Controlador de eventos que se invoca cuando se produce un error en el puerto serie.

// 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) 

Tipo de evento

Comentarios

Este evento se usa para detectar y responder a errores al comunicar datos a través de un puerto serie. Cuando se produce una condición de error, se invoca el controlador de eventos ErrorReceived y se recibe información de error en un objeto ErrorReceivedEventArgs . Determine el tipo de error recuperando la propiedad Error de la clase ErrorReceivedEventArgs . Esos valores de propiedad se definen en la enumeración SerialError .

Se aplica a