|
| | Mail ()=default |
| | Create and initialize Mail queue.
|
| |
| bool | empty () const |
| | Check if the mail queue is empty.
|
| |
| bool | full () const |
| | Check if the mail queue is full.
|
| |
| T * | alloc (MBED_UNUSED uint32_t millisec=0) |
| | Allocate a memory block of type T, without blocking.
|
| |
| T * | try_alloc () |
| | Allocate a memory block of type T, without blocking.
|
| |
| T * | try_alloc_for (Kernel::Clock::duration_u32 rel_time) |
| | Allocate a memory block of type T, optionally blocking.
|
| |
| T * | alloc_for (uint32_t millisec) |
| | Allocate a memory block of type T, optionally blocking.
|
| |
| T * | try_alloc_until (Kernel::Clock::time_point abs_time) |
| | Allocate a memory block of type T, blocking.
|
| |
| T * | alloc_until (uint64_t millisec) |
| | Allocate a memory block of type T, blocking.
|
| |
| T * | calloc (MBED_UNUSED uint32_t millisec=0) |
| | Allocate a memory block of type T, and set memory block to zero.
|
| |
| T * | try_calloc () |
| | Allocate a memory block of type T, and set memory block to zero.
|
| |
| T * | try_calloc_for (Kernel::Clock::duration_u32 rel_time) |
| | Allocate a memory block of type T, optionally blocking, and set memory block to zero.
|
| |
| T * | calloc_for (uint32_t millisec) |
| | Allocate a memory block of type T, optionally blocking, and set memory block to zero.
|
| |
| T * | try_calloc_until (Kernel::Clock::time_point abs_time) |
| | Allocate a memory block of type T, blocking, and set memory block to zero.
|
| |
| T * | calloc_until (uint64_t millisec) |
| | Allocate a memory block of type T, blocking, and set memory block to zero.
|
| |
| osStatus | put (T *mptr) |
| | Put a mail in the queue.
|
| |
| osEvent | get (uint32_t millisec=osWaitForever) |
| | Get a mail from the queue.
|
| |
| T * | try_get () |
| | Get a mail from the queue.
|
| |
| T * | try_get_for (Kernel::Clock::duration_u32 rel_time) |
| | Get a mail from the queue.
|
| |
| osStatus | free (T *mptr) |
| | Free a memory block from a mail.
|
| |
template<typename T, uint32_t queue_sz>
class rtos::Mail< T, queue_sz >
The Mail class allows you to control, send, receive or wait for mail.
A mail is a memory block that is sent to a thread or interrupt service routine (ISR).
- Template Parameters
-
| T | Data type of a single mail message element. |
| queue_sz | Maximum number of mail messages in queue. |
- Note
- Memory considerations: The mail data store and control structures are part of this class - they do not (themselves) allocate memory on the heap, both for the Mbed OS and underlying RTOS objects (static or dynamic RTOS memory pools are not being used).
-
Bare metal profile: This class is not supported.
Definition at line 68 of file Mail.h.