Init()
Initializes the `FrameBuilder` to use a given buffer. `FrameBuilder` MUST be initialized before its other methods are used.
GetBytes() const
Returns a pointer to the start of `FrameBuilder` buffer.
GetLength() const
Returns the current length of frame (number of bytes appended so far).
GetMaxLength() const
Returns the maximum length of the frame.
SetMaxLength()
Sets the maximum length of the frame. Does not perform any checks on the new given length. The caller MUST ensure that the specified max length is valid for the frame buffer.
GetRemainingLength() const
Returns the remaining length (number of bytes that can be appended) in the frame.
CanAppend() const
Indicates whether or not there are enough bytes remaining in the `FrameBuilder` buffer to append a given number of bytes.
AppendUint8()
Appends an `uint8_t` value to the `FrameBuilder`.
AppendBigEndianUint16()
Appends an `uint16_t` value assuming big endian encoding to the `FrameBuilder`.
AppendBigEndianUint32()
Appends an `uint32_t` value assuming big endian encoding to the `FrameBuilder`.
AppendLittleEndianUint16()
Appends an `uint16_t` value assuming little endian encoding to the `FrameBuilder`.
AppendLittleEndianUint32()
Appends an `uint32_t` value assuming little endian encoding to the `FrameBuilder`.
AppendBytes()
Appends bytes from a given buffer to the `FrameBuilder`.
AppendMacAddress()
Appends a given `Mac::Address` to the `FrameBuilder`.
AppendBytesFromMessage()
Appends bytes read from a given message to the `FrameBuilder`.
Append()
AppendLength()
Appends the given number of bytes to the `FrameBuilder`. This method reserves @p aLength bytes at the current position of the `FrameBuilder` and returns a pointer to the start of this reserved buffer if successful. The reserved bytes are left uninitialized. The caller is responsible for initializing them.
Append()
WriteBytes()
Writes bytes in `FrameBuilder` at a given offset overwriting the previously appended content. Does not perform any bound checks. The caller MUST ensure that the given data length fits within the previously appended content. Otherwise the behavior of this method is undefined.
Write()
InsertBytes()
Inserts bytes in `FrameBuilder` at a given offset, moving previous content forward. The caller MUST ensure that @p aOffset is within the current frame length (from 0 up to and including `GetLength()`). Otherwise the behavior of this method is undefined.
Insert()
RemoveBytes()
Removes a given number of bytes in `FrameBuilder` at a given offset, moving existing content after removed bytes backward. Does not perform any bound checks. The caller MUST ensure that the given length and offset fits within the previously appended content. Otherwise the behavior of this method is undefined.
Append