
MVI-ADM ♦ 'C' Programmable Backplane API Functions
'C' Programmable Application Development Module Developer's Guide
ProSoft Technology, Inc. Page 217 of 342
February 20, 2013
The MVIbp_ReceiveMessage function retrieves data written to the MVI-ADM module by the
processor via a MSG instruction. The MSG instruction must be configured as shown in table A. The
MSG instruction implements a "put attribute' command to the MVI-ADM module’s assembly object.
The MSG instruction will fail if a message has already been written to the MVI-ADM module but
application has not yet retrieved the message via MVIbp_ReceiveMessage.
MVI69 Note: At this time, messaging is not supported on the MVI69.
Receive MSG Instruction Configuration
Set_Attribute_Single service
Assembly object class code
Output message instance number
Size of message to be written
Return Value
A message has been received.
handle does not have access.
The timeout occurred before a message was received.
Receive messaging is not enabled.
The received message is too big for the buffer.
Example
MVIHANDLE Handle;
int rc;
WORD buffer[256];
WORD length;
length = 256; // maximum message size that can be received
// Wait up to 5 seconds for a message
rc = MVIbp_ReceiveMessage(Handle, buffer, &length, 0, 5000);
if (rc == MVI_SUCCESS)
printf("Message received. Length is %d words\n", length);
See Also
MVIbp_SetIOConfig (page 208)
MVIbp_SendMessage (page 218)
Comentarios a estos manuales