Table of Contents Index NMS Glossary Previous Page Next Page Version


Appendix B

CDI Service Events


Introduction
About Events
Events Ordered Alphabetically
Events Ordered Numerically

IntroductionTop of Page

The CDI Service uses the same event reporting mechanism as CT Access. The structure informs the application about which event occurred on which CTA context. This appendix is a summary of the events generated by the CDI service.

About EventsTop of Page

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

typedef struct
{
DWORD id; /* Event code (and source service ID) */
CTAHD ctahd; /* CT Access context handle */ DWORD timestamp; /* Timestamp */ DWORD userid; /* User-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 objHd; /* Service client side object handle */ } 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 event's prefix relates the event to a specific Natural MicroSystems library of functions. For example, the CTA prefix indicates CT Access; CDI indicates CDI service.

CDI service events are defined in cdidef.h.

The event structure contains the following fields:

Field

Description

id

An event code defined in the library header file. All CDI service events are prefixed with CDIEVN_ and are defined in cdidef.h.

ctahd

The CTA context handle (returned from ctaCreateContext).

timestamp

The time since the DSP was booted, in milliseconds (modulo 65536). The resolution for CX board events is 2 milliseconds. To provide a wider range, the timer alternates between even values (0, 2, 4, ...65534) and odd values (1, 3, 5, ...65535), every (approximately) 65 seconds.

userid

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

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

size

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

A pointer 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.

objHd

Service client side object handle.

Refer to the CT Access Developer's Reference Manual for a detailed explanation of events, errors, and reason codes in CT Access.

Events Ordered AlphabeticallyTop of Page

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

Description

CDIEVN_A_CHANGE_OFF

The A bit was just reset.

CDIEVN_A_CHANGE_ON

The A bit was just set.

CDIEVN_BOARD_STATUS_CHANGE

The board's status has changed.

Note: This event is only received by applications registered to received status change events (see Section 4.4).

CDIEVN_CX_HEART_BEAT_BACK

Communication with the DSP has been re-established.

CDIEVN_CX_HEART_BEAT_LOST

Communication with the DSP has been lost.

CDIEVN_DTMF_ENDED

The current DTMF ended.

CDIEVN_DTMF_STARTED

DTMF started. The ASCII representation of the key is in the value field.

CDIEVN_FLASH_HOOK

Station issued a flash-hook.

CDIEVN_OFF_HOOK

Station picked up.

CDIEVN_ON_HOOK

Station hung up.

CDIEVN_TIMER_DONE

An on-board timer has stopped. The event value field contains the reason.

CDIEVN_TIMER_START

An on-board timer has started.

CDIEVN_TIMER_STOP

An on-board timer has stopped.

CDIEVN_TIMER_TICK

An on-board timer is reporting a timer tick.

CDIEVN_TONE_DONE

A tone transmission is complete.

Events Ordered NumericallyTop of Page

The following table is a list of events in numerical order:
Hex

Decimal

Event Name

0x1F2001

2039809

CDIEVN_TONE_DONE

0x1F2002

2039810

CDIEVN_DTMF_STARTED

0x1F2003

2039811

CDIEVN_DTMF_ENDED

0x1F2004

2039812

CDIEVN_ON_HOOK

0x1F2005

2039813

CDIEVN_OFF_HOOK

0x1F2006

2039814

CDIEVN_FLASH_HOOK

0x1F2007

2039815

CDIEVN_A_CHANGE_OFF

0x1F2008

2039816

CDIEVN_A_CHANGE_ON

0x1F2009

2039817

CDIEVN_BOARD_STATUS_CHANGE

0x1F200A

2039818

CDIEVN_TIMER_TICK

0x1F200B

2039819

CDIEVN_TIMER_DONE

0x1F200C

2039820

CDIEVN_CX_HEART_BEAT_LOST

0x1F200D

2039821

CDIEVN_CX_HEART_BEAT_BACK

0x1F200E

2039822

CDIEVN_TIMER_START



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.