Previous PageTable Of Contents../index.htmlIndexNext Page

dx_TxRxIottData( )

Description | Cautions | Example | Errors | See Also

Name:

int dx_TxRxIottData(chdev, lpTxIott, lpTxTerminations, lpRxIott, lpRxTerminations. wType, lpParams, mode)

Inputs:

int chdev

  valid channel device handle

 

DX_IOTT *lpTxIott

  pointer to I/O transfer table

 

DV_TPT *lpTxTerminations

  pointer to termination parameter table

 

DX_IOTT *lpRxIott

  pointer to I/O transfer table

 

DV_TPT *lpRxTerminations

  pointer to termination parameter table

 

int wType

  data type

 

LPVOID lpParams

  pointer to data type-specific information

 

USHORT mode

  function mode

Returns:

0 if successful

-1 if error

Includes:

dxxxlib.h

srllib.h

Mode:

Synchronous/asynchronous

Top Of PageDescription

The dx_TxRxIottData( ) function is used to start a transmit-initiated reception of data (two-way ADSI), where faster remote terminal device (CPE) turnaround occurs, typically within 100 msec. Faster turnaround is required for two-way FSK so that the receive data is not missed while the application turns the channel around after the last sample of FSK transmission is sent.

The wType parameter specifies the type of data that is to be transmitted and received, i.e., two-way ADSI. The transmitted data may come from, and the received data may be directed to, any combination of data files, memory, or custom devices. The data is transmitted and received on a specified channel.

The lpTxIott parameter specifies the location of the messages to be transmitted. The destination for the retrieved messages is specified by lpRxIott.

The transmit portion of the dx_TxRxIottData( ) function continues until one of the following occurs:

The receive portion of the dx_TxRxIottData( ) function continues until one of the following occurs:

If the channel detects end of FSK data during the receive portion, the function is terminated. Use ATDX_TERMMSK( ) to return the cause of termination. Possible return values are:

TM_MAXTIME

Maximum function time exceeded

TM_USRSTOP

Function stopped by user

TM_EOD

End of FSK data detected on receive

TM_MAXDATA

Maximum data reached

TM_ERROR

I/O device error

Upon asynchronous completion of the transmit portion of the function, a TDX_TXDATA event is generated. Upon asynchronous completion of the receive portion of the function, a TDX_RXDATA event is generated.

Parameter

Description

chdev

The valid Dialogic channel device handle.

lpTxIott

The pointer to the I/O Transfer Table. lpTxIott specifies the source of the messages to be transmitted. This is the same DX_IOTT structure used in dx_playiottdata( ) and dx_reciottdata( ).

lpTxTerminations

The pointer to the DV_TPT Termination Parameter Table that sets the termination conditions for the device handle. Supported values are:

  DX_MAXTIME. For more information, see the DV_TPT structure in the Voice Software Reference.

  DX_MAXDATA. Specify a valid value in the tp_length field of the DV_TPT structure. Valid values are 1 through 65535.

lpRxIott

The pointer to the I/O Transfer Table structure. lpRxIott specifies the destination of the messages to be received. This is the same DX_IOTT structure used in dx_playiottdata( ) and dx_reciottdata( ).

lpRxTerminations

The pointer to the DV_TPT Termination Parameter Table that sets the termination conditions for the device handle. Supported values are:

  DX_MAXTIME. For more information, see the DV_TPT structure in the Voice Software Reference.

  DX_MAXDATA. Specify a valid value in the tp_length field of the DV_TPT structure. Valid values are 1 through 65535.

wType

Specifies the type of data to be transmitted and received. To transmit and receive ADSI data, set wType to DT_ADSI.

lpParams

The pointer to a structure that specifies additional information about the data that is to be sent and received. The structure type is determined by the data type (ADSI) specified by wType. For ADSI data, set lpParams to point to an ADSI_XFERSTRUC parameter block structure.

mode

Specifies how the function should execute, either EV_ASYNC (asynchronous) or EV_SYNC (synchronous).

Top Of PageCautions

Library level data is buffered when it is received. The buffer size is 255, which is the default buffer size used by the library.

Top Of PageExample

Top Of PageErrors

If the function returns -1 to indicate an error, use the SRL Standard Attribute function ATDV_LASTERR( ) to obtain the error code or you can use ATDV_ERRMSGP( ) to obtain a descriptive error message.

Possible error codes from the dx_TxRxIottData( ) function include the following:

Error Code

Description

EDX_BADPARM

Invalid data mode

EDX_BADIOTT

Invalid DX_IOTT (pointer to I/O transfer table)

EDX_BUSY

Channel already executing I/O function

EDX_SYSTEM

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

Top Of PageSee Also


Previous PageTable Of ContentsTop Of PageIndexNext Page

Click here to contact Dialogic Customer Engineering

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