# Alphabetical error summary

All ADI service functions return either SUCCESS, or an error code indicating that the function failed and the reason for the failure. ADI service error codes are defined in the adidef.h and ctaerr.h include files. The error codes are prefixed with ADIERR_ or CTAERR_.

For a complete list of CTAERR_ codes, refer to the Natural Access Developer's Reference Manual.

Asynchronous functions return SUCCESS if the input arguments and context state are valid for the given function and if the ADI service sent the command to the hardware providing the service. SUCCESS, in this case, means the function was initiated and a DONE event is generated for the function.

The following table alphabetically lists the ADI service errors:

Error name | Hex | Decimal | Description
--- | --- | --- | ---
ADIERR_CANNOT_CREATE_CHANNEL | 0x00010006 | 65542 | Unable to create a channel to the board due to either board or driver limitations.
ADIERR_INVALID_CALL_STATE | 0x00010005 | 65541 | Function not valid in the current call state. For example, many functions require the call to be in ADI_CC_STATE_CONNECTED.
ADIERR_INVALID_QUEUEID | 0x00010002 | 65538 | Bad queue or driver ID.
ADIERR_NO_DSP_PORT | 0x00010007 | 65543 | No input or output stream for requested function.
ADIERR_NO_DSP_RESOURCES | 0x00010008 | 65544 | Not enough free DSP resources to run the requested function.
ADIERR_NOT_ENOUGH_RESOURCES | 0x0001000A | 65546 | Unable to obtain port resource from on-board resource management.
ADIERR_PLAYREC_ACCESS | 0x00010001 | 65537 | User callback routine for playing or recording returned a value other than SUCCESS or ADI_PLAY_LAST_BUFFER.
ADIERR_TOO_MANY_BUFFERS | 0x00010004 | 65540 | Attempted to submit a play or record buffer with two buffers pending.
ADIERR_UNKNOWN_BOARDTYPE | 0x00010003 | 65539 | Board type is unrecognized (adiGetBoardSlots).
CTAERR_BAD_ARGUMENT | 0x00000007 | 7 | Function argument had an invalid value, or a required pointer argument was NULL.
CTAERR_BAD_SIZE | 0x0000000B | 11 | Size argument was too small to receive a data structure, or a play or record buffer was not a multiple of the framesize for the specified encoding.
CTAERR_BOARD_ERROR | 0x00000003 | 3 | Unexpected error occurred on the board. In most cases, ADIEVN_BOARD_ERROR contains the board error code.
CTAERR_DRIVER_OPEN_FAILED | 0x00000014 | 20 | Driver open failed because either the driver was not installed or the maximum number of opens was exceeded.
CTAERR_DRIVER_RECEIVE_FAILED | 0x00000016 | 22 | Error occurred retrieving an event from the driver, or no events were queued in the driver.
CTAERR_DRIVER_SEND_FAILED | 0x00000017 | 23 | Error returned by the driver in sending a message to the board. Occurs if the board was reset.
CTAERR_DRIVER_VERSION | 0x00000015 | 21 | Driver does not support the requested function.
CTAERR_FATAL | 0x00000002 | 2 | Internal error occurred in the Natural Access library.
CTAERR_FUNCTION_ACTIVE | 0x0000000F | 15 | Attempt made to start an asynchronous function that is already started. Also returned if an attempt was made to get a digit or flush the digit queue while collecting digits.
CTAERR_FUNCTION_NOT_ACTIVE | 0x0000000E | 14 | Attempt made to stop or modify a function that was not running. Also occurs when a function call is made to ADI call control when the NCC service is active.
CTAERR_FUNCTION_NOT_AVAIL | 0x0000000D | 13 | Necessary .dsp or .tcp file was not downloaded to the board. Requested function required a service that is reserved for use by call control.
CTAERR_INVALID_BOARD | 0x0000001A | 26 | Specified board number was not successfully configured.
CTAERR_INVALID_CTAHD | 0x00000005 | 5 | Context handle is invalid.
CTAERR_INVALID_SEQUENCE | 0x00000013 | 19 | Attempt was made to stop a function that is already being stopped. Play or record buffer was submitted when it was not expected.
CTAERR_INVALID_STATE | 0x0000000C | 12 | Function is not valid in the current port state. For example, most functions require the port to be in ADI_STATE_STARTED, which is entered after starting a trunk protocol.
CTAERR_LOCK_TIMEOUT | 0x0000001D | 29 | Thread lock timed out.
CTAERR_NOT_FOUND | 0x0000000A | 10 | Specified parameter does not exist.
CTAERR_NOT_IMPLEMENTED | 0x00000009 | 9 | Function was not implemented.
CTAERR_OUTPUT_ACTIVE | 0x0000001B | 27 | Open port failed because the stream and slot are already opened on another port. Output operation such as play failed because there is another active output function.
CTAERR_OUT_OF_MEMORY | 0x00000006 | 6 | Unable to allocate memory for driver or port context, for play or record buffers, or for temporary storage. When this error occurs in a DONE event, it can mean that there was insufficient memory on the board.
CTAERR_OUT_OF_RESOURCES | 0x00000008 | 8 | Unable to create shared resources.
CTAERR_SHAREMEM_ACCESS | 0x00000010 | 16 | Failed accessing shared memory.
CTAERR_SVR_COMM | 0X00000041 | 65 | Server communication error.