This class represents a message pool.
More...
#include <src/core/common/message.hpp>
|
class | Iterator |
| This class represents an iterator for iterating through all queued message from this pool. More...
|
|
|
class | Message |
|
class | MessageQueue |
|
class | PriorityQueue |
|
This class represents a message pool.
§ Free()
void ot::MessagePool::Free |
( |
Message * |
aMessage | ) |
|
This method is used to free a message and return all message buffers to the buffer pool.
- Parameters
-
[in] | aMessage | The message to free. |
§ GetAllMessagesHead()
This method returns a pointer to the first message (head) in the all-messages list.
Messages are sorted based on their priority (head with highest priority) and order by which they are enqueued.
- Returns
- A pointer to the first message.
§ GetAllMessagesTail()
Iterator ot::MessagePool::GetAllMessagesTail |
( |
void |
| ) |
const |
|
inline |
This method returns a pointer to the last message (head) in the all-messages list.
Messages are sorted based on their priority (head with highest priority) and order by which they are enqueued.
- Returns
- A pointer to the last message.
§ GetFreeBufferCount()
uint16_t ot::MessagePool::GetFreeBufferCount |
( |
void |
| ) |
const |
|
inline |
This method returns the number of free buffers.
- Returns
- The number of free buffers.
§ New()
Message * ot::MessagePool::New |
( |
uint8_t |
aType, |
|
|
uint16_t |
aReserveHeader |
|
) |
| |
This method is used to obtain a new message.
The default priority kDefaultMessagePriority
is assigned to the message.
- Parameters
-
[in] | aType | The message type. |
[in] | aReserveHeader | The number of header bytes to reserve. |
- Returns
- A pointer to the message or NULL if no message buffers are available.
The documentation for this class was generated from the following files: