A class that represents a batch of messages. More...
#include <pipe.h>
Public Member Functions | |
| constexpr | MessageBatch () |
| Instantiates an empty message batch. | |
| MessageBatch (const MessageBatch &)=default | |
| MessageBatch (MessageBatch &&)=default | |
| MessageBatch & | operator= (const MessageBatch &)=default |
| MessageBatch & | operator= (MessageBatch &&)=default |
| constexpr T | begin () |
| constexpr T | begin () const |
| constexpr T | end () |
| constexpr T | end () const |
| uint32_t | processed_bytes () const |
| Number of bytes processed by the iterator. | |
| void | NotifyProcessedBytes (uint32_t nb_bytes) |
| Notifies the batch that a given number of bytes have been processed. | |
| uint32_t | available_bytes () const |
| Returns number of bytes available in the batch. | |
| int32_t | message_limit () const |
| Returns maximum number of messages in the batch. | |
| uint8_t * | buf () const |
| Returns a pointer to the start of the batch. | |
Friends | |
| class | RxPipe |
A class that represents a batch of messages.
| T | An iterator for the particular message type. Refer to enso::PktIterator for an example of a raw packet iterator. |
|
inlineconstexpr |
|
inline |
Returns number of bytes available in the batch.
message_limit(), in which case, iterating over the batch will result in fewer bytes than available_bytes(). After iterating over the batch, the total number of bytes iterated over can be obtained by calling processed_bytes().
|
inlineconstexpr |
|
inlineconstexpr |
|
inline |
|
inlineconstexpr |
|
inlineconstexpr |
|
inline |
|
inline |
|
inline |