![]() |
Dataflow Runtime API
3.0.3.0
|
A Mailbox that can be used in an embOS task to receive fixed size messages. More...
#include <Imt.Base.OS.EmbOS/Mailbox.h>
Public Member Functions | |
Mailbox (void *const pHandle) | |
Constructor. More... | |
virtual | ~Mailbox (void) |
Destructor. More... | |
void | initialize (void) |
Init the mailbox. More... | |
void | deinitialize (void) |
Deletes the mailbox. More... | |
void | clear (void) |
Removes all messages from the mailbox. More... | |
MessageType | getMail (void) |
Gets the next message from the mailbox. More... | |
bool | getMailConditional (MessageType *const pMail) |
Gets the next message from the mailbox. More... | |
void | putMail (const MessageType message) |
Adds a message to the mailbox. More... | |
bool | putMailConditional (const MessageType message) |
Adds a message to the mailbox. More... | |
void | waitMail (void) |
This method returns imediately when the mailbox contains at least one message. More... | |
A Mailbox that can be used in an embOS task to receive fixed size messages.
See User and Reference Guide for embOS - Chapter 7 for more informations on mailboxes.
This template is used to create a mailbox of the required size in the context of the task.
imt::base::os::embos::Mailbox< MessageType, MailboxSize >::Mailbox | ( | void *const | pHandle | ) |
Constructor.
pHandle | The OS handle for the mailbox. |
|
virtual |
Destructor.
|
inline |
Removes all messages from the mailbox.
|
inline |
Deletes the mailbox.
|
inline |
Gets the next message from the mailbox.
This removes the message from the mailbox. If the mailbox is empty the task will be suspended until the mailbox contains a message.
|
inline |
Gets the next message from the mailbox.
This removes the message from the mailbox. If the mailbox is empty the method will return false but not suspend the task.
pMail | The return message. |
|
inline |
Init the mailbox.
Must be called before using any other method.
|
inline |
Adds a message to the mailbox.
This can be used from any task. If the mailbox is full the task will be suspended until the mailbox can hold the new message. The data is copied.
message | The message to put into the mailbox |
|
inline |
Adds a message to the mailbox.
This can be used from any task or interrupt handler. If the mailbox is full the mthod returns false but task will not be suspended. The data is copied.
message | The message to put into the mailbox. |
|
inline |
This method returns imediately when the mailbox contains at least one message.
If the mailbox is empty this method will suspend the calling task until a message is avaliable. This will not remove the message from the mailbox.