ipm_SetParm( )
Termination Events | Cautions | Errors | Example | See Also
Name: int ipm_SetParm(nDeviceHandle, *pParmInfo, usMode) Inputs:
Returns: Includes: Category: Mode: Platform: Description
The ipm_SetParm( ) function sets values for the specified parameter.
nDeviceHandle handle of the IP media device pParmInfo pointer to structure that contains IP channel parameter values; see the IPM_PARM_INFO data structure page for details. usMode operation mode. Set to EV_ASYNC for asynchronous execution or to EV_SYNC for synchronous execution. Termination Events
- IPMEV_SET_PARM
- indicates successful completion, that is, the supplied IP channel parameter was modified.
- 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_FWERROR
- Firmware error
Example
#include <stdio.h> #include <srllib.h> #include <ipmlib.h> void CheckEvent(); typedef long int(*HDLR)(unsigned long); void main() { int nDeviceHandle; // Register event handler function with srl sr_enbhdlr( EV_ANYDEV ,EV_ANYEVT ,(HDLR)CheckEvent); /* . . Main Processing . . . */ /* ASSUMPTION: A valid nDeviceHandle was obtained from prior call to ipm_Open(). */ IPM_PARM_INFO ParmInfo; unsigned long ulParmValue = ECHO_TAIL_16; ParmInfo.eParm = PARMCH_ECHOTAIL; ParmInfo.pvParmValue = &ulParmValue; if(ipm_SetParm(nDeviceHandle, &ParmInfo, EV_ASYNC)==-1) { printf("ipm_SetParm failed for device name %s with error = %d\n", ATDV_NAMEP(nDeviceHandle), ATDV_LASTERR(nDeviceHandle)); /* . . Perform Error Processing . . */ } /* . . . continue . */ } void CheckEvent() { int nEventType = sr_getevttype(); int nDeviceID = sr_getevtdev(); void* pVoid = sr_getevtdatap(); switch(nEventType) { /* . . Other events . */ /* Expected reply to ipm_GetQoSAlarmStatus */ case IPMEV_SET_PARM: printf("Received IPMEV_SETPARM 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