template <uint16_t kSize>
class MultiFrameBuffer
Defined at line 175 of file ../../third_party/openthread/src/lib/spinel/multi_frame_buffer.hpp
Defines a template frame buffer of a given size for storing multiple frames.
Unlike `FrameBuffer` class where a single frame can be stored, this class is capable of saving multiple frames
in a FIFO queue format.
Template Parameters
Public Methods
void MultiFrameBuffer<kSize> ()
Initializes the `MultiFrameBuffer` object.
Defined at line 181 of file ../../third_party/openthread/src/lib/spinel/multi_frame_buffer.hpp
void Clear ()
Clears the buffer, removing current frame and all previously saved frames.
It moves the write pointer to the beginning of the buffer.
Defined at line 193 of file ../../third_party/openthread/src/lib/spinel/multi_frame_buffer.hpp
bool HasFrame ()
Indicates whether the current frame (being written) is empty or not.
Defined at line 209 of file ../../third_party/openthread/src/lib/spinel/multi_frame_buffer.hpp
otError SetLength (uint16_t aLength)
Sets the length (number of bytes) of the current frame being written.
param[in] aLength The length of current frame.
Defined at line 219 of file ../../third_party/openthread/src/lib/spinel/multi_frame_buffer.hpp
uint16_t GetLength ()
Gets the length (number of bytes) in the current frame being written into the buffer.
Defined at line 238 of file ../../third_party/openthread/src/lib/spinel/multi_frame_buffer.hpp
otError SetSkipLength (uint16_t aSkipLength)
Sets the length (number of bytes) of reserved buffer in front of the current frame being written.
param[in] aSkipLength The length of reserved buffer.
Defined at line 248 of file ../../third_party/openthread/src/lib/spinel/multi_frame_buffer.hpp
uint16_t GetSkipLength ()
Gets the length (number of bytes) of reserved buffer in front of the current frame being written.
Defined at line 268 of file ../../third_party/openthread/src/lib/spinel/multi_frame_buffer.hpp
uint8_t * GetFrame ()
Gets a pointer to the start of the current frame.
Defined at line 278 of file ../../third_party/openthread/src/lib/spinel/multi_frame_buffer.hpp
uint16_t GetFrameMaxLength ()
Gets the maximum length of the current frame.
Defined at line 285 of file ../../third_party/openthread/src/lib/spinel/multi_frame_buffer.hpp
otError SaveFrame ()
Saves the current frame and prepares the write pointer for a next frame to be written into the
buffer.
Saved frame can be retrieved later using `GetNextSavedFrame()`.
Defined at line 296 of file ../../third_party/openthread/src/lib/spinel/multi_frame_buffer.hpp
void DiscardFrame ()
Discards the current frame and prepares the write pointer for a next frame to be written into the
buffer.
Defined at line 320 of file ../../third_party/openthread/src/lib/spinel/multi_frame_buffer.hpp
bool HasSavedFrame ()
Indicates whether there are any saved frames in the buffer.
Defined at line 334 of file ../../third_party/openthread/src/lib/spinel/multi_frame_buffer.hpp
otError GetNextSavedFrame (uint8_t *& aFrame, uint16_t & aLength)
Iterates through previously saved frames in the buffer, getting a next frame in the queue.
Parameters
Defined at line 348 of file ../../third_party/openthread/src/lib/spinel/multi_frame_buffer.hpp
void ClearSavedFrames ()
Clears all saved frames from the buffer and adjusts all the pointers.
Defined at line 393 of file ../../third_party/openthread/src/lib/spinel/multi_frame_buffer.hpp