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#

sl_zigbee_af_sleepy_message_t

Sleepy Message Queue

API#

uint8_t

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

sl_zigbee_af_sleepy_message_queue_store_message(sl_zigbee_af_sleepy_message_t *pmsg, uint32_t timeoutSec)

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

uint32_t
sli_zigbee_af_message_m_sec_remaining(sl_zigbee_af_sleepy_message_id_t sleepyMsgId)

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

Return the next sl_zigbee_af_sleepy_message_id_t value (that will expire next) for a given sl_802154_long_addr_t.

bool
sl_zigbee_af_sleepy_message_queue_get_pending_message(sl_zigbee_af_sleepy_message_id_t sleepyMsgId, sl_zigbee_af_sleepy_message_t *pmsg)

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

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 sl_802154_long_addr_t.

bool
sl_zigbee_af_sleepy_message_queue_remove_message(sl_zigbee_af_sleepy_message_id_t sleepyMsgId)

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

void

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

Typedefs#

API Documentation#

sl_zigbee_af_sleepy_message_queue_get_num_unused_entries#

uint8_t sl_zigbee_af_sleepy_message_queue_get_num_unused_entries (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

sl_zigbee_af_sleepy_message_queue_store_message#

sl_zigbee_af_sleepy_message_id_t sl_zigbee_af_sleepy_message_queue_store_message (sl_zigbee_af_sleepy_message_t * pmsg, uint32_t timeoutSec)

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

Parameters
N/Apmsg

A pointer to an sl_zigbee_af_sleepy_message_t 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 sl_zigbee_af_sleepy_message_id_t assigned to the message if stored, or SL_ZIGBEE_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 (sl_zigbee_af_sleepy_message_id_t sleepyMsgId)

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

Parameters
N/AsleepyMsgId

The sl_zigbee_af_sleepy_message_id_t 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

sl_zigbee_af_sleepy_message_queue_get_pending_message_id#

sl_zigbee_af_sleepy_message_id_t sl_zigbee_af_sleepy_message_queue_get_pending_message_id (sl_802154_long_addr_t dstEui64)

Return the next sl_zigbee_af_sleepy_message_id_t value (that will expire next) for a given sl_802154_long_addr_t.

Parameters
N/AdstEui64

The sl_802154_long_addr_t value of a device whose sl_zigbee_af_sleepy_message_id_t is being queried.

Returns

  • The sl_zigbee_af_sleepy_message_id_t value of the next-expiring message for the specified sl_802154_long_addr_t if a match was found, or SL_ZIGBEE_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

sl_zigbee_af_sleepy_message_queue_get_pending_message#

bool sl_zigbee_af_sleepy_message_queue_get_pending_message (sl_zigbee_af_sleepy_message_id_t sleepyMsgId, sl_zigbee_af_sleepy_message_t * pmsg)

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

Parameters
N/AsleepyMsgId

The sl_zigbee_af_sleepy_message_id_t of the sl_zigbee_af_sleepy_message_t structure that should be looked up in the sleepy message queue.

N/Apmsg

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

If a match was found, it copies the message into the sl_zigbee_af_sleepy_message_t 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

sl_zigbee_af_sleepy_message_queue_get_next_message_event_timeout_ms#

uint32_t sl_zigbee_af_sleepy_message_queue_get_next_message_event_timeout_ms (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

sl_zigbee_af_sleepy_message_queue_get_num_messages#

uint8_t sl_zigbee_af_sleepy_message_queue_get_num_messages (sl_802154_long_addr_t dstEui64)

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

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 sl_802154_long_addr_t.


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

sl_zigbee_af_sleepy_message_queue_remove_message#

bool sl_zigbee_af_sleepy_message_queue_remove_message (sl_zigbee_af_sleepy_message_id_t sleepyMsgId)

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

Parameters
N/AsleepyMsgId

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

Returns

  • true if a matching sl_zigbee_af_sleepy_message_id_t 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

sl_zigbee_af_sleepy_message_queue_remove_all_messages#

void sl_zigbee_af_sleepy_message_queue_remove_all_messages (sl_802154_long_addr_t dstEui64)

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

Parameters
N/AdstEui64

The sl_802154_long_addr_t 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#

sl_zigbee_af_sleepy_message_id_t#

typedef uint8_t sl_zigbee_af_sleepy_message_id_t

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

Macro Definition Documentation#

SL_ZIGBEE_AF_PLUGIN_SLEEPY_MESSAGE_INVALID_ID#

#define SL_ZIGBEE_AF_PLUGIN_SLEEPY_MESSAGE_INVALID_ID
Value:
0xFF

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