|
RTOS Wrapper
API reference
|
Fixed-capacity, eager-init MPMC queue of trivially-copyable items. More...
#include <OsQueue.h>
Public Member Functions | |
| OsQueue (const char *queueName) noexcept | |
| Construct and create the underlying RTOS queue eagerly. | |
| OsQueue (const OsQueue &)=delete | |
| OsQueue & | operator= (const OsQueue &)=delete |
| ~OsQueue () noexcept | |
| bool | IsValid () const noexcept |
| True if the underlying RTOS queue was created successfully. | |
| bool | Send (const MessageType &message, uint32_t timeout_ms=UINT32_MAX) noexcept |
Send a message; blocks up to timeout_ms. | |
| bool | Receive (MessageType &out, uint32_t timeout_ms=UINT32_MAX) noexcept |
Receive a message; blocks up to timeout_ms. | |
Static Public Member Functions | |
| static constexpr size_t | Capacity () noexcept |
| Compile-time capacity in elements. | |
Static Private Member Functions | |
| static OS_Ulong | ToTicks (uint32_t timeout_ms) noexcept |
Private Attributes | |
| const char * | name_ |
| bool | created_ {false} |
| OS_Queue | queue_ {} |
| uint8_t | storage_ [kStoreBytes] |
Static Private Attributes | |
| static constexpr size_t | kItemWords = (sizeof(MessageType) + sizeof(uint32_t) - 1U) / sizeof(uint32_t) |
| Item size in 32-bit words, as the kernel queue stores it. | |
| static constexpr size_t | kStoreBytes |
| Backing storage the backend asks for (at least one byte, so the array is never empty). | |
Fixed-capacity, eager-init MPMC queue of trivially-copyable items.
| MessageType | Element type (must be trivially copyable; passed by value through the underlying queue). |
| kCapacity | Maximum number of pending elements. |
|
inlineexplicitnoexcept |
Construct and create the underlying RTOS queue eagerly.
|
delete |
|
inlinenoexcept |
|
inlinestaticconstexprnoexcept |
Compile-time capacity in elements.
|
inlinenoexcept |
True if the underlying RTOS queue was created successfully.
|
delete |
|
inlinenoexcept |
Receive a message; blocks up to timeout_ms.
|
inlinenoexcept |
Send a message; blocks up to timeout_ms.
|
inlinestaticprivatenoexcept |
|
private |
|
staticconstexprprivate |
Item size in 32-bit words, as the kernel queue stores it.
|
staticconstexprprivate |
Backing storage the backend asks for (at least one byte, so the array is never empty).
|
private |
|
private |
|
private |