This class implements a message queue.
More...
#include <src/core/common/message.hpp>
|
|
class | Message |
| |
|
class | PriorityQueue |
| |
|
|
void * | mData |
| | Opaque data used by the implementation.
|
| |
This class implements a message queue.
§ QueuePosition
This enumeration represents a position (head or tail) in the queue.
This is used to specify where a new message should be added in the queue.
| Enumerator |
|---|
| kQueuePositionHead | Indicates the head (front) of the list.
|
| kQueuePositionTail | Indicates the tail (end) of the list.
|
§ Dequeue()
This method removes a message from the list.
- Parameters
-
| [in] | aMessage | The message to remove. |
- Return values
-
| OT_ERROR_NONE | Successfully removed the message from the list. |
| OT_ERROR_NOT_FOUND | The message is not enqueued in a list. |
§ Enqueue() [1/2]
This method adds a message to the end of the list.
- Parameters
-
| [in] | aMessage | The message to add. |
- Return values
-
| OT_ERROR_NONE | Successfully added the message to the list. |
| OT_ERROR_ALREADY | The message is already enqueued in a list. |
§ Enqueue() [2/2]
This method adds a message at a given position (head/tail) of the list.
- Parameters
-
| [in] | aMessage | The message to add. |
| [in] | aPosition | The position (head or tail) where to add the message. |
- Return values
-
| OT_ERROR_NONE | Successfully added the message to the list. |
| OT_ERROR_ALREADY | The message is already enqueued in a list. |
§ GetHead()
| Message * ot::MessageQueue::GetHead |
( |
void |
| ) |
const |
This method returns a pointer to the first message.
- Returns
- A pointer to the first message.
§ GetInfo()
| void ot::MessageQueue::GetInfo |
( |
uint16_t & |
aMessageCount, |
|
|
uint16_t & |
aBufferCount |
|
) |
| const |
This method returns the number of messages and buffers enqueued.
- Parameters
-
| [out] | aMessageCount | Returns the number of messages enqueued. |
| [out] | aBufferCount | Returns the number of buffers enqueued. |
The documentation for this class was generated from the following files: