PREV TOC HOME INDEX NEXT


4.10.3. Setting QoS Threshold Values

To set QoS threshold values, use the gc_SetAlarmParm( ) function. See Section 3.4.16, gc_SetAlarmParm( ) for more information.

The following code demonstrates how to set 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 unTimeInterval, unDebounceOn, unDebounceOff, unPercentSuccessThreshold, unPercentFailThreshold fields are not supported when using Intel® NetStructure IPT boards. These values should be set to 0.
/*****************************************************************************
Routine: SetAlarmParm
Assumptions/Warnings: None.
Description: calls gc_SetAlarmParm()
Parameters: handle of the Media device
Returns: None
******************************************************************************/

void SetAlarmParm(int hMediaDevice)
{
    ALARM_PARM_LIST alarm_parm_list;
    IPM_QOS_THRESHOLD_INFO QoS_info;
    alarm_parm_list.n_parms = 1;
    QoS_info.unCount=1;
    QoS_info.QoSThresholdData[0].eQoSType = QOSTYPE_LOSTPACKETS;
    QoS_info.QoSThresholdData[0].unTimeInterval = 50;
    QoS_info.QoSThresholdData[0].unDebounceOn = 100;
    QoS_info.QoSThresholdData[0].unDebounceOff = 100;
    QoS_info.QoSThresholdData[0].unFaultThreshold = 10;
    QoS_info.QoSThresholdData[0].unPercentSuccessThreshold = 90;
    QoS_info.QoSThresholdData[0].unPercentFailThreshold = 10;
    
    alarm_parm_list.alarm_parm_fields[0].alarm_parm_data.pstruct = 
    (void *) &QoS_info;
    
    if (gc_SetAlarmParm(hMediaDevice, ALARM_SOURCE_ID_NETWORK_ID,
          ParmSetID_qosthresholdalarm, &alarm_parm_list, EV_SYNC)!= GC_SUCCESS)
    {
        /* handle gc_SetAlarmParm() failure */
        printf("SetAlarmParm(hMediaDevice=%d, mode=EV_SYNC) Failed",
               hMediaDevice);
        return;
    }
    printf("SetAlarmParm(hMediaDevice=%d, mode=EV_SYNC) Succeeded",
           hMediaDevice);
} 

PREV TOC HOME INDEX NEXT

Click here to contact Telecom Support Resources

Copyright 2003, Intel Corporation
All rights reserved
This page generated February, 2003