Previous PageTable Of Contents../index.htmlIndexNext Page

dx_setparm( )

Description | Cautions | Example | Errors | See Also

Name:

int dx_setparm(dev,parm,valuep)

Inputs:

int dev

  valid Dialogic channel or board device handle

 

unsigned long parm

  parameter type to set

 

void *valuep

  pointer to parameter value

Returns:

0 if successful

 

-1 if failure

Includes:

srllib.h

 

dxxxlib.h

Category:

Configuration

Top Of PageDescription

The dx_setparm( ) function allows you to set physical parameters of a channel or board device, such as off-hook delay, length of a pause, and flash character. Parameters can be set only one at a time. The possible values of parm are defined in Chapter 6. Voice Device Parameters.

The channel must be idle (for example., no I/O function running) when calling dx_setparm( ). Board and channel resources have different parameters that can be set. Setting board parameters affects all the channels on the board. Setting channel parameters only affects the specified channel.

To set board parameters the following requirements must be met:

The function parameters are defined as follows:

Parameter

Description

dev

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

parm

specifies the channel or board parameter to set.

 

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

NOTE:
The parameters set in parm will remain valid after the device has been closed and reopened.

valuep

points to the 4 byte variable that specifies the channel or board parameter to set.

NOTE:
You must use a void* cast on the address of the parameter being sent to the driver in valuep as shown in the example.

Top Of PageCautions

    1. A constant cannot be used in place of valuep. The value of the parameter to be set must be placed in a variable and the address of the variable cast as void * must be passed to the function.
    2. When setting channel parameters, the channel must be open and in the idle state.
    3. When setting board parameters, all channels on that board must be idle.

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

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