This module includes functions that manipulate OpenThread message buffers.
More...
|
void | otMessageFree (otMessage *aMessage) |
|
uint16_t | otMessageGetLength (const otMessage *aMessage) |
|
otError | otMessageSetLength (otMessage *aMessage, uint16_t aLength) |
|
uint16_t | otMessageGetOffset (const otMessage *aMessage) |
|
otError | otMessageSetOffset (otMessage *aMessage, uint16_t aOffset) |
|
bool | otMessageIsLinkSecurityEnabled (const otMessage *aMessage) |
|
void | otMessageSetDirectTransmission (otMessage *aMessage, bool aEnabled) |
|
int8_t | otMessageGetRss (const otMessage *aMessage) |
|
otError | otMessageAppend (otMessage *aMessage, const void *aBuf, uint16_t aLength) |
|
uint16_t | otMessageRead (const otMessage *aMessage, uint16_t aOffset, void *aBuf, uint16_t aLength) |
|
int | otMessageWrite (otMessage *aMessage, uint16_t aOffset, const void *aBuf, uint16_t aLength) |
|
void | otMessageQueueInit (otMessageQueue *aQueue) |
|
otError | otMessageQueueEnqueue (otMessageQueue *aQueue, otMessage *aMessage) |
|
otError | otMessageQueueEnqueueAtHead (otMessageQueue *aQueue, otMessage *aMessage) |
|
otError | otMessageQueueDequeue (otMessageQueue *aQueue, otMessage *aMessage) |
|
otMessage * | otMessageQueueGetHead (otMessageQueue *aQueue) |
|
otMessage * | otMessageQueueGetNext (otMessageQueue *aQueue, const otMessage *aMessage) |
|
void | otMessageGetBufferInfo (otInstance *aInstance, otBufferInfo *aBufferInfo) |
|
This module includes functions that manipulate OpenThread message buffers.
This structure represents the message buffer information.
This structure points to an OpenThread message buffer.
This enumeration defines the OpenThread message priority levels.
This structure represents a message settings.
This enumeration defines the OpenThread message priority levels.
Enumerator |
---|
OT_MESSAGE_PRIORITY_LOW |
Low priority level.
|
OT_MESSAGE_PRIORITY_NORMAL |
Normal priority level.
|
OT_MESSAGE_PRIORITY_HIGH |
High priority level.
|
otError otMessageAppend |
( |
otMessage * |
aMessage, |
|
|
const void * |
aBuf, |
|
|
uint16_t |
aLength |
|
) |
| |
Get the Message Buffer information.
- Parameters
-
[in] | aInstance | A pointer to the OpenThread instance. |
[out] | aBufferInfo | A pointer where the message buffer information is written. |
uint16_t otMessageGetLength |
( |
const otMessage * |
aMessage | ) |
|
uint16_t otMessageGetOffset |
( |
const otMessage * |
aMessage | ) |
|
int8_t otMessageGetRss |
( |
const otMessage * |
aMessage | ) |
|
This function returns the average RSS (received signal strength) associated with the message.
- Returns
- The average RSS value (in dBm) or OT_RADIO_RSSI_INVALID if no average RSS is available.
bool otMessageIsLinkSecurityEnabled |
( |
const otMessage * |
aMessage | ) |
|
This function indicates whether or not link security is enabled for the message.
- Parameters
-
[in] | aMessage | A pointer to a message buffer. |
- Return values
-
TRUE | If link security is enabled. |
FALSE | If link security is not enabled. |
This function removes a message from the given message queue.
- Parameters
-
[in] | aQueue | A pointer to the message queue. |
[in] | aMessage | The message to remove. |
- Return values
-
OT_ERROR_NONE | Successfully removed the message from the queue. |
OT_ERROR_NOT_FOUND | The message is not enqueued in this queue. |
This function adds a message to the end of the given message queue.
- Parameters
-
[in] | aQueue | A pointer to the message queue. |
[in] | aMessage | The message to add. |
- Return values
-
OT_ERROR_NONE | Successfully added the message to the queue. |
OT_ERROR_ALREADY | The message is already enqueued in a queue. |
This function adds a message at the head/front of the given message queue.
- Parameters
-
[in] | aQueue | A pointer to the message queue. |
[in] | aMessage | The message to add. |
- Return values
-
OT_ERROR_NONE | Successfully added the message to the queue. |
OT_ERROR_ALREADY | The message is already enqueued in a queue. |
This function returns a pointer to the message at the head of the queue.
- Parameters
-
[in] | aQueue | A pointer to a message queue. |
- Returns
- A pointer to the message at the head of queue or NULL if queue is empty.
This function returns a pointer to the next message in the queue by iterating forward (from head to tail).
- Parameters
-
[in] | aQueue | A pointer to a message queue. |
[in] | aMessage | A pointer to current message buffer. |
- Returns
- A pointer to the next message in the queue after
aMessage
or NULL if aMessage is the tail of queue. NULL is returned if
aMessageis not in the queue
aQueue`.
Initialize the message queue.
This function MUST be called once and only once for a otMessageQueue
instance before any other otMessageQueue
functions. The behavior is undefined if other queue APIs are used with an otMessageQueue
before it being initialized or if it is initialized more than once.
- Parameters
-
[in] | aQueue | A pointer to a message queue. |
uint16_t otMessageRead |
( |
const otMessage * |
aMessage, |
|
|
uint16_t |
aOffset, |
|
|
void * |
aBuf, |
|
|
uint16_t |
aLength |
|
) |
| |
void otMessageSetDirectTransmission |
( |
otMessage * |
aMessage, |
|
|
bool |
aEnabled |
|
) |
| |
This function sets/forces the message to be forwarded using direct transmission. Default setting for a new message is false
.
- Parameters
-
[in] | aMessage | A pointer to a message buffer. |
[in] | aEnabled | If true , the message is forced to use direct transmission. If false , the message follows the normal procedure. |
int otMessageWrite |
( |
otMessage * |
aMessage, |
|
|
uint16_t |
aOffset, |
|
|
const void * |
aBuf, |
|
|
uint16_t |
aLength |
|
) |
| |