User`s guide

DC 900-1340I 233
Appendix
D
Error Codes
There are several methods used by the DLI and BSC software to report errors
(Ta bl e D – 1 lists the BSC errors).
1. The error code can be returned directly by the DLI function call. Typical errors
are those described in the Freeway Data Link Interface Reference Guide.
2. The BSC errors listed in Ta ble D –1 can be returned in the global variable
iICPStatus. The DLI constant definitions are in the file dlicperr.h.
3. The BSC errors listed in Tabl e D– 1 can also be returned in the dlRead
pOptArgs.iICPStatus
field of the response to a dlWrite request. The DLI sets the
dlRead pOptArgs.usProtCommand field to the same value as the dlWrite request that
caused the error. An example of this type of error is the
DLI_ICP_ERR_BAD_MODE
invalid mode error.
4. The BSC error can be reported in an error report response to a dlRead request. The
returned
dlRead pOptArgs.usProtCommand field is set to DLI_PROT_RESP_ERROR, and
the
dlRead pOptArgs.iICPStatus field is set to the actual error code. An example of
this type of error is the
DLI_ICP_ERR_DSR_DOWN error.
5. Under certain communication line conditions that cause queued transmission
buffers to be discarded (such as losing the DSR signal while transmitting data),
the BSC error can be reported in a data acknowledgment response to a
dlRead
request. In this case, the returned dlRead pOptArgs.usProtCommand field is set to
DLI_PROT_RESP_LOCAL_ACK, and the dlRead pOptArgs.iICPStatus field is set to the
actual error code. An example of this type of error is the
DLI_ICP_ERR_XMIT_TIMEOUT
transmit timeout error.