Previous PageTable Of Contents../index.htmlIndexNext Page

dx_RxIottData( )

Description | Cautions | Example | Errors | See Also

Name:

int dx_RxIottData(chdev, iottp, lpTerminations, wType, lpParams, mode)

Inputs:

int chdev

  valid channel device handle

 

DX_IOTT *iottp

  pointer to I/O transfer table

 

DV_TPT *lpTerminations

  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_RxIottData( ) function is used to receive data on a specified channel. The data may come from any combination of data files, memory, or custom devices. The wType parameter specifies the type of data to be received, for example ADSI data.

After dx_RxIottData( ) is called, data reception continues until one of the following occurs:

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

Upon asynchronous completion of dx_RxIottData( ), the TDX_RXDATA event is posted.

Parameter

Description

chdev:

The valid Dialogic channel device handle.

iottp:

The pointer to the I/O Transfer Table. The iottp parameter specifies the destination for the received data. This is the same DX_IOTT structure used in dx_playiottdata( ) and dx_reciottdata( ).

lpTerminations:

The pointer to the Termination Parameter Table.

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 receive binary data at 64Kbit/sec.

lpParams:

The pointer to information specific to the data type specified in wType. The format of the parameter block depends on wType. For ADSI data, set lpParams to point to an ADSI_XFERSTRUC 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_RxIottData( ) 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