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

 

int mode

  function mode

Returns:

0 if successful

-1 if error

Includes:

dxxxlib.h

srlib.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 will 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 will continue until one of the following occurs:

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

If the channel detects end of FSK data during the receive portion, the function is terminated and ATDX_TERMMSK( ) will return TM_EOD as the cause of termination.

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 Termination Parameter Table for transmission.

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 Termination Parameter Table for reception.

wType:

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

NOTE:
This parameter also can be set to DT_RAW to transmit/receive binary data at 64Kbit/sec.

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. Applications can adjust the size of the buffers to address buffering delay. The DXCH_RXDATABUFSIZE channel parameter can be used with the dx_setparm( ) and dx_getparm( ) functions to adjust the buffer size.

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, Dialogic Corporation
All rights reserved
This page generated February, 2002