Mbed OS Reference
Loading...
Searching...
No Matches
MessageBuilder::PayloadBuilder Struct Referenceabstract

Build a record payload. More...

#include <MessageBuilder.h>

Public Member Functions

virtual size_t size () const =0
 Return the size of the payload built by this object.
 
virtual void build (const Span< uint8_t > &buffer) const =0
 Build the payload in a buffer that has the required size.
 

Protected Member Functions

 ~PayloadBuilder ()
 Non virtual destructor.
 

Detailed Description

Build a record payload.

Definition at line 44 of file MessageBuilder.h.

Constructor & Destructor Documentation

◆ ~PayloadBuilder()

~PayloadBuilder ( )
protected

Non virtual destructor.

Definition at line 63 of file MessageBuilder.h.

Member Function Documentation

◆ size()

virtual size_t size ( ) const
pure virtual

Return the size of the payload built by this object.

Returns
The size of the payload.

◆ build()

virtual void build ( const Span< uint8_t > &  buffer) const
pure virtual

Build the payload in a buffer that has the required size.

Parameters
bufferThe buffer used to construct the payload.