APIs for the poll plugin. More...


void emberAfPluginPollSetShortPollInterval (uint8_t intervalQS)
Set the short poll interval. More...
void emberAfPluginPollSetLongPollInterval (uint16_t intervalS)
Set the long poll interval. More...
void emberAfPluginPollEnableShortPolling (bool enable)
Enable/disable short polling. More...

Detailed Description

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 there is a pending message or not, using the acknowledge with the pending bit cleared or set. If there is no pending message the communication ends with the acknowledge. If there is a pending message, 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, both behaves the same, only the polling period differs. For long polling the period specified in second while in case of short polling the the period is in quarter seconds. The API provides a function to easily switch between the two. Purpose of long polling is maintaining the 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.

Function Documentation


void emberAfPluginPollEnableShortPolling ( bool enable )

Enable/disable short polling.

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


void emberAfPluginPollSetLongPollInterval ( uint16_t intervalS )

Set the long poll interval.

[in] intervalS The long poll interval in seconds.


void emberAfPluginPollSetShortPollInterval ( uint8_t intervalQS )

Set the short poll interval.

[in] intervalQS The short poll interval in quarter seconds.