IPC@CHIP® RTOS-PPC – API Documentation

Header image

Main page


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 128 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.

This API may be called from inside an RTX ISR.

Parameters:
id Message Exchange handle
mailbox Mailbox priority: 0 (highest) ... 3 (lowest priority)
msg The 12 byte message to be placed in the Message Exchange. The format of this message is user defined.
Returns:
Zero on success, else error code.
See also:
RTX_Get_Msg()     RTX_Wait_For_Msg()     RTX_Wait_For_MsgP()
Since:
SC2x3 V1.00 - CLIB V1.00





Top of page | Main page

Copyright © 2017 Beck IPC GmbH
Generated on Thu Jan 26 16:21:37 2017 by Doxygen 1.6.1