
Description | Cautions | Example | Errors | See Also
Name: |
int dt_setparm(devh,param,valuep) | |
Inputs: |
int devh |
|
unsigned long param |
| |
void* valuep |
| |
0Returns: |
0 on success | |
Includes: |
srllib.h | |
Category: |
Parameter Setting | |
Mode: |
synchronous | |
The dt_setparm( ) function changes the value of a DNI device parameter.
Parameter |
Description |
devh: |
Specifies the valid Digital Network Interface logical board device handle returned by a call to dt_open( ) |
param: |
Specifies the parameter value to alter |
valuep: |
Specifies the address of the integer containing the value to be assigned to the parameter |
All time slots on the selected Digital Network Interface device must be closed when this function is called.
Table 6, found in the dt_getparm( ) function description, lists each parameter name, its default value, and a brief description.
#include <windows.h> /* For Windows applications only */
#include <srllib.h>
#include <dtilib.h>
#include <errno.h>
main()
{
int devh; /* Board device handle */
int valuep; /* Parameter value */
/*
* Open board 1 device
*/
if ( ( devh = dt_open( "dtiB1", 0 ) ) == -1 ) {
printf( "Cannot open board dtiB1. errno = %d", errno );
exit( 1 );
}
/*
* Set current clock parameter value
*/
valuep = DTC_EXT;
if ( dt_setparm( devh, DTG_SETCLK, ( void * )&valuep ) == -1 ) {
printf( "Error message = %s.",ATDV_ERRMSGP( devh ) );
exit( 1 );
}
.
.
.
}
If the function returns -1, use the SRL Standard Attribute function ATDV_LASTERR( ) to obtain the error code or use ATDV_ERRMSGP( ) to obtain a descriptive error message. See Appendix A - Standard Runtime Library for more information on SRL functions. The error codes returned by ATDV_LASTERR( ) are:
Error defines can be found in the file dtilib.h.
Click here to contact Dialogic Customer Engineering
Copyright 2001, Dialogic Corporation