Greetings,
I've been developing a nrfxlib/zboss based Zigbee device and hitting a wall when trying to add more than one endpoint of a given type.
This is because the endpoint descriptor macros do magic behind-the-scenes type definitions:
- based on the # of in/out clusters and nothing else;
- regardless of any possible previous definitions
which is pretty awful.
I was working around this, in the meantime, by defining only sets of different endpoints (e.g. a light and an outlet), but this isn't what our end product will be, and it's only a stop-gap. The solutions I've read seem to basically force you to re-invent the wheel and declare custom clusters and endpoints, but that's hard and makes the whole ZCL library pretty irrelevant.
Instead, I've changed the library to stop declaring the simple descriptor types as just
zb_af_simple_desc_ ## in_clusters_count ## _ ## out_clusters_count ## _t
and now they include the endpoint name (so e.g. zb_af_simple_desc_4_0_t becomes zb_af_simple_desc_myendpoint_4_0_t which you totally don't care about but avoids the conflicts). This means that if you have three outlet endpoints, you'll end up with three declarations... not so pretty, but who cares, type declarations don't take up space.
So, for anyone facing the same issue I'm attaching the diff/patch file for the nrfxlib Zboss, here.
I may wind up making a PR, if someone from Nordic says this is worthwhile, but for now I have a working dev setup and don't want to break everything by pulling fresh SDK.
Questions/comments/input welcome.
diff --git a/zboss/include/ha/zb_ha_combined_interface.h b/zboss/include/ha/zb_ha_combined_interface.h
index 749b4a5..0099670 100644
--- a/zboss/include/ha/zb_ha_combined_interface.h
+++ b/zboss/include/ha/zb_ha_combined_interface.h
@@ -149,8 +149,8 @@
@param out_clust_num - number of supported output clusters
*/
#define ZB_ZCL_DECLARE_COMBINED_INTERFACE_SIMPLE_DESC(ep_name, ep_id, in_clust_num, out_clust_num) \
- ZB_DECLARE_SIMPLE_DESC(in_clust_num, out_clust_num); \
- ZB_AF_SIMPLE_DESC_TYPE(in_clust_num, out_clust_num) simple_desc_##ep_name = \
+ ZB_DECLARE_SIMPLE_DESC(ep_name,in_clust_num, out_clust_num); \
+ ZB_AF_SIMPLE_DESC_TYPE(ep_name, in_clust_num, out_clust_num) simple_desc_##ep_name = \
{ \
ep_id, \
ZB_AF_HA_PROFILE_ID, \
@@ -179,7 +179,7 @@
ZB_HA_COMBINED_INTERFACE_IN_CLUSTER_NUM, ZB_HA_COMBINED_INTERFACE_OUT_CLUSTER_NUM); \
ZB_AF_DECLARE_ENDPOINT_DESC(ep_name, ep_id, ZB_AF_HA_PROFILE_ID, 0, NULL, \
ZB_ZCL_ARRAY_SIZE(cluster_list, zb_zcl_cluster_desc_t), cluster_list, \
- (zb_af_simple_desc_1_1_t*)&simple_desc_##ep_name, \
+ (ZB_AF_SIMPLE_DESC_TYPE(general, 1, 1)*)&simple_desc_##ep_name, \
0, NULL, /* No reporting ctx */ \
0, NULL) /* No CVC ctx */
diff --git a/zboss/include/ha/zb_ha_configuration_tool.h b/zboss/include/ha/zb_ha_configuration_tool.h
index c577263..75225e2 100644
--- a/zboss/include/ha/zb_ha_configuration_tool.h
+++ b/zboss/include/ha/zb_ha_configuration_tool.h
@@ -152,8 +152,8 @@ zb_zcl_cluster_desc_t cluster_list_name[] = \
*/
#define ZB_ZCL_DECLARE_CONFIGURATION_TOOL_SIMPLE_DESC(ep_name, ep_id, in_clust_num, out_clust_num) \
- ZB_DECLARE_SIMPLE_DESC(in_clust_num, out_clust_num); \
- ZB_AF_SIMPLE_DESC_TYPE(in_clust_num, out_clust_num) simple_desc_##ep_name = \
+ ZB_DECLARE_SIMPLE_DESC(ep_name,in_clust_num, out_clust_num); \
+ ZB_AF_SIMPLE_DESC_TYPE(ep_name, in_clust_num, out_clust_num) simple_desc_##ep_name = \
{ \
ep_id, \
ZB_AF_HA_PROFILE_ID, \
@@ -183,7 +183,7 @@ zb_zcl_cluster_desc_t cluster_list_name[] = \
ZB_HA_CONFIGURATION_TOOL_IN_CLUSTER_NUM, ZB_HA_CONFIGURATION_TOOL_OUT_CLUSTER_NUM); \
ZB_AF_DECLARE_ENDPOINT_DESC(ep_name, ep_id, ZB_AF_HA_PROFILE_ID, 0, NULL, \
ZB_ZCL_ARRAY_SIZE(cluster_list, zb_zcl_cluster_desc_t), cluster_list, \
- (zb_af_simple_desc_1_1_t*)&simple_desc_##ep_name, \
+ (ZB_AF_SIMPLE_DESC_TYPE(general, 1, 1)*)&simple_desc_##ep_name, \
0, NULL, /* No reporting ctx */ \
0, NULL) /* No CVC ctx */
diff --git a/zboss/include/ha/zb_ha_custom_attr.h b/zboss/include/ha/zb_ha_custom_attr.h
index f92d47b..13da546 100644
--- a/zboss/include/ha/zb_ha_custom_attr.h
+++ b/zboss/include/ha/zb_ha_custom_attr.h
@@ -139,8 +139,8 @@
@param out_clust_num - number of supported output clusters
*/
#define ZB_ZCL_DECLARE_CUSTOM_ATTR_SIMPLE_DESC(ep_name, ep_id, in_clust_num, out_clust_num) \
- ZB_DECLARE_SIMPLE_DESC(in_clust_num, out_clust_num); \
- ZB_AF_SIMPLE_DESC_TYPE(in_clust_num, out_clust_num) simple_desc_##ep_name = \
+ ZB_DECLARE_SIMPLE_DESC(ep_name,in_clust_num, out_clust_num); \
+ ZB_AF_SIMPLE_DESC_TYPE(ep_name, in_clust_num, out_clust_num) simple_desc_##ep_name = \
{ \
ep_id, \
ZB_AF_HA_PROFILE_ID, \
@@ -173,7 +173,7 @@
0, \
NULL, \
ZB_ZCL_ARRAY_SIZE(cluster_list, zb_zcl_cluster_desc_t), cluster_list, \
- (zb_af_simple_desc_1_1_t*)&simple_desc_##ep_name, \
+ (ZB_AF_SIMPLE_DESC_TYPE(general, 1, 1)*)&simple_desc_##ep_name, \
ZB_ZCL_ARRAY_SIZE(ep_name, zb_af_endpoint_desc_t), \
20, reporting_info## device_ctx_name, 0, NULL)
diff --git a/zboss/include/ha/zb_ha_device_config.h b/zboss/include/ha/zb_ha_device_config.h
index 42df1c6..67c7468 100644
--- a/zboss/include/ha/zb_ha_device_config.h
+++ b/zboss/include/ha/zb_ha_device_config.h
@@ -74,6 +74,13 @@ enum zb_ha_standard_devs_e
/*! Range Extender */
ZB_HA_RANGE_EXTENDER_DEVICE_ID = 0x0008,
/*! Mains Power Outlet */
+ /* Psychogenic MOD:
+ * This may be standard:
+ * ZB_HA_MAINS_POWER_OUTLET_DEVICE_ID = 0x0009,
+ * but real-world devices seem to recognize
+ * ZB_HA_MAINS_POWER_OUTLET_DEVICE_ID = 0x010A,
+ * instead
+ * */
ZB_HA_MAINS_POWER_OUTLET_DEVICE_ID = 0x0009,
/*! Door lock client */
ZB_HA_DOOR_LOCK_DEVICE_ID = 0x000A,
diff --git a/zboss/include/ha/zb_ha_dimmable_light.h b/zboss/include/ha/zb_ha_dimmable_light.h
index 0abb583..6039f30 100644
--- a/zboss/include/ha/zb_ha_dimmable_light.h
+++ b/zboss/include/ha/zb_ha_dimmable_light.h
@@ -157,8 +157,8 @@
@param out_clust_num - number of supported output clusters
*/
#define ZB_ZCL_DECLARE_HA_DIMMABLE_LIGHT_SIMPLE_DESC(ep_name, ep_id, in_clust_num, out_clust_num) \
- ZB_DECLARE_SIMPLE_DESC(in_clust_num, out_clust_num); \
- ZB_AF_SIMPLE_DESC_TYPE(in_clust_num, out_clust_num) simple_desc_##ep_name = \
+ ZB_DECLARE_SIMPLE_DESC(ep_name, in_clust_num, out_clust_num); \
+ ZB_AF_SIMPLE_DESC_TYPE(ep_name, in_clust_num, out_clust_num) simple_desc_##ep_name = \
{ \
ep_id, \
ZB_AF_HA_PROFILE_ID, \
@@ -197,7 +197,7 @@
0, \
NULL, \
ZB_ZCL_ARRAY_SIZE(cluster_list, zb_zcl_cluster_desc_t), cluster_list, \
- (zb_af_simple_desc_1_1_t*)&simple_desc_##ep_name, \
+ (ZB_AF_SIMPLE_DESC_TYPE(general, 1, 1)*)&simple_desc_##ep_name, \
ZB_HA_DIMMABLE_LIGHT_REPORT_ATTR_COUNT, \
reporting_info## device_ctx_name, \
ZB_HA_DIMMABLE_LIGHT_CVC_ATTR_COUNT, \
diff --git a/zboss/include/ha/zb_ha_dimmer_switch.h b/zboss/include/ha/zb_ha_dimmer_switch.h
index bc76dc2..2bd00a9 100644
--- a/zboss/include/ha/zb_ha_dimmer_switch.h
+++ b/zboss/include/ha/zb_ha_dimmer_switch.h
@@ -150,8 +150,8 @@ zb_zcl_cluster_desc_t cluster_list_name[] = \
*/
#define ZB_ZCL_DECLARE_DIMMER_SWITCH_SIMPLE_DESC( \
ep_name, ep_id, in_clust_num, out_clust_num) \
- ZB_DECLARE_SIMPLE_DESC(in_clust_num, out_clust_num); \
- ZB_AF_SIMPLE_DESC_TYPE(in_clust_num, out_clust_num) simple_desc_##ep_name = \
+ ZB_DECLARE_SIMPLE_DESC(ep_name,in_clust_num, out_clust_num); \
+ ZB_AF_SIMPLE_DESC_TYPE(ep_name, in_clust_num, out_clust_num) simple_desc_##ep_name = \
{ \
ep_id, \
ZB_AF_HA_PROFILE_ID, \
@@ -184,7 +184,7 @@ zb_zcl_cluster_desc_t cluster_list_name[] = \
\
ZB_AF_DECLARE_ENDPOINT_DESC(ep_name, ep_id, ZB_AF_HA_PROFILE_ID, 0, NULL, \
ZB_ZCL_ARRAY_SIZE(cluster_list, zb_zcl_cluster_desc_t), cluster_list, \
- (zb_af_simple_desc_1_1_t*)&simple_desc_##ep_name, \
+ (ZB_AF_SIMPLE_DESC_TYPE(general, 1, 1)*)&simple_desc_##ep_name, \
0, NULL, /* No reporting ctx */ \
0, NULL) /* No CVC ctx */
diff --git a/zboss/include/ha/zb_ha_door_lock.h b/zboss/include/ha/zb_ha_door_lock.h
index 1e6451b..15d1062 100644
--- a/zboss/include/ha/zb_ha_door_lock.h
+++ b/zboss/include/ha/zb_ha_door_lock.h
@@ -162,8 +162,8 @@
definitions, because these values are used to form simple descriptor type name
*/
#define ZB_ZCL_DECLARE_DOOR_LOCK_SIMPLE_DESC(ep_name, ep_id, in_clust_num, out_clust_num) \
- ZB_DECLARE_SIMPLE_DESC(in_clust_num, out_clust_num); \
- ZB_AF_SIMPLE_DESC_TYPE(in_clust_num, out_clust_num) simple_desc_##ep_name = \
+ ZB_DECLARE_SIMPLE_DESC(ep_name,in_clust_num, out_clust_num); \
+ ZB_AF_SIMPLE_DESC_TYPE(ep_name, in_clust_num, out_clust_num) simple_desc_##ep_name = \
{ \
ep_id, \
ZB_AF_HA_PROFILE_ID, \
@@ -198,7 +198,7 @@
NULL, \
ZB_ZCL_ARRAY_SIZE(cluster_list, zb_zcl_cluster_desc_t), \
cluster_list, \
- (zb_af_simple_desc_1_1_t*)&simple_desc_##ep_name, \
+ (ZB_AF_SIMPLE_DESC_TYPE(general, 1, 1)*)&simple_desc_##ep_name, \
ZB_HA_DOOR_LOCK_REPORT_ATTR_COUNT, \
reporting_info## device_ctx_name, \
0, NULL)
diff --git a/zboss/include/ha/zb_ha_door_lock_controller.h b/zboss/include/ha/zb_ha_door_lock_controller.h
index aaae2ef..e01d043 100644
--- a/zboss/include/ha/zb_ha_door_lock_controller.h
+++ b/zboss/include/ha/zb_ha_door_lock_controller.h
@@ -163,8 +163,8 @@
*/
#define ZB_ZCL_DECLARE_DOOR_LOCK_CONTROLLER_SIMPLE_DESC( \
ep_name, ep_id, in_clust_num, out_clust_num) \
- ZB_DECLARE_SIMPLE_DESC(in_clust_num, out_clust_num); \
- ZB_AF_SIMPLE_DESC_TYPE(in_clust_num, out_clust_num) simple_desc_##ep_name = \
+ ZB_DECLARE_SIMPLE_DESC(ep_name,in_clust_num, out_clust_num); \
+ ZB_AF_SIMPLE_DESC_TYPE(ep_name, in_clust_num, out_clust_num) simple_desc_##ep_name = \
{ \
ep_id, \
ZB_AF_HA_PROFILE_ID, \
@@ -195,7 +195,7 @@
ZB_HA_DOOR_LOCK_CONTROLLER_IN_CLUSTER_NUM, ZB_HA_DOOR_LOCK_CONTROLLER_OUT_CLUSTER_NUM); \
ZB_AF_DECLARE_ENDPOINT_DESC(ep_name, ep_id, ZB_AF_HA_PROFILE_ID, 0, NULL, \
ZB_ZCL_ARRAY_SIZE(cluster_list, zb_zcl_cluster_desc_t), cluster_list, \
- (zb_af_simple_desc_1_1_t*)&simple_desc_##ep_name, \
+ (ZB_AF_SIMPLE_DESC_TYPE(general, 1, 1)*)&simple_desc_##ep_name, \
0, NULL, 0, NULL)
/** @brief Declare Door Lock Controller device context.
diff --git a/zboss/include/ha/zb_ha_erl_device_interface.h b/zboss/include/ha/zb_ha_erl_device_interface.h
index af3f4a2..15d8ba3 100644
--- a/zboss/include/ha/zb_ha_erl_device_interface.h
+++ b/zboss/include/ha/zb_ha_erl_device_interface.h
@@ -239,8 +239,8 @@
ep_id, \
in_clust_num, \
out_clust_num) \
- ZB_DECLARE_SIMPLE_DESC(in_clust_num, out_clust_num); \
- ZB_AF_SIMPLE_DESC_TYPE(in_clust_num, out_clust_num) simple_desc_##ep_name = \
+ ZB_DECLARE_SIMPLE_DESC(ep_name,in_clust_num, out_clust_num); \
+ ZB_AF_SIMPLE_DESC_TYPE(ep_name, in_clust_num, out_clust_num) simple_desc_##ep_name = \
{ \
ep_id, \
ZB_AF_HA_PROFILE_ID, \
@@ -288,7 +288,7 @@
NULL, \
ZB_ZCL_ARRAY_SIZE(cluster_list, zb_zcl_cluster_desc_t), \
cluster_list, \
- (zb_af_simple_desc_1_1_t*)&simple_desc_##ep_name, \
+ (ZB_AF_SIMPLE_DESC_TYPE(general, 1, 1)*)&simple_desc_##ep_name, \
ZB_ERL_INTERFACE_DEV_REPORT_ATTR_COUNT, \
reporting_info##device_ctx_name, \
0, NULL)
diff --git a/zboss/include/ha/zb_ha_erl_gw_device.h b/zboss/include/ha/zb_ha_erl_gw_device.h
index 9a6b611..15ac59d 100644
--- a/zboss/include/ha/zb_ha_erl_gw_device.h
+++ b/zboss/include/ha/zb_ha_erl_gw_device.h
@@ -156,8 +156,8 @@
definitions, because these values are used to form simple descriptor type name
*/
#define ZB_ZCL_DECLARE_ERL_GW_SIMPLE_DESC(ep_name, ep_id, in_clust_num, out_clust_num) \
- ZB_DECLARE_SIMPLE_DESC(in_clust_num, out_clust_num); \
- ZB_AF_SIMPLE_DESC_TYPE(in_clust_num, out_clust_num) simple_desc_##ep_name = \
+ ZB_DECLARE_SIMPLE_DESC(ep_name,in_clust_num, out_clust_num); \
+ ZB_AF_SIMPLE_DESC_TYPE(ep_name, in_clust_num, out_clust_num) simple_desc_##ep_name = \
{ \
ep_id, \
ZB_AF_HA_PROFILE_ID, \
@@ -198,7 +198,7 @@
NULL, \
ZB_ZCL_ARRAY_SIZE(cluster_list, zb_zcl_cluster_desc_t), \
cluster_list, \
- (zb_af_simple_desc_1_1_t*)&simple_desc_##ep_name, \
+ (ZB_AF_SIMPLE_DESC_TYPE(general, 1, 1)*)&simple_desc_##ep_name, \
0, NULL, /* No reporting ctx */ \
0, NULL)
diff --git a/zboss/include/ha/zb_ha_gp_dev.h b/zboss/include/ha/zb_ha_gp_dev.h
index 2b400ec..2c6adb6 100644
--- a/zboss/include/ha/zb_ha_gp_dev.h
+++ b/zboss/include/ha/zb_ha_gp_dev.h
@@ -105,8 +105,8 @@
@param out_clust_num - number of supported output clusters
*/
#define ZB_ZCL_DECLARE_GP_DEV_SIMPLE_DESC(ep_name, ep_id, in_clust_num, out_clust_num) \
- ZB_DECLARE_SIMPLE_DESC(in_clust_num, out_clust_num); \
- ZB_AF_SIMPLE_DESC_TYPE(in_clust_num, out_clust_num) simple_desc_##ep_name = \
+ ZB_DECLARE_SIMPLE_DESC(ep_name,in_clust_num, out_clust_num); \
+ ZB_AF_SIMPLE_DESC_TYPE(ep_name, in_clust_num, out_clust_num) simple_desc_##ep_name = \
{ \
ep_id, \
ZB_AF_HA_PROFILE_ID, \
@@ -135,7 +135,7 @@
ZB_HA_GP_DEV_REPORT_ATTR_COUNT); \
ZB_AF_DECLARE_ENDPOINT_DESC(ep_name, ep_id, ZB_AF_HA_PROFILE_ID, 0, NULL, \
ZB_ZCL_ARRAY_SIZE(cluster_list, zb_zcl_cluster_desc_t), cluster_list, \
- (zb_af_simple_desc_1_1_t*)&simple_desc_##ep_name, \
+ (ZB_AF_SIMPLE_DESC_TYPE(general, 1, 1)*)&simple_desc_##ep_name, \
ZB_HA_GP_DEV_REPORT_ATTR_COUNT, \
reporting_info## device_ctx_name, 0, NULL)
diff --git a/zboss/include/ha/zb_ha_ias_ancillary_control_equipment.h b/zboss/include/ha/zb_ha_ias_ancillary_control_equipment.h
index af76ff3..73c20f0 100644
--- a/zboss/include/ha/zb_ha_ias_ancillary_control_equipment.h
+++ b/zboss/include/ha/zb_ha_ias_ancillary_control_equipment.h
@@ -154,8 +154,8 @@
*/
#define ZB_HA_DECLARE_IAS_ANCILLARY_CONTROL_EQUIPMENT_SIMPLE_DESC( \
ep_name, ep_id, in_clust_num, out_clust_num) \
- ZB_DECLARE_SIMPLE_DESC(in_clust_num, out_clust_num); \
- ZB_AF_SIMPLE_DESC_TYPE(in_clust_num, out_clust_num) simple_desc_##ep_name = \
+ ZB_DECLARE_SIMPLE_DESC(ep_name,in_clust_num, out_clust_num); \
+ ZB_AF_SIMPLE_DESC_TYPE(ep_name, in_clust_num, out_clust_num) simple_desc_##ep_name = \
{ \
ep_id, \
ZB_AF_ZLL_PROFILE_ID, \
@@ -197,7 +197,7 @@
cluster_list, \
zb_zcl_cluster_desc_t), \
cluster_list, \
- (zb_af_simple_desc_1_1_t*)&simple_desc_##ep_name, \
+ (ZB_AF_SIMPLE_DESC_TYPE(general, 1, 1)*)&simple_desc_##ep_name, \
ZB_HA_IAS_ANCILLARY_CONTROL_EQUIPMENT_REPORT_ATTR_COUNT, reporting_info## device_ctx_name, 0, NULL)
/**
diff --git a/zboss/include/ha/zb_ha_ias_control_indicating_equipment.h b/zboss/include/ha/zb_ha_ias_control_indicating_equipment.h
index acb827e..2da4c84 100644
--- a/zboss/include/ha/zb_ha_ias_control_indicating_equipment.h
+++ b/zboss/include/ha/zb_ha_ias_control_indicating_equipment.h
@@ -157,8 +157,8 @@
*/
#define ZB_HA_DECLARE_IAS_CONTROL_INDICATING_EQUIPMENT_SIMPLE_DESC( \
ep_name, ep_id, in_clust_num, out_clust_num) \
- ZB_DECLARE_SIMPLE_DESC(in_clust_num, out_clust_num); \
- ZB_AF_SIMPLE_DESC_TYPE(in_clust_num, out_clust_num) simple_desc_##ep_name = \
+ ZB_DECLARE_SIMPLE_DESC(ep_name,in_clust_num, out_clust_num); \
+ ZB_AF_SIMPLE_DESC_TYPE(ep_name, in_clust_num, out_clust_num) simple_desc_##ep_name = \
{ \
ep_id, \
ZB_AF_ZLL_PROFILE_ID, \
@@ -201,7 +201,7 @@
cluster_list, \
zb_zcl_cluster_desc_t), \
cluster_list, \
- (zb_af_simple_desc_1_1_t*)&simple_desc_##ep_name, \
+ (ZB_AF_SIMPLE_DESC_TYPE(general, 1, 1)*)&simple_desc_##ep_name, \
0, NULL, /* No reporting ctx */ \
0, NULL) /* No CVC ctx */
diff --git a/zboss/include/ha/zb_ha_ias_warning_device.h b/zboss/include/ha/zb_ha_ias_warning_device.h
index 412e4fa..33c09a0 100644
--- a/zboss/include/ha/zb_ha_ias_warning_device.h
+++ b/zboss/include/ha/zb_ha_ias_warning_device.h
@@ -166,8 +166,8 @@
* definitions, because these values are used to form simple descriptor type name.
*/
#define ZB_HA_DECLARE_IAS_WARNING_SIMPLE_DESC(ep_name, ep_id, in_clust_num, out_clust_num) \
- ZB_DECLARE_SIMPLE_DESC(in_clust_num, out_clust_num); \
- ZB_AF_SIMPLE_DESC_TYPE(in_clust_num, out_clust_num) \
+ ZB_DECLARE_SIMPLE_DESC(ep_name,in_clust_num, out_clust_num); \
+ ZB_AF_SIMPLE_DESC_TYPE(ep_name, in_clust_num, out_clust_num) \
simple_desc_##ep_name = \
{ \
ep_id, \
@@ -211,7 +211,7 @@
cluster_list, \
zb_zcl_cluster_desc_t), \
cluster_list, \
- (zb_af_simple_desc_1_1_t*)&simple_desc_##ep_name, \
+ (ZB_AF_SIMPLE_DESC_TYPE(general, 1, 1)*)&simple_desc_##ep_name, \
ZB_HA_IAS_WARNING_REPORT_ATTR_COUNT, reporting_info## device_ctx_name, 0, NULL)
#define ZB_HA_DECLARE_IAS_WARNING_CTX(device_ctx, ep_name) \
diff --git a/zboss/include/ha/zb_ha_ias_zone.h b/zboss/include/ha/zb_ha_ias_zone.h
index fdf5f48..3b2c828 100644
--- a/zboss/include/ha/zb_ha_ias_zone.h
+++ b/zboss/include/ha/zb_ha_ias_zone.h
@@ -163,8 +163,8 @@
*/
#define ZB_HA_DECLARE_IAS_ZONE_SIMPLE_DESC( \
ep_name, ep_id, in_clust_num, out_clust_num) \
- ZB_DECLARE_SIMPLE_DESC(in_clust_num, out_clust_num); \
- ZB_AF_SIMPLE_DESC_TYPE(in_clust_num, out_clust_num) \
+ ZB_DECLARE_SIMPLE_DESC(ep_name,in_clust_num, out_clust_num); \
+ ZB_AF_SIMPLE_DESC_TYPE(ep_name, in_clust_num, out_clust_num) \
simple_desc_##ep_name = \
{ \
ep_id, \
@@ -208,7 +208,7 @@
cluster_list, \
zb_zcl_cluster_desc_t), \
cluster_list, \
- (zb_af_simple_desc_1_1_t*)&simple_desc_##ep_name, \
+ (ZB_AF_SIMPLE_DESC_TYPE(general, 1, 1)*)&simple_desc_##ep_name, \
ZB_HA_IAS_ZONE_REPORT_ATTR_COUNT, reporting_info## device_ctx_name, \
0, NULL)
diff --git a/zboss/include/ha/zb_ha_level_control_switch.h b/zboss/include/ha/zb_ha_level_control_switch.h
index 0f00457..7c25d21 100644
--- a/zboss/include/ha/zb_ha_level_control_switch.h
+++ b/zboss/include/ha/zb_ha_level_control_switch.h
@@ -148,8 +148,8 @@ zb_zcl_cluster_desc_t cluster_list_name[] = \
*/
#define ZB_ZCL_DECLARE_LEVEL_CONTROL_SWITCH_SIMPLE_DESC( \
ep_name, ep_id, in_clust_num, out_clust_num) \
- ZB_DECLARE_SIMPLE_DESC(in_clust_num, out_clust_num); \
- ZB_AF_SIMPLE_DESC_TYPE(in_clust_num, out_clust_num) simple_desc_##ep_name = \
+ ZB_DECLARE_SIMPLE_DESC(ep_name,in_clust_num, out_clust_num); \
+ ZB_AF_SIMPLE_DESC_TYPE(ep_name, in_clust_num, out_clust_num) simple_desc_##ep_name = \
{ \
ep_id, \
ZB_AF_HA_PROFILE_ID, \
@@ -177,7 +177,7 @@ zb_zcl_cluster_desc_t cluster_list_name[] = \
ZB_HA_LEVEL_CONTROL_SWITCH_IN_CLUSTER_NUM, ZB_HA_LEVEL_CONTROL_SWITCH_OUT_CLUSTER_NUM); \
ZB_AF_DECLARE_ENDPOINT_DESC(ep_name, ep_id, ZB_AF_HA_PROFILE_ID, 0, NULL, \
ZB_ZCL_ARRAY_SIZE(cluster_list, zb_zcl_cluster_desc_t), cluster_list, \
- (zb_af_simple_desc_1_1_t*)&simple_desc_##ep_name, \
+ (ZB_AF_SIMPLE_DESC_TYPE(general, 1, 1)*)&simple_desc_##ep_name, \
0, NULL, /* No reporting ctx */ \
0, NULL) /* No CVC ctx */
diff --git a/zboss/include/ha/zb_ha_level_controllable_output.h b/zboss/include/ha/zb_ha_level_controllable_output.h
index 3ea3d31..e12cebe 100644
--- a/zboss/include/ha/zb_ha_level_controllable_output.h
+++ b/zboss/include/ha/zb_ha_level_controllable_output.h
@@ -173,8 +173,8 @@ zb_zcl_cluster_desc_t cluster_list_name[] = \
*/
#define ZB_ZCL_DECLARE_LEVEL_CONTROLLABLE_OUTPUT_SIMPLE_DESC( \
ep_name, ep_id, in_clust_num, out_clust_num) \
- ZB_DECLARE_SIMPLE_DESC(in_clust_num, out_clust_num); \
- ZB_AF_SIMPLE_DESC_TYPE(in_clust_num, out_clust_num) simple_desc_##ep_name = \
+ ZB_DECLARE_SIMPLE_DESC(ep_name,in_clust_num, out_clust_num); \
+ ZB_AF_SIMPLE_DESC_TYPE(ep_name, in_clust_num, out_clust_num) simple_desc_##ep_name = \
{ \
ep_id, \
ZB_AF_HA_PROFILE_ID, \
@@ -211,7 +211,7 @@ zb_zcl_cluster_desc_t cluster_list_name[] = \
0, \
NULL, \
ZB_ZCL_ARRAY_SIZE(cluster_list, zb_zcl_cluster_desc_t), cluster_list, \
- (zb_af_simple_desc_1_1_t*)&simple_desc_##ep_name, \
+ (ZB_AF_SIMPLE_DESC_TYPE(general, 1, 1)*)&simple_desc_##ep_name, \
ZB_HA_LEVEL_CONTROLLABLE_OUTPUT_REPORT_ATTR_COUNT, \
reporting_info## device_ctx_name, \
ZB_HA_LEVEL_CONTROLLABLE_OUTPUT_CVC_ATTR_COUNT, \
diff --git a/zboss/include/ha/zb_ha_mains_power_outlet.h b/zboss/include/ha/zb_ha_mains_power_outlet.h
index d327571..01250e8 100644
--- a/zboss/include/ha/zb_ha_mains_power_outlet.h
+++ b/zboss/include/ha/zb_ha_mains_power_outlet.h
@@ -162,8 +162,8 @@
@param out_clust_num - number of supported output clusters
*/
#define ZB_ZCL_DECLARE_MAINS_POWER_OUTLET_SIMPLE_DESC(ep_name, ep_id, in_clust_num, out_clust_num) \
- ZB_DECLARE_SIMPLE_DESC(in_clust_num, out_clust_num); \
- ZB_AF_SIMPLE_DESC_TYPE(in_clust_num, out_clust_num) simple_desc_##ep_name = \
+ ZB_DECLARE_SIMPLE_DESC(ep_name,in_clust_num, out_clust_num); \
+ ZB_AF_SIMPLE_DESC_TYPE(ep_name, in_clust_num, out_clust_num) simple_desc_##ep_name = \
{ \
ep_id, \
ZB_AF_HA_PROFILE_ID, \
@@ -197,7 +197,7 @@
0, \
NULL, \
ZB_ZCL_ARRAY_SIZE(cluster_list, zb_zcl_cluster_desc_t), cluster_list, \
- (zb_af_simple_desc_1_1_t*)&simple_desc_##ep_name, \
+ (ZB_AF_SIMPLE_DESC_TYPE(general, 1, 1)*)&simple_desc_##ep_name, \
ZB_HA_MAINS_POWER_OUTLET_REPORT_ATTR_COUNT, reporting_info## device_ctx_name, 0, NULL)
/** @brief Declare Mains Power Outlet device context.
diff --git a/zboss/include/ha/zb_ha_on_off_output.h b/zboss/include/ha/zb_ha_on_off_output.h
index 83545dc..1efea78 100644
--- a/zboss/include/ha/zb_ha_on_off_output.h
+++ b/zboss/include/ha/zb_ha_on_off_output.h
@@ -162,8 +162,8 @@
definitions, because these values are used to form simple descriptor type name
*/
#define ZB_ZCL_DECLARE_ON_OFF_OUTPUT_SIMPLE_DESC(ep_name, ep_id, in_clust_num, out_clust_num) \
- ZB_DECLARE_SIMPLE_DESC(in_clust_num, out_clust_num); \
- ZB_AF_SIMPLE_DESC_TYPE(in_clust_num, out_clust_num) simple_desc_##ep_name = \
+ ZB_DECLARE_SIMPLE_DESC(ep_name,in_clust_num, out_clust_num); \
+ ZB_AF_SIMPLE_DESC_TYPE(ep_name, in_clust_num, out_clust_num) simple_desc_##ep_name = \
{ \
ep_id, \
ZB_AF_HA_PROFILE_ID, \
@@ -205,7 +205,7 @@
cluster_list, \
zb_zcl_cluster_desc_t), \
cluster_list, \
- (zb_af_simple_desc_1_1_t*)&simple_desc_##ep_name, \
+ (ZB_AF_SIMPLE_DESC_TYPE(general, 1, 1)*)&simple_desc_##ep_name, \
ZB_HA_ON_OFF_OUTPUT_REPORT_ATTR_COUNT, reporting_info## device_ctx_name, \
0, NULL)
diff --git a/zboss/include/ha/zb_ha_on_off_switch.h b/zboss/include/ha/zb_ha_on_off_switch.h
index 32dd4c4..133ce16 100644
--- a/zboss/include/ha/zb_ha_on_off_switch.h
+++ b/zboss/include/ha/zb_ha_on_off_switch.h
@@ -171,8 +171,8 @@
definitions, because these values are used to form simple descriptor type name
*/
#define ZB_ZCL_DECLARE_ON_OFF_SWITCH_SIMPLE_DESC(ep_name, ep_id, in_clust_num, out_clust_num) \
- ZB_DECLARE_SIMPLE_DESC(in_clust_num, out_clust_num); \
- ZB_AF_SIMPLE_DESC_TYPE(in_clust_num, out_clust_num) simple_desc_##ep_name = \
+ ZB_DECLARE_SIMPLE_DESC(ep_name,in_clust_num, out_clust_num); \
+ ZB_AF_SIMPLE_DESC_TYPE(ep_name, in_clust_num, out_clust_num) simple_desc_##ep_name = \
{ \
ep_id, \
ZB_AF_HA_PROFILE_ID, \
@@ -212,7 +212,7 @@
NULL, \
ZB_ZCL_ARRAY_SIZE(cluster_list, zb_zcl_cluster_desc_t), \
cluster_list, \
- (zb_af_simple_desc_1_1_t*)&simple_desc_##ep_name, \
+ (ZB_AF_SIMPLE_DESC_TYPE(general, 1, 1)*)&simple_desc_##ep_name, \
0, NULL, /* No reporting ctx */ \
0, NULL) /* No CVC ctx */
diff --git a/zboss/include/ha/zb_ha_range_extender.h b/zboss/include/ha/zb_ha_range_extender.h
index 29f8853..8121400 100644
--- a/zboss/include/ha/zb_ha_range_extender.h
+++ b/zboss/include/ha/zb_ha_range_extender.h
@@ -130,8 +130,8 @@ zb_zcl_cluster_desc_t cluster_list_name[] = \
@param out_clust_num - number of supported output clusters
*/
#define ZB_ZCL_DECLARE_RANGE_EXTENDER_SIMPLE_DESC(ep_name, ep_id, in_clust_num, out_clust_num) \
- ZB_DECLARE_SIMPLE_DESC(in_clust_num, out_clust_num); \
- ZB_AF_SIMPLE_DESC_TYPE(in_clust_num, out_clust_num) simple_desc_##ep_name = \
+ ZB_DECLARE_SIMPLE_DESC(ep_name,in_clust_num, out_clust_num); \
+ ZB_AF_SIMPLE_DESC_TYPE(ep_name, in_clust_num, out_clust_num) simple_desc_##ep_name = \
{ \
ep_id, \
ZB_AF_HA_PROFILE_ID, \
@@ -158,7 +158,7 @@ zb_zcl_cluster_desc_t cluster_list_name[] = \
ZB_HA_RANGE_EXTENDER_IN_CLUSTER_NUM, ZB_HA_RANGE_EXTENDER_OUT_CLUSTER_NUM); \
ZB_AF_DECLARE_ENDPOINT_DESC(ep_name, ep_id, ZB_AF_HA_PROFILE_ID, 0, NULL, \
ZB_ZCL_ARRAY_SIZE(cluster_list, zb_zcl_cluster_desc_t), cluster_list, \
- (zb_af_simple_desc_1_1_t*)&simple_desc_##ep_name, \
+ (ZB_AF_SIMPLE_DESC_TYPE(general, 1, 1)*)&simple_desc_##ep_name, \
0, NULL, /* No reporting ctx */ \
0, NULL) /* No CVC ctx */
diff --git a/zboss/include/ha/zb_ha_scene_selector.h b/zboss/include/ha/zb_ha_scene_selector.h
index 0da2073..373a28f 100644
--- a/zboss/include/ha/zb_ha_scene_selector.h
+++ b/zboss/include/ha/zb_ha_scene_selector.h
@@ -145,8 +145,8 @@
@param out_clust_num - number of supported output clusters
*/
#define ZB_ZCL_DECLARE_SCENE_SELECTOR_SIMPLE_DESC(ep_name, ep_id, in_clust_num, out_clust_num) \
- ZB_DECLARE_SIMPLE_DESC(in_clust_num, out_clust_num); \
- ZB_AF_SIMPLE_DESC_TYPE(in_clust_num, out_clust_num) simple_desc_##ep_name = \
+ ZB_DECLARE_SIMPLE_DESC(ep_name,in_clust_num, out_clust_num); \
+ ZB_AF_SIMPLE_DESC_TYPE(ep_name, in_clust_num, out_clust_num) simple_desc_##ep_name = \
{ \
ep_id, \
ZB_AF_HA_PROFILE_ID, \
@@ -175,7 +175,7 @@
ZB_HA_SCENE_SELECTOR_IN_CLUSTER_NUM, ZB_HA_SCENE_SELECTOR_OUT_CLUSTER_NUM); \
ZB_AF_DECLARE_ENDPOINT_DESC(ep_name, ep_id, ZB_AF_HA_PROFILE_ID, 0, NULL, \
ZB_ZCL_ARRAY_SIZE(cluster_list, zb_zcl_cluster_desc_t), cluster_list, \
- (zb_af_simple_desc_1_1_t*)&simple_desc_##ep_name, \
+ (ZB_AF_SIMPLE_DESC_TYPE(general, 1, 1)*)&simple_desc_##ep_name, \
0, NULL, /* No reporting ctx */ \
0, NULL) /* No CVC ctx */
diff --git a/zboss/include/ha/zb_ha_shade.h b/zboss/include/ha/zb_ha_shade.h
index 8998e0b..6df23ac 100644
--- a/zboss/include/ha/zb_ha_shade.h
+++ b/zboss/include/ha/zb_ha_shade.h
@@ -183,8 +183,8 @@
@param out_clust_num - number of supported output clusters
*/
#define ZB_ZCL_DECLARE_SHADE_SIMPLE_DESC(ep_name, ep_id, in_clust_num, out_clust_num) \
- ZB_DECLARE_SIMPLE_DESC(in_clust_num, out_clust_num); \
- ZB_AF_SIMPLE_DESC_TYPE(in_clust_num, out_clust_num) simple_desc_##ep_name = \
+ ZB_DECLARE_SIMPLE_DESC(ep_name,in_clust_num, out_clust_num); \
+ ZB_AF_SIMPLE_DESC_TYPE(ep_name, in_clust_num, out_clust_num) simple_desc_##ep_name = \
{ \
ep_id, \
ZB_AF_HA_PROFILE_ID, \
@@ -229,7 +229,7 @@
NULL, \
ZB_ZCL_ARRAY_SIZE(cluster_list, zb_zcl_cluster_desc_t), \
cluster_list, \
- (zb_af_simple_desc_1_1_t*)&simple_desc_##ep_name, \
+ (ZB_AF_SIMPLE_DESC_TYPE(general, 1, 1)*)&simple_desc_##ep_name, \
ZB_HA_SHADE_REPORT_ATTR_COUNT, \
reporting_info## device_ctx_name, \
ZB_HA_SHADE_CVC_ATTR_COUNT, cvc_alarm_info## device_ctx_name)
diff --git a/zboss/include/ha/zb_ha_shade_controller.h b/zboss/include/ha/zb_ha_shade_controller.h
index 5d8b122..b73c2d1 100644
--- a/zboss/include/ha/zb_ha_shade_controller.h
+++ b/zboss/include/ha/zb_ha_shade_controller.h
@@ -154,8 +154,8 @@
@param out_clust_num - number of supported output clusters
*/
#define ZB_ZCL_DECLARE_SHADE_CONTROLLER_SIMPLE_DESC(ep_name, ep_id, in_clust_num, out_clust_num) \
- ZB_DECLARE_SIMPLE_DESC(in_clust_num, out_clust_num); \
- ZB_AF_SIMPLE_DESC_TYPE(in_clust_num, out_clust_num) simple_desc_##ep_name = \
+ ZB_DECLARE_SIMPLE_DESC(ep_name,in_clust_num, out_clust_num); \
+ ZB_AF_SIMPLE_DESC_TYPE(ep_name, in_clust_num, out_clust_num) simple_desc_##ep_name = \
{ \
ep_id, \
ZB_AF_HA_PROFILE_ID, \
@@ -195,7 +195,7 @@
NULL, \
ZB_ZCL_ARRAY_SIZE(cluster_list, zb_zcl_cluster_desc_t), \
cluster_list, \
- (zb_af_simple_desc_1_1_t*)&simple_desc_##ep_name, \
+ (ZB_AF_SIMPLE_DESC_TYPE(general, 1, 1)*)&simple_desc_##ep_name, \
0, NULL, /* No reporting ctx */ \
0, NULL) /* No CVC ctx */
diff --git a/zboss/include/ha/zb_ha_simple_sensor.h b/zboss/include/ha/zb_ha_simple_sensor.h
index eabf74c..c54fe88 100644
--- a/zboss/include/ha/zb_ha_simple_sensor.h
+++ b/zboss/include/ha/zb_ha_simple_sensor.h
@@ -148,8 +148,8 @@
@param out_clust_num - number of supported output clusters
*/
#define ZB_ZCL_DECLARE_SIMPLE_SENSOR_SIMPLE_DESC(ep_name, ep_id, in_clust_num, out_clust_num) \
- ZB_DECLARE_SIMPLE_DESC(in_clust_num, out_clust_num); \
- ZB_AF_SIMPLE_DESC_TYPE(in_clust_num, out_clust_num) simple_desc_##ep_name = \
+ ZB_DECLARE_SIMPLE_DESC(ep_name,in_clust_num, out_clust_num); \
+ ZB_AF_SIMPLE_DESC_TYPE(ep_name, in_clust_num, out_clust_num) simple_desc_##ep_name = \
{ \
ep_id, \
ZB_AF_HA_PROFILE_ID, \
@@ -180,7 +180,7 @@
ZB_HA_SIMPLE_SENSOR_REPORT_ATTR_COUNT); \
ZB_AF_DECLARE_ENDPOINT_DESC(ep_name, ep_id, ZB_AF_HA_PROFILE_ID, 0, NULL, \
ZB_ZCL_ARRAY_SIZE(cluster_list, zb_zcl_cluster_desc_t), cluster_list, \
- (zb_af_simple_desc_1_1_t*)&simple_desc_##ep_name, \
+ (ZB_AF_SIMPLE_DESC_TYPE(general, 1, 1)*)&simple_desc_##ep_name, \
ZB_HA_SIMPLE_SENSOR_REPORT_ATTR_COUNT, \
reporting_info## device_ctx_name, 0, NULL)
diff --git a/zboss/include/ha/zb_ha_smart_plug.h b/zboss/include/ha/zb_ha_smart_plug.h
index 4fb3e32..0c5fc05 100644
--- a/zboss/include/ha/zb_ha_smart_plug.h
+++ b/zboss/include/ha/zb_ha_smart_plug.h
@@ -150,8 +150,8 @@
@param out_clust_num - number of supported output clusters
*/
#define ZB_ZCL_DECLARE_SMART_PLUG_SIMPLE_DESC(ep_name, ep_id, in_clust_num, out_clust_num) \
- ZB_DECLARE_SIMPLE_DESC(in_clust_num, out_clust_num); \
- ZB_AF_SIMPLE_DESC_TYPE(in_clust_num, out_clust_num) simple_desc_##ep_name = \
+ ZB_DECLARE_SIMPLE_DESC(ep_name,in_clust_num, out_clust_num); \
+ ZB_AF_SIMPLE_DESC_TYPE(ep_name, in_clust_num, out_clust_num) simple_desc_##ep_name = \
{ \
ep_id, \
ZB_AF_HA_PROFILE_ID, \
@@ -185,7 +185,7 @@
0, \
NULL, \
ZB_ZCL_ARRAY_SIZE(cluster_list, zb_zcl_cluster_desc_t), cluster_list, \
- (zb_af_simple_desc_1_1_t*)&simple_desc_##ep_name, \
+ (ZB_AF_SIMPLE_DESC_TYPE(general, 1, 1)*)&simple_desc_##ep_name, \
ZB_HA_SMART_PLUG_REPORT_ATTR_COUNT, reporting_info## device_ctx_name, 0, NULL)
diff --git a/zboss/include/ha/zb_ha_temperature_sensor.h b/zboss/include/ha/zb_ha_temperature_sensor.h
index bad359e..471573c 100644
--- a/zboss/include/ha/zb_ha_temperature_sensor.h
+++ b/zboss/include/ha/zb_ha_temperature_sensor.h
@@ -146,8 +146,8 @@
@param out_clust_num - number of supported output clusters
*/
#define ZB_ZCL_DECLARE_TEMPERATURE_SENSOR_TEMPERATURE_DESC(ep_name, ep_id, in_clust_num, out_clust_num) \
- ZB_DECLARE_SIMPLE_DESC(in_clust_num, out_clust_num); \
- ZB_AF_SIMPLE_DESC_TYPE(in_clust_num, out_clust_num) simple_desc_##ep_name = \
+ ZB_DECLARE_SIMPLE_DESC(ep_name, in_clust_num, out_clust_num); \
+ ZB_AF_SIMPLE_DESC_TYPE(ep_name, in_clust_num, out_clust_num) simple_desc_##ep_name = \
{ \
ep_id, \
ZB_AF_HA_PROFILE_ID, \
@@ -184,7 +184,7 @@
NULL, \
ZB_ZCL_ARRAY_SIZE(cluster_list, zb_zcl_cluster_desc_t), \
cluster_list, \
- (zb_af_simple_desc_1_1_t*)&simple_desc_##ep_name, \
+ (ZB_AF_SIMPLE_DESC_TYPE(general, 1, 1)*)&simple_desc_##ep_name, \
ZB_HA_TEMPERATURE_SENSOR_REPORT_ATTR_COUNT, reporting_info## device_ctx_name, 0, NULL)
/** @brief Declare Temperature Sensor device context.
diff --git a/zboss/include/ha/zb_ha_test_device.h b/zboss/include/ha/zb_ha_test_device.h
index dd07eed..3541a63 100644
--- a/zboss/include/ha/zb_ha_test_device.h
+++ b/zboss/include/ha/zb_ha_test_device.h
@@ -121,8 +121,8 @@
*/
#define ZB_HA_DECLARE_TEST_DEVICE_SIMPLE_DESC( \
ep_name, ep_id, in_clust_num, out_clust_num) \
- ZB_DECLARE_SIMPLE_DESC(in_clust_num, out_clust_num); \
- ZB_AF_SIMPLE_DESC_TYPE(in_clust_num, out_clust_num) simple_desc_##ep_name = \
+ ZB_DECLARE_SIMPLE_DESC(ep_name,in_clust_num, out_clust_num); \
+ ZB_AF_SIMPLE_DESC_TYPE(ep_name, in_clust_num, out_clust_num) simple_desc_##ep_name = \
{ \
ep_id, \
ZB_AF_HA_PROFILE_ID, \
@@ -164,7 +164,7 @@
cluster_list, \
zb_zcl_cluster_desc_t), \
cluster_list, \
- (zb_af_simple_desc_1_1_t*)&simple_desc_##ep_name, \
+ (ZB_AF_SIMPLE_DESC_TYPE(general, 1, 1)*)&simple_desc_##ep_name, \
0, NULL, /* No reporting ctx */ \
0, NULL) /* No CVC ctx */
diff --git a/zboss/include/ha/zb_ha_thermostat.h b/zboss/include/ha/zb_ha_thermostat.h
index c4cea35..e31274e 100644
--- a/zboss/include/ha/zb_ha_thermostat.h
+++ b/zboss/include/ha/zb_ha_thermostat.h
@@ -217,8 +217,8 @@
@param out_clust_num - number of supported output clusters
*/
#define ZB_ZCL_DECLARE_THERMOSTAT_SIMPLE_DESC(ep_name, ep_id, in_clust_num, out_clust_num) \
- ZB_DECLARE_SIMPLE_DESC(in_clust_num, out_clust_num); \
- ZB_AF_SIMPLE_DESC_TYPE(in_clust_num, out_clust_num) simple_desc_##ep_name = \
+ ZB_DECLARE_SIMPLE_DESC(ep_name,in_clust_num, out_clust_num); \
+ ZB_AF_SIMPLE_DESC_TYPE(ep_name, in_clust_num, out_clust_num) simple_desc_##ep_name = \
{ \
ep_id, \
ZB_AF_HA_PROFILE_ID, \
@@ -253,7 +253,7 @@
0, \
NULL, \
ZB_ZCL_ARRAY_SIZE(cluster_list, zb_zcl_cluster_desc_t), cluster_list, \
- (zb_af_simple_desc_1_1_t*)&simple_desc_##ep_name, \
+ (ZB_AF_SIMPLE_DESC_TYPE(general, 1, 1)*)&simple_desc_##ep_name, \
ZB_HA_THERMOSTAT_REPORT_ATTR_COUNT, reporting_info## device_ctx_name, \
0, NULL)
diff --git a/zboss/include/ha/zb_ha_window_covering.h b/zboss/include/ha/zb_ha_window_covering.h
index e14ef97..c59d2cd 100644
--- a/zboss/include/ha/zb_ha_window_covering.h
+++ b/zboss/include/ha/zb_ha_window_covering.h
@@ -161,8 +161,8 @@
@param out_clust_num - number of supported output clusters
*/
#define ZB_ZCL_DECLARE_WINDOW_COVERING_SIMPLE_DESC(ep_name, ep_id, in_clust_num, out_clust_num) \
- ZB_DECLARE_SIMPLE_DESC(in_clust_num, out_clust_num); \
- ZB_AF_SIMPLE_DESC_TYPE(in_clust_num, out_clust_num) simple_desc_##ep_name = \
+ ZB_DECLARE_SIMPLE_DESC(ep_name,in_clust_num, out_clust_num); \
+ ZB_AF_SIMPLE_DESC_TYPE(ep_name, in_clust_num, out_clust_num) simple_desc_##ep_name = \
{ \
ep_id, \
ZB_AF_HA_PROFILE_ID, \
@@ -195,7 +195,7 @@
0, \
NULL, \
ZB_ZCL_ARRAY_SIZE(cluster_list, zb_zcl_cluster_desc_t), cluster_list, \
- (zb_af_simple_desc_1_1_t*)&simple_desc_##ep_name, \
+ (ZB_AF_SIMPLE_DESC_TYPE(general, 1, 1)*)&simple_desc_##ep_name, \
ZB_HA_WINDOW_COVERING_REPORT_ATTR_COUNT, reporting_info## device_ctx_name, \
0, NULL) /* No CVC ctx */
diff --git a/zboss/include/ha/zb_ha_window_covering_controller.h b/zboss/include/ha/zb_ha_window_covering_controller.h
index 76d96c1..a888cb2 100644
--- a/zboss/include/ha/zb_ha_window_covering_controller.h
+++ b/zboss/include/ha/zb_ha_window_covering_controller.h
@@ -151,8 +151,8 @@ zb_zcl_cluster_desc_t cluster_list_name[] = \
*/
#define ZB_ZCL_DECLARE_WINDOW_COVERING_CONTROLLER_SIMPLE_DESC( \
ep_name, ep_id, in_clust_num, out_clust_num) \
- ZB_DECLARE_SIMPLE_DESC(in_clust_num, out_clust_num); \
- ZB_AF_SIMPLE_DESC_TYPE(in_clust_num, out_clust_num) simple_desc_##ep_name = \
+ ZB_DECLARE_SIMPLE_DESC(ep_name,in_clust_num, out_clust_num); \
+ ZB_AF_SIMPLE_DESC_TYPE(ep_name, in_clust_num, out_clust_num) simple_desc_##ep_name = \
{ \
ep_id, \
ZB_AF_HA_PROFILE_ID, \
@@ -186,7 +186,7 @@ zb_zcl_cluster_desc_t cluster_list_name[] = \
NULL, \
ZB_ZCL_ARRAY_SIZE(cluster_list, zb_zcl_cluster_desc_t), \
cluster_list, \
- (zb_af_simple_desc_1_1_t*)&simple_desc_##ep_name, \
+ (ZB_AF_SIMPLE_DESC_TYPE(general, 1, 1)*)&simple_desc_##ep_name, \
0, NULL, /* No reporting ctx */ \
0, NULL) /* No CVC ctx */
diff --git a/zboss/include/zboss_api_af.h b/zboss/include/zboss_api_af.h
index d00ff68..058efb2 100644
--- a/zboss/include/zboss_api_af.h
+++ b/zboss/include/zboss_api_af.h
@@ -217,10 +217,11 @@ typedef ZB_PACKED_PRE struct zb_af_node_power_desc_s
/** @cond DOXYGEN_INTERNAL_DOC */
#define CAT5(a, b, c, d, e) a##b##c##d##e
+#define CAT6(a, b, c, d, e,f) a##b##c##d##e##f
/** @endcond */ /* DOXYGEN_INTERNAL_DOC */
/** Generate simple descriptor type name */
-#define ZB_AF_SIMPLE_DESC_TYPE(in_num, out_num) CAT5(zb_af_simple_desc_,in_num,_,out_num,_t)
+#define ZB_AF_SIMPLE_DESC_TYPE(epname, in_num, out_num) CAT6(zb_af_simple_desc_,epname, in_num,_,out_num,_t)
/**
Declares Simple descriptor type
@@ -234,8 +235,9 @@ typedef ZB_PACKED_PRE struct zb_af_node_power_desc_s
@endcode
*/
-#define ZB_DECLARE_SIMPLE_DESC(in_clusters_count, out_clusters_count) \
- typedef ZB_PACKED_PRE struct zb_af_simple_desc_ ## in_clusters_count ## _ ## out_clusters_count ## _s \
+#define ZB_DECLARE_SIMPLE_DESC(epname, in_clusters_count, out_clusters_count) \
+/* #define HO_ ## in_clusters_count ## _ ## out_clusters_count 1 \ */ \
+ typedef ZB_PACKED_PRE struct zb_af_simple_desc_ ## epname ## in_clusters_count ## _ ## out_clusters_count ## _s \
{ \
zb_uint8_t endpoint; /* Endpoint */ \
zb_uint16_t app_profile_id; /* Application profile identifier */ \
@@ -247,7 +249,7 @@ typedef ZB_PACKED_PRE struct zb_af_node_power_desc_s
/* Application input and output cluster list */ \
zb_uint16_t app_cluster_list[(in_clusters_count) + (out_clusters_count)]; \
} ZB_PACKED_STRUCT \
- zb_af_simple_desc_ ## in_clusters_count ## _ ## out_clusters_count ## _t
+ zb_af_simple_desc_ ## epname ## in_clusters_count ## _ ## out_clusters_count ## _t
/** @} */ /* af_data_service */
@@ -256,9 +258,9 @@ typedef ZB_PACKED_PRE struct zb_af_node_power_desc_s
* @{
*/
/** General descriptor type */
-ZB_DECLARE_SIMPLE_DESC(1,1);
+ZB_DECLARE_SIMPLE_DESC(general, 1,1);
/** ZDO descriptor type */
-ZB_DECLARE_SIMPLE_DESC(8,9);
+ZB_DECLARE_SIMPLE_DESC(general, 8,9);
/** @} */ /* af_management_service */
/**
@@ -350,7 +352,8 @@ typedef ZB_PACKED_PRE struct zb_af_endpoint_desc_s
void* reserved_ptr; /*!< Unused parameter (reserved for future use) */
zb_uint8_t cluster_count; /*!< Number of supported clusters */
struct zb_zcl_cluster_desc_s *cluster_desc_list; /*!< Supported clusters list */
- zb_af_simple_desc_1_1_t *simple_desc; /*!< Simple descriptor */
+ /* zb_af_simple_desc_general_1_1_t *simple_desc; */ /*!< Simple descriptor */
+ ZB_AF_SIMPLE_DESC_TYPE(general, 1, 1) * simple_desc;
#if defined ZB_ENABLE_ZLL || defined DOXYGEN
zb_uint8_t group_id_count;
#endif /* defined ZB_ENABLE_ZLL || defined DOXYGEN */
diff --git a/zboss/include/zboss_api_zdo.h b/zboss/include/zboss_api_zdo.h
index 10c24ef..fb4d5d8 100644
--- a/zboss/include/zboss_api_zdo.h
+++ b/zboss/include/zboss_api_zdo.h
@@ -1358,7 +1358,7 @@ typedef zb_zdo_desc_resp_hdr_t zb_zdo_user_desc_conf_hdr_t;
typedef ZB_PACKED_PRE struct zb_zdo_simple_desc_resp_s
{
zb_zdo_simple_desc_resp_hdr_t hdr; /*!< header for response */
- zb_af_simple_desc_1_1_t simple_desc; /*!< Simple Descriptor */
+ ZB_AF_SIMPLE_DESC_TYPE(general, 1, 1) simple_desc; /*!< Simple Descriptor */
} ZB_PACKED_STRUCT
zb_zdo_simple_desc_resp_t;
diff --git a/zboss/include/zcl/zb_zcl_control4_networking.h b/zboss/include/zcl/zb_zcl_control4_networking.h
index ff4a520..88613ae 100644
--- a/zboss/include/zcl/zb_zcl_control4_networking.h
+++ b/zboss/include/zcl/zb_zcl_control4_networking.h
@@ -408,7 +408,7 @@ enum zb_zcl_control4_networking_cmd_e
NULL, \
ZB_ZCL_ARRAY_SIZE(cluster_list, zb_zcl_cluster_desc_t), \
cluster_list, \
- (zb_af_simple_desc_1_1_t*)&simple_desc_##ep_name, \
+ (ZB_AF_SIMPLE_DESC_TYPE(general, 1, 1)*)&simple_desc_##ep_name, \
0, NULL, 0, NULL)
/**
diff --git a/zboss/src/include/zb_zdo.h b/zboss/src/include/zb_zdo.h
index 4989d22..2593634 100644
--- a/zboss/src/include/zb_zdo.h
+++ b/zboss/src/include/zb_zdo.h
@@ -365,7 +365,7 @@ void zb_copy_power_desc(zb_af_node_power_desc_t *dst_desc, zb_af_node_power_desc
@param dst_desc - destination descriptor
@param src_desc - source descriptor
*/
-void zb_copy_simple_desc(zb_af_simple_desc_1_1_t* dst_desc, zb_af_simple_desc_1_1_t*src_desc);
+void zb_copy_simple_desc(ZB_AF_SIMPLE_DESC_TYPE(general, 1, 1)* dst_desc, ZB_AF_SIMPLE_DESC_TYPE(general, 1, 1)*src_desc);
/**
NWK_addr_req primitive.
@@ -1137,7 +1137,7 @@ void zb_set_network_ed_role_legacy(zb_uint32_t channel_mask);
@par
*/
-void zb_set_simple_descriptor(zb_af_simple_desc_1_1_t *simple_desc,
+void zb_set_simple_descriptor(ZB_AF_SIMPLE_DESC_TYPE(general, 1, 1) *simple_desc,
zb_uint8_t endpoint, zb_uint16_t app_profile_id,
zb_uint16_t app_device_id, zb_bitfield_t app_device_version,
zb_uint8_t app_input_cluster_count, zb_uint8_t app_output_cluster_count);
@@ -1153,7 +1153,7 @@ void zb_set_simple_descriptor(zb_af_simple_desc_1_1_t *simple_desc,
@par
*/
-void zb_set_input_cluster_id(zb_af_simple_desc_1_1_t *simple_desc, zb_uint8_t cluster_number, zb_uint16_t cluster_id);
+void zb_set_input_cluster_id(ZB_AF_SIMPLE_DESC_TYPE(general, 1, 1) *simple_desc, zb_uint8_t cluster_number, zb_uint16_t cluster_id);
/*! @brief Set output cluster item
@param simple_desc - pointer to simple descriptor
@@ -1165,7 +1165,7 @@ void zb_set_input_cluster_id(zb_af_simple_desc_1_1_t *simple_desc, zb_uint8_t cl
@par
*/
-void zb_set_output_cluster_id(zb_af_simple_desc_1_1_t *simple_desc, zb_uint8_t cluster_number, zb_uint16_t cluster_id);
+void zb_set_output_cluster_id(ZB_AF_SIMPLE_DESC_TYPE(general, 1, 1) *simple_desc, zb_uint8_t cluster_number, zb_uint16_t cluster_id);
/**
Set default descriptors values for FFD.
@@ -1193,7 +1193,7 @@ void zb_set_default_ed_descriptor_values(void);
@par
*/
-zb_ret_t zb_add_simple_descriptor(zb_af_simple_desc_1_1_t *simple_desc);
+zb_ret_t zb_add_simple_descriptor(ZB_AF_SIMPLE_DESC_TYPE(general, 1, 1) *simple_desc);
/**
Set node descriptor for FFD
diff --git a/zboss/src/include/zb_zdo_globals.h b/zboss/src/include/zb_zdo_globals.h
index edf11bd..0f335de 100644
--- a/zboss/src/include/zb_zdo_globals.h
+++ b/zboss/src/include/zb_zdo_globals.h
@@ -73,11 +73,11 @@ typedef struct zb_zdo_configuration_attributes_e
zb_af_node_desc_t node_desc; /*!< Node Descriptors */
zb_af_node_power_desc_t node_power_desc; /*!< Node Power Descriptors */
- zb_af_simple_desc_8_9_t zdo_simple_desc; /* TODO: remove it, ZDO simple descriptor is not needed - simple descriptors for EP >= 1 are used */
+ ZB_AF_SIMPLE_DESC_TYPE(general, 8, 9) zdo_simple_desc; /* TODO: remove it, ZDO simple descriptor is not needed - simple descriptors for EP >= 1 are used */
/* TODO: make real list support, if multiple EP are supported */
/* TODO: each Zigbee device application declares a device context and a list of EPs. Each EP
stores its simple descriptor => no need store it here, it is better to use that storage */
- zb_af_simple_desc_1_1_t *simple_desc_list[ZB_MAX_EP_NUMBER]; /*!< Simple Descriptors table */
+ ZB_AF_SIMPLE_DESC_TYPE(general, 1, 1) *simple_desc_list[ZB_MAX_EP_NUMBER]; /*!< Simple Descriptors table */
zb_uint8_t simple_desc_number; /*!< Number elements of Simple Descriptors table */
#ifndef ZB_LITE_NO_END_DEVICE_BIND