Table of Contents Index NMS Glossary Previous Page Next Page Version


Appendix A

Events, Reasons, and Errors


Introduction
About Events
AG TRAU DONE Events
AG TRAU Reason Codes
Alphabetical Error Summary
Numerical Error Summary

IntroductionTop of Page

This chapter describes AG TRAU service events and reasons. Because the AG TRAU service is a CT Access service, its functions may also receive CT Access events, errors, and reasons. Refer to the CT Access Developer's Reference Manual for listings and descriptions of the CT Access events and reasons. All AG TRAU events and reasons are listed in trau.h.

About EventsTop of Page

All events in the CT Access environment are represented by a C data structure, as shown in the generic CTA_EVENT below:

typedef struct
{
DWORD id; /* event id (LIBEVN_xxx in 'libdef.h') */
CTAHD ctahd; /* CTA context handle */ DWORD timestamp; /* timestamp */ DWORD userid; /* use-supplied id */ DWORD size; /* size of buffer if buffer is not NULL */ /* otherwise, may contain event-specific data */ void *buffer; /* buffer pointer */ DWORD value; /* Event status or event-specific data */ DWORD reserved; /* must be 0 */ } CTA_EVENT;
This structure, returned by ctaWaitEvent, informs the application which event occurred on which CTA context, and provides additional information specific to the event. The three letter service acronym prefix (SVC) in SVCEVN relates the event to a specific Natural MicroSystems library of functions. For example, the CTA prefix indicates CT Access, NFX indicates NaturalFax, VPR indicates NaturalRecognition, and TRAU indicates AG TRAU.

The event structure contains the following fields:
Field

Description

id

Contains an event code defined in the library header file. All AG TRAU events are prefixed with TRAUEVN_ (e.g., TRAUEVN_SOMETHING_HAPPENED).

ctahd

Contains the CTA context handle (returned from ctaCreateContext).

timestamp

Contains the time when the event was created in milliseconds since midnight, January 1, 1970, modulo 49 days. The resolution for AG board events is 10 milliseconds.

userid

Contains the user-supplied ID. This field is unaltered by CT Access and facilitates asynchronous programming. Its purpose is to correlate a CT Access context with an application object/CTA context when events occur.

value

Contains an event-specific value. This field can hold a reason code or an error code.

size

Contains the size (bytes) of the area pointed to by buffer. If the buffer is NULL, this field may be used to hold an event-specific value.

buffer

Points to data returned with the event. The field contains an application process address and the event's size field contains the actual size of the buffer.

AG TRAU DONE EventsTop of Page

The following DONE events are specific to the AG TRAU service. As with all DONE events in the CT Access environment, they indicate that a function has completed executing. Examine the reason code or error code stored in the value field of the event for further information about the event.

Event Name

Hex

Decimal

Description

TRAUEVN_DETACH_DONE

0x000A2105

663813

trauDetach has completed.

TRAUEVN_DISABLE_DONE

0x000A2104

663812

trauDisable has completed.

TRAUEVN_ENABLE_DONE

0x000A2103

663811

trauEnable has completed.

TRAUEVN_HB_ERROR

0x000A2020

663584

value field returns CTAERR_NOT_FOUND.

HBF service read buffer does not match existing buffer list.

TRAUEVN_HB_GETMSG_ERROR

0x000A2021

663585

value field returns the returned error value from the low level routine.

TRAUEVN_HB_SENDBUFFER

0x000A2022

663586

Value field indicates the returned error value from the low level routine.

TRAUEVN_LOAD_DONE

0x000A2101

663809

trauLoad has completed.

TRAUEVN_UNLOAD_DONE

0x000A2102

663810

trauUnload has completed.

AG TRAU Reason Codes Top of Page

CTA_REASON_FINISHED may appear in the value field of the event of TRAU_DETACH_DONE, TRAU_DISABLE_DONE,
TRAU_ENABLE _DONE, or TRAU_UNLOAD_DONE events.

Alphabetical Error SummaryTop of Page

The following table provides an alphabetical listing of errors. All errors are 32 bits.
Error Name

Hex

Decimal

Description

CTAERR_FILE_OPEN_FAILED

0x25

37

File open failed due to a system error. The file may not exist.

CTAERR_FILE_READ_FAILED

0x27

39

Unable to read the specified program file.

CTAERR_FUNCTION_NOT_AVAILABLE

0xD

13

There is no Host-based Fusion vocoder for the register extension, or an illegal command was invoked.

CTAERR_INVALID_CTAHD

0x5

5

The specified CTA context handle is not available.

CTAERR_INVALID_STATE

0xC

12

The function is not valid in the current channel state.

CTAERR_NOT_FOUND

0xA

10

The specified value or resource could not be found.

CTAERR_OUT_OF_MEMORY

0x6

6

Host system memory allocation failed.

TRAUERR_ALREADY_ATTACHED

0xA000D

655373

The specified ctahd is already attached.

TRAUERR_BAD_FILE_SIZE

0xA000A

655370

The AG TRAU program file is not a valid size.

TRAUERR_CHANNEL_CONTEXT_FAILED

0xA0001

655361

Failed to open communication channel to the AG baseboard. Check the maxchannels field in the agmon configuration file.

TRAUERR_DISABLE_FAILED

0xA0003

655363

Unable to carry out the trauDisable command.

TRAUERR_ENABLE_FAILED

0xA0002

655362

Unable to carry out the trauEnable command.

TRAUERR_INVALID_RESPONSE

0xA0006

655366

An unexpected response was received from the vocoder. Check for the correct version of the vocoder and loader.

TRAUERR_IS_LOAD_HANDLE

0xA0004

655364

The specified ctahd was already used with trauLoad (and cannot be used with trauAttach or trauEnable).

TRAUERR_NO_BUFFER_AVAIL

0xA0007

655377

No event buffer available.

TRAUERR_NO_FREE_CHANNELS

0xA000C

655372

No detached channels are available on the specified loadhd.

TRAUERR_NO_FREE_DSP

0xA000B

655371

No DSP is available to load the AG TRAU program.

TRAUERR_NOT_ATTACHED

0xA000E

655374

The specified ctahd is not attached.

TRAUERR_NOT_CHANNEL_HANDLE

0xA0011

655377

The specified ctahd is not a valid TRAU channel handle.

TRAUERR_NOT_LOAD_HANDLE

0xA0010

655376

The specified loadhd is not a valid load handle.

TRAUERR_UNLOAD_IN_PROGRESS

0xA000F

655375

The channel associated with the specified ctahd cannot be enabled because it is in the process of being unloaded.

Numerical Error SummaryTop of Page

The following table provides a numerical listing of errors. All errors are 32 bits.
Hex

Decimal

Error Name

0x5

5

CTAERR_INVALID_CTAHD

0x6

6

CTAERR_OUT_OF_MEMORY

0xA

10

CTAERR_NOT_FOUND

0xC

12

CTAERR_INVALID_STATE

0xD

13

CTAERR_FUNCTION_NOT_AVAILABLE

0x25

37

CTAERR_FILE_OPEN_FAILED

0x27

39

CTAERR_FILE_READ_FAILED

0x000A0001

663561

TRAUERR_CHANNEL_CONTEXT_FAILED

0x000A0002

663562

TRAUERR_ENABLE_FAILED

0x000A0003

663563

TRAUERR_DISABLED_FAILED

0x000A0004

655364

TRAUERR_IS_LOAD_HANDLE

0x000A0006

655366

TRAUERR_INVALID_RESPONSE

0x000A0008

655367

TRAUERR_NO_BUFFERs_AVAIL

0x000A0009

655369

TRAUERR_BOARD_ERROR

0x000A000A

655370

TRAUERR_BAD_FILE_SIZE

0x000A000B

655371

TRAUERR_NO_FREE_DSP

0x00A0010C

655372

TRAUERR_NO_FREE_CHANNELS

0x000A000D

655373

TRAUERR_ALREADY_ATTACHED

0x000A000E

655374

TRAUERR_NOT_ATTACHED

0x000A000F

655375

TRAUERR_UNLOAD_IN_PROGRESS

0x000A0010

655376

TRAUERR_NOT_LOAD_HANDLE



Table of Contents Index NMS Glossary Previous Page Next Page Version


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