PREV TOC HOME INDEX NEXT


ec_getparm( )


Cautions | Example | Errors | See Also

Name: int ec_getparm(chDev, parmNo, lpValue)
Inputs: int chDev
  • valid channel device handle

unsigned long parmNo
  • parameter value

void *lpValue
  • pointer to memory where parameter value is stored
Returns: 0 for success -1 for failure
Includes: srllib.h dxxxlib.h eclib.h
Category: configuration
Mode: synchronous

Description

The ec_getparm( ) function returns the current parameter settings for an open device that supports Continuous Speech Processing (CSP).

Parameter
Description
chdev The channel device handle obtained when the CSP-capable device is opened using dx_open( ).
parmNo The define for the parameter whose value is returned in the variable pointed to by lpValue.
lpValue A pointer to the variable where the parmNo value is stored on return.

The same parameter IDs are available for ec_setparm( ) and ec_getparm( ). For details on these parameters, see the ec_setparm( ) function description.

Cautions

Example

#include <windows.h>  /* include in Windows applications only; exclude in Linux */
#include <stdio.h>
#include <srllib.h>
#include <dxxxlib.h>
#include <eclib.h>
#include <errno.h> /* include in Linux applications only; exclude in Windows */ 
main()
{ 
int chdev, parmval;
int srlmode;   /* Standard Runtime Library mode */ 
  /* Set SRL to run in polled mode. */
  srlmode = SR_POLLMODE;
  if (sr_setparm(SRL_DEVICE, SR_MODEID, (void *)&srlmode) == -1) {
     /* process error */
  } 
  /* Open the board and get channel device handle in chdev */
  if ((chdev = dx_open("dxxxB1C1",0)) == -1) {
     /* process error */
  } 
/* Clear parameter variable */
  parmval = 0; 
  /* Get parameter settings */
  if (ec_getparm(chdev, DXCH_BARGEIN, (void *)&parmval) == -1) {
     /* process error */
  }
  /* Get additional parameter settings as needed */
  . . .
} 

Errors

If the function returns -1, use ATDV_LASTERR( ) to return the error code and ATDV_ERRMSGP( ) to return a descriptive error message.

One of the following error codes may be returned:

Error code
Reason
EDX_BADDEV Device handle is NULL or invalid.
EDX_BADPARM Parameter is invalid or not supported.
EDX_BUSY Channel is busy (when channel device handle is specified) or first channel is busy (when board device handle is specified).
EDX_SYSTEM Operating system error.
EEC_UNSUPPORTED Device handle is valid but device does not support CSP.

See Also


PREV TOC HOME INDEX NEXT

Click here to contact Dialogic Customer Engineering

Copyright 2001, Intel Corporation
All rights reserved
This page generated December, 2001