| Customize Help
| Save Settings

MobjMessageRead



Function Map
Synopsis
Reads data from a message sent to the message mailbox.
Syntax
MIL_INT64 MobjMessageRead(
MIL_ID MessageId, //in
void *MessagePtr, //out
MIL_INT64 MessageInSize, //in
MIL_INT64 *MessageOutSizePtr, //out
MIL_INT64 *MessageTagPtr, //out
MIL_INT64 *StatusPtr, //out
MIL_INT64 OperationFlag //in
)
Description

This function reads the data from a message sent to the message mailbox.

Note that this function reference has not been updated for a MIL system added during a MIL update. Refer to the MIL system's release note to see if there is complementary information.
Parameters
This function is not supported on the selected boards.
Parameters
MessageId

Specifies the identifier of the message mailbox.

MessagePtr
Accepts the following address:
  • Data type: array of type MIL_UINT8 [optionally, in C++: a reference to a std::vector<MIL_UINT8> ]
    Required array size:(MessageInSize)

Specifies the address of the variable in which the message is to be written. If M_NULL is specified, this function will return the length of the message.

MessageInSize

Specifies the size of the array pointed to by MessagePtr, in bytes. You must set this value to 0 if MessagePtr is set to M_NULL.

When using a standard vector (std::vector) overload function in C++, you can pass M_DEFAULT to this parameter and MIL will automatically determine the size based on the number of items in the vector passed to the parameter.

MessageOutSizePtr

Specifies the address of the variable in which the size of the message to be read will be written. If unused, set to M_NULL.

MessageTagPtr

Specifies the address of the variable in which the message tag associated with the message will be written. If unused, set to M_NULL.

StatusPtr

Specifies the address of the variable in which the status of the read operation will be written.

function map For specifying the status of the operation
Click to summarizeValue Description
Click to summarize M_BUFFER_TOO_SMALL

Specifies the current message is not copied or deleted. The returned message length will be the required length in bytes.

(summarize)
Click to summarize M_READ_TIMEOUT

Specifies the read timeout has been attained. The returned message length will be 0.

(summarize)
Click to summarize M_SUCCESS

Specifies the message is copied to MessagePtr.

OperationFlag

Specifies additional options for the read operation.

function map For specifying the operation
Click to summarizeValue Description
Click to summarize M_DEFAULT

Specifies the default behavior.

Click to summarize M_KEEP_IN_QUEUE

Specifies that if the mailbox is of type M_QUEUE, the message will not be deleted after the read operation.

Click to summarize M_NO_TIMEOUT

Specifies to not use the read operation timeout. This will return a status of M_SUCCESS and return 0 if no messages are ready to be read.

(summarize)
Click to summarize M_REMOVE

Specifies to remove the current message without reading it.

Return value
The returned value is the same as the value written in MessageOutSizePtr.
Compilation information
Header Include mil.h.
Library Use mil.lib.
DLL Requires mil.dll.
BUFFER TOO SMALL READ TIMEOUT SUCCESS DEFAULT KEEP IN QUEUE NO TIMEOUT REMOVE