Poll Plugin#

APIs for the poll plugin.

The Connect stack supports polling which enables (sleepy) end devices to retrieve pending messages from the parent node (coordinator or range extender).

To use this feature, the Poll plugin must be enabled on the end devices. If polling is enabled, the end device sends a data request to the parent node, which notifies the device whether a message is pending or not using the acknowledge with the pending bit cleared or set. If a message is not pending, the communication ends with the acknowledge. If a message is pending, the parent node sends a data packet containing the pending message which will be acknowledged by the end device.

For convenience, Connect supports two polling intervals, long and short, which behave the same only the polling period differs. For long polling, the period is specified in seconds while for short polling, the period is in quarter seconds. The API provides a function to easily switch between the two. The purpose of long polling is maintaining the connection between the end device and the parent.

The application will receive the polled message via the emberAfIncomingMessageCallback() function.

The poll plugin uses emberPollForData() to retrieve the pending message. If the poll plugin is enabled, using emberPollForData() is strongly not recommended.

See poll.h for source code.

Functions#

void

Set the short poll interval.

void

Set the long poll interval.

void

Enable/disable short polling.

Function Documentation#

emberAfPluginPollSetShortPollInterval#

void emberAfPluginPollSetShortPollInterval (uint8_t intervalQS)

Set the short poll interval.

Parameters
[in]intervalQS

The short poll interval in quarter seconds.


Definition at line 68 of file /mnt/raid/workspaces/ws.Q8qnkBLX2/overlay/gsdk/protocol/flex/poll/poll.h

emberAfPluginPollSetLongPollInterval#

void emberAfPluginPollSetLongPollInterval (uint16_t intervalS)

Set the long poll interval.

Parameters
[in]intervalS

The long poll interval in seconds.


Definition at line 74 of file /mnt/raid/workspaces/ws.Q8qnkBLX2/overlay/gsdk/protocol/flex/poll/poll.h

emberAfPluginPollEnableShortPolling#

void emberAfPluginPollEnableShortPolling (bool enable)

Enable/disable short polling.

Parameters
[in]enable

If this parameter is true, short polling is enabled. Otherwise, the node switches back to long polling.


Definition at line 81 of file /mnt/raid/workspaces/ws.Q8qnkBLX2/overlay/gsdk/protocol/flex/poll/poll.h