FreeRTOScpp
Loading...
Searching...
No Matches
MessageBufferBase Class Reference

Base Wrapper Class for MessageBuffer. More...

#include <MessageBufferCPP.h>

Inheritance diagram for MessageBufferBase:
Collaboration diagram for MessageBufferBase:

Public Member Functions

 MessageBufferBase (MessageBufferHandle_t mbHandle)
 
virtual ~MessageBufferBase ()
 
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)
 

Public Attributes

MessageBufferHandle_t msgHandle
 

Detailed Description

Base Wrapper Class for MessageBuffer.

Base Class does all the operations, there is then a derived class to build the buffer, or the base class can be a wrapper around an elsewhere created handle.

Constructor & Destructor Documentation

◆ MessageBufferBase()

MessageBufferBase::MessageBufferBase ( MessageBufferHandle_t mbHandle)
inline

◆ ~MessageBufferBase()

virtual MessageBufferBase::~MessageBufferBase ( )
inlinevirtual

Member Function Documentation

◆ available()

size_t MessageBufferBase::available ( ) const
inline

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
inline

◆ isFull()

bool MessageBufferBase::isFull ( ) const
inline

◆ read()

size_t MessageBufferBase::read ( void * data,
size_t len,
TickType_t delay = portMAX_DELAY )
inline

◆ read_ISR()

size_t MessageBufferBase::read_ISR ( void * data,
size_t len,
BaseType_t & wasWoken )
inline

◆ reset()

bool MessageBufferBase::reset ( )
inline

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 )
inline

◆ send_ISR()

size_t MessageBufferBase::send_ISR ( const void * data,
size_t len,
BaseType_t & wasWoken )
inline

Member Data Documentation

◆ msgHandle

MessageBufferHandle_t MessageBufferBase::msgHandle

The documentation for this class was generated from the following file: