Share via


Msr.ErrorEvent Event

2/27/2008

Raised by the service object when an error is detected while trying to read MSR data.

Namespace: Microsoft.PointOfService
Assembly: Microsoft.PointOfService (in microsoft.pointofservice.dll)

Syntax

'Declaration
Public Event ErrorEvent As DeviceErrorEventHandler
public abstract event DeviceErrorEventHandler ErrorEvent
public:
virtual event DeviceErrorEventHandler^ ErrorEvent {
    void add (DeviceErrorEventHandler^ value) abstract;
    void remove (DeviceErrorEventHandler^ value) abstract;
}
/** @event */
public abstract void add_ErrorEvent (DeviceErrorEventHandler value)

/** @event */
public abstract void remove_ErrorEvent (DeviceErrorEventHandler value)

Remarks

POS for .NET doesn’t deliver ErrorEvent events until the application sets the DataEventEnabled property to true.

If the ErrorReportingType property is set to MsrErrorReporting.Card, the track that caused the fault cannot be determined, and the track data properties are not changed.

If the ErrorReportingType property is set to Track the DeviceErrorEventArgs.ErrorCode and DeviceErrorEventArgs.ErrorCode properties may indicate the track-level status. Also, the track data properties are updated as with DataEvent, with the properties for the track(s) in error set to empty strings. Unlike DataEvent, individual track lengths are not reported. However, the application can determine their lengths by getting the length of each of the TracknData properties. Also, because this is an ErrorEvent (even though it is reporting partial data), the DataCount property is not incremented and the service object remains enabled, regardless of the AutoDisable property value.

If the ErrorReportingType property is set to MsrErrorReporting.Card, the DeviceErrorEventArgs.ErrorCode property may be one of the following:

Value

Meaning

Extended

ErrorCodeExtended = ExtendedErrorStart:

Start sentinel error.

ErrorCodeExtended = ExtendedErrorEnd:

End sentinel error.

ErrorCodeExtended = ExtendedErrorParity:

Parity error.

ErrorCodeExtended = ExtendedErrorLrc:

LRC error.

Other values

See ErrorCode and ErrorCodeExtended.

If the ErrorReportingType property is set to MsrErrorReporting.Track, the DeviceErrorEventArgs.ErrorCode property may be one of the following:

Value

Meaning

Extended

ErrorCodeExtended = Track-level status, broken down as follows:

High Word Low Word
High Byte Low Byte High Byte Low Byte
Track 4 Track 3 Track 2 Track 1

Each of the track status bytes may be one of the following:

ExtendedErrorSuccess No error.

ExtendedErrorStartStart sentinel error.

ExtendedErrorEndEnd sentinel error.

ExtendedErrorParityParity error.

ExtendedErrorLrcLRC error.

ExtendedErrorFailureOther or general error.

Other values

See ErrorCode and ErrorCodeExtended.

The DeviceErrorEventArgs.ErrorLocus property can be one of the following:

Value

Meaning

Input

Error occurred while gathering or processing event-driven input. No input data is available.

InputData

Error occurred while gathering or processing event-driven input, and some previously buffered data is available.

The contents of the DeviceErrorEventArgs.ErrorResponse property are preset to a default value, based on the value of DeviceErrorEventArgs.ErrorLocus. The application can change the value to one of the following:

Value

Meaning

Clear

Clear the buffered input data. The error state is exited.

This is the default value when locus is Input.

ContinueInput

Use only when locus is InputData. Acknowledges the error and directs the service object to continue processing. The service object remains in the error state and will deliver additional DataEvents as directed by the DataEventEnabled property. When all input has been delivered and the DataEventEnabled property is again set to true, then another ErrorEvent is delivered with locus Input.

This is the default value when locus is InputData.

See Also

Reference

Msr Class
Msr Members
Microsoft.PointOfService Namespace
DeviceErrorEventHandler Delegate
DeviceErrorEventArgs Class
Msr.DataEventEnabled Property
Msr.AutoDisable Property
Msr.ErrorReportingType Property