Table of Contents Index NMS Glossary Previous Page Next Page (Page 39 of 69 in this chapter) Version


adiStartEnergyDetector

Description

Starts the energy detector.

Prototype

DWORD adiStartEnergyDetector ( CTAHD ctahd,
unsigned energyqual,
unsigned silencequal,
ADI_ENERGY_PARMS *parms )

ctahd CTA context handle returned by ctaCreateContext.

energyqual Qualification time for energy (in milliseconds).

silencequal Qualification time for silence (in milliseconds).

parms Pointer to energy detector parameter structure, as follows (NULL designates default values):

typedef struct

{ /* parameters for energy detection: */

DWORD size; /* size of this structure */

INT32 thresholdampl; /* silence level (dBm) */

DWORD deglitch; /* ms deglitch during transitions */

DWORD autostop; /* on detection, 1=autostop 0=don't */

} ADI_ENERGY_PARMS;

Return Values

Events

DSP File

For AG hardware, this function requires that dtmf.dsp or dtmfe.dsp has been loaded. On AG 2000 boards and AG 4000/C boards, dtmf.m54 or dtmfe.m54 must be loaded to the board before adiStartEnergyDetector will work.

On CG 6000C boards, dtmf.f54 or dtmfe.f54 must be loaded to the board before adiStartEnergyDetector will work.

For QX hardware, this function is supported in the standard DSP file.

Details

This function starts a low-level energy detector which reports energy and silence transitions.

The thresholdampl is the dBm threshold below which is considered silence. Once energy or silence is internally qualified as "detected," the deglitch time is used during transitions above and below the threshold. The autostop field indicates that the function should stop once energy or silence is detected.

If autostop is set, ADIEVN_ENERGY_DETECT_DONE is received with the value field set to CTA_REASON_FINISHED and the size field is set to either ADIEVN_ENERGY_DETECTED or ADIEVN_SILENCE_DETECTED.

In continuous mode, ADIEVN_ENERGY_DETECTED and ADIEVN_SILENCE_DETECTED are received as the detector changes between these states.

ADIEVN_ENERGY_DETECT_DONE may also be returned with the value field set to an error or CTA_REASON_STOPPED if adiStopEnergyDetector is called.

See Also

adiStopEnergyDetector



Table of Contents Index NMS Glossary Previous Page Next Page (Page 39 of 69 in this chapter) Version


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