Table of Contents NMS Glossary Previous Page Version



Appendix A

Errors and Events


Introduction
Alphabetical Error Summary
Numerical Error Summary
Events

IntroductionTop of Page

This appendix provides a summary of Natural Access error and event codes. The error codes are presented in two tables:

Natural Access error and event codes are defined in the include files ctaerr.h.

Alphabetical Error SummaryTop of Page

The following table is an alphabetical listing of errors. All errors are 32 bits.

Error Name

Hex

Decimal

Description

CTAERR_ALREADY_DEFINED

0x10000009

268435465

The specified service or service manager to be registered has already been defined.

CTAERR_ALREADY_INITIALIZED

0x1E

30

The Natural Access library or a Natural Access service was already initialized.

CTAERR_BAD_ARGUMENT

0x7

7

Problem: A function argument had an invalid value or a required pointer argument was NULL.

Solution: Check all arguments for valid types and ranges.

CTAERR_BAD_SIZE

0xB

11

Problem: A 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.

Solution: Check all arguments for valid sizes.

CTAERR_BOARD_ERROR

0x3

3

An unexpected error occurred on the board. In most cases, there will also be a CTAEVN_BOARD_ERROR event, which will contain the board error code.

CTAERR_CREATE_MUTEX_FAILED

0x1C

28

Failed to create a thread lock.

CTAERR_DISK_FULL

0x29

41

Problem: There is not enough room on the disk to complete the write operation. No data was written.

Solution: Make some room on the disk.

CTAERR_DRIVER_ERROR

0x18

24

Problem: A device driver returned an error code.

Solution: Check that drivers are loaded and running.

CTAERR_DRIVER_OPEN_FAILED

0x14

123456789

The driver open failed because either the driver was not installed or the maximum number of opens has been exceeded.

CTAERR_DRIVER_RECEIVE_FAILED

0x16

22

An error occurred retrieving an event from a driver.

CTAERR_DRIVER_SEND_FAILED

0x17

23

An error was returned by a driver while sending a message. For AG boards, this will occur if the board has been reset.

CTAERR_DRIVER_VERSION

0x15

21

The driver does not support the requested function.

CTAERR_DUPLICATE_CTAWAITOBJ

0x2E

46

An already registered wait object was passed as an argument to ctaRegisterWaitObject.

CTAERR_DUPLICATE_EXTPARMS

0x10000002

268435458

The specified external parameters must be unique.

CTAERR_FATAL

0x2

2

An internal error occurred in Natural Access.

CTAERR_FILE_ACCESS_DENIED

0x23

35

Problem: The program tried to open a read-only file for writing, or to open a file with inadequate permissions, or the filename is a directory.

Solution: Change the file attributes or permissions, or open the file for read-only, or specify a different file name.

CTAERR_FILE_CREATE_FAILED

0x26

38

Problem: File creation failed due to a system error.

Solution: Verify that the path is valid and that the file does not exist.

CTAERR_FILE_EXISTS

0x24

36

Problem: You attempted to create a file that already exists.

Solution: Remove or rename the existing file, or specify a different file name.

CTAERR_FILE_NOT_FOUND

0x21

34

Problem: The specified file does not exist.

Solution: Create the file or specify a different file name.

CTAERR_FILE_OPEN_FAILED

0x25

37

Problem: File open failed due to a system error.

Solution: Verify that the file exists.

CTAERR_FILE_READ_FAILED

0x27

39

Problem: The file is not opened or is locked, or the expected amount of data could not be read.

Solution: Make sure that the file is of the expected type. Verify that an incorrect handle was not used to close another file.

CTAERR_FILE_WRITE_FAILED

0x28

40

Problem: The file is not open or is locked, or the expected amount of data could not be written.

Solution: Verify that an incorrect handle was not used to close another file.

CTAERR_FUNCTION_ACTIVE

0xF

15

An attempt was made to start an asynchronous function that is already started.

This error is also returned if an attempt was made to get a digit or flush the digit queue while collecting digits.

CTAERR_FUNCTION_NOT_ACTIVE

0xE

14

An attempt was made to stop or modify a function that was not running.

CTAERR_FUNCTION_NOT_AVAIL

0xD

13

Either the requested operation is not available with the current protocol; or the necessary .dsp or .tcp file has not been downloaded to the board; or the requested function required a service that is reserved for use by the ADI service.

CTAERR_INCOMPATIBLE_PARMS

0x10000001

268435457

The standard parameters did not match.

CTAERR_INCOMPATIBLE_REVISION

0x11

17

Problem: A service or service manager is incompatible with the revision of Natural Access that is being used.

Solution: Ensure that all revisions are compatible.

CTAERR_INVALID_ADDRESS

0x10000005

268435461

The specified command address or event address is invalid.

CTAERR_INVALID_BOARD

0x1A

26

Problem: The specified board number has not been successfully configured.

Solution: Reconfigure the board.

CTAERR_INVALID_CTAHD

0x5

5

An invalid context handle was passed as an argument to a function or the context was destroyed by another thread.

CTAERR_INVALID_CTAQUEUEHD

0x4

4

An invalid queue handle was passed as an argument to a function or the queue was destroyed by another thread.

CTAERR_INVALID_HANDLE

0x20

32

An invalid handle was passed as an argument to this function.

CTAERR_INVALID_SEQUENCE

0x13

19

One of the following situations has occurred:

· An attempt to open or close services was made while another request was pending.

· An attempt was made to stop a function that is already being stopped

· A call control function was called before receiving a response to the previous call control command

· A play or record buffer was submitted when it was not expected.

CTAERR_INVALID_STATE

0xC

12

This function is not valid in the current state.

CTAERR_LICENSE_EXPIRED

0x30

48

There is an expired license for the service.

CTAERR_LOCK_TIMEOUT

0x1D

29

A thread lock timed out.

CTAERR_NO_LICENSE

0x2F

47

There is no valid license for the specified service or all available license units are in use.

CTAERR_NOT_FOUND

0xA

10

The specified parameter does not exist. The service or service manager was not initialized, not attached to the queue, or not opened on the context.

CTAERR_NOT_IMPLEMENTED

0x9

9

The function was not implemented.

CTAERR_NOT_INITIALIZED

0x1F

31

Problem: Natural Access was not yet initialized.

Solution: Call ctaInitialize.

CTAERR_OUT_OF_MEMORY

0x6

6

Problem: Unable to allocate memory for queue, driver or context, for play or record buffers, or for temporary storage.
Solution: When this error occurs on a DONE event, it may mean that there was insufficient memory on the board.

CTAERR_OUT_OF_RESOURCES

0x8

8

Problem: Unable to find free space in internal tables.

Solution: Verify that handles are closed when no longer used.

CTAERR_OUTPUT_ACTIVE

0x1B

27

Problem: Either open services failed because the stream and timeslot are already opened on another context; or an output function such as play failed because there is another active output function.

Solution: Check another stream/timeslot or stop the running function.

CTAERR_PATH_NOT_FOUND

0x22

33

Problem: The directory portion of a filename is invalid.

Solution: Create the directory or specify a different path.

CTAERR_RESOURCE_CONFLICT

0x12

18

Problem: A needed resource is already being used.

Solution: Release the resource and try again.

CTAERR_SERVICE_IN_USE

0x10000008

268435464

Attempted to open a service (ctaOpenServices) that has already been opened.

CTAERR_SERVICE_NOT_AVAILABLE

0x10000006

268435462

The specified service is not available.

CTAERR_SHAREMEM_ACCESS

0x10

16

Problem: Failed to access shared memory.

Solution: Check that the ctdaemon is running.

CTAERR_TOO_MANY_OPEN_FILES

0x19

25

Problem: There are no more file handles available in the current process.

Solution: Close some files, or increase the file handle limit.

CTAERR_WAIT_PENDING

0x10000003

268435459

ctaWaitEvent was already called on the same queuehandle.

Numerical Error SummaryTop of Page

The following table is a list of Natural Access errors in numerical order:

Hex

Decimal

Error Name

0x1

1

CTAERR_RESERVED

0x2

2

CTAERR_FATAL

0x3

3

CTAERR_BOARD_ERROR

0x4

4

CTAERR_INVALID_CTAQUEUEHD

0x5

5

CTAERR_INVALID_CTAHD

0x6

6

CTAERR_OUT_OF_MEMORY

0x7

7

CTAERR_BAD_ARGUMENT

0x8

8

CTAERR_OUT_OF_RESOURCES

0x9

9

CTAERR_NOT_IMPLEMENTED

0xA

10

CTAERR_NOT_FOUND

0xB

11

CTAERR_BAD_SIZE

0xC

12

CTAERR_INVALID_STATE

0xD

13

CTAERR_FUNCTION_NOT_AVAIL

0xE

14

CTAERR_FUNCTION_NOT_ACTIVE

0xF

15

CTAERR_FUNCTION_ACTIVE

0x10

16

CTAERR_SHAREMEM_ACCESS

0x11

17

CTAERR_INCOMPATIBLE_REVISION

0x12

18

CTAERR_RESOURCE_CONFLICT

0x13

19

CTAERR_INVALID_SEQUENCE

0x14

20

CTAERR_DRIVER_OPEN_FAILED

0x15

21

CTAERR_DRIVER_VERSION

0x16

22

CTAERR_DRIVER_RECEIVE_FAILED

0x17

23

CTAERR_DRIVER_SEND_FAILED

0x18

24

CTAERR_DRIVER_ERROR

0x19

25

CTAERR_TOO_MANY_OPEN_FILES

0x1A

26

CTAERR_INVALID_BOARD

0x1B

27

CTAERR_OUTPUT_ACTIVE

0x1C

28

CTAERR_CREATE_MUTEX_FAILED

0x1D

29

CTAERR_LOCK_TIMEOUT

0x1E

30

CTAERR_ALREADY_INITIALIZED

0x1F

31

CTAERR_NOT_INITIALIZED

0x20

32

CTAERR_INVALID_HANDLE

0x21

34

CTAERR_FILE_NOT_FOUND

0x22

33

CTAERR_PATH_NOT_FOUND

0x23

35

CTAERR_FILE_ACCESS_DENIED

0x24

36

CTAERR_FILE_EXISTS

0x25

37

CTAERR_FILE_OPEN_FAILED

0x26

38

CTAERR_FILE_CREATE_FAILED

0x27

39

CTAERR_FILE_READ_FAILED

0x28

40

CTAERR_FILE_WRITE_FAILED

0x29

41

CTAERR_DISK_FULL

0x2A

42

CTAERR_CREATE_EVENT_FAILED

0x2B

43

CTAERR_EVENT_TIMEOUT

0x2C

44

CTAERR_OS_INTERNAL_ERROR

0x2D

45

CTAERR_INTERNAL_ERROR

0x2E

46

CTAERR_DUPLICATE_CTAWAITOBJ

0x2F

47

CTAERR_NO_LICENSE

0x30

48

CTAERR_LICENSE_EXPIRED

0x10000001

268435457

CTAERR_INCOMPATIBLE_PARMS

0x10000002

268435458

CTAERR_DUPLICATE_EXTPARMS

0x10000003

268435459

CTAERR_WAIT_PENDING

0x10000004

268435460

CTAERR_WAIT_FAILED

0x10000005

268435461

CTAERR_INVALID_ADDRESS

0x10000006

268435462

CTAERR_SERVICE_NOT_AVAILABLE

0x10000007

268435463

CTAERR_SERVICE_ERROR

0x10000008

268435464

CTAERR_SERVICE_IN_USE

0x10000009

268435465

CTAERR_ALREADY_DEFINED

0x1000000A

268435466

CTAERR_TRACE_NOT_ENABLED

EventsTop of Page

This section provides a summary of Natural Access events.

Natural Access events are defined in the include file ctadef.h. Events are prefixed with CTAEVN.

The following table is an alphabetical listing of events and their descriptions:

Event Name

Hex

Description

CTAEVN_CLOSE_SERVICES_DONE

0x10002103

The specified services have been closed on the context.

CTAEVN_DESTROY_CONTEXT_DONE

0x10002101

The context has been destroyed.

CTAEVN_NULL_EVENT

0x10002100

ctaWaitEvent returned an error.

CTAEVN_OPEN_SERVICES_DONE

0x10002102

The specified services have been opened on the context.

CTAEVN_UPDATE_WAITOBJS

0x10002005

The internal array of wait objects that are managed by Natural Access have changed.

CTAEVN_WAIT_TIMEOUT

0x10002004

ctaWaitEvent timed out.



Table of Contents NMS Glossary Previous Page Version



Want to send us feedback on our documentation? Email: Tech_Pubs@nmss.com
Copyright © 2001, Natural MicroSystems, Inc. All rights reserved.