cdiStartSignalDetector

Starts on-board monitoring of the signaling bits. You must issue cdiEnableBattery before you start cdiStartSignalDetector.

Prototype

DWORD cdiStartSignalDetector ( CTAHD ctahd, CDI_SIGNALDETECTOR_PARMS *parms)

Argument

Description

ctahd

Context handle.

parms

Pointer to a structure specifying signal detection parameters:

typedef struct
{
   DWORD    size;
   DWORD    timeon;
   DWORD    timeoff;
   DWORD    min_flash_hook;
   DWORD    max_flash_hook;
} CDI_SIGNALDETECTOR_PARMS

Refer to CDI_SIGNALDETECTOR_PARMS for field descriptions.


Return values

Return value

Description

SUCCESS

 

CTAERR_BAD_ARGUMENT

Argument is not in the valid range.

CTAERR_INVALID_CTAHD

Handle is invalid.


Events

Event

Description

CDIEVN_OFF_HOOK

Station picked up.

CDIEVN_ON_HOOK

Station hung up.

CDIEVN_FLASH_HOOK

Flash-hook generated.

CDIEVN_A_CHANGE_ON

A bit was just set.

CDIEVN_A_CHANGE_OFF

A bit was just reset.


Details

Once station power is enabled, the DSP can monitor signaling bits. Use cdiStartSignalDetector to start on-board monitoring of the signaling bits.

When operating in enhanced mode, the DSP qualifies bit changes according to the parameters in the CDI_SIGNALDETECTOR_PARMS structure, as described in the following table:

Bit state change

Event presented to application

Qualified on-hook to off-hook (more than the timeon field value).

CDIEVN_OFF_HOOK

All off-hook to on-hook transitions less than min_flash_hook are ignored.

No events

Qualified off-hook to on-hook (more than min_flash_hook field value and remains on for less than the max_flash_hook field value).

CDIEVN_FLASH_HOOK

Qualified off-hook to on-hook (more than the max_flash_hook field value).

CDIEVN_ON_HOOK


When operating with enhanced mode disabled, only low-level supervisory signaling events CDIEVN_A_CHANGE_ON and CDIEVN_A_CHANGE_OFF are presented. Flash-hook detection is disabled.

Refer to Monitoring signaling bits for more information about signal detection.

See also

cdiStopSignalDetector