APIs for the poll plugin. More...

Functions

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

Function Documentation

◆ emberAfPluginPollEnableShortPolling()

void emberAfPluginPollEnableShortPolling ( bool  enable)

Enable/disable short polling.

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

◆ emberAfPluginPollSetLongPollInterval()

void emberAfPluginPollSetLongPollInterval ( uint16_t  intervalS)

Set the long poll interval.

Parameters
[in]intervalSThe long poll interval in seconds.

◆ emberAfPluginPollSetShortPollInterval()

void emberAfPluginPollSetShortPollInterval ( uint8_t  intervalQS)

Set the short poll interval.

Parameters
[in]intervalQSThe short poll interval in quarter seconds.