cpix_open

Opens a channel for asynchronous I/O on the host while providing extended channel configuration.

Prototype

#include txcpi.h

TX_HANDLE cpix_open ( void *chkey, CPI_OPEN_CONFIG *opencfg)))

Argument

Description

chkey

User-controlled key passed back on all callback functions.

opencfg

Channel Configuration.


Return values

Return value

Description

CPI_INVALID_HANDLE

Unable to open the channel.


Details

Use cpix_open to open a channel for aynchronous I/O. The cpix_open function establishes a new asynchronous communication channel just as the cpia_open function does, but the cpix_open function allows for extended channel behavior control. If successful, TX_HANDLE is returned.

The CPI_OPEN_CONFIG structure contains the following fields:

Field

Type

Description

board

U16

Board number from which to receive packets.

channel

U16

DPR channel from which to receive packets.

maxInProg

U32

Maximum number of transmits or receives in progress for this channel:

  • 0 = use default

  • maximum = 256 [or less with certain board types])

avail[10]

U32

Fields reserved to be available for future extensions.

rxnotify

 

Pointer to a receive notification callback function.

txnotify

 

Pointer to a transmit notification callback function.

evnnotify

 

Pointer to an event notification callback function (reserved for future use).


The maxInProg field allows the calling application to override the default limit to the number of in-progress IO requests. All channels opened with the cpia_open function are limited to 16 reads/write in progress at any given time. An application can use the cpix_open function, specifying a larger value for maxInProg to extend this limit (up to a window size of 256 messages).

See also

cpia_intr, cpia_open, cpia_rxnotify, cpia_txnotify