@@ -26,6 +26,9 @@ extern "C" {
2626static const unsigned int ZIGPC_ATTR_MGMT_DELAY_READ_ATTRIBUTES
2727 = CLOCK_SECOND * 5 ;
2828
29+ static const unsigned int ZIGPC_ATTR_MGMT_POLL_PERIOD_MS
30+ = CLOCK_SECOND ; //1000ms
31+
2932/**
3033 * @brief Limit of Read Attribute Records to send per ZCL Message
3134 *
@@ -80,6 +83,12 @@ static const uint16_t ZIGPC_ATTRMGMT_REPORT_INTERVAL_MAX_DEFAULT = 60;
8083 */
8184static const uint32_t ZIGPC_ATTRMGMT_REPORT_CHANGE_DEFAULT = 0x0000 ;
8285
86+ /**
87+ * @brief Default poll list size. The maximum number of clusters that
88+ * can be stoed in the poll list
89+ */
90+ static const uint32_t ZIGPC_ATTRMGMT_DEFAULT_POLL_SIZE = 256 ;
91+
8392/**
8493 * attr_mgmt_evt
8594 *
@@ -96,6 +105,7 @@ enum attr_mgmt_evt {
96105 *
97106 */
98107 ZIGPC_ATTR_MGMT_EVT_ATTR_UPDATE ,
108+ ZIGPC_ATTR_MGMT_EVT_CONFIGURE_RESPONSE ,
99109 ZIGPC_ATTR_MGMT_EVT_READ_ATTRIBUTES_COMMAND ,
100110};
101111
@@ -312,6 +322,24 @@ sl_status_t
312322 bool is_read_response ,
313323 const zcl_frame_t * frame );
314324
325+ /**
326+ * @brief zigpc_attrmgmt_receive_configure_response_frame
327+ * Process a configure attribute response frame
328+ * Accepts a ZCL frame for the response to a configure
329+ * reports command. On a failed configure, adds the given EUI64,
330+ * endpoint and cluster combination to the poll lis
331+ *
332+ * @param eui64 Device identifier.
333+ * @param endpoint_id Device endpoint identifier
334+ * @param cluster_id Cluster identifer of the source from
335+ * @param frame ZCL Frame containing configure report response
336+ */
337+ sl_status_t zigpc_attrmgmt_receive_configure_response_frame (
338+ const zigbee_eui64_t eui64 ,
339+ zigbee_endpoint_id_t endpoint_id ,
340+ zcl_cluster_id_t cluster_id ,
341+ const zcl_frame_t * frame );
342+
315343#ifdef COMPILE_UNUSED_CODE
316344
317345/**
@@ -350,6 +378,74 @@ sl_status_t
350378 const zcl_cluster_id_t cluster_id ,
351379 const zcl_attribute_id_t attr_id ,
352380 const uint8_t * attr_value );
381+
382+ /**
383+ * @brief zigpc_attrmgmt_get_poll_list_size
384+ *
385+ * Get the size of the current list we are polling
386+ * with ReadAttributes
387+ *
388+ * @return the number of clusters on the list we are polling
389+ **/
390+ size_t zigpc_attrmgmt_get_poll_list_current_size ();
391+
392+ /**
393+ * @brief zigpc_attrmgmt_get_poll_list_Max_size
394+ *
395+ * Get the maximum size of the polling list
396+ *
397+ * @return the maximum number of clusters the poll list can contain
398+ **/
399+ size_t zigpc_attrmgmt_get_poll_list_max_size ();
400+
401+ /**
402+ * @brief zigpc_attrmgmt_send_poll_attributes
403+ *
404+ * Send a ReadAttribute command to the next entry in
405+ * the polling list
406+ *
407+ * @return SL_STATUS_OK if the command could be sent properly
408+ **/
409+ sl_status_t zigpc_attrmgmt_send_poll_attributes ();
410+
411+ /**
412+ * @brief zigpc_attrmgmt_add_poll_entry
413+ *
414+ * Add a new entry to be polled by ReadAttribute commands
415+ * Will be put at the end of the list
416+ *
417+ * @param eui64 - the eui64 of the node
418+ * @param endpoint_id - the endpoint specified
419+ * @param cluster_id - the cluster specified
420+ *
421+ * @return SL_STATUS_OK if the new entry could be added properly
422+ **/
423+ sl_status_t zigpc_attrmgmt_add_poll_entry (const zigbee_eui64_t eui64 ,
424+ zigbee_endpoint_id_t endpoint_id ,
425+ zcl_cluster_id_t cluster_id );
426+
427+ /**
428+ * @briefzigpc_attrmgmt_remove_poll_entry
429+ *
430+ * Remove a eui64, endpoint and cluster combination from the poll list
431+ *
432+ * @param eui64 - the eui64 of the node
433+ * @param endpoint_id - the endpoint specified
434+ * @param cluster_id - the cluster specified
435+ *
436+ * @return SL_STATUS_OK if the new entry could be removed properly
437+ **/
438+ sl_status_t zigpc_attrmgmt_remove_poll_entry (const zigbee_eui64_t eui64 ,
439+ zigbee_endpoint_id_t endpoint_id ,
440+ zcl_cluster_id_t cluster_id );
441+
442+ /**
443+ * @brief zigpc_attrmgmt_empty_poll_list
444+ *
445+ * Empty the polling list
446+ **/
447+ void zigpc_attrmgmt_empty_poll_list ();
448+
353449#ifdef __cplusplus
354450}
355451#endif
0 commit comments