diff --git a/RELEASE_NOTES.md b/RELEASE_NOTES.md index d342d90..50fd845 100644 --- a/RELEASE_NOTES.md +++ b/RELEASE_NOTES.md @@ -1,5 +1,26 @@ # Espressif Zigbee SDK Release Notes +## 24-May-2024 +1.3.2 version release of ESP-ZIGBEE-SDK is based on esp-idf v5.1.3 + +### Features +- Updated esp-zboss-lib to v1.3.2 +- Updated esp-zigbee-lib to v1.3.2 +- Supported APS data confirmation +- Supported ZCL IAS ACE cluster +- Supported ZCL read report config command +- Added NWK parameters setting APIs +- Added NWK neighbor table getting APIs +- Added NWK routing table getting APIs +- Added Zigbee scheduler queue size setting API +- Optimized Zigbee device reset mechanism + +### Bug Fixes +- Fixed the crash caused by a full rx radio queue during radio frame handling +- Fixed the buffer ID not being freed during rapid on/off level control +- Fixed the issue with the rough transition in color control + + ## 30-Apr-2024 1.3.1 version release of ESP-ZIGBEE-SDK is based on esp-idf v5.1.3 diff --git a/components/esp-zigbee-lib/idf_component.yml b/components/esp-zigbee-lib/idf_component.yml index 963eb41..200246a 100644 --- a/components/esp-zigbee-lib/idf_component.yml +++ b/components/esp-zigbee-lib/idf_component.yml @@ -1,4 +1,4 @@ -version: "1.3.1" +version: "1.3.2" description: esp-zigbee library component url: https://github.com/espressif/esp-zigbee-sdk dependencies: diff --git a/components/esp-zigbee-lib/include/aps/esp_zigbee_aps.h b/components/esp-zigbee-lib/include/aps/esp_zigbee_aps.h index 114677a..f2b9f7c 100644 --- a/components/esp-zigbee-lib/include/aps/esp_zigbee_aps.h +++ b/components/esp-zigbee-lib/include/aps/esp_zigbee_aps.h @@ -13,8 +13,22 @@ extern "C" { #include "esp_zigbee_type.h" /** - * @brief The enumeration for apsde tx option - * + * @brief Enumeration for APSDE-DATA address mode + * + */ +typedef enum { + ESP_ZB_APS_ADDR_MODE_DST_ADDR_ENDP_NOT_PRESENT = 0x0, /*!< DstAddress and DstEndpoint not present, + only for APSDE-DATA request and confirm */ + ESP_ZB_APS_ADDR_MODE_16_GROUP_ENDP_NOT_PRESENT = 0x1, /*!< 16-bit group address for DstAddress; DstEndpoint not present */ + ESP_ZB_APS_ADDR_MODE_16_ENDP_PRESENT = 0x2, /*!< 16-bit address for DstAddress and DstEndpoint present */ + ESP_ZB_APS_ADDR_MODE_64_ENDP_PRESENT = 0x3, /*!< 64-bit extended address for DstAddress and DstEndpoint present */ + ESP_ZB_APS_ADDR_MODE_64_PRESENT_ENDP_NOT_PRESENT = 0x4, /*!< 64-bit extended address for DstAddress, but DstEndpoint NOT present, + only for APSDE indication */ +} esp_zb_aps_address_mode_t; + +/** + * @brief Enumeration for APSDE-DATA Request TX options + * */ typedef enum esp_zb_apsde_tx_opt_e { ESP_ZB_APSDE_TX_OPT_SECURITY_ENABLED = 0x01U, /*!< Security enabled transmission */ @@ -30,7 +44,8 @@ typedef enum esp_zb_apsde_tx_opt_e { * */ typedef struct esp_zb_apsde_data_req_s { - uint8_t dst_addr_mode; /*!< The addressing mode for the destination address used in this primitive and of the APDU to be transferred. */ + uint8_t dst_addr_mode; /*!< The addressing mode for the destination address used in this primitive and of the APDU to be transferred, + refer to esp_zb_aps_address_mode_t */ uint16_t dst_short_addr; /*!< The individual device address or group address of the entity to which the ASDU is being transferred*/ uint8_t dst_endpoint; /*!< The number of the individual endpoint of the entity to which the ASDU is being transferred or the broadcast endpoint (0xff).*/ uint16_t profile_id; /*!< The identifier of the profile for which this frame is intended. */ @@ -51,7 +66,8 @@ typedef struct esp_zb_apsde_data_req_s { */ typedef struct esp_zb_apsde_data_confirm_s { uint8_t status; /*!< The status of data confirm. 0: success, otherwise failed */ - uint8_t dst_addr_mode; /*!< The addressing mode for the destination address used in this primitive and of the APDU to be transferred.*/ + uint8_t dst_addr_mode; /*!< The addressing mode for the destination address used in this primitive and of the APDU to be transferred, + refer to esp_zb_aps_address_mode_t */ esp_zb_addr_u dst_addr; /*!< The individual device address or group address of the entity to which the ASDU is being transferred.*/ uint8_t dst_endpoint; /*!< The number of the individual endpoint of the entity to which the ASDU is being transferred or the broadcast endpoint (0xff).*/ uint8_t src_endpoint; /*!< The individual endpoint of the entity from which the ASDU is being transferred.*/ @@ -66,7 +82,8 @@ typedef struct esp_zb_apsde_data_confirm_s { */ typedef struct esp_zb_apsde_data_ind_s { uint8_t status; /*!< The status of the incoming frame processing, 0: on success */ - uint8_t dst_addr_mode; /*!< Reserved, the addressing mode for the destination address used in this primitive and of the APDU that has been received.*/ + uint8_t dst_addr_mode; /*!< The addressing mode for the destination address used in this primitive and of the APDU that has been received, + refer to esp_zb_aps_address_mode_t */ uint16_t dst_short_addr; /*!< The individual device address or group address to which the ASDU is directed.*/ uint8_t dst_endpoint; /*!< The target endpoint on the local entity to which the ASDU is directed.*/ uint8_t src_addr_mode; /*!< Reserved, The addressing mode for the source address used in this primitive and of the APDU that has been received.*/ @@ -95,7 +112,7 @@ typedef bool (* esp_zb_apsde_data_indication_callback_t)(esp_zb_apsde_data_ind_t /** * @brief APSDE data confirm application callback * - * @param[in] ind APSDE-DATA.confirm + * @param[in] confirm APSDE-DATA.confirm */ typedef void (* esp_zb_apsde_data_confirm_callback_t)(esp_zb_apsde_data_confirm_t confirm); @@ -125,6 +142,23 @@ esp_err_t esp_zb_aps_data_request(esp_zb_apsde_data_req_t *req); */ void esp_zb_aps_data_confirm_handler_register(esp_zb_apsde_data_confirm_callback_t cb); +/** + * @brief Set the APS trust center address + * + * @param[in] address A 64-bit value is expected to be set to trust center address + * @return + * - ESP_OK: On success + * - ESP_ERR_INVALID_STATE: Device is already on a network + */ +esp_err_t esp_zb_aps_set_trust_center_address(esp_zb_ieee_addr_t address); + +/** + * @brief Get the APS trust center address + * + * @param[out] address A 64-bit value will be assigned from the trust center address + */ +void esp_zb_aps_get_trust_center_address(esp_zb_ieee_addr_t address); + #ifdef __cplusplus } #endif diff --git a/components/esp-zigbee-lib/include/esp_zigbee_attribute.h b/components/esp-zigbee-lib/include/esp_zigbee_attribute.h index b488764..4ffaeaa 100644 --- a/components/esp-zigbee-lib/include/esp_zigbee_attribute.h +++ b/components/esp-zigbee-lib/include/esp_zigbee_attribute.h @@ -309,6 +309,31 @@ esp_err_t esp_zb_ias_zone_cluster_add_attr(esp_zb_attribute_list_t *attr_list, u * */ esp_err_t esp_zb_ias_zone_cluster_set_cie_address(uint8_t endpoint, esp_zb_ieee_addr_t cie_ieee_addr); + +/** + * @brief Get the zone table size of the IAS ACE cluster + * + * @param[in] endpoint A 8-bit endpoint ID which the IAS ACE cluster attach + * @param[out] table_size The zone table size of IAS ACE cluster on the given endpoint. + * @return + * - ESP_OK on success + * - ESP_ERR_NOT_FOUND The IAS ACE cluster is not founded on the given endpoint. + * + */ +esp_err_t esp_zb_ias_ace_get_zone_table_length(uint8_t endpoint, uint8_t *table_size); + +/** + * @brief Get the zone table of the IAS ACE cluster + * + * @param[in] endpoint A 8-bit endpoint ID which the IAS ACE cluster attach + * @param[out] table_p The address of the zone table of IAS ACE cluster on the given endpoint. + * @return + * - ESP_OK on success + * - ESP_ERR_NOT_FOUND The IAS ACE cluster is not founded on the given endpoint. + * + */ +esp_err_t esp_zb_ias_ace_get_zone_table(uint8_t endpoint, esp_zb_zcl_ias_ace_zone_table_t** table_p); + /** * @brief Add an attribute in temperature measurement cluster. * diff --git a/components/esp-zigbee-lib/include/esp_zigbee_cluster.h b/components/esp-zigbee-lib/include/esp_zigbee_cluster.h index 2383a9d..decdf21 100644 --- a/components/esp-zigbee-lib/include/esp_zigbee_cluster.h +++ b/components/esp-zigbee-lib/include/esp_zigbee_cluster.h @@ -203,6 +203,17 @@ esp_zb_attribute_list_t *esp_zb_door_lock_cluster_create(esp_zb_door_lock_cluste */ esp_zb_attribute_list_t *esp_zb_ias_zone_cluster_create(esp_zb_ias_zone_cluster_cfg_t *ias_zone_cfg); +/** + * @brief Create a standard IAS ACE cluster attribute list. + * + * @note This only contains the mandatory attribute. + * @param[in] zone_table_size Maximum number of entries in the zone table. + * + * @return Pointer to attribute list @ref esp_zb_attribute_list_s + * + */ +esp_zb_attribute_list_t *esp_zb_ias_ace_cluster_create(uint8_t zone_table_size); + /** * @brief Create a standard temperature measurement cluster attribute list. * @@ -629,6 +640,20 @@ esp_err_t esp_zb_cluster_list_add_commissioning_cluster(esp_zb_cluster_list_t *c */ esp_err_t esp_zb_cluster_list_add_ias_zone_cluster(esp_zb_cluster_list_t *cluster_list, esp_zb_attribute_list_t *attr_list, uint8_t role_mask); +/** + * @brief Add IAS ACE cluster (attribute list) in a cluster list. + * + * @param[in] cluster_list A pointer to cluster list @ref esp_zb_cluster_list_s + * @param[in] attr_list An attribute list which wants to add + * @param[in] role_mask A role of server or client for this cluster (attribute list) refer to esp_zb_zcl_cluster_role_t + * + * @return + * - ESP_OK on success + * - ESP_ERR_INVALID_ARG if cluster list not initialized + * + */ +esp_err_t esp_zb_cluster_list_add_ias_ace_cluster(esp_zb_cluster_list_t *cluster_list, esp_zb_attribute_list_t *attr_list, uint8_t role_mask); + /** * @brief Add Door Lock cluster (attribute list) in a cluster list. * @@ -1181,6 +1206,20 @@ esp_err_t esp_zb_cluster_list_update_commissioning_cluster(esp_zb_cluster_list_t */ esp_err_t esp_zb_cluster_list_update_ias_zone_cluster(esp_zb_cluster_list_t *cluster_list, esp_zb_attribute_list_t *attr_list, uint8_t role_mask); +/** + * @brief Update IAS ACE cluster (attribute list) in a cluster list. + * + * @param[in] cluster_list A pointer to cluster list @ref esp_zb_cluster_list_s + * @param[in] attr_list An attribute list which wants to update + * @param[in] role_mask A role of server or client for this cluster (attribute list) refer to esp_zb_zcl_cluster_role_t + * + * @return + * - ESP_OK on success + * - ESP_ERR_INVALID_ARG if cluster list not initialized + * + */ +esp_err_t esp_zb_cluster_list_update_ias_ace_cluster(esp_zb_cluster_list_t *cluster_list, esp_zb_attribute_list_t *attr_list, uint8_t role_mask); + /** * @brief Update Door Lock cluster (attribute list) in a cluster list. * diff --git a/components/esp-zigbee-lib/include/esp_zigbee_core.h b/components/esp-zigbee-lib/include/esp_zigbee_core.h index 3d32a27..063afb4 100644 --- a/components/esp-zigbee-lib/include/esp_zigbee_core.h +++ b/components/esp-zigbee-lib/include/esp_zigbee_core.h @@ -16,6 +16,7 @@ extern "C" { #include "esp_zigbee_attribute.h" #include "esp_zigbee_cluster.h" #include "esp_zigbee_endpoint.h" +#include "nwk/esp_zigbee_nwk.h" #include "zcl/esp_zigbee_zcl_command.h" #include "zdo/esp_zigbee_zdo_command.h" #include "bdb/esp_zigbee_bdb_touchlink.h" @@ -34,16 +35,6 @@ extern "C" { #define ESP_ZGP_GPS_DEFAULT_FUNCTIONALITY 0x9ac2f /*!< GPS functionality, refer to esp_zgp_gps_functionality_t */ #endif /* CONFIG_ZB_GP_ENABLED */ -/** Enum of the Zigbee network device type - * @anchor esp_zb_nwk_device_type_t - */ -typedef enum { - ESP_ZB_DEVICE_TYPE_COORDINATOR = 0x0, /*!< Device - Coordinator */ - ESP_ZB_DEVICE_TYPE_ROUTER = 0x1, /*!< Device - Router */ - ESP_ZB_DEVICE_TYPE_ED = 0x2, /*!< Device - End device */ - ESP_ZB_DEVICE_TYPE_NONE = 0x3, /*!< Unknown Device */ -} esp_zb_nwk_device_type_t; - /** * @name End Device (ED) timeout request * @anchor nwk_requested_timeout @@ -122,8 +113,25 @@ typedef enum esp_zb_core_action_callback_id_s { ESP_ZB_CORE_CMD_PRIVILEGE_COMMAND_RESP_CB_ID = 0x1051, /*!< Custom Cluster response, refer to esp_zb_zcl_privilege_command_message_t */ ESP_ZB_CORE_CMD_TOUCHLINK_GET_GROUP_ID_RESP_CB_ID = 0x1060, /*!< Touchlink commissioning cluster get group id response, refer to esp_zb_touchlink_get_group_identifiers_resp_message_t */ ESP_ZB_CORE_CMD_TOUCHLINK_GET_ENDPOINT_LIST_RESP_CB_ID = 0x1061, /*!< Touchlink commissioning cluster get endpoint list response, refer to esp_zb_zcl_touchlink_get_endpoint_list_resp_message_t */ - ESP_ZB_CORE_CMD_GREEN_POWER_RECV_CB_ID = 0x1F00, /*!< Green power cluster command receiving, refer to esp_zb_zcl_cmd_green_power_recv_message_t */ - ESP_ZB_CORE_REPORT_ATTR_CB_ID = 0x2000, /*!< Attribute Report, refer to esp_zb_zcl_report_attr_message_t */ + ESP_ZB_CORE_CMD_IAS_ACE_ARM_CB_ID = 0x0168, /*!< IAS ACE cluster Arm command, refer to esp_zb_zcl_ias_ace_arm_message_t */ + ESP_ZB_CORE_CMD_IAS_ACE_BYPASS_CB_ID = 0x0169, /*!< IAS ACE cluster Bypass command, refer to esp_zb_zcl_ias_ace_bypass_message_t */ + ESP_ZB_CORE_CMD_IAS_ACE_EMERGENCY_CB_ID = 0x016A, /*!< IAS ACE cluster Emergency command, refer to esp_zb_zcl_ias_ace_emergency_message_t */ + ESP_ZB_CORE_CMD_IAS_ACE_FIRE_CB_ID = 0x016B, /*!< IAS ACE cluster Fire command, refer to esp_zb_zcl_ias_ace_fire_message_t */ + ESP_ZB_CORE_CMD_IAS_ACE_PANIC_CB_ID = 0x016C, /*!< IAS ACE cluster Panic command, refer to esp_zb_zcl_ias_ace_panic_message_t */ + ESP_ZB_CORE_CMD_IAS_ACE_GET_PANEL_STATUS_CB_ID = 0x016D, /*!< IAS ACE cluster Get Panel Status command, refer to esp_zb_zcl_ias_ace_get_panel_status_message_t */ + ESP_ZB_CORE_CMD_IAS_ACE_GET_BYPASSED_ZONE_LIST_CB_ID = 0x016E, /*!< IAS ACE cluster Get Bypass Zone List command, refer to esp_zb_zcl_ias_ace_get_bypassed_zone_list_message_t */ + ESP_ZB_CORE_CMD_IAS_ACE_GET_ZONE_STATUS_CB_ID = 0x016F, /*!< IAS ACE cluster Get Zone Status command, refer to esp_zb_zcl_ias_ace_get_zone_status_message_t */ + ESP_ZB_CORE_CMD_IAS_ACE_ARM_RESP_CB_ID = 0x0170, /*!< IAS ACE cluster Arm command response, refer to esp_zb_zcl_ias_ace_arm_response_message_t */ + ESP_ZB_CORE_CMD_IAS_ACE_GET_ZONE_ID_MAP_RESP_CB_ID = 0x0171, /*!< IAS ACE cluster Get Zone ID MAP command response, refer to esp_zb_zcl_ias_ace_get_zone_id_map_response_message_t */ + ESP_ZB_CORE_CMD_IAS_ACE_GET_ZONE_INFO_RESP_CB_ID = 0x0172, /*!< IAS ACE cluster Get Zone Information command response, refer to esp_zb_zcl_ias_ace_get_zone_info_response_message_t */ + ESP_ZB_CORE_CMD_IAS_ACE_ZONE_STATUS_CHANGED_CB_ID = 0x0173, /*!< IAS ACE cluster Zone Status Changed command, refer to esp_zb_zcl_ias_ace_zone_status_changed_message_t */ + ESP_ZB_CORE_CMD_IAS_ACE_PANEL_STATUS_CHANGED_CB_ID = 0x0174, /*!< IAS ACE cluster Panel Status Changed command, refer to esp_zb_zcl_ias_ace_panel_status_changed_message_t */ + ESP_ZB_CORE_CMD_IAS_ACE_GET_PANEL_STATUS_RESP_CB_ID = 0x0175, /*!< IAS ACE cluster Get Panel Status command response, refer to esp_zb_zcl_ias_ace_get_panel_status_response_message_t */ + ESP_ZB_CORE_CMD_IAS_ACE_SET_BYPASSED_ZONE_LIST_CB_ID = 0x0176, /*!< IAS ACE cluster Set Bypassed Zone List command, refer to esp_zb_zcl_ias_ace_set_bypassed_zone_list_message_t */ + ESP_ZB_CORE_CMD_IAS_ACE_BYPASS_RESP_CB_ID = 0x0177, /*!< IAS ACE cluster Bypass command response, refer to esp_zb_zcl_ias_ace_bypass_response_message_t */ + ESP_ZB_CORE_CMD_IAS_ACE_GET_ZONE_STATUS_RESP_CB_ID = 0x0178, /*!< IAS ACE cluster Get Zone Status command response, refer to esp_zb_zcl_ias_ace_get_zone_status_response_message_t */ + ESP_ZB_CORE_CMD_GREEN_POWER_RECV_CB_ID = 0x1F00, /*!< Green power cluster command receiving, refer to esp_zb_zcl_cmd_green_power_recv_message_t */ + ESP_ZB_CORE_REPORT_ATTR_CB_ID = 0x2000, /*!< Attribute Report, refer to esp_zb_zcl_report_attr_message_t */ } esp_zb_core_action_callback_id_t; /** @@ -145,7 +153,7 @@ typedef struct { /** * @brief The Zigbee device configuration. - * @note For esp_zb_role please refer defined by @ref esp_zb_nwk_device_type_t. + * @note For esp_zb_role please refer defined by esp_zb_nwk_device_type_t. */ typedef struct esp_zb_cfg_s { esp_zb_nwk_device_type_t esp_zb_role; /*!< The nwk device type */ @@ -354,6 +362,17 @@ esp_err_t esp_zb_overall_network_size_set(uint16_t size); */ esp_err_t esp_zb_io_buffer_size_set(uint16_t size); +/** + * @brief Set Zigbee stack scheduler queue size + * + * @note The function will only take effect when called before esp_zb_init(), 80 by default. + * @param[in] size The scheduler queue size is expected to be set + * @return + * - ESP_OK: on success + * - ESP_FAIL: on failure + */ +esp_err_t esp_zb_scheduler_queue_size_set(uint16_t size); + /** * @brief Set APS source binding table size * @@ -389,7 +408,7 @@ esp_err_t esp_zb_aps_dst_binding_table_size_set(uint16_t size); void esp_zb_init(esp_zb_cfg_t *nwk_cfg); /** - * @brief Set the primary channel mask. + * @brief Set the BDB primary channel mask. * * Beacon request will be sent on these channels for the BDB energy scan. * @@ -402,7 +421,14 @@ void esp_zb_init(esp_zb_cfg_t *nwk_cfg); esp_err_t esp_zb_set_primary_network_channel_set(uint32_t channel_mask); /** - * @brief Set the secondary channel mask. + * @brief Get the BDB primary channel mask + * + * @return A 32-bit channel mask + */ +uint32_t esp_zb_get_primary_network_channel_set(void); + +/** + * @brief Set the BDB secondary channel mask. * * Beacon request will be sent on these channels for the BDB energy scan, if no network found after energy scan on the primary channels. * @@ -412,6 +438,13 @@ esp_err_t esp_zb_set_primary_network_channel_set(uint32_t channel_mask); */ esp_err_t esp_zb_set_secondary_network_channel_set(uint32_t channel_mask); +/** + * @brief Get the BDB secondary channel mask + * + * @return A 32-bit channel mask + */ +uint32_t esp_zb_get_secondary_network_channel_set(void); + /** * @brief Set the 2.4G channel mask. * @@ -422,12 +455,11 @@ esp_err_t esp_zb_set_secondary_network_channel_set(uint32_t channel_mask); esp_err_t esp_zb_set_channel_mask(uint32_t channel_mask); /** - * @brief Set zigbee rx on when idle. - * - * @param[in] rx_on enable/disable rx on when idle. + * @brief Get the 2.4 channel mask * + * @return A 32-bit channel mask */ -void esp_zb_set_rx_on_when_idle(bool rx_on); +uint32_t esp_zb_get_channel_mask(void); /** * @brief Check if device is factory new. @@ -488,75 +520,6 @@ bool esp_zb_bdb_dev_joined(void); */ void esp_zb_zdo_touchlink_set_nwk_channel(uint8_t channel); -/** - * @brief Set the Zigbee device long address. - * - * @note Set this function AFTER @ref esp_zb_init called, if user wants to set specific address - * without reading MAC address from flash refer to tools/mfg_tool or eFUSE. - * - * @param[in] addr An 64-bit of IEEE long address, which is presented in little-endian. - * @return - ESP_OK on success - */ -esp_err_t esp_zb_set_long_address(esp_zb_ieee_addr_t addr); - -/** - * @brief Get the Zigbee device long address. - * - * @note This function will return a pointer to 64-bit of ieee long address. - * - * @param[out] addr An 64-bit of IEEE long address, which is presented in little-endian. - * - */ -void esp_zb_get_long_address(esp_zb_ieee_addr_t addr); - -/** - * @brief Get the Zigbee device short address. - * - * @return 16-bit Zigbee short address - * - */ -uint16_t esp_zb_get_short_address(void); - -/** - * @brief Set the Zigbee network extended PAN ID. - * - * @param ext_pan_id An 64-bit of extended PAN ID, which is presented in little-endian. - */ -void esp_zb_set_extended_pan_id(const esp_zb_ieee_addr_t ext_pan_id); - -/** - * @brief Get the Zigbee network extended PAN ID. - * - * @note This function will return back a pointer to 64-bit of extended PAN ID. - * - * @param[out] ext_pan_id An 64-bit of extended PAN ID, which is presented in little-endian. - * - */ -void esp_zb_get_extended_pan_id(esp_zb_ieee_addr_t ext_pan_id); - -/** - * @brief Get the Zigbee network PAN ID. - * - * @return 16-bit Zigbee network PAN ID - * - */ -uint16_t esp_zb_get_pan_id(void); - -/** - * @brief Set the Zigbee network PAN ID. - * - * @note The PAN ID will be set from the network PIB to the IEEE802154 PIB - * @param[in] pan_id 16-bit Zigbee network PAN ID - * - */ -void esp_zb_set_pan_id(uint16_t pan_id); - -/** - * @brief Get the currently used channel. - * @return 8-bit Zigbee network channel number - */ -uint8_t esp_zb_get_current_channel(void); - /** * @brief Set the tx power. * @param[in] power 8-bit of power value in dB, ranging from IEEE802154_TXPOWER_VALUE_MIN to IEEE802154_TXPOWER_VALUE_MAX @@ -569,34 +532,6 @@ void esp_zb_set_tx_power(int8_t power); */ void esp_zb_get_tx_power(int8_t *power); -/** - * @brief Get the network short address by the IEEE address - * - * @param[in] address An 64-bit for the IEEE address, which is presented in little-endian. - * @return Network short address - * - */ -uint16_t esp_zb_address_short_by_ieee(esp_zb_ieee_addr_t address); - -/** - * @brief Get the network IEEE address by the short address - * - * @param[in] short_addr The 2-byte address which will been used to search the mapped IEEE address - * @param[out] ieee_addr The 64-bit of address for Zigbee IEEE address, which is presented in little-endian. - * @return - * - ESP_OK: on success - * - ESP_ERR_NOT_FOUND: not found the IEEE address - */ -esp_err_t esp_zb_ieee_address_by_short(uint16_t short_addr, uint8_t *ieee_addr); - -/** - * @brief Get the Zigbee network device type. - * - * @return device type @ref esp_zb_nwk_device_type_t - * - */ -esp_zb_nwk_device_type_t esp_zb_get_network_device_role(void); - /** * @brief Start top level commissioning procedure with specified mode mask. * @@ -608,15 +543,17 @@ esp_zb_nwk_device_type_t esp_zb_get_network_device_role(void); esp_err_t esp_zb_bdb_start_top_level_commissioning(uint8_t mode_mask); /** - * @brief Perform "Factory reset" procedure. - * @note The device will perform leave Zigbee network. The NVRAM store will be erased. - * - * @note The reset can be performed at any time once the device is started (see esp_zb_start()). - * After the reset, the application itself will receive the refer to ZB_ZDO_SIGNAL_LEAVE signal. - * the remote coordinator will receive the refer to ZB_ZDO_SIGNAL_LEAVE_INDICATION signal. Further action could apply - * based on different circumstances. - * - * @note After factory reset, the system reset will be performed. + * @brief Perform `local reset` procedure + * @note This only takes effect when the device is on a network. The device will leave the current network and + * clear all Zigbee persistent data, except the outgoing NWK frame counter. It will be in nearly the same + * state as when it left the factory. A `ZB_ZDO_SIGNAL_LEAVE` signal with `ESP_ZB_NWK_LEAVE_TYPE_RESET` + * will be triggered to indicate the end of the procedure. + */ +void esp_zb_bdb_reset_via_local_action(void); + +/** + * @brief Perform "factory reset" procedure + * @note The device will completely erase the `zb_storage` partition and then restart */ void esp_zb_factory_reset(void); @@ -648,7 +585,7 @@ esp_err_t esp_zb_zcl_reset_all_endpoints_to_factory_default(bool reset_report, e esp_err_t esp_zb_zcl_reset_endpoint_to_factory_default(uint8_t endpoint, bool reset_report, esp_zb_zcl_reset_default_attr_callback_t cb); /** - * @brief Reset the non-volatile data to factory default + * @brief Reset the NVRAM and ZCL data to factory default * */ void esp_zb_zcl_reset_nvram_to_factory_default(void); @@ -723,7 +660,7 @@ void esp_zb_main_loop_iteration(void); void esp_zb_cli_main_loop_iteration(void); /** - * @brief Enable / Disable erase NVRAM zone before run the refer to esp_zb_start. + * @brief Enable/Disable erasing the zb_storage field before the stack runs * * @note Enable or disable NVRAM erasing on every application startup. Erasing is disabled by default. * @param erase - 1 to enable erasing; 0 - disable. diff --git a/components/esp-zigbee-lib/include/esp_zigbee_type.h b/components/esp-zigbee-lib/include/esp_zigbee_type.h index 1cf6335..362e32f 100644 --- a/components/esp-zigbee-lib/include/esp_zigbee_type.h +++ b/components/esp-zigbee-lib/include/esp_zigbee_type.h @@ -42,6 +42,7 @@ typedef union { #define ESP_ZB_ZCL_ADDR_TYPE_IEEE 3U #define ESP_ZB_CCM_KEY_SIZE 16U #define ESP_ZB_ZCL_ATTR_SET_WITH_ATTR_ID(_set, _id) ((_set << 8) | (_id & 0xFF)) +#define ESP_ZB_ZCL_MAX_STRING_SIZE 0xFF /** * @brief Type to represent source address of ZCL message diff --git a/components/esp-zigbee-lib/include/nwk/esp_zigbee_nwk.h b/components/esp-zigbee-lib/include/nwk/esp_zigbee_nwk.h new file mode 100644 index 0000000..b4b976d --- /dev/null +++ b/components/esp-zigbee-lib/include/nwk/esp_zigbee_nwk.h @@ -0,0 +1,279 @@ +/* + * SPDX-FileCopyrightText: 2024 Espressif Systems (Shanghai) CO LTD + * + * SPDX-License-Identifier: Apache-2.0 + */ +#pragma once +#ifdef __cplusplus +extern "C" { +#endif + +#include "esp_err.h" +#include "esp_zigbee_type.h" + +/** Enum of the Zigbee network device type + * @anchor esp_zb_nwk_device_type_t + */ +typedef enum { + ESP_ZB_DEVICE_TYPE_COORDINATOR = 0x0, /*!< Device - Coordinator */ + ESP_ZB_DEVICE_TYPE_ROUTER = 0x1, /*!< Device - Router */ + ESP_ZB_DEVICE_TYPE_ED = 0x2, /*!< Device - End device */ + ESP_ZB_DEVICE_TYPE_NONE = 0x3, /*!< Unknown Device */ +} esp_zb_nwk_device_type_t; + +#define ESP_ZB_NWK_INFO_ITERATOR_INIT 0 /*!< Initializer for esp_zb_neighbor_info_iterator_t. */ +#define ESP_ZB_NWK_INFO_ITERATOR_EOT 0xFFFF /*!< Indicate the iterator reach the End of Table. */ + +/** + * @brief Iterator used to iterate through the tables of network informations. + * + */ +typedef uint16_t esp_zb_nwk_info_iterator_t; + +/** + * @brief Relationship of network neighbor + * @anchor esp_zb_nwk_relationship_t + */ +typedef enum { + ESP_ZB_NWK_RELATIONSHIP_PARENT = 0U, /*!< The peer device is the parent of current device. */ + ESP_ZB_NWK_RELATIONSHIP_CHILD = 1U, /*!< The peer device is the child of current device. */ + ESP_ZB_NWK_RELATIONSHIP_SIBLING = 2U, /*!< The peer device is the sibling of current device. */ + ESP_ZB_NWK_RELATIONSHIP_OTHERS = 3U, /*!< The relationship is none of above. */ +} esp_zb_nwk_relationship_t; + +/** + * @brief Information of network neighbor table entry + * + */ +typedef struct esp_zb_nwk_neighbor_info_s { + esp_zb_ieee_addr_t ieee_addr; /*!< Long address (EUI64) of the device. */ + uint16_t short_addr; /*!< Short address (network address) of the device. */ + uint8_t device_type; /*!< Neighbor device type, refer to @ref esp_zb_nwk_device_type_t */ + uint8_t depth; /*!< The network depth of this device.*/ + uint8_t rx_on_when_idle; /*!< Indicates if neighbour receiver enabled during idle periods:*/ + uint8_t relationship; /*!< The relationship between the neighbour and current device, refer to @ref esp_zb_nwk_relationship_t */ + uint8_t lqi; /*!< Link quality. Also used to calculate incoming cost */ + int8_t rssi; /*!< Received signal strength indicator */ + uint8_t outgoing_cost; /*!< The cost of an outgoing link. Got from link status. */ + uint8_t age; /*!< Counter value for router aging. The number of nwkLinkStatusPeriod + * intervals since a link status command was received. */ + uint32_t device_timeout; /*!< Configured end device timeout, in seconds. */ + uint32_t timeout_counter; /*!< Timeout value ED aging, in milliseconds. */ +} esp_zb_nwk_neighbor_info_t; + +/** + * @brief State of the network route + * @anchor esp_zb_nwk_route_state_t + */ +typedef enum { + ESP_ZB_NWK_ROUTE_STATE_ACTIVE = 0U, /*!< The route is active. */ + ESP_ZB_NWK_ROUTE_STATE_DISCOVERY_UNDERWAY = 1U, /*!< The route is under discovery process. */ + ESP_ZB_NWK_ROUTE_STATE_DISCOVERY_FAILED = 2U, /*!< The discovery process failed of this route. */ + ESP_ZB_NWK_ROUTE_STATE_INACTIVE = 3U, /*!< The route is inactive and under validation. */ +} esp_zb_nwk_route_state_t; + +/** + * @brief Information of network routing table entry + * + */ +typedef struct esp_zb_nwk_route_info_s { + uint16_t dest_addr; /*!< 16-bit network address of the destination. */ + uint16_t next_hop_addr; /*!< 16-bit network address of the next hop on the way to the destination. */ + struct { + uint8_t status : 3; /*!< The status of the route, bit 0 - 2, refer to esp_zb_nwk_route_state_t */ + uint8_t no_route_cache : 1; /*!< Dest does not store source routes, bit 3 */ + uint8_t many_to_one : 1; /*!< Dest is the concentrator and many-to-one request was used, bit 4 */ + uint8_t route_record_required : 1; /*!< Route record command frame should be sent + * to the dest prior to the next data packet, bit 5 */ + uint8_t group_id : 1; /*!< Indicates that dest_addr is a Group ID, bit 6 */ + uint8_t /* reserved */ : 2; /*!< Reserved, bit 7 */ + } flags; /*!< Flags in the routing table entry */ + uint8_t expiry; /*!< Expiration time. */ +} esp_zb_nwk_route_info_t; + +/** + * @brief Set the network update id + * + * @param[in] id The network update id is expected to be set + * @return + * - ESP_OK: On success + * - ESP_ERR_INVALID_STATE: Device is already on a network + */ +esp_err_t esp_zb_nwk_set_update_id(uint8_t id); + +/** + * @brief Get the network update id + * + * @return The network update id + */ +uint8_t esp_zb_nwk_get_update_id(void); + +/** + * @brief Set the network outgoing frame counter + * + * @param[in] frame_counter The network frame counter value is expect to be set + * @return + * - ESP_OK: On success + * - ESP_ERR_INVALID_STATE: Device is already on a network + */ +esp_err_t esp_zb_nwk_set_frame_counter(uint32_t frame_counter); + +/** + * @brief Get the current network outgoing frame counter + * + * @return The network outgoing frame counter + */ +uint32_t esp_zb_nwk_get_frame_counter(void); + +/** + * @brief Set zigbee rx on when idle. + * + * @param[in] rx_on enable/disable rx on when idle. + * + */ +void esp_zb_set_rx_on_when_idle(bool rx_on); + +/** + * @brief Get the current state of RX-ON-When-Idle + * + * @return The state of RX-ON-When-Idle + */ +bool esp_zb_get_rx_on_when_idle(void); + +/** + * @brief Set the Zigbee device long address. + * + * @note Set this function AFTER @ref esp_zb_init called, if user wants to set specific address + * without reading MAC address from flash refer to tools/mfg_tool or eFUSE. + * + * @param[in] addr An 64-bit of IEEE long address, which is presented in little-endian. + * @return + * - ESP_OK: On success + * - ESP_ERR_INVALID_STATE: Device is already on a network + */ +esp_err_t esp_zb_set_long_address(esp_zb_ieee_addr_t addr); + +/** + * @brief Get the Zigbee device long address. + * + * @note This function will return a pointer to 64-bit of ieee long address. + * + * @param[out] addr An 64-bit of IEEE long address, which is presented in little-endian. + * + */ +void esp_zb_get_long_address(esp_zb_ieee_addr_t addr); + +/** + * @brief Get the Zigbee device short address. + * + * @return 16-bit Zigbee short address + * + */ +uint16_t esp_zb_get_short_address(void); + +/** + * @brief Set the Zigbee network extended PAN ID. + * + * @param ext_pan_id An 64-bit of extended PAN ID, which is presented in little-endian. + */ +void esp_zb_set_extended_pan_id(const esp_zb_ieee_addr_t ext_pan_id); + +/** + * @brief Get the Zigbee network extended PAN ID. + * + * @note This function will return back a pointer to 64-bit of extended PAN ID. + * + * @param[out] ext_pan_id An 64-bit of extended PAN ID, which is presented in little-endian. + * + */ +void esp_zb_get_extended_pan_id(esp_zb_ieee_addr_t ext_pan_id); + +/** + * @brief Set the Zigbee network PAN ID. + * + * @note The PAN ID will be set from the network PIB to the IEEE802154 PIB + * @param[in] pan_id 16-bit Zigbee network PAN ID + * + */ +void esp_zb_set_pan_id(uint16_t pan_id); + +/** + * @brief Get the Zigbee network PAN ID. + * + * @return 16-bit Zigbee network PAN ID + * + */ +uint16_t esp_zb_get_pan_id(void); + +/** + * @brief Get the currently used channel. + * @return 8-bit Zigbee network channel number + */ +uint8_t esp_zb_get_current_channel(void); + +/** + * @brief Get the network short address by the IEEE address + * + * @param[in] address An 64-bit for the IEEE address, which is presented in little-endian. + * @return Network short address + * + */ +uint16_t esp_zb_address_short_by_ieee(esp_zb_ieee_addr_t address); + +/** + * @brief Get the network IEEE address by the short address + * + * @param[in] short_addr The 2-byte address which will been used to search the mapped IEEE address + * @param[out] ieee_addr The 64-bit of address for Zigbee IEEE address, which is presented in little-endian. + * @return + * - ESP_OK: on success + * - ESP_ERR_NOT_FOUND: not found the IEEE address + */ +esp_err_t esp_zb_ieee_address_by_short(uint16_t short_addr, uint8_t *ieee_addr); + +/** + * @brief Set the Zigbee network device role + * + * @param[in] role The network device role is expected to be set + * @return + * - ESP_OK: On success + * - ESP_ERR_INVALID_STATE: Device is already on a network + * - ESP_ERR_INVALID_ARG: Invalid device role + */ +esp_err_t esp_zb_set_network_device_role(esp_zb_nwk_device_type_t role); + +/** + * @brief Get the Zigbee network device type. + * + * @return device type @ref esp_zb_nwk_device_type_t + * + */ +esp_zb_nwk_device_type_t esp_zb_get_network_device_role(void); + +/** + * @brief Iterate through the neighbor table and get information about active neighbor + * + * @param[in] iterator iterator used to iterate through neighbor table, refer to esp_zb_nwk_info_iterator_t + * @param[out] nbr_info next neighbor information, @ref esp_zb_nwk_neighbor_info_s + * + * @return - ESP_OK on success + * - ESP_ERR_NOT_FOUND on finish iteration + * + */ +esp_err_t esp_zb_nwk_get_next_neighbor(esp_zb_nwk_info_iterator_t *iterator, esp_zb_nwk_neighbor_info_t *nbr_info); + +/** + * @brief Iterate through the routing table and get the information in the entry + * + * @param[in] iterator iterator used to iterate through routing table, refer to esp_zb_nwk_info_iterator_t + * @param[out] route_info next route entry information, @ref esp_zb_nwk_route_info_s + * + * @return - ESP_OK on success + * - ESP_ERR_NOT_FOUND on finish iteration + * + */ +esp_err_t esp_zb_nwk_get_next_route(esp_zb_nwk_info_iterator_t *iterator, esp_zb_nwk_route_info_t *route_info); + +#ifdef __cplusplus +} +#endif diff --git a/components/esp-zigbee-lib/include/zcl/esp_zigbee_zcl_command.h b/components/esp-zigbee-lib/include/zcl/esp_zigbee_zcl_command.h index 2faeea4..c05714f 100644 --- a/components/esp-zigbee-lib/include/zcl/esp_zigbee_zcl_command.h +++ b/components/esp-zigbee-lib/include/zcl/esp_zigbee_zcl_command.h @@ -8,6 +8,7 @@ #include "esp_err.h" #include "esp_zigbee_ota.h" #include +#include "aps/esp_zigbee_aps.h" #ifdef __cplusplus extern "C" { #endif @@ -18,16 +19,8 @@ extern "C" { #include "zgp/esp_zigbee_zgp.h" #endif /* CONFIG_ZB_GP_ENABLED */ -/** Enum of the Zigbee ZCL address mode - * @note Defined the ZCL command of address_mode. - * @anchor esp_zb_zcl_address_mode_t - */ -typedef enum { - ESP_ZB_APS_ADDR_MODE_DST_ADDR_ENDP_NOT_PRESENT = 0x0, /*!< DstAddress and DstEndpoint not present */ - ESP_ZB_APS_ADDR_MODE_16_GROUP_ENDP_NOT_PRESENT = 0x1, /*!< 16-bit group address for DstAddress; DstEndpoint not present */ - ESP_ZB_APS_ADDR_MODE_16_ENDP_PRESENT = 0x2, /*!< 16-bit address for DstAddress and DstEndpoint present */ - ESP_ZB_APS_ADDR_MODE_64_ENDP_PRESENT = 0x3, /*!< 64-bit extended address for DstAddress and DstEndpoint present */ -} esp_zb_zcl_address_mode_t; +/** Defined the ZCL command of address_mode */ +typedef esp_zb_aps_address_mode_t esp_zb_zcl_address_mode_t; /** * @brief ZCL command direction enum @@ -38,6 +31,15 @@ typedef enum { ESP_ZB_ZCL_CMD_DIRECTION_TO_CLI = 0x01U, /*!< Command for cluster client side */ } esp_zb_zcl_cmd_direction_t; +/** + * @brief ZCL report direction enum of attribute + * @anchor esp_zb_zcl_report_direction_t + */ +typedef enum { + ESP_ZB_ZCL_REPORT_DIRECTION_SEND = 0x00U, /**< Report should be sent by a cluster. */ + ESP_ZB_ZCL_REPORT_DIRECTION_RECV = 0x01U, /**< Report should be received by a cluster. */ +} esp_zb_zcl_report_direction_t; + /** * @brief The application message of ZCL command send status message * @@ -106,6 +108,15 @@ typedef struct esp_zb_zcl_basic_cmd_s { uint8_t src_endpoint; /*!< Source endpoint */ } esp_zb_zcl_basic_cmd_t; +/** + * @brief The Zigbee ZCL command common struct, no command specific payload + * + */ +typedef struct esp_zb_zcl_common_cmd_s { + esp_zb_zcl_basic_cmd_t zcl_basic_cmd; /*!< Basic command info */ + esp_zb_zcl_address_mode_t address_mode; /*!< APS addressing mode constants refer to esp_zb_zcl_address_mode_t */ +} esp_zb_zcl_common_cmd_t; + /** * @brief The Zigbee ZCL read attribute command struct * @@ -156,6 +167,27 @@ typedef struct esp_zb_zcl_config_report_cmd_s { esp_zb_zcl_config_report_record_t *record_field; /*!< Report configuration records, @ref esp_zb_zcl_config_report_record_s */ } esp_zb_zcl_config_report_cmd_t; +/** + * @brief The Zigbee ZCL Attribute record struct + * + */ +typedef struct esp_zb_zcl_attribute_record_s { + uint8_t report_direction; /*!< Report direction of this attribute, @ref esp_zb_zcl_report_direction_t */ + uint16_t attributeID; /*!< Attribute ID to report */ +} esp_zb_zcl_attribute_record_t; + +/** + * @brief The Zigbee ZCL read report configuration command struct + * + */ +typedef struct esp_zb_zcl_read_report_config_cmd_s { + esp_zb_zcl_basic_cmd_t zcl_basic_cmd; /*!< Basic command info */ + esp_zb_zcl_address_mode_t address_mode; /*!< APS addressing mode constants refer to esp_zb_zcl_address_mode_t */ + uint16_t clusterID; /*!< Cluster ID to report */ + uint16_t record_number; /*!< Number of attribute records in the record_field */ + esp_zb_zcl_attribute_record_t *record_field; /*!< Attribute records, @ref esp_zb_zcl_attribute_record_s */ +} esp_zb_zcl_read_report_config_cmd_t; + /** * @brief The Zigbee ZCL report attribute command struct * @@ -606,7 +638,7 @@ typedef struct esp_zb_zcl_lock_unlock_door_cmd_s { */ typedef struct esp_zb_zcl_groups_add_group_cmd_s { esp_zb_zcl_basic_cmd_t zcl_basic_cmd; /*!< Basic command info */ - esp_zb_zcl_address_mode_t address_mode; /*!< APS addressing mode constants @ref esp_zb_zcl_address_mode_t */ + esp_zb_zcl_address_mode_t address_mode; /*!< APS addressing mode constants, refer to esp_zb_zcl_address_mode_t */ uint16_t group_id; /*!< Group id */ } esp_zb_zcl_groups_add_group_cmd_t; @@ -616,7 +648,7 @@ typedef struct esp_zb_zcl_groups_add_group_cmd_s { */ typedef struct esp_zb_zcl_groups_remove_all_groups_cmd_s { esp_zb_zcl_basic_cmd_t zcl_basic_cmd; /*!< Basic command info */ - esp_zb_zcl_address_mode_t address_mode; /*!< APS addressing mode constants @ref esp_zb_zcl_address_mode_t */ + esp_zb_zcl_address_mode_t address_mode; /*!< APS addressing mode constants, refer to esp_zb_zcl_address_mode_t */ } esp_zb_zcl_groups_remove_all_groups_cmd_t; /** @@ -627,7 +659,7 @@ typedef struct esp_zb_zcl_groups_remove_all_groups_cmd_s { */ typedef struct esp_zb_zcl_groups_get_group_membership_cmd_s { esp_zb_zcl_basic_cmd_t zcl_basic_cmd; /*!< Basic command info */ - esp_zb_zcl_address_mode_t address_mode; /*!< APS addressing mode constants @ref esp_zb_zcl_address_mode_t */ + esp_zb_zcl_address_mode_t address_mode; /*!< APS addressing mode constants, refer to esp_zb_zcl_address_mode_t */ uint8_t group_count; /*!< Total group count */ uint16_t *group_list; /*!< Maximum group list */ } esp_zb_zcl_groups_get_group_membership_cmd_t; @@ -751,6 +783,90 @@ typedef struct esp_zb_zcl_ias_zone_enroll_request_cmd_s { uint16_t manuf_code; /*!< Manufacturer code */ } esp_zb_zcl_ias_zone_enroll_request_cmd_t; +/** + * @brief The Zigbee ZCL IAS_ACE Arm command struct + */ +typedef struct esp_zb_zcl_ias_ace_arm_cmd_s { + esp_zb_zcl_basic_cmd_t zcl_basic_cmd; /*!< Basic command info */ + esp_zb_zcl_address_mode_t address_mode; /*!< APS addressing mode constants refer to esp_zb_zcl_address_mode_t */ + esp_zb_zcl_ias_ace_arm_t payload; /*!< Arm command payload */ +} esp_zb_zcl_ias_ace_arm_cmd_t; + +/** + * @brief The Zigbee ZCL IAS_ACE Bypass command struct + */ +typedef struct esp_zb_zcl_ias_ace_bypass_cmd_s { + esp_zb_zcl_basic_cmd_t zcl_basic_cmd; /*!< Basic command info */ + esp_zb_zcl_address_mode_t address_mode; /*!< APS addressing mode constants refer to esp_zb_zcl_address_mode_t */ + esp_zb_zcl_ias_ace_bypass_t payload; /*!< Bypass command payload */ +} esp_zb_zcl_ias_ace_bypass_cmd_t; + +/** + * @brief The Zigbee ZCL IAS_ACE Emergency command struct + */ +typedef esp_zb_zcl_common_cmd_t esp_zb_zcl_ias_ace_emergency_cmd_t; + +/** + * @brief The Zigbee ZCL IAS_ACE Fire command struct + */ +typedef esp_zb_zcl_common_cmd_t esp_zb_zcl_ias_ace_fire_cmd_t; + +/** + * @brief The Zigbee ZCL IAS_ACE Panic command struct + */ +typedef esp_zb_zcl_common_cmd_t esp_zb_zcl_ias_ace_panic_cmd_t; + +/** + * @brief The Zigbee ZCL IAS_ACE Get Zone ID Map command struct + */ +typedef esp_zb_zcl_common_cmd_t esp_zb_zcl_ias_ace_get_zone_id_map_cmd_t; + +/** + * @brief The Zigbee ZCL IAS_ACE Get Zone Information command struct + */ +typedef struct esp_zb_zcl_ias_ace_get_zone_info_cmd_s { + esp_zb_zcl_basic_cmd_t zcl_basic_cmd; /*!< Basic command info */ + esp_zb_zcl_address_mode_t address_mode; /*!< APS addressing mode constants refer to esp_zb_zcl_address_mode_t */ + uint8_t zone_id; /*!< ID of the Zone to get the information */ +} esp_zb_zcl_ias_ace_get_zone_info_cmd_t; + +/** + * @brief The Zigbee ZCL IAS_ACE Get Panel Status command struct + */ +typedef esp_zb_zcl_common_cmd_t esp_zb_zcl_ias_ace_get_panel_status_cmd_t; + +/** + * @brief The Zigbee ZCL IAS_ACE Get Bypassed Zone List command struct + */ +typedef esp_zb_zcl_common_cmd_t esp_zb_zcl_ias_ace_get_bypassed_zone_list_cmd_t; + +/** + * @brief The Zigbee ZCL IAS_ACE Get Zone Status command struct + */ +typedef struct esp_zb_zcl_ias_ace_get_zone_status_cmd_s { + esp_zb_zcl_basic_cmd_t zcl_basic_cmd; /*!< Basic command info */ + esp_zb_zcl_address_mode_t address_mode; /*!< APS addressing mode constants refer to esp_zb_zcl_address_mode_t */ + esp_zb_zcl_ias_ace_get_zone_status_t payload; /*!< Get Zone Status command payload */ +} esp_zb_zcl_ias_ace_get_zone_status_cmd_t; + +/** + * @brief The Zigbee ZCL IAS_ACE Zone Status Changed command struct + */ +typedef struct esp_zb_zcl_ias_ace_zone_status_changed_cmd_s { + esp_zb_zcl_basic_cmd_t zcl_basic_cmd; /*!< Basic command info */ + esp_zb_zcl_address_mode_t address_mode; /*!< APS addressing mode constants refer to esp_zb_zcl_address_mode_t */ + esp_zb_zcl_ias_ace_zone_status_changed_t payload; /*!< Zone Status Changed command payload */ +} esp_zb_zcl_ias_ace_zone_status_changed_cmd_t; + +/** + * @brief The Zigbee ZCL IAS_ACE Panel Status Changed command struct + */ +typedef struct esp_zb_zcl_ias_ace_panel_status_changed_cmd_s { + esp_zb_zcl_basic_cmd_t zcl_basic_cmd; /*!< Basic command info */ + esp_zb_zcl_address_mode_t address_mode; /*!< APS addressing mode constants refer to esp_zb_zcl_address_mode_t */ + esp_zb_zcl_ias_ace_panel_status_changed_t payload; /*!< Panel Status Changed command payload */ +} esp_zb_zcl_ias_ace_panel_status_changed_cmd_t; + /** * @brief The Zigbee ZCL window covering send command struct * @@ -1079,6 +1195,155 @@ typedef struct esp_zb_zcl_ias_zone_enroll_response_message_s { uint8_t zone_id; /*!< The id of Zigbee ias zone cluster, refer to esp_zb_zcl_ias_zone_enroll_response_code_t */ } esp_zb_zcl_ias_zone_enroll_response_message_t; +/** + * @brief The Zigbee ZCL IAS_ACE Arm Response message struct + * + */ +typedef struct esp_zb_zcl_ias_ace_arm_response_message_s { + esp_zb_device_cb_common_info_t info; /*!< The common information for Zigbee device callback */ + const esp_zb_zcl_ias_ace_arm_resp_t *msg_in; /*!< Received Arm Response command payload */ +} esp_zb_zcl_ias_ace_arm_response_message_t; + +/** + * @brief The Zigbee ZCL IAS_ACE Get Zone ID Map Response message struct + * + */ +typedef struct esp_zb_zcl_ias_ace_get_zone_id_map_response_message_s { + esp_zb_device_cb_common_info_t info; /*!< The common information for Zigbee device callback */ + const esp_zb_zcl_ias_ace_get_zone_id_map_resp_t *msg_in; /*!< Received Get Zone ID Map Response command payload */ +} esp_zb_zcl_ias_ace_get_zone_id_map_response_message_t; + +/** + * @brief The Zigbee ZCL IAS_ACE Get Zone Information Response message struct + * + */ +typedef struct esp_zb_zcl_ias_ace_get_zone_info_response_message_s { + esp_zb_device_cb_common_info_t info; /*!< The common information for Zigbee device callback */ + const esp_zb_zcl_ias_ace_get_zone_info_resp_t *msg_in; /*!< Received Get Zone Information Response command payload */ +} esp_zb_zcl_ias_ace_get_zone_info_response_message_t; + +/** + * @brief The Zigbee ZCL IAS_ACE Zone Status Changed message struct + * + */ +typedef struct esp_zb_zcl_ias_ace_zone_status_changed_message_s { + esp_zb_device_cb_common_info_t info; /*!< The common information for Zigbee device callback */ + const esp_zb_zcl_ias_ace_zone_status_changed_t *msg_in; /*!< Received Zone Status Changed command payload */ +} esp_zb_zcl_ias_ace_zone_status_changed_message_t; + +/** + * @brief The Zigbee ZCL IAS_ACE Panel Status Changed message struct + * + */ +typedef struct esp_zb_zcl_ias_ace_panel_status_changed_message_s { + esp_zb_device_cb_common_info_t info; /*!< The common information for Zigbee device callback */ + const esp_zb_zcl_ias_ace_panel_status_changed_t *msg_in; /*!< Received Panel Status Changed command payload */ +} esp_zb_zcl_ias_ace_panel_status_changed_message_t; + +/** + * @brief The Zigbee ZCL IAS_ACE Get Panel Status Response message struct + * + */ +typedef struct esp_zb_zcl_ias_ace_get_panel_status_response_message_s { + esp_zb_device_cb_common_info_t info; /*!< The common information for Zigbee device callback */ + const esp_zb_zcl_ias_ace_get_panel_status_resp_t *msg_in; /*!< Received Get Panel Status Response command payload */ +} esp_zb_zcl_ias_ace_get_panel_status_response_message_t; + +/** + * @brief The Zigbee ZCL IAS_ACE Set Bypassed Zone List message struct + * + */ +typedef struct esp_zb_zcl_ias_ace_set_bypassed_zone_list_message_s { + esp_zb_device_cb_common_info_t info; /*!< The common information for Zigbee device callback */ + const esp_zb_zcl_ias_ace_set_bypassed_zone_list_t *msg_in; /*!< Received Set Bypassed Zone List command payload */ +} esp_zb_zcl_ias_ace_set_bypassed_zone_list_message_t; + +/** + * @brief The Zigbee ZCL IAS_ACE Bypass Response message struct + * + */ +typedef struct esp_zb_zcl_ias_ace_bypass_response_message_s { + esp_zb_device_cb_common_info_t info; /*!< The common information for Zigbee device callback */ + const esp_zb_zcl_ias_ace_bypass_resp_t *msg_in; /*!< Received Bypass Response command payload */ +} esp_zb_zcl_ias_ace_bypass_response_message_t; + +/** + * @brief The Zigbee ZCL IAS_ACE Get Zone Status Response message struct + * + */ +typedef struct esp_zb_zcl_ias_ace_get_zone_status_response_message_s { + esp_zb_device_cb_common_info_t info; /*!< The common information for Zigbee device callback */ + const esp_zb_zcl_ias_ace_get_zone_status_resp_t *msg_in; /*!< Received Get Zone Status Response command payload */ +} esp_zb_zcl_ias_ace_get_zone_status_response_message_t; + +/** + * @brief The Zigbee ZCL IAS_ACE Arm message struct + * + */ +typedef struct esp_zb_zcl_ias_ace_arm_message_s { + esp_zb_device_cb_common_info_t info; /*!< The common information for Zigbee device callback */ + const esp_zb_zcl_ias_ace_arm_t *msg_in; /*!< Received Arm command payload */ + esp_zb_zcl_ias_ace_arm_resp_t *msg_out; /*!< Response of Arm command to be sent */ +} esp_zb_zcl_ias_ace_arm_message_t; + +/** + * @brief The Zigbee ZCL IAS_ACE Bypass message struct + * + */ +typedef struct esp_zb_zcl_ias_ace_bypass_message_s { + esp_zb_device_cb_common_info_t info; /*!< The common information for Zigbee device callback */ + const esp_zb_zcl_ias_ace_bypass_t *msg_in; /*!< Received Bypass command payload */ + esp_zb_zcl_ias_ace_bypass_resp_t *msg_out; /*!< Response of Bypass command to be sent */ +} esp_zb_zcl_ias_ace_bypass_message_t; + +/** + * @brief The Zigbee ZCL IAS_ACE Emergency message struct + * + */ +typedef struct esp_zb_zcl_ias_ace_emergency_message_s { + esp_zb_device_cb_common_info_t info; /*!< The common information for Zigbee device callback */ +} esp_zb_zcl_ias_ace_emergency_message_t; + +/** + * @brief The Zigbee ZCL IAS_ACE Fire message struct + * + */ +typedef esp_zb_zcl_ias_ace_emergency_message_t esp_zb_zcl_ias_ace_fire_message_t; + +/** + * @brief The Zigbee ZCL IAS_ACE Panic message struct + * + */ +typedef esp_zb_zcl_ias_ace_emergency_message_t esp_zb_zcl_ias_ace_panic_message_t; + +/** + * @brief The Zigbee ZCL IAS_ACE Get Panel Status message struct + * + */ +typedef struct esp_zb_zcl_ias_ace_get_panel_status_message_s { + esp_zb_device_cb_common_info_t info; /*!< The common information for Zigbee device callback */ + esp_zb_zcl_ias_ace_get_panel_status_resp_t *msg_out; /*!< Response of Get Panel Status command to be sent */ +} esp_zb_zcl_ias_ace_get_panel_status_message_t; + +/** + * @brief The Zigbee ZCL IAS_ACE Get Bypassed Zone List message struct + * + */ +typedef struct esp_zb_zcl_ias_ace_get_bypassed_zone_list_message_s { + esp_zb_device_cb_common_info_t info; /*!< The common information for Zigbee device callback */ + esp_zb_zcl_ias_ace_set_bypassed_zone_list_message_t *msg_out; /*!< Response of Get Bypassed Zone List command to be sent */ +} esp_zb_zcl_ias_ace_get_bypassed_zone_list_message_t; + +/** + * @brief The Zigbee ZCL IAS_ACE Get Zone Status message struct + * + */ +typedef struct esp_zb_zcl_ias_ace_get_zone_status_message_s { + esp_zb_device_cb_common_info_t info; /*!< The common information for Zigbee device callback */ + const esp_zb_zcl_ias_ace_get_zone_status_t *msg_in; /*!< Received Get Zone Status command payload */ + esp_zb_zcl_ias_ace_get_zone_status_resp_t *msg_out; /*!< Response of Get Zone Status command to be sent */ +} esp_zb_zcl_ias_ace_get_zone_status_message_t; + /** * @brief The Zigbee zcl ota upgrade value device callback message struct * @@ -1853,6 +2118,7 @@ typedef struct esp_zb_zcl_scenes_get_scene_membership_resp_message_s { uint8_t scene_count; /*!< The Number of scenes(Optional) */ uint8_t *scene_list; /*!< The Array of scenes corresponding to the group identifier(Optional) */ } esp_zb_zcl_scenes_get_scene_membership_resp_message_t; + /** * @brief The Zigbee ZCL IAS Zone enroll request message struct * @@ -1868,7 +2134,7 @@ typedef struct esp_zb_zcl_ias_zone_enroll_request_message_s { * */ typedef struct esp_zb_zcl_ias_zone_status_change_notification_message_s { - esp_zb_zcl_cmd_info_t info; /*!< The basic information of ias zone status message that refers to esp_zb_zcl_report_attr_message_t */ + esp_zb_zcl_cmd_info_t info; /*!< The basic information of ias zone message that refers to esp_zb_zcl_cmd_info_t */ uint16_t zone_status; /*!< The zone status attribute, which can refer esp_zb_zcl_ias_zone_zonestatus_t */ uint8_t extended_status; /*!< Reserved for additional status information and SHALL be set to zero */ uint8_t zone_id; /*!< The Zone ID is the index of the Zone in the CIE's zone table */ @@ -1881,7 +2147,7 @@ typedef struct esp_zb_zcl_ias_zone_status_change_notification_message_s { * */ typedef struct esp_zb_zcl_privilege_command_message_s { - esp_zb_zcl_cmd_info_t info; /*!< The basic information of privilege command message that refers to esp_zb_zcl_report_attr_message_t */ + esp_zb_zcl_cmd_info_t info; /*!< The basic information of privilege command message that refers to esp_zb_zcl_cmd_info_t */ uint16_t size; /*!< The size of data */ void *data; /*!< The privilege command data */ } esp_zb_zcl_privilege_command_message_t; @@ -1893,7 +2159,7 @@ typedef struct esp_zb_zcl_privilege_command_message_s { * For array, array16, array32, and long string data types, the first 2 bytes should represent the number of elements in the array. */ typedef struct esp_zb_zcl_custom_cluster_command_message_s { - esp_zb_zcl_cmd_info_t info; /*!< The basic information of customized cluster command message that refers to esp_zb_zcl_report_attr_message_t */ + esp_zb_zcl_cmd_info_t info; /*!< The basic information of customized cluster command message that refers to esp_zb_zcl_cmd_info_t */ struct { uint16_t size; /*!< The size of custom data */ void *value; /*!< The value of custom data */ @@ -2047,7 +2313,7 @@ uint8_t esp_zb_zcl_write_attr_cmd_req(esp_zb_zcl_write_attr_cmd_t *cmd_req); * @brief Send report attribute command * * @param[in] cmd_req pointer to the report attribute command @ref esp_zb_zcl_report_attr_cmd_s - * @note Currently it supports ZCL specs defined attributes with type 8,16,32,64 bit or string. + * @note This function just does one-shot report ignoring the reporting configuration. * @return - ESP_OK on success * */ @@ -2062,6 +2328,15 @@ esp_err_t esp_zb_zcl_report_attr_cmd_req(esp_zb_zcl_report_attr_cmd_t *cmd_req); */ uint8_t esp_zb_zcl_config_report_cmd_req(esp_zb_zcl_config_report_cmd_t *cmd_req); +/** + * @brief Send read reporting configuration command + * + * @param[in] cmd_req pointer to the read report config command, @ref esp_zb_zcl_read_report_config_cmd_s + * + * @return The transaction sequence number + */ +uint8_t esp_zb_zcl_read_report_config_cmd_req(esp_zb_zcl_read_report_config_cmd_t *cmd_req); + /** * @brief Send discover attributes command * @@ -2582,6 +2857,114 @@ uint8_t esp_zb_zcl_ias_zone_status_change_notif_cmd_req(esp_zb_zcl_ias_zone_stat */ uint8_t esp_zb_zcl_ias_zone_enroll_cmd_req(esp_zb_zcl_ias_zone_enroll_request_cmd_t *cmd_req); +/** + * @brief Send IAS_ACE Arm command + * + * @param[in] cmd_req pointer to the Arm command @ref esp_zb_zcl_ias_ace_arm_cmd_s + * + * @return The transaction sequence number + */ +uint8_t esp_zb_zcl_ias_ace_arm_cmd_req(esp_zb_zcl_ias_ace_arm_cmd_t *cmd_req); + +/** + * @brief Send IAS_ACE Bypass command + * + * @param[in] cmd_req pointer to the Bypass command @ref esp_zb_zcl_ias_ace_bypass_cmd_s + * + * @return The transaction sequence number + */ +uint8_t esp_zb_zcl_ias_ace_bypass_cmd_req(esp_zb_zcl_ias_ace_bypass_cmd_t *cmd_req); + +/** + * @brief Send IAS_ACE Emergency command + * + * @param[in] cmd_req pointer to the Emergency command, refer to esp_zb_zcl_ias_ace_emergency_cmd_t + * + * @return The transaction sequence number + */ +uint8_t esp_zb_zcl_ias_ace_emergency_cmd_req(esp_zb_zcl_ias_ace_emergency_cmd_t *cmd_req); + +/** + * @brief Send IAS_ACE Fire command + * + * @param[in] cmd_req pointer to the Fire command, refer to esp_zb_zcl_ias_ace_fire_cmd_t + * + * @return The transaction sequence number + */ +uint8_t esp_zb_zcl_ias_ace_fire_cmd_req(esp_zb_zcl_ias_ace_fire_cmd_t *cmd_req); + +/** + * @brief Send IAS_ACE Panic command + * + * @param[in] cmd_req pointer to the Panic command, refer to esp_zb_zcl_ias_ace_panic_cmd_t + * + * @return The transaction sequence number + */ +uint8_t esp_zb_zcl_ias_ace_panic_cmd_req(esp_zb_zcl_ias_ace_panic_cmd_t *cmd_req); + +/** + * @brief Send IAS_ACE Get Zone ID Map command + * + * @param[in] cmd_req pointer to the Get Zone ID Map command, refer to esp_zb_zcl_ias_ace_get_zone_id_map_cmd_t + * + * @return The transaction sequence number + */ +uint8_t esp_zb_zcl_ias_ace_get_zone_id_map_cmd_req(esp_zb_zcl_ias_ace_get_zone_id_map_cmd_t *cmd_req); + +/** + * @brief Send IAS_ACE Get Zone Information command + * + * @param[in] cmd_req pointer to the Get Zone Information command, refer to esp_zb_zcl_ias_ace_get_zone_info_cmd_t + * + * @return The transaction sequence number + */ +uint8_t esp_zb_zcl_ias_ace_get_zone_information_cmd_req(esp_zb_zcl_ias_ace_get_zone_info_cmd_t *cmd_req); + +/** + * @brief Send IAS_ACE Get Panel Status command + * + * @param[in] cmd_req pointer to the Get Panel Status command, refer to esp_zb_zcl_ias_ace_get_panel_status_cmd_s + * + * @return The transaction sequence number + */ +uint8_t esp_zb_zcl_ias_ace_get_panel_status_cmd_req(esp_zb_zcl_ias_ace_get_panel_status_cmd_t *cmd_req); + +/** + * @brief Send IAS_ACE Get Bypassed Zone List command + * + * @param[in] cmd_req pointer to the Get Bypassed Zone List command, refer to esp_zb_zcl_ias_ace_get_bypassed_zone_list_cmd_t + * + * @return The transaction sequence number + */ +uint8_t esp_zb_zcl_ias_ace_get_bypassed_zone_list_cmd_req(esp_zb_zcl_ias_ace_get_bypassed_zone_list_cmd_t *cmd_req); + +/** + * @brief Send IAS_ACE Get Zone Status command + * + * @param[in] cmd_req pointer to the Get Zone Status command, refer to esp_zb_zcl_ias_ace_get_zone_status_cmd_t + * + * @return The transaction sequence number + */ +uint8_t esp_zb_zcl_ias_ace_get_zone_status_cmd_req(esp_zb_zcl_ias_ace_get_zone_status_cmd_t *cmd_req); + +/** + * @brief Send IAS_ACE Zone Status Changed command + * + * @param[in] cmd_req pointer to the Zone Status Changed command @ref esp_zb_zcl_ias_ace_zone_status_changed_cmd_s + * + * @return The transaction sequence number + */ +uint8_t esp_zb_zcl_ias_ace_zone_status_changed_cmd_req(esp_zb_zcl_ias_ace_zone_status_changed_cmd_t *cmd_req); + +/** + * @brief Send IAS_ACE Panel Status Changed command + * + * @param[in] cmd_req pointer to the Panel Status Changed command @ref esp_zb_zcl_ias_ace_panel_status_changed_cmd_s + * + * @return The transaction sequence number + */ +uint8_t esp_zb_zcl_ias_ace_panel_status_changed_cmd_req(esp_zb_zcl_ias_ace_panel_status_changed_cmd_t *cmd_req); + /** * @brief Send window covering cluster command request * diff --git a/components/esp-zigbee-lib/include/zcl/esp_zigbee_zcl_common.h b/components/esp-zigbee-lib/include/zcl/esp_zigbee_zcl_common.h index a635cd7..e152561 100644 --- a/components/esp-zigbee-lib/include/zcl/esp_zigbee_zcl_common.h +++ b/components/esp-zigbee-lib/include/zcl/esp_zigbee_zcl_common.h @@ -23,6 +23,7 @@ extern "C" { #include "esp_zigbee_zcl_binary_input.h" #include "esp_zigbee_zcl_commissioning.h" #include "esp_zigbee_zcl_ias_zone.h" +#include "esp_zigbee_zcl_ias_ace.h" #include "esp_zigbee_zcl_shade_config.h" #include "esp_zigbee_zcl_door_lock.h" #include "esp_zigbee_zcl_humidity_meas.h" @@ -170,6 +171,7 @@ typedef enum { ESP_ZB_ZCL_CLUSTER_ID_CARBON_DIOXIDE_MEASUREMENT = 0x040dU, /*!< Carbon dioxide measurement */ ESP_ZB_ZCL_CLUSTER_ID_PM2_5_MEASUREMENT = 0x042aU, /*!< PM2.5 measurement */ ESP_ZB_ZCL_CLUSTER_ID_IAS_ZONE = 0x0500U, /*!< IAS zone */ + ESP_ZB_ZCL_CLUSTER_ID_IAS_ACE = 0x0501U, /*!< IAS ACE */ ESP_ZB_ZCL_CLUSTER_ID_PRICE = 0x0700U, /*!< Price cluster identifier. */ ESP_ZB_ZCL_CLUSTER_ID_METERING = 0x0702U, /*!< Metering */ ESP_ZB_ZCL_CLUSTER_ID_METER_IDENTIFICATION = 0x0b01U, /*!< Meter Identification cluster identifier */ diff --git a/components/esp-zigbee-lib/include/zcl/esp_zigbee_zcl_ias_ace.h b/components/esp-zigbee-lib/include/zcl/esp_zigbee_zcl_ias_ace.h new file mode 100644 index 0000000..82bf5b3 --- /dev/null +++ b/components/esp-zigbee-lib/include/zcl/esp_zigbee_zcl_ias_ace.h @@ -0,0 +1,271 @@ +/* + * SPDX-FileCopyrightText: 2024 Espressif Systems (Shanghai) CO LTD + * + * SPDX-License-Identifier: Apache-2.0 + */ + +#pragma once +#ifdef __cplusplus +extern "C" { +#endif + +#include "esp_zigbee_type.h" + +/** @brief Structure representation of IAS ACE Zone Table */ +typedef struct esp_zb_zcl_ias_ace_zone_table_s { + uint8_t zone_id; /**< Zone ID */ + uint16_t zone_type; /**< Zone Type, see esp_zb_zcl_ias_zone_zonetype_t */ + esp_zb_ieee_addr_t zone_address; /**< Zone Address */ + uint8_t *zone_label; /**< The pointer to a string with Zone Label. NULL pointer means the Zone Label is not programmed */ +} ESP_ZB_PACKED_STRUCT esp_zb_zcl_ias_ace_zone_table_t; + +/** @brief Default value for IAS ACE cluster revision global attribute */ +#define ESP_ZB_ZCL_IAS_ACE_CLUSTER_REVISION_DEFAULT ((uint16_t)0x0001u) + +/** @brief IAS ACE Zone Table maximum length */ +#define ESP_ZB_ZCL_IAS_ACE_ZONE_TABLE_LENGTH 255 + +/** @brief IAS ACE ZoneType attribute maximum value */ +#define ESP_ZB_ZCL_IAS_ACE_ZONE_TYPE_MAX_VALUE 0xfffe + +/** @brief IAS ACE ZoneID attribute maximum value */ +#define ESP_ZB_ZCL_IAS_ACE_ZONE_ID_MAX_VALUE 0xfe + +/** @brief IAS ACE ZoneID attribute default value */ +#define ESP_ZB_ZCL_IAS_ACE_ZONE_ID_DEFAULT_VALUE 0 + +/** @brief IAS ACE Set Zone Address default value */ +#define ESP_ZB_ZCL_IAS_ACE_SET_ZONE_ADDRESS_DEFAULT_VALUE(ptr) (ZB_IEEE_ADDR_COPY(ptr, &g_unknown_ieee_addr)) + +/** @brief IAS Ace cluster command identifiers */ +typedef enum { + ESP_ZB_ZCL_CMD_IAS_ACE_ARM_ID = 0x00, /**< Arm command */ + ESP_ZB_ZCL_CMD_IAS_ACE_BYPASS_ID = 0x01, /**< Bypass command */ + ESP_ZB_ZCL_CMD_IAS_ACE_EMERGENCY_ID = 0x02, /**< Emergency command */ + ESP_ZB_ZCL_CMD_IAS_ACE_FIRE_ID = 0x03, /**< Fire command */ + ESP_ZB_ZCL_CMD_IAS_ACE_PANIC_ID = 0x04, /**< Panic command */ + ESP_ZB_ZCL_CMD_IAS_ACE_GET_ZONE_ID_MAP_ID = 0x05, /**< Get Zone ID Map command */ + ESP_ZB_ZCL_CMD_IAS_ACE_GET_ZONE_INFO_ID = 0x06, /**< Get Zone Information command */ + ESP_ZB_ZCL_CMD_IAS_ACE_GET_PANEL_STATUS_ID = 0x07, /**< Get Panel Status command */ + ESP_ZB_ZCL_CMD_IAS_ACE_GET_BYPASSED_ZONE_LIST_ID = 0x08, /**< Get Bypassed Zone List command */ + ESP_ZB_ZCL_CMD_IAS_ACE_GET_ZONE_STATUS_ID = 0x09, /**< Get Zone Status command */ +} esp_zb_zcl_ias_ace_cmd_t; + +/** @brief IAS Ace cluster response command identifiers */ +typedef enum { + ESP_ZB_ZCL_CMD_IAS_ACE_ARM_RESP_ID = 0x00, /**< Arm Response command */ + ESP_ZB_ZCL_CMD_IAS_ACE_GET_ZONE_ID_MAP_RESP_ID = 0x01, /**< Get Zone ID Map Response command */ + ESP_ZB_ZCL_CMD_IAS_ACE_GET_ZONE_INFO_RESP_ID = 0x02, /**< Get Zone Information Response command */ + ESP_ZB_ZCL_CMD_IAS_ACE_ZONE_STATUS_CHANGED_ID = 0x03, /**< Updates ACE clients of changes to zone status recorded by the server. */ + ESP_ZB_ZCL_CMD_IAS_ACE_PANEL_STATUS_CHANGED_ID = 0x04, /**< Updates ACE clients of changes to zone status recorded by the server. */ + ESP_ZB_ZCL_CMD_IAS_ACE_GET_PANEL_STATUS_RESPONSE_ID = 0x05, /**< Updates ACE clients of changes to panel status recorded by the server. */ + ESP_ZB_ZCL_CMD_IAS_ACE_SET_BYPASSED_ZONE_LIST_ID = 0x06, /**< Sets the list of bypassed zones on the IAS ACE client. */ + ESP_ZB_ZCL_CMD_IAS_ACE_BYPASS_RESPONSE_ID = 0x07, /**< Bypass Response command. */ + ESP_ZB_ZCL_CMD_IAS_ACE_GET_ZONE_STATUS_RESPONSE_ID = 0x08, /**< Get Zone Status Response Command. */ +} esp_zb_zcl_ias_ace_resp_cmd_t; + +/******************************* Arm Command ******************************/ + +/** @brief Values of the Arm Mode */ +typedef enum { + ESP_ZB_ZCL_IAS_ACE_ARM_MODE_DISARM = 0x00, /**< Disarm */ + ESP_ZB_ZCL_IAS_ACE_ARM_MODE_DAY = 0x01, /**< Arm Day/Home Zones Only */ + ESP_ZB_ZCL_IAS_ACE_ARM_MODE_NIGHT = 0x02, /**< Arm Night/Sleep Zones Only */ + ESP_ZB_ZCL_IAS_ACE_ARM_MODE_ALL = 0x03, /**< Arm All Zones */ +} esp_zb_zcl_ias_ace_arm_mode_t; + +/** @brief Structure representation of Arm command */ +typedef struct esp_zb_zcl_ias_ace_arm_s { + uint8_t arm_mode; /**< Arm Mode, see esp_zb_zcl_ias_ace_arm_mode_t */ + uint8_t arm_disarm_code[ESP_ZB_ZCL_MAX_STRING_SIZE]; /**< Arm/Disarm Code */ + uint8_t zone_id; /**< Zone ID */ +} ESP_ZB_PACKED_STRUCT esp_zb_zcl_ias_ace_arm_t; + +/******************************* Bypass Command ******************************/ + +/** @brief Structure representation of Bypass command */ +typedef struct esp_zb_zcl_ias_ace_bypass_s { + uint8_t length; /**< Number of Zones */ + uint8_t zone_id[ESP_ZB_ZCL_IAS_ACE_ZONE_TABLE_LENGTH]; /**< Zone ID array, see esp_zb_zcl_ias_ace_zone_table_s */ + uint8_t arm_disarm_code[ESP_ZB_ZCL_MAX_STRING_SIZE]; /**< Arm/Disarm Code */ +} ESP_ZB_PACKED_STRUCT esp_zb_zcl_ias_ace_bypass_t; + +/******************************* Emergency Command ******************************/ + +/******************************* Fire Command ******************************/ + +/******************************* Panic Command ******************************/ + +/******************************* Get Zone ID Map command ******************************/ + +/******************************* Get Zone Information command ******************************/ + +/** @brief Structure representation of Get Zone Information command */ +typedef struct esp_zb_zcl_ias_ace_get_zone_info_s { + uint8_t zone_id; /**< Zone ID, see @ref esp_zb_zcl_ias_ace_zone_table_s */ +} ESP_ZB_PACKED_STRUCT esp_zb_zcl_ias_ace_get_zone_info_t; + +/******************************* Get Panel Status command ******************************/ + +/******************************* Get Bypassed Zone List command ******************************/ + +/******************************* Get Zone Status command ******************************/ + +/** @brief Structure representation of Get Zone Status command */ +typedef struct esp_zb_zcl_ias_ace_get_zone_status_s { + uint8_t starting_zone_id; /**< Starting Zone ID, see esp_zb_zcl_ias_ace_zone_table_s */ + uint8_t max_num_zone_ids; /**< Max Number of Zone IDs Requested Field */ + uint8_t zone_status_mask_flag; /**< Zone Status Mask Flag Field */ + uint16_t zone_status_mask; /**< Zone Status Mask Field, see esp_zb_zcl_ias_zone_zonestatus_t */ +} ESP_ZB_PACKED_STRUCT esp_zb_zcl_ias_ace_get_zone_status_t; + +/******************************* Arm Response command ******************************/ + +/** @brief Values of the Arm Notification */ +typedef enum { + ESP_ZB_ZCL_IAS_ACE_ARM_NOTIF_ALL_ZONES_DISARMED = 0x00, /**< All Zones Disarmed */ + ESP_ZB_ZCL_IAS_ACE_ARM_NOTIF_ONLY_DAY_HOME_ZONES_ARMED = 0x01, /**< Only Day/Home Zones Armed */ + ESP_ZB_ZCL_IAS_ACE_ARM_NOTIF_ONLY_NIGHT_SLEEP_ZONES_ARMED = 0x02, /**< Only Night/Sleep Zones Armed */ + ESP_ZB_ZCL_IAS_ACE_ARM_NOTIF_ALL_ZONES_ARMED = 0x03, /**< All Zones Armed */ + ESP_ZB_ZCL_IAS_ACE_ARM_NOTIF_INVALID_ARM_DISARM_CODE = 0x04, /**< Invalid Arm/Disarm Code */ + ESP_ZB_ZCL_IAS_ACE_ARM_NOTIF_NOT_READY_TO_ARM = 0x05, /**< Not ready to arm */ + ESP_ZB_ZCL_IAS_ACE_ARM_NOTIF_ALREADY_DISARMED = 0x06, /**< Already disarmed */ +} esp_zb_zcl_ias_ace_arm_notif_t; + +/** @brief Structure representation of Arm Response command */ +typedef struct esp_zb_zcl_ias_ace_arm_resp_s { + uint8_t arm_notification; /**< Arm Notification, see esp_zb_zcl_ias_ace_arm_notif_t */ +} ESP_ZB_PACKED_STRUCT esp_zb_zcl_ias_ace_arm_resp_t; + +/******************************* Get Zone ID Map Response command ******************************/ + +/** @brief Length of array of Bitmap of Zone ID Map */ +#define ESP_ZB_ZCL_IAS_ACE_GET_ZONE_ID_MAP_LENGTH 16 + +/** @brief Structure representation of Get Zone ID Map Response command */ +typedef struct esp_zb_zcl_ias_ace_get_zone_id_map_resp_s { + uint16_t zone_id_map[ESP_ZB_ZCL_IAS_ACE_GET_ZONE_ID_MAP_LENGTH]; /**< Zone ID Map */ +} ESP_ZB_PACKED_STRUCT esp_zb_zcl_ias_ace_get_zone_id_map_resp_t; + +/******************* Get Zone Information Response command ******************************/ + +/** @brief Zone Type is empty */ +#define ESP_ZB_ZCL_IAS_ACE_GET_ZONE_INFO_TYPE_NONE 0xffff + +/** @brief Structure representation of Get Zone Information Response command, see esp_zb_zcl_ias_ace_zone_table_s */ +typedef struct esp_zb_zcl_ias_ace_get_zone_info_resp_s { + uint8_t zone_id; /**< Zone ID */ + uint16_t zone_type; /**< Zone Type, see esp_zb_zcl_ias_zone_zonetype_t */ + esp_zb_ieee_addr_t address; /**< Zone Address */ + uint8_t zone_label[ESP_ZB_ZCL_MAX_STRING_SIZE]; /**< Zone Label Field */ +} ESP_ZB_PACKED_STRUCT esp_zb_zcl_ias_ace_get_zone_info_resp_t; + +/******************* Zone Status Changed command ******************************/ + +/** @brief IAS ACE Audible Notification Field + @see ZCL spec 8.3.2.4.4.4 +*/ +typedef enum { + ESP_ZB_ZCL_IAS_ACE_AUD_NOTIFICATION_MUTE = 0x00, /**< Mute (i.e., no audible notification) */ + ESP_ZB_ZCL_IAS_ACE_AUD_NOTIFICATION_DEF_SOUND = 0x01, /**< Default sound */ + ESP_ZB_ZCL_IAS_ACE_AUD_NOTIFICATION_MANUF_SPECIFIC = 0x80, /**< Manufacturer specific */ +} esp_zb_zcl_ias_ace_aud_notification_t; + +/** @brief Structure representation of Zone Status Changed command */ +typedef struct esp_zb_zcl_ias_ace_zone_status_changed_s { + uint8_t zone_id; /**< Zone ID */ + uint16_t zone_status; /**< Zone Status, see esp_zb_zcl_ias_zone_zonestatus_t */ + uint8_t aud_notification; /**< Audible Notification, see esp_zb_zcl_ias_ace_aud_notification_t */ + uint8_t zone_label[ESP_ZB_ZCL_MAX_STRING_SIZE]; /**< Zone Label Field */ +} ESP_ZB_PACKED_STRUCT esp_zb_zcl_ias_ace_zone_status_changed_t; + +/******************* Panel Status Changed command ******************************/ + +/** @brief IAS ACE PanelStatus Parameter */ +typedef enum { + ESP_ZB_ZCL_IAS_ACE_PANEL_STATUS_DISARMED = 0x00, /**< Panel disarmed (all zones disarmed) and ready to arm */ + ESP_ZB_ZCL_IAS_ACE_PANEL_STATUS_ARMED_STAY = 0x01, /**< Armed stay */ + ESP_ZB_ZCL_IAS_ACE_PANEL_STATUS_ARMED_NIGHT = 0x02, /**< Armed night */ + ESP_ZB_ZCL_IAS_ACE_PANEL_STATUS_ARMED_AWAY = 0x03, /**< Armed away */ + ESP_ZB_ZCL_IAS_ACE_PANEL_STATUS_EXIT_DELAY = 0x04, /**< Exit delay */ + ESP_ZB_ZCL_IAS_ACE_PANEL_STATUS_ENTRY_DELAY = 0x05, /**< Entry delay */ + ESP_ZB_ZCL_IAS_ACE_PANEL_STATUS_NOT_READY = 0x06, /**< Not ready to arm */ + ESP_ZB_ZCL_IAS_ACE_PANEL_STATUS_IN_ALARM = 0x07, /**< In alarm */ + ESP_ZB_ZCL_IAS_ACE_PANEL_STATUS_ARMING_STAY = 0x08, /**< Arming Stay */ + ESP_ZB_ZCL_IAS_ACE_PANEL_STATUS_ARMING_NIGHT = 0x09, /**< Arming Night */ + ESP_ZB_ZCL_IAS_ACE_PANEL_STATUS_ARMING_AWAY = 0x0a, /**< Arming Away */ +} esp_zb_zcl_ias_ace_panel_status_t; + +/** @brief IAS ACE Alarm Status Field */ +typedef enum { + ESP_ZB_ZCL_IAS_ACE_ALARM_STATUS_NO_ALARM = 0x00, /**< No alarm */ + ESP_ZB_ZCL_IAS_ACE_ALARM_STATUS_BURGLAR = 0x01, /**< Burglar */ + ESP_ZB_ZCL_IAS_ACE_ALARM_STATUS_FIRE = 0x02, /**< Fire */ + ESP_ZB_ZCL_IAS_ACE_ALARM_STATUS_EMERGENCY = 0x03, /**< Emergency */ + ESP_ZB_ZCL_IAS_ACE_ALARM_STATUS_POLICE_PANIC = 0x04, /**< Police Panic */ + ESP_ZB_ZCL_IAS_ACE_ALARM_STATUS_FIRE_PANIC = 0x05, /**< Fire Panic */ + ESP_ZB_ZCL_IAS_ACE_ALARM_STATUS_EMERGENCY_PANIC = 0x06, /**< Emergency Panic */ +} esp_zb_zcl_ias_ace_alarm_status_t; + +/** @brief Structure representation of Panel Status Changed command */ +typedef struct esp_zb_zcl_ias_ace_panel_status_changed_s { + uint8_t panel_status; /**< Panel Status, see esp_zb_zcl_ias_ace_panel_status_t */ + uint8_t seconds_remaining; /**< Seconds Remaining Parameter */ + uint8_t aud_notification; /**< Audible Notification, see esp_zb_zcl_ias_ace_aud_notification_t */ + uint8_t alarm_status; /**< Alarm Status Field, see esp_zb_zcl_ias_ace_alarm_status_t */ +} ESP_ZB_PACKED_STRUCT esp_zb_zcl_ias_ace_panel_status_changed_t; + +/******************* Get Panel Status Response command ******************************/ + +/** @brief Structure representation of Get Panel Status Response command */ +typedef struct esp_zb_zcl_ias_ace_get_panel_status_resp_s { + uint8_t panel_status; /**< Panel Status, see esp_zb_zcl_ias_ace_panel_status_t */ + uint8_t seconds_remaining; /**< Seconds Remaining Parameter */ + uint8_t aud_notification; /**< Audible Notification, see esp_zb_zcl_ias_ace_aud_notification_t */ + uint8_t alarm_status; /**< Alarm Status Field, see esp_zb_zcl_ias_ace_alarm_status_t */ +} ESP_ZB_PACKED_STRUCT esp_zb_zcl_ias_ace_get_panel_status_resp_t; + +/******************* Set Bypassed Zone List command ******************************/ + +/** @brief Structure representation of Set Bypassed Zone List command */ +typedef struct esp_zb_zcl_ias_ace_set_bypassed_zone_list_s { + uint8_t length; /**< Number of Zones */ + uint8_t zone_id[ESP_ZB_ZCL_IAS_ACE_ZONE_TABLE_LENGTH]; /**< Zone ID array, see esp_zb_zcl_ias_ace_zone_table_s */ +} ESP_ZB_PACKED_STRUCT esp_zb_zcl_ias_ace_set_bypassed_zone_list_t; + +/******************* Bypass Response command ******************************/ + +/** @brief IAS ACE Bypass Result */ +typedef enum { + ESP_ZB_ZCL_IAS_ACE_BYPASS_RESULT_BYPASSED = 0x00, /**< Bypass request is successful. Zone is bypassed. */ + ESP_ZB_ZCL_IAS_ACE_BYPASS_RESULT_NOT_BYPASSED = 0x01, /**< Bypass request is unsuccessful. Zone is not bypassed. */ + ESP_ZB_ZCL_IAS_ACE_BYPASS_RESULT_NOT_ALLOWED = 0x02, /**< Bypass request is not allowed. Zone is not bypassed. */ + ESP_ZB_ZCL_IAS_ACE_BYPASS_RESULT_INVALID_ZONE_ID = 0x03, /**< Invalid Zone ID in the request. */ + ESP_ZB_ZCL_IAS_ACE_BYPASS_RESULT_UNKNOWN_ZONE_ID = 0x04, /**< Valid range of Zone ID, but unknown to server. */ + ESP_ZB_ZCL_IAS_ACE_BYPASS_RESULT_INVALID_ARM_CODE = 0x05, /**< Arm/Disarm Code was entered incorrectly. */ +} esp_zb_zcl_ias_ace_bypass_result_t; + +/** @brief Structure representation of Bypass Response command */ +typedef struct esp_zb_zcl_ias_ace_bypass_resp_s { + uint8_t length; /**< Number of Zones */ + uint8_t bypass_result[ESP_ZB_ZCL_IAS_ACE_ZONE_TABLE_LENGTH]; /**< Bypass Result for Zone IDs, see esp_zb_zcl_ias_ace_bypass_result_t */ +} ESP_ZB_PACKED_STRUCT esp_zb_zcl_ias_ace_bypass_resp_t; + +/******************* Get Zone Status Response command ******************************/ + +/** @brief IAS ACE Zone Status structure */ +typedef struct esp_zb_zcl_ias_ace_zone_status_s { + uint8_t zone_id; /**< Zone ID, see esp_zb_zcl_ias_ace_zone_table_s */ + uint16_t zone_status; /**< Zone Status, see esp_zb_zcl_ias_zone_zonestatus_t */ +} ESP_ZB_PACKED_STRUCT esp_zb_zcl_ias_ace_zone_status_t; + +/** @brief Structure representation of Get Zone Status Response command */ +typedef struct esp_zb_zcl_ias_ace_get_zone_status_resp_s { + uint8_t zone_status_complete; /**< Zone Status Complete Field */ + uint8_t length; /**< Number of Zones */ + esp_zb_zcl_ias_ace_zone_status_t zone_id_status[ESP_ZB_ZCL_IAS_ACE_ZONE_TABLE_LENGTH]; /**< Status of Zone IDs */ +} ESP_ZB_PACKED_STRUCT esp_zb_zcl_ias_ace_get_zone_status_resp_t; + +#ifdef __cplusplus +} +#endif diff --git a/components/esp-zigbee-lib/lib/esp32/libesp_zb_api_zczr.a b/components/esp-zigbee-lib/lib/esp32/libesp_zb_api_zczr.a index 4da3ee3..2c6b46b 100644 Binary files a/components/esp-zigbee-lib/lib/esp32/libesp_zb_api_zczr.a and b/components/esp-zigbee-lib/lib/esp32/libesp_zb_api_zczr.a differ diff --git a/components/esp-zigbee-lib/lib/esp32/libesp_zb_api_zczr.debug.a b/components/esp-zigbee-lib/lib/esp32/libesp_zb_api_zczr.debug.a index 379e974..5772aa2 100644 Binary files a/components/esp-zigbee-lib/lib/esp32/libesp_zb_api_zczr.debug.a and b/components/esp-zigbee-lib/lib/esp32/libesp_zb_api_zczr.debug.a differ diff --git a/components/esp-zigbee-lib/lib/esp32c3/libesp_zb_api_zczr.a b/components/esp-zigbee-lib/lib/esp32c3/libesp_zb_api_zczr.a index d2fd45e..89074ab 100644 Binary files a/components/esp-zigbee-lib/lib/esp32c3/libesp_zb_api_zczr.a and b/components/esp-zigbee-lib/lib/esp32c3/libesp_zb_api_zczr.a differ diff --git a/components/esp-zigbee-lib/lib/esp32c3/libesp_zb_api_zczr.debug.a b/components/esp-zigbee-lib/lib/esp32c3/libesp_zb_api_zczr.debug.a index 4201995..c04986b 100644 Binary files a/components/esp-zigbee-lib/lib/esp32c3/libesp_zb_api_zczr.debug.a and b/components/esp-zigbee-lib/lib/esp32c3/libesp_zb_api_zczr.debug.a differ diff --git a/components/esp-zigbee-lib/lib/esp32c6/libesp_zb_api_ed.a b/components/esp-zigbee-lib/lib/esp32c6/libesp_zb_api_ed.a index 39b8263..c6579a9 100644 Binary files a/components/esp-zigbee-lib/lib/esp32c6/libesp_zb_api_ed.a and b/components/esp-zigbee-lib/lib/esp32c6/libesp_zb_api_ed.a differ diff --git a/components/esp-zigbee-lib/lib/esp32c6/libesp_zb_api_ed.debug.a b/components/esp-zigbee-lib/lib/esp32c6/libesp_zb_api_ed.debug.a index 2a3b09b..6b1d855 100644 Binary files a/components/esp-zigbee-lib/lib/esp32c6/libesp_zb_api_ed.debug.a and b/components/esp-zigbee-lib/lib/esp32c6/libesp_zb_api_ed.debug.a differ diff --git a/components/esp-zigbee-lib/lib/esp32c6/libesp_zb_api_gpd.a b/components/esp-zigbee-lib/lib/esp32c6/libesp_zb_api_gpd.a index 8f49dbd..64c8a7b 100644 Binary files a/components/esp-zigbee-lib/lib/esp32c6/libesp_zb_api_gpd.a and b/components/esp-zigbee-lib/lib/esp32c6/libesp_zb_api_gpd.a differ diff --git a/components/esp-zigbee-lib/lib/esp32c6/libesp_zb_api_zczr.a b/components/esp-zigbee-lib/lib/esp32c6/libesp_zb_api_zczr.a index 2d95267..90f5c70 100644 Binary files a/components/esp-zigbee-lib/lib/esp32c6/libesp_zb_api_zczr.a and b/components/esp-zigbee-lib/lib/esp32c6/libesp_zb_api_zczr.a differ diff --git a/components/esp-zigbee-lib/lib/esp32c6/libesp_zb_api_zczr.debug.a b/components/esp-zigbee-lib/lib/esp32c6/libesp_zb_api_zczr.debug.a index 4d686eb..5a2c255 100644 Binary files a/components/esp-zigbee-lib/lib/esp32c6/libesp_zb_api_zczr.debug.a and b/components/esp-zigbee-lib/lib/esp32c6/libesp_zb_api_zczr.debug.a differ diff --git a/components/esp-zigbee-lib/lib/esp32h2/libesp_zb_api_ed.a b/components/esp-zigbee-lib/lib/esp32h2/libesp_zb_api_ed.a index 11ee367..561e209 100644 Binary files a/components/esp-zigbee-lib/lib/esp32h2/libesp_zb_api_ed.a and b/components/esp-zigbee-lib/lib/esp32h2/libesp_zb_api_ed.a differ diff --git a/components/esp-zigbee-lib/lib/esp32h2/libesp_zb_api_ed.debug.a b/components/esp-zigbee-lib/lib/esp32h2/libesp_zb_api_ed.debug.a index b982f6d..c4e77f8 100644 Binary files a/components/esp-zigbee-lib/lib/esp32h2/libesp_zb_api_ed.debug.a and b/components/esp-zigbee-lib/lib/esp32h2/libesp_zb_api_ed.debug.a differ diff --git a/components/esp-zigbee-lib/lib/esp32h2/libesp_zb_api_gpd.a b/components/esp-zigbee-lib/lib/esp32h2/libesp_zb_api_gpd.a index 8f49dbd..64c8a7b 100644 Binary files a/components/esp-zigbee-lib/lib/esp32h2/libesp_zb_api_gpd.a and b/components/esp-zigbee-lib/lib/esp32h2/libesp_zb_api_gpd.a differ diff --git a/components/esp-zigbee-lib/lib/esp32h2/libesp_zb_api_zczr.a b/components/esp-zigbee-lib/lib/esp32h2/libesp_zb_api_zczr.a index 976867a..55f5949 100644 Binary files a/components/esp-zigbee-lib/lib/esp32h2/libesp_zb_api_zczr.a and b/components/esp-zigbee-lib/lib/esp32h2/libesp_zb_api_zczr.a differ diff --git a/components/esp-zigbee-lib/lib/esp32h2/libesp_zb_api_zczr.debug.a b/components/esp-zigbee-lib/lib/esp32h2/libesp_zb_api_zczr.debug.a index c1ab33f..cc29ff7 100644 Binary files a/components/esp-zigbee-lib/lib/esp32h2/libesp_zb_api_zczr.debug.a and b/components/esp-zigbee-lib/lib/esp32h2/libesp_zb_api_zczr.debug.a differ diff --git a/components/esp-zigbee-lib/lib/esp32s2/libesp_zb_api_zczr.a b/components/esp-zigbee-lib/lib/esp32s2/libesp_zb_api_zczr.a index 62af7bf..a7e909d 100644 Binary files a/components/esp-zigbee-lib/lib/esp32s2/libesp_zb_api_zczr.a and b/components/esp-zigbee-lib/lib/esp32s2/libesp_zb_api_zczr.a differ diff --git a/components/esp-zigbee-lib/lib/esp32s2/libesp_zb_api_zczr.debug.a b/components/esp-zigbee-lib/lib/esp32s2/libesp_zb_api_zczr.debug.a index 379e974..5772aa2 100644 Binary files a/components/esp-zigbee-lib/lib/esp32s2/libesp_zb_api_zczr.debug.a and b/components/esp-zigbee-lib/lib/esp32s2/libesp_zb_api_zczr.debug.a differ diff --git a/components/esp-zigbee-lib/lib/esp32s3/libesp_zb_api_zczr.a b/components/esp-zigbee-lib/lib/esp32s3/libesp_zb_api_zczr.a index 4da3ee3..2c6b46b 100644 Binary files a/components/esp-zigbee-lib/lib/esp32s3/libesp_zb_api_zczr.a and b/components/esp-zigbee-lib/lib/esp32s3/libesp_zb_api_zczr.a differ diff --git a/components/esp-zigbee-lib/lib/esp32s3/libesp_zb_api_zczr.debug.a b/components/esp-zigbee-lib/lib/esp32s3/libesp_zb_api_zczr.debug.a index 379e974..5772aa2 100644 Binary files a/components/esp-zigbee-lib/lib/esp32s3/libesp_zb_api_zczr.debug.a and b/components/esp-zigbee-lib/lib/esp32s3/libesp_zb_api_zczr.debug.a differ diff --git a/docs/Doxyfile b/docs/Doxyfile index 45a1848..1ebb727 100644 --- a/docs/Doxyfile +++ b/docs/Doxyfile @@ -70,6 +70,7 @@ INPUT = \ $(PROJECT_PATH)/components/esp-zigbee-lib/include/zcl/esp_zigbee_zcl_flow_meas.h \ $(PROJECT_PATH)/components/esp-zigbee-lib/include/zcl/esp_zigbee_zcl_price.h \ $(PROJECT_PATH)/components/esp-zigbee-lib/include/zcl/esp_zigbee_zcl_commissioning.h \ + $(PROJECT_PATH)/components/esp-zigbee-lib/include/zcl/esp_zigbee_zcl_ias_ace.h \ $(PROJECT_PATH)/components/esp-zigbee-lib/include/zdo/esp_zigbee_zdo_command.h \ $(PROJECT_PATH)/components/esp-zigbee-lib/include/zdo/esp_zigbee_zdo_common.h \ $(PROJECT_PATH)/components/esp-zigbee-lib/include/bdb/esp_zigbee_bdb_touchlink.h \ @@ -78,6 +79,7 @@ INPUT = \ $(PROJECT_PATH)/components/esp-zigbee-lib/include/zgp/esp_zigbee_zgps.h \ $(PROJECT_PATH)/components/esp-zigbee-ncp/include/esp_zb_ncp.h \ $(PROJECT_PATH)/components/esp-zigbee-lib/include/aps/esp_zigbee_aps.h \ + $(PROJECT_PATH)/components/esp-zigbee-lib/include/nwk/esp_zigbee_nwk.h \ ## Get warnings for functions that have no documentation for their parameters or return value diff --git a/docs/en/api-reference/index.rst b/docs/en/api-reference/index.rst index 5fbce2c..a574133 100644 --- a/docs/en/api-reference/index.rst +++ b/docs/en/api-reference/index.rst @@ -21,3 +21,4 @@ This section provides the ESP Zigbee SDK's APIs that support different kind of s zgp/index esp_zigbee_ncp aps/index + nwk/index diff --git a/docs/en/api-reference/nwk/esp_zigbee_nwk.rst b/docs/en/api-reference/nwk/esp_zigbee_nwk.rst new file mode 100644 index 0000000..a428327 --- /dev/null +++ b/docs/en/api-reference/nwk/esp_zigbee_nwk.rst @@ -0,0 +1,9 @@ +NWK Configuration API +===================== + +NWK(Zigbee Network) configuration related APIs for ESP Zigbee SDK. + +API Reference +------------- + +.. include-build-file:: inc/esp_zigbee_nwk.inc diff --git a/docs/en/api-reference/nwk/index.rst b/docs/en/api-reference/nwk/index.rst new file mode 100644 index 0000000..ed16e81 --- /dev/null +++ b/docs/en/api-reference/nwk/index.rst @@ -0,0 +1,10 @@ +NWK API +======= + +This section provides the ESP Zigbee SDK's APIs that support Zigbee network layer related, defines. + + +.. toctree:: + :maxdepth: 1 + + esp_zigbee_nwk diff --git a/docs/en/api-reference/zcl/esp_zigbee_zcl_ias_ace.rst b/docs/en/api-reference/zcl/esp_zigbee_zcl_ias_ace.rst new file mode 100644 index 0000000..e55183d --- /dev/null +++ b/docs/en/api-reference/zcl/esp_zigbee_zcl_ias_ace.rst @@ -0,0 +1,7 @@ +ZCL IAS ACE +=========== + +Zigbee Cluster Library (ZCL) IAS ACE cluster usage definition for ESP Zigbee SDK. + + +.. include-build-file:: inc/esp_zigbee_zcl_ias_ace.inc diff --git a/docs/en/api-reference/zcl/index.rst b/docs/en/api-reference/zcl/index.rst index 98fe5d8..8927dda 100644 --- a/docs/en/api-reference/zcl/index.rst +++ b/docs/en/api-reference/zcl/index.rst @@ -47,3 +47,4 @@ This section provides the ESP Zigbee SDK's APIs that support different kind of Z esp_zigbee_zcl_price esp_zigbee_zcl_flow_measurement esp_zigbee_zcl_commissioning + esp_zigbee_zcl_ias_ace