dtmGetTrunkStatus

Retrieves complete status and statistics for a digital T1/E1 trunk.

Prototype

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

Argument

Description

dtmhd

Handle to the trunk monitor object.

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

Return value

Description

SUCCESS

 

CTAERR_INVALID_HANDLE

dtmhd is not a valid monitor handle.

CTAERR_SVR_COMM

Communication error in server environment.


Details

dtmGetTrunkStatus 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 that copies data from the service context into the caller's buffer.

The same status structure is used for both E1 and 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), 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

dtmStartTrunkMonitor