4.10.4. Retrieving QoS Threshold Values
To retrieve QoS threshold values, use the gc_GetAlarmParm( ) function. See Section 3.4.6, gc_GetAlarmParm( ) for more information.
The following code demonstrates how to retrieve QoS threshold values.
- Notes:
- 1. The following code uses the IPM_QOS_THRESHOLD_INFO structure from the IP Media Library (IPML). See the IP Media Library API Library Reference and the IP Media Library API Programming Guide for more information.
2. The unTimInterval, unDebounceOn, unDebounceOff, unPercentSuccessThreshold, unPercentFailThreshold fields are not supported when using Intel® NetStructure IPT boards./***************************************************************************** Routine: GetAlarmParm Assumptions/Warnings: None Description: calls gc_GetAlarmParm() Parameters: handle of Media device Returns: None ******************************************************************************/ void GetAlarmParm(int hMediaDevice) { ALARM_PARM_LIST alarm_parm_list; unsigned int n; IPM_QOS_THRESHOLD_INFO QoS_info; IPM_QOS_THRESHOLD_INFO *QoS_infop; QoS_info.unCount=2; QoS_info.QoSThresholdData[0].eQoSType = QOSTYPE_LOSTPACKETS; QoS_info.QoSThresholdData[1].eQoSType = QOSTYPE_JITTER; /* get QoS thresholds for LOSTPACKETS and JITTER */ alarm_parm_list.alarm_parm_fields[0].alarm_parm_data.pstruct = (void *) &QoS_info; alarm_parm_list.n_parms = 1; if (gc_GetAlarmParm(hMediaDevice, ALARM_SOURCE_ID_NETWORK_ID, ParmSetID_qosthresholdalarm, &alarm_parm_list, EV_SYNC) != GC_SUCCESS) { /* handle gc_GetAlarmParm() failure */ printf("gc_GetAlarmParm(hMediaDevice=%d, mode=EV_SYNC) Failed", hMediaDevice); return; } /* display threshold values retrieved */ printf("n_parms = %d\n", alarm_parm_list.n_parms); QoS_infop = alarm_parm_list.alarm_parm_fields[0].alarm_parm_data.pstruct; for (n=0; n < QoS_info.unCount; n++) { printf("QoS type = %d\n", QoS_infop->QoSThresholdData[n].eQoSType); printf("\tTime Interval = %u\n", QoS_infop->QoSThresholdData[n].unTimeInterval); printf("\tDebounce On = %u\n", QoS_infop->QoSThresholdData[n].unDebounceOn); printf("\tDebounce Off = %u\n", QoS_infop->QoSThresholdData[n].unDebounceOff); printf("\tFault Threshold = %u\n", QoS_infop->QoSThresholdData[n].unFaultThreshold); printf("\tPercent Success Threshold = %u\n", QoS_infop->QoSThresholdData[n].unPercentSuccessThreshold); printf("\tPercent Fail Threshold = %u\n", QoS_infop->QoSThresholdData[n].unPercentFailThreshold); printf("\n\n"); } }
Click here to contact Telecom Support Resources
Copyright 2003, Intel Corporation