Msg_wait – Rockwell Automation 1771-DMC_DMC1_DMC4_DXPS Control Coprocessor User Manual User Manual

Page 233

Advertising
background image

API Library of Routines

Appendix B

MSG_WAIT

B-102

Wait for one or more messages to complete.

C Syntax

#include <copro.h>

unsigned MSG_WAIT (r_mask,w_mask,sync,

r_rslt_mask,w_rslt_mask)

unsigned r_mask;
unsigned w_mask;
unsigned sync;
unsigned *r_rslt_mask;
unsigned *w_rslt_mask;

Parameters

Important: A bit set in the result mask indicates that the message is
completed; however, it does not indicate that the operation completed
without error. You must check the final completion status of each I/O
operation to verify that no error occurred.

r_mask

Bit map of the requested read message instructions. Bit 0 = message 0;
bit 31 = message 31. If the bit is set, this function checks for
completion of the message.

w_mask

Bit map of the requested write message instructions. Bit 0 = message 0;
bit 31 = message 31. If the bit is set, this function checks for
completion of the message.

sync

Use this parameter to specify if the function will return immediately (0)
if none of the requested messages have completed or if the function
will wait (1) for at least one message to complete before returning to
the user.

r_rslt_mask

Bit map of the results from the requested read message instructions.
Bit 0 = message 0; bit 31 = message 31. If the bit is set, this message
has completed I/O or has timed out.

MSG_WAIT

Advertising