Mailboxes are used to communicate between tasks.
More...
#include <nbrtos.h>
Inherits OS_TASK_DLY_OBJ.
|
| OS_MBOX () |
| Create and initialize a mailbox object.
|
|
| OS_MBOX (void *msg) |
| Create and initialize a mailbox object with a given message. More...
|
|
uint8_t | Init (void *msg=NULL) |
| Sets the mailbox object to its initial state. More...
|
|
uint8_t | Post (void *msg) |
| This function posts a message to the mailbox. More...
|
|
void * | Pend (uint32_t timeoutTicks, uint8_t &result) |
| Wait timeout ticks for some other task to post to the mailbox. Note: Pend will wait forever if 0 is passed in as the timeout value. More...
|
|
void * | PendNoWait (uint8_t &result) |
| Checks to see if a message has been posted to a mailbox, but does not wait. More...
|
|
void * | Pend (uint32_t timeoutTicks=WAIT_FOREVER) |
| Wait timeout ticks for some other task to post to the mailbox. This is the same as Pend(uint32_t timeoutTicks, uint8_t &result), but does not provide a return code. Note: Pend will wait forever if 0 is passed in as the timeout value. More...
|
|
void * | PendNoWait () |
| Checks to see if a message has been posted to a mailbox, but does not wait. This is the same as PendNoWait(uint8_t &result), but does not provide a return code. More...
|
|
Mailboxes are used to communicate between tasks.
◆ OS_MBOX()
OS_MBOX::OS_MBOX |
( |
void * |
msg | ) |
|
|
inline |
Create and initialize a mailbox object with a given message.
- Parameters
-
msg | Message that the mailbox should be initialized with |
◆ Init()
uint8_t OS_MBOX::Init |
( |
void * |
msg = NULL | ) |
|
Sets the mailbox object to its initial state.
- Parameters
-
msg | Message that the mailbox should be initialized with |
- Return values
-
- See also
- NBRTOS Error Codes
◆ Pend() [1/2]
void * OS_MBOX::Pend |
( |
uint32_t |
timeoutTicks, |
|
|
uint8_t & |
result |
|
) |
| |
|
inline |
Wait timeout ticks for some other task to post to the mailbox. Note: Pend will wait forever if 0 is passed in as the timeout value.
- Parameters
-
| timeoutTicks | The number of system ticks to wait |
[out] | result | The result status of the function: OS_NO_ERR if successful, OS_TIMEOUT if it timed out. |
- Return values
-
Message | If successful |
NULL | If it timed out |
- See also
- NBRTOS Error Codes
-
PendNoWait(uint8_t &result)
-
Pend(uint32_t timeoutTicks)
◆ Pend() [2/2]
void * OS_MBOX::Pend |
( |
uint32_t |
timeoutTicks = WAIT_FOREVER | ) |
|
|
inline |
◆ PendNoWait() [1/2]
void * OS_MBOX::PendNoWait |
( |
| ) |
|
|
inline |
◆ PendNoWait() [2/2]
void * OS_MBOX::PendNoWait |
( |
uint8_t & |
result | ) |
|
◆ Post()
uint8_t OS_MBOX::Post |
( |
void * |
msg | ) |
|
This function posts a message to the mailbox.
- Parameters
-
msg | Message that the mailbox should post |
- Return values
-
OS_NO_ERR | If successful |
OS_MBOX_FULL | If the mailbox is full |
- See also
- NBRTOS Error Codes
The documentation for this class was generated from the following files: