Sleepy Message Queue#

API and Callbacks for the Sleepy Message Queue Component.

This component is a message buffering system used to store messages until they are retrieved or a settable message timeout expires.

Modules#

EmberAfSleepyMessage

Sleepy Message Queue

API#

uint8_t

Return the number of unused entries in the sleepy message queue.

emberAfPluginSleepyMessageQueueStoreMessage(EmberAfSleepyMessage *pmsg, uint32_t timeoutSec)

Store an EmberAfSleepyMessage to the sleepy message queue if an entry is available.

uint32_t
sli_zigbee_af_message_m_sec_remaining(EmberAfSleepyMessageId sleepyMsgId)

Return the number of milliseconds remaining until the sleepy message expires.

Return the next EmberAfSleepyMessageId value (that will expire next) for a given EmberEUI64.

bool
emberAfPluginSleepyMessageQueueGetPendingMessage(EmberAfSleepyMessageId sleepyMsgId, EmberAfSleepyMessage *pmsg)

Search the sleepy message queue for an entry with the specified EmberAfSleepyMessageId.

uint32_t

Return the time in milliseconds until the next message in the sleepy message queue will timeout.

uint8_t

Return the number of messages in the sleepy message queue that are buffered for a given EmberEUI64.

bool
emberAfPluginSleepyMessageQueueRemoveMessage(EmberAfSleepyMessageId sleepyMsgId)

Remove the message from the sleepy message queue with the specified EmberAfSleepyMessageId.

void

Remove all messages from the sleepy message queue whose destination address matches the specified EmberEUI64.

Typedefs#

typedef uint8_t

API Documentation#

emberAfPluginSleepyMessageQueueGetNumUnusedEntries#

uint8_t emberAfPluginSleepyMessageQueueGetNumUnusedEntries (void )

Return the number of unused entries in the sleepy message queue.

Parameters
N/A

Definition at line 58 of file app/framework/plugin/sleepy-message-queue/sleepy-message-queue.h

emberAfPluginSleepyMessageQueueStoreMessage#

EmberAfSleepyMessageId emberAfPluginSleepyMessageQueueStoreMessage (EmberAfSleepyMessage * pmsg, uint32_t timeoutSec)

Store an EmberAfSleepyMessage to the sleepy message queue if an entry is available.

Parameters
N/Apmsg

A pointer to an EmberAfSleepyMessage structure containing information about the message that should be stored.

N/AtimeoutSec

The time in seconds that the message should be stored in the sleepy message queue.

Returns

  • The EmberAfSleepyMessageId assigned to the message if stored, or EMBER_AF_PLUGING_SLEEPY_MESSAGE_INVALID_ID if the message could not be stored to the queue. The message may not be stored if the queue is full, or the time duration exceeds the maximum duration.


Definition at line 68 of file app/framework/plugin/sleepy-message-queue/sleepy-message-queue.h

sli_zigbee_af_message_m_sec_remaining#

uint32_t sli_zigbee_af_message_m_sec_remaining (EmberAfSleepyMessageId sleepyMsgId)

Return the number of milliseconds remaining until the sleepy message expires.

Parameters
N/AsleepyMsgId

The EmberAfSleepyMessageId of the message whose timeout should be found.

Returns

  • The number of milliseconds until the specified message expires, or 0xFFFFFFFF if a matching active message cannot be found.


Definition at line 76 of file app/framework/plugin/sleepy-message-queue/sleepy-message-queue.h

emberAfPluginSleepyMessageQueueGetPendingMessageId#

EmberAfSleepyMessageId emberAfPluginSleepyMessageQueueGetPendingMessageId (EmberEUI64 dstEui64)

Return the next EmberAfSleepyMessageId value (that will expire next) for a given EmberEUI64.

Parameters
N/AdstEui64

The EmberEUI64 value of a device whose EmberAfSleepyMessageId is being queried.

Returns

  • The EmberAfSleepyMessageId value of the next-expiring message for the specified EmberEUI64 if a match was found, or EMBER_AF_PLUGIN_SLEEPY_MESSAGE_INVALID_ID if a matching entry was not found.


Definition at line 84 of file app/framework/plugin/sleepy-message-queue/sleepy-message-queue.h

emberAfPluginSleepyMessageQueueGetPendingMessage#

bool emberAfPluginSleepyMessageQueueGetPendingMessage (EmberAfSleepyMessageId sleepyMsgId, EmberAfSleepyMessage * pmsg)

Search the sleepy message queue for an entry with the specified EmberAfSleepyMessageId.

Parameters
N/AsleepyMsgId

The EmberAfSleepyMessageId of the EmberAfSleepyMessage structure that should be looked up in the sleepy message queue.

N/Apmsg

A pointer to an EmberAfSleepyMessage structure. If a message is found in the sleepy message queue with a matching EmberAfSleepyMessageId, it will be copied to this structure.

If a match was found, it copies the message into the EmberAfSleepyMessage structure pointer.

Returns

  • true if a matching message was found or false if a match was not found.


Definition at line 98 of file app/framework/plugin/sleepy-message-queue/sleepy-message-queue.h

emberAfPluginSleepyMessageQueueGetNextMessageEventTimeoutMs#

uint32_t emberAfPluginSleepyMessageQueueGetNextMessageEventTimeoutMs (void )

Return the time in milliseconds until the next message in the sleepy message queue will timeout.

Parameters
N/A

Returns

  • The remaining time in milliseconds until the next message will timeout.


Definition at line 104 of file app/framework/plugin/sleepy-message-queue/sleepy-message-queue.h

emberAfPluginSleepyMessageQueueGetNumMessages#

uint8_t emberAfPluginSleepyMessageQueueGetNumMessages (EmberEUI64 dstEui64)

Return the number of messages in the sleepy message queue that are buffered for a given EmberEUI64.

Parameters
N/AdstEui64

The destination EUI64 that should be used to count matching messages in the sleepy message queue.

Returns

  • The number of messages in the sleepy message queue that are being sent to the specified EmberEUI64.


Definition at line 111 of file app/framework/plugin/sleepy-message-queue/sleepy-message-queue.h

emberAfPluginSleepyMessageQueueRemoveMessage#

bool emberAfPluginSleepyMessageQueueRemoveMessage (EmberAfSleepyMessageId sleepyMsgId)

Remove the message from the sleepy message queue with the specified EmberAfSleepyMessageId.

Parameters
N/AsleepyMsgId

The EmberAfSleepyMessageId that should be removed from the sleepy message queue.

Returns

  • true if a matching EmberAfSleepyMessageId was found and removed from the sleepy message queue, or false if not.


Definition at line 118 of file app/framework/plugin/sleepy-message-queue/sleepy-message-queue.h

emberAfPluginSleepyMessageQueueRemoveAllMessages#

void emberAfPluginSleepyMessageQueueRemoveAllMessages (EmberEUI64 dstEui64)

Remove all messages from the sleepy message queue whose destination address matches the specified EmberEUI64.

Parameters
N/AdstEui64

The EmberEUI64 to search for in the sleepy message queue. All entries with a matching destination EUI64 should be removed.


Definition at line 125 of file app/framework/plugin/sleepy-message-queue/sleepy-message-queue.h

Typedef Documentation#

EmberAfSleepyMessageId#

typedef uint8_t EmberAfSleepyMessageId

Definition at line 38 of file app/framework/plugin/sleepy-message-queue/sleepy-message-queue.h

Macro Definition Documentation#

EMBER_AF_PLUGIN_SLEEPY_MESSAGE_INVALID_ID#

#define EMBER_AF_PLUGIN_SLEEPY_MESSAGE_INVALID_ID
Value:
0xFF

Definition at line 47 of file app/framework/plugin/sleepy-message-queue/sleepy-message-queue.h