Publication 1756-RM004B-EN-P - October 2000
MVI Backplane API 3-13
MVIbp_WriteInputImage
Syntax:
int MVIbp_WriteInputImage(MVIHANDLE handle, WORD *buffer,
WORD offset, WORD length);
Parameters:
handle handle returned by previous call to MVIbp_Open
buffer pointer to buffer of data to be written to input image
offset word offset into input image at which to begin writing
length number of words to write
Description:
MVIbp_WriteInputImage writes to the module’s input image.
handle
must be a valid handle returned from MVIbp_Open.
buffer
must point to a buffer of at least
length
words in size.
offset
specifies the word in the input image to begin writing, and
length
specifies the number of words to write. The error
MVI_ERR_BADPARAM will be returned if an attempt is made to access
the input image beyond the range configured for direct I/O. If this error
is returned, no data will be written to the input image. See the
MVIbp_SetIOConfig function for more information.
The input image is written by the module and read by the control
processor.
Return Value:
MVI_SUCCESS data successfully written to the input image
MVI_ERR_NOACCESS
handle
does not have access
MVI_ERR_BADPARAM parameter contains invalid value
MVI_ERR_BADCONFIG IO data connection not open (1756-MVI only)
Example:
MVIHANDLE Handle;
WORD buffer[2];
int rc;
/* Write 2 words of data to the input image, starting with word 0 */
rc = MVIbp_WriteInputImage(Handle, buffer, 0, 2);
if (rc != MVI_SUCCESS)
printf(“ERROR: MVIbp_WriteInputImage failed”);
See Also:
MVIbp_GetIOConfig, MVIbp_ReadOutputImage