template <uint16_t kSize>
class MultiFrameBuffer
Defined at line 174 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 180 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 191 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 206 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 216 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 235 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 245 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 265 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 275 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 282 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 293 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 317 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 331 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 345 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 378 of file ../../third_party/openthread/src/lib/spinel/multi_frame_buffer.hpp