NMS_V5GetE1Status

Returns the status information for a specified E1 link provisioned on an active variant of an interface.

Prototype

NMS_V5_RESULT_T NMS_V5GetE1Status ( NMS_V5_INTERFACE_ID_T interfaceId, NMS_V5_E1_LOCATION_T e1_loc, NMS_V5_E1_STATUS_T *e1_status)

Argument

Description

interfaceId

Interface ID of a provisioned interface.

e1_loc

E1 link location specified in the following structure:

typedef union _NMS_V5_E1_LOCATION_T
{
   struct {
   DWORD  boardNb;
   DWORD  trunkNb;
} CG;
}NMS_V5_E1_LOCATION_T

See the Details section for field descriptions.

e1_status

Pointer to an application-provided buffer for receiving the following structure:

typedef struct {
       DWORD Size;      
       NMS_V5_E1_STATUSMASK_T StatusMask;
       DWORD Slips;
       DWORD Es; 
       DWORD Ses; 
       DWORD Uas;
       DWORD LineErrors;
       DWORD FrameErrors;
       DWORD ElaspedTime;
} NMS_V5_E1_STATUS_T;

See the Details section for field descriptions.


Return values

Return value

Description

NMSV5_SUCCESS

 

NMSV5_INTERNAL_FAILURE

Internal failure. Refer to the trace log for more information.

NMSV5_INVALID_E1

E1 link is not provisioned on the interface.

NMSV5_INVALID_INTERFACE_ID

Specified interface is not provisioned.

NMSV5_INVALID_PARMS

channel_stat buffer is NULL.

NMSV5_NOT_INITIALIZED

NMS V5 library was not initialized with NMS_V5Initialize.


Details

NMS_V5GetE1Status gets status information about a specified E1 link. The E1 link must be provisioned on an active variant of the interface. All status information values represent counts of events that occur within a time interval defined by the Elasped_time parameter.

The NMS_V5_E1_LOCATION_T structure includes the following fields:

Field

Description

boardNb

Logical board number where the E1 link is located (as defined by NMS OAM).

trunkNb

Trunk number associated with the E1 link as defined by NMS OAM.


The NMS_V5_E1_STATUS_T structure returns the following data:

Field

Description

Size

Size of the structure.

StatusMask

Current E1 status bit mask. This can be a combination of the following values:

NMSV5_E1_LOS
Loss of signal.

NMSV5_E1_LOF
Loss of frame.

NMSV5_E1_AIS
Alarm indication signal.

NMSV5_E1_RAI
Remote alarm indicator.

NMSV5_E1_CRC_BLOCK_ERR
CRC block error.

NMSV5_E1_CRC_BLOCK_INFO
C
RC block information (FEBE).

NMSV5_E1_NORMAL_FRAMES_0
Normal E1 frames (remote SA7 = 0).

NMSV5_E1_NORMAL_FRAMES_1
Normal E1 frames (remote SA7 = 1).

Slips

Slip count.

Es

Errored seconds count.

Ses

Severely errored seconds count.

Uas

Unavailable seconds count.

LineErrors

Line code violation count.

FrameErrors

Frame bit error and CRC error count.

ElaspedTime

Seconds since counters started. This represents the duration of the observation period (in seconds).


See also

NMS_V5GetChannelStatistics, NMS_V5ResetE1Status

Example

void  GetE1Status( void )
{
    NMS_V5_RESULT_T         NmsResult;
    DWORD                   InterfaceId;
    NMS_V5_E1_LOCATION_T    E1Location;
    NMS_V5_E1_STATUS_T      E1Status = {0};

    printf("NMS_V5GetE1Status:\n");

    /* Get parameters */
    promptdw_nodft("Enter InterfaceId", &InterfaceId);
    printf("Enter E1 location:\n");
    GetE1LocationNMS( &E1Location );

    NmsResult = NMS_V5GetE1Status( InterfaceId,
                                   E1Location,
                                   &E1Status);
    printf ("NMS_V5GetE1Status:Result=%s\n", PRINT_RESULT(NmsResult));

    if (NmsResult == NMSV5_SUCCESS)
    {
        printf("StatusMask: LOS=%i LOF=%i AIS=%i RAI=%i CRCErr=%i
               FEBE=%i N_SA7_0=%i N_SA7_1=%i\n", 
           ((E1Status.StatusMask & NMSV5_E1_LOS) ? 1 : 0),
           ((E1Status.StatusMask & NMSV5_E1_LOF) ? 1 : 0),
           ((E1Status.StatusMask & NMSV5_E1_AIS) ? 1 : 0),
           ((E1Status.StatusMask & NMSV5_E1_RAI) ? 1 : 0),
           ((E1Status.StatusMask & NMSV5_E1_CRC_BLOCK_ERR)   ? 1 : 0),
           ((E1Status.StatusMask & NMSV5_E1_CRC_BLOCK_INFO)  ? 1 : 0),
           ((E1Status.StatusMask & NMSV5_E1_NORMAL_FRAMES_0) ? 1 : 0),
           ((E1Status.StatusMask & NMSV5_E1_NORMAL_FRAMES_1) ? 1 : 0));

        printf("Slips           =%i\n",   E1Status.Slips);
        printf("Es              =%i\n",   E1Status.Es);
        printf("Ses             =%i\n",   E1Status.Ses);
        printf("Uas             =%i\n",   E1Status.Uas);
        printf("LineErrors      =%i\n",   E1Status.LineErrors);
        printf("FrameErrors     =%i\n",   E1Status.FrameErrors);
        printf("ElaspedTime     =%i\n",   E1Status.ElaspedTime);
    }
}