Previous PageTable Of Contents../index.htmlIndexNext Page

dx_getparm( )

Description | Cautions | Example | Errors | See Also

Name:

int dx_getparm(dev,parm,valuep)

Inputs:

int dev

  valid Dialogic channel or board device handle

 

unsigned long parm

  parameter type to get value of

 

void *valuep

  pointer to variable for returning parameter value

Returns:

0 if success

 

-1 if failure

Includes:

srllib.h

 

dxxxlib.h

Category:

Configuration

Top Of PageDescription

The dx_getparm( ) function returns the current parameter settings for an open device. dx_getparm( ) can only obtain the value of one parameter at a time. The channel must be idle (i.e., no I/O function running) when calling dx_getparm( ).

The function parameters are defined as follows:

Parameter

Description

dev

specifies the valid Dialogic device handle obtained when a board or channel was opened using dx_open( ).

parm

specifies the define for the parameter type whose value is to be returned in the variable pointed to by valuep.

 

Board and channel parameter defines, defaults and descriptions are listed in Chapter 6. Voice Device Parameters.

valuep

points to the variable where the value of the parameter specified in parm should be returned.

NOTE:
You must use a void* cast on the returned parameter value, as demonstrated in the example code for this function.

valuep
should point to a variable large enough to hold the value of the parameter. Refer to Chapter 6. Voice Device Parameters and to the DXBD_ and DXCH_ defines in the dxxxlib.h file. The size of a parameter is encoded in the define for the parameter. The defines for parameter sizes are PM_SHORT, PM_BYTE, PM_INT, PM_LONG, PM_FLSTR (fixed length string), and PM_VLSTR (variable length string).

Most parameters are of type short.

Top Of PageCautions

We highly recommend that you clear the variable the parameter value is returned to prior to calling dx_getparm( ), as illustrated in the example below. The variable whose address is passed to should be of a size sufficient to hold the value of the parameter. See the function description for more information.

Top Of PageExample

Top Of PageErrors

If this function returns -1 to indicate failure, use ATDV_LASTERR( ) and ATDV_ERRMSGP( ) to retrieve one of the following error reasons:

EDX_BADPARM

  • Invalid Parameter

EDX_SYSTEM

EDX_BUSY

  • Channel is busy (when channel device handle is specified) or first channel is busy (when board device handle is specified)

Top Of PageSee Also


Previous PageTable Of ContentsTop Of PageIndexNext Page

Click here to contact Dialogic Customer Engineering

Copyright 2002, Dialogic Corporation
All rights reserved
This page generated February, 2002