(Page 1 of 1 in this chapter)


Chapter 4

Data Structures


4.1 Introduction
4.2 DTM_TRUNK_STATE Structure
4.3 DTM_TRUNK_STATUS Structure
4.4 DTM_START_PARMS Structure

4.1 Introduction

This chapter describes the data structures in the DTM service:

4.2 DTM_TRUNK_STATE Structure

DTM_TRUNK_STATE is a 4-byte data structure which describes current alarm and synchronization state of a trunk. This structure is included in DTM_TRUNK_STATUS and in the status event. The structure is defined as follows:

typedef struct {
BYTE alarms ; /* 0 = no alarm
* 1 = Far end loss of frame ("yellow") * 2 = Alarm Indication Signal ("blue") * 4 = Loss of frame (T1 "red") E1: Loss of * sync, excessive BER * 8 = (E1) Far end loss of MF sync * 0x10 = (E1) TS16AIS */
BYTE sync /* 0 = in sync
* 1 = loss of signal * 2 = no (frame) sync * 4 = no multiframe sync * 8 = No CRC Multiframe Sync */
BYTE alarmsent /* 0 = no alarms
* 1 = sending loss of frame * 2 = sending AIS * 4 = sending loss of multiframe (E1 CAS) * 8 = sending TS16AIS (E1) */ BYTE spare
} DTM_TRUNK_STATE ;

4.3 DTM_TRUNK_STATUS Structure

DTM_TRUNK_STATUS contains current information about alarms, trunk status, and error statistics. The same structure is used for both T1 and E1 trunks. This data can be obtained by a synchronous function call (dtmGetTrunkStatus). The structure is defined as follows:

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 ;

4.4 DTM_START_PARMS Structure

DTM_START_PARMS is referenced in the call to dtmStartTrunkMonitor. It determines the maximum number of events to send per second, and when to send the events. The structure is defined as follows:

typedef struct
{
  DWORD size;        /* size of this structure                  */
  DWORD maxevents;        /* max number of events per second          */
  DWORD reportmask;        /* controls when to send events          */
} DTM_START_PARMS ;


 

The reportmask field can be set to any of the following values:

Value

Send events...

0

Only in response to dtmRefreshTrunkStatus.

1

Only when going in or out of alarm (ignoring type).

2

On any change in received alarms.

4

On any status/synchronization change (including Loss Of Signal).

8

On any slip.

0x10

On change in errored seconds counter

0x20

On change in failed seconds counter

0x40

On change in severe errored seconds counter

If an application needs to monitor only trunk failures and subsequent trunk restorations, it should use the default value of 1 for reportmask. If an application needs to be notified of any change in trunk status, it should set reportmask to 0x7F.



(Page 1 of 1 in this chapter)


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