(Page 2 of 7 in this chapter)


dtmGetTrunkStatus

Description

Retrieves complete status and statistics for a digital trunk.

Prototype

DWORD dtmGetTrunkStatus ( DTMHD dtmhd,
DTM_TRUNK_STATUS *status,
unsigned size)

dtmhd Handle returned by dtmStartTrunkMonitor.

status Pointer to the DTM_TRUNK_STATUS structure:

typedef struct
{
 DWORD size ;      /* size of this structure          */
 DWORD board ;      /* board number          */
 DWORD trunk ;      /* trunk number          */
 DTM_TRUNK_STATE state;      /* alarms and sync status          */
 DWORD starttime;      /* when counts started (time_t)         */
 DWORD slips;      /* slips accumulator         */
 DWORD lineerrors;      /* line code violations (BPVs)         */
 DWORD frameerrors;      /* frame bit errors+ CRC errors         */
 DWORD es;      /* errored seconds accumulator         */
 DWORD ses;      /* severely errored seconds         */
 DWORD uas;      /* unavailable seconds         */
} DTM_TRUNK_STATUS ;

size Size, in bytes, of the DTM_TRUNK_STATUS structure.

Return Values

Events

Details

This function retrieves the digital trunk status from the DTM service. The DTM service caches the most recent status and error counters received from the board. dtmGetTrunkStatus retrieves the status and counters and stores them in a DTM_TRUNK_STATUS structure.

This is a synchronous function. It simply copies data from the service context into the caller's buffer.

The same status structure is the used for both AG-E1 and AG-T1 boards. The first DWORD contains the size of the returned structure.

The status structure that is stored in the service context is updated each time an event is received from the board. If full reporting is not enabled (as specified in the reportmask field in DTM_START_PARMS), then the data may not reflect the current state of the board, unless dtmGetTrunkStatus was immediately preceded by an event. Use dtmRefreshTrunkStatus to force an event to be generated.

See Also

dtmRefreshTrunkStatus, dtmStartTrunkMonitor



(Page 2 of 7 in this chapter)


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