Template to implement a Message Buffer of a given size.
More...
#include <MessageBufferCPP.h>
|
| MessageBuffer () |
|
virtual | ~MessageBuffer () |
|
size_t | available () const |
| Get the amount of available space open in the MessageBuffer.
|
|
bool | isEmpty () const |
|
bool | isFull () const |
|
size_t | read (void *data, size_t len, TickType_t delay=portMAX_DELAY) |
|
size_t | read_ISR (void *data, size_t len, BaseType_t &wasWoken) |
|
bool | reset () |
| Resets the buffer to empty.
|
|
size_t | send (const void *data, size_t len, TickType_t delay=portMAX_DELAY) |
|
size_t | send_ISR (const void *data, size_t len, BaseType_t &wasWoken) |
|
template<size_t size>
class MessageBuffer< size >
Template to implement a Message Buffer of a given size.
MessageBuffer will be created statically if possible.
- Template Parameters
-
size | The number of bytes to store in the buffer, 0 = dynamically created |
◆ MessageBuffer()
◆ ~MessageBuffer()
◆ available()
size_t MessageBufferBase::available |
( |
| ) |
const |
|
inlineinherited |
Get the amount of available space open in the MessageBuffer.
- Returns
- The number of bytes that can be sent before the buffer is full
◆ isEmpty()
bool MessageBufferBase::isEmpty |
( |
| ) |
const |
|
inlineinherited |
◆ isFull()
bool MessageBufferBase::isFull |
( |
| ) |
const |
|
inlineinherited |
◆ read()
size_t MessageBufferBase::read |
( |
void * | data, |
|
|
size_t | len, |
|
|
TickType_t | delay = portMAX_DELAY ) |
|
inlineinherited |
◆ read_ISR()
size_t MessageBufferBase::read_ISR |
( |
void * | data, |
|
|
size_t | len, |
|
|
BaseType_t & | wasWoken ) |
|
inlineinherited |
◆ reset()
bool MessageBufferBase::reset |
( |
| ) |
|
|
inlineinherited |
Resets the buffer to empty.
- Returns
- True if done, stream can not be reset if a task is waiting on the MessageBuffer.
◆ send()
size_t MessageBufferBase::send |
( |
const void * | data, |
|
|
size_t | len, |
|
|
TickType_t | delay = portMAX_DELAY ) |
|
inlineinherited |
◆ send_ISR()
size_t MessageBufferBase::send_ISR |
( |
const void * | data, |
|
|
size_t | len, |
|
|
BaseType_t & | wasWoken ) |
|
inlineinherited |
◆ msgHandle
MessageBufferHandle_t MessageBufferBase::msgHandle |
|
inherited |
The documentation for this class was generated from the following file: