ipm_ResetQoSAlarmStatus( )
Termination Events | Cautions | Errors | Example | See Also
Name: int ipm_ResetQoSAlarmStatus(nDeviceHandle, *pQoSAlarmInfo, usMode) Inputs:
Returns: 0 on success -1 on failure Includes: srllib.h ipmlib.h Category: Mode: Platform: Description
The ipm_ResetQoSAlarmStatus( ) function resets QoS alarm(s) to the OFF state. Quality of Service (QoS) alarms report the status of a media channel, they do not report board-level alarms.
- Note: This function is not supported on Intel® NetStructure IPT Series boards.
nDeviceHandle handle of the IP Media device pQoSAlarmInfo pointer to IPM_QOS_ALARM_STATUS structure which contains one or more IPM_QOS_ALARM_DATA structures. usMode operation mode. Set to EV_ASYNC for asynchronous execution or to EV_SYNC for synchronous execution. Termination Events
- IPMEV_RESET_QOS_ALARM_STATUS
- indicates successful completion, that is, specified QoS alarm(s) have been reset to OFF. This event does not return data.
- IPMEV_ERROR
- indicates the function failed.
Cautions
Errors
If the function returns -1 to indicate failure, call ATDV_LASTERR( ) and ATDV_ERRMSGP( ) to return one of the following errors:
- EIPM_BADPARM
- Invalid parameter
- EIPM_INTERNAL
- Internal error
- EIPM_INV_MODE
- Invalid mode
- EIPM_INV_STATE
- Invalid state. Initial command did not complete before another function call was made.
- EIPM_SYSTEM
- System error
Example
#include <stdio.h> #include <srllib.h> #include <ipmlib.h> typedef long int(*HDLR)(unsigned long); void CheckEvent(); void main() { int nDeviceHandle; IPM_QOS_ALARM_STATUS myAlarmStatus; // Register event handler function with srl sr_enbhdlr( EV_ANYDEV ,EV_ANYEVT ,(HDLR)CheckEvent); /* . . Main Processing . . */ /* Reset the QOSTYPE_JITTER alarm for IP device handle, nDeviceHandle. NOTE: nDeviceHandle was obtained from prior call to ipm_Open() */ myAlarmStatus.unAlarmCount = 1; myAlarmStatus.QoSData[0].eQoSType = QOSTYPE_JITTER; if(ipm_ResetQoSAlarmStatus(nDeviceHandle, &myAlarmStatus, EV_ASYNC) == -1) { printf("ipm_ResetQoSAlarmStatus failed for device name = %s with error = %d\n", ATDV_NAMEP(nDeviceHandle), ATDV_LASTERR(nDeviceHandle)); /* . . Perform Error Processing . . */ } /* . . Continue Processing . */ } void CheckEvent() { int nEventType = sr_getevttype(); int nDeviceID = sr_getevtdev(); switch(nEventType) { /* . . Other events . */ /* Expected reply to ipm_ResetQoSAlarmStatus */ case IPMEV_RESET_QOS_ALARM_STATUS: printf("Received IPMEV_RESET_QOS_ALARM_STATUS for device = %s\n", ATDV_NAMEP(nDeviceID)); break; default: printf("Received unknown event = %d for device = %s\n", nEventType, ATDV_NAMEP(nDeviceID)); break; } }See Also
Click here to contact Telecom Support Resources
Copyright 2002, Intel Corporation