Modules#
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.
API#
Return the number of unused entries in the sleepy message queue.
Store an EmberAfSleepyMessage to the sleepy message queue if an entry is available.
Return the number of milliseconds remaining until the sleepy message expires.
Return the next EmberAfSleepyMessageId value (that will expire next) for a given EmberEUI64.
Search the sleepy message queue for an entry with the specified EmberAfSleepyMessageId.
Return the time in milliseconds until the next message in the sleepy message queue will timeout.
Return the number of messages in the sleepy message queue that are buffered for a given EmberEUI64.
Remove the message from the sleepy message queue with the specified EmberAfSleepyMessageId.
Remove all messages from the sleepy message queue whose destination address matches the specified EmberEUI64.
Typedefs#
Macros#
API Documentation#
emberAfPluginSleepyMessageQueueGetNumUnusedEntries#
uint8_t emberAfPluginSleepyMessageQueueGetNumUnusedEntries (void )
Return the number of unused entries in the sleepy message queue.
N/A |
60
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.
N/A | pmsg | A pointer to an EmberAfSleepyMessage structure containing information about the message that should be stored. |
N/A | timeoutSec | 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.
70
of file app/framework/plugin/sleepy-message-queue/sleepy-message-queue.h
emMessageMSecRemaining#
uint32_t emMessageMSecRemaining (EmberAfSleepyMessageId sleepyMsgId)
Return the number of milliseconds remaining until the sleepy message expires.
N/A | sleepyMsgId | 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.
78
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.
N/A | dstEui64 | 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.
86
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.
N/A | sleepyMsgId | The EmberAfSleepyMessageId of the EmberAfSleepyMessage structure that should be looked up in the sleepy message queue. |
N/A | pmsg | 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.
100
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.
N/A |
Returns
The remaining time in milliseconds until the next message will timeout.
106
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.
N/A | dstEui64 | 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.
113
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.
N/A | sleepyMsgId | 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.
120
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.
N/A | dstEui64 | The EmberEUI64 to search for in the sleepy message queue. All entries with a matching destination EUI64 should be removed. |
127
of file app/framework/plugin/sleepy-message-queue/sleepy-message-queue.h