This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

[ZIGBEE] usage of zb_zcl_ias_zone_set_status function

Hi, I have developed custom board on nRF52840 based on Thread and Zigbee SDK 14.1.0.

I wants to use zb_zcl_ias_zone_set_status function to send a report of the changed zone status.

 

/**
   @brief Use this function to change IAS Zone status. This function
   will set new value of ZoneStatus and will send Zone status change
   notification.
   @note If another API (ZB_ZCL_SET_ATTRIBUTE()) is used for modifying
   ZoneStatus, notification will NOT be send. This is limitation of
   the current implementation.
   @param ep - local endpoint number
   @param new_val - new value for ZoneStatus
   @param delay - delay in quater seconds (actual only for HA ZCL
   version, is ignored for pure ZCL implementation)
   @param buf_param - reference to a buffer that will be used for
   sending notification. If buffer reference is not specified,
   notification will NOT be sent
   @return Returns ZB_TRUE if notification is scheduled for send,
   ZB_FALSE otherwise
   @note Notifiacation send result is reported to user App using
   callback that is registered with zb_zcl_ias_zone_registrer_cb()
*/
zb_bool_t zb_zcl_ias_zone_set_status(
  zb_uint8_t ep,
  zb_uint16_t new_val,
  zb_uint16_t delay,
  zb_uint8_t buf_param);
 

I tried this way.

zb_bool_t ret;
zb_uint16_t ias_zone_state = ZB_ZCL_MY_IAS_ZONE_ZONE_STATUS_LOW_BATTERY;


ZB_ZCL_CLUSTER_ID_IAS_ZONE_SERVER_ROLE_INIT();

ret = zb_zcl_ias_zone_set_status(DOOR_LOCK_ENDPOINT,
                        ias_zone_state,
                        0,
                        0);
DEBUG_PRINTF("IAS STATUS RET: %d\r\n", ret);

IAS STATUS RET: 0

How I get "buf_param" to pass zb_zcl_ias_zone_set_status function?

And, How can I take a goal?

Parents Reply Children
No Data
Related