IPC@CHIP® RTOS-LNX – API Documentation

Header image

Main page

◆ RTX_Send_Msg()

RTX_EC RTX_Send_Msg ( RTX_ID  id,
int  mailbox,
const void *  msg 

This API sends a message to a Message Exchange.

If tasks are waiting for a message from this exchange, this message will be given immediately to the first task waiting at the highest wait priority. If the task accepting the message is higher priority than the task calling this API, then an immediate task switch will result.

If no task was waiting for a message, then the message is stored at the Message Exchange in the specified priority mailbox. A Message Envelope object is used for this purpose. The system has a total of 256 Message Envelopes. (Note that for proper operation, the system may occasionally need a few of these Message Envelopes to convey internal messages. So care should be taken to not threaten exhaustion of this supply.) This API will return with error code RTX_EC_NO_FREE_MSG_ENVELOPE if the required Message Envelope was not available.

Each of the Message Exchanges four priority mailboxes was created with a limit on how many messages are allowed to be placed into the respective mailbox. This API will return with error code RTX_EC_MAILBOX_FULL if this limit has been reached and no message delivery results.

The messages are delivered from these mailboxes in FIFO order. The higher priority mailboxes are always emptied (delivered) first before resorting to the lower priority mailboxes.

idMessage Exchange handle
mailboxMailbox priority: 0 (highest) ... 3 (lowest priority)
msgThe 12 byte message to be placed in the Message Exchange. The format of this message is user defined.
Zero on success, else error code.
See also
RTX_Get_Msg()     RTX_Wait_For_Msg()     RTX_Wait_For_MsgP()

Top of page | Main page

Copyright © 2020 Beck IPC GmbH
Generated on Thu Mar 19 2020 11:08:05 by Doxygen 1.8.13