Returns the status information for a specified E1 link provisioned on an active variant of an interface.
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 See the Details section for field descriptions. |
|
e1_status |
Pointer to an application-provided buffer for receiving the following structure: typedef struct { See the Details section for field descriptions. |
|
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. |
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 NMSV5_E1_LOF NMSV5_E1_AIS NMSV5_E1_RAI NMSV5_E1_CRC_BLOCK_ERR NMSV5_E1_CRC_BLOCK_INFO NMSV5_E1_NORMAL_FRAMES_0 NMSV5_E1_NORMAL_FRAMES_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). |
NMS_V5GetChannelStatistics, NMS_V5ResetE1Status
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);
}
}