This module includes functions that manipulate OpenThread message buffers.
More...
|
void | otMessageFree (otMessage *aMessage) |
|
uint16_t | otMessageGetLength (otMessage *aMessage) |
|
otError | otMessageSetLength (otMessage *aMessage, uint16_t aLength) |
|
uint16_t | otMessageGetOffset (otMessage *aMessage) |
|
otError | otMessageSetOffset (otMessage *aMessage, uint16_t aOffset) |
|
bool | otMessageIsLinkSecurityEnabled (otMessage *aMessage) |
|
void | otMessageSetDirectTransmission (otMessage *aMessage, bool aEnabled) |
|
int8_t | otMessageGetRss (otMessage *aMessage) |
|
otError | otMessageAppend (otMessage *aMessage, const void *aBuf, uint16_t aLength) |
|
int | otMessageRead (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) |
|
OTAPI void OTCALL | otMessageGetBufferInfo (otInstance *aInstance, otBufferInfo *aBufferInfo) |
|
This module includes functions that manipulate OpenThread message buffers.
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 |
( |
otMessage * |
aMessage | ) |
|
uint16_t otMessageGetOffset |
( |
otMessage * |
aMessage | ) |
|
int8_t otMessageGetRss |
( |
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 |
( |
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. |
int otMessageRead |
( |
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 |
|
) |
| |