(Page 6 of 7 in this chapter)


dtmStartTrunkMonitor

Description

Starts monitoring a specified trunk.

Prototype

DWORD dtmStartTrunkMonitor ( CTAHD ctahd,
unsigned board,
unsigned trunk,
DTMHD *dtmhd,
DTM_START_PARMS
*parms)

ctahd Handle returned by ctaCreateContext.

board AG board number, as specified in the configuration file.

trunk The specific trunk on the board. The first trunk is 0.

dtmhd Pointer to the returned monitor handle.

parms Pointer to a parameter structure. Set this to NULL to use default values. The DTM_START_PARMS structure is:


typedef struct
{
 DWORD size;
 DWORD maxevents;
 DWORD reportmask;

} DTM_START_PARMS;

Return Values

Events

Details

This function starts monitoring a particular digital trunk and returns a DTM handle, dtmhd. Monitoring is active until it is stopped with dtmStopTrunkMonitor, or until the DTM service is closed, or until the CTA context associated with ctahd is destroyed. The dtmhd is valid until the application receives the DONE event from the call to dtmStopTrunkMonitor.

dtmStartTrunkMonitor can be called multiple times on the same CTA context for different trunks. Also, the same trunk can be simultaneously monitored by multiple CTA contexts.

parms points to a DTM_START_PARMS parameter structure. If parms is NULL, default parameter values will be used. Use CT Access' parameter management functions to change default parameter values for a processing context.

The fields in the DTM_START_PARMS structure include:

An application that is only interested in knowing when a trunk fails and when it is restored, should use the default value of 1 for reportmask. Set reportmask to 0x7F to get events when anything changes.

A DTMEVN_MONITOR_STARTED event, containing the current alarm status, will always be sent as soon as the monitoring is started.

dtmStartTrunkMonitor fails if the board type does not support monitoring.

See Also

dtmStopTrunkMonitor



(Page 6 of 7 in this chapter)


tech_support@nmss.com
Copyright © 1999, Natural MicroSystems, Inc. All rights reserved.