Error handling
Copyright IXXAT Automation GmbH
127
IEM Manual, 1.5
6 Error handling
This section describes the errors that can occur in the IEM and how to react to
these possible errors. For this purpose the error concepts differs between syn-
chronous and asynchronous error.
Synchronously occurring errors are errors that occur at the call or execution of
a function and which can be notified using a return code of the called function.
An invalid parameter of an API-function is an example for a synchronously oc-
curring error. It is strongly recommend checking the return code of each used
function.
Asynchronously occurring errors are errors that occur within a task or interrupt-
handler. In case of Ethernet an asynchronously occurring error could also be
caused by the network. All asynchronously occurred errors are forwarded to
the error callback of the host by events. The application is in charge of manag-
ing these errors in a proper way.
6.1
Error classes (priorities)
The errors are allocated to three different classes for error management. This
allows the software to react differently according to the occurred error class.
All error codes of the EMI are defined in the header file of the corresponding
unit.
Error class
Error handling
INFO
The EMI software gives information about an unexpected circumstance.
Neither application nor EMI software is requested to take any action.
MINOR
An error or a minor defect occurred within the EMI software. The regular
processing is not affected. The application is NOT requested to take any
action.
FATAL
A profoundly error occurred within the EMI software. The application is re-
quested to take an action.
To decode the error class from a 32 bit error code the macro
COM_GET_ERROR_CLASS
should be used.
6.2
Assignment between errors and units
Every error of the EMI or the IEM firmware is assigned to a certain unit. Via the
macro
COM_GET_UNIT_ID
the application has the possibility to determine the
unit where the error occurred.
The Figure 6-1 shows the assignment between the unit number and the unit
name. The values are also available in common.h.