Previous PageTable Of ContentsHomeIndexNext Page

sr_getparm( )

Description | Cautions | Example | Errors

Name:

long sr_getparm(dev, parmno, valuep)

Inputs:

long dev

  device

 

long parmno

  parameter number

 

void *valuep

  parameter value

Returns:

0 if successful

 

-1 if failure

Includes:

srllib.h

Type:

SRL Parameter function

Top Of PageDescription

The sr_getparm( ) function returns the value of an SRL parameter. The function parameters are described as follows:

Parameter

Description

dev

Device handle. Generally, you should set this parameter to SRL_DEVICE, the predefined SRL device handle. However, if the parameter being set is SR_USERCONTEXT, then dev should be set to the handle returned by the technology-specific xx_open( ).

parmno

Specifies the SRL parameter for which values are returned. Possible values are as follows:

 

  • SR_MODELTYPE

Get the value for the model type. Returns an integer.

 

  • SR_INTERPOLLID

Get the value for the polling granularity (the time between device polls in millisecond units). Returns an integer.

 

  • SR_USERCONTEXT

Set user-specific context. This lets you quickly get application-specific context given on a dialogic device handle.

valuep

A pointer to an area of memory to receive the value for the specified parameter. This memory should be large enough to hold the parameter. Possible values are as follows:

 

  • SR_MODELTYPE

SR_STASYNC or SR_MTASYNC .

 

  • SR_INTERPOLLID

A number in milliseconds (ms).

 

  • SR_USERCONTEXT

User-specific context set through the sr_setparm( ) function.

Top Of PageCautions

Normally, when getting SRL parameters, you must set the dev parameter to SRL_DEVICE. However, if you set the parmno parameter to SR_USERCONTEXT, you must set the dev parameter to the device on which context is being retrieved.

Top Of PageExample

Top Of PageErrors

If this function returns -1 to indicate failure, obtain the reason for the error by calling the SRL standard attribute function ATDV_LASTERR(SRL_DEVICE) or ATDV_ERRMSGP(SRL_DEVICE) to retrieve either the error code or a pointer to the error description, respectively. One of the following errors may be returned:

ESR_SYS

  • Error from operating system; use dx_fileerrno( ) to obtain error value.


Previous PageTable Of ContentsTop Of PageIndexNext Page

Click here to contact Dialogic Customer Engineering

Copyright 2001, Dialogic Corporation
All rights reserved
This page generated January, 2001