Previous PageTable Of Contents../index.htmlIndexNext Page


4.2. Error Handling

All Digital Network Interface library functions return a value that indicates the success or failure of the function call. Generally, Digital Network Interface library functions return the following values:

If a function fails, the error code can be retrieved using the Standard Runtime Library (SRL) ATDV_LASTERR( ) function. The error codes are defined in dtilib.h and listed in Table 1.

NOTES:
NOTES: 1. The Network dt_open( ) function call returns a device handle if the function call is successful. A device handle is a positive non-zero value. If dt_open( ) fails, the return code is -1 and the specific error is a system error which can be found in the global variable errno, contained in errno.h.
2. The ATDT_BDSGBIT( ) function call returns the value AT_FAILUREP on error. All other Extended Attribute functions return AT_FAILURE on error.
3. The SRL Standard Attribute functions ATDV_LASTERR( ) and ATDV_ERRMSGP( ) can be used to obtain the status of the last function call of the device. Refer to Appendix A - Standard Runtime Library for more information.
4. If the error returned by ATDV_LASTERR( ) is EDT_SYSTEM, a system error has occurred. Check the value of the global variable errno defined in errno.h.

Table 1. Error Types Defined in dtilib.h

Error Returned

Description

EDT_ABORT

abort received response

EDT_ADDRS

bad address

EDT_BADCMDERR

invalid or undefined command to driver

EDT_BADCNT

count of bytes requested is bad

EDT_BADDEV

bad device error

EDT_BADGLOB

bad global (device) parameter number

EDT_BADPORT

1st byte appeared on reserved port

EDT_BADVAL

invalid parameter value passed in value pointer

EDT_BITBSY

bit is already set

EDT_CHKSUM

bad checksum

EDT_DATTO

data reception timed out

EDT_DTTSTMOD

in test mode; cannot set DTI/2xx mode

EDT_FWERR

firmware returned an error

EDT_INVBD

invalid DTI/2xx logical board device handle

EDT_INVCFG

invalid configuration area or EEPROM configuration data

EDT_INVMSG

invalid message

EDT_INVSIGST

invalid signaling state

EDT_MBFMT

wrong number of bytes for multiple byte request

EDT_MBIMM

received an immediate termination

EDT_MBINV

1st byte appeared on data port

EDT_MBOVR

message was too long, overflow

EDT_MBPORT

received multiple byte data on port other than 0 or 1

EDT_MBTERM

terminating byte other than FEH or FFH

EDT_MBUND

under the number of bytes for a multibyte request

EDT_MSGCNT

count received did not match actual count

EDT_MTSIG

cannot disable insertion

EDT_NOIDLEERR

time slot is not in idle/closed state

EDT_NOMEMERR

cannot map or allocate memory in driver

EDT_NOTDNLD

not downloaded

EDT_NOTSACS

cannot use tsacs on the device

EDT_NOWTCALL

not waiting for a call

EDT_PARAMERR

invalid parameter

EDT_PDOFFHK

wink bit not in correct initial state

EDT_PDSIG

cannot disable insertion

EDT_RANGEERR

bad/overlapping physical memory range

EDT_SH_BADEXTTS

external time slot unsupported at current clock rate

EDT_SH_BADINDX

invalid switching handler index number

EDT_SH_BADLCLTS

invalid local time slot number

EDT_SH_BADMODE

invalid bus mode

EDT_SH_BADTYPE

invalid local time slot type

EDT_SH_LCLDSCNCT

local time slot already disconnected from SCbus

EDT_SH_LCLTSCNCT

local time slot already connected to SCbus

EDT_SH_LIBBSY

switching handler library is busy

EDT_SH_LIBNOTINIT

switching handler library has not been initialized

EDT_SH_MISSING

switching handler is not present

EDT_SH_NOCLK

clock fallback failed

EDT_SIGINS

signaling insertion not enabled

EDT_SIGTO

transmit/receive did not update in time

EDT_SIZEERR

message too big or too small

EDT_SKIPRPLYERR

a required reply was skipped

EDT_STARTED

cannot start when already started

EDT_SUCC

no error

EDT_SYSTEM

System error - check the global variable errno for more information about the error.

EDT_TMOERR

timed out waiting for reply from firmware

EDT_TSASN

time slot already assigned

EDT_TSBSY

time slot is busy


Previous PageTable Of ContentsTop Of PageIndexNext Page

Click here to contact Dialogic Customer Engineering

Copyright 2001, Dialogic Corporation
All rights reserved
This page generated November, 2001