Publication 1756-RM004B-EN-P - October 2000
3-10 MVI Backplane API
MVIbp_SetIOConfig
Syntax:
int MVIbp_SetIOConfig(MVIHANDLE handle, MVIBPIOCONFIG
*ioconfig);
Parameters:
handle handle returned by previous call to MVIbp_Open
ioconfig pointer to MVIBPIOCONFIG structure which contains
configuration information
Description:
This function may be used to set the size of the module’s I/O images
and messaging buffers.
handle
must be a valid handle returned from
MVIbp_Open.
MVIbp_SetIOConfig is a null function in the 1756-MVI module. The IO
image and message maximum sizes are configured by the controller
and cannot be changed by the MVI application. This function will
always return MVI_ERR_NOTSUPPORTED on the 1756-MVI module.
The MVIBPIOCONFIG structure is defined as shown below:
typedef struct tagMVIBPIOCONFIG
{
WORD TotalInputSize; // Size of entire input image in words
WORD TotalOutputSize; // Size of entire output image in words
WORD DirectInputSize; // Input words available for direct access
WORD DirectOutputSize; // Output words available for direct access
WORD MsgRcvBufSize; // Max size in words for received messages
WORD MsgSndBufSize; // Max size in words for sent messages
} MVIBPIOCONFIG;
The
TotalInputSize
and
TotalOutputSize
members are ignored by the
API, since the total (maximum) I/O image sizes cannot be changed by
the application. The
DirectInputSize
and
DirectOutputSize
members
should be set equal to the number of words of the respective image that
will be used for direct access via the MVIbp_WriteInputImage or
MVIbpReadOutputImage functions.
The
MsgRcvBufSize
member should be set to the maximum message
size expected via the MVIbp_ReceiveMessage function. Likewise, the
MsgSndBufSize
member should be set to the maximum message size to
be sent via the MVIbp_SendMessage function. The message sizes are
expressed in words. The maximum message size is 2048 words
(1794-MVI). Setting a message size to zero will disable messaging for
the corresponding direction.