diff --git a/silabs_examples/unify-matter-bridge/linux/BUILD.gn b/silabs_examples/unify-matter-bridge/linux/BUILD.gn index 5dd3ff6f8478b8..b294c7fc9e72d3 100644 --- a/silabs_examples/unify-matter-bridge/linux/BUILD.gn +++ b/silabs_examples/unify-matter-bridge/linux/BUILD.gn @@ -41,7 +41,6 @@ config("unify-config") { static_library("unify-matter-bridge-lib") { sources = [ - "src/matter_data_storage.cpp", "src/attribute_state_cache.cpp", "src/cluster_translator/bridged_device_basic_info_attribute_translator.cpp", "src/cluster_translator/group_command_translator.cpp", @@ -50,15 +49,17 @@ static_library("unify-matter-bridge-lib") { "src/device_type_mapper/matter_device_translator.cpp", "src/device_type_mapper/matter_device_types_clusters_list_updated.inc", "src/dummy.cpp", - "src/matter_bridge_config.c", "src/matter_bridge_cli.cpp", + "src/matter_bridge_config.c", + "src/matter_data_storage.cpp", "src/matter_node_state_monitor/matter_cluster_interactor.cpp", "src/matter_node_state_monitor/matter_endpoint_builder.cpp", "src/matter_node_state_monitor/matter_node_state_monitor.cpp", - "zap-handlers/gen/command_translator.cpp", + "src/uic_mqtt_wrapper.cpp", "zap-handlers/gen/attribute_translator.cpp", - "zap-handlers/gen/unify_accessors.cpp", - "src/uic_mqtt_wrapper.cpp" + "zap-handlers/gen/attribute_type_size.cpp", + "zap-handlers/gen/command_translator.cpp", + "zap-handlers/gen/unify_accessors.cpp" ] public_deps = [ diff --git a/silabs_examples/unify-matter-bridge/linux/src/cluster_translator/attribute_translator_interface.hpp b/silabs_examples/unify-matter-bridge/linux/src/cluster_translator/attribute_translator_interface.hpp index 548093031e3366..8df239a8730520 100644 --- a/silabs_examples/unify-matter-bridge/linux/src/cluster_translator/attribute_translator_interface.hpp +++ b/silabs_examples/unify-matter-bridge/linux/src/cluster_translator/attribute_translator_interface.hpp @@ -43,10 +43,11 @@ class attribute_translator_interface : { public: attribute_translator_interface(matter_node_state_monitor &node_state_monitor, - chip::ClusterId id) : + chip::ClusterId id, const char *log_tag) : chip::app::AttributeAccessInterface( chip::Optional::Missing(), id), - m_node_state_monitor(node_state_monitor) + m_node_state_monitor(node_state_monitor), + LOG_TAG(log_tag) { registerAttributeAccessOverride(this); @@ -82,7 +83,7 @@ class attribute_translator_interface : matter_node_state_monitor &m_node_state_monitor; private: - const char *LOG_TAG = "attribute_cluster_server"; + const char *LOG_TAG; void on_mqtt_message_cb(const char *topic, const char *message, @@ -122,16 +123,16 @@ class attribute_translator_interface : nlohmann::json jsn = nlohmann::json::parse(msg); reported_updated(unify_node, cluster, attribute, jsn["value"]); } catch (const nlohmann::json::parse_error &e) { - sl_log_info(LOG_TAG, + sl_log_warning(LOG_TAG, "It was not possible to parse incoming attribute state " "update since the message payload is not json, %s\n", e.what()); } catch (const nlohmann::json::type_error &e) { - sl_log_info( + sl_log_warning( LOG_TAG, "It was not possible to parse incoming attribute state update since " - "the value of different type or key is not present, %s\n", - e.what()); + "the value of different type or key is not present, %s\n%s\n", + e.what(), msg.c_str()); } } else { sl_log_debug(LOG_TAG, "Unknown attributes [%s]", attribute.c_str()); diff --git a/silabs_examples/unify-matter-bridge/linux/src/cluster_translator/bridged_device_basic_info_attribute_translator.cpp b/silabs_examples/unify-matter-bridge/linux/src/cluster_translator/bridged_device_basic_info_attribute_translator.cpp index d984ff7ea08392..f067083ade8d5d 100644 --- a/silabs_examples/unify-matter-bridge/linux/src/cluster_translator/bridged_device_basic_info_attribute_translator.cpp +++ b/silabs_examples/unify-matter-bridge/linux/src/cluster_translator/bridged_device_basic_info_attribute_translator.cpp @@ -59,7 +59,7 @@ const static std::unordered_map basic_information_map { BridgedDeviceBasicInfoAttributeAccess::BridgedDeviceBasicInfoAttributeAccess( matter_node_state_monitor &node_state_monitor) : attribute_translator_interface(node_state_monitor, - chip::app::Clusters::BridgedDeviceBasic::Id) + chip::app::Clusters::BridgedDeviceBasic::Id, "attr_translator_BridgedDeviceBasic") { //Register the an event listener for reachable state update @@ -154,6 +154,15 @@ CHIP_ERROR BridgedDeviceBasicInfoAttributeAccess::Read( .get(attr_path); return aEncoder.Encode(state); } + case FeatureMap::Id: { + uint32_t map = 0; + return aEncoder.Encode(map); + } + case ClusterRevision::Id: { + // Update version if bridged-device-basic.xml version is changed + uint16_t revision = 1; + return aEncoder.Encode(revision); + } } } catch (const std::out_of_range &e) { sl_log_info( diff --git a/silabs_examples/unify-matter-bridge/linux/src/device_type_mapper/matter_device_types_clusters_list_updated.inc b/silabs_examples/unify-matter-bridge/linux/src/device_type_mapper/matter_device_types_clusters_list_updated.inc index 7c0c045e50825f..d13eaa97d47fe0 100644 --- a/silabs_examples/unify-matter-bridge/linux/src/device_type_mapper/matter_device_types_clusters_list_updated.inc +++ b/silabs_examples/unify-matter-bridge/linux/src/device_type_mapper/matter_device_types_clusters_list_updated.inc @@ -40,7 +40,7 @@ static const std::map, c //{ 0x0403, {{"Basic", "Identify", "IASWD", "IASZone"}, "iasW"} }, { 0x0100, {{"Basic", "Identify", "Groups", "Scenes", "OnOff"}, "onofflight"} }, { 0x0101, {{"Basic", "Identify", "Groups", "Scenes", "OnOff", "Level"}, "dimmablelight"} }, - { 0x0102, {{"Basic", "Identify", "Groups", "Scenes", "OnOff", "Level", "ColorControl"}, "colordimmablelight"} }, + //{ 0x0102, {{"Basic", "Identify", "Groups", "Scenes", "OnOff", "Level", "ColorControl"}, "colordimmablelight"} }, //{ 0x0103, {{"Basic", "Identify"}, "onofflightswitch"} }, //{ 0x0104, {{"Basic", "Identify"}, "dimmerswitch"} }, //{ 0x0105, {{"Basic", "Identify"}, "colordimmerswitch"} }, @@ -51,7 +51,7 @@ static const std::map, c //{ 0x010A, {{"Basic", "Identify", "Groups", "Scenes", "OnOff"}, "onoffpluginunit"} }, //{ 0x010B, {{"Basic", "Identify", "Groups", "Scenes", "OnOff", "Level"}, "dimmablepluginunit"} }, //{ 0x010C, {{"Basic", "Identify", "Groups", "Scenes", "OnOff", "Level", "ColorControl"}, "colortemperaturelight"} }, - //{ 0x010D, {{"Basic", "Identify", "Groups", "Scenes", "OnOff", "Level", "ColorControl"}, "extendedcolorlight"} }, + { 0x010D, {{"Basic", "Identify", "Groups", "Scenes", "OnOff", "Level", "ColorControl"}, "extendedcolorlight"} }, { 0x010E, {{"Basic", "Identify", "IlluminanceLevelSensing"}, "lightlevelsensor"} }, //{ 0x0800, {{"Basic", "Identify"}, "colorcontroller"} }, //{ 0x0810, {{"Basic", "Identify"}, "colorscenecontroller"} }, diff --git a/silabs_examples/unify-matter-bridge/linux/src/matter_node_state_monitor/matter_cluster_interactor.cpp b/silabs_examples/unify-matter-bridge/linux/src/matter_node_state_monitor/matter_cluster_interactor.cpp index 80d1b9d6979b7a..c5a6ccd998c860 100644 --- a/silabs_examples/unify-matter-bridge/linux/src/matter_node_state_monitor/matter_cluster_interactor.cpp +++ b/silabs_examples/unify-matter-bridge/linux/src/matter_node_state_monitor/matter_cluster_interactor.cpp @@ -12,13 +12,17 @@ *****************************************************************************/ #include "matter_cluster_interactor.hpp" +#include "attribute_type_size.hpp" #include "matter.h" #include "matter_device_translator.hpp" #include "matter_endpoint_builder.hpp" #include "sl_log.h" -constexpr const char * LOG_TAG = "cluster_interactor"; -constexpr int kNodeLabelSize = 32; +constexpr const char * LOG_TAG = "cluster_interactor"; +constexpr int kNodeLabelSize = 32; +constexpr int kDescriptorAttributeArraySize = 254; +constexpr int kFixedLabelAttributeArraySize = 254; + namespace { /** * @brief these clusters are default clusters that are required by matter? @@ -26,8 +30,6 @@ namespace { */ static void append_bridged_clusters(unify::matter_bridge::matter_endpoint_builder & endpoint_builder) { - constexpr int kDescriptorAttributeArraySize = 254; - constexpr int kFixedLabelAttributeArraySize = 254; auto descriptor_cluster = endpoint_builder.register_cluster(ZCL_DESCRIPTOR_CLUSTER_ID); descriptor_cluster.attributes.push_back(EmberAfAttributeMetadata{ ZCL_DEVICE_LIST_ATTRIBUTE_ID, ZCL_ARRAY_ATTRIBUTE_TYPE, @@ -38,10 +40,14 @@ static void append_bridged_clusters(unify::matter_bridge::matter_endpoint_builde kDescriptorAttributeArraySize, 0, ZAP_EMPTY_DEFAULT() }); descriptor_cluster.attributes.push_back(EmberAfAttributeMetadata{ ZCL_PARTS_LIST_ATTRIBUTE_ID, ZCL_ARRAY_ATTRIBUTE_TYPE, kDescriptorAttributeArraySize, 0, ZAP_EMPTY_DEFAULT() }); + descriptor_cluster.attributes.emplace_back( + EmberAfAttributeMetadata{ ZCL_CLUSTER_REVISION_SERVER_ATTRIBUTE_ID, ZCL_INT16U_ATTRIBUTE_TYPE, 2, 0, ZAP_EMPTY_DEFAULT() }); auto fixed_label_cluster = endpoint_builder.register_cluster(ZCL_FIXED_LABEL_CLUSTER_ID); fixed_label_cluster.attributes.push_back(EmberAfAttributeMetadata{ ZCL_LABEL_LIST_ATTRIBUTE_ID, ZCL_ARRAY_ATTRIBUTE_TYPE, kFixedLabelAttributeArraySize, 0, ZAP_EMPTY_DEFAULT() }); + fixed_label_cluster.attributes.emplace_back( + EmberAfAttributeMetadata{ ZCL_CLUSTER_REVISION_SERVER_ATTRIBUTE_ID, ZCL_INT16U_ATTRIBUTE_TYPE, 2, 0, ZAP_EMPTY_DEFAULT() }); } } // namespace @@ -57,6 +63,10 @@ void cluster_interactor::build_matter_cluster(const std::unordered_mapfirst == "Groups" || ep.clusters.begin()->first == "NameAndLocation")) { + sl_log_warning(LOG_TAG, "Ignoring endpoint %d from UNID %s with only the 'Groups' or 'NameAndLocation' clusters", ep_id, node.unid.c_str()); + continue; + } + for (const auto &[cluster_name, cluster]: ep.clusters) { + // Skip clusters that doesn't have attributes + if (cluster.attributes.empty()) { + continue; + } if (matter_device_translator.get_cluster_id(cluster_name).has_value()) { count_number_of_clusters_matched_to_matter++; } diff --git a/silabs_examples/unify-matter-bridge/linux/src/matter_wrappers/unify_ember_interface.hpp b/silabs_examples/unify-matter-bridge/linux/src/matter_wrappers/unify_ember_interface.hpp index 2641e292761a28..3770c47c283003 100644 --- a/silabs_examples/unify-matter-bridge/linux/src/matter_wrappers/unify_ember_interface.hpp +++ b/silabs_examples/unify-matter-bridge/linux/src/matter_wrappers/unify_ember_interface.hpp @@ -18,7 +18,7 @@ class UnifyEmberInterface { protected: - chip::EndpointId last_returned_available_endpoint_id = FIXED_ENDPOINT_COUNT; + chip::EndpointId last_returned_available_endpoint_id = FIXED_ENDPOINT_COUNT - 1; const char * LOG_TAG = "Unify Ember Interface"; public: diff --git a/silabs_examples/unify-matter-bridge/linux/zap-handlers/attribute_translator.cpp.zapt b/silabs_examples/unify-matter-bridge/linux/zap-handlers/attribute_translator.cpp.zapt index 4c0e932d265d45..f954a56647050b 100644 --- a/silabs_examples/unify-matter-bridge/linux/zap-handlers/attribute_translator.cpp.zapt +++ b/silabs_examples/unify-matter-bridge/linux/zap-handlers/attribute_translator.cpp.zapt @@ -51,16 +51,40 @@ CHIP_ERROR ConcreteAttributePath atrpath = ConcreteAttributePath(aPath.mEndpointId, aPath.mClusterId, aPath.mAttributeId); - try { switch (aPath.mAttributeId) { {{#zcl_attributes_server}} - {{#if_is_struct type}} {{else if (canHaveSimpleAccessors this)}} case MN::{{asUpperCamelCase label}}::Id: { // type is {{type}} MN::{{asUpperCamelCase label}}::TypeInfo::Type value; - UN::{{asUpperCamelCase label}}::Get(atrpath, value ); + {{#if (isStrEqual (asUpperCamelCase label) "FeatureMap") }} + {{#if (isStrEqual (asUpperCamelCase parent.label) "LevelControl")}} + // Set hardcoded FeatureMap values for LevelControl + value = 3; + {{else if (isStrEqual (asUpperCamelCase parent.label) "ColorControl")}} + { + ConcreteAttributePath cc_atrpath = ConcreteAttributePath(aPath.mEndpointId, + aPath.mClusterId, + MN::ColorCapabilities::Id); + MN::ColorCapabilities::TypeInfo::Type colorControlCapabilities; + if (EMBER_ZCL_STATUS_SUCCESS == UN::ColorCapabilities::Get(cc_atrpath, colorControlCapabilities)) { + value = static_cast(colorControlCapabilities); + } + else { + sl_log_warning(LOG_TAG, "Failed to read ColorCapabilities, setting featuremap to HueSaturationSupported"); + value = 1; + } + } + {{else if (isStrEqual (asUpperCamelCase parent.label) "OnOff")}} + // Set hardcoded FeatureMap values for OnOff + value = 1; + {{else}} + UN::{{asUpperCamelCase label}}::Get(atrpath, value); + {{/if}} + {{else}} + UN::{{asUpperCamelCase label}}::Get(atrpath, value); + {{/if}} return aEncoder.Encode(value); } {{/if_is_struct}} @@ -97,7 +121,7 @@ CHIP_ERROR {{asUpperCamelCase label}}AttributeAccess::Write(const ConcreteDataAt switch (aPath.mAttributeId) { {{#zcl_attributes_server}} {{#if writable}} - + case Attributes::{{asUpperCamelCase label}}::Id: { Attributes::{{asUpperCamelCase label}}::TypeInfo::DecodableType value; @@ -110,7 +134,6 @@ CHIP_ERROR {{asUpperCamelCase label}}AttributeAccess::Write(const ConcreteDataAt {{/zcl_attributes_server}} } - if (!attribute_name.empty()) { std::string payload_str; std::string topic = "ucl/by-unid/" + unify_node->unify_unid + "/ep" @@ -127,8 +150,6 @@ CHIP_ERROR {{asUpperCamelCase label}}AttributeAccess::Write(const ConcreteDataAt return CHIP_NO_ERROR; } - - void {{asUpperCamelCase label}}AttributeAccess::reported_updated(const bridged_endpoint *ep, const std::string &cluster, const std::string &attribute, @@ -155,23 +176,35 @@ void {{asUpperCamelCase label}}AttributeAccess::reported_updated(const bridged_e ConcreteAttributePath attrpath = ConcreteAttributePath(node_matter_endpoint, Clusters::{{asUpperCamelCase label}}::Id, attribute_id.value()); - switch (attribute_id.value()) { {{#zcl_attributes_server}} {{#if_is_struct type}} {{else if (canHaveSimpleAccessors this)}} // type is {{type}} case MN::{{asUpperCamelCase label}}::Id: { + {{#if_is_bitmap (asUpperCamelCase label)}} + {{#if (overrideBitmapType (asUpperCamelCase label))}} + std::optional<{{asUnderlyingType (asUpperCamelCase label)}}> value = from_json_{{asUpperCamelCase label}}(unify_value); + {{else}} + using T = MN::{{asUpperCamelCase label}}::TypeInfo::Type; + std::optional value = from_json(unify_value); + {{/if}} + {{else}} + {{#if (overrideEnumType (asUpperCamelCase label))}} + using T = ZclEnum{{asUpperCamelCase label}}; + {{else}} using T = MN::{{asUpperCamelCase label}}::TypeInfo::Type; + {{/if}} std::optional value = from_json(unify_value); + {{/if_is_bitmap}} if( value.has_value()) { - sl_log_debug(LOG_TAG,"{{asUpperCamelCase label}} attribute value is %s",unify_value.dump().c_str() ); - UN::{{asUpperCamelCase label}}::Set( attrpath, value.value() ); + sl_log_debug(LOG_TAG,"{{asUpperCamelCase label}} attribute value is %s",unify_value.dump().c_str()); + UN::{{asUpperCamelCase label}}::Set(attrpath, value.value()); MatterReportingAttributeChangeCallback( node_matter_endpoint, Clusters::{{asUpperCamelCase parent.label}}::Id, - MN::{{asUpperCamelCase label}}::Id, + MN::{{asUpperCamelCase label}}::Id, ZCL_{{typeAsDelimitedMacro type}}_ATTRIBUTE_TYPE, reinterpret_cast(&value.value())); } diff --git a/silabs_examples/unify-matter-bridge/linux/zap-handlers/attribute_translator.hpp.zapt b/silabs_examples/unify-matter-bridge/linux/zap-handlers/attribute_translator.hpp.zapt index 6d76c418660725..8bec22b7292556 100644 --- a/silabs_examples/unify-matter-bridge/linux/zap-handlers/attribute_translator.hpp.zapt +++ b/silabs_examples/unify-matter-bridge/linux/zap-handlers/attribute_translator.hpp.zapt @@ -31,7 +31,8 @@ class {{asUpperCamelCase label}}AttributeAccess : public attribute_translator_in public: {{asUpperCamelCase label}}AttributeAccess(matter_node_state_monitor &node_state_monitor) : attribute_translator_interface(node_state_monitor, - chip::app::Clusters::{{asUpperCamelCase label}}::Id) + chip::app::Clusters::{{asUpperCamelCase label}}::Id, "attr_translator_{{asUpperCamelCase label}}") + {} CHIP_ERROR Read(const chip::app::ConcreteReadAttributePath &aPath, diff --git a/silabs_examples/unify-matter-bridge/linux/zap-handlers/attribute_type_size.cpp.zapt b/silabs_examples/unify-matter-bridge/linux/zap-handlers/attribute_type_size.cpp.zapt new file mode 100644 index 00000000000000..bfa81ec7e37fb7 --- /dev/null +++ b/silabs_examples/unify-matter-bridge/linux/zap-handlers/attribute_type_size.cpp.zapt @@ -0,0 +1,88 @@ +/****************************************************************************** + * # License + * Copyright 2022 Silicon Laboratories Inc. www.silabs.com + ****************************************************************************** + * The licensor of this software is Silicon Laboratories Inc. Your use of this + * software is governed by the terms of Silicon Labs Master Software License + * Agreement (MSLA) available at + * www.silabs.com/about-us/legal/master-software-license-agreement. This + * software is distributed to you in Source Code format and is governed by the + * sections of the MSLA applicable to Source Code. + * + *****************************************************************************/ + +#include "attribute_type_size.hpp" +#include "matter.h" + +using namespace chip; +using namespace chip::app; +using namespace chip::app::Clusters; + +// ZCL attribute types +{{#zcl_atomics}} +constexpr uint8_t ZCL_{{asDelimitedMacro name}}_ATTRIBUTE_TYPES = {{asHex atomicId 2}}; +{{/zcl_atomics}} + +// ZCL attribute sizes +{{#zcl_atomics}} +{{#if size}} +constexpr uint8_t ZCL_{{asDelimitedMacro name}}_ATTRIBUTE_TYPES_SIZE = {{size}}; +{{/if}} +{{/zcl_atomics}} + +// Setting the attribute tpe size which is not defined in 'chip-type.xml' +constexpr uint8_t ZCL_NO_DATA_ATTRIBUTE_TYPES_SIZE = 0; +constexpr uint8_t ZCL_OCTET_STRING_ATTRIBUTE_TYPES_SIZE = 32; +constexpr uint8_t ZCL_CHAR_STRING_ATTRIBUTE_TYPES_SIZE = 32; +constexpr uint8_t ZCL_LONG_OCTET_STRING_ATTRIBUTE_TYPES_SIZE = 32; +constexpr uint8_t ZCL_LONG_CHAR_STRING_ATTRIBUTE_TYPES_SIZE = 32; +constexpr uint8_t ZCL_STRUCT_ATTRIBUTE_TYPES_SIZE = 254; +constexpr uint8_t ZCL_ARRAY_ATTRIBUTE_TYPES_SIZE = 254; + +{{#zcl_clusters}} +{{#if (supportedCluster label)}} + +{{#zcl_bitmaps}} +constexpr uint8_t ZCL_{{asDelimitedMacro name}}_ATTRIBUTE_TYPES = ZCL_BITMAP32_ATTRIBUTE_TYPES; +constexpr uint8_t ZCL_{{asDelimitedMacro name}}_ATTRIBUTE_TYPES_SIZE = ZCL_BITMAP32_ATTRIBUTE_TYPES_SIZE; +{{/zcl_bitmaps}} + +{{#zcl_enums}} +constexpr uint8_t ZCL_{{asDelimitedMacro name}}_ATTRIBUTE_TYPES = ZCL_ENUM8_ATTRIBUTE_TYPES; +constexpr uint8_t ZCL_{{asDelimitedMacro name}}_ATTRIBUTE_TYPES_SIZE = ZCL_ENUM8_ATTRIBUTE_TYPES_SIZE; +{{/zcl_enums}} + +{{#zcl_structs}} +{{#if (supportedStruct name)}} +constexpr uint8_t ZCL_{{asDelimitedMacro name}}_ATTRIBUTE_TYPES = ZCL_STRUCT_ATTRIBUTE_TYPES; +constexpr uint8_t ZCL_{{asDelimitedMacro name}}_ATTRIBUTE_TYPES_SIZE = ZCL_STRUCT_ATTRIBUTE_TYPES_SIZE; +{{/if}} +{{/zcl_structs}} + +{{/if}} +{{/zcl_clusters}} + +attr_type_size get_attribute_type_size(uint16_t cluster_id, uint16_t attribute_id) +{ + switch(cluster_id) + { + {{#zcl_clusters}} + {{#if (supportedCluster label)}} + case chip::app::Clusters::{{asUpperCamelCase label}}::Id: { + switch(attribute_id) + { + {{#zcl_attributes_server}} + case {{asUpperCamelCase parent.label}}::Attributes::{{asUpperCamelCase label}}::Id: { + return {ZCL_{{asDelimitedMacro type}}_ATTRIBUTE_TYPES, ZCL_{{asDelimitedMacro type}}_ATTRIBUTE_TYPES_SIZE}; + } + {{/zcl_attributes_server}} + default: + return {ZCL_BOOLEAN_ATTRIBUTE_TYPES, 0x01}; + } + } + {{/if}} + {{/zcl_clusters}} + default: + return {ZCL_BOOLEAN_ATTRIBUTE_TYPES, 0x01}; + } +} \ No newline at end of file diff --git a/silabs_examples/unify-matter-bridge/linux/zap-handlers/attribute_type_size.hpp.zapt b/silabs_examples/unify-matter-bridge/linux/zap-handlers/attribute_type_size.hpp.zapt new file mode 100644 index 00000000000000..2c066135615ebc --- /dev/null +++ b/silabs_examples/unify-matter-bridge/linux/zap-handlers/attribute_type_size.hpp.zapt @@ -0,0 +1,21 @@ +/******************************************************************************* + * # License + * Copyright 2020 Silicon Laboratories Inc. www.silabs.com + ******************************************************************************* + * + * The licensor of this software is Silicon Laboratories Inc. Your use of this + * software is governed by the terms of Silicon Labs Master Software License + * Agreement (MSLA) available at + * www.silabs.com/about-us/legal/master-software-license-agreement. This + * software is distributed to you in Source Code format and is governed by the + * sections of the MSLA applicable to Source Code. + * + ******************************************************************************/ + #include + +struct attr_type_size { + uint8_t attrType; + uint8_t attrSize; +}; + +attr_type_size get_attribute_type_size(uint16_t cluster_id, uint16_t attribute_id); \ No newline at end of file diff --git a/silabs_examples/unify-matter-bridge/linux/zap-handlers/bridge-templates.json b/silabs_examples/unify-matter-bridge/linux/zap-handlers/bridge-templates.json index 6f5fc7fd8ed9ff..49068e0dc0715b 100644 --- a/silabs_examples/unify-matter-bridge/linux/zap-handlers/bridge-templates.json +++ b/silabs_examples/unify-matter-bridge/linux/zap-handlers/bridge-templates.json @@ -53,5 +53,21 @@ "name": "Attribute Accessor Source", "output": "unify_accessors.cpp" } + , + { + "path": "attribute_type_size.hpp.zapt", + "name": "Attribute Type/Size Header", + "output": "attribute_type_size.hpp" + }, + { + "path": "attribute_type_size.cpp.zapt", + "name": "Attribute Type/Size Source", + "output": "attribute_type_size.cpp" + }, + { + "path": "zcl_global_types.hpp.zapt", + "name": "ZCL Global Enum and Bitmap types", + "output": "zcl_global_types.hpp" + } ] } diff --git a/silabs_examples/unify-matter-bridge/linux/zap-handlers/chip_types_from_json.hpp.zapt b/silabs_examples/unify-matter-bridge/linux/zap-handlers/chip_types_from_json.hpp.zapt index 65be526eb2939e..00d5985d6a6e9e 100644 --- a/silabs_examples/unify-matter-bridge/linux/zap-handlers/chip_types_from_json.hpp.zapt +++ b/silabs_examples/unify-matter-bridge/linux/zap-handlers/chip_types_from_json.hpp.zapt @@ -12,6 +12,7 @@ * ******************************************************************************/ #include "app/data-model/NullObject.h" +#include "zcl_global_types.hpp" // Default translation template @@ -19,7 +20,7 @@ std::optional from_json(const nlohmann::json & value) { return std::nullopt; } -/***************************** Simple types Convertes **************/ +/***************************** Simple type Convertes **************/ template<> inline std::optional from_json(const nlohmann::json & value) @@ -60,7 +61,7 @@ inline std::optional from_json(const nlohmann::json & value) return value; } template <> -inline std::optional> from_json(const nlohmann::json & value) +inline std::optional> from_json(const nlohmann::json & value) { if (value.is_null()) { @@ -68,7 +69,43 @@ inline std::optional> from_json(const nlohma } else { - return chip::app::DataModel::Nullable(value); + return chip::app::DataModel::Nullable(value); + } +} +template <> +inline std::optional> from_json(const nlohmann::json & value) +{ + if (value.is_null()) + { + return std::nullopt; + } + else + { + return chip::app::DataModel::Nullable(value); + } +} +template <> +inline std::optional> from_json(const nlohmann::json & value) +{ + if (value.is_null()) + { + return std::nullopt; + } + else + { + return chip::app::DataModel::Nullable(value); + } +} +template <> +inline std::optional> from_json(const nlohmann::json & value) +{ + if (value.is_null()) + { + return std::nullopt; + } + else + { + return chip::app::DataModel::Nullable(value); } } template <> @@ -119,16 +156,16 @@ inline std::optional> from_json(const n return chip::app::DataModel::Nullable(value); } } -/***************************** Bitmap Convertes **************/ -//{{#zcl_clusters}} +/***************************** Bitmap Converters **************/ +{{#zcl_clusters}} //{{#zcl_bitmaps}} //template<> inline nlohmann::json to_json(const chip::BitFlags<{{asUpperCamelCase parent.label}}::{{label}}, uint8_t>& value) { // return "{\"no bitmap support\"}"; //} -{{/zcl_bitmaps}} +//{{/zcl_bitmaps}} -/***************************** Struct Convertes **************/ +/***************************** Struct Converters **************/ //{{#zcl_structs}} //template<> inline nlohmann::json to_json(const {{asUpperCamelCase parent.label}}::Structs::{{name}}::Type& value) { // return "no struct support"; @@ -136,24 +173,84 @@ inline std::optional> from_json(const n // //{{/zcl_structs}} -{{#zcl_enums}} - + {{#zcl_enums}} template<> inline std::optional<{{asUpperCamelCase parent.label}}::{{label}}> from_json(const nlohmann::json& value) { const std::map< std::string, {{asUpperCamelCase parent.label}}::{{label}}> table = { - {{#zcl_enum_items}} + {{#zcl_enum_items}} { "{{asUpperCamelCase label}}" , {{asUpperCamelCase parent.parent.label}}::{{parent.label}}::k{{asUpperCamelCase label}} }, - {{/zcl_enum_items}} + {{/zcl_enum_items}} }; - auto i = table.find( value ); + auto i = table.find( value ); if( i != table.end() ) { return i->second; } else { return std::nullopt; } } + {{/zcl_enums}} +{{/zcl_clusters}} + +// ZCL global enums +{{#zcl_enums}} + {{#if (isStrEqual (asUpperCamelCase label) "LevelControlOptions")}} + // Because some bitmaps are defined as in Matter xml files, this handles translating bitmaps for them. + // TODO: Check if is enum instead of LevelControlOptions +std::optional from_json_{{label}}(const nlohmann::json & value) +{ + uint8_t bitmap_value = 0x00; + try { + {{#zcl_enum_items}} + if (value["{{matterToUclBitmapElem (asUpperCamelCase label)}}"].get()){ + bitmap_value |= ZCL_BITMAP_{{as_delimited_macro parent.label}}_{{as_delimited_macro label}}; + } + {{/zcl_enum_items}} + return bitmap_value; + } catch (const nlohmann::json::exception &e){ + sl_log_warning(LOG_TAG, "Failed to parse bitmap %s, error %s", value.dump().c_str(), e.what()); + return std::nullopt; + } +} + {{else}} + {{#if (overrideEnumType (asUpperCamelCase label))}} +template<> inline std::optional from_json(const nlohmann::json& value) { + {{#zcl_enum_items}} + {{#first}} + const std::map table = { + {{/first}} + { "{{label}}", ZCL_{{as_delimited_macro parent.label}}_{{as_delimited_macro label}} }, + {{#last}} + }; + {{/last}} + {{/zcl_enum_items}} + auto i = table.find( value ); + if( i != table.end() ) { + return i->second; + } else { + return std::nullopt; + } +} + {{/if}} + {{/if}} {{/zcl_enums}} -{{/zcl_clusters}} +{{#zcl_bitmaps}} +std::optional<{{asUnderlyingType name}}> from_json_{{label}}(const nlohmann::json & value) +{ + {{asUnderlyingType name}} bitmap_value = 0x00; + try { + {{#zcl_bitmap_items}} + if (value["{{matterToUclBitmapElem (asUpperCamelCase label)}}"].get()){ + bitmap_value |= ZCL_BITMAP_{{as_delimited_macro parent.label}}_{{as_delimited_macro label}}; + } + {{/zcl_bitmap_items}} + return bitmap_value; + } catch (const nlohmann::json::exception &e){ + sl_log_warning(LOG_TAG, "Failed to parse bitmap %s, error %s", value.dump().c_str(), e.what()); + return std::nullopt; + } +} + +{{/zcl_bitmaps}} diff --git a/silabs_examples/unify-matter-bridge/linux/zap-handlers/chip_types_to_json.hpp.zapt b/silabs_examples/unify-matter-bridge/linux/zap-handlers/chip_types_to_json.hpp.zapt index 606a2477de821b..4face39a1821cd 100644 --- a/silabs_examples/unify-matter-bridge/linux/zap-handlers/chip_types_to_json.hpp.zapt +++ b/silabs_examples/unify-matter-bridge/linux/zap-handlers/chip_types_to_json.hpp.zapt @@ -69,7 +69,7 @@ nlohmann::json inline to_json(const uint64_t & value) template nlohmann::json inline to_json(chip::app::DataModel::Nullable & value) { - if (value.HasValidValue()) + if ((!value.IsNull()) && value.HasValidValue()) { return to_json(value.Value()); } @@ -98,7 +98,7 @@ nlohmann::json inline to_json(chip::app::DataModel::Nullable & value) template<> nlohmann::json inline to_json(const chip::app::Clusters::{{asUpperCamelCase parent.label}}::{{label}}& value) { switch( value ) { {{#zcl_enum_items}} - case chip::app::Clusters::{{asUpperCamelCase parent.parent.label}}::{{parent.label}}::k{{asUpperCamelCase label}}: return "{{asUpperCamelCase label}}"; + case chip::app::Clusters::{{asUpperCamelCase parent.parent.label}}::{{parent.label}}::k{{asUpperCamelCase label}}: return "{{matterToUclBitmapElem (asUpperCamelCase label)}}"; {{/zcl_enum_items}} default: return "{}"; } diff --git a/silabs_examples/unify-matter-bridge/linux/zap-handlers/command_translator.cpp.zapt b/silabs_examples/unify-matter-bridge/linux/zap-handlers/command_translator.cpp.zapt index dd9de0ff9f865d..46e8b90a81e6eb 100644 --- a/silabs_examples/unify-matter-bridge/linux/zap-handlers/command_translator.cpp.zapt +++ b/silabs_examples/unify-matter-bridge/linux/zap-handlers/command_translator.cpp.zapt @@ -55,14 +55,14 @@ void {{asUpperCamelCase label}}ClusterCommandHandler::InvokeCommand( {{#isOptional}} if( data.{{asLowerCamelCase label}}.HasValue() ) { try { - payload["{{asUpperCamelCase label}}"] = to_json(data.{{asLowerCamelCase label}}.Value()); + payload["{{matterToUclBitmapElem (asUpperCamelCase label)}}"] = to_json(data.{{asLowerCamelCase label}}.Value()); } catch (std::exception &ex) { sl_log_warning(LOG_TAG, "Failed to add the command arguments value to json format: %s", ex.what()); } } {{else}} try { - payload["{{asUpperCamelCase label}}"] = to_json(data.{{asLowerCamelCase label}}); + payload["{{matterToUclBitmapElem (asUpperCamelCase label)}}"] = to_json(data.{{asLowerCamelCase label}}); } catch (std::exception &ex) { sl_log_warning(LOG_TAG, "Failed to add the command argument value to json format: %s", ex.what()); } diff --git a/silabs_examples/unify-matter-bridge/linux/zap-handlers/gen/attribute_translator.cpp b/silabs_examples/unify-matter-bridge/linux/zap-handlers/gen/attribute_translator.cpp index 697b38c9e0b9e5..02f0f66aec5b08 100644 --- a/silabs_examples/unify-matter-bridge/linux/zap-handlers/gen/attribute_translator.cpp +++ b/silabs_examples/unify-matter-bridge/linux/zap-handlers/gen/attribute_translator.cpp @@ -47,30 +47,25 @@ IdentifyAttributeAccess::Read(const ConcreteReadAttributePath & aPath, Attribute } ConcreteAttributePath atrpath = ConcreteAttributePath(aPath.mEndpointId, aPath.mClusterId, aPath.mAttributeId); - try { switch (aPath.mAttributeId) { - case MN::IdentifyTime::Id: { // type is int16u MN::IdentifyTime::TypeInfo::Type value; UN::IdentifyTime::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::IdentifyType::Id: { // type is enum8 MN::IdentifyType::TypeInfo::Type value; UN::IdentifyType::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::FeatureMap::Id: { // type is bitmap32 MN::FeatureMap::TypeInfo::Type value; UN::FeatureMap::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::ClusterRevision::Id: { // type is int16u MN::ClusterRevision::TypeInfo::Type value; UN::ClusterRevision::Get(atrpath, value); @@ -107,8 +102,7 @@ CHIP_ERROR IdentifyAttributeAccess::Write(const ConcreteDataAttributePath & aPat nlohmann::json jsn; switch (aPath.mAttributeId) - { - } + {} if (!attribute_name.empty()) { @@ -146,7 +140,6 @@ void IdentifyAttributeAccess::reported_updated(const bridged_endpoint * ep, cons chip::EndpointId node_matter_endpoint = ep->matter_endpoint; ConcreteAttributePath attrpath = ConcreteAttributePath(node_matter_endpoint, Clusters::Identify::Id, attribute_id.value()); - switch (attribute_id.value()) { // type is int16u @@ -219,54 +212,45 @@ ScenesAttributeAccess::Read(const ConcreteReadAttributePath & aPath, AttributeVa } ConcreteAttributePath atrpath = ConcreteAttributePath(aPath.mEndpointId, aPath.mClusterId, aPath.mAttributeId); - try { switch (aPath.mAttributeId) { - case MN::SceneCount::Id: { // type is int8u MN::SceneCount::TypeInfo::Type value; UN::SceneCount::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::CurrentScene::Id: { // type is int8u MN::CurrentScene::TypeInfo::Type value; UN::CurrentScene::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::CurrentGroup::Id: { // type is group_id MN::CurrentGroup::TypeInfo::Type value; UN::CurrentGroup::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::SceneValid::Id: { // type is boolean MN::SceneValid::TypeInfo::Type value; UN::SceneValid::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::NameSupport::Id: { // type is bitmap8 MN::NameSupport::TypeInfo::Type value; UN::NameSupport::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::LastConfiguredBy::Id: { // type is node_id MN::LastConfiguredBy::TypeInfo::Type value; UN::LastConfiguredBy::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::FeatureMap::Id: { // type is bitmap32 MN::FeatureMap::TypeInfo::Type value; UN::FeatureMap::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::ClusterRevision::Id: { // type is int16u MN::ClusterRevision::TypeInfo::Type value; UN::ClusterRevision::Get(atrpath, value); @@ -303,8 +287,7 @@ CHIP_ERROR ScenesAttributeAccess::Write(const ConcreteDataAttributePath & aPath, nlohmann::json jsn; switch (aPath.mAttributeId) - { - } + {} if (!attribute_name.empty()) { @@ -342,7 +325,6 @@ void ScenesAttributeAccess::reported_updated(const bridged_endpoint * ep, const chip::EndpointId node_matter_endpoint = ep->matter_endpoint; ConcreteAttributePath attrpath = ConcreteAttributePath(node_matter_endpoint, Clusters::Scenes::Id, attribute_id.value()); - switch (attribute_id.value()) { // type is int8u @@ -471,48 +453,41 @@ OnOffAttributeAccess::Read(const ConcreteReadAttributePath & aPath, AttributeVal } ConcreteAttributePath atrpath = ConcreteAttributePath(aPath.mEndpointId, aPath.mClusterId, aPath.mAttributeId); - try { switch (aPath.mAttributeId) { - case MN::OnOff::Id: { // type is boolean MN::OnOff::TypeInfo::Type value; UN::OnOff::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::GlobalSceneControl::Id: { // type is boolean MN::GlobalSceneControl::TypeInfo::Type value; UN::GlobalSceneControl::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::OnTime::Id: { // type is int16u MN::OnTime::TypeInfo::Type value; UN::OnTime::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::OffWaitTime::Id: { // type is int16u MN::OffWaitTime::TypeInfo::Type value; UN::OffWaitTime::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::StartUpOnOff::Id: { // type is OnOffStartUpOnOff MN::StartUpOnOff::TypeInfo::Type value; UN::StartUpOnOff::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::FeatureMap::Id: { // type is bitmap32 MN::FeatureMap::TypeInfo::Type value; - UN::FeatureMap::Get(atrpath, value); + // Set hardcoded FeatureMap values for OnOff + value = 1; return aEncoder.Encode(value); } - case MN::ClusterRevision::Id: { // type is int16u MN::ClusterRevision::TypeInfo::Type value; UN::ClusterRevision::Get(atrpath, value); @@ -549,8 +524,7 @@ CHIP_ERROR OnOffAttributeAccess::Write(const ConcreteDataAttributePath & aPath, nlohmann::json jsn; switch (aPath.mAttributeId) - { - } + {} if (!attribute_name.empty()) { @@ -588,7 +562,6 @@ void OnOffAttributeAccess::reported_updated(const bridged_endpoint * ep, const s chip::EndpointId node_matter_endpoint = ep->matter_endpoint; ConcreteAttributePath attrpath = ConcreteAttributePath(node_matter_endpoint, Clusters::OnOff::Id, attribute_id.value()); - switch (attribute_id.value()) { // type is boolean @@ -703,30 +676,25 @@ OnOffSwitchConfigurationAttributeAccess::Read(const ConcreteReadAttributePath & } ConcreteAttributePath atrpath = ConcreteAttributePath(aPath.mEndpointId, aPath.mClusterId, aPath.mAttributeId); - try { switch (aPath.mAttributeId) { - case MN::SwitchType::Id: { // type is enum8 MN::SwitchType::TypeInfo::Type value; UN::SwitchType::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::SwitchActions::Id: { // type is enum8 MN::SwitchActions::TypeInfo::Type value; UN::SwitchActions::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::FeatureMap::Id: { // type is bitmap32 MN::FeatureMap::TypeInfo::Type value; UN::FeatureMap::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::ClusterRevision::Id: { // type is int16u MN::ClusterRevision::TypeInfo::Type value; UN::ClusterRevision::Get(atrpath, value); @@ -763,8 +731,7 @@ CHIP_ERROR OnOffSwitchConfigurationAttributeAccess::Write(const ConcreteDataAttr nlohmann::json jsn; switch (aPath.mAttributeId) - { - } + {} if (!attribute_name.empty()) { @@ -803,7 +770,6 @@ void OnOffSwitchConfigurationAttributeAccess::reported_updated(const bridged_end chip::EndpointId node_matter_endpoint = ep->matter_endpoint; ConcreteAttributePath attrpath = ConcreteAttributePath(node_matter_endpoint, Clusters::OnOffSwitchConfiguration::Id, attribute_id.value()); - switch (attribute_id.value()) { // type is enum8 @@ -878,102 +844,86 @@ LevelControlAttributeAccess::Read(const ConcreteReadAttributePath & aPath, Attri } ConcreteAttributePath atrpath = ConcreteAttributePath(aPath.mEndpointId, aPath.mClusterId, aPath.mAttributeId); - try { switch (aPath.mAttributeId) { - case MN::CurrentLevel::Id: { // type is int8u MN::CurrentLevel::TypeInfo::Type value; UN::CurrentLevel::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::RemainingTime::Id: { // type is int16u MN::RemainingTime::TypeInfo::Type value; UN::RemainingTime::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::MinLevel::Id: { // type is int8u MN::MinLevel::TypeInfo::Type value; UN::MinLevel::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::MaxLevel::Id: { // type is int8u MN::MaxLevel::TypeInfo::Type value; UN::MaxLevel::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::CurrentFrequency::Id: { // type is int16u MN::CurrentFrequency::TypeInfo::Type value; UN::CurrentFrequency::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::MinFrequency::Id: { // type is int16u MN::MinFrequency::TypeInfo::Type value; UN::MinFrequency::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::MaxFrequency::Id: { // type is int16u MN::MaxFrequency::TypeInfo::Type value; UN::MaxFrequency::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::Options::Id: { // type is bitmap8 MN::Options::TypeInfo::Type value; UN::Options::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::OnOffTransitionTime::Id: { // type is int16u MN::OnOffTransitionTime::TypeInfo::Type value; UN::OnOffTransitionTime::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::OnLevel::Id: { // type is int8u MN::OnLevel::TypeInfo::Type value; UN::OnLevel::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::OnTransitionTime::Id: { // type is int16u MN::OnTransitionTime::TypeInfo::Type value; UN::OnTransitionTime::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::OffTransitionTime::Id: { // type is int16u MN::OffTransitionTime::TypeInfo::Type value; UN::OffTransitionTime::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::DefaultMoveRate::Id: { // type is int8u MN::DefaultMoveRate::TypeInfo::Type value; UN::DefaultMoveRate::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::StartUpCurrentLevel::Id: { // type is int8u MN::StartUpCurrentLevel::TypeInfo::Type value; UN::StartUpCurrentLevel::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::FeatureMap::Id: { // type is bitmap32 MN::FeatureMap::TypeInfo::Type value; - UN::FeatureMap::Get(atrpath, value); + // Set hardcoded FeatureMap values for LevelControl + value = 3; return aEncoder.Encode(value); } - case MN::ClusterRevision::Id: { // type is int16u MN::ClusterRevision::TypeInfo::Type value; UN::ClusterRevision::Get(atrpath, value); @@ -1010,8 +960,7 @@ CHIP_ERROR LevelControlAttributeAccess::Write(const ConcreteDataAttributePath & nlohmann::json jsn; switch (aPath.mAttributeId) - { - } + {} if (!attribute_name.empty()) { @@ -1049,7 +998,6 @@ void LevelControlAttributeAccess::reported_updated(const bridged_endpoint * ep, chip::EndpointId node_matter_endpoint = ep->matter_endpoint; ConcreteAttributePath attrpath = ConcreteAttributePath(node_matter_endpoint, Clusters::LevelControl::Id, attribute_id.value()); - switch (attribute_id.value()) { // type is int8u @@ -1290,72 +1238,60 @@ BinaryInputBasicAttributeAccess::Read(const ConcreteReadAttributePath & aPath, A } ConcreteAttributePath atrpath = ConcreteAttributePath(aPath.mEndpointId, aPath.mClusterId, aPath.mAttributeId); - try { switch (aPath.mAttributeId) { - case MN::ActiveText::Id: { // type is char_string MN::ActiveText::TypeInfo::Type value; UN::ActiveText::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::Description::Id: { // type is char_string MN::Description::TypeInfo::Type value; UN::Description::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::InactiveText::Id: { // type is char_string MN::InactiveText::TypeInfo::Type value; UN::InactiveText::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::OutOfService::Id: { // type is boolean MN::OutOfService::TypeInfo::Type value; UN::OutOfService::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::Polarity::Id: { // type is enum8 MN::Polarity::TypeInfo::Type value; UN::Polarity::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::PresentValue::Id: { // type is boolean MN::PresentValue::TypeInfo::Type value; UN::PresentValue::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::Reliability::Id: { // type is enum8 MN::Reliability::TypeInfo::Type value; UN::Reliability::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::StatusFlags::Id: { // type is bitmap8 MN::StatusFlags::TypeInfo::Type value; UN::StatusFlags::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::ApplicationType::Id: { // type is int32u MN::ApplicationType::TypeInfo::Type value; UN::ApplicationType::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::FeatureMap::Id: { // type is bitmap32 MN::FeatureMap::TypeInfo::Type value; UN::FeatureMap::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::ClusterRevision::Id: { // type is int16u MN::ClusterRevision::TypeInfo::Type value; UN::ClusterRevision::Get(atrpath, value); @@ -1392,8 +1328,7 @@ CHIP_ERROR BinaryInputBasicAttributeAccess::Write(const ConcreteDataAttributePat nlohmann::json jsn; switch (aPath.mAttributeId) - { - } + {} if (!attribute_name.empty()) { @@ -1432,7 +1367,6 @@ void BinaryInputBasicAttributeAccess::reported_updated(const bridged_endpoint * chip::EndpointId node_matter_endpoint = ep->matter_endpoint; ConcreteAttributePath attrpath = ConcreteAttributePath(node_matter_endpoint, Clusters::BinaryInputBasic::Id, attribute_id.value()); - switch (attribute_id.value()) { // type is char_string @@ -1603,18 +1537,15 @@ PulseWidthModulationAttributeAccess::Read(const ConcreteReadAttributePath & aPat } ConcreteAttributePath atrpath = ConcreteAttributePath(aPath.mEndpointId, aPath.mClusterId, aPath.mAttributeId); - try { switch (aPath.mAttributeId) { - case MN::FeatureMap::Id: { // type is bitmap32 MN::FeatureMap::TypeInfo::Type value; UN::FeatureMap::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::ClusterRevision::Id: { // type is int16u MN::ClusterRevision::TypeInfo::Type value; UN::ClusterRevision::Get(atrpath, value); @@ -1651,8 +1582,7 @@ CHIP_ERROR PulseWidthModulationAttributeAccess::Write(const ConcreteDataAttribut nlohmann::json jsn; switch (aPath.mAttributeId) - { - } + {} if (!attribute_name.empty()) { @@ -1691,7 +1621,6 @@ void PulseWidthModulationAttributeAccess::reported_updated(const bridged_endpoin chip::EndpointId node_matter_endpoint = ep->matter_endpoint; ConcreteAttributePath attrpath = ConcreteAttributePath(node_matter_endpoint, Clusters::PulseWidthModulation::Id, attribute_id.value()); - switch (attribute_id.value()) { // type is bitmap32 @@ -1726,159 +1655,6 @@ void PulseWidthModulationAttributeAccess::reported_updated(const bridged_endpoin } } -CHIP_ERROR -ActionsAttributeAccess::Read(const ConcreteReadAttributePath & aPath, AttributeValueEncoder & aEncoder) -{ - namespace MN = chip::app::Clusters::Actions::Attributes; - namespace UN = unify::matter_bridge::Actions::Attributes; - if (aPath.mClusterId != Clusters::Actions::Id) - { - return CHIP_ERROR_INVALID_ARGUMENT; - } - - ConcreteAttributePath atrpath = ConcreteAttributePath(aPath.mEndpointId, aPath.mClusterId, aPath.mAttributeId); - - try - { - switch (aPath.mAttributeId) - { - - case MN::SetupURL::Id: { // type is long_char_string - MN::SetupURL::TypeInfo::Type value; - UN::SetupURL::Get(atrpath, value); - return aEncoder.Encode(value); - } - - case MN::FeatureMap::Id: { // type is bitmap32 - MN::FeatureMap::TypeInfo::Type value; - UN::FeatureMap::Get(atrpath, value); - return aEncoder.Encode(value); - } - - case MN::ClusterRevision::Id: { // type is int16u - MN::ClusterRevision::TypeInfo::Type value; - UN::ClusterRevision::Get(atrpath, value); - return aEncoder.Encode(value); - } - } - } catch (const std::out_of_range & e) - { - sl_log_info(LOG_TAG, - "The request attribute Path is not found in the attribute state " - "contanier, %s\n", - e.what()); - return CHIP_ERROR_NO_MESSAGE_HANDLER; - } - return CHIP_NO_ERROR; -} - -CHIP_ERROR ActionsAttributeAccess::Write(const ConcreteDataAttributePath & aPath, AttributeValueDecoder & aDecoder) -{ - using namespace chip::app::Clusters::Actions; - - if (aPath.mClusterId != Clusters::Actions::Id) - { - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto unify_node = m_node_state_monitor.bridged_endpoint(aPath.mEndpointId); - - if (!unify_node) - { - return CHIP_ERROR_NO_MESSAGE_HANDLER; - } - - std::string attribute_name; - nlohmann::json jsn; - - switch (aPath.mAttributeId) - { - } - - if (!attribute_name.empty()) - { - std::string payload_str; - std::string topic = "ucl/by-unid/" + unify_node->unify_unid + "/ep" + std::to_string(unify_node->unify_endpoint) + - "/Actions/Attributes/" + attribute_name + "/Desired"; - payload_str = jsn.dump(); - uic_mqtt_publish(topic.c_str(), payload_str.c_str(), payload_str.length(), true); - return CHIP_ERROR_NO_MESSAGE_HANDLER; - } - - return CHIP_NO_ERROR; -} - -void ActionsAttributeAccess::reported_updated(const bridged_endpoint * ep, const std::string & cluster, - const std::string & attribute, const nlohmann::json & unify_value) -{ - namespace MN = chip::app::Clusters::Actions::Attributes; - namespace UN = unify::matter_bridge::Actions::Attributes; - - auto cluster_id = device_translator::instance().get_cluster_id(cluster); - - if (!cluster_id.has_value() || (cluster_id.value() != Clusters::Actions::Id)) - { - return; - } - - // get attribute id - auto attribute_id = device_translator::instance().get_attribute_id(cluster, attribute); - - if (!attribute_id.has_value()) - { - return; - } - - chip::EndpointId node_matter_endpoint = ep->matter_endpoint; - ConcreteAttributePath attrpath = ConcreteAttributePath(node_matter_endpoint, Clusters::Actions::Id, attribute_id.value()); - - switch (attribute_id.value()) - { - // type is long_char_string - case MN::SetupURL::Id: { - using T = MN::SetupURL::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) - { - sl_log_debug(LOG_TAG, "SetupURL attribute value is %s", unify_value.dump().c_str()); - UN::SetupURL::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::Actions::Id, MN::SetupURL::Id, - ZCL_LONG_CHAR_STRING_ATTRIBUTE_TYPE, - reinterpret_cast(&value.value())); - } - break; - } - // type is bitmap32 - case MN::FeatureMap::Id: { - using T = MN::FeatureMap::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) - { - sl_log_debug(LOG_TAG, "FeatureMap attribute value is %s", unify_value.dump().c_str()); - UN::FeatureMap::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::Actions::Id, MN::FeatureMap::Id, - ZCL_BITMAP32_ATTRIBUTE_TYPE, reinterpret_cast(&value.value())); - } - break; - } - // type is int16u - case MN::ClusterRevision::Id: { - using T = MN::ClusterRevision::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) - { - sl_log_debug(LOG_TAG, "ClusterRevision attribute value is %s", unify_value.dump().c_str()); - UN::ClusterRevision::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::Actions::Id, MN::ClusterRevision::Id, - ZCL_INT16U_ATTRIBUTE_TYPE, reinterpret_cast(&value.value())); - } - break; - } - } -} - CHIP_ERROR BasicAttributeAccess::Read(const ConcreteReadAttributePath & aPath, AttributeValueEncoder & aEncoder) { @@ -1890,132 +1666,110 @@ BasicAttributeAccess::Read(const ConcreteReadAttributePath & aPath, AttributeVal } ConcreteAttributePath atrpath = ConcreteAttributePath(aPath.mEndpointId, aPath.mClusterId, aPath.mAttributeId); - try { switch (aPath.mAttributeId) { - case MN::DataModelRevision::Id: { // type is int16u MN::DataModelRevision::TypeInfo::Type value; UN::DataModelRevision::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::VendorName::Id: { // type is char_string MN::VendorName::TypeInfo::Type value; UN::VendorName::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::VendorID::Id: { // type is vendor_id MN::VendorID::TypeInfo::Type value; UN::VendorID::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::ProductName::Id: { // type is char_string MN::ProductName::TypeInfo::Type value; UN::ProductName::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::ProductID::Id: { // type is int16u MN::ProductID::TypeInfo::Type value; UN::ProductID::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::NodeLabel::Id: { // type is char_string MN::NodeLabel::TypeInfo::Type value; UN::NodeLabel::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::Location::Id: { // type is char_string MN::Location::TypeInfo::Type value; UN::Location::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::HardwareVersion::Id: { // type is int16u MN::HardwareVersion::TypeInfo::Type value; UN::HardwareVersion::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::HardwareVersionString::Id: { // type is char_string MN::HardwareVersionString::TypeInfo::Type value; UN::HardwareVersionString::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::SoftwareVersion::Id: { // type is int32u MN::SoftwareVersion::TypeInfo::Type value; UN::SoftwareVersion::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::SoftwareVersionString::Id: { // type is char_string MN::SoftwareVersionString::TypeInfo::Type value; UN::SoftwareVersionString::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::ManufacturingDate::Id: { // type is char_string MN::ManufacturingDate::TypeInfo::Type value; UN::ManufacturingDate::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::PartNumber::Id: { // type is char_string MN::PartNumber::TypeInfo::Type value; UN::PartNumber::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::ProductURL::Id: { // type is long_char_string MN::ProductURL::TypeInfo::Type value; UN::ProductURL::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::ProductLabel::Id: { // type is char_string MN::ProductLabel::TypeInfo::Type value; UN::ProductLabel::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::SerialNumber::Id: { // type is char_string MN::SerialNumber::TypeInfo::Type value; UN::SerialNumber::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::LocalConfigDisabled::Id: { // type is boolean MN::LocalConfigDisabled::TypeInfo::Type value; UN::LocalConfigDisabled::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::Reachable::Id: { // type is boolean MN::Reachable::TypeInfo::Type value; UN::Reachable::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::UniqueID::Id: { // type is char_string MN::UniqueID::TypeInfo::Type value; UN::UniqueID::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::FeatureMap::Id: { // type is bitmap32 MN::FeatureMap::TypeInfo::Type value; UN::FeatureMap::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::ClusterRevision::Id: { // type is int16u MN::ClusterRevision::TypeInfo::Type value; UN::ClusterRevision::Get(atrpath, value); @@ -2052,8 +1806,7 @@ CHIP_ERROR BasicAttributeAccess::Write(const ConcreteDataAttributePath & aPath, nlohmann::json jsn; switch (aPath.mAttributeId) - { - } + {} if (!attribute_name.empty()) { @@ -2091,7 +1844,6 @@ void BasicAttributeAccess::reported_updated(const bridged_endpoint * ep, const s chip::EndpointId node_matter_endpoint = ep->matter_endpoint; ConcreteAttributePath attrpath = ConcreteAttributePath(node_matter_endpoint, Clusters::Basic::Id, attribute_id.value()); - switch (attribute_id.value()) { // type is int16u @@ -2403,18 +2155,15 @@ OtaSoftwareUpdateProviderAttributeAccess::Read(const ConcreteReadAttributePath & } ConcreteAttributePath atrpath = ConcreteAttributePath(aPath.mEndpointId, aPath.mClusterId, aPath.mAttributeId); - try { switch (aPath.mAttributeId) { - case MN::FeatureMap::Id: { // type is bitmap32 MN::FeatureMap::TypeInfo::Type value; UN::FeatureMap::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::ClusterRevision::Id: { // type is int16u MN::ClusterRevision::TypeInfo::Type value; UN::ClusterRevision::Get(atrpath, value); @@ -2452,8 +2201,7 @@ CHIP_ERROR OtaSoftwareUpdateProviderAttributeAccess::Write(const ConcreteDataAtt nlohmann::json jsn; switch (aPath.mAttributeId) - { - } + {} if (!attribute_name.empty()) { @@ -2492,7 +2240,6 @@ void OtaSoftwareUpdateProviderAttributeAccess::reported_updated(const bridged_en chip::EndpointId node_matter_endpoint = ep->matter_endpoint; ConcreteAttributePath attrpath = ConcreteAttributePath(node_matter_endpoint, Clusters::OtaSoftwareUpdateProvider::Id, attribute_id.value()); - switch (attribute_id.value()) { // type is bitmap32 @@ -2539,36 +2286,30 @@ OtaSoftwareUpdateRequestorAttributeAccess::Read(const ConcreteReadAttributePath } ConcreteAttributePath atrpath = ConcreteAttributePath(aPath.mEndpointId, aPath.mClusterId, aPath.mAttributeId); - try { switch (aPath.mAttributeId) { - case MN::UpdatePossible::Id: { // type is boolean MN::UpdatePossible::TypeInfo::Type value; UN::UpdatePossible::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::UpdateState::Id: { // type is OTAUpdateStateEnum MN::UpdateState::TypeInfo::Type value; UN::UpdateState::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::UpdateStateProgress::Id: { // type is int8u MN::UpdateStateProgress::TypeInfo::Type value; UN::UpdateStateProgress::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::FeatureMap::Id: { // type is bitmap32 MN::FeatureMap::TypeInfo::Type value; UN::FeatureMap::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::ClusterRevision::Id: { // type is int16u MN::ClusterRevision::TypeInfo::Type value; UN::ClusterRevision::Get(atrpath, value); @@ -2606,8 +2347,7 @@ CHIP_ERROR OtaSoftwareUpdateRequestorAttributeAccess::Write(const ConcreteDataAt nlohmann::json jsn; switch (aPath.mAttributeId) - { - } + {} if (!attribute_name.empty()) { @@ -2646,7 +2386,6 @@ void OtaSoftwareUpdateRequestorAttributeAccess::reported_updated(const bridged_e chip::EndpointId node_matter_endpoint = ep->matter_endpoint; ConcreteAttributePath attrpath = ConcreteAttributePath(node_matter_endpoint, Clusters::OtaSoftwareUpdateRequestor::Id, attribute_id.value()); - switch (attribute_id.value()) { // type is boolean @@ -2738,24 +2477,20 @@ LocalizationConfigurationAttributeAccess::Read(const ConcreteReadAttributePath & } ConcreteAttributePath atrpath = ConcreteAttributePath(aPath.mEndpointId, aPath.mClusterId, aPath.mAttributeId); - try { switch (aPath.mAttributeId) { - case MN::ActiveLocale::Id: { // type is char_string MN::ActiveLocale::TypeInfo::Type value; UN::ActiveLocale::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::FeatureMap::Id: { // type is bitmap32 MN::FeatureMap::TypeInfo::Type value; UN::FeatureMap::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::ClusterRevision::Id: { // type is int16u MN::ClusterRevision::TypeInfo::Type value; UN::ClusterRevision::Get(atrpath, value); @@ -2793,8 +2528,7 @@ CHIP_ERROR LocalizationConfigurationAttributeAccess::Write(const ConcreteDataAtt nlohmann::json jsn; switch (aPath.mAttributeId) - { - } + {} if (!attribute_name.empty()) { @@ -2833,7 +2567,6 @@ void LocalizationConfigurationAttributeAccess::reported_updated(const bridged_en chip::EndpointId node_matter_endpoint = ep->matter_endpoint; ConcreteAttributePath attrpath = ConcreteAttributePath(node_matter_endpoint, Clusters::LocalizationConfiguration::Id, attribute_id.value()); - switch (attribute_id.value()) { // type is char_string @@ -2895,30 +2628,25 @@ TimeFormatLocalizationAttributeAccess::Read(const ConcreteReadAttributePath & aP } ConcreteAttributePath atrpath = ConcreteAttributePath(aPath.mEndpointId, aPath.mClusterId, aPath.mAttributeId); - try { switch (aPath.mAttributeId) { - case MN::HourFormat::Id: { // type is HourFormat MN::HourFormat::TypeInfo::Type value; UN::HourFormat::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::ActiveCalendarType::Id: { // type is CalendarType MN::ActiveCalendarType::TypeInfo::Type value; UN::ActiveCalendarType::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::FeatureMap::Id: { // type is bitmap32 MN::FeatureMap::TypeInfo::Type value; UN::FeatureMap::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::ClusterRevision::Id: { // type is int16u MN::ClusterRevision::TypeInfo::Type value; UN::ClusterRevision::Get(atrpath, value); @@ -2955,8 +2683,7 @@ CHIP_ERROR TimeFormatLocalizationAttributeAccess::Write(const ConcreteDataAttrib nlohmann::json jsn; switch (aPath.mAttributeId) - { - } + {} if (!attribute_name.empty()) { @@ -2995,7 +2722,6 @@ void TimeFormatLocalizationAttributeAccess::reported_updated(const bridged_endpo chip::EndpointId node_matter_endpoint = ep->matter_endpoint; ConcreteAttributePath attrpath = ConcreteAttributePath(node_matter_endpoint, Clusters::TimeFormatLocalization::Id, attribute_id.value()); - switch (attribute_id.value()) { // type is HourFormat @@ -3070,24 +2796,20 @@ UnitLocalizationAttributeAccess::Read(const ConcreteReadAttributePath & aPath, A } ConcreteAttributePath atrpath = ConcreteAttributePath(aPath.mEndpointId, aPath.mClusterId, aPath.mAttributeId); - try { switch (aPath.mAttributeId) { - case MN::TemperatureUnit::Id: { // type is TempUnit MN::TemperatureUnit::TypeInfo::Type value; UN::TemperatureUnit::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::FeatureMap::Id: { // type is bitmap32 MN::FeatureMap::TypeInfo::Type value; UN::FeatureMap::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::ClusterRevision::Id: { // type is int16u MN::ClusterRevision::TypeInfo::Type value; UN::ClusterRevision::Get(atrpath, value); @@ -3124,8 +2846,7 @@ CHIP_ERROR UnitLocalizationAttributeAccess::Write(const ConcreteDataAttributePat nlohmann::json jsn; switch (aPath.mAttributeId) - { - } + {} if (!attribute_name.empty()) { @@ -3164,7 +2885,6 @@ void UnitLocalizationAttributeAccess::reported_updated(const bridged_endpoint * chip::EndpointId node_matter_endpoint = ep->matter_endpoint; ConcreteAttributePath attrpath = ConcreteAttributePath(node_matter_endpoint, Clusters::UnitLocalization::Id, attribute_id.value()); - switch (attribute_id.value()) { // type is TempUnit @@ -3223,18 +2943,15 @@ PowerSourceConfigurationAttributeAccess::Read(const ConcreteReadAttributePath & } ConcreteAttributePath atrpath = ConcreteAttributePath(aPath.mEndpointId, aPath.mClusterId, aPath.mAttributeId); - try { switch (aPath.mAttributeId) { - case MN::FeatureMap::Id: { // type is bitmap32 MN::FeatureMap::TypeInfo::Type value; UN::FeatureMap::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::ClusterRevision::Id: { // type is int16u MN::ClusterRevision::TypeInfo::Type value; UN::ClusterRevision::Get(atrpath, value); @@ -3271,8 +2988,7 @@ CHIP_ERROR PowerSourceConfigurationAttributeAccess::Write(const ConcreteDataAttr nlohmann::json jsn; switch (aPath.mAttributeId) - { - } + {} if (!attribute_name.empty()) { @@ -3311,7 +3027,6 @@ void PowerSourceConfigurationAttributeAccess::reported_updated(const bridged_end chip::EndpointId node_matter_endpoint = ep->matter_endpoint; ConcreteAttributePath attrpath = ConcreteAttributePath(node_matter_endpoint, Clusters::PowerSourceConfiguration::Id, attribute_id.value()); - switch (attribute_id.value()) { // type is bitmap32 @@ -3357,186 +3072,155 @@ PowerSourceAttributeAccess::Read(const ConcreteReadAttributePath & aPath, Attrib } ConcreteAttributePath atrpath = ConcreteAttributePath(aPath.mEndpointId, aPath.mClusterId, aPath.mAttributeId); - try { switch (aPath.mAttributeId) { - case MN::Status::Id: { // type is PowerSourceStatus MN::Status::TypeInfo::Type value; UN::Status::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::Order::Id: { // type is int8u MN::Order::TypeInfo::Type value; UN::Order::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::Description::Id: { // type is char_string MN::Description::TypeInfo::Type value; UN::Description::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::WiredAssessedInputVoltage::Id: { // type is int32u MN::WiredAssessedInputVoltage::TypeInfo::Type value; UN::WiredAssessedInputVoltage::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::WiredAssessedInputFrequency::Id: { // type is int16u MN::WiredAssessedInputFrequency::TypeInfo::Type value; UN::WiredAssessedInputFrequency::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::WiredCurrentType::Id: { // type is WiredCurrentType MN::WiredCurrentType::TypeInfo::Type value; UN::WiredCurrentType::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::WiredAssessedCurrent::Id: { // type is int32u MN::WiredAssessedCurrent::TypeInfo::Type value; UN::WiredAssessedCurrent::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::WiredNominalVoltage::Id: { // type is int32u MN::WiredNominalVoltage::TypeInfo::Type value; UN::WiredNominalVoltage::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::WiredMaximumCurrent::Id: { // type is int32u MN::WiredMaximumCurrent::TypeInfo::Type value; UN::WiredMaximumCurrent::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::WiredPresent::Id: { // type is boolean MN::WiredPresent::TypeInfo::Type value; UN::WiredPresent::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::BatVoltage::Id: { // type is int32u MN::BatVoltage::TypeInfo::Type value; UN::BatVoltage::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::BatPercentRemaining::Id: { // type is int8u MN::BatPercentRemaining::TypeInfo::Type value; UN::BatPercentRemaining::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::BatTimeRemaining::Id: { // type is int32u MN::BatTimeRemaining::TypeInfo::Type value; UN::BatTimeRemaining::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::BatChargeLevel::Id: { // type is BatChargeLevel MN::BatChargeLevel::TypeInfo::Type value; UN::BatChargeLevel::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::BatReplacementNeeded::Id: { // type is boolean MN::BatReplacementNeeded::TypeInfo::Type value; UN::BatReplacementNeeded::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::BatReplaceability::Id: { // type is BatReplaceability MN::BatReplaceability::TypeInfo::Type value; UN::BatReplaceability::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::BatPresent::Id: { // type is boolean MN::BatPresent::TypeInfo::Type value; UN::BatPresent::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::BatReplacementDescription::Id: { // type is char_string MN::BatReplacementDescription::TypeInfo::Type value; UN::BatReplacementDescription::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::BatCommonDesignation::Id: { // type is int32u MN::BatCommonDesignation::TypeInfo::Type value; UN::BatCommonDesignation::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::BatANSIDesignation::Id: { // type is char_string MN::BatANSIDesignation::TypeInfo::Type value; UN::BatANSIDesignation::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::BatIECDesignation::Id: { // type is char_string MN::BatIECDesignation::TypeInfo::Type value; UN::BatIECDesignation::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::BatApprovedChemistry::Id: { // type is int32u MN::BatApprovedChemistry::TypeInfo::Type value; UN::BatApprovedChemistry::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::BatCapacity::Id: { // type is int32u MN::BatCapacity::TypeInfo::Type value; UN::BatCapacity::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::BatQuantity::Id: { // type is int8u MN::BatQuantity::TypeInfo::Type value; UN::BatQuantity::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::BatChargeState::Id: { // type is BatChargeState MN::BatChargeState::TypeInfo::Type value; UN::BatChargeState::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::BatTimeToFullCharge::Id: { // type is int32u MN::BatTimeToFullCharge::TypeInfo::Type value; UN::BatTimeToFullCharge::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::BatFunctionalWhileCharging::Id: { // type is boolean MN::BatFunctionalWhileCharging::TypeInfo::Type value; UN::BatFunctionalWhileCharging::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::BatChargingCurrent::Id: { // type is int32u MN::BatChargingCurrent::TypeInfo::Type value; UN::BatChargingCurrent::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::FeatureMap::Id: { // type is bitmap32 MN::FeatureMap::TypeInfo::Type value; UN::FeatureMap::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::ClusterRevision::Id: { // type is int16u MN::ClusterRevision::TypeInfo::Type value; UN::ClusterRevision::Get(atrpath, value); @@ -3573,8 +3257,7 @@ CHIP_ERROR PowerSourceAttributeAccess::Write(const ConcreteDataAttributePath & a nlohmann::json jsn; switch (aPath.mAttributeId) - { - } + {} if (!attribute_name.empty()) { @@ -3612,7 +3295,6 @@ void PowerSourceAttributeAccess::reported_updated(const bridged_endpoint * ep, c chip::EndpointId node_matter_endpoint = ep->matter_endpoint; ConcreteAttributePath attrpath = ConcreteAttributePath(node_matter_endpoint, Clusters::PowerSource::Id, attribute_id.value()); - switch (attribute_id.value()) { // type is PowerSourceStatus @@ -4053,42 +3735,35 @@ GeneralCommissioningAttributeAccess::Read(const ConcreteReadAttributePath & aPat } ConcreteAttributePath atrpath = ConcreteAttributePath(aPath.mEndpointId, aPath.mClusterId, aPath.mAttributeId); - try { switch (aPath.mAttributeId) { - case MN::Breadcrumb::Id: { // type is int64u MN::Breadcrumb::TypeInfo::Type value; UN::Breadcrumb::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::RegulatoryConfig::Id: { // type is RegulatoryLocationType MN::RegulatoryConfig::TypeInfo::Type value; UN::RegulatoryConfig::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::LocationCapability::Id: { // type is RegulatoryLocationType MN::LocationCapability::TypeInfo::Type value; UN::LocationCapability::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::SupportsConcurrentConnection::Id: { // type is boolean MN::SupportsConcurrentConnection::TypeInfo::Type value; UN::SupportsConcurrentConnection::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::FeatureMap::Id: { // type is bitmap32 MN::FeatureMap::TypeInfo::Type value; UN::FeatureMap::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::ClusterRevision::Id: { // type is int16u MN::ClusterRevision::TypeInfo::Type value; UN::ClusterRevision::Get(atrpath, value); @@ -4125,8 +3800,7 @@ CHIP_ERROR GeneralCommissioningAttributeAccess::Write(const ConcreteDataAttribut nlohmann::json jsn; switch (aPath.mAttributeId) - { - } + {} if (!attribute_name.empty()) { @@ -4165,7 +3839,6 @@ void GeneralCommissioningAttributeAccess::reported_updated(const bridged_endpoin chip::EndpointId node_matter_endpoint = ep->matter_endpoint; ConcreteAttributePath attrpath = ConcreteAttributePath(node_matter_endpoint, Clusters::GeneralCommissioning::Id, attribute_id.value()); - switch (attribute_id.value()) { // type is int64u @@ -4270,18 +3943,15 @@ DiagnosticLogsAttributeAccess::Read(const ConcreteReadAttributePath & aPath, Att } ConcreteAttributePath atrpath = ConcreteAttributePath(aPath.mEndpointId, aPath.mClusterId, aPath.mAttributeId); - try { switch (aPath.mAttributeId) { - case MN::FeatureMap::Id: { // type is bitmap32 MN::FeatureMap::TypeInfo::Type value; UN::FeatureMap::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::ClusterRevision::Id: { // type is int16u MN::ClusterRevision::TypeInfo::Type value; UN::ClusterRevision::Get(atrpath, value); @@ -4318,8 +3988,7 @@ CHIP_ERROR DiagnosticLogsAttributeAccess::Write(const ConcreteDataAttributePath nlohmann::json jsn; switch (aPath.mAttributeId) - { - } + {} if (!attribute_name.empty()) { @@ -4358,7 +4027,6 @@ void DiagnosticLogsAttributeAccess::reported_updated(const bridged_endpoint * ep chip::EndpointId node_matter_endpoint = ep->matter_endpoint; ConcreteAttributePath attrpath = ConcreteAttributePath(node_matter_endpoint, Clusters::DiagnosticLogs::Id, attribute_id.value()); - switch (attribute_id.value()) { // type is bitmap32 @@ -4403,48 +4071,40 @@ GeneralDiagnosticsAttributeAccess::Read(const ConcreteReadAttributePath & aPath, } ConcreteAttributePath atrpath = ConcreteAttributePath(aPath.mEndpointId, aPath.mClusterId, aPath.mAttributeId); - try { switch (aPath.mAttributeId) { - case MN::RebootCount::Id: { // type is int16u MN::RebootCount::TypeInfo::Type value; UN::RebootCount::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::UpTime::Id: { // type is int64u MN::UpTime::TypeInfo::Type value; UN::UpTime::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::TotalOperationalHours::Id: { // type is int32u MN::TotalOperationalHours::TypeInfo::Type value; UN::TotalOperationalHours::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::BootReasons::Id: { // type is enum8 MN::BootReasons::TypeInfo::Type value; UN::BootReasons::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::TestEventTriggersEnabled::Id: { // type is boolean MN::TestEventTriggersEnabled::TypeInfo::Type value; UN::TestEventTriggersEnabled::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::FeatureMap::Id: { // type is bitmap32 MN::FeatureMap::TypeInfo::Type value; UN::FeatureMap::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::ClusterRevision::Id: { // type is int16u MN::ClusterRevision::TypeInfo::Type value; UN::ClusterRevision::Get(atrpath, value); @@ -4481,8 +4141,7 @@ CHIP_ERROR GeneralDiagnosticsAttributeAccess::Write(const ConcreteDataAttributeP nlohmann::json jsn; switch (aPath.mAttributeId) - { - } + {} if (!attribute_name.empty()) { @@ -4521,7 +4180,6 @@ void GeneralDiagnosticsAttributeAccess::reported_updated(const bridged_endpoint chip::EndpointId node_matter_endpoint = ep->matter_endpoint; ConcreteAttributePath attrpath = ConcreteAttributePath(node_matter_endpoint, Clusters::GeneralDiagnostics::Id, attribute_id.value()); - switch (attribute_id.value()) { // type is int16u @@ -4638,36 +4296,30 @@ SoftwareDiagnosticsAttributeAccess::Read(const ConcreteReadAttributePath & aPath } ConcreteAttributePath atrpath = ConcreteAttributePath(aPath.mEndpointId, aPath.mClusterId, aPath.mAttributeId); - try { switch (aPath.mAttributeId) { - case MN::CurrentHeapFree::Id: { // type is int64u MN::CurrentHeapFree::TypeInfo::Type value; UN::CurrentHeapFree::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::CurrentHeapUsed::Id: { // type is int64u MN::CurrentHeapUsed::TypeInfo::Type value; UN::CurrentHeapUsed::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::CurrentHeapHighWatermark::Id: { // type is int64u MN::CurrentHeapHighWatermark::TypeInfo::Type value; UN::CurrentHeapHighWatermark::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::FeatureMap::Id: { // type is bitmap32 MN::FeatureMap::TypeInfo::Type value; UN::FeatureMap::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::ClusterRevision::Id: { // type is int16u MN::ClusterRevision::TypeInfo::Type value; UN::ClusterRevision::Get(atrpath, value); @@ -4704,8 +4356,7 @@ CHIP_ERROR SoftwareDiagnosticsAttributeAccess::Write(const ConcreteDataAttribute nlohmann::json jsn; switch (aPath.mAttributeId) - { - } + {} if (!attribute_name.empty()) { @@ -4744,7 +4395,6 @@ void SoftwareDiagnosticsAttributeAccess::reported_updated(const bridged_endpoint chip::EndpointId node_matter_endpoint = ep->matter_endpoint; ConcreteAttributePath attrpath = ConcreteAttributePath(node_matter_endpoint, Clusters::SoftwareDiagnostics::Id, attribute_id.value()); - switch (attribute_id.value()) { // type is int64u @@ -4832,366 +4482,305 @@ ThreadNetworkDiagnosticsAttributeAccess::Read(const ConcreteReadAttributePath & } ConcreteAttributePath atrpath = ConcreteAttributePath(aPath.mEndpointId, aPath.mClusterId, aPath.mAttributeId); - try { switch (aPath.mAttributeId) { - case MN::Channel::Id: { // type is int16u MN::Channel::TypeInfo::Type value; UN::Channel::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::RoutingRole::Id: { // type is RoutingRole MN::RoutingRole::TypeInfo::Type value; UN::RoutingRole::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::NetworkName::Id: { // type is char_string MN::NetworkName::TypeInfo::Type value; UN::NetworkName::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::PanId::Id: { // type is int16u MN::PanId::TypeInfo::Type value; UN::PanId::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::ExtendedPanId::Id: { // type is int64u MN::ExtendedPanId::TypeInfo::Type value; UN::ExtendedPanId::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::MeshLocalPrefix::Id: { // type is octet_string MN::MeshLocalPrefix::TypeInfo::Type value; UN::MeshLocalPrefix::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::OverrunCount::Id: { // type is int64u MN::OverrunCount::TypeInfo::Type value; UN::OverrunCount::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::PartitionId::Id: { // type is int32u MN::PartitionId::TypeInfo::Type value; UN::PartitionId::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::Weighting::Id: { // type is int8u MN::Weighting::TypeInfo::Type value; UN::Weighting::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::DataVersion::Id: { // type is int8u MN::DataVersion::TypeInfo::Type value; UN::DataVersion::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::StableDataVersion::Id: { // type is int8u MN::StableDataVersion::TypeInfo::Type value; UN::StableDataVersion::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::LeaderRouterId::Id: { // type is int8u MN::LeaderRouterId::TypeInfo::Type value; UN::LeaderRouterId::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::DetachedRoleCount::Id: { // type is int16u MN::DetachedRoleCount::TypeInfo::Type value; UN::DetachedRoleCount::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::ChildRoleCount::Id: { // type is int16u MN::ChildRoleCount::TypeInfo::Type value; UN::ChildRoleCount::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::RouterRoleCount::Id: { // type is int16u MN::RouterRoleCount::TypeInfo::Type value; UN::RouterRoleCount::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::LeaderRoleCount::Id: { // type is int16u MN::LeaderRoleCount::TypeInfo::Type value; UN::LeaderRoleCount::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::AttachAttemptCount::Id: { // type is int16u MN::AttachAttemptCount::TypeInfo::Type value; UN::AttachAttemptCount::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::PartitionIdChangeCount::Id: { // type is int16u MN::PartitionIdChangeCount::TypeInfo::Type value; UN::PartitionIdChangeCount::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::BetterPartitionAttachAttemptCount::Id: { // type is int16u MN::BetterPartitionAttachAttemptCount::TypeInfo::Type value; UN::BetterPartitionAttachAttemptCount::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::ParentChangeCount::Id: { // type is int16u MN::ParentChangeCount::TypeInfo::Type value; UN::ParentChangeCount::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::TxTotalCount::Id: { // type is int32u MN::TxTotalCount::TypeInfo::Type value; UN::TxTotalCount::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::TxUnicastCount::Id: { // type is int32u MN::TxUnicastCount::TypeInfo::Type value; UN::TxUnicastCount::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::TxBroadcastCount::Id: { // type is int32u MN::TxBroadcastCount::TypeInfo::Type value; UN::TxBroadcastCount::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::TxAckRequestedCount::Id: { // type is int32u MN::TxAckRequestedCount::TypeInfo::Type value; UN::TxAckRequestedCount::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::TxAckedCount::Id: { // type is int32u MN::TxAckedCount::TypeInfo::Type value; UN::TxAckedCount::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::TxNoAckRequestedCount::Id: { // type is int32u MN::TxNoAckRequestedCount::TypeInfo::Type value; UN::TxNoAckRequestedCount::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::TxDataCount::Id: { // type is int32u MN::TxDataCount::TypeInfo::Type value; UN::TxDataCount::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::TxDataPollCount::Id: { // type is int32u MN::TxDataPollCount::TypeInfo::Type value; UN::TxDataPollCount::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::TxBeaconCount::Id: { // type is int32u MN::TxBeaconCount::TypeInfo::Type value; UN::TxBeaconCount::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::TxBeaconRequestCount::Id: { // type is int32u MN::TxBeaconRequestCount::TypeInfo::Type value; UN::TxBeaconRequestCount::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::TxOtherCount::Id: { // type is int32u MN::TxOtherCount::TypeInfo::Type value; UN::TxOtherCount::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::TxRetryCount::Id: { // type is int32u MN::TxRetryCount::TypeInfo::Type value; UN::TxRetryCount::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::TxDirectMaxRetryExpiryCount::Id: { // type is int32u MN::TxDirectMaxRetryExpiryCount::TypeInfo::Type value; UN::TxDirectMaxRetryExpiryCount::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::TxIndirectMaxRetryExpiryCount::Id: { // type is int32u MN::TxIndirectMaxRetryExpiryCount::TypeInfo::Type value; UN::TxIndirectMaxRetryExpiryCount::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::TxErrCcaCount::Id: { // type is int32u MN::TxErrCcaCount::TypeInfo::Type value; UN::TxErrCcaCount::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::TxErrAbortCount::Id: { // type is int32u MN::TxErrAbortCount::TypeInfo::Type value; UN::TxErrAbortCount::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::TxErrBusyChannelCount::Id: { // type is int32u MN::TxErrBusyChannelCount::TypeInfo::Type value; UN::TxErrBusyChannelCount::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::RxTotalCount::Id: { // type is int32u MN::RxTotalCount::TypeInfo::Type value; UN::RxTotalCount::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::RxUnicastCount::Id: { // type is int32u MN::RxUnicastCount::TypeInfo::Type value; UN::RxUnicastCount::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::RxBroadcastCount::Id: { // type is int32u MN::RxBroadcastCount::TypeInfo::Type value; UN::RxBroadcastCount::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::RxDataCount::Id: { // type is int32u MN::RxDataCount::TypeInfo::Type value; UN::RxDataCount::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::RxDataPollCount::Id: { // type is int32u MN::RxDataPollCount::TypeInfo::Type value; UN::RxDataPollCount::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::RxBeaconCount::Id: { // type is int32u MN::RxBeaconCount::TypeInfo::Type value; UN::RxBeaconCount::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::RxBeaconRequestCount::Id: { // type is int32u MN::RxBeaconRequestCount::TypeInfo::Type value; UN::RxBeaconRequestCount::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::RxOtherCount::Id: { // type is int32u MN::RxOtherCount::TypeInfo::Type value; UN::RxOtherCount::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::RxAddressFilteredCount::Id: { // type is int32u MN::RxAddressFilteredCount::TypeInfo::Type value; UN::RxAddressFilteredCount::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::RxDestAddrFilteredCount::Id: { // type is int32u MN::RxDestAddrFilteredCount::TypeInfo::Type value; UN::RxDestAddrFilteredCount::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::RxDuplicatedCount::Id: { // type is int32u MN::RxDuplicatedCount::TypeInfo::Type value; UN::RxDuplicatedCount::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::RxErrNoFrameCount::Id: { // type is int32u MN::RxErrNoFrameCount::TypeInfo::Type value; UN::RxErrNoFrameCount::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::RxErrUnknownNeighborCount::Id: { // type is int32u MN::RxErrUnknownNeighborCount::TypeInfo::Type value; UN::RxErrUnknownNeighborCount::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::RxErrInvalidSrcAddrCount::Id: { // type is int32u MN::RxErrInvalidSrcAddrCount::TypeInfo::Type value; UN::RxErrInvalidSrcAddrCount::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::RxErrSecCount::Id: { // type is int32u MN::RxErrSecCount::TypeInfo::Type value; UN::RxErrSecCount::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::RxErrFcsCount::Id: { // type is int32u MN::RxErrFcsCount::TypeInfo::Type value; UN::RxErrFcsCount::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::RxErrOtherCount::Id: { // type is int32u MN::RxErrOtherCount::TypeInfo::Type value; UN::RxErrOtherCount::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::ActiveTimestamp::Id: { // type is int64u MN::ActiveTimestamp::TypeInfo::Type value; UN::ActiveTimestamp::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::PendingTimestamp::Id: { // type is int64u MN::PendingTimestamp::TypeInfo::Type value; UN::PendingTimestamp::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::Delay::Id: { // type is int32u MN::Delay::TypeInfo::Type value; UN::Delay::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::ChannelPage0Mask::Id: { // type is octet_string MN::ChannelPage0Mask::TypeInfo::Type value; UN::ChannelPage0Mask::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::FeatureMap::Id: { // type is bitmap32 MN::FeatureMap::TypeInfo::Type value; UN::FeatureMap::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::ClusterRevision::Id: { // type is int16u MN::ClusterRevision::TypeInfo::Type value; UN::ClusterRevision::Get(atrpath, value); @@ -5228,8 +4817,7 @@ CHIP_ERROR ThreadNetworkDiagnosticsAttributeAccess::Write(const ConcreteDataAttr nlohmann::json jsn; switch (aPath.mAttributeId) - { - } + {} if (!attribute_name.empty()) { @@ -5268,7 +4856,6 @@ void ThreadNetworkDiagnosticsAttributeAccess::reported_updated(const bridged_end chip::EndpointId node_matter_endpoint = ep->matter_endpoint; ConcreteAttributePath attrpath = ConcreteAttributePath(node_matter_endpoint, Clusters::ThreadNetworkDiagnostics::Id, attribute_id.value()); - switch (attribute_id.value()) { // type is int16u @@ -6180,96 +5767,80 @@ WiFiNetworkDiagnosticsAttributeAccess::Read(const ConcreteReadAttributePath & aP } ConcreteAttributePath atrpath = ConcreteAttributePath(aPath.mEndpointId, aPath.mClusterId, aPath.mAttributeId); - try { switch (aPath.mAttributeId) { - case MN::Bssid::Id: { // type is octet_string MN::Bssid::TypeInfo::Type value; UN::Bssid::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::SecurityType::Id: { // type is SecurityType MN::SecurityType::TypeInfo::Type value; UN::SecurityType::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::WiFiVersion::Id: { // type is WiFiVersionType MN::WiFiVersion::TypeInfo::Type value; UN::WiFiVersion::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::ChannelNumber::Id: { // type is int16u MN::ChannelNumber::TypeInfo::Type value; UN::ChannelNumber::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::Rssi::Id: { // type is int8s MN::Rssi::TypeInfo::Type value; UN::Rssi::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::BeaconLostCount::Id: { // type is int32u MN::BeaconLostCount::TypeInfo::Type value; UN::BeaconLostCount::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::BeaconRxCount::Id: { // type is int32u MN::BeaconRxCount::TypeInfo::Type value; UN::BeaconRxCount::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::PacketMulticastRxCount::Id: { // type is int32u MN::PacketMulticastRxCount::TypeInfo::Type value; UN::PacketMulticastRxCount::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::PacketMulticastTxCount::Id: { // type is int32u MN::PacketMulticastTxCount::TypeInfo::Type value; UN::PacketMulticastTxCount::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::PacketUnicastRxCount::Id: { // type is int32u MN::PacketUnicastRxCount::TypeInfo::Type value; UN::PacketUnicastRxCount::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::PacketUnicastTxCount::Id: { // type is int32u MN::PacketUnicastTxCount::TypeInfo::Type value; UN::PacketUnicastTxCount::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::CurrentMaxRate::Id: { // type is int64u MN::CurrentMaxRate::TypeInfo::Type value; UN::CurrentMaxRate::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::OverrunCount::Id: { // type is int64u MN::OverrunCount::TypeInfo::Type value; UN::OverrunCount::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::FeatureMap::Id: { // type is bitmap32 MN::FeatureMap::TypeInfo::Type value; UN::FeatureMap::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::ClusterRevision::Id: { // type is int16u MN::ClusterRevision::TypeInfo::Type value; UN::ClusterRevision::Get(atrpath, value); @@ -6306,8 +5877,7 @@ CHIP_ERROR WiFiNetworkDiagnosticsAttributeAccess::Write(const ConcreteDataAttrib nlohmann::json jsn; switch (aPath.mAttributeId) - { - } + {} if (!attribute_name.empty()) { @@ -6346,7 +5916,6 @@ void WiFiNetworkDiagnosticsAttributeAccess::reported_updated(const bridged_endpo chip::EndpointId node_matter_endpoint = ep->matter_endpoint; ConcreteAttributePath attrpath = ConcreteAttributePath(node_matter_endpoint, Clusters::WiFiNetworkDiagnostics::Id, attribute_id.value()); - switch (attribute_id.value()) { // type is octet_string @@ -6572,82 +6141,65 @@ void WiFiNetworkDiagnosticsAttributeAccess::reported_updated(const bridged_endpo } CHIP_ERROR -EthernetNetworkDiagnosticsAttributeAccess::Read(const ConcreteReadAttributePath & aPath, AttributeValueEncoder & aEncoder) +TimeSynchronizationAttributeAccess::Read(const ConcreteReadAttributePath & aPath, AttributeValueEncoder & aEncoder) { - namespace MN = chip::app::Clusters::EthernetNetworkDiagnostics::Attributes; - namespace UN = unify::matter_bridge::EthernetNetworkDiagnostics::Attributes; - if (aPath.mClusterId != Clusters::EthernetNetworkDiagnostics::Id) + namespace MN = chip::app::Clusters::TimeSynchronization::Attributes; + namespace UN = unify::matter_bridge::TimeSynchronization::Attributes; + if (aPath.mClusterId != Clusters::TimeSynchronization::Id) { return CHIP_ERROR_INVALID_ARGUMENT; } ConcreteAttributePath atrpath = ConcreteAttributePath(aPath.mEndpointId, aPath.mClusterId, aPath.mAttributeId); - try { switch (aPath.mAttributeId) { - - case MN::PHYRate::Id: { // type is PHYRateType - MN::PHYRate::TypeInfo::Type value; - UN::PHYRate::Get(atrpath, value); - return aEncoder.Encode(value); - } - - case MN::FullDuplex::Id: { // type is boolean - MN::FullDuplex::TypeInfo::Type value; - UN::FullDuplex::Get(atrpath, value); + case MN::UTCTime::Id: { // type is epoch_us + MN::UTCTime::TypeInfo::Type value; + UN::UTCTime::Get(atrpath, value); return aEncoder.Encode(value); } - - case MN::PacketRxCount::Id: { // type is int64u - MN::PacketRxCount::TypeInfo::Type value; - UN::PacketRxCount::Get(atrpath, value); + case MN::Granularity::Id: { // type is GranularityEnum + MN::Granularity::TypeInfo::Type value; + UN::Granularity::Get(atrpath, value); return aEncoder.Encode(value); } - - case MN::PacketTxCount::Id: { // type is int64u - MN::PacketTxCount::TypeInfo::Type value; - UN::PacketTxCount::Get(atrpath, value); + case MN::TimeSource::Id: { // type is TimeSourceEnum + MN::TimeSource::TypeInfo::Type value; + UN::TimeSource::Get(atrpath, value); return aEncoder.Encode(value); } - - case MN::TxErrCount::Id: { // type is int64u - MN::TxErrCount::TypeInfo::Type value; - UN::TxErrCount::Get(atrpath, value); + case MN::TrustedTimeNodeId::Id: { // type is node_id + MN::TrustedTimeNodeId::TypeInfo::Type value; + UN::TrustedTimeNodeId::Get(atrpath, value); return aEncoder.Encode(value); } - - case MN::CollisionCount::Id: { // type is int64u - MN::CollisionCount::TypeInfo::Type value; - UN::CollisionCount::Get(atrpath, value); + case MN::DefaultNtp::Id: { // type is char_string + MN::DefaultNtp::TypeInfo::Type value; + UN::DefaultNtp::Get(atrpath, value); return aEncoder.Encode(value); } - - case MN::OverrunCount::Id: { // type is int64u - MN::OverrunCount::TypeInfo::Type value; - UN::OverrunCount::Get(atrpath, value); + case MN::LocalTime::Id: { // type is epoch_us + MN::LocalTime::TypeInfo::Type value; + UN::LocalTime::Get(atrpath, value); return aEncoder.Encode(value); } - - case MN::CarrierDetect::Id: { // type is boolean - MN::CarrierDetect::TypeInfo::Type value; - UN::CarrierDetect::Get(atrpath, value); + case MN::TimeZoneDatabase::Id: { // type is boolean + MN::TimeZoneDatabase::TypeInfo::Type value; + UN::TimeZoneDatabase::Get(atrpath, value); return aEncoder.Encode(value); } - - case MN::TimeSinceReset::Id: { // type is int64u - MN::TimeSinceReset::TypeInfo::Type value; - UN::TimeSinceReset::Get(atrpath, value); + case MN::NtpServerPort::Id: { // type is int16u + MN::NtpServerPort::TypeInfo::Type value; + UN::NtpServerPort::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::FeatureMap::Id: { // type is bitmap32 MN::FeatureMap::TypeInfo::Type value; UN::FeatureMap::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::ClusterRevision::Id: { // type is int16u MN::ClusterRevision::TypeInfo::Type value; UN::ClusterRevision::Get(atrpath, value); @@ -6665,12 +6217,11 @@ EthernetNetworkDiagnosticsAttributeAccess::Read(const ConcreteReadAttributePath return CHIP_NO_ERROR; } -CHIP_ERROR EthernetNetworkDiagnosticsAttributeAccess::Write(const ConcreteDataAttributePath & aPath, - AttributeValueDecoder & aDecoder) +CHIP_ERROR TimeSynchronizationAttributeAccess::Write(const ConcreteDataAttributePath & aPath, AttributeValueDecoder & aDecoder) { - using namespace chip::app::Clusters::EthernetNetworkDiagnostics; + using namespace chip::app::Clusters::TimeSynchronization; - if (aPath.mClusterId != Clusters::EthernetNetworkDiagnostics::Id) + if (aPath.mClusterId != Clusters::TimeSynchronization::Id) { return CHIP_ERROR_INVALID_ARGUMENT; } @@ -6685,14 +6236,13 @@ CHIP_ERROR EthernetNetworkDiagnosticsAttributeAccess::Write(const ConcreteDataAt nlohmann::json jsn; switch (aPath.mAttributeId) - { - } + {} if (!attribute_name.empty()) { std::string payload_str; std::string topic = "ucl/by-unid/" + unify_node->unify_unid + "/ep" + std::to_string(unify_node->unify_endpoint) + - "/EthernetNetworkDiagnostics/Attributes/" + attribute_name + "/Desired"; + "/TimeSynchronization/Attributes/" + attribute_name + "/Desired"; payload_str = jsn.dump(); uic_mqtt_publish(topic.c_str(), payload_str.c_str(), payload_str.length(), true); return CHIP_ERROR_NO_MESSAGE_HANDLER; @@ -6701,15 +6251,15 @@ CHIP_ERROR EthernetNetworkDiagnosticsAttributeAccess::Write(const ConcreteDataAt return CHIP_NO_ERROR; } -void EthernetNetworkDiagnosticsAttributeAccess::reported_updated(const bridged_endpoint * ep, const std::string & cluster, - const std::string & attribute, const nlohmann::json & unify_value) +void TimeSynchronizationAttributeAccess::reported_updated(const bridged_endpoint * ep, const std::string & cluster, + const std::string & attribute, const nlohmann::json & unify_value) { - namespace MN = chip::app::Clusters::EthernetNetworkDiagnostics::Attributes; - namespace UN = unify::matter_bridge::EthernetNetworkDiagnostics::Attributes; + namespace MN = chip::app::Clusters::TimeSynchronization::Attributes; + namespace UN = unify::matter_bridge::TimeSynchronization::Attributes; auto cluster_id = device_translator::instance().get_cluster_id(cluster); - if (!cluster_id.has_value() || (cluster_id.value() != Clusters::EthernetNetworkDiagnostics::Id)) + if (!cluster_id.has_value() || (cluster_id.value() != Clusters::TimeSynchronization::Id)) { return; } @@ -6724,141 +6274,120 @@ void EthernetNetworkDiagnosticsAttributeAccess::reported_updated(const bridged_e chip::EndpointId node_matter_endpoint = ep->matter_endpoint; ConcreteAttributePath attrpath = - ConcreteAttributePath(node_matter_endpoint, Clusters::EthernetNetworkDiagnostics::Id, attribute_id.value()); - + ConcreteAttributePath(node_matter_endpoint, Clusters::TimeSynchronization::Id, attribute_id.value()); switch (attribute_id.value()) { - // type is PHYRateType - case MN::PHYRate::Id: { - using T = MN::PHYRate::TypeInfo::Type; + // type is epoch_us + case MN::UTCTime::Id: { + using T = MN::UTCTime::TypeInfo::Type; std::optional value = from_json(unify_value); if (value.has_value()) { - sl_log_debug(LOG_TAG, "PHYRate attribute value is %s", unify_value.dump().c_str()); - UN::PHYRate::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::EthernetNetworkDiagnostics::Id, MN::PHYRate::Id, - ZCL_ENUM8_ATTRIBUTE_TYPE, reinterpret_cast(&value.value())); + sl_log_debug(LOG_TAG, "UTCTime attribute value is %s", unify_value.dump().c_str()); + UN::UTCTime::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::TimeSynchronization::Id, MN::UTCTime::Id, + ZCL_EPOCH_US_ATTRIBUTE_TYPE, reinterpret_cast(&value.value())); } break; } - // type is boolean - case MN::FullDuplex::Id: { - using T = MN::FullDuplex::TypeInfo::Type; + // type is GranularityEnum + case MN::Granularity::Id: { + using T = MN::Granularity::TypeInfo::Type; std::optional value = from_json(unify_value); if (value.has_value()) { - sl_log_debug(LOG_TAG, "FullDuplex attribute value is %s", unify_value.dump().c_str()); - UN::FullDuplex::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::EthernetNetworkDiagnostics::Id, - MN::FullDuplex::Id, ZCL_BOOLEAN_ATTRIBUTE_TYPE, - reinterpret_cast(&value.value())); + sl_log_debug(LOG_TAG, "Granularity attribute value is %s", unify_value.dump().c_str()); + UN::Granularity::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::TimeSynchronization::Id, MN::Granularity::Id, + ZCL_ENUM8_ATTRIBUTE_TYPE, reinterpret_cast(&value.value())); } break; } - // type is int64u - case MN::PacketRxCount::Id: { - using T = MN::PacketRxCount::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) - { - sl_log_debug(LOG_TAG, "PacketRxCount attribute value is %s", unify_value.dump().c_str()); - UN::PacketRxCount::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::EthernetNetworkDiagnostics::Id, - MN::PacketRxCount::Id, ZCL_INT64U_ATTRIBUTE_TYPE, - reinterpret_cast(&value.value())); - } - break; - } - // type is int64u - case MN::PacketTxCount::Id: { - using T = MN::PacketTxCount::TypeInfo::Type; + // type is TimeSourceEnum + case MN::TimeSource::Id: { + using T = MN::TimeSource::TypeInfo::Type; std::optional value = from_json(unify_value); if (value.has_value()) { - sl_log_debug(LOG_TAG, "PacketTxCount attribute value is %s", unify_value.dump().c_str()); - UN::PacketTxCount::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::EthernetNetworkDiagnostics::Id, - MN::PacketTxCount::Id, ZCL_INT64U_ATTRIBUTE_TYPE, - reinterpret_cast(&value.value())); + sl_log_debug(LOG_TAG, "TimeSource attribute value is %s", unify_value.dump().c_str()); + UN::TimeSource::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::TimeSynchronization::Id, MN::TimeSource::Id, + ZCL_ENUM8_ATTRIBUTE_TYPE, reinterpret_cast(&value.value())); } break; } - // type is int64u - case MN::TxErrCount::Id: { - using T = MN::TxErrCount::TypeInfo::Type; + // type is node_id + case MN::TrustedTimeNodeId::Id: { + using T = MN::TrustedTimeNodeId::TypeInfo::Type; std::optional value = from_json(unify_value); if (value.has_value()) { - sl_log_debug(LOG_TAG, "TxErrCount attribute value is %s", unify_value.dump().c_str()); - UN::TxErrCount::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::EthernetNetworkDiagnostics::Id, - MN::TxErrCount::Id, ZCL_INT64U_ATTRIBUTE_TYPE, + sl_log_debug(LOG_TAG, "TrustedTimeNodeId attribute value is %s", unify_value.dump().c_str()); + UN::TrustedTimeNodeId::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::TimeSynchronization::Id, + MN::TrustedTimeNodeId::Id, ZCL_NODE_ID_ATTRIBUTE_TYPE, reinterpret_cast(&value.value())); } break; } - // type is int64u - case MN::CollisionCount::Id: { - using T = MN::CollisionCount::TypeInfo::Type; + // type is char_string + case MN::DefaultNtp::Id: { + using T = MN::DefaultNtp::TypeInfo::Type; std::optional value = from_json(unify_value); if (value.has_value()) { - sl_log_debug(LOG_TAG, "CollisionCount attribute value is %s", unify_value.dump().c_str()); - UN::CollisionCount::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::EthernetNetworkDiagnostics::Id, - MN::CollisionCount::Id, ZCL_INT64U_ATTRIBUTE_TYPE, - reinterpret_cast(&value.value())); + sl_log_debug(LOG_TAG, "DefaultNtp attribute value is %s", unify_value.dump().c_str()); + UN::DefaultNtp::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::TimeSynchronization::Id, MN::DefaultNtp::Id, + ZCL_CHAR_STRING_ATTRIBUTE_TYPE, reinterpret_cast(&value.value())); } break; } - // type is int64u - case MN::OverrunCount::Id: { - using T = MN::OverrunCount::TypeInfo::Type; + // type is epoch_us + case MN::LocalTime::Id: { + using T = MN::LocalTime::TypeInfo::Type; std::optional value = from_json(unify_value); if (value.has_value()) { - sl_log_debug(LOG_TAG, "OverrunCount attribute value is %s", unify_value.dump().c_str()); - UN::OverrunCount::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::EthernetNetworkDiagnostics::Id, - MN::OverrunCount::Id, ZCL_INT64U_ATTRIBUTE_TYPE, - reinterpret_cast(&value.value())); + sl_log_debug(LOG_TAG, "LocalTime attribute value is %s", unify_value.dump().c_str()); + UN::LocalTime::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::TimeSynchronization::Id, MN::LocalTime::Id, + ZCL_EPOCH_US_ATTRIBUTE_TYPE, reinterpret_cast(&value.value())); } break; } // type is boolean - case MN::CarrierDetect::Id: { - using T = MN::CarrierDetect::TypeInfo::Type; + case MN::TimeZoneDatabase::Id: { + using T = MN::TimeZoneDatabase::TypeInfo::Type; std::optional value = from_json(unify_value); if (value.has_value()) { - sl_log_debug(LOG_TAG, "CarrierDetect attribute value is %s", unify_value.dump().c_str()); - UN::CarrierDetect::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::EthernetNetworkDiagnostics::Id, - MN::CarrierDetect::Id, ZCL_BOOLEAN_ATTRIBUTE_TYPE, + sl_log_debug(LOG_TAG, "TimeZoneDatabase attribute value is %s", unify_value.dump().c_str()); + UN::TimeZoneDatabase::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::TimeSynchronization::Id, + MN::TimeZoneDatabase::Id, ZCL_BOOLEAN_ATTRIBUTE_TYPE, reinterpret_cast(&value.value())); } break; } - // type is int64u - case MN::TimeSinceReset::Id: { - using T = MN::TimeSinceReset::TypeInfo::Type; + // type is int16u + case MN::NtpServerPort::Id: { + using T = MN::NtpServerPort::TypeInfo::Type; std::optional value = from_json(unify_value); if (value.has_value()) { - sl_log_debug(LOG_TAG, "TimeSinceReset attribute value is %s", unify_value.dump().c_str()); - UN::TimeSinceReset::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::EthernetNetworkDiagnostics::Id, - MN::TimeSinceReset::Id, ZCL_INT64U_ATTRIBUTE_TYPE, - reinterpret_cast(&value.value())); + sl_log_debug(LOG_TAG, "NtpServerPort attribute value is %s", unify_value.dump().c_str()); + UN::NtpServerPort::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::TimeSynchronization::Id, MN::NtpServerPort::Id, + ZCL_INT16U_ATTRIBUTE_TYPE, reinterpret_cast(&value.value())); } break; } @@ -6871,9 +6400,8 @@ void EthernetNetworkDiagnosticsAttributeAccess::reported_updated(const bridged_e { sl_log_debug(LOG_TAG, "FeatureMap attribute value is %s", unify_value.dump().c_str()); UN::FeatureMap::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::EthernetNetworkDiagnostics::Id, - MN::FeatureMap::Id, ZCL_BITMAP32_ATTRIBUTE_TYPE, - reinterpret_cast(&value.value())); + MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::TimeSynchronization::Id, MN::FeatureMap::Id, + ZCL_BITMAP32_ATTRIBUTE_TYPE, reinterpret_cast(&value.value())); } break; } @@ -6886,9 +6414,8 @@ void EthernetNetworkDiagnosticsAttributeAccess::reported_updated(const bridged_e { sl_log_debug(LOG_TAG, "ClusterRevision attribute value is %s", unify_value.dump().c_str()); UN::ClusterRevision::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::EthernetNetworkDiagnostics::Id, - MN::ClusterRevision::Id, ZCL_INT16U_ATTRIBUTE_TYPE, - reinterpret_cast(&value.value())); + MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::TimeSynchronization::Id, MN::ClusterRevision::Id, + ZCL_INT16U_ATTRIBUTE_TYPE, reinterpret_cast(&value.value())); } break; } @@ -6896,76 +6423,40 @@ void EthernetNetworkDiagnosticsAttributeAccess::reported_updated(const bridged_e } CHIP_ERROR -TimeSynchronizationAttributeAccess::Read(const ConcreteReadAttributePath & aPath, AttributeValueEncoder & aEncoder) +SwitchAttributeAccess::Read(const ConcreteReadAttributePath & aPath, AttributeValueEncoder & aEncoder) { - namespace MN = chip::app::Clusters::TimeSynchronization::Attributes; - namespace UN = unify::matter_bridge::TimeSynchronization::Attributes; - if (aPath.mClusterId != Clusters::TimeSynchronization::Id) + namespace MN = chip::app::Clusters::Switch::Attributes; + namespace UN = unify::matter_bridge::Switch::Attributes; + if (aPath.mClusterId != Clusters::Switch::Id) { return CHIP_ERROR_INVALID_ARGUMENT; } ConcreteAttributePath atrpath = ConcreteAttributePath(aPath.mEndpointId, aPath.mClusterId, aPath.mAttributeId); - try { switch (aPath.mAttributeId) { - - case MN::UTCTime::Id: { // type is epoch_us - MN::UTCTime::TypeInfo::Type value; - UN::UTCTime::Get(atrpath, value); - return aEncoder.Encode(value); - } - - case MN::Granularity::Id: { // type is GranularityEnum - MN::Granularity::TypeInfo::Type value; - UN::Granularity::Get(atrpath, value); - return aEncoder.Encode(value); - } - - case MN::TimeSource::Id: { // type is TimeSourceEnum - MN::TimeSource::TypeInfo::Type value; - UN::TimeSource::Get(atrpath, value); - return aEncoder.Encode(value); - } - - case MN::TrustedTimeNodeId::Id: { // type is node_id - MN::TrustedTimeNodeId::TypeInfo::Type value; - UN::TrustedTimeNodeId::Get(atrpath, value); - return aEncoder.Encode(value); - } - - case MN::DefaultNtp::Id: { // type is char_string - MN::DefaultNtp::TypeInfo::Type value; - UN::DefaultNtp::Get(atrpath, value); - return aEncoder.Encode(value); - } - - case MN::LocalTime::Id: { // type is epoch_us - MN::LocalTime::TypeInfo::Type value; - UN::LocalTime::Get(atrpath, value); + case MN::NumberOfPositions::Id: { // type is int8u + MN::NumberOfPositions::TypeInfo::Type value; + UN::NumberOfPositions::Get(atrpath, value); return aEncoder.Encode(value); } - - case MN::TimeZoneDatabase::Id: { // type is boolean - MN::TimeZoneDatabase::TypeInfo::Type value; - UN::TimeZoneDatabase::Get(atrpath, value); + case MN::CurrentPosition::Id: { // type is int8u + MN::CurrentPosition::TypeInfo::Type value; + UN::CurrentPosition::Get(atrpath, value); return aEncoder.Encode(value); } - - case MN::NtpServerPort::Id: { // type is int16u - MN::NtpServerPort::TypeInfo::Type value; - UN::NtpServerPort::Get(atrpath, value); + case MN::MultiPressMax::Id: { // type is int8u + MN::MultiPressMax::TypeInfo::Type value; + UN::MultiPressMax::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::FeatureMap::Id: { // type is bitmap32 MN::FeatureMap::TypeInfo::Type value; UN::FeatureMap::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::ClusterRevision::Id: { // type is int16u MN::ClusterRevision::TypeInfo::Type value; UN::ClusterRevision::Get(atrpath, value); @@ -6983,11 +6474,11 @@ TimeSynchronizationAttributeAccess::Read(const ConcreteReadAttributePath & aPath return CHIP_NO_ERROR; } -CHIP_ERROR TimeSynchronizationAttributeAccess::Write(const ConcreteDataAttributePath & aPath, AttributeValueDecoder & aDecoder) +CHIP_ERROR SwitchAttributeAccess::Write(const ConcreteDataAttributePath & aPath, AttributeValueDecoder & aDecoder) { - using namespace chip::app::Clusters::TimeSynchronization; + using namespace chip::app::Clusters::Switch; - if (aPath.mClusterId != Clusters::TimeSynchronization::Id) + if (aPath.mClusterId != Clusters::Switch::Id) { return CHIP_ERROR_INVALID_ARGUMENT; } @@ -7002,14 +6493,13 @@ CHIP_ERROR TimeSynchronizationAttributeAccess::Write(const ConcreteDataAttribute nlohmann::json jsn; switch (aPath.mAttributeId) - { - } + {} if (!attribute_name.empty()) { std::string payload_str; std::string topic = "ucl/by-unid/" + unify_node->unify_unid + "/ep" + std::to_string(unify_node->unify_endpoint) + - "/TimeSynchronization/Attributes/" + attribute_name + "/Desired"; + "/Switch/Attributes/" + attribute_name + "/Desired"; payload_str = jsn.dump(); uic_mqtt_publish(topic.c_str(), payload_str.c_str(), payload_str.length(), true); return CHIP_ERROR_NO_MESSAGE_HANDLER; @@ -7018,15 +6508,15 @@ CHIP_ERROR TimeSynchronizationAttributeAccess::Write(const ConcreteDataAttribute return CHIP_NO_ERROR; } -void TimeSynchronizationAttributeAccess::reported_updated(const bridged_endpoint * ep, const std::string & cluster, - const std::string & attribute, const nlohmann::json & unify_value) +void SwitchAttributeAccess::reported_updated(const bridged_endpoint * ep, const std::string & cluster, + const std::string & attribute, const nlohmann::json & unify_value) { - namespace MN = chip::app::Clusters::TimeSynchronization::Attributes; - namespace UN = unify::matter_bridge::TimeSynchronization::Attributes; + namespace MN = chip::app::Clusters::Switch::Attributes; + namespace UN = unify::matter_bridge::Switch::Attributes; auto cluster_id = device_translator::instance().get_cluster_id(cluster); - if (!cluster_id.has_value() || (cluster_id.value() != Clusters::TimeSynchronization::Id)) + if (!cluster_id.has_value() || (cluster_id.value() != Clusters::Switch::Id)) { return; } @@ -7040,269 +6530,117 @@ void TimeSynchronizationAttributeAccess::reported_updated(const bridged_endpoint } chip::EndpointId node_matter_endpoint = ep->matter_endpoint; - ConcreteAttributePath attrpath = - ConcreteAttributePath(node_matter_endpoint, Clusters::TimeSynchronization::Id, attribute_id.value()); - + ConcreteAttributePath attrpath = ConcreteAttributePath(node_matter_endpoint, Clusters::Switch::Id, attribute_id.value()); switch (attribute_id.value()) { - // type is epoch_us - case MN::UTCTime::Id: { - using T = MN::UTCTime::TypeInfo::Type; + // type is int8u + case MN::NumberOfPositions::Id: { + using T = MN::NumberOfPositions::TypeInfo::Type; std::optional value = from_json(unify_value); if (value.has_value()) { - sl_log_debug(LOG_TAG, "UTCTime attribute value is %s", unify_value.dump().c_str()); - UN::UTCTime::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::TimeSynchronization::Id, MN::UTCTime::Id, - ZCL_EPOCH_US_ATTRIBUTE_TYPE, reinterpret_cast(&value.value())); + sl_log_debug(LOG_TAG, "NumberOfPositions attribute value is %s", unify_value.dump().c_str()); + UN::NumberOfPositions::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::Switch::Id, MN::NumberOfPositions::Id, + ZCL_INT8U_ATTRIBUTE_TYPE, reinterpret_cast(&value.value())); } break; } - // type is GranularityEnum - case MN::Granularity::Id: { - using T = MN::Granularity::TypeInfo::Type; + // type is int8u + case MN::CurrentPosition::Id: { + using T = MN::CurrentPosition::TypeInfo::Type; std::optional value = from_json(unify_value); if (value.has_value()) { - sl_log_debug(LOG_TAG, "Granularity attribute value is %s", unify_value.dump().c_str()); - UN::Granularity::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::TimeSynchronization::Id, MN::Granularity::Id, - ZCL_ENUM8_ATTRIBUTE_TYPE, reinterpret_cast(&value.value())); + sl_log_debug(LOG_TAG, "CurrentPosition attribute value is %s", unify_value.dump().c_str()); + UN::CurrentPosition::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::Switch::Id, MN::CurrentPosition::Id, + ZCL_INT8U_ATTRIBUTE_TYPE, reinterpret_cast(&value.value())); } break; } - // type is TimeSourceEnum - case MN::TimeSource::Id: { - using T = MN::TimeSource::TypeInfo::Type; + // type is int8u + case MN::MultiPressMax::Id: { + using T = MN::MultiPressMax::TypeInfo::Type; std::optional value = from_json(unify_value); if (value.has_value()) { - sl_log_debug(LOG_TAG, "TimeSource attribute value is %s", unify_value.dump().c_str()); - UN::TimeSource::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::TimeSynchronization::Id, MN::TimeSource::Id, - ZCL_ENUM8_ATTRIBUTE_TYPE, reinterpret_cast(&value.value())); + sl_log_debug(LOG_TAG, "MultiPressMax attribute value is %s", unify_value.dump().c_str()); + UN::MultiPressMax::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::Switch::Id, MN::MultiPressMax::Id, + ZCL_INT8U_ATTRIBUTE_TYPE, reinterpret_cast(&value.value())); } break; } - // type is node_id - case MN::TrustedTimeNodeId::Id: { - using T = MN::TrustedTimeNodeId::TypeInfo::Type; + // type is bitmap32 + case MN::FeatureMap::Id: { + using T = MN::FeatureMap::TypeInfo::Type; std::optional value = from_json(unify_value); if (value.has_value()) { - sl_log_debug(LOG_TAG, "TrustedTimeNodeId attribute value is %s", unify_value.dump().c_str()); - UN::TrustedTimeNodeId::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::TimeSynchronization::Id, - MN::TrustedTimeNodeId::Id, ZCL_NODE_ID_ATTRIBUTE_TYPE, - reinterpret_cast(&value.value())); + sl_log_debug(LOG_TAG, "FeatureMap attribute value is %s", unify_value.dump().c_str()); + UN::FeatureMap::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::Switch::Id, MN::FeatureMap::Id, + ZCL_BITMAP32_ATTRIBUTE_TYPE, reinterpret_cast(&value.value())); } break; } - // type is char_string - case MN::DefaultNtp::Id: { - using T = MN::DefaultNtp::TypeInfo::Type; + // type is int16u + case MN::ClusterRevision::Id: { + using T = MN::ClusterRevision::TypeInfo::Type; std::optional value = from_json(unify_value); if (value.has_value()) { - sl_log_debug(LOG_TAG, "DefaultNtp attribute value is %s", unify_value.dump().c_str()); - UN::DefaultNtp::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::TimeSynchronization::Id, MN::DefaultNtp::Id, - ZCL_CHAR_STRING_ATTRIBUTE_TYPE, reinterpret_cast(&value.value())); + sl_log_debug(LOG_TAG, "ClusterRevision attribute value is %s", unify_value.dump().c_str()); + UN::ClusterRevision::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::Switch::Id, MN::ClusterRevision::Id, + ZCL_INT16U_ATTRIBUTE_TYPE, reinterpret_cast(&value.value())); } break; } - // type is epoch_us - case MN::LocalTime::Id: { - using T = MN::LocalTime::TypeInfo::Type; - std::optional value = from_json(unify_value); + } +} - if (value.has_value()) - { - sl_log_debug(LOG_TAG, "LocalTime attribute value is %s", unify_value.dump().c_str()); - UN::LocalTime::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::TimeSynchronization::Id, MN::LocalTime::Id, - ZCL_EPOCH_US_ATTRIBUTE_TYPE, reinterpret_cast(&value.value())); - } - break; - } - // type is boolean - case MN::TimeZoneDatabase::Id: { - using T = MN::TimeZoneDatabase::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) - { - sl_log_debug(LOG_TAG, "TimeZoneDatabase attribute value is %s", unify_value.dump().c_str()); - UN::TimeZoneDatabase::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::TimeSynchronization::Id, - MN::TimeZoneDatabase::Id, ZCL_BOOLEAN_ATTRIBUTE_TYPE, - reinterpret_cast(&value.value())); - } - break; - } - // type is int16u - case MN::NtpServerPort::Id: { - using T = MN::NtpServerPort::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) - { - sl_log_debug(LOG_TAG, "NtpServerPort attribute value is %s", unify_value.dump().c_str()); - UN::NtpServerPort::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::TimeSynchronization::Id, MN::NtpServerPort::Id, - ZCL_INT16U_ATTRIBUTE_TYPE, reinterpret_cast(&value.value())); - } - break; - } - // type is bitmap32 - case MN::FeatureMap::Id: { - using T = MN::FeatureMap::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) - { - sl_log_debug(LOG_TAG, "FeatureMap attribute value is %s", unify_value.dump().c_str()); - UN::FeatureMap::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::TimeSynchronization::Id, MN::FeatureMap::Id, - ZCL_BITMAP32_ATTRIBUTE_TYPE, reinterpret_cast(&value.value())); - } - break; - } - // type is int16u - case MN::ClusterRevision::Id: { - using T = MN::ClusterRevision::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) - { - sl_log_debug(LOG_TAG, "ClusterRevision attribute value is %s", unify_value.dump().c_str()); - UN::ClusterRevision::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::TimeSynchronization::Id, MN::ClusterRevision::Id, - ZCL_INT16U_ATTRIBUTE_TYPE, reinterpret_cast(&value.value())); - } - break; - } - } -} - -CHIP_ERROR -BridgedDeviceBasicAttributeAccess::Read(const ConcreteReadAttributePath & aPath, AttributeValueEncoder & aEncoder) -{ - namespace MN = chip::app::Clusters::BridgedDeviceBasic::Attributes; - namespace UN = unify::matter_bridge::BridgedDeviceBasic::Attributes; - if (aPath.mClusterId != Clusters::BridgedDeviceBasic::Id) - { - return CHIP_ERROR_INVALID_ARGUMENT; +CHIP_ERROR +OperationalCredentialsAttributeAccess::Read(const ConcreteReadAttributePath & aPath, AttributeValueEncoder & aEncoder) +{ + namespace MN = chip::app::Clusters::OperationalCredentials::Attributes; + namespace UN = unify::matter_bridge::OperationalCredentials::Attributes; + if (aPath.mClusterId != Clusters::OperationalCredentials::Id) + { + return CHIP_ERROR_INVALID_ARGUMENT; } ConcreteAttributePath atrpath = ConcreteAttributePath(aPath.mEndpointId, aPath.mClusterId, aPath.mAttributeId); - try { switch (aPath.mAttributeId) { - - case MN::VendorName::Id: { // type is char_string - MN::VendorName::TypeInfo::Type value; - UN::VendorName::Get(atrpath, value); - return aEncoder.Encode(value); - } - - case MN::VendorID::Id: { // type is vendor_id - MN::VendorID::TypeInfo::Type value; - UN::VendorID::Get(atrpath, value); - return aEncoder.Encode(value); - } - - case MN::ProductName::Id: { // type is char_string - MN::ProductName::TypeInfo::Type value; - UN::ProductName::Get(atrpath, value); - return aEncoder.Encode(value); - } - - case MN::NodeLabel::Id: { // type is char_string - MN::NodeLabel::TypeInfo::Type value; - UN::NodeLabel::Get(atrpath, value); - return aEncoder.Encode(value); - } - - case MN::HardwareVersion::Id: { // type is int16u - MN::HardwareVersion::TypeInfo::Type value; - UN::HardwareVersion::Get(atrpath, value); - return aEncoder.Encode(value); - } - - case MN::HardwareVersionString::Id: { // type is char_string - MN::HardwareVersionString::TypeInfo::Type value; - UN::HardwareVersionString::Get(atrpath, value); - return aEncoder.Encode(value); - } - - case MN::SoftwareVersion::Id: { // type is int32u - MN::SoftwareVersion::TypeInfo::Type value; - UN::SoftwareVersion::Get(atrpath, value); - return aEncoder.Encode(value); - } - - case MN::SoftwareVersionString::Id: { // type is char_string - MN::SoftwareVersionString::TypeInfo::Type value; - UN::SoftwareVersionString::Get(atrpath, value); - return aEncoder.Encode(value); - } - - case MN::ManufacturingDate::Id: { // type is char_string - MN::ManufacturingDate::TypeInfo::Type value; - UN::ManufacturingDate::Get(atrpath, value); - return aEncoder.Encode(value); - } - - case MN::PartNumber::Id: { // type is char_string - MN::PartNumber::TypeInfo::Type value; - UN::PartNumber::Get(atrpath, value); - return aEncoder.Encode(value); - } - - case MN::ProductURL::Id: { // type is long_char_string - MN::ProductURL::TypeInfo::Type value; - UN::ProductURL::Get(atrpath, value); - return aEncoder.Encode(value); - } - - case MN::ProductLabel::Id: { // type is char_string - MN::ProductLabel::TypeInfo::Type value; - UN::ProductLabel::Get(atrpath, value); - return aEncoder.Encode(value); - } - - case MN::SerialNumber::Id: { // type is char_string - MN::SerialNumber::TypeInfo::Type value; - UN::SerialNumber::Get(atrpath, value); + case MN::SupportedFabrics::Id: { // type is int8u + MN::SupportedFabrics::TypeInfo::Type value; + UN::SupportedFabrics::Get(atrpath, value); return aEncoder.Encode(value); } - - case MN::Reachable::Id: { // type is boolean - MN::Reachable::TypeInfo::Type value; - UN::Reachable::Get(atrpath, value); + case MN::CommissionedFabrics::Id: { // type is int8u + MN::CommissionedFabrics::TypeInfo::Type value; + UN::CommissionedFabrics::Get(atrpath, value); return aEncoder.Encode(value); } - - case MN::UniqueID::Id: { // type is char_string - MN::UniqueID::TypeInfo::Type value; - UN::UniqueID::Get(atrpath, value); + case MN::CurrentFabricIndex::Id: { // type is int8u + MN::CurrentFabricIndex::TypeInfo::Type value; + UN::CurrentFabricIndex::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::FeatureMap::Id: { // type is bitmap32 MN::FeatureMap::TypeInfo::Type value; UN::FeatureMap::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::ClusterRevision::Id: { // type is int16u MN::ClusterRevision::TypeInfo::Type value; UN::ClusterRevision::Get(atrpath, value); @@ -7320,11 +6658,11 @@ BridgedDeviceBasicAttributeAccess::Read(const ConcreteReadAttributePath & aPath, return CHIP_NO_ERROR; } -CHIP_ERROR BridgedDeviceBasicAttributeAccess::Write(const ConcreteDataAttributePath & aPath, AttributeValueDecoder & aDecoder) +CHIP_ERROR OperationalCredentialsAttributeAccess::Write(const ConcreteDataAttributePath & aPath, AttributeValueDecoder & aDecoder) { - using namespace chip::app::Clusters::BridgedDeviceBasic; + using namespace chip::app::Clusters::OperationalCredentials; - if (aPath.mClusterId != Clusters::BridgedDeviceBasic::Id) + if (aPath.mClusterId != Clusters::OperationalCredentials::Id) { return CHIP_ERROR_INVALID_ARGUMENT; } @@ -7339,14 +6677,13 @@ CHIP_ERROR BridgedDeviceBasicAttributeAccess::Write(const ConcreteDataAttributeP nlohmann::json jsn; switch (aPath.mAttributeId) - { - } + {} if (!attribute_name.empty()) { std::string payload_str; std::string topic = "ucl/by-unid/" + unify_node->unify_unid + "/ep" + std::to_string(unify_node->unify_endpoint) + - "/BridgedDeviceBasic/Attributes/" + attribute_name + "/Desired"; + "/OperationalCredentials/Attributes/" + attribute_name + "/Desired"; payload_str = jsn.dump(); uic_mqtt_publish(topic.c_str(), payload_str.c_str(), payload_str.length(), true); return CHIP_ERROR_NO_MESSAGE_HANDLER; @@ -7355,15 +6692,15 @@ CHIP_ERROR BridgedDeviceBasicAttributeAccess::Write(const ConcreteDataAttributeP return CHIP_NO_ERROR; } -void BridgedDeviceBasicAttributeAccess::reported_updated(const bridged_endpoint * ep, const std::string & cluster, - const std::string & attribute, const nlohmann::json & unify_value) +void OperationalCredentialsAttributeAccess::reported_updated(const bridged_endpoint * ep, const std::string & cluster, + const std::string & attribute, const nlohmann::json & unify_value) { - namespace MN = chip::app::Clusters::BridgedDeviceBasic::Attributes; - namespace UN = unify::matter_bridge::BridgedDeviceBasic::Attributes; + namespace MN = chip::app::Clusters::OperationalCredentials::Attributes; + namespace UN = unify::matter_bridge::OperationalCredentials::Attributes; auto cluster_id = device_translator::instance().get_cluster_id(cluster); - if (!cluster_id.has_value() || (cluster_id.value() != Clusters::BridgedDeviceBasic::Id)) + if (!cluster_id.has_value() || (cluster_id.value() != Clusters::OperationalCredentials::Id)) { return; } @@ -7378,296 +6715,116 @@ void BridgedDeviceBasicAttributeAccess::reported_updated(const bridged_endpoint chip::EndpointId node_matter_endpoint = ep->matter_endpoint; ConcreteAttributePath attrpath = - ConcreteAttributePath(node_matter_endpoint, Clusters::BridgedDeviceBasic::Id, attribute_id.value()); - + ConcreteAttributePath(node_matter_endpoint, Clusters::OperationalCredentials::Id, attribute_id.value()); switch (attribute_id.value()) { - // type is char_string - case MN::VendorName::Id: { - using T = MN::VendorName::TypeInfo::Type; + // type is int8u + case MN::SupportedFabrics::Id: { + using T = MN::SupportedFabrics::TypeInfo::Type; std::optional value = from_json(unify_value); if (value.has_value()) { - sl_log_debug(LOG_TAG, "VendorName attribute value is %s", unify_value.dump().c_str()); - UN::VendorName::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::BridgedDeviceBasic::Id, MN::VendorName::Id, - ZCL_CHAR_STRING_ATTRIBUTE_TYPE, reinterpret_cast(&value.value())); + sl_log_debug(LOG_TAG, "SupportedFabrics attribute value is %s", unify_value.dump().c_str()); + UN::SupportedFabrics::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::OperationalCredentials::Id, + MN::SupportedFabrics::Id, ZCL_INT8U_ATTRIBUTE_TYPE, + reinterpret_cast(&value.value())); } break; } - // type is vendor_id - case MN::VendorID::Id: { - using T = MN::VendorID::TypeInfo::Type; + // type is int8u + case MN::CommissionedFabrics::Id: { + using T = MN::CommissionedFabrics::TypeInfo::Type; std::optional value = from_json(unify_value); if (value.has_value()) { - sl_log_debug(LOG_TAG, "VendorID attribute value is %s", unify_value.dump().c_str()); - UN::VendorID::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::BridgedDeviceBasic::Id, MN::VendorID::Id, - ZCL_VENDOR_ID_ATTRIBUTE_TYPE, reinterpret_cast(&value.value())); + sl_log_debug(LOG_TAG, "CommissionedFabrics attribute value is %s", unify_value.dump().c_str()); + UN::CommissionedFabrics::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::OperationalCredentials::Id, + MN::CommissionedFabrics::Id, ZCL_INT8U_ATTRIBUTE_TYPE, + reinterpret_cast(&value.value())); } break; } - // type is char_string - case MN::ProductName::Id: { - using T = MN::ProductName::TypeInfo::Type; + // type is int8u + case MN::CurrentFabricIndex::Id: { + using T = MN::CurrentFabricIndex::TypeInfo::Type; std::optional value = from_json(unify_value); if (value.has_value()) { - sl_log_debug(LOG_TAG, "ProductName attribute value is %s", unify_value.dump().c_str()); - UN::ProductName::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::BridgedDeviceBasic::Id, MN::ProductName::Id, - ZCL_CHAR_STRING_ATTRIBUTE_TYPE, reinterpret_cast(&value.value())); + sl_log_debug(LOG_TAG, "CurrentFabricIndex attribute value is %s", unify_value.dump().c_str()); + UN::CurrentFabricIndex::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::OperationalCredentials::Id, + MN::CurrentFabricIndex::Id, ZCL_INT8U_ATTRIBUTE_TYPE, + reinterpret_cast(&value.value())); } break; } - // type is char_string - case MN::NodeLabel::Id: { - using T = MN::NodeLabel::TypeInfo::Type; + // type is bitmap32 + case MN::FeatureMap::Id: { + using T = MN::FeatureMap::TypeInfo::Type; std::optional value = from_json(unify_value); if (value.has_value()) { - sl_log_debug(LOG_TAG, "NodeLabel attribute value is %s", unify_value.dump().c_str()); - UN::NodeLabel::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::BridgedDeviceBasic::Id, MN::NodeLabel::Id, - ZCL_CHAR_STRING_ATTRIBUTE_TYPE, reinterpret_cast(&value.value())); + sl_log_debug(LOG_TAG, "FeatureMap attribute value is %s", unify_value.dump().c_str()); + UN::FeatureMap::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::OperationalCredentials::Id, MN::FeatureMap::Id, + ZCL_BITMAP32_ATTRIBUTE_TYPE, reinterpret_cast(&value.value())); } break; } // type is int16u - case MN::HardwareVersion::Id: { - using T = MN::HardwareVersion::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) - { - sl_log_debug(LOG_TAG, "HardwareVersion attribute value is %s", unify_value.dump().c_str()); - UN::HardwareVersion::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::BridgedDeviceBasic::Id, MN::HardwareVersion::Id, - ZCL_INT16U_ATTRIBUTE_TYPE, reinterpret_cast(&value.value())); - } - break; - } - // type is char_string - case MN::HardwareVersionString::Id: { - using T = MN::HardwareVersionString::TypeInfo::Type; + case MN::ClusterRevision::Id: { + using T = MN::ClusterRevision::TypeInfo::Type; std::optional value = from_json(unify_value); if (value.has_value()) { - sl_log_debug(LOG_TAG, "HardwareVersionString attribute value is %s", unify_value.dump().c_str()); - UN::HardwareVersionString::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::BridgedDeviceBasic::Id, - MN::HardwareVersionString::Id, ZCL_CHAR_STRING_ATTRIBUTE_TYPE, + sl_log_debug(LOG_TAG, "ClusterRevision attribute value is %s", unify_value.dump().c_str()); + UN::ClusterRevision::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::OperationalCredentials::Id, + MN::ClusterRevision::Id, ZCL_INT16U_ATTRIBUTE_TYPE, reinterpret_cast(&value.value())); } break; } - // type is int32u - case MN::SoftwareVersion::Id: { - using T = MN::SoftwareVersion::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) - { - sl_log_debug(LOG_TAG, "SoftwareVersion attribute value is %s", unify_value.dump().c_str()); - UN::SoftwareVersion::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::BridgedDeviceBasic::Id, MN::SoftwareVersion::Id, - ZCL_INT32U_ATTRIBUTE_TYPE, reinterpret_cast(&value.value())); - } - break; - } - // type is char_string - case MN::SoftwareVersionString::Id: { - using T = MN::SoftwareVersionString::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) - { - sl_log_debug(LOG_TAG, "SoftwareVersionString attribute value is %s", unify_value.dump().c_str()); - UN::SoftwareVersionString::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::BridgedDeviceBasic::Id, - MN::SoftwareVersionString::Id, ZCL_CHAR_STRING_ATTRIBUTE_TYPE, - reinterpret_cast(&value.value())); - } - break; - } - // type is char_string - case MN::ManufacturingDate::Id: { - using T = MN::ManufacturingDate::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) - { - sl_log_debug(LOG_TAG, "ManufacturingDate attribute value is %s", unify_value.dump().c_str()); - UN::ManufacturingDate::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::BridgedDeviceBasic::Id, - MN::ManufacturingDate::Id, ZCL_CHAR_STRING_ATTRIBUTE_TYPE, - reinterpret_cast(&value.value())); - } - break; - } - // type is char_string - case MN::PartNumber::Id: { - using T = MN::PartNumber::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) - { - sl_log_debug(LOG_TAG, "PartNumber attribute value is %s", unify_value.dump().c_str()); - UN::PartNumber::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::BridgedDeviceBasic::Id, MN::PartNumber::Id, - ZCL_CHAR_STRING_ATTRIBUTE_TYPE, reinterpret_cast(&value.value())); - } - break; - } - // type is long_char_string - case MN::ProductURL::Id: { - using T = MN::ProductURL::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) - { - sl_log_debug(LOG_TAG, "ProductURL attribute value is %s", unify_value.dump().c_str()); - UN::ProductURL::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::BridgedDeviceBasic::Id, MN::ProductURL::Id, - ZCL_LONG_CHAR_STRING_ATTRIBUTE_TYPE, - reinterpret_cast(&value.value())); - } - break; - } - // type is char_string - case MN::ProductLabel::Id: { - using T = MN::ProductLabel::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) - { - sl_log_debug(LOG_TAG, "ProductLabel attribute value is %s", unify_value.dump().c_str()); - UN::ProductLabel::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::BridgedDeviceBasic::Id, MN::ProductLabel::Id, - ZCL_CHAR_STRING_ATTRIBUTE_TYPE, reinterpret_cast(&value.value())); - } - break; - } - // type is char_string - case MN::SerialNumber::Id: { - using T = MN::SerialNumber::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) - { - sl_log_debug(LOG_TAG, "SerialNumber attribute value is %s", unify_value.dump().c_str()); - UN::SerialNumber::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::BridgedDeviceBasic::Id, MN::SerialNumber::Id, - ZCL_CHAR_STRING_ATTRIBUTE_TYPE, reinterpret_cast(&value.value())); - } - break; - } - // type is boolean - case MN::Reachable::Id: { - using T = MN::Reachable::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) - { - sl_log_debug(LOG_TAG, "Reachable attribute value is %s", unify_value.dump().c_str()); - UN::Reachable::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::BridgedDeviceBasic::Id, MN::Reachable::Id, - ZCL_BOOLEAN_ATTRIBUTE_TYPE, reinterpret_cast(&value.value())); - } - break; - } - // type is char_string - case MN::UniqueID::Id: { - using T = MN::UniqueID::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) - { - sl_log_debug(LOG_TAG, "UniqueID attribute value is %s", unify_value.dump().c_str()); - UN::UniqueID::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::BridgedDeviceBasic::Id, MN::UniqueID::Id, - ZCL_CHAR_STRING_ATTRIBUTE_TYPE, reinterpret_cast(&value.value())); - } - break; - } - // type is bitmap32 - case MN::FeatureMap::Id: { - using T = MN::FeatureMap::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) - { - sl_log_debug(LOG_TAG, "FeatureMap attribute value is %s", unify_value.dump().c_str()); - UN::FeatureMap::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::BridgedDeviceBasic::Id, MN::FeatureMap::Id, - ZCL_BITMAP32_ATTRIBUTE_TYPE, reinterpret_cast(&value.value())); - } - break; - } - // type is int16u - case MN::ClusterRevision::Id: { - using T = MN::ClusterRevision::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) - { - sl_log_debug(LOG_TAG, "ClusterRevision attribute value is %s", unify_value.dump().c_str()); - UN::ClusterRevision::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::BridgedDeviceBasic::Id, MN::ClusterRevision::Id, - ZCL_INT16U_ATTRIBUTE_TYPE, reinterpret_cast(&value.value())); - } - break; - } - } -} + } +} CHIP_ERROR -SwitchAttributeAccess::Read(const ConcreteReadAttributePath & aPath, AttributeValueEncoder & aEncoder) +GroupKeyManagementAttributeAccess::Read(const ConcreteReadAttributePath & aPath, AttributeValueEncoder & aEncoder) { - namespace MN = chip::app::Clusters::Switch::Attributes; - namespace UN = unify::matter_bridge::Switch::Attributes; - if (aPath.mClusterId != Clusters::Switch::Id) + namespace MN = chip::app::Clusters::GroupKeyManagement::Attributes; + namespace UN = unify::matter_bridge::GroupKeyManagement::Attributes; + if (aPath.mClusterId != Clusters::GroupKeyManagement::Id) { return CHIP_ERROR_INVALID_ARGUMENT; } ConcreteAttributePath atrpath = ConcreteAttributePath(aPath.mEndpointId, aPath.mClusterId, aPath.mAttributeId); - try { switch (aPath.mAttributeId) { - - case MN::NumberOfPositions::Id: { // type is int8u - MN::NumberOfPositions::TypeInfo::Type value; - UN::NumberOfPositions::Get(atrpath, value); - return aEncoder.Encode(value); - } - - case MN::CurrentPosition::Id: { // type is int8u - MN::CurrentPosition::TypeInfo::Type value; - UN::CurrentPosition::Get(atrpath, value); + case MN::MaxGroupsPerFabric::Id: { // type is int16u + MN::MaxGroupsPerFabric::TypeInfo::Type value; + UN::MaxGroupsPerFabric::Get(atrpath, value); return aEncoder.Encode(value); } - - case MN::MultiPressMax::Id: { // type is int8u - MN::MultiPressMax::TypeInfo::Type value; - UN::MultiPressMax::Get(atrpath, value); + case MN::MaxGroupKeysPerFabric::Id: { // type is int16u + MN::MaxGroupKeysPerFabric::TypeInfo::Type value; + UN::MaxGroupKeysPerFabric::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::FeatureMap::Id: { // type is bitmap32 MN::FeatureMap::TypeInfo::Type value; UN::FeatureMap::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::ClusterRevision::Id: { // type is int16u MN::ClusterRevision::TypeInfo::Type value; UN::ClusterRevision::Get(atrpath, value); @@ -7685,11 +6842,11 @@ SwitchAttributeAccess::Read(const ConcreteReadAttributePath & aPath, AttributeVa return CHIP_NO_ERROR; } -CHIP_ERROR SwitchAttributeAccess::Write(const ConcreteDataAttributePath & aPath, AttributeValueDecoder & aDecoder) +CHIP_ERROR GroupKeyManagementAttributeAccess::Write(const ConcreteDataAttributePath & aPath, AttributeValueDecoder & aDecoder) { - using namespace chip::app::Clusters::Switch; + using namespace chip::app::Clusters::GroupKeyManagement; - if (aPath.mClusterId != Clusters::Switch::Id) + if (aPath.mClusterId != Clusters::GroupKeyManagement::Id) { return CHIP_ERROR_INVALID_ARGUMENT; } @@ -7704,14 +6861,13 @@ CHIP_ERROR SwitchAttributeAccess::Write(const ConcreteDataAttributePath & aPath, nlohmann::json jsn; switch (aPath.mAttributeId) - { - } + {} if (!attribute_name.empty()) { std::string payload_str; std::string topic = "ucl/by-unid/" + unify_node->unify_unid + "/ep" + std::to_string(unify_node->unify_endpoint) + - "/Switch/Attributes/" + attribute_name + "/Desired"; + "/GroupKeyManagement/Attributes/" + attribute_name + "/Desired"; payload_str = jsn.dump(); uic_mqtt_publish(topic.c_str(), payload_str.c_str(), payload_str.length(), true); return CHIP_ERROR_NO_MESSAGE_HANDLER; @@ -7720,15 +6876,15 @@ CHIP_ERROR SwitchAttributeAccess::Write(const ConcreteDataAttributePath & aPath, return CHIP_NO_ERROR; } -void SwitchAttributeAccess::reported_updated(const bridged_endpoint * ep, const std::string & cluster, - const std::string & attribute, const nlohmann::json & unify_value) +void GroupKeyManagementAttributeAccess::reported_updated(const bridged_endpoint * ep, const std::string & cluster, + const std::string & attribute, const nlohmann::json & unify_value) { - namespace MN = chip::app::Clusters::Switch::Attributes; - namespace UN = unify::matter_bridge::Switch::Attributes; + namespace MN = chip::app::Clusters::GroupKeyManagement::Attributes; + namespace UN = unify::matter_bridge::GroupKeyManagement::Attributes; auto cluster_id = device_translator::instance().get_cluster_id(cluster); - if (!cluster_id.has_value() || (cluster_id.value() != Clusters::Switch::Id)) + if (!cluster_id.has_value() || (cluster_id.value() != Clusters::GroupKeyManagement::Id)) { return; } @@ -7742,49 +6898,37 @@ void SwitchAttributeAccess::reported_updated(const bridged_endpoint * ep, const } chip::EndpointId node_matter_endpoint = ep->matter_endpoint; - ConcreteAttributePath attrpath = ConcreteAttributePath(node_matter_endpoint, Clusters::Switch::Id, attribute_id.value()); - + ConcreteAttributePath attrpath = + ConcreteAttributePath(node_matter_endpoint, Clusters::GroupKeyManagement::Id, attribute_id.value()); switch (attribute_id.value()) { - // type is int8u - case MN::NumberOfPositions::Id: { - using T = MN::NumberOfPositions::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) - { - sl_log_debug(LOG_TAG, "NumberOfPositions attribute value is %s", unify_value.dump().c_str()); - UN::NumberOfPositions::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::Switch::Id, MN::NumberOfPositions::Id, - ZCL_INT8U_ATTRIBUTE_TYPE, reinterpret_cast(&value.value())); - } - break; - } - // type is int8u - case MN::CurrentPosition::Id: { - using T = MN::CurrentPosition::TypeInfo::Type; + // type is int16u + case MN::MaxGroupsPerFabric::Id: { + using T = MN::MaxGroupsPerFabric::TypeInfo::Type; std::optional value = from_json(unify_value); if (value.has_value()) { - sl_log_debug(LOG_TAG, "CurrentPosition attribute value is %s", unify_value.dump().c_str()); - UN::CurrentPosition::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::Switch::Id, MN::CurrentPosition::Id, - ZCL_INT8U_ATTRIBUTE_TYPE, reinterpret_cast(&value.value())); + sl_log_debug(LOG_TAG, "MaxGroupsPerFabric attribute value is %s", unify_value.dump().c_str()); + UN::MaxGroupsPerFabric::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::GroupKeyManagement::Id, + MN::MaxGroupsPerFabric::Id, ZCL_INT16U_ATTRIBUTE_TYPE, + reinterpret_cast(&value.value())); } break; } - // type is int8u - case MN::MultiPressMax::Id: { - using T = MN::MultiPressMax::TypeInfo::Type; + // type is int16u + case MN::MaxGroupKeysPerFabric::Id: { + using T = MN::MaxGroupKeysPerFabric::TypeInfo::Type; std::optional value = from_json(unify_value); if (value.has_value()) { - sl_log_debug(LOG_TAG, "MultiPressMax attribute value is %s", unify_value.dump().c_str()); - UN::MultiPressMax::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::Switch::Id, MN::MultiPressMax::Id, - ZCL_INT8U_ATTRIBUTE_TYPE, reinterpret_cast(&value.value())); + sl_log_debug(LOG_TAG, "MaxGroupKeysPerFabric attribute value is %s", unify_value.dump().c_str()); + UN::MaxGroupKeysPerFabric::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::GroupKeyManagement::Id, + MN::MaxGroupKeysPerFabric::Id, ZCL_INT16U_ATTRIBUTE_TYPE, + reinterpret_cast(&value.value())); } break; } @@ -7797,7 +6941,7 @@ void SwitchAttributeAccess::reported_updated(const bridged_endpoint * ep, const { sl_log_debug(LOG_TAG, "FeatureMap attribute value is %s", unify_value.dump().c_str()); UN::FeatureMap::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::Switch::Id, MN::FeatureMap::Id, + MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::GroupKeyManagement::Id, MN::FeatureMap::Id, ZCL_BITMAP32_ATTRIBUTE_TYPE, reinterpret_cast(&value.value())); } break; @@ -7811,7 +6955,7 @@ void SwitchAttributeAccess::reported_updated(const bridged_endpoint * ep, const { sl_log_debug(LOG_TAG, "ClusterRevision attribute value is %s", unify_value.dump().c_str()); UN::ClusterRevision::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::Switch::Id, MN::ClusterRevision::Id, + MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::GroupKeyManagement::Id, MN::ClusterRevision::Id, ZCL_INT16U_ATTRIBUTE_TYPE, reinterpret_cast(&value.value())); } break; @@ -7820,46 +6964,25 @@ void SwitchAttributeAccess::reported_updated(const bridged_endpoint * ep, const } CHIP_ERROR -AdministratorCommissioningAttributeAccess::Read(const ConcreteReadAttributePath & aPath, AttributeValueEncoder & aEncoder) +FixedLabelAttributeAccess::Read(const ConcreteReadAttributePath & aPath, AttributeValueEncoder & aEncoder) { - namespace MN = chip::app::Clusters::AdministratorCommissioning::Attributes; - namespace UN = unify::matter_bridge::AdministratorCommissioning::Attributes; - if (aPath.mClusterId != Clusters::AdministratorCommissioning::Id) + namespace MN = chip::app::Clusters::FixedLabel::Attributes; + namespace UN = unify::matter_bridge::FixedLabel::Attributes; + if (aPath.mClusterId != Clusters::FixedLabel::Id) { return CHIP_ERROR_INVALID_ARGUMENT; } ConcreteAttributePath atrpath = ConcreteAttributePath(aPath.mEndpointId, aPath.mClusterId, aPath.mAttributeId); - try { switch (aPath.mAttributeId) { - - case MN::WindowStatus::Id: { // type is CommissioningWindowStatus - MN::WindowStatus::TypeInfo::Type value; - UN::WindowStatus::Get(atrpath, value); - return aEncoder.Encode(value); - } - - case MN::AdminFabricIndex::Id: { // type is fabric_idx - MN::AdminFabricIndex::TypeInfo::Type value; - UN::AdminFabricIndex::Get(atrpath, value); - return aEncoder.Encode(value); - } - - case MN::AdminVendorId::Id: { // type is int16u - MN::AdminVendorId::TypeInfo::Type value; - UN::AdminVendorId::Get(atrpath, value); - return aEncoder.Encode(value); - } - case MN::FeatureMap::Id: { // type is bitmap32 MN::FeatureMap::TypeInfo::Type value; UN::FeatureMap::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::ClusterRevision::Id: { // type is int16u MN::ClusterRevision::TypeInfo::Type value; UN::ClusterRevision::Get(atrpath, value); @@ -7877,12 +7000,11 @@ AdministratorCommissioningAttributeAccess::Read(const ConcreteReadAttributePath return CHIP_NO_ERROR; } -CHIP_ERROR AdministratorCommissioningAttributeAccess::Write(const ConcreteDataAttributePath & aPath, - AttributeValueDecoder & aDecoder) +CHIP_ERROR FixedLabelAttributeAccess::Write(const ConcreteDataAttributePath & aPath, AttributeValueDecoder & aDecoder) { - using namespace chip::app::Clusters::AdministratorCommissioning; + using namespace chip::app::Clusters::FixedLabel; - if (aPath.mClusterId != Clusters::AdministratorCommissioning::Id) + if (aPath.mClusterId != Clusters::FixedLabel::Id) { return CHIP_ERROR_INVALID_ARGUMENT; } @@ -7897,14 +7019,13 @@ CHIP_ERROR AdministratorCommissioningAttributeAccess::Write(const ConcreteDataAt nlohmann::json jsn; switch (aPath.mAttributeId) - { - } + {} if (!attribute_name.empty()) { std::string payload_str; std::string topic = "ucl/by-unid/" + unify_node->unify_unid + "/ep" + std::to_string(unify_node->unify_endpoint) + - "/AdministratorCommissioning/Attributes/" + attribute_name + "/Desired"; + "/FixedLabel/Attributes/" + attribute_name + "/Desired"; payload_str = jsn.dump(); uic_mqtt_publish(topic.c_str(), payload_str.c_str(), payload_str.length(), true); return CHIP_ERROR_NO_MESSAGE_HANDLER; @@ -7913,15 +7034,15 @@ CHIP_ERROR AdministratorCommissioningAttributeAccess::Write(const ConcreteDataAt return CHIP_NO_ERROR; } -void AdministratorCommissioningAttributeAccess::reported_updated(const bridged_endpoint * ep, const std::string & cluster, - const std::string & attribute, const nlohmann::json & unify_value) +void FixedLabelAttributeAccess::reported_updated(const bridged_endpoint * ep, const std::string & cluster, + const std::string & attribute, const nlohmann::json & unify_value) { - namespace MN = chip::app::Clusters::AdministratorCommissioning::Attributes; - namespace UN = unify::matter_bridge::AdministratorCommissioning::Attributes; + namespace MN = chip::app::Clusters::FixedLabel::Attributes; + namespace UN = unify::matter_bridge::FixedLabel::Attributes; auto cluster_id = device_translator::instance().get_cluster_id(cluster); - if (!cluster_id.has_value() || (cluster_id.value() != Clusters::AdministratorCommissioning::Id)) + if (!cluster_id.has_value() || (cluster_id.value() != Clusters::FixedLabel::Id)) { return; } @@ -7935,57 +7056,10 @@ void AdministratorCommissioningAttributeAccess::reported_updated(const bridged_e } chip::EndpointId node_matter_endpoint = ep->matter_endpoint; - ConcreteAttributePath attrpath = - ConcreteAttributePath(node_matter_endpoint, Clusters::AdministratorCommissioning::Id, attribute_id.value()); - + ConcreteAttributePath attrpath = ConcreteAttributePath(node_matter_endpoint, Clusters::FixedLabel::Id, attribute_id.value()); switch (attribute_id.value()) { - // type is CommissioningWindowStatus - case MN::WindowStatus::Id: { - using T = MN::WindowStatus::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) - { - sl_log_debug(LOG_TAG, "WindowStatus attribute value is %s", unify_value.dump().c_str()); - UN::WindowStatus::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::AdministratorCommissioning::Id, - MN::WindowStatus::Id, ZCL_ENUM8_ATTRIBUTE_TYPE, - reinterpret_cast(&value.value())); - } - break; - } - // type is fabric_idx - case MN::AdminFabricIndex::Id: { - using T = MN::AdminFabricIndex::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) - { - sl_log_debug(LOG_TAG, "AdminFabricIndex attribute value is %s", unify_value.dump().c_str()); - UN::AdminFabricIndex::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::AdministratorCommissioning::Id, - MN::AdminFabricIndex::Id, ZCL_FABRIC_IDX_ATTRIBUTE_TYPE, - reinterpret_cast(&value.value())); - } - break; - } - // type is int16u - case MN::AdminVendorId::Id: { - using T = MN::AdminVendorId::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) - { - sl_log_debug(LOG_TAG, "AdminVendorId attribute value is %s", unify_value.dump().c_str()); - UN::AdminVendorId::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::AdministratorCommissioning::Id, - MN::AdminVendorId::Id, ZCL_INT16U_ATTRIBUTE_TYPE, - reinterpret_cast(&value.value())); - } - break; - } - // type is bitmap32 + // type is bitmap32 case MN::FeatureMap::Id: { using T = MN::FeatureMap::TypeInfo::Type; std::optional value = from_json(unify_value); @@ -7994,9 +7068,8 @@ void AdministratorCommissioningAttributeAccess::reported_updated(const bridged_e { sl_log_debug(LOG_TAG, "FeatureMap attribute value is %s", unify_value.dump().c_str()); UN::FeatureMap::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::AdministratorCommissioning::Id, - MN::FeatureMap::Id, ZCL_BITMAP32_ATTRIBUTE_TYPE, - reinterpret_cast(&value.value())); + MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::FixedLabel::Id, MN::FeatureMap::Id, + ZCL_BITMAP32_ATTRIBUTE_TYPE, reinterpret_cast(&value.value())); } break; } @@ -8009,9 +7082,8 @@ void AdministratorCommissioningAttributeAccess::reported_updated(const bridged_e { sl_log_debug(LOG_TAG, "ClusterRevision attribute value is %s", unify_value.dump().c_str()); UN::ClusterRevision::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::AdministratorCommissioning::Id, - MN::ClusterRevision::Id, ZCL_INT16U_ATTRIBUTE_TYPE, - reinterpret_cast(&value.value())); + MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::FixedLabel::Id, MN::ClusterRevision::Id, + ZCL_INT16U_ATTRIBUTE_TYPE, reinterpret_cast(&value.value())); } break; } @@ -8019,46 +7091,25 @@ void AdministratorCommissioningAttributeAccess::reported_updated(const bridged_e } CHIP_ERROR -OperationalCredentialsAttributeAccess::Read(const ConcreteReadAttributePath & aPath, AttributeValueEncoder & aEncoder) +UserLabelAttributeAccess::Read(const ConcreteReadAttributePath & aPath, AttributeValueEncoder & aEncoder) { - namespace MN = chip::app::Clusters::OperationalCredentials::Attributes; - namespace UN = unify::matter_bridge::OperationalCredentials::Attributes; - if (aPath.mClusterId != Clusters::OperationalCredentials::Id) + namespace MN = chip::app::Clusters::UserLabel::Attributes; + namespace UN = unify::matter_bridge::UserLabel::Attributes; + if (aPath.mClusterId != Clusters::UserLabel::Id) { return CHIP_ERROR_INVALID_ARGUMENT; } ConcreteAttributePath atrpath = ConcreteAttributePath(aPath.mEndpointId, aPath.mClusterId, aPath.mAttributeId); - try { switch (aPath.mAttributeId) { - - case MN::SupportedFabrics::Id: { // type is int8u - MN::SupportedFabrics::TypeInfo::Type value; - UN::SupportedFabrics::Get(atrpath, value); - return aEncoder.Encode(value); - } - - case MN::CommissionedFabrics::Id: { // type is int8u - MN::CommissionedFabrics::TypeInfo::Type value; - UN::CommissionedFabrics::Get(atrpath, value); - return aEncoder.Encode(value); - } - - case MN::CurrentFabricIndex::Id: { // type is int8u - MN::CurrentFabricIndex::TypeInfo::Type value; - UN::CurrentFabricIndex::Get(atrpath, value); - return aEncoder.Encode(value); - } - case MN::FeatureMap::Id: { // type is bitmap32 MN::FeatureMap::TypeInfo::Type value; UN::FeatureMap::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::ClusterRevision::Id: { // type is int16u MN::ClusterRevision::TypeInfo::Type value; UN::ClusterRevision::Get(atrpath, value); @@ -8076,11 +7127,11 @@ OperationalCredentialsAttributeAccess::Read(const ConcreteReadAttributePath & aP return CHIP_NO_ERROR; } -CHIP_ERROR OperationalCredentialsAttributeAccess::Write(const ConcreteDataAttributePath & aPath, AttributeValueDecoder & aDecoder) +CHIP_ERROR UserLabelAttributeAccess::Write(const ConcreteDataAttributePath & aPath, AttributeValueDecoder & aDecoder) { - using namespace chip::app::Clusters::OperationalCredentials; + using namespace chip::app::Clusters::UserLabel; - if (aPath.mClusterId != Clusters::OperationalCredentials::Id) + if (aPath.mClusterId != Clusters::UserLabel::Id) { return CHIP_ERROR_INVALID_ARGUMENT; } @@ -8095,14 +7146,13 @@ CHIP_ERROR OperationalCredentialsAttributeAccess::Write(const ConcreteDataAttrib nlohmann::json jsn; switch (aPath.mAttributeId) - { - } + {} if (!attribute_name.empty()) { std::string payload_str; std::string topic = "ucl/by-unid/" + unify_node->unify_unid + "/ep" + std::to_string(unify_node->unify_endpoint) + - "/OperationalCredentials/Attributes/" + attribute_name + "/Desired"; + "/UserLabel/Attributes/" + attribute_name + "/Desired"; payload_str = jsn.dump(); uic_mqtt_publish(topic.c_str(), payload_str.c_str(), payload_str.length(), true); return CHIP_ERROR_NO_MESSAGE_HANDLER; @@ -8111,15 +7161,15 @@ CHIP_ERROR OperationalCredentialsAttributeAccess::Write(const ConcreteDataAttrib return CHIP_NO_ERROR; } -void OperationalCredentialsAttributeAccess::reported_updated(const bridged_endpoint * ep, const std::string & cluster, - const std::string & attribute, const nlohmann::json & unify_value) +void UserLabelAttributeAccess::reported_updated(const bridged_endpoint * ep, const std::string & cluster, + const std::string & attribute, const nlohmann::json & unify_value) { - namespace MN = chip::app::Clusters::OperationalCredentials::Attributes; - namespace UN = unify::matter_bridge::OperationalCredentials::Attributes; + namespace MN = chip::app::Clusters::UserLabel::Attributes; + namespace UN = unify::matter_bridge::UserLabel::Attributes; auto cluster_id = device_translator::instance().get_cluster_id(cluster); - if (!cluster_id.has_value() || (cluster_id.value() != Clusters::OperationalCredentials::Id)) + if (!cluster_id.has_value() || (cluster_id.value() != Clusters::UserLabel::Id)) { return; } @@ -8133,57 +7183,10 @@ void OperationalCredentialsAttributeAccess::reported_updated(const bridged_endpo } chip::EndpointId node_matter_endpoint = ep->matter_endpoint; - ConcreteAttributePath attrpath = - ConcreteAttributePath(node_matter_endpoint, Clusters::OperationalCredentials::Id, attribute_id.value()); - + ConcreteAttributePath attrpath = ConcreteAttributePath(node_matter_endpoint, Clusters::UserLabel::Id, attribute_id.value()); switch (attribute_id.value()) { - // type is int8u - case MN::SupportedFabrics::Id: { - using T = MN::SupportedFabrics::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) - { - sl_log_debug(LOG_TAG, "SupportedFabrics attribute value is %s", unify_value.dump().c_str()); - UN::SupportedFabrics::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::OperationalCredentials::Id, - MN::SupportedFabrics::Id, ZCL_INT8U_ATTRIBUTE_TYPE, - reinterpret_cast(&value.value())); - } - break; - } - // type is int8u - case MN::CommissionedFabrics::Id: { - using T = MN::CommissionedFabrics::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) - { - sl_log_debug(LOG_TAG, "CommissionedFabrics attribute value is %s", unify_value.dump().c_str()); - UN::CommissionedFabrics::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::OperationalCredentials::Id, - MN::CommissionedFabrics::Id, ZCL_INT8U_ATTRIBUTE_TYPE, - reinterpret_cast(&value.value())); - } - break; - } - // type is int8u - case MN::CurrentFabricIndex::Id: { - using T = MN::CurrentFabricIndex::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) - { - sl_log_debug(LOG_TAG, "CurrentFabricIndex attribute value is %s", unify_value.dump().c_str()); - UN::CurrentFabricIndex::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::OperationalCredentials::Id, - MN::CurrentFabricIndex::Id, ZCL_INT8U_ATTRIBUTE_TYPE, - reinterpret_cast(&value.value())); - } - break; - } - // type is bitmap32 + // type is bitmap32 case MN::FeatureMap::Id: { using T = MN::FeatureMap::TypeInfo::Type; std::optional value = from_json(unify_value); @@ -8192,7 +7195,7 @@ void OperationalCredentialsAttributeAccess::reported_updated(const bridged_endpo { sl_log_debug(LOG_TAG, "FeatureMap attribute value is %s", unify_value.dump().c_str()); UN::FeatureMap::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::OperationalCredentials::Id, MN::FeatureMap::Id, + MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::UserLabel::Id, MN::FeatureMap::Id, ZCL_BITMAP32_ATTRIBUTE_TYPE, reinterpret_cast(&value.value())); } break; @@ -8206,9 +7209,8 @@ void OperationalCredentialsAttributeAccess::reported_updated(const bridged_endpo { sl_log_debug(LOG_TAG, "ClusterRevision attribute value is %s", unify_value.dump().c_str()); UN::ClusterRevision::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::OperationalCredentials::Id, - MN::ClusterRevision::Id, ZCL_INT16U_ATTRIBUTE_TYPE, - reinterpret_cast(&value.value())); + MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::UserLabel::Id, MN::ClusterRevision::Id, + ZCL_INT16U_ATTRIBUTE_TYPE, reinterpret_cast(&value.value())); } break; } @@ -8216,40 +7218,25 @@ void OperationalCredentialsAttributeAccess::reported_updated(const bridged_endpo } CHIP_ERROR -GroupKeyManagementAttributeAccess::Read(const ConcreteReadAttributePath & aPath, AttributeValueEncoder & aEncoder) +ProxyConfigurationAttributeAccess::Read(const ConcreteReadAttributePath & aPath, AttributeValueEncoder & aEncoder) { - namespace MN = chip::app::Clusters::GroupKeyManagement::Attributes; - namespace UN = unify::matter_bridge::GroupKeyManagement::Attributes; - if (aPath.mClusterId != Clusters::GroupKeyManagement::Id) + namespace MN = chip::app::Clusters::ProxyConfiguration::Attributes; + namespace UN = unify::matter_bridge::ProxyConfiguration::Attributes; + if (aPath.mClusterId != Clusters::ProxyConfiguration::Id) { return CHIP_ERROR_INVALID_ARGUMENT; } ConcreteAttributePath atrpath = ConcreteAttributePath(aPath.mEndpointId, aPath.mClusterId, aPath.mAttributeId); - try { switch (aPath.mAttributeId) { - - case MN::MaxGroupsPerFabric::Id: { // type is int16u - MN::MaxGroupsPerFabric::TypeInfo::Type value; - UN::MaxGroupsPerFabric::Get(atrpath, value); - return aEncoder.Encode(value); - } - - case MN::MaxGroupKeysPerFabric::Id: { // type is int16u - MN::MaxGroupKeysPerFabric::TypeInfo::Type value; - UN::MaxGroupKeysPerFabric::Get(atrpath, value); - return aEncoder.Encode(value); - } - case MN::FeatureMap::Id: { // type is bitmap32 MN::FeatureMap::TypeInfo::Type value; UN::FeatureMap::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::ClusterRevision::Id: { // type is int16u MN::ClusterRevision::TypeInfo::Type value; UN::ClusterRevision::Get(atrpath, value); @@ -8267,11 +7254,11 @@ GroupKeyManagementAttributeAccess::Read(const ConcreteReadAttributePath & aPath, return CHIP_NO_ERROR; } -CHIP_ERROR GroupKeyManagementAttributeAccess::Write(const ConcreteDataAttributePath & aPath, AttributeValueDecoder & aDecoder) +CHIP_ERROR ProxyConfigurationAttributeAccess::Write(const ConcreteDataAttributePath & aPath, AttributeValueDecoder & aDecoder) { - using namespace chip::app::Clusters::GroupKeyManagement; + using namespace chip::app::Clusters::ProxyConfiguration; - if (aPath.mClusterId != Clusters::GroupKeyManagement::Id) + if (aPath.mClusterId != Clusters::ProxyConfiguration::Id) { return CHIP_ERROR_INVALID_ARGUMENT; } @@ -8286,14 +7273,13 @@ CHIP_ERROR GroupKeyManagementAttributeAccess::Write(const ConcreteDataAttributeP nlohmann::json jsn; switch (aPath.mAttributeId) - { - } + {} if (!attribute_name.empty()) { std::string payload_str; std::string topic = "ucl/by-unid/" + unify_node->unify_unid + "/ep" + std::to_string(unify_node->unify_endpoint) + - "/GroupKeyManagement/Attributes/" + attribute_name + "/Desired"; + "/ProxyConfiguration/Attributes/" + attribute_name + "/Desired"; payload_str = jsn.dump(); uic_mqtt_publish(topic.c_str(), payload_str.c_str(), payload_str.length(), true); return CHIP_ERROR_NO_MESSAGE_HANDLER; @@ -8302,15 +7288,15 @@ CHIP_ERROR GroupKeyManagementAttributeAccess::Write(const ConcreteDataAttributeP return CHIP_NO_ERROR; } -void GroupKeyManagementAttributeAccess::reported_updated(const bridged_endpoint * ep, const std::string & cluster, +void ProxyConfigurationAttributeAccess::reported_updated(const bridged_endpoint * ep, const std::string & cluster, const std::string & attribute, const nlohmann::json & unify_value) { - namespace MN = chip::app::Clusters::GroupKeyManagement::Attributes; - namespace UN = unify::matter_bridge::GroupKeyManagement::Attributes; + namespace MN = chip::app::Clusters::ProxyConfiguration::Attributes; + namespace UN = unify::matter_bridge::ProxyConfiguration::Attributes; auto cluster_id = device_translator::instance().get_cluster_id(cluster); - if (!cluster_id.has_value() || (cluster_id.value() != Clusters::GroupKeyManagement::Id)) + if (!cluster_id.has_value() || (cluster_id.value() != Clusters::ProxyConfiguration::Id)) { return; } @@ -8325,41 +7311,10 @@ void GroupKeyManagementAttributeAccess::reported_updated(const bridged_endpoint chip::EndpointId node_matter_endpoint = ep->matter_endpoint; ConcreteAttributePath attrpath = - ConcreteAttributePath(node_matter_endpoint, Clusters::GroupKeyManagement::Id, attribute_id.value()); - + ConcreteAttributePath(node_matter_endpoint, Clusters::ProxyConfiguration::Id, attribute_id.value()); switch (attribute_id.value()) { - // type is int16u - case MN::MaxGroupsPerFabric::Id: { - using T = MN::MaxGroupsPerFabric::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) - { - sl_log_debug(LOG_TAG, "MaxGroupsPerFabric attribute value is %s", unify_value.dump().c_str()); - UN::MaxGroupsPerFabric::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::GroupKeyManagement::Id, - MN::MaxGroupsPerFabric::Id, ZCL_INT16U_ATTRIBUTE_TYPE, - reinterpret_cast(&value.value())); - } - break; - } - // type is int16u - case MN::MaxGroupKeysPerFabric::Id: { - using T = MN::MaxGroupKeysPerFabric::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) - { - sl_log_debug(LOG_TAG, "MaxGroupKeysPerFabric attribute value is %s", unify_value.dump().c_str()); - UN::MaxGroupKeysPerFabric::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::GroupKeyManagement::Id, - MN::MaxGroupKeysPerFabric::Id, ZCL_INT16U_ATTRIBUTE_TYPE, - reinterpret_cast(&value.value())); - } - break; - } - // type is bitmap32 + // type is bitmap32 case MN::FeatureMap::Id: { using T = MN::FeatureMap::TypeInfo::Type; std::optional value = from_json(unify_value); @@ -8368,7 +7323,7 @@ void GroupKeyManagementAttributeAccess::reported_updated(const bridged_endpoint { sl_log_debug(LOG_TAG, "FeatureMap attribute value is %s", unify_value.dump().c_str()); UN::FeatureMap::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::GroupKeyManagement::Id, MN::FeatureMap::Id, + MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::ProxyConfiguration::Id, MN::FeatureMap::Id, ZCL_BITMAP32_ATTRIBUTE_TYPE, reinterpret_cast(&value.value())); } break; @@ -8382,7 +7337,7 @@ void GroupKeyManagementAttributeAccess::reported_updated(const bridged_endpoint { sl_log_debug(LOG_TAG, "ClusterRevision attribute value is %s", unify_value.dump().c_str()); UN::ClusterRevision::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::GroupKeyManagement::Id, MN::ClusterRevision::Id, + MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::ProxyConfiguration::Id, MN::ClusterRevision::Id, ZCL_INT16U_ATTRIBUTE_TYPE, reinterpret_cast(&value.value())); } break; @@ -8391,28 +7346,25 @@ void GroupKeyManagementAttributeAccess::reported_updated(const bridged_endpoint } CHIP_ERROR -FixedLabelAttributeAccess::Read(const ConcreteReadAttributePath & aPath, AttributeValueEncoder & aEncoder) +ProxyDiscoveryAttributeAccess::Read(const ConcreteReadAttributePath & aPath, AttributeValueEncoder & aEncoder) { - namespace MN = chip::app::Clusters::FixedLabel::Attributes; - namespace UN = unify::matter_bridge::FixedLabel::Attributes; - if (aPath.mClusterId != Clusters::FixedLabel::Id) + namespace MN = chip::app::Clusters::ProxyDiscovery::Attributes; + namespace UN = unify::matter_bridge::ProxyDiscovery::Attributes; + if (aPath.mClusterId != Clusters::ProxyDiscovery::Id) { return CHIP_ERROR_INVALID_ARGUMENT; } ConcreteAttributePath atrpath = ConcreteAttributePath(aPath.mEndpointId, aPath.mClusterId, aPath.mAttributeId); - try { switch (aPath.mAttributeId) { - case MN::FeatureMap::Id: { // type is bitmap32 MN::FeatureMap::TypeInfo::Type value; UN::FeatureMap::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::ClusterRevision::Id: { // type is int16u MN::ClusterRevision::TypeInfo::Type value; UN::ClusterRevision::Get(atrpath, value); @@ -8430,11 +7382,11 @@ FixedLabelAttributeAccess::Read(const ConcreteReadAttributePath & aPath, Attribu return CHIP_NO_ERROR; } -CHIP_ERROR FixedLabelAttributeAccess::Write(const ConcreteDataAttributePath & aPath, AttributeValueDecoder & aDecoder) +CHIP_ERROR ProxyDiscoveryAttributeAccess::Write(const ConcreteDataAttributePath & aPath, AttributeValueDecoder & aDecoder) { - using namespace chip::app::Clusters::FixedLabel; + using namespace chip::app::Clusters::ProxyDiscovery; - if (aPath.mClusterId != Clusters::FixedLabel::Id) + if (aPath.mClusterId != Clusters::ProxyDiscovery::Id) { return CHIP_ERROR_INVALID_ARGUMENT; } @@ -8449,14 +7401,13 @@ CHIP_ERROR FixedLabelAttributeAccess::Write(const ConcreteDataAttributePath & aP nlohmann::json jsn; switch (aPath.mAttributeId) - { - } + {} if (!attribute_name.empty()) { std::string payload_str; std::string topic = "ucl/by-unid/" + unify_node->unify_unid + "/ep" + std::to_string(unify_node->unify_endpoint) + - "/FixedLabel/Attributes/" + attribute_name + "/Desired"; + "/ProxyDiscovery/Attributes/" + attribute_name + "/Desired"; payload_str = jsn.dump(); uic_mqtt_publish(topic.c_str(), payload_str.c_str(), payload_str.length(), true); return CHIP_ERROR_NO_MESSAGE_HANDLER; @@ -8465,15 +7416,15 @@ CHIP_ERROR FixedLabelAttributeAccess::Write(const ConcreteDataAttributePath & aP return CHIP_NO_ERROR; } -void FixedLabelAttributeAccess::reported_updated(const bridged_endpoint * ep, const std::string & cluster, - const std::string & attribute, const nlohmann::json & unify_value) +void ProxyDiscoveryAttributeAccess::reported_updated(const bridged_endpoint * ep, const std::string & cluster, + const std::string & attribute, const nlohmann::json & unify_value) { - namespace MN = chip::app::Clusters::FixedLabel::Attributes; - namespace UN = unify::matter_bridge::FixedLabel::Attributes; + namespace MN = chip::app::Clusters::ProxyDiscovery::Attributes; + namespace UN = unify::matter_bridge::ProxyDiscovery::Attributes; auto cluster_id = device_translator::instance().get_cluster_id(cluster); - if (!cluster_id.has_value() || (cluster_id.value() != Clusters::FixedLabel::Id)) + if (!cluster_id.has_value() || (cluster_id.value() != Clusters::ProxyDiscovery::Id)) { return; } @@ -8487,8 +7438,8 @@ void FixedLabelAttributeAccess::reported_updated(const bridged_endpoint * ep, co } chip::EndpointId node_matter_endpoint = ep->matter_endpoint; - ConcreteAttributePath attrpath = ConcreteAttributePath(node_matter_endpoint, Clusters::FixedLabel::Id, attribute_id.value()); - + ConcreteAttributePath attrpath = + ConcreteAttributePath(node_matter_endpoint, Clusters::ProxyDiscovery::Id, attribute_id.value()); switch (attribute_id.value()) { // type is bitmap32 @@ -8500,7 +7451,7 @@ void FixedLabelAttributeAccess::reported_updated(const bridged_endpoint * ep, co { sl_log_debug(LOG_TAG, "FeatureMap attribute value is %s", unify_value.dump().c_str()); UN::FeatureMap::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::FixedLabel::Id, MN::FeatureMap::Id, + MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::ProxyDiscovery::Id, MN::FeatureMap::Id, ZCL_BITMAP32_ATTRIBUTE_TYPE, reinterpret_cast(&value.value())); } break; @@ -8514,7 +7465,7 @@ void FixedLabelAttributeAccess::reported_updated(const bridged_endpoint * ep, co { sl_log_debug(LOG_TAG, "ClusterRevision attribute value is %s", unify_value.dump().c_str()); UN::ClusterRevision::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::FixedLabel::Id, MN::ClusterRevision::Id, + MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::ProxyDiscovery::Id, MN::ClusterRevision::Id, ZCL_INT16U_ATTRIBUTE_TYPE, reinterpret_cast(&value.value())); } break; @@ -8523,28 +7474,25 @@ void FixedLabelAttributeAccess::reported_updated(const bridged_endpoint * ep, co } CHIP_ERROR -UserLabelAttributeAccess::Read(const ConcreteReadAttributePath & aPath, AttributeValueEncoder & aEncoder) +ProxyValidAttributeAccess::Read(const ConcreteReadAttributePath & aPath, AttributeValueEncoder & aEncoder) { - namespace MN = chip::app::Clusters::UserLabel::Attributes; - namespace UN = unify::matter_bridge::UserLabel::Attributes; - if (aPath.mClusterId != Clusters::UserLabel::Id) + namespace MN = chip::app::Clusters::ProxyValid::Attributes; + namespace UN = unify::matter_bridge::ProxyValid::Attributes; + if (aPath.mClusterId != Clusters::ProxyValid::Id) { return CHIP_ERROR_INVALID_ARGUMENT; } ConcreteAttributePath atrpath = ConcreteAttributePath(aPath.mEndpointId, aPath.mClusterId, aPath.mAttributeId); - try { switch (aPath.mAttributeId) { - case MN::FeatureMap::Id: { // type is bitmap32 MN::FeatureMap::TypeInfo::Type value; UN::FeatureMap::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::ClusterRevision::Id: { // type is int16u MN::ClusterRevision::TypeInfo::Type value; UN::ClusterRevision::Get(atrpath, value); @@ -8562,11 +7510,11 @@ UserLabelAttributeAccess::Read(const ConcreteReadAttributePath & aPath, Attribut return CHIP_NO_ERROR; } -CHIP_ERROR UserLabelAttributeAccess::Write(const ConcreteDataAttributePath & aPath, AttributeValueDecoder & aDecoder) +CHIP_ERROR ProxyValidAttributeAccess::Write(const ConcreteDataAttributePath & aPath, AttributeValueDecoder & aDecoder) { - using namespace chip::app::Clusters::UserLabel; + using namespace chip::app::Clusters::ProxyValid; - if (aPath.mClusterId != Clusters::UserLabel::Id) + if (aPath.mClusterId != Clusters::ProxyValid::Id) { return CHIP_ERROR_INVALID_ARGUMENT; } @@ -8581,14 +7529,13 @@ CHIP_ERROR UserLabelAttributeAccess::Write(const ConcreteDataAttributePath & aPa nlohmann::json jsn; switch (aPath.mAttributeId) - { - } + {} if (!attribute_name.empty()) { std::string payload_str; std::string topic = "ucl/by-unid/" + unify_node->unify_unid + "/ep" + std::to_string(unify_node->unify_endpoint) + - "/UserLabel/Attributes/" + attribute_name + "/Desired"; + "/ProxyValid/Attributes/" + attribute_name + "/Desired"; payload_str = jsn.dump(); uic_mqtt_publish(topic.c_str(), payload_str.c_str(), payload_str.length(), true); return CHIP_ERROR_NO_MESSAGE_HANDLER; @@ -8597,15 +7544,15 @@ CHIP_ERROR UserLabelAttributeAccess::Write(const ConcreteDataAttributePath & aPa return CHIP_NO_ERROR; } -void UserLabelAttributeAccess::reported_updated(const bridged_endpoint * ep, const std::string & cluster, - const std::string & attribute, const nlohmann::json & unify_value) +void ProxyValidAttributeAccess::reported_updated(const bridged_endpoint * ep, const std::string & cluster, + const std::string & attribute, const nlohmann::json & unify_value) { - namespace MN = chip::app::Clusters::UserLabel::Attributes; - namespace UN = unify::matter_bridge::UserLabel::Attributes; + namespace MN = chip::app::Clusters::ProxyValid::Attributes; + namespace UN = unify::matter_bridge::ProxyValid::Attributes; auto cluster_id = device_translator::instance().get_cluster_id(cluster); - if (!cluster_id.has_value() || (cluster_id.value() != Clusters::UserLabel::Id)) + if (!cluster_id.has_value() || (cluster_id.value() != Clusters::ProxyValid::Id)) { return; } @@ -8619,8 +7566,7 @@ void UserLabelAttributeAccess::reported_updated(const bridged_endpoint * ep, con } chip::EndpointId node_matter_endpoint = ep->matter_endpoint; - ConcreteAttributePath attrpath = ConcreteAttributePath(node_matter_endpoint, Clusters::UserLabel::Id, attribute_id.value()); - + ConcreteAttributePath attrpath = ConcreteAttributePath(node_matter_endpoint, Clusters::ProxyValid::Id, attribute_id.value()); switch (attribute_id.value()) { // type is bitmap32 @@ -8632,7 +7578,7 @@ void UserLabelAttributeAccess::reported_updated(const bridged_endpoint * ep, con { sl_log_debug(LOG_TAG, "FeatureMap attribute value is %s", unify_value.dump().c_str()); UN::FeatureMap::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::UserLabel::Id, MN::FeatureMap::Id, + MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::ProxyValid::Id, MN::FeatureMap::Id, ZCL_BITMAP32_ATTRIBUTE_TYPE, reinterpret_cast(&value.value())); } break; @@ -8646,7 +7592,7 @@ void UserLabelAttributeAccess::reported_updated(const bridged_endpoint * ep, con { sl_log_debug(LOG_TAG, "ClusterRevision attribute value is %s", unify_value.dump().c_str()); UN::ClusterRevision::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::UserLabel::Id, MN::ClusterRevision::Id, + MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::ProxyValid::Id, MN::ClusterRevision::Id, ZCL_INT16U_ATTRIBUTE_TYPE, reinterpret_cast(&value.value())); } break; @@ -8655,28 +7601,30 @@ void UserLabelAttributeAccess::reported_updated(const bridged_endpoint * ep, con } CHIP_ERROR -ProxyConfigurationAttributeAccess::Read(const ConcreteReadAttributePath & aPath, AttributeValueEncoder & aEncoder) +BooleanStateAttributeAccess::Read(const ConcreteReadAttributePath & aPath, AttributeValueEncoder & aEncoder) { - namespace MN = chip::app::Clusters::ProxyConfiguration::Attributes; - namespace UN = unify::matter_bridge::ProxyConfiguration::Attributes; - if (aPath.mClusterId != Clusters::ProxyConfiguration::Id) + namespace MN = chip::app::Clusters::BooleanState::Attributes; + namespace UN = unify::matter_bridge::BooleanState::Attributes; + if (aPath.mClusterId != Clusters::BooleanState::Id) { return CHIP_ERROR_INVALID_ARGUMENT; } ConcreteAttributePath atrpath = ConcreteAttributePath(aPath.mEndpointId, aPath.mClusterId, aPath.mAttributeId); - try { switch (aPath.mAttributeId) { - + case MN::StateValue::Id: { // type is boolean + MN::StateValue::TypeInfo::Type value; + UN::StateValue::Get(atrpath, value); + return aEncoder.Encode(value); + } case MN::FeatureMap::Id: { // type is bitmap32 MN::FeatureMap::TypeInfo::Type value; UN::FeatureMap::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::ClusterRevision::Id: { // type is int16u MN::ClusterRevision::TypeInfo::Type value; UN::ClusterRevision::Get(atrpath, value); @@ -8694,11 +7642,11 @@ ProxyConfigurationAttributeAccess::Read(const ConcreteReadAttributePath & aPath, return CHIP_NO_ERROR; } -CHIP_ERROR ProxyConfigurationAttributeAccess::Write(const ConcreteDataAttributePath & aPath, AttributeValueDecoder & aDecoder) +CHIP_ERROR BooleanStateAttributeAccess::Write(const ConcreteDataAttributePath & aPath, AttributeValueDecoder & aDecoder) { - using namespace chip::app::Clusters::ProxyConfiguration; + using namespace chip::app::Clusters::BooleanState; - if (aPath.mClusterId != Clusters::ProxyConfiguration::Id) + if (aPath.mClusterId != Clusters::BooleanState::Id) { return CHIP_ERROR_INVALID_ARGUMENT; } @@ -8713,14 +7661,13 @@ CHIP_ERROR ProxyConfigurationAttributeAccess::Write(const ConcreteDataAttributeP nlohmann::json jsn; switch (aPath.mAttributeId) - { - } + {} if (!attribute_name.empty()) { std::string payload_str; std::string topic = "ucl/by-unid/" + unify_node->unify_unid + "/ep" + std::to_string(unify_node->unify_endpoint) + - "/ProxyConfiguration/Attributes/" + attribute_name + "/Desired"; + "/BooleanState/Attributes/" + attribute_name + "/Desired"; payload_str = jsn.dump(); uic_mqtt_publish(topic.c_str(), payload_str.c_str(), payload_str.length(), true); return CHIP_ERROR_NO_MESSAGE_HANDLER; @@ -8729,15 +7676,15 @@ CHIP_ERROR ProxyConfigurationAttributeAccess::Write(const ConcreteDataAttributeP return CHIP_NO_ERROR; } -void ProxyConfigurationAttributeAccess::reported_updated(const bridged_endpoint * ep, const std::string & cluster, - const std::string & attribute, const nlohmann::json & unify_value) +void BooleanStateAttributeAccess::reported_updated(const bridged_endpoint * ep, const std::string & cluster, + const std::string & attribute, const nlohmann::json & unify_value) { - namespace MN = chip::app::Clusters::ProxyConfiguration::Attributes; - namespace UN = unify::matter_bridge::ProxyConfiguration::Attributes; + namespace MN = chip::app::Clusters::BooleanState::Attributes; + namespace UN = unify::matter_bridge::BooleanState::Attributes; auto cluster_id = device_translator::instance().get_cluster_id(cluster); - if (!cluster_id.has_value() || (cluster_id.value() != Clusters::ProxyConfiguration::Id)) + if (!cluster_id.has_value() || (cluster_id.value() != Clusters::BooleanState::Id)) { return; } @@ -8751,12 +7698,24 @@ void ProxyConfigurationAttributeAccess::reported_updated(const bridged_endpoint } chip::EndpointId node_matter_endpoint = ep->matter_endpoint; - ConcreteAttributePath attrpath = - ConcreteAttributePath(node_matter_endpoint, Clusters::ProxyConfiguration::Id, attribute_id.value()); - + ConcreteAttributePath attrpath = ConcreteAttributePath(node_matter_endpoint, Clusters::BooleanState::Id, attribute_id.value()); switch (attribute_id.value()) { - // type is bitmap32 + // type is boolean + case MN::StateValue::Id: { + using T = MN::StateValue::TypeInfo::Type; + std::optional value = from_json(unify_value); + + if (value.has_value()) + { + sl_log_debug(LOG_TAG, "StateValue attribute value is %s", unify_value.dump().c_str()); + UN::StateValue::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::BooleanState::Id, MN::StateValue::Id, + ZCL_BOOLEAN_ATTRIBUTE_TYPE, reinterpret_cast(&value.value())); + } + break; + } + // type is bitmap32 case MN::FeatureMap::Id: { using T = MN::FeatureMap::TypeInfo::Type; std::optional value = from_json(unify_value); @@ -8765,7 +7724,7 @@ void ProxyConfigurationAttributeAccess::reported_updated(const bridged_endpoint { sl_log_debug(LOG_TAG, "FeatureMap attribute value is %s", unify_value.dump().c_str()); UN::FeatureMap::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::ProxyConfiguration::Id, MN::FeatureMap::Id, + MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::BooleanState::Id, MN::FeatureMap::Id, ZCL_BITMAP32_ATTRIBUTE_TYPE, reinterpret_cast(&value.value())); } break; @@ -8779,7 +7738,7 @@ void ProxyConfigurationAttributeAccess::reported_updated(const bridged_endpoint { sl_log_debug(LOG_TAG, "ClusterRevision attribute value is %s", unify_value.dump().c_str()); UN::ClusterRevision::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::ProxyConfiguration::Id, MN::ClusterRevision::Id, + MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::BooleanState::Id, MN::ClusterRevision::Id, ZCL_INT16U_ATTRIBUTE_TYPE, reinterpret_cast(&value.value())); } break; @@ -8788,28 +7747,50 @@ void ProxyConfigurationAttributeAccess::reported_updated(const bridged_endpoint } CHIP_ERROR -ProxyDiscoveryAttributeAccess::Read(const ConcreteReadAttributePath & aPath, AttributeValueEncoder & aEncoder) +ModeSelectAttributeAccess::Read(const ConcreteReadAttributePath & aPath, AttributeValueEncoder & aEncoder) { - namespace MN = chip::app::Clusters::ProxyDiscovery::Attributes; - namespace UN = unify::matter_bridge::ProxyDiscovery::Attributes; - if (aPath.mClusterId != Clusters::ProxyDiscovery::Id) + namespace MN = chip::app::Clusters::ModeSelect::Attributes; + namespace UN = unify::matter_bridge::ModeSelect::Attributes; + if (aPath.mClusterId != Clusters::ModeSelect::Id) { return CHIP_ERROR_INVALID_ARGUMENT; } ConcreteAttributePath atrpath = ConcreteAttributePath(aPath.mEndpointId, aPath.mClusterId, aPath.mAttributeId); - try { switch (aPath.mAttributeId) { - + case MN::Description::Id: { // type is char_string + MN::Description::TypeInfo::Type value; + UN::Description::Get(atrpath, value); + return aEncoder.Encode(value); + } + case MN::StandardNamespace::Id: { // type is enum16 + MN::StandardNamespace::TypeInfo::Type value; + UN::StandardNamespace::Get(atrpath, value); + return aEncoder.Encode(value); + } + case MN::CurrentMode::Id: { // type is int8u + MN::CurrentMode::TypeInfo::Type value; + UN::CurrentMode::Get(atrpath, value); + return aEncoder.Encode(value); + } + case MN::StartUpMode::Id: { // type is int8u + MN::StartUpMode::TypeInfo::Type value; + UN::StartUpMode::Get(atrpath, value); + return aEncoder.Encode(value); + } + case MN::OnMode::Id: { // type is int8u + MN::OnMode::TypeInfo::Type value; + UN::OnMode::Get(atrpath, value); + return aEncoder.Encode(value); + } case MN::FeatureMap::Id: { // type is bitmap32 MN::FeatureMap::TypeInfo::Type value; UN::FeatureMap::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::ClusterRevision::Id: { // type is int16u MN::ClusterRevision::TypeInfo::Type value; UN::ClusterRevision::Get(atrpath, value); @@ -8827,11 +7808,11 @@ ProxyDiscoveryAttributeAccess::Read(const ConcreteReadAttributePath & aPath, Att return CHIP_NO_ERROR; } -CHIP_ERROR ProxyDiscoveryAttributeAccess::Write(const ConcreteDataAttributePath & aPath, AttributeValueDecoder & aDecoder) +CHIP_ERROR ModeSelectAttributeAccess::Write(const ConcreteDataAttributePath & aPath, AttributeValueDecoder & aDecoder) { - using namespace chip::app::Clusters::ProxyDiscovery; + using namespace chip::app::Clusters::ModeSelect; - if (aPath.mClusterId != Clusters::ProxyDiscovery::Id) + if (aPath.mClusterId != Clusters::ModeSelect::Id) { return CHIP_ERROR_INVALID_ARGUMENT; } @@ -8846,14 +7827,13 @@ CHIP_ERROR ProxyDiscoveryAttributeAccess::Write(const ConcreteDataAttributePath nlohmann::json jsn; switch (aPath.mAttributeId) - { - } + {} if (!attribute_name.empty()) { std::string payload_str; std::string topic = "ucl/by-unid/" + unify_node->unify_unid + "/ep" + std::to_string(unify_node->unify_endpoint) + - "/ProxyDiscovery/Attributes/" + attribute_name + "/Desired"; + "/ModeSelect/Attributes/" + attribute_name + "/Desired"; payload_str = jsn.dump(); uic_mqtt_publish(topic.c_str(), payload_str.c_str(), payload_str.length(), true); return CHIP_ERROR_NO_MESSAGE_HANDLER; @@ -8862,15 +7842,15 @@ CHIP_ERROR ProxyDiscoveryAttributeAccess::Write(const ConcreteDataAttributePath return CHIP_NO_ERROR; } -void ProxyDiscoveryAttributeAccess::reported_updated(const bridged_endpoint * ep, const std::string & cluster, - const std::string & attribute, const nlohmann::json & unify_value) +void ModeSelectAttributeAccess::reported_updated(const bridged_endpoint * ep, const std::string & cluster, + const std::string & attribute, const nlohmann::json & unify_value) { - namespace MN = chip::app::Clusters::ProxyDiscovery::Attributes; - namespace UN = unify::matter_bridge::ProxyDiscovery::Attributes; + namespace MN = chip::app::Clusters::ModeSelect::Attributes; + namespace UN = unify::matter_bridge::ModeSelect::Attributes; auto cluster_id = device_translator::instance().get_cluster_id(cluster); - if (!cluster_id.has_value() || (cluster_id.value() != Clusters::ProxyDiscovery::Id)) + if (!cluster_id.has_value() || (cluster_id.value() != Clusters::ModeSelect::Id)) { return; } @@ -8884,12 +7864,80 @@ void ProxyDiscoveryAttributeAccess::reported_updated(const bridged_endpoint * ep } chip::EndpointId node_matter_endpoint = ep->matter_endpoint; - ConcreteAttributePath attrpath = - ConcreteAttributePath(node_matter_endpoint, Clusters::ProxyDiscovery::Id, attribute_id.value()); - + ConcreteAttributePath attrpath = ConcreteAttributePath(node_matter_endpoint, Clusters::ModeSelect::Id, attribute_id.value()); switch (attribute_id.value()) { - // type is bitmap32 + // type is char_string + case MN::Description::Id: { + using T = MN::Description::TypeInfo::Type; + std::optional value = from_json(unify_value); + + if (value.has_value()) + { + sl_log_debug(LOG_TAG, "Description attribute value is %s", unify_value.dump().c_str()); + UN::Description::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::ModeSelect::Id, MN::Description::Id, + ZCL_CHAR_STRING_ATTRIBUTE_TYPE, reinterpret_cast(&value.value())); + } + break; + } + // type is enum16 + case MN::StandardNamespace::Id: { + using T = MN::StandardNamespace::TypeInfo::Type; + std::optional value = from_json(unify_value); + + if (value.has_value()) + { + sl_log_debug(LOG_TAG, "StandardNamespace attribute value is %s", unify_value.dump().c_str()); + UN::StandardNamespace::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::ModeSelect::Id, MN::StandardNamespace::Id, + ZCL_ENUM16_ATTRIBUTE_TYPE, reinterpret_cast(&value.value())); + } + break; + } + // type is int8u + case MN::CurrentMode::Id: { + using T = MN::CurrentMode::TypeInfo::Type; + std::optional value = from_json(unify_value); + + if (value.has_value()) + { + sl_log_debug(LOG_TAG, "CurrentMode attribute value is %s", unify_value.dump().c_str()); + UN::CurrentMode::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::ModeSelect::Id, MN::CurrentMode::Id, + ZCL_INT8U_ATTRIBUTE_TYPE, reinterpret_cast(&value.value())); + } + break; + } + // type is int8u + case MN::StartUpMode::Id: { + using T = MN::StartUpMode::TypeInfo::Type; + std::optional value = from_json(unify_value); + + if (value.has_value()) + { + sl_log_debug(LOG_TAG, "StartUpMode attribute value is %s", unify_value.dump().c_str()); + UN::StartUpMode::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::ModeSelect::Id, MN::StartUpMode::Id, + ZCL_INT8U_ATTRIBUTE_TYPE, reinterpret_cast(&value.value())); + } + break; + } + // type is int8u + case MN::OnMode::Id: { + using T = MN::OnMode::TypeInfo::Type; + std::optional value = from_json(unify_value); + + if (value.has_value()) + { + sl_log_debug(LOG_TAG, "OnMode attribute value is %s", unify_value.dump().c_str()); + UN::OnMode::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::ModeSelect::Id, MN::OnMode::Id, + ZCL_INT8U_ATTRIBUTE_TYPE, reinterpret_cast(&value.value())); + } + break; + } + // type is bitmap32 case MN::FeatureMap::Id: { using T = MN::FeatureMap::TypeInfo::Type; std::optional value = from_json(unify_value); @@ -8898,7 +7946,7 @@ void ProxyDiscoveryAttributeAccess::reported_updated(const bridged_endpoint * ep { sl_log_debug(LOG_TAG, "FeatureMap attribute value is %s", unify_value.dump().c_str()); UN::FeatureMap::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::ProxyDiscovery::Id, MN::FeatureMap::Id, + MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::ModeSelect::Id, MN::FeatureMap::Id, ZCL_BITMAP32_ATTRIBUTE_TYPE, reinterpret_cast(&value.value())); } break; @@ -8912,7 +7960,7 @@ void ProxyDiscoveryAttributeAccess::reported_updated(const bridged_endpoint * ep { sl_log_debug(LOG_TAG, "ClusterRevision attribute value is %s", unify_value.dump().c_str()); UN::ClusterRevision::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::ProxyDiscovery::Id, MN::ClusterRevision::Id, + MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::ModeSelect::Id, MN::ClusterRevision::Id, ZCL_INT16U_ATTRIBUTE_TYPE, reinterpret_cast(&value.value())); } break; @@ -8921,28 +7969,205 @@ void ProxyDiscoveryAttributeAccess::reported_updated(const bridged_endpoint * ep } CHIP_ERROR -ProxyValidAttributeAccess::Read(const ConcreteReadAttributePath & aPath, AttributeValueEncoder & aEncoder) +DoorLockAttributeAccess::Read(const ConcreteReadAttributePath & aPath, AttributeValueEncoder & aEncoder) { - namespace MN = chip::app::Clusters::ProxyValid::Attributes; - namespace UN = unify::matter_bridge::ProxyValid::Attributes; - if (aPath.mClusterId != Clusters::ProxyValid::Id) + namespace MN = chip::app::Clusters::DoorLock::Attributes; + namespace UN = unify::matter_bridge::DoorLock::Attributes; + if (aPath.mClusterId != Clusters::DoorLock::Id) { return CHIP_ERROR_INVALID_ARGUMENT; } ConcreteAttributePath atrpath = ConcreteAttributePath(aPath.mEndpointId, aPath.mClusterId, aPath.mAttributeId); - try { switch (aPath.mAttributeId) { - + case MN::LockState::Id: { // type is DlLockState + MN::LockState::TypeInfo::Type value; + UN::LockState::Get(atrpath, value); + return aEncoder.Encode(value); + } + case MN::LockType::Id: { // type is DlLockType + MN::LockType::TypeInfo::Type value; + UN::LockType::Get(atrpath, value); + return aEncoder.Encode(value); + } + case MN::ActuatorEnabled::Id: { // type is boolean + MN::ActuatorEnabled::TypeInfo::Type value; + UN::ActuatorEnabled::Get(atrpath, value); + return aEncoder.Encode(value); + } + case MN::DoorState::Id: { // type is DlDoorState + MN::DoorState::TypeInfo::Type value; + UN::DoorState::Get(atrpath, value); + return aEncoder.Encode(value); + } + case MN::DoorOpenEvents::Id: { // type is int32u + MN::DoorOpenEvents::TypeInfo::Type value; + UN::DoorOpenEvents::Get(atrpath, value); + return aEncoder.Encode(value); + } + case MN::DoorClosedEvents::Id: { // type is int32u + MN::DoorClosedEvents::TypeInfo::Type value; + UN::DoorClosedEvents::Get(atrpath, value); + return aEncoder.Encode(value); + } + case MN::OpenPeriod::Id: { // type is int16u + MN::OpenPeriod::TypeInfo::Type value; + UN::OpenPeriod::Get(atrpath, value); + return aEncoder.Encode(value); + } + case MN::NumberOfTotalUsersSupported::Id: { // type is int16u + MN::NumberOfTotalUsersSupported::TypeInfo::Type value; + UN::NumberOfTotalUsersSupported::Get(atrpath, value); + return aEncoder.Encode(value); + } + case MN::NumberOfPINUsersSupported::Id: { // type is int16u + MN::NumberOfPINUsersSupported::TypeInfo::Type value; + UN::NumberOfPINUsersSupported::Get(atrpath, value); + return aEncoder.Encode(value); + } + case MN::NumberOfRFIDUsersSupported::Id: { // type is int16u + MN::NumberOfRFIDUsersSupported::TypeInfo::Type value; + UN::NumberOfRFIDUsersSupported::Get(atrpath, value); + return aEncoder.Encode(value); + } + case MN::NumberOfWeekDaySchedulesSupportedPerUser::Id: { // type is int8u + MN::NumberOfWeekDaySchedulesSupportedPerUser::TypeInfo::Type value; + UN::NumberOfWeekDaySchedulesSupportedPerUser::Get(atrpath, value); + return aEncoder.Encode(value); + } + case MN::NumberOfYearDaySchedulesSupportedPerUser::Id: { // type is int8u + MN::NumberOfYearDaySchedulesSupportedPerUser::TypeInfo::Type value; + UN::NumberOfYearDaySchedulesSupportedPerUser::Get(atrpath, value); + return aEncoder.Encode(value); + } + case MN::NumberOfHolidaySchedulesSupported::Id: { // type is int8u + MN::NumberOfHolidaySchedulesSupported::TypeInfo::Type value; + UN::NumberOfHolidaySchedulesSupported::Get(atrpath, value); + return aEncoder.Encode(value); + } + case MN::MaxPINCodeLength::Id: { // type is int8u + MN::MaxPINCodeLength::TypeInfo::Type value; + UN::MaxPINCodeLength::Get(atrpath, value); + return aEncoder.Encode(value); + } + case MN::MinPINCodeLength::Id: { // type is int8u + MN::MinPINCodeLength::TypeInfo::Type value; + UN::MinPINCodeLength::Get(atrpath, value); + return aEncoder.Encode(value); + } + case MN::MaxRFIDCodeLength::Id: { // type is int8u + MN::MaxRFIDCodeLength::TypeInfo::Type value; + UN::MaxRFIDCodeLength::Get(atrpath, value); + return aEncoder.Encode(value); + } + case MN::MinRFIDCodeLength::Id: { // type is int8u + MN::MinRFIDCodeLength::TypeInfo::Type value; + UN::MinRFIDCodeLength::Get(atrpath, value); + return aEncoder.Encode(value); + } + case MN::CredentialRulesSupport::Id: { // type is DlCredentialRuleMask + MN::CredentialRulesSupport::TypeInfo::Type value; + UN::CredentialRulesSupport::Get(atrpath, value); + return aEncoder.Encode(value); + } + case MN::NumberOfCredentialsSupportedPerUser::Id: { // type is int8u + MN::NumberOfCredentialsSupportedPerUser::TypeInfo::Type value; + UN::NumberOfCredentialsSupportedPerUser::Get(atrpath, value); + return aEncoder.Encode(value); + } + case MN::Language::Id: { // type is char_string + MN::Language::TypeInfo::Type value; + UN::Language::Get(atrpath, value); + return aEncoder.Encode(value); + } + case MN::LEDSettings::Id: { // type is int8u + MN::LEDSettings::TypeInfo::Type value; + UN::LEDSettings::Get(atrpath, value); + return aEncoder.Encode(value); + } + case MN::AutoRelockTime::Id: { // type is int32u + MN::AutoRelockTime::TypeInfo::Type value; + UN::AutoRelockTime::Get(atrpath, value); + return aEncoder.Encode(value); + } + case MN::SoundVolume::Id: { // type is int8u + MN::SoundVolume::TypeInfo::Type value; + UN::SoundVolume::Get(atrpath, value); + return aEncoder.Encode(value); + } + case MN::OperatingMode::Id: { // type is DlOperatingMode + MN::OperatingMode::TypeInfo::Type value; + UN::OperatingMode::Get(atrpath, value); + return aEncoder.Encode(value); + } + case MN::SupportedOperatingModes::Id: { // type is DlSupportedOperatingModes + MN::SupportedOperatingModes::TypeInfo::Type value; + UN::SupportedOperatingModes::Get(atrpath, value); + return aEncoder.Encode(value); + } + case MN::DefaultConfigurationRegister::Id: { // type is DlDefaultConfigurationRegister + MN::DefaultConfigurationRegister::TypeInfo::Type value; + UN::DefaultConfigurationRegister::Get(atrpath, value); + return aEncoder.Encode(value); + } + case MN::EnableLocalProgramming::Id: { // type is boolean + MN::EnableLocalProgramming::TypeInfo::Type value; + UN::EnableLocalProgramming::Get(atrpath, value); + return aEncoder.Encode(value); + } + case MN::EnableOneTouchLocking::Id: { // type is boolean + MN::EnableOneTouchLocking::TypeInfo::Type value; + UN::EnableOneTouchLocking::Get(atrpath, value); + return aEncoder.Encode(value); + } + case MN::EnableInsideStatusLED::Id: { // type is boolean + MN::EnableInsideStatusLED::TypeInfo::Type value; + UN::EnableInsideStatusLED::Get(atrpath, value); + return aEncoder.Encode(value); + } + case MN::EnablePrivacyModeButton::Id: { // type is boolean + MN::EnablePrivacyModeButton::TypeInfo::Type value; + UN::EnablePrivacyModeButton::Get(atrpath, value); + return aEncoder.Encode(value); + } + case MN::LocalProgrammingFeatures::Id: { // type is DlLocalProgrammingFeatures + MN::LocalProgrammingFeatures::TypeInfo::Type value; + UN::LocalProgrammingFeatures::Get(atrpath, value); + return aEncoder.Encode(value); + } + case MN::WrongCodeEntryLimit::Id: { // type is int8u + MN::WrongCodeEntryLimit::TypeInfo::Type value; + UN::WrongCodeEntryLimit::Get(atrpath, value); + return aEncoder.Encode(value); + } + case MN::UserCodeTemporaryDisableTime::Id: { // type is int8u + MN::UserCodeTemporaryDisableTime::TypeInfo::Type value; + UN::UserCodeTemporaryDisableTime::Get(atrpath, value); + return aEncoder.Encode(value); + } + case MN::SendPINOverTheAir::Id: { // type is boolean + MN::SendPINOverTheAir::TypeInfo::Type value; + UN::SendPINOverTheAir::Get(atrpath, value); + return aEncoder.Encode(value); + } + case MN::RequirePINforRemoteOperation::Id: { // type is boolean + MN::RequirePINforRemoteOperation::TypeInfo::Type value; + UN::RequirePINforRemoteOperation::Get(atrpath, value); + return aEncoder.Encode(value); + } + case MN::ExpiringUserTimeout::Id: { // type is int16u + MN::ExpiringUserTimeout::TypeInfo::Type value; + UN::ExpiringUserTimeout::Get(atrpath, value); + return aEncoder.Encode(value); + } case MN::FeatureMap::Id: { // type is bitmap32 MN::FeatureMap::TypeInfo::Type value; UN::FeatureMap::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::ClusterRevision::Id: { // type is int16u MN::ClusterRevision::TypeInfo::Type value; UN::ClusterRevision::Get(atrpath, value); @@ -8960,11 +8185,11 @@ ProxyValidAttributeAccess::Read(const ConcreteReadAttributePath & aPath, Attribu return CHIP_NO_ERROR; } -CHIP_ERROR ProxyValidAttributeAccess::Write(const ConcreteDataAttributePath & aPath, AttributeValueDecoder & aDecoder) +CHIP_ERROR DoorLockAttributeAccess::Write(const ConcreteDataAttributePath & aPath, AttributeValueDecoder & aDecoder) { - using namespace chip::app::Clusters::ProxyValid; + using namespace chip::app::Clusters::DoorLock; - if (aPath.mClusterId != Clusters::ProxyValid::Id) + if (aPath.mClusterId != Clusters::DoorLock::Id) { return CHIP_ERROR_INVALID_ARGUMENT; } @@ -8979,14 +8204,13 @@ CHIP_ERROR ProxyValidAttributeAccess::Write(const ConcreteDataAttributePath & aP nlohmann::json jsn; switch (aPath.mAttributeId) - { - } + {} if (!attribute_name.empty()) { std::string payload_str; std::string topic = "ucl/by-unid/" + unify_node->unify_unid + "/ep" + std::to_string(unify_node->unify_endpoint) + - "/ProxyValid/Attributes/" + attribute_name + "/Desired"; + "/DoorLock/Attributes/" + attribute_name + "/Desired"; payload_str = jsn.dump(); uic_mqtt_publish(topic.c_str(), payload_str.c_str(), payload_str.length(), true); return CHIP_ERROR_NO_MESSAGE_HANDLER; @@ -8995,15 +8219,15 @@ CHIP_ERROR ProxyValidAttributeAccess::Write(const ConcreteDataAttributePath & aP return CHIP_NO_ERROR; } -void ProxyValidAttributeAccess::reported_updated(const bridged_endpoint * ep, const std::string & cluster, - const std::string & attribute, const nlohmann::json & unify_value) +void DoorLockAttributeAccess::reported_updated(const bridged_endpoint * ep, const std::string & cluster, + const std::string & attribute, const nlohmann::json & unify_value) { - namespace MN = chip::app::Clusters::ProxyValid::Attributes; - namespace UN = unify::matter_bridge::ProxyValid::Attributes; + namespace MN = chip::app::Clusters::DoorLock::Attributes; + namespace UN = unify::matter_bridge::DoorLock::Attributes; auto cluster_id = device_translator::instance().get_cluster_id(cluster); - if (!cluster_id.has_value() || (cluster_id.value() != Clusters::ProxyValid::Id)) + if (!cluster_id.has_value() || (cluster_id.value() != Clusters::DoorLock::Id)) { return; } @@ -9017,1838 +8241,518 @@ void ProxyValidAttributeAccess::reported_updated(const bridged_endpoint * ep, co } chip::EndpointId node_matter_endpoint = ep->matter_endpoint; - ConcreteAttributePath attrpath = ConcreteAttributePath(node_matter_endpoint, Clusters::ProxyValid::Id, attribute_id.value()); - + ConcreteAttributePath attrpath = ConcreteAttributePath(node_matter_endpoint, Clusters::DoorLock::Id, attribute_id.value()); switch (attribute_id.value()) { - // type is bitmap32 - case MN::FeatureMap::Id: { - using T = MN::FeatureMap::TypeInfo::Type; + // type is DlLockState + case MN::LockState::Id: { + using T = MN::LockState::TypeInfo::Type; std::optional value = from_json(unify_value); if (value.has_value()) { - sl_log_debug(LOG_TAG, "FeatureMap attribute value is %s", unify_value.dump().c_str()); - UN::FeatureMap::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::ProxyValid::Id, MN::FeatureMap::Id, - ZCL_BITMAP32_ATTRIBUTE_TYPE, reinterpret_cast(&value.value())); + sl_log_debug(LOG_TAG, "LockState attribute value is %s", unify_value.dump().c_str()); + UN::LockState::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::DoorLock::Id, MN::LockState::Id, + ZCL_ENUM8_ATTRIBUTE_TYPE, reinterpret_cast(&value.value())); } break; } - // type is int16u - case MN::ClusterRevision::Id: { - using T = MN::ClusterRevision::TypeInfo::Type; + // type is DlLockType + case MN::LockType::Id: { + using T = MN::LockType::TypeInfo::Type; std::optional value = from_json(unify_value); if (value.has_value()) { - sl_log_debug(LOG_TAG, "ClusterRevision attribute value is %s", unify_value.dump().c_str()); - UN::ClusterRevision::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::ProxyValid::Id, MN::ClusterRevision::Id, - ZCL_INT16U_ATTRIBUTE_TYPE, reinterpret_cast(&value.value())); + sl_log_debug(LOG_TAG, "LockType attribute value is %s", unify_value.dump().c_str()); + UN::LockType::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::DoorLock::Id, MN::LockType::Id, + ZCL_ENUM8_ATTRIBUTE_TYPE, reinterpret_cast(&value.value())); } break; } - } -} + // type is boolean + case MN::ActuatorEnabled::Id: { + using T = MN::ActuatorEnabled::TypeInfo::Type; + std::optional value = from_json(unify_value); -CHIP_ERROR -BooleanStateAttributeAccess::Read(const ConcreteReadAttributePath & aPath, AttributeValueEncoder & aEncoder) -{ - namespace MN = chip::app::Clusters::BooleanState::Attributes; - namespace UN = unify::matter_bridge::BooleanState::Attributes; - if (aPath.mClusterId != Clusters::BooleanState::Id) - { - return CHIP_ERROR_INVALID_ARGUMENT; - } - - ConcreteAttributePath atrpath = ConcreteAttributePath(aPath.mEndpointId, aPath.mClusterId, aPath.mAttributeId); - - try - { - switch (aPath.mAttributeId) + if (value.has_value()) { - - case MN::StateValue::Id: { // type is boolean - MN::StateValue::TypeInfo::Type value; - UN::StateValue::Get(atrpath, value); - return aEncoder.Encode(value); - } - - case MN::FeatureMap::Id: { // type is bitmap32 - MN::FeatureMap::TypeInfo::Type value; - UN::FeatureMap::Get(atrpath, value); - return aEncoder.Encode(value); - } - - case MN::ClusterRevision::Id: { // type is int16u - MN::ClusterRevision::TypeInfo::Type value; - UN::ClusterRevision::Get(atrpath, value); - return aEncoder.Encode(value); - } + sl_log_debug(LOG_TAG, "ActuatorEnabled attribute value is %s", unify_value.dump().c_str()); + UN::ActuatorEnabled::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::DoorLock::Id, MN::ActuatorEnabled::Id, + ZCL_BOOLEAN_ATTRIBUTE_TYPE, reinterpret_cast(&value.value())); } - } catch (const std::out_of_range & e) - { - sl_log_info(LOG_TAG, - "The request attribute Path is not found in the attribute state " - "contanier, %s\n", - e.what()); - return CHIP_ERROR_NO_MESSAGE_HANDLER; - } - return CHIP_NO_ERROR; -} - -CHIP_ERROR BooleanStateAttributeAccess::Write(const ConcreteDataAttributePath & aPath, AttributeValueDecoder & aDecoder) -{ - using namespace chip::app::Clusters::BooleanState; - - if (aPath.mClusterId != Clusters::BooleanState::Id) - { - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto unify_node = m_node_state_monitor.bridged_endpoint(aPath.mEndpointId); - - if (!unify_node) - { - return CHIP_ERROR_NO_MESSAGE_HANDLER; - } - - std::string attribute_name; - nlohmann::json jsn; - - switch (aPath.mAttributeId) - { - } - - if (!attribute_name.empty()) - { - std::string payload_str; - std::string topic = "ucl/by-unid/" + unify_node->unify_unid + "/ep" + std::to_string(unify_node->unify_endpoint) + - "/BooleanState/Attributes/" + attribute_name + "/Desired"; - payload_str = jsn.dump(); - uic_mqtt_publish(topic.c_str(), payload_str.c_str(), payload_str.length(), true); - return CHIP_ERROR_NO_MESSAGE_HANDLER; - } - - return CHIP_NO_ERROR; -} - -void BooleanStateAttributeAccess::reported_updated(const bridged_endpoint * ep, const std::string & cluster, - const std::string & attribute, const nlohmann::json & unify_value) -{ - namespace MN = chip::app::Clusters::BooleanState::Attributes; - namespace UN = unify::matter_bridge::BooleanState::Attributes; - - auto cluster_id = device_translator::instance().get_cluster_id(cluster); - - if (!cluster_id.has_value() || (cluster_id.value() != Clusters::BooleanState::Id)) - { - return; + break; } + // type is DlDoorState + case MN::DoorState::Id: { + using T = MN::DoorState::TypeInfo::Type; + std::optional value = from_json(unify_value); - // get attribute id - auto attribute_id = device_translator::instance().get_attribute_id(cluster, attribute); - - if (!attribute_id.has_value()) - { - return; + if (value.has_value()) + { + sl_log_debug(LOG_TAG, "DoorState attribute value is %s", unify_value.dump().c_str()); + UN::DoorState::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::DoorLock::Id, MN::DoorState::Id, + ZCL_ENUM8_ATTRIBUTE_TYPE, reinterpret_cast(&value.value())); + } + break; } - - chip::EndpointId node_matter_endpoint = ep->matter_endpoint; - ConcreteAttributePath attrpath = ConcreteAttributePath(node_matter_endpoint, Clusters::BooleanState::Id, attribute_id.value()); - - switch (attribute_id.value()) - { - // type is boolean - case MN::StateValue::Id: { - using T = MN::StateValue::TypeInfo::Type; + // type is int32u + case MN::DoorOpenEvents::Id: { + using T = MN::DoorOpenEvents::TypeInfo::Type; std::optional value = from_json(unify_value); if (value.has_value()) { - sl_log_debug(LOG_TAG, "StateValue attribute value is %s", unify_value.dump().c_str()); - UN::StateValue::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::BooleanState::Id, MN::StateValue::Id, - ZCL_BOOLEAN_ATTRIBUTE_TYPE, reinterpret_cast(&value.value())); + sl_log_debug(LOG_TAG, "DoorOpenEvents attribute value is %s", unify_value.dump().c_str()); + UN::DoorOpenEvents::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::DoorLock::Id, MN::DoorOpenEvents::Id, + ZCL_INT32U_ATTRIBUTE_TYPE, reinterpret_cast(&value.value())); } break; } - // type is bitmap32 - case MN::FeatureMap::Id: { - using T = MN::FeatureMap::TypeInfo::Type; + // type is int32u + case MN::DoorClosedEvents::Id: { + using T = MN::DoorClosedEvents::TypeInfo::Type; std::optional value = from_json(unify_value); if (value.has_value()) { - sl_log_debug(LOG_TAG, "FeatureMap attribute value is %s", unify_value.dump().c_str()); - UN::FeatureMap::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::BooleanState::Id, MN::FeatureMap::Id, - ZCL_BITMAP32_ATTRIBUTE_TYPE, reinterpret_cast(&value.value())); + sl_log_debug(LOG_TAG, "DoorClosedEvents attribute value is %s", unify_value.dump().c_str()); + UN::DoorClosedEvents::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::DoorLock::Id, MN::DoorClosedEvents::Id, + ZCL_INT32U_ATTRIBUTE_TYPE, reinterpret_cast(&value.value())); } break; } // type is int16u - case MN::ClusterRevision::Id: { - using T = MN::ClusterRevision::TypeInfo::Type; + case MN::OpenPeriod::Id: { + using T = MN::OpenPeriod::TypeInfo::Type; std::optional value = from_json(unify_value); if (value.has_value()) { - sl_log_debug(LOG_TAG, "ClusterRevision attribute value is %s", unify_value.dump().c_str()); - UN::ClusterRevision::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::BooleanState::Id, MN::ClusterRevision::Id, + sl_log_debug(LOG_TAG, "OpenPeriod attribute value is %s", unify_value.dump().c_str()); + UN::OpenPeriod::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::DoorLock::Id, MN::OpenPeriod::Id, ZCL_INT16U_ATTRIBUTE_TYPE, reinterpret_cast(&value.value())); } break; } - } -} - -CHIP_ERROR -ModeSelectAttributeAccess::Read(const ConcreteReadAttributePath & aPath, AttributeValueEncoder & aEncoder) -{ - namespace MN = chip::app::Clusters::ModeSelect::Attributes; - namespace UN = unify::matter_bridge::ModeSelect::Attributes; - if (aPath.mClusterId != Clusters::ModeSelect::Id) - { - return CHIP_ERROR_INVALID_ARGUMENT; - } - - ConcreteAttributePath atrpath = ConcreteAttributePath(aPath.mEndpointId, aPath.mClusterId, aPath.mAttributeId); + // type is int16u + case MN::NumberOfTotalUsersSupported::Id: { + using T = MN::NumberOfTotalUsersSupported::TypeInfo::Type; + std::optional value = from_json(unify_value); - try - { - switch (aPath.mAttributeId) + if (value.has_value()) { - - case MN::Description::Id: { // type is char_string - MN::Description::TypeInfo::Type value; - UN::Description::Get(atrpath, value); - return aEncoder.Encode(value); - } - - case MN::StandardNamespace::Id: { // type is enum16 - MN::StandardNamespace::TypeInfo::Type value; - UN::StandardNamespace::Get(atrpath, value); - return aEncoder.Encode(value); - } - - case MN::CurrentMode::Id: { // type is int8u - MN::CurrentMode::TypeInfo::Type value; - UN::CurrentMode::Get(atrpath, value); - return aEncoder.Encode(value); + sl_log_debug(LOG_TAG, "NumberOfTotalUsersSupported attribute value is %s", unify_value.dump().c_str()); + UN::NumberOfTotalUsersSupported::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::DoorLock::Id, + MN::NumberOfTotalUsersSupported::Id, ZCL_INT16U_ATTRIBUTE_TYPE, + reinterpret_cast(&value.value())); } + break; + } + // type is int16u + case MN::NumberOfPINUsersSupported::Id: { + using T = MN::NumberOfPINUsersSupported::TypeInfo::Type; + std::optional value = from_json(unify_value); - case MN::StartUpMode::Id: { // type is int8u - MN::StartUpMode::TypeInfo::Type value; - UN::StartUpMode::Get(atrpath, value); - return aEncoder.Encode(value); + if (value.has_value()) + { + sl_log_debug(LOG_TAG, "NumberOfPINUsersSupported attribute value is %s", unify_value.dump().c_str()); + UN::NumberOfPINUsersSupported::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::DoorLock::Id, MN::NumberOfPINUsersSupported::Id, + ZCL_INT16U_ATTRIBUTE_TYPE, reinterpret_cast(&value.value())); } + break; + } + // type is int16u + case MN::NumberOfRFIDUsersSupported::Id: { + using T = MN::NumberOfRFIDUsersSupported::TypeInfo::Type; + std::optional value = from_json(unify_value); - case MN::OnMode::Id: { // type is int8u - MN::OnMode::TypeInfo::Type value; - UN::OnMode::Get(atrpath, value); - return aEncoder.Encode(value); + if (value.has_value()) + { + sl_log_debug(LOG_TAG, "NumberOfRFIDUsersSupported attribute value is %s", unify_value.dump().c_str()); + UN::NumberOfRFIDUsersSupported::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::DoorLock::Id, MN::NumberOfRFIDUsersSupported::Id, + ZCL_INT16U_ATTRIBUTE_TYPE, reinterpret_cast(&value.value())); } + break; + } + // type is int8u + case MN::NumberOfWeekDaySchedulesSupportedPerUser::Id: { + using T = MN::NumberOfWeekDaySchedulesSupportedPerUser::TypeInfo::Type; + std::optional value = from_json(unify_value); - case MN::FeatureMap::Id: { // type is bitmap32 - MN::FeatureMap::TypeInfo::Type value; - UN::FeatureMap::Get(atrpath, value); - return aEncoder.Encode(value); + if (value.has_value()) + { + sl_log_debug(LOG_TAG, "NumberOfWeekDaySchedulesSupportedPerUser attribute value is %s", unify_value.dump().c_str()); + UN::NumberOfWeekDaySchedulesSupportedPerUser::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::DoorLock::Id, + MN::NumberOfWeekDaySchedulesSupportedPerUser::Id, ZCL_INT8U_ATTRIBUTE_TYPE, + reinterpret_cast(&value.value())); } - - case MN::ClusterRevision::Id: { // type is int16u - MN::ClusterRevision::TypeInfo::Type value; - UN::ClusterRevision::Get(atrpath, value); - return aEncoder.Encode(value); - } - } - } catch (const std::out_of_range & e) - { - sl_log_info(LOG_TAG, - "The request attribute Path is not found in the attribute state " - "contanier, %s\n", - e.what()); - return CHIP_ERROR_NO_MESSAGE_HANDLER; - } - return CHIP_NO_ERROR; -} - -CHIP_ERROR ModeSelectAttributeAccess::Write(const ConcreteDataAttributePath & aPath, AttributeValueDecoder & aDecoder) -{ - using namespace chip::app::Clusters::ModeSelect; - - if (aPath.mClusterId != Clusters::ModeSelect::Id) - { - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto unify_node = m_node_state_monitor.bridged_endpoint(aPath.mEndpointId); - - if (!unify_node) - { - return CHIP_ERROR_NO_MESSAGE_HANDLER; - } - - std::string attribute_name; - nlohmann::json jsn; - - switch (aPath.mAttributeId) - { - } - - if (!attribute_name.empty()) - { - std::string payload_str; - std::string topic = "ucl/by-unid/" + unify_node->unify_unid + "/ep" + std::to_string(unify_node->unify_endpoint) + - "/ModeSelect/Attributes/" + attribute_name + "/Desired"; - payload_str = jsn.dump(); - uic_mqtt_publish(topic.c_str(), payload_str.c_str(), payload_str.length(), true); - return CHIP_ERROR_NO_MESSAGE_HANDLER; - } - - return CHIP_NO_ERROR; -} - -void ModeSelectAttributeAccess::reported_updated(const bridged_endpoint * ep, const std::string & cluster, - const std::string & attribute, const nlohmann::json & unify_value) -{ - namespace MN = chip::app::Clusters::ModeSelect::Attributes; - namespace UN = unify::matter_bridge::ModeSelect::Attributes; - - auto cluster_id = device_translator::instance().get_cluster_id(cluster); - - if (!cluster_id.has_value() || (cluster_id.value() != Clusters::ModeSelect::Id)) - { - return; - } - - // get attribute id - auto attribute_id = device_translator::instance().get_attribute_id(cluster, attribute); - - if (!attribute_id.has_value()) - { - return; - } - - chip::EndpointId node_matter_endpoint = ep->matter_endpoint; - ConcreteAttributePath attrpath = ConcreteAttributePath(node_matter_endpoint, Clusters::ModeSelect::Id, attribute_id.value()); - - switch (attribute_id.value()) - { - // type is char_string - case MN::Description::Id: { - using T = MN::Description::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) - { - sl_log_debug(LOG_TAG, "Description attribute value is %s", unify_value.dump().c_str()); - UN::Description::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::ModeSelect::Id, MN::Description::Id, - ZCL_CHAR_STRING_ATTRIBUTE_TYPE, reinterpret_cast(&value.value())); - } - break; - } - // type is enum16 - case MN::StandardNamespace::Id: { - using T = MN::StandardNamespace::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) - { - sl_log_debug(LOG_TAG, "StandardNamespace attribute value is %s", unify_value.dump().c_str()); - UN::StandardNamespace::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::ModeSelect::Id, MN::StandardNamespace::Id, - ZCL_ENUM16_ATTRIBUTE_TYPE, reinterpret_cast(&value.value())); - } - break; - } - // type is int8u - case MN::CurrentMode::Id: { - using T = MN::CurrentMode::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) - { - sl_log_debug(LOG_TAG, "CurrentMode attribute value is %s", unify_value.dump().c_str()); - UN::CurrentMode::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::ModeSelect::Id, MN::CurrentMode::Id, - ZCL_INT8U_ATTRIBUTE_TYPE, reinterpret_cast(&value.value())); - } - break; - } - // type is int8u - case MN::StartUpMode::Id: { - using T = MN::StartUpMode::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) - { - sl_log_debug(LOG_TAG, "StartUpMode attribute value is %s", unify_value.dump().c_str()); - UN::StartUpMode::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::ModeSelect::Id, MN::StartUpMode::Id, - ZCL_INT8U_ATTRIBUTE_TYPE, reinterpret_cast(&value.value())); - } - break; - } - // type is int8u - case MN::OnMode::Id: { - using T = MN::OnMode::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) - { - sl_log_debug(LOG_TAG, "OnMode attribute value is %s", unify_value.dump().c_str()); - UN::OnMode::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::ModeSelect::Id, MN::OnMode::Id, - ZCL_INT8U_ATTRIBUTE_TYPE, reinterpret_cast(&value.value())); - } - break; - } - // type is bitmap32 - case MN::FeatureMap::Id: { - using T = MN::FeatureMap::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) - { - sl_log_debug(LOG_TAG, "FeatureMap attribute value is %s", unify_value.dump().c_str()); - UN::FeatureMap::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::ModeSelect::Id, MN::FeatureMap::Id, - ZCL_BITMAP32_ATTRIBUTE_TYPE, reinterpret_cast(&value.value())); - } - break; - } - // type is int16u - case MN::ClusterRevision::Id: { - using T = MN::ClusterRevision::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) - { - sl_log_debug(LOG_TAG, "ClusterRevision attribute value is %s", unify_value.dump().c_str()); - UN::ClusterRevision::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::ModeSelect::Id, MN::ClusterRevision::Id, - ZCL_INT16U_ATTRIBUTE_TYPE, reinterpret_cast(&value.value())); - } - break; - } - } -} - -CHIP_ERROR -DoorLockAttributeAccess::Read(const ConcreteReadAttributePath & aPath, AttributeValueEncoder & aEncoder) -{ - namespace MN = chip::app::Clusters::DoorLock::Attributes; - namespace UN = unify::matter_bridge::DoorLock::Attributes; - if (aPath.mClusterId != Clusters::DoorLock::Id) - { - return CHIP_ERROR_INVALID_ARGUMENT; - } - - ConcreteAttributePath atrpath = ConcreteAttributePath(aPath.mEndpointId, aPath.mClusterId, aPath.mAttributeId); - - try - { - switch (aPath.mAttributeId) - { - - case MN::LockState::Id: { // type is DlLockState - MN::LockState::TypeInfo::Type value; - UN::LockState::Get(atrpath, value); - return aEncoder.Encode(value); - } - - case MN::LockType::Id: { // type is DlLockType - MN::LockType::TypeInfo::Type value; - UN::LockType::Get(atrpath, value); - return aEncoder.Encode(value); - } - - case MN::ActuatorEnabled::Id: { // type is boolean - MN::ActuatorEnabled::TypeInfo::Type value; - UN::ActuatorEnabled::Get(atrpath, value); - return aEncoder.Encode(value); - } - - case MN::DoorState::Id: { // type is DlDoorState - MN::DoorState::TypeInfo::Type value; - UN::DoorState::Get(atrpath, value); - return aEncoder.Encode(value); - } - - case MN::DoorOpenEvents::Id: { // type is int32u - MN::DoorOpenEvents::TypeInfo::Type value; - UN::DoorOpenEvents::Get(atrpath, value); - return aEncoder.Encode(value); - } - - case MN::DoorClosedEvents::Id: { // type is int32u - MN::DoorClosedEvents::TypeInfo::Type value; - UN::DoorClosedEvents::Get(atrpath, value); - return aEncoder.Encode(value); - } - - case MN::OpenPeriod::Id: { // type is int16u - MN::OpenPeriod::TypeInfo::Type value; - UN::OpenPeriod::Get(atrpath, value); - return aEncoder.Encode(value); - } - - case MN::NumberOfTotalUsersSupported::Id: { // type is int16u - MN::NumberOfTotalUsersSupported::TypeInfo::Type value; - UN::NumberOfTotalUsersSupported::Get(atrpath, value); - return aEncoder.Encode(value); - } - - case MN::NumberOfPINUsersSupported::Id: { // type is int16u - MN::NumberOfPINUsersSupported::TypeInfo::Type value; - UN::NumberOfPINUsersSupported::Get(atrpath, value); - return aEncoder.Encode(value); - } - - case MN::NumberOfRFIDUsersSupported::Id: { // type is int16u - MN::NumberOfRFIDUsersSupported::TypeInfo::Type value; - UN::NumberOfRFIDUsersSupported::Get(atrpath, value); - return aEncoder.Encode(value); - } - - case MN::NumberOfWeekDaySchedulesSupportedPerUser::Id: { // type is int8u - MN::NumberOfWeekDaySchedulesSupportedPerUser::TypeInfo::Type value; - UN::NumberOfWeekDaySchedulesSupportedPerUser::Get(atrpath, value); - return aEncoder.Encode(value); - } - - case MN::NumberOfYearDaySchedulesSupportedPerUser::Id: { // type is int8u - MN::NumberOfYearDaySchedulesSupportedPerUser::TypeInfo::Type value; - UN::NumberOfYearDaySchedulesSupportedPerUser::Get(atrpath, value); - return aEncoder.Encode(value); - } - - case MN::NumberOfHolidaySchedulesSupported::Id: { // type is int8u - MN::NumberOfHolidaySchedulesSupported::TypeInfo::Type value; - UN::NumberOfHolidaySchedulesSupported::Get(atrpath, value); - return aEncoder.Encode(value); - } - - case MN::MaxPINCodeLength::Id: { // type is int8u - MN::MaxPINCodeLength::TypeInfo::Type value; - UN::MaxPINCodeLength::Get(atrpath, value); - return aEncoder.Encode(value); - } - - case MN::MinPINCodeLength::Id: { // type is int8u - MN::MinPINCodeLength::TypeInfo::Type value; - UN::MinPINCodeLength::Get(atrpath, value); - return aEncoder.Encode(value); - } - - case MN::MaxRFIDCodeLength::Id: { // type is int8u - MN::MaxRFIDCodeLength::TypeInfo::Type value; - UN::MaxRFIDCodeLength::Get(atrpath, value); - return aEncoder.Encode(value); - } - - case MN::MinRFIDCodeLength::Id: { // type is int8u - MN::MinRFIDCodeLength::TypeInfo::Type value; - UN::MinRFIDCodeLength::Get(atrpath, value); - return aEncoder.Encode(value); - } - - case MN::CredentialRulesSupport::Id: { // type is DlCredentialRuleMask - MN::CredentialRulesSupport::TypeInfo::Type value; - UN::CredentialRulesSupport::Get(atrpath, value); - return aEncoder.Encode(value); - } - - case MN::NumberOfCredentialsSupportedPerUser::Id: { // type is int8u - MN::NumberOfCredentialsSupportedPerUser::TypeInfo::Type value; - UN::NumberOfCredentialsSupportedPerUser::Get(atrpath, value); - return aEncoder.Encode(value); - } - - case MN::Language::Id: { // type is char_string - MN::Language::TypeInfo::Type value; - UN::Language::Get(atrpath, value); - return aEncoder.Encode(value); - } - - case MN::LEDSettings::Id: { // type is int8u - MN::LEDSettings::TypeInfo::Type value; - UN::LEDSettings::Get(atrpath, value); - return aEncoder.Encode(value); - } - - case MN::AutoRelockTime::Id: { // type is int32u - MN::AutoRelockTime::TypeInfo::Type value; - UN::AutoRelockTime::Get(atrpath, value); - return aEncoder.Encode(value); - } - - case MN::SoundVolume::Id: { // type is int8u - MN::SoundVolume::TypeInfo::Type value; - UN::SoundVolume::Get(atrpath, value); - return aEncoder.Encode(value); - } - - case MN::OperatingMode::Id: { // type is DlOperatingMode - MN::OperatingMode::TypeInfo::Type value; - UN::OperatingMode::Get(atrpath, value); - return aEncoder.Encode(value); - } - - case MN::SupportedOperatingModes::Id: { // type is DlSupportedOperatingModes - MN::SupportedOperatingModes::TypeInfo::Type value; - UN::SupportedOperatingModes::Get(atrpath, value); - return aEncoder.Encode(value); - } - - case MN::DefaultConfigurationRegister::Id: { // type is DlDefaultConfigurationRegister - MN::DefaultConfigurationRegister::TypeInfo::Type value; - UN::DefaultConfigurationRegister::Get(atrpath, value); - return aEncoder.Encode(value); - } - - case MN::EnableLocalProgramming::Id: { // type is boolean - MN::EnableLocalProgramming::TypeInfo::Type value; - UN::EnableLocalProgramming::Get(atrpath, value); - return aEncoder.Encode(value); - } - - case MN::EnableOneTouchLocking::Id: { // type is boolean - MN::EnableOneTouchLocking::TypeInfo::Type value; - UN::EnableOneTouchLocking::Get(atrpath, value); - return aEncoder.Encode(value); - } - - case MN::EnableInsideStatusLED::Id: { // type is boolean - MN::EnableInsideStatusLED::TypeInfo::Type value; - UN::EnableInsideStatusLED::Get(atrpath, value); - return aEncoder.Encode(value); - } - - case MN::EnablePrivacyModeButton::Id: { // type is boolean - MN::EnablePrivacyModeButton::TypeInfo::Type value; - UN::EnablePrivacyModeButton::Get(atrpath, value); - return aEncoder.Encode(value); - } - - case MN::LocalProgrammingFeatures::Id: { // type is DlLocalProgrammingFeatures - MN::LocalProgrammingFeatures::TypeInfo::Type value; - UN::LocalProgrammingFeatures::Get(atrpath, value); - return aEncoder.Encode(value); - } - - case MN::WrongCodeEntryLimit::Id: { // type is int8u - MN::WrongCodeEntryLimit::TypeInfo::Type value; - UN::WrongCodeEntryLimit::Get(atrpath, value); - return aEncoder.Encode(value); - } - - case MN::UserCodeTemporaryDisableTime::Id: { // type is int8u - MN::UserCodeTemporaryDisableTime::TypeInfo::Type value; - UN::UserCodeTemporaryDisableTime::Get(atrpath, value); - return aEncoder.Encode(value); - } - - case MN::SendPINOverTheAir::Id: { // type is boolean - MN::SendPINOverTheAir::TypeInfo::Type value; - UN::SendPINOverTheAir::Get(atrpath, value); - return aEncoder.Encode(value); - } - - case MN::RequirePINforRemoteOperation::Id: { // type is boolean - MN::RequirePINforRemoteOperation::TypeInfo::Type value; - UN::RequirePINforRemoteOperation::Get(atrpath, value); - return aEncoder.Encode(value); - } - - case MN::ExpiringUserTimeout::Id: { // type is int16u - MN::ExpiringUserTimeout::TypeInfo::Type value; - UN::ExpiringUserTimeout::Get(atrpath, value); - return aEncoder.Encode(value); - } - - case MN::FeatureMap::Id: { // type is bitmap32 - MN::FeatureMap::TypeInfo::Type value; - UN::FeatureMap::Get(atrpath, value); - return aEncoder.Encode(value); - } - - case MN::ClusterRevision::Id: { // type is int16u - MN::ClusterRevision::TypeInfo::Type value; - UN::ClusterRevision::Get(atrpath, value); - return aEncoder.Encode(value); - } - } - } catch (const std::out_of_range & e) - { - sl_log_info(LOG_TAG, - "The request attribute Path is not found in the attribute state " - "contanier, %s\n", - e.what()); - return CHIP_ERROR_NO_MESSAGE_HANDLER; - } - return CHIP_NO_ERROR; -} - -CHIP_ERROR DoorLockAttributeAccess::Write(const ConcreteDataAttributePath & aPath, AttributeValueDecoder & aDecoder) -{ - using namespace chip::app::Clusters::DoorLock; - - if (aPath.mClusterId != Clusters::DoorLock::Id) - { - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto unify_node = m_node_state_monitor.bridged_endpoint(aPath.mEndpointId); - - if (!unify_node) - { - return CHIP_ERROR_NO_MESSAGE_HANDLER; - } - - std::string attribute_name; - nlohmann::json jsn; - - switch (aPath.mAttributeId) - { - } - - if (!attribute_name.empty()) - { - std::string payload_str; - std::string topic = "ucl/by-unid/" + unify_node->unify_unid + "/ep" + std::to_string(unify_node->unify_endpoint) + - "/DoorLock/Attributes/" + attribute_name + "/Desired"; - payload_str = jsn.dump(); - uic_mqtt_publish(topic.c_str(), payload_str.c_str(), payload_str.length(), true); - return CHIP_ERROR_NO_MESSAGE_HANDLER; - } - - return CHIP_NO_ERROR; -} - -void DoorLockAttributeAccess::reported_updated(const bridged_endpoint * ep, const std::string & cluster, - const std::string & attribute, const nlohmann::json & unify_value) -{ - namespace MN = chip::app::Clusters::DoorLock::Attributes; - namespace UN = unify::matter_bridge::DoorLock::Attributes; - - auto cluster_id = device_translator::instance().get_cluster_id(cluster); - - if (!cluster_id.has_value() || (cluster_id.value() != Clusters::DoorLock::Id)) - { - return; - } - - // get attribute id - auto attribute_id = device_translator::instance().get_attribute_id(cluster, attribute); - - if (!attribute_id.has_value()) - { - return; - } - - chip::EndpointId node_matter_endpoint = ep->matter_endpoint; - ConcreteAttributePath attrpath = ConcreteAttributePath(node_matter_endpoint, Clusters::DoorLock::Id, attribute_id.value()); - - switch (attribute_id.value()) - { - // type is DlLockState - case MN::LockState::Id: { - using T = MN::LockState::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) - { - sl_log_debug(LOG_TAG, "LockState attribute value is %s", unify_value.dump().c_str()); - UN::LockState::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::DoorLock::Id, MN::LockState::Id, - ZCL_ENUM8_ATTRIBUTE_TYPE, reinterpret_cast(&value.value())); - } - break; - } - // type is DlLockType - case MN::LockType::Id: { - using T = MN::LockType::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) - { - sl_log_debug(LOG_TAG, "LockType attribute value is %s", unify_value.dump().c_str()); - UN::LockType::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::DoorLock::Id, MN::LockType::Id, - ZCL_ENUM8_ATTRIBUTE_TYPE, reinterpret_cast(&value.value())); - } - break; - } - // type is boolean - case MN::ActuatorEnabled::Id: { - using T = MN::ActuatorEnabled::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) - { - sl_log_debug(LOG_TAG, "ActuatorEnabled attribute value is %s", unify_value.dump().c_str()); - UN::ActuatorEnabled::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::DoorLock::Id, MN::ActuatorEnabled::Id, - ZCL_BOOLEAN_ATTRIBUTE_TYPE, reinterpret_cast(&value.value())); - } - break; - } - // type is DlDoorState - case MN::DoorState::Id: { - using T = MN::DoorState::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) - { - sl_log_debug(LOG_TAG, "DoorState attribute value is %s", unify_value.dump().c_str()); - UN::DoorState::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::DoorLock::Id, MN::DoorState::Id, - ZCL_ENUM8_ATTRIBUTE_TYPE, reinterpret_cast(&value.value())); - } - break; - } - // type is int32u - case MN::DoorOpenEvents::Id: { - using T = MN::DoorOpenEvents::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) - { - sl_log_debug(LOG_TAG, "DoorOpenEvents attribute value is %s", unify_value.dump().c_str()); - UN::DoorOpenEvents::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::DoorLock::Id, MN::DoorOpenEvents::Id, - ZCL_INT32U_ATTRIBUTE_TYPE, reinterpret_cast(&value.value())); - } - break; - } - // type is int32u - case MN::DoorClosedEvents::Id: { - using T = MN::DoorClosedEvents::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) - { - sl_log_debug(LOG_TAG, "DoorClosedEvents attribute value is %s", unify_value.dump().c_str()); - UN::DoorClosedEvents::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::DoorLock::Id, MN::DoorClosedEvents::Id, - ZCL_INT32U_ATTRIBUTE_TYPE, reinterpret_cast(&value.value())); - } - break; - } - // type is int16u - case MN::OpenPeriod::Id: { - using T = MN::OpenPeriod::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) - { - sl_log_debug(LOG_TAG, "OpenPeriod attribute value is %s", unify_value.dump().c_str()); - UN::OpenPeriod::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::DoorLock::Id, MN::OpenPeriod::Id, - ZCL_INT16U_ATTRIBUTE_TYPE, reinterpret_cast(&value.value())); - } - break; - } - // type is int16u - case MN::NumberOfTotalUsersSupported::Id: { - using T = MN::NumberOfTotalUsersSupported::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) - { - sl_log_debug(LOG_TAG, "NumberOfTotalUsersSupported attribute value is %s", unify_value.dump().c_str()); - UN::NumberOfTotalUsersSupported::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::DoorLock::Id, - MN::NumberOfTotalUsersSupported::Id, ZCL_INT16U_ATTRIBUTE_TYPE, - reinterpret_cast(&value.value())); - } - break; - } - // type is int16u - case MN::NumberOfPINUsersSupported::Id: { - using T = MN::NumberOfPINUsersSupported::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) - { - sl_log_debug(LOG_TAG, "NumberOfPINUsersSupported attribute value is %s", unify_value.dump().c_str()); - UN::NumberOfPINUsersSupported::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::DoorLock::Id, MN::NumberOfPINUsersSupported::Id, - ZCL_INT16U_ATTRIBUTE_TYPE, reinterpret_cast(&value.value())); - } - break; - } - // type is int16u - case MN::NumberOfRFIDUsersSupported::Id: { - using T = MN::NumberOfRFIDUsersSupported::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) - { - sl_log_debug(LOG_TAG, "NumberOfRFIDUsersSupported attribute value is %s", unify_value.dump().c_str()); - UN::NumberOfRFIDUsersSupported::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::DoorLock::Id, MN::NumberOfRFIDUsersSupported::Id, - ZCL_INT16U_ATTRIBUTE_TYPE, reinterpret_cast(&value.value())); - } - break; - } - // type is int8u - case MN::NumberOfWeekDaySchedulesSupportedPerUser::Id: { - using T = MN::NumberOfWeekDaySchedulesSupportedPerUser::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) - { - sl_log_debug(LOG_TAG, "NumberOfWeekDaySchedulesSupportedPerUser attribute value is %s", unify_value.dump().c_str()); - UN::NumberOfWeekDaySchedulesSupportedPerUser::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::DoorLock::Id, - MN::NumberOfWeekDaySchedulesSupportedPerUser::Id, ZCL_INT8U_ATTRIBUTE_TYPE, - reinterpret_cast(&value.value())); - } - break; - } - // type is int8u - case MN::NumberOfYearDaySchedulesSupportedPerUser::Id: { - using T = MN::NumberOfYearDaySchedulesSupportedPerUser::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) - { - sl_log_debug(LOG_TAG, "NumberOfYearDaySchedulesSupportedPerUser attribute value is %s", unify_value.dump().c_str()); - UN::NumberOfYearDaySchedulesSupportedPerUser::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::DoorLock::Id, - MN::NumberOfYearDaySchedulesSupportedPerUser::Id, ZCL_INT8U_ATTRIBUTE_TYPE, - reinterpret_cast(&value.value())); - } - break; - } - // type is int8u - case MN::NumberOfHolidaySchedulesSupported::Id: { - using T = MN::NumberOfHolidaySchedulesSupported::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) - { - sl_log_debug(LOG_TAG, "NumberOfHolidaySchedulesSupported attribute value is %s", unify_value.dump().c_str()); - UN::NumberOfHolidaySchedulesSupported::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::DoorLock::Id, - MN::NumberOfHolidaySchedulesSupported::Id, ZCL_INT8U_ATTRIBUTE_TYPE, - reinterpret_cast(&value.value())); - } - break; - } - // type is int8u - case MN::MaxPINCodeLength::Id: { - using T = MN::MaxPINCodeLength::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) - { - sl_log_debug(LOG_TAG, "MaxPINCodeLength attribute value is %s", unify_value.dump().c_str()); - UN::MaxPINCodeLength::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::DoorLock::Id, MN::MaxPINCodeLength::Id, - ZCL_INT8U_ATTRIBUTE_TYPE, reinterpret_cast(&value.value())); - } - break; - } - // type is int8u - case MN::MinPINCodeLength::Id: { - using T = MN::MinPINCodeLength::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) - { - sl_log_debug(LOG_TAG, "MinPINCodeLength attribute value is %s", unify_value.dump().c_str()); - UN::MinPINCodeLength::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::DoorLock::Id, MN::MinPINCodeLength::Id, - ZCL_INT8U_ATTRIBUTE_TYPE, reinterpret_cast(&value.value())); - } - break; - } - // type is int8u - case MN::MaxRFIDCodeLength::Id: { - using T = MN::MaxRFIDCodeLength::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) - { - sl_log_debug(LOG_TAG, "MaxRFIDCodeLength attribute value is %s", unify_value.dump().c_str()); - UN::MaxRFIDCodeLength::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::DoorLock::Id, MN::MaxRFIDCodeLength::Id, - ZCL_INT8U_ATTRIBUTE_TYPE, reinterpret_cast(&value.value())); - } - break; - } - // type is int8u - case MN::MinRFIDCodeLength::Id: { - using T = MN::MinRFIDCodeLength::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) - { - sl_log_debug(LOG_TAG, "MinRFIDCodeLength attribute value is %s", unify_value.dump().c_str()); - UN::MinRFIDCodeLength::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::DoorLock::Id, MN::MinRFIDCodeLength::Id, - ZCL_INT8U_ATTRIBUTE_TYPE, reinterpret_cast(&value.value())); - } - break; - } - // type is DlCredentialRuleMask - case MN::CredentialRulesSupport::Id: { - using T = MN::CredentialRulesSupport::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) - { - sl_log_debug(LOG_TAG, "CredentialRulesSupport attribute value is %s", unify_value.dump().c_str()); - UN::CredentialRulesSupport::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::DoorLock::Id, MN::CredentialRulesSupport::Id, - ZCL_BITMAP8_ATTRIBUTE_TYPE, reinterpret_cast(&value.value())); - } - break; - } - // type is int8u - case MN::NumberOfCredentialsSupportedPerUser::Id: { - using T = MN::NumberOfCredentialsSupportedPerUser::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) - { - sl_log_debug(LOG_TAG, "NumberOfCredentialsSupportedPerUser attribute value is %s", unify_value.dump().c_str()); - UN::NumberOfCredentialsSupportedPerUser::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::DoorLock::Id, - MN::NumberOfCredentialsSupportedPerUser::Id, ZCL_INT8U_ATTRIBUTE_TYPE, - reinterpret_cast(&value.value())); - } - break; - } - // type is char_string - case MN::Language::Id: { - using T = MN::Language::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) - { - sl_log_debug(LOG_TAG, "Language attribute value is %s", unify_value.dump().c_str()); - UN::Language::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::DoorLock::Id, MN::Language::Id, - ZCL_CHAR_STRING_ATTRIBUTE_TYPE, reinterpret_cast(&value.value())); - } - break; - } - // type is int8u - case MN::LEDSettings::Id: { - using T = MN::LEDSettings::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) - { - sl_log_debug(LOG_TAG, "LEDSettings attribute value is %s", unify_value.dump().c_str()); - UN::LEDSettings::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::DoorLock::Id, MN::LEDSettings::Id, - ZCL_INT8U_ATTRIBUTE_TYPE, reinterpret_cast(&value.value())); - } - break; - } - // type is int32u - case MN::AutoRelockTime::Id: { - using T = MN::AutoRelockTime::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) - { - sl_log_debug(LOG_TAG, "AutoRelockTime attribute value is %s", unify_value.dump().c_str()); - UN::AutoRelockTime::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::DoorLock::Id, MN::AutoRelockTime::Id, - ZCL_INT32U_ATTRIBUTE_TYPE, reinterpret_cast(&value.value())); - } - break; - } - // type is int8u - case MN::SoundVolume::Id: { - using T = MN::SoundVolume::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) - { - sl_log_debug(LOG_TAG, "SoundVolume attribute value is %s", unify_value.dump().c_str()); - UN::SoundVolume::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::DoorLock::Id, MN::SoundVolume::Id, - ZCL_INT8U_ATTRIBUTE_TYPE, reinterpret_cast(&value.value())); - } - break; - } - // type is DlOperatingMode - case MN::OperatingMode::Id: { - using T = MN::OperatingMode::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) - { - sl_log_debug(LOG_TAG, "OperatingMode attribute value is %s", unify_value.dump().c_str()); - UN::OperatingMode::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::DoorLock::Id, MN::OperatingMode::Id, - ZCL_ENUM8_ATTRIBUTE_TYPE, reinterpret_cast(&value.value())); - } - break; - } - // type is DlSupportedOperatingModes - case MN::SupportedOperatingModes::Id: { - using T = MN::SupportedOperatingModes::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) - { - sl_log_debug(LOG_TAG, "SupportedOperatingModes attribute value is %s", unify_value.dump().c_str()); - UN::SupportedOperatingModes::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::DoorLock::Id, MN::SupportedOperatingModes::Id, - ZCL_BITMAP16_ATTRIBUTE_TYPE, reinterpret_cast(&value.value())); - } - break; - } - // type is DlDefaultConfigurationRegister - case MN::DefaultConfigurationRegister::Id: { - using T = MN::DefaultConfigurationRegister::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) - { - sl_log_debug(LOG_TAG, "DefaultConfigurationRegister attribute value is %s", unify_value.dump().c_str()); - UN::DefaultConfigurationRegister::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::DoorLock::Id, - MN::DefaultConfigurationRegister::Id, ZCL_BITMAP16_ATTRIBUTE_TYPE, - reinterpret_cast(&value.value())); - } - break; - } - // type is boolean - case MN::EnableLocalProgramming::Id: { - using T = MN::EnableLocalProgramming::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) - { - sl_log_debug(LOG_TAG, "EnableLocalProgramming attribute value is %s", unify_value.dump().c_str()); - UN::EnableLocalProgramming::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::DoorLock::Id, MN::EnableLocalProgramming::Id, - ZCL_BOOLEAN_ATTRIBUTE_TYPE, reinterpret_cast(&value.value())); - } - break; - } - // type is boolean - case MN::EnableOneTouchLocking::Id: { - using T = MN::EnableOneTouchLocking::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) - { - sl_log_debug(LOG_TAG, "EnableOneTouchLocking attribute value is %s", unify_value.dump().c_str()); - UN::EnableOneTouchLocking::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::DoorLock::Id, MN::EnableOneTouchLocking::Id, - ZCL_BOOLEAN_ATTRIBUTE_TYPE, reinterpret_cast(&value.value())); - } - break; - } - // type is boolean - case MN::EnableInsideStatusLED::Id: { - using T = MN::EnableInsideStatusLED::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) - { - sl_log_debug(LOG_TAG, "EnableInsideStatusLED attribute value is %s", unify_value.dump().c_str()); - UN::EnableInsideStatusLED::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::DoorLock::Id, MN::EnableInsideStatusLED::Id, - ZCL_BOOLEAN_ATTRIBUTE_TYPE, reinterpret_cast(&value.value())); - } - break; - } - // type is boolean - case MN::EnablePrivacyModeButton::Id: { - using T = MN::EnablePrivacyModeButton::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) - { - sl_log_debug(LOG_TAG, "EnablePrivacyModeButton attribute value is %s", unify_value.dump().c_str()); - UN::EnablePrivacyModeButton::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::DoorLock::Id, MN::EnablePrivacyModeButton::Id, - ZCL_BOOLEAN_ATTRIBUTE_TYPE, reinterpret_cast(&value.value())); - } - break; - } - // type is DlLocalProgrammingFeatures - case MN::LocalProgrammingFeatures::Id: { - using T = MN::LocalProgrammingFeatures::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) - { - sl_log_debug(LOG_TAG, "LocalProgrammingFeatures attribute value is %s", unify_value.dump().c_str()); - UN::LocalProgrammingFeatures::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::DoorLock::Id, MN::LocalProgrammingFeatures::Id, - ZCL_BITMAP8_ATTRIBUTE_TYPE, reinterpret_cast(&value.value())); - } - break; - } - // type is int8u - case MN::WrongCodeEntryLimit::Id: { - using T = MN::WrongCodeEntryLimit::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) - { - sl_log_debug(LOG_TAG, "WrongCodeEntryLimit attribute value is %s", unify_value.dump().c_str()); - UN::WrongCodeEntryLimit::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::DoorLock::Id, MN::WrongCodeEntryLimit::Id, - ZCL_INT8U_ATTRIBUTE_TYPE, reinterpret_cast(&value.value())); - } - break; - } - // type is int8u - case MN::UserCodeTemporaryDisableTime::Id: { - using T = MN::UserCodeTemporaryDisableTime::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) - { - sl_log_debug(LOG_TAG, "UserCodeTemporaryDisableTime attribute value is %s", unify_value.dump().c_str()); - UN::UserCodeTemporaryDisableTime::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::DoorLock::Id, - MN::UserCodeTemporaryDisableTime::Id, ZCL_INT8U_ATTRIBUTE_TYPE, - reinterpret_cast(&value.value())); - } - break; - } - // type is boolean - case MN::SendPINOverTheAir::Id: { - using T = MN::SendPINOverTheAir::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) - { - sl_log_debug(LOG_TAG, "SendPINOverTheAir attribute value is %s", unify_value.dump().c_str()); - UN::SendPINOverTheAir::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::DoorLock::Id, MN::SendPINOverTheAir::Id, - ZCL_BOOLEAN_ATTRIBUTE_TYPE, reinterpret_cast(&value.value())); - } - break; - } - // type is boolean - case MN::RequirePINforRemoteOperation::Id: { - using T = MN::RequirePINforRemoteOperation::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) - { - sl_log_debug(LOG_TAG, "RequirePINforRemoteOperation attribute value is %s", unify_value.dump().c_str()); - UN::RequirePINforRemoteOperation::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::DoorLock::Id, - MN::RequirePINforRemoteOperation::Id, ZCL_BOOLEAN_ATTRIBUTE_TYPE, - reinterpret_cast(&value.value())); - } - break; - } - // type is int16u - case MN::ExpiringUserTimeout::Id: { - using T = MN::ExpiringUserTimeout::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) - { - sl_log_debug(LOG_TAG, "ExpiringUserTimeout attribute value is %s", unify_value.dump().c_str()); - UN::ExpiringUserTimeout::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::DoorLock::Id, MN::ExpiringUserTimeout::Id, - ZCL_INT16U_ATTRIBUTE_TYPE, reinterpret_cast(&value.value())); - } - break; - } - // type is bitmap32 - case MN::FeatureMap::Id: { - using T = MN::FeatureMap::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) - { - sl_log_debug(LOG_TAG, "FeatureMap attribute value is %s", unify_value.dump().c_str()); - UN::FeatureMap::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::DoorLock::Id, MN::FeatureMap::Id, - ZCL_BITMAP32_ATTRIBUTE_TYPE, reinterpret_cast(&value.value())); - } - break; - } - // type is int16u - case MN::ClusterRevision::Id: { - using T = MN::ClusterRevision::TypeInfo::Type; - std::optional value = from_json(unify_value); + break; + } + // type is int8u + case MN::NumberOfYearDaySchedulesSupportedPerUser::Id: { + using T = MN::NumberOfYearDaySchedulesSupportedPerUser::TypeInfo::Type; + std::optional value = from_json(unify_value); if (value.has_value()) { - sl_log_debug(LOG_TAG, "ClusterRevision attribute value is %s", unify_value.dump().c_str()); - UN::ClusterRevision::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::DoorLock::Id, MN::ClusterRevision::Id, - ZCL_INT16U_ATTRIBUTE_TYPE, reinterpret_cast(&value.value())); - } - break; - } - } -} - -CHIP_ERROR -WindowCoveringAttributeAccess::Read(const ConcreteReadAttributePath & aPath, AttributeValueEncoder & aEncoder) -{ - namespace MN = chip::app::Clusters::WindowCovering::Attributes; - namespace UN = unify::matter_bridge::WindowCovering::Attributes; - if (aPath.mClusterId != Clusters::WindowCovering::Id) - { - return CHIP_ERROR_INVALID_ARGUMENT; - } - - ConcreteAttributePath atrpath = ConcreteAttributePath(aPath.mEndpointId, aPath.mClusterId, aPath.mAttributeId); - - try - { - switch (aPath.mAttributeId) - { - - case MN::Type::Id: { // type is Type - MN::Type::TypeInfo::Type value; - UN::Type::Get(atrpath, value); - return aEncoder.Encode(value); - } - - case MN::PhysicalClosedLimitLift::Id: { // type is int16u - MN::PhysicalClosedLimitLift::TypeInfo::Type value; - UN::PhysicalClosedLimitLift::Get(atrpath, value); - return aEncoder.Encode(value); - } - - case MN::PhysicalClosedLimitTilt::Id: { // type is int16u - MN::PhysicalClosedLimitTilt::TypeInfo::Type value; - UN::PhysicalClosedLimitTilt::Get(atrpath, value); - return aEncoder.Encode(value); - } - - case MN::CurrentPositionLift::Id: { // type is int16u - MN::CurrentPositionLift::TypeInfo::Type value; - UN::CurrentPositionLift::Get(atrpath, value); - return aEncoder.Encode(value); - } - - case MN::CurrentPositionTilt::Id: { // type is int16u - MN::CurrentPositionTilt::TypeInfo::Type value; - UN::CurrentPositionTilt::Get(atrpath, value); - return aEncoder.Encode(value); - } - - case MN::NumberOfActuationsLift::Id: { // type is int16u - MN::NumberOfActuationsLift::TypeInfo::Type value; - UN::NumberOfActuationsLift::Get(atrpath, value); - return aEncoder.Encode(value); - } - - case MN::NumberOfActuationsTilt::Id: { // type is int16u - MN::NumberOfActuationsTilt::TypeInfo::Type value; - UN::NumberOfActuationsTilt::Get(atrpath, value); - return aEncoder.Encode(value); - } - - case MN::ConfigStatus::Id: { // type is ConfigStatus - MN::ConfigStatus::TypeInfo::Type value; - UN::ConfigStatus::Get(atrpath, value); - return aEncoder.Encode(value); - } - - case MN::CurrentPositionLiftPercentage::Id: { // type is Percent - MN::CurrentPositionLiftPercentage::TypeInfo::Type value; - UN::CurrentPositionLiftPercentage::Get(atrpath, value); - return aEncoder.Encode(value); - } - - case MN::CurrentPositionTiltPercentage::Id: { // type is Percent - MN::CurrentPositionTiltPercentage::TypeInfo::Type value; - UN::CurrentPositionTiltPercentage::Get(atrpath, value); - return aEncoder.Encode(value); - } - - case MN::OperationalStatus::Id: { // type is OperationalStatus - MN::OperationalStatus::TypeInfo::Type value; - UN::OperationalStatus::Get(atrpath, value); - return aEncoder.Encode(value); - } - - case MN::TargetPositionLiftPercent100ths::Id: { // type is Percent100ths - MN::TargetPositionLiftPercent100ths::TypeInfo::Type value; - UN::TargetPositionLiftPercent100ths::Get(atrpath, value); - return aEncoder.Encode(value); - } - - case MN::TargetPositionTiltPercent100ths::Id: { // type is Percent100ths - MN::TargetPositionTiltPercent100ths::TypeInfo::Type value; - UN::TargetPositionTiltPercent100ths::Get(atrpath, value); - return aEncoder.Encode(value); - } - - case MN::EndProductType::Id: { // type is EndProductType - MN::EndProductType::TypeInfo::Type value; - UN::EndProductType::Get(atrpath, value); - return aEncoder.Encode(value); - } - - case MN::CurrentPositionLiftPercent100ths::Id: { // type is Percent100ths - MN::CurrentPositionLiftPercent100ths::TypeInfo::Type value; - UN::CurrentPositionLiftPercent100ths::Get(atrpath, value); - return aEncoder.Encode(value); - } - - case MN::CurrentPositionTiltPercent100ths::Id: { // type is Percent100ths - MN::CurrentPositionTiltPercent100ths::TypeInfo::Type value; - UN::CurrentPositionTiltPercent100ths::Get(atrpath, value); - return aEncoder.Encode(value); - } - - case MN::InstalledOpenLimitLift::Id: { // type is int16u - MN::InstalledOpenLimitLift::TypeInfo::Type value; - UN::InstalledOpenLimitLift::Get(atrpath, value); - return aEncoder.Encode(value); - } - - case MN::InstalledClosedLimitLift::Id: { // type is int16u - MN::InstalledClosedLimitLift::TypeInfo::Type value; - UN::InstalledClosedLimitLift::Get(atrpath, value); - return aEncoder.Encode(value); - } - - case MN::InstalledOpenLimitTilt::Id: { // type is int16u - MN::InstalledOpenLimitTilt::TypeInfo::Type value; - UN::InstalledOpenLimitTilt::Get(atrpath, value); - return aEncoder.Encode(value); - } - - case MN::InstalledClosedLimitTilt::Id: { // type is int16u - MN::InstalledClosedLimitTilt::TypeInfo::Type value; - UN::InstalledClosedLimitTilt::Get(atrpath, value); - return aEncoder.Encode(value); - } - - case MN::Mode::Id: { // type is Mode - MN::Mode::TypeInfo::Type value; - UN::Mode::Get(atrpath, value); - return aEncoder.Encode(value); - } - - case MN::SafetyStatus::Id: { // type is SafetyStatus - MN::SafetyStatus::TypeInfo::Type value; - UN::SafetyStatus::Get(atrpath, value); - return aEncoder.Encode(value); - } - - case MN::FeatureMap::Id: { // type is bitmap32 - MN::FeatureMap::TypeInfo::Type value; - UN::FeatureMap::Get(atrpath, value); - return aEncoder.Encode(value); - } - - case MN::ClusterRevision::Id: { // type is int16u - MN::ClusterRevision::TypeInfo::Type value; - UN::ClusterRevision::Get(atrpath, value); - return aEncoder.Encode(value); - } - } - } catch (const std::out_of_range & e) - { - sl_log_info(LOG_TAG, - "The request attribute Path is not found in the attribute state " - "contanier, %s\n", - e.what()); - return CHIP_ERROR_NO_MESSAGE_HANDLER; - } - return CHIP_NO_ERROR; -} - -CHIP_ERROR WindowCoveringAttributeAccess::Write(const ConcreteDataAttributePath & aPath, AttributeValueDecoder & aDecoder) -{ - using namespace chip::app::Clusters::WindowCovering; - - if (aPath.mClusterId != Clusters::WindowCovering::Id) - { - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto unify_node = m_node_state_monitor.bridged_endpoint(aPath.mEndpointId); - - if (!unify_node) - { - return CHIP_ERROR_NO_MESSAGE_HANDLER; - } - - std::string attribute_name; - nlohmann::json jsn; - - switch (aPath.mAttributeId) - { - } - - if (!attribute_name.empty()) - { - std::string payload_str; - std::string topic = "ucl/by-unid/" + unify_node->unify_unid + "/ep" + std::to_string(unify_node->unify_endpoint) + - "/WindowCovering/Attributes/" + attribute_name + "/Desired"; - payload_str = jsn.dump(); - uic_mqtt_publish(topic.c_str(), payload_str.c_str(), payload_str.length(), true); - return CHIP_ERROR_NO_MESSAGE_HANDLER; - } - - return CHIP_NO_ERROR; -} - -void WindowCoveringAttributeAccess::reported_updated(const bridged_endpoint * ep, const std::string & cluster, - const std::string & attribute, const nlohmann::json & unify_value) -{ - namespace MN = chip::app::Clusters::WindowCovering::Attributes; - namespace UN = unify::matter_bridge::WindowCovering::Attributes; - - auto cluster_id = device_translator::instance().get_cluster_id(cluster); - - if (!cluster_id.has_value() || (cluster_id.value() != Clusters::WindowCovering::Id)) - { - return; - } - - // get attribute id - auto attribute_id = device_translator::instance().get_attribute_id(cluster, attribute); - - if (!attribute_id.has_value()) - { - return; + sl_log_debug(LOG_TAG, "NumberOfYearDaySchedulesSupportedPerUser attribute value is %s", unify_value.dump().c_str()); + UN::NumberOfYearDaySchedulesSupportedPerUser::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::DoorLock::Id, + MN::NumberOfYearDaySchedulesSupportedPerUser::Id, ZCL_INT8U_ATTRIBUTE_TYPE, + reinterpret_cast(&value.value())); + } + break; } + // type is int8u + case MN::NumberOfHolidaySchedulesSupported::Id: { + using T = MN::NumberOfHolidaySchedulesSupported::TypeInfo::Type; + std::optional value = from_json(unify_value); - chip::EndpointId node_matter_endpoint = ep->matter_endpoint; - ConcreteAttributePath attrpath = - ConcreteAttributePath(node_matter_endpoint, Clusters::WindowCovering::Id, attribute_id.value()); - - switch (attribute_id.value()) - { - // type is Type - case MN::Type::Id: { - using T = MN::Type::TypeInfo::Type; + if (value.has_value()) + { + sl_log_debug(LOG_TAG, "NumberOfHolidaySchedulesSupported attribute value is %s", unify_value.dump().c_str()); + UN::NumberOfHolidaySchedulesSupported::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::DoorLock::Id, + MN::NumberOfHolidaySchedulesSupported::Id, ZCL_INT8U_ATTRIBUTE_TYPE, + reinterpret_cast(&value.value())); + } + break; + } + // type is int8u + case MN::MaxPINCodeLength::Id: { + using T = MN::MaxPINCodeLength::TypeInfo::Type; std::optional value = from_json(unify_value); if (value.has_value()) { - sl_log_debug(LOG_TAG, "Type attribute value is %s", unify_value.dump().c_str()); - UN::Type::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::WindowCovering::Id, MN::Type::Id, - ZCL_ENUM8_ATTRIBUTE_TYPE, reinterpret_cast(&value.value())); + sl_log_debug(LOG_TAG, "MaxPINCodeLength attribute value is %s", unify_value.dump().c_str()); + UN::MaxPINCodeLength::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::DoorLock::Id, MN::MaxPINCodeLength::Id, + ZCL_INT8U_ATTRIBUTE_TYPE, reinterpret_cast(&value.value())); } break; } - // type is int16u - case MN::PhysicalClosedLimitLift::Id: { - using T = MN::PhysicalClosedLimitLift::TypeInfo::Type; + // type is int8u + case MN::MinPINCodeLength::Id: { + using T = MN::MinPINCodeLength::TypeInfo::Type; std::optional value = from_json(unify_value); if (value.has_value()) { - sl_log_debug(LOG_TAG, "PhysicalClosedLimitLift attribute value is %s", unify_value.dump().c_str()); - UN::PhysicalClosedLimitLift::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::WindowCovering::Id, - MN::PhysicalClosedLimitLift::Id, ZCL_INT16U_ATTRIBUTE_TYPE, - reinterpret_cast(&value.value())); + sl_log_debug(LOG_TAG, "MinPINCodeLength attribute value is %s", unify_value.dump().c_str()); + UN::MinPINCodeLength::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::DoorLock::Id, MN::MinPINCodeLength::Id, + ZCL_INT8U_ATTRIBUTE_TYPE, reinterpret_cast(&value.value())); } break; } - // type is int16u - case MN::PhysicalClosedLimitTilt::Id: { - using T = MN::PhysicalClosedLimitTilt::TypeInfo::Type; + // type is int8u + case MN::MaxRFIDCodeLength::Id: { + using T = MN::MaxRFIDCodeLength::TypeInfo::Type; std::optional value = from_json(unify_value); if (value.has_value()) { - sl_log_debug(LOG_TAG, "PhysicalClosedLimitTilt attribute value is %s", unify_value.dump().c_str()); - UN::PhysicalClosedLimitTilt::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::WindowCovering::Id, - MN::PhysicalClosedLimitTilt::Id, ZCL_INT16U_ATTRIBUTE_TYPE, - reinterpret_cast(&value.value())); + sl_log_debug(LOG_TAG, "MaxRFIDCodeLength attribute value is %s", unify_value.dump().c_str()); + UN::MaxRFIDCodeLength::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::DoorLock::Id, MN::MaxRFIDCodeLength::Id, + ZCL_INT8U_ATTRIBUTE_TYPE, reinterpret_cast(&value.value())); } break; } - // type is int16u - case MN::CurrentPositionLift::Id: { - using T = MN::CurrentPositionLift::TypeInfo::Type; + // type is int8u + case MN::MinRFIDCodeLength::Id: { + using T = MN::MinRFIDCodeLength::TypeInfo::Type; std::optional value = from_json(unify_value); if (value.has_value()) { - sl_log_debug(LOG_TAG, "CurrentPositionLift attribute value is %s", unify_value.dump().c_str()); - UN::CurrentPositionLift::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::WindowCovering::Id, MN::CurrentPositionLift::Id, - ZCL_INT16U_ATTRIBUTE_TYPE, reinterpret_cast(&value.value())); + sl_log_debug(LOG_TAG, "MinRFIDCodeLength attribute value is %s", unify_value.dump().c_str()); + UN::MinRFIDCodeLength::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::DoorLock::Id, MN::MinRFIDCodeLength::Id, + ZCL_INT8U_ATTRIBUTE_TYPE, reinterpret_cast(&value.value())); } break; } - // type is int16u - case MN::CurrentPositionTilt::Id: { - using T = MN::CurrentPositionTilt::TypeInfo::Type; + // type is DlCredentialRuleMask + case MN::CredentialRulesSupport::Id: { + using T = MN::CredentialRulesSupport::TypeInfo::Type; std::optional value = from_json(unify_value); if (value.has_value()) { - sl_log_debug(LOG_TAG, "CurrentPositionTilt attribute value is %s", unify_value.dump().c_str()); - UN::CurrentPositionTilt::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::WindowCovering::Id, MN::CurrentPositionTilt::Id, - ZCL_INT16U_ATTRIBUTE_TYPE, reinterpret_cast(&value.value())); + sl_log_debug(LOG_TAG, "CredentialRulesSupport attribute value is %s", unify_value.dump().c_str()); + UN::CredentialRulesSupport::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::DoorLock::Id, MN::CredentialRulesSupport::Id, + ZCL_BITMAP8_ATTRIBUTE_TYPE, reinterpret_cast(&value.value())); } break; } - // type is int16u - case MN::NumberOfActuationsLift::Id: { - using T = MN::NumberOfActuationsLift::TypeInfo::Type; + // type is int8u + case MN::NumberOfCredentialsSupportedPerUser::Id: { + using T = MN::NumberOfCredentialsSupportedPerUser::TypeInfo::Type; std::optional value = from_json(unify_value); if (value.has_value()) { - sl_log_debug(LOG_TAG, "NumberOfActuationsLift attribute value is %s", unify_value.dump().c_str()); - UN::NumberOfActuationsLift::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::WindowCovering::Id, - MN::NumberOfActuationsLift::Id, ZCL_INT16U_ATTRIBUTE_TYPE, + sl_log_debug(LOG_TAG, "NumberOfCredentialsSupportedPerUser attribute value is %s", unify_value.dump().c_str()); + UN::NumberOfCredentialsSupportedPerUser::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::DoorLock::Id, + MN::NumberOfCredentialsSupportedPerUser::Id, ZCL_INT8U_ATTRIBUTE_TYPE, reinterpret_cast(&value.value())); } break; } - // type is int16u - case MN::NumberOfActuationsTilt::Id: { - using T = MN::NumberOfActuationsTilt::TypeInfo::Type; + // type is char_string + case MN::Language::Id: { + using T = MN::Language::TypeInfo::Type; std::optional value = from_json(unify_value); if (value.has_value()) { - sl_log_debug(LOG_TAG, "NumberOfActuationsTilt attribute value is %s", unify_value.dump().c_str()); - UN::NumberOfActuationsTilt::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::WindowCovering::Id, - MN::NumberOfActuationsTilt::Id, ZCL_INT16U_ATTRIBUTE_TYPE, - reinterpret_cast(&value.value())); + sl_log_debug(LOG_TAG, "Language attribute value is %s", unify_value.dump().c_str()); + UN::Language::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::DoorLock::Id, MN::Language::Id, + ZCL_CHAR_STRING_ATTRIBUTE_TYPE, reinterpret_cast(&value.value())); } break; } - // type is ConfigStatus - case MN::ConfigStatus::Id: { - using T = MN::ConfigStatus::TypeInfo::Type; + // type is int8u + case MN::LEDSettings::Id: { + using T = MN::LEDSettings::TypeInfo::Type; std::optional value = from_json(unify_value); if (value.has_value()) { - sl_log_debug(LOG_TAG, "ConfigStatus attribute value is %s", unify_value.dump().c_str()); - UN::ConfigStatus::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::WindowCovering::Id, MN::ConfigStatus::Id, - ZCL_BITMAP8_ATTRIBUTE_TYPE, reinterpret_cast(&value.value())); + sl_log_debug(LOG_TAG, "LEDSettings attribute value is %s", unify_value.dump().c_str()); + UN::LEDSettings::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::DoorLock::Id, MN::LEDSettings::Id, + ZCL_INT8U_ATTRIBUTE_TYPE, reinterpret_cast(&value.value())); } break; } - // type is Percent - case MN::CurrentPositionLiftPercentage::Id: { - using T = MN::CurrentPositionLiftPercentage::TypeInfo::Type; + // type is int32u + case MN::AutoRelockTime::Id: { + using T = MN::AutoRelockTime::TypeInfo::Type; std::optional value = from_json(unify_value); if (value.has_value()) { - sl_log_debug(LOG_TAG, "CurrentPositionLiftPercentage attribute value is %s", unify_value.dump().c_str()); - UN::CurrentPositionLiftPercentage::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::WindowCovering::Id, - MN::CurrentPositionLiftPercentage::Id, ZCL_PERCENT_ATTRIBUTE_TYPE, - reinterpret_cast(&value.value())); + sl_log_debug(LOG_TAG, "AutoRelockTime attribute value is %s", unify_value.dump().c_str()); + UN::AutoRelockTime::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::DoorLock::Id, MN::AutoRelockTime::Id, + ZCL_INT32U_ATTRIBUTE_TYPE, reinterpret_cast(&value.value())); } break; } - // type is Percent - case MN::CurrentPositionTiltPercentage::Id: { - using T = MN::CurrentPositionTiltPercentage::TypeInfo::Type; + // type is int8u + case MN::SoundVolume::Id: { + using T = MN::SoundVolume::TypeInfo::Type; std::optional value = from_json(unify_value); if (value.has_value()) { - sl_log_debug(LOG_TAG, "CurrentPositionTiltPercentage attribute value is %s", unify_value.dump().c_str()); - UN::CurrentPositionTiltPercentage::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::WindowCovering::Id, - MN::CurrentPositionTiltPercentage::Id, ZCL_PERCENT_ATTRIBUTE_TYPE, - reinterpret_cast(&value.value())); + sl_log_debug(LOG_TAG, "SoundVolume attribute value is %s", unify_value.dump().c_str()); + UN::SoundVolume::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::DoorLock::Id, MN::SoundVolume::Id, + ZCL_INT8U_ATTRIBUTE_TYPE, reinterpret_cast(&value.value())); } break; } - // type is OperationalStatus - case MN::OperationalStatus::Id: { - using T = MN::OperationalStatus::TypeInfo::Type; + // type is DlOperatingMode + case MN::OperatingMode::Id: { + using T = MN::OperatingMode::TypeInfo::Type; std::optional value = from_json(unify_value); if (value.has_value()) { - sl_log_debug(LOG_TAG, "OperationalStatus attribute value is %s", unify_value.dump().c_str()); - UN::OperationalStatus::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::WindowCovering::Id, MN::OperationalStatus::Id, - ZCL_BITMAP8_ATTRIBUTE_TYPE, reinterpret_cast(&value.value())); + sl_log_debug(LOG_TAG, "OperatingMode attribute value is %s", unify_value.dump().c_str()); + UN::OperatingMode::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::DoorLock::Id, MN::OperatingMode::Id, + ZCL_ENUM8_ATTRIBUTE_TYPE, reinterpret_cast(&value.value())); } break; } - // type is Percent100ths - case MN::TargetPositionLiftPercent100ths::Id: { - using T = MN::TargetPositionLiftPercent100ths::TypeInfo::Type; + // type is DlSupportedOperatingModes + case MN::SupportedOperatingModes::Id: { + using T = MN::SupportedOperatingModes::TypeInfo::Type; std::optional value = from_json(unify_value); if (value.has_value()) { - sl_log_debug(LOG_TAG, "TargetPositionLiftPercent100ths attribute value is %s", unify_value.dump().c_str()); - UN::TargetPositionLiftPercent100ths::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::WindowCovering::Id, - MN::TargetPositionLiftPercent100ths::Id, ZCL_PERCENT100THS_ATTRIBUTE_TYPE, - reinterpret_cast(&value.value())); + sl_log_debug(LOG_TAG, "SupportedOperatingModes attribute value is %s", unify_value.dump().c_str()); + UN::SupportedOperatingModes::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::DoorLock::Id, MN::SupportedOperatingModes::Id, + ZCL_BITMAP16_ATTRIBUTE_TYPE, reinterpret_cast(&value.value())); } break; } - // type is Percent100ths - case MN::TargetPositionTiltPercent100ths::Id: { - using T = MN::TargetPositionTiltPercent100ths::TypeInfo::Type; + // type is DlDefaultConfigurationRegister + case MN::DefaultConfigurationRegister::Id: { + using T = MN::DefaultConfigurationRegister::TypeInfo::Type; std::optional value = from_json(unify_value); if (value.has_value()) { - sl_log_debug(LOG_TAG, "TargetPositionTiltPercent100ths attribute value is %s", unify_value.dump().c_str()); - UN::TargetPositionTiltPercent100ths::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::WindowCovering::Id, - MN::TargetPositionTiltPercent100ths::Id, ZCL_PERCENT100THS_ATTRIBUTE_TYPE, + sl_log_debug(LOG_TAG, "DefaultConfigurationRegister attribute value is %s", unify_value.dump().c_str()); + UN::DefaultConfigurationRegister::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::DoorLock::Id, + MN::DefaultConfigurationRegister::Id, ZCL_BITMAP16_ATTRIBUTE_TYPE, reinterpret_cast(&value.value())); } break; } - // type is EndProductType - case MN::EndProductType::Id: { - using T = MN::EndProductType::TypeInfo::Type; + // type is boolean + case MN::EnableLocalProgramming::Id: { + using T = MN::EnableLocalProgramming::TypeInfo::Type; std::optional value = from_json(unify_value); if (value.has_value()) { - sl_log_debug(LOG_TAG, "EndProductType attribute value is %s", unify_value.dump().c_str()); - UN::EndProductType::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::WindowCovering::Id, MN::EndProductType::Id, - ZCL_ENUM8_ATTRIBUTE_TYPE, reinterpret_cast(&value.value())); + sl_log_debug(LOG_TAG, "EnableLocalProgramming attribute value is %s", unify_value.dump().c_str()); + UN::EnableLocalProgramming::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::DoorLock::Id, MN::EnableLocalProgramming::Id, + ZCL_BOOLEAN_ATTRIBUTE_TYPE, reinterpret_cast(&value.value())); } break; } - // type is Percent100ths - case MN::CurrentPositionLiftPercent100ths::Id: { - using T = MN::CurrentPositionLiftPercent100ths::TypeInfo::Type; + // type is boolean + case MN::EnableOneTouchLocking::Id: { + using T = MN::EnableOneTouchLocking::TypeInfo::Type; std::optional value = from_json(unify_value); if (value.has_value()) { - sl_log_debug(LOG_TAG, "CurrentPositionLiftPercent100ths attribute value is %s", unify_value.dump().c_str()); - UN::CurrentPositionLiftPercent100ths::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::WindowCovering::Id, - MN::CurrentPositionLiftPercent100ths::Id, ZCL_PERCENT100THS_ATTRIBUTE_TYPE, - reinterpret_cast(&value.value())); + sl_log_debug(LOG_TAG, "EnableOneTouchLocking attribute value is %s", unify_value.dump().c_str()); + UN::EnableOneTouchLocking::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::DoorLock::Id, MN::EnableOneTouchLocking::Id, + ZCL_BOOLEAN_ATTRIBUTE_TYPE, reinterpret_cast(&value.value())); } break; } - // type is Percent100ths - case MN::CurrentPositionTiltPercent100ths::Id: { - using T = MN::CurrentPositionTiltPercent100ths::TypeInfo::Type; + // type is boolean + case MN::EnableInsideStatusLED::Id: { + using T = MN::EnableInsideStatusLED::TypeInfo::Type; + std::optional value = from_json(unify_value); + + if (value.has_value()) + { + sl_log_debug(LOG_TAG, "EnableInsideStatusLED attribute value is %s", unify_value.dump().c_str()); + UN::EnableInsideStatusLED::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::DoorLock::Id, MN::EnableInsideStatusLED::Id, + ZCL_BOOLEAN_ATTRIBUTE_TYPE, reinterpret_cast(&value.value())); + } + break; + } + // type is boolean + case MN::EnablePrivacyModeButton::Id: { + using T = MN::EnablePrivacyModeButton::TypeInfo::Type; std::optional value = from_json(unify_value); if (value.has_value()) { - sl_log_debug(LOG_TAG, "CurrentPositionTiltPercent100ths attribute value is %s", unify_value.dump().c_str()); - UN::CurrentPositionTiltPercent100ths::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::WindowCovering::Id, - MN::CurrentPositionTiltPercent100ths::Id, ZCL_PERCENT100THS_ATTRIBUTE_TYPE, - reinterpret_cast(&value.value())); + sl_log_debug(LOG_TAG, "EnablePrivacyModeButton attribute value is %s", unify_value.dump().c_str()); + UN::EnablePrivacyModeButton::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::DoorLock::Id, MN::EnablePrivacyModeButton::Id, + ZCL_BOOLEAN_ATTRIBUTE_TYPE, reinterpret_cast(&value.value())); } break; } - // type is int16u - case MN::InstalledOpenLimitLift::Id: { - using T = MN::InstalledOpenLimitLift::TypeInfo::Type; + // type is DlLocalProgrammingFeatures + case MN::LocalProgrammingFeatures::Id: { + using T = MN::LocalProgrammingFeatures::TypeInfo::Type; std::optional value = from_json(unify_value); if (value.has_value()) { - sl_log_debug(LOG_TAG, "InstalledOpenLimitLift attribute value is %s", unify_value.dump().c_str()); - UN::InstalledOpenLimitLift::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::WindowCovering::Id, - MN::InstalledOpenLimitLift::Id, ZCL_INT16U_ATTRIBUTE_TYPE, - reinterpret_cast(&value.value())); + sl_log_debug(LOG_TAG, "LocalProgrammingFeatures attribute value is %s", unify_value.dump().c_str()); + UN::LocalProgrammingFeatures::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::DoorLock::Id, MN::LocalProgrammingFeatures::Id, + ZCL_BITMAP8_ATTRIBUTE_TYPE, reinterpret_cast(&value.value())); } break; } - // type is int16u - case MN::InstalledClosedLimitLift::Id: { - using T = MN::InstalledClosedLimitLift::TypeInfo::Type; + // type is int8u + case MN::WrongCodeEntryLimit::Id: { + using T = MN::WrongCodeEntryLimit::TypeInfo::Type; std::optional value = from_json(unify_value); if (value.has_value()) { - sl_log_debug(LOG_TAG, "InstalledClosedLimitLift attribute value is %s", unify_value.dump().c_str()); - UN::InstalledClosedLimitLift::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::WindowCovering::Id, - MN::InstalledClosedLimitLift::Id, ZCL_INT16U_ATTRIBUTE_TYPE, - reinterpret_cast(&value.value())); + sl_log_debug(LOG_TAG, "WrongCodeEntryLimit attribute value is %s", unify_value.dump().c_str()); + UN::WrongCodeEntryLimit::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::DoorLock::Id, MN::WrongCodeEntryLimit::Id, + ZCL_INT8U_ATTRIBUTE_TYPE, reinterpret_cast(&value.value())); } break; } - // type is int16u - case MN::InstalledOpenLimitTilt::Id: { - using T = MN::InstalledOpenLimitTilt::TypeInfo::Type; + // type is int8u + case MN::UserCodeTemporaryDisableTime::Id: { + using T = MN::UserCodeTemporaryDisableTime::TypeInfo::Type; std::optional value = from_json(unify_value); if (value.has_value()) { - sl_log_debug(LOG_TAG, "InstalledOpenLimitTilt attribute value is %s", unify_value.dump().c_str()); - UN::InstalledOpenLimitTilt::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::WindowCovering::Id, - MN::InstalledOpenLimitTilt::Id, ZCL_INT16U_ATTRIBUTE_TYPE, + sl_log_debug(LOG_TAG, "UserCodeTemporaryDisableTime attribute value is %s", unify_value.dump().c_str()); + UN::UserCodeTemporaryDisableTime::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::DoorLock::Id, + MN::UserCodeTemporaryDisableTime::Id, ZCL_INT8U_ATTRIBUTE_TYPE, reinterpret_cast(&value.value())); } break; } - // type is int16u - case MN::InstalledClosedLimitTilt::Id: { - using T = MN::InstalledClosedLimitTilt::TypeInfo::Type; + // type is boolean + case MN::SendPINOverTheAir::Id: { + using T = MN::SendPINOverTheAir::TypeInfo::Type; std::optional value = from_json(unify_value); if (value.has_value()) { - sl_log_debug(LOG_TAG, "InstalledClosedLimitTilt attribute value is %s", unify_value.dump().c_str()); - UN::InstalledClosedLimitTilt::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::WindowCovering::Id, - MN::InstalledClosedLimitTilt::Id, ZCL_INT16U_ATTRIBUTE_TYPE, - reinterpret_cast(&value.value())); + sl_log_debug(LOG_TAG, "SendPINOverTheAir attribute value is %s", unify_value.dump().c_str()); + UN::SendPINOverTheAir::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::DoorLock::Id, MN::SendPINOverTheAir::Id, + ZCL_BOOLEAN_ATTRIBUTE_TYPE, reinterpret_cast(&value.value())); } break; } - // type is Mode - case MN::Mode::Id: { - using T = MN::Mode::TypeInfo::Type; + // type is boolean + case MN::RequirePINforRemoteOperation::Id: { + using T = MN::RequirePINforRemoteOperation::TypeInfo::Type; std::optional value = from_json(unify_value); if (value.has_value()) { - sl_log_debug(LOG_TAG, "Mode attribute value is %s", unify_value.dump().c_str()); - UN::Mode::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::WindowCovering::Id, MN::Mode::Id, - ZCL_BITMAP8_ATTRIBUTE_TYPE, reinterpret_cast(&value.value())); + sl_log_debug(LOG_TAG, "RequirePINforRemoteOperation attribute value is %s", unify_value.dump().c_str()); + UN::RequirePINforRemoteOperation::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::DoorLock::Id, + MN::RequirePINforRemoteOperation::Id, ZCL_BOOLEAN_ATTRIBUTE_TYPE, + reinterpret_cast(&value.value())); } break; } - // type is SafetyStatus - case MN::SafetyStatus::Id: { - using T = MN::SafetyStatus::TypeInfo::Type; + // type is int16u + case MN::ExpiringUserTimeout::Id: { + using T = MN::ExpiringUserTimeout::TypeInfo::Type; std::optional value = from_json(unify_value); if (value.has_value()) { - sl_log_debug(LOG_TAG, "SafetyStatus attribute value is %s", unify_value.dump().c_str()); - UN::SafetyStatus::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::WindowCovering::Id, MN::SafetyStatus::Id, - ZCL_BITMAP16_ATTRIBUTE_TYPE, reinterpret_cast(&value.value())); + sl_log_debug(LOG_TAG, "ExpiringUserTimeout attribute value is %s", unify_value.dump().c_str()); + UN::ExpiringUserTimeout::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::DoorLock::Id, MN::ExpiringUserTimeout::Id, + ZCL_INT16U_ATTRIBUTE_TYPE, reinterpret_cast(&value.value())); } break; } @@ -10861,7 +8765,7 @@ void WindowCoveringAttributeAccess::reported_updated(const bridged_endpoint * ep { sl_log_debug(LOG_TAG, "FeatureMap attribute value is %s", unify_value.dump().c_str()); UN::FeatureMap::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::WindowCovering::Id, MN::FeatureMap::Id, + MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::DoorLock::Id, MN::FeatureMap::Id, ZCL_BITMAP32_ATTRIBUTE_TYPE, reinterpret_cast(&value.value())); } break; @@ -10875,7 +8779,7 @@ void WindowCoveringAttributeAccess::reported_updated(const bridged_endpoint * ep { sl_log_debug(LOG_TAG, "ClusterRevision attribute value is %s", unify_value.dump().c_str()); UN::ClusterRevision::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::WindowCovering::Id, MN::ClusterRevision::Id, + MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::DoorLock::Id, MN::ClusterRevision::Id, ZCL_INT16U_ATTRIBUTE_TYPE, reinterpret_cast(&value.value())); } break; @@ -10884,88 +8788,135 @@ void WindowCoveringAttributeAccess::reported_updated(const bridged_endpoint * ep } CHIP_ERROR -BarrierControlAttributeAccess::Read(const ConcreteReadAttributePath & aPath, AttributeValueEncoder & aEncoder) +WindowCoveringAttributeAccess::Read(const ConcreteReadAttributePath & aPath, AttributeValueEncoder & aEncoder) { - namespace MN = chip::app::Clusters::BarrierControl::Attributes; - namespace UN = unify::matter_bridge::BarrierControl::Attributes; - if (aPath.mClusterId != Clusters::BarrierControl::Id) + namespace MN = chip::app::Clusters::WindowCovering::Attributes; + namespace UN = unify::matter_bridge::WindowCovering::Attributes; + if (aPath.mClusterId != Clusters::WindowCovering::Id) { return CHIP_ERROR_INVALID_ARGUMENT; } ConcreteAttributePath atrpath = ConcreteAttributePath(aPath.mEndpointId, aPath.mClusterId, aPath.mAttributeId); - try { switch (aPath.mAttributeId) { - - case MN::BarrierMovingState::Id: { // type is enum8 - MN::BarrierMovingState::TypeInfo::Type value; - UN::BarrierMovingState::Get(atrpath, value); + case MN::Type::Id: { // type is Type + MN::Type::TypeInfo::Type value; + UN::Type::Get(atrpath, value); return aEncoder.Encode(value); } - - case MN::BarrierSafetyStatus::Id: { // type is bitmap16 - MN::BarrierSafetyStatus::TypeInfo::Type value; - UN::BarrierSafetyStatus::Get(atrpath, value); + case MN::PhysicalClosedLimitLift::Id: { // type is int16u + MN::PhysicalClosedLimitLift::TypeInfo::Type value; + UN::PhysicalClosedLimitLift::Get(atrpath, value); return aEncoder.Encode(value); } - - case MN::BarrierCapabilities::Id: { // type is bitmap8 - MN::BarrierCapabilities::TypeInfo::Type value; - UN::BarrierCapabilities::Get(atrpath, value); + case MN::PhysicalClosedLimitTilt::Id: { // type is int16u + MN::PhysicalClosedLimitTilt::TypeInfo::Type value; + UN::PhysicalClosedLimitTilt::Get(atrpath, value); return aEncoder.Encode(value); } - - case MN::BarrierOpenEvents::Id: { // type is int16u - MN::BarrierOpenEvents::TypeInfo::Type value; - UN::BarrierOpenEvents::Get(atrpath, value); + case MN::CurrentPositionLift::Id: { // type is int16u + MN::CurrentPositionLift::TypeInfo::Type value; + UN::CurrentPositionLift::Get(atrpath, value); return aEncoder.Encode(value); } - - case MN::BarrierCloseEvents::Id: { // type is int16u - MN::BarrierCloseEvents::TypeInfo::Type value; - UN::BarrierCloseEvents::Get(atrpath, value); + case MN::CurrentPositionTilt::Id: { // type is int16u + MN::CurrentPositionTilt::TypeInfo::Type value; + UN::CurrentPositionTilt::Get(atrpath, value); return aEncoder.Encode(value); } - - case MN::BarrierCommandOpenEvents::Id: { // type is int16u - MN::BarrierCommandOpenEvents::TypeInfo::Type value; - UN::BarrierCommandOpenEvents::Get(atrpath, value); + case MN::NumberOfActuationsLift::Id: { // type is int16u + MN::NumberOfActuationsLift::TypeInfo::Type value; + UN::NumberOfActuationsLift::Get(atrpath, value); return aEncoder.Encode(value); } - - case MN::BarrierCommandCloseEvents::Id: { // type is int16u - MN::BarrierCommandCloseEvents::TypeInfo::Type value; - UN::BarrierCommandCloseEvents::Get(atrpath, value); + case MN::NumberOfActuationsTilt::Id: { // type is int16u + MN::NumberOfActuationsTilt::TypeInfo::Type value; + UN::NumberOfActuationsTilt::Get(atrpath, value); return aEncoder.Encode(value); } - - case MN::BarrierOpenPeriod::Id: { // type is int16u - MN::BarrierOpenPeriod::TypeInfo::Type value; - UN::BarrierOpenPeriod::Get(atrpath, value); + case MN::ConfigStatus::Id: { // type is ConfigStatus + MN::ConfigStatus::TypeInfo::Type value; + UN::ConfigStatus::Get(atrpath, value); return aEncoder.Encode(value); } - - case MN::BarrierClosePeriod::Id: { // type is int16u - MN::BarrierClosePeriod::TypeInfo::Type value; - UN::BarrierClosePeriod::Get(atrpath, value); + case MN::CurrentPositionLiftPercentage::Id: { // type is Percent + MN::CurrentPositionLiftPercentage::TypeInfo::Type value; + UN::CurrentPositionLiftPercentage::Get(atrpath, value); return aEncoder.Encode(value); } - - case MN::BarrierPosition::Id: { // type is int8u - MN::BarrierPosition::TypeInfo::Type value; - UN::BarrierPosition::Get(atrpath, value); + case MN::CurrentPositionTiltPercentage::Id: { // type is Percent + MN::CurrentPositionTiltPercentage::TypeInfo::Type value; + UN::CurrentPositionTiltPercentage::Get(atrpath, value); + return aEncoder.Encode(value); + } + case MN::OperationalStatus::Id: { // type is OperationalStatus + MN::OperationalStatus::TypeInfo::Type value; + UN::OperationalStatus::Get(atrpath, value); + return aEncoder.Encode(value); + } + case MN::TargetPositionLiftPercent100ths::Id: { // type is Percent100ths + MN::TargetPositionLiftPercent100ths::TypeInfo::Type value; + UN::TargetPositionLiftPercent100ths::Get(atrpath, value); + return aEncoder.Encode(value); + } + case MN::TargetPositionTiltPercent100ths::Id: { // type is Percent100ths + MN::TargetPositionTiltPercent100ths::TypeInfo::Type value; + UN::TargetPositionTiltPercent100ths::Get(atrpath, value); + return aEncoder.Encode(value); + } + case MN::EndProductType::Id: { // type is EndProductType + MN::EndProductType::TypeInfo::Type value; + UN::EndProductType::Get(atrpath, value); + return aEncoder.Encode(value); + } + case MN::CurrentPositionLiftPercent100ths::Id: { // type is Percent100ths + MN::CurrentPositionLiftPercent100ths::TypeInfo::Type value; + UN::CurrentPositionLiftPercent100ths::Get(atrpath, value); + return aEncoder.Encode(value); + } + case MN::CurrentPositionTiltPercent100ths::Id: { // type is Percent100ths + MN::CurrentPositionTiltPercent100ths::TypeInfo::Type value; + UN::CurrentPositionTiltPercent100ths::Get(atrpath, value); + return aEncoder.Encode(value); + } + case MN::InstalledOpenLimitLift::Id: { // type is int16u + MN::InstalledOpenLimitLift::TypeInfo::Type value; + UN::InstalledOpenLimitLift::Get(atrpath, value); + return aEncoder.Encode(value); + } + case MN::InstalledClosedLimitLift::Id: { // type is int16u + MN::InstalledClosedLimitLift::TypeInfo::Type value; + UN::InstalledClosedLimitLift::Get(atrpath, value); + return aEncoder.Encode(value); + } + case MN::InstalledOpenLimitTilt::Id: { // type is int16u + MN::InstalledOpenLimitTilt::TypeInfo::Type value; + UN::InstalledOpenLimitTilt::Get(atrpath, value); + return aEncoder.Encode(value); + } + case MN::InstalledClosedLimitTilt::Id: { // type is int16u + MN::InstalledClosedLimitTilt::TypeInfo::Type value; + UN::InstalledClosedLimitTilt::Get(atrpath, value); + return aEncoder.Encode(value); + } + case MN::Mode::Id: { // type is Mode + MN::Mode::TypeInfo::Type value; + UN::Mode::Get(atrpath, value); + return aEncoder.Encode(value); + } + case MN::SafetyStatus::Id: { // type is SafetyStatus + MN::SafetyStatus::TypeInfo::Type value; + UN::SafetyStatus::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::FeatureMap::Id: { // type is bitmap32 MN::FeatureMap::TypeInfo::Type value; UN::FeatureMap::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::ClusterRevision::Id: { // type is int16u MN::ClusterRevision::TypeInfo::Type value; UN::ClusterRevision::Get(atrpath, value); @@ -10983,11 +8934,11 @@ BarrierControlAttributeAccess::Read(const ConcreteReadAttributePath & aPath, Att return CHIP_NO_ERROR; } -CHIP_ERROR BarrierControlAttributeAccess::Write(const ConcreteDataAttributePath & aPath, AttributeValueDecoder & aDecoder) +CHIP_ERROR WindowCoveringAttributeAccess::Write(const ConcreteDataAttributePath & aPath, AttributeValueDecoder & aDecoder) { - using namespace chip::app::Clusters::BarrierControl; + using namespace chip::app::Clusters::WindowCovering; - if (aPath.mClusterId != Clusters::BarrierControl::Id) + if (aPath.mClusterId != Clusters::WindowCovering::Id) { return CHIP_ERROR_INVALID_ARGUMENT; } @@ -11002,14 +8953,13 @@ CHIP_ERROR BarrierControlAttributeAccess::Write(const ConcreteDataAttributePath nlohmann::json jsn; switch (aPath.mAttributeId) - { - } + {} if (!attribute_name.empty()) { std::string payload_str; std::string topic = "ucl/by-unid/" + unify_node->unify_unid + "/ep" + std::to_string(unify_node->unify_endpoint) + - "/BarrierControl/Attributes/" + attribute_name + "/Desired"; + "/WindowCovering/Attributes/" + attribute_name + "/Desired"; payload_str = jsn.dump(); uic_mqtt_publish(topic.c_str(), payload_str.c_str(), payload_str.length(), true); return CHIP_ERROR_NO_MESSAGE_HANDLER; @@ -11018,15 +8968,15 @@ CHIP_ERROR BarrierControlAttributeAccess::Write(const ConcreteDataAttributePath return CHIP_NO_ERROR; } -void BarrierControlAttributeAccess::reported_updated(const bridged_endpoint * ep, const std::string & cluster, +void WindowCoveringAttributeAccess::reported_updated(const bridged_endpoint * ep, const std::string & cluster, const std::string & attribute, const nlohmann::json & unify_value) { - namespace MN = chip::app::Clusters::BarrierControl::Attributes; - namespace UN = unify::matter_bridge::BarrierControl::Attributes; + namespace MN = chip::app::Clusters::WindowCovering::Attributes; + namespace UN = unify::matter_bridge::WindowCovering::Attributes; auto cluster_id = device_translator::instance().get_cluster_id(cluster); - if (!cluster_id.has_value() || (cluster_id.value() != Clusters::BarrierControl::Id)) + if (!cluster_id.has_value() || (cluster_id.value() != Clusters::WindowCovering::Id)) { return; } @@ -11041,149 +8991,324 @@ void BarrierControlAttributeAccess::reported_updated(const bridged_endpoint * ep chip::EndpointId node_matter_endpoint = ep->matter_endpoint; ConcreteAttributePath attrpath = - ConcreteAttributePath(node_matter_endpoint, Clusters::BarrierControl::Id, attribute_id.value()); - + ConcreteAttributePath(node_matter_endpoint, Clusters::WindowCovering::Id, attribute_id.value()); switch (attribute_id.value()) { - // type is enum8 - case MN::BarrierMovingState::Id: { - using T = MN::BarrierMovingState::TypeInfo::Type; + // type is Type + case MN::Type::Id: { + using T = MN::Type::TypeInfo::Type; std::optional value = from_json(unify_value); if (value.has_value()) { - sl_log_debug(LOG_TAG, "BarrierMovingState attribute value is %s", unify_value.dump().c_str()); - UN::BarrierMovingState::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::BarrierControl::Id, MN::BarrierMovingState::Id, + sl_log_debug(LOG_TAG, "Type attribute value is %s", unify_value.dump().c_str()); + UN::Type::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::WindowCovering::Id, MN::Type::Id, ZCL_ENUM8_ATTRIBUTE_TYPE, reinterpret_cast(&value.value())); } break; } - // type is bitmap16 - case MN::BarrierSafetyStatus::Id: { - using T = MN::BarrierSafetyStatus::TypeInfo::Type; + // type is int16u + case MN::PhysicalClosedLimitLift::Id: { + using T = MN::PhysicalClosedLimitLift::TypeInfo::Type; std::optional value = from_json(unify_value); if (value.has_value()) { - sl_log_debug(LOG_TAG, "BarrierSafetyStatus attribute value is %s", unify_value.dump().c_str()); - UN::BarrierSafetyStatus::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::BarrierControl::Id, MN::BarrierSafetyStatus::Id, - ZCL_BITMAP16_ATTRIBUTE_TYPE, reinterpret_cast(&value.value())); + sl_log_debug(LOG_TAG, "PhysicalClosedLimitLift attribute value is %s", unify_value.dump().c_str()); + UN::PhysicalClosedLimitLift::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::WindowCovering::Id, + MN::PhysicalClosedLimitLift::Id, ZCL_INT16U_ATTRIBUTE_TYPE, + reinterpret_cast(&value.value())); } break; } - // type is bitmap8 - case MN::BarrierCapabilities::Id: { - using T = MN::BarrierCapabilities::TypeInfo::Type; + // type is int16u + case MN::PhysicalClosedLimitTilt::Id: { + using T = MN::PhysicalClosedLimitTilt::TypeInfo::Type; std::optional value = from_json(unify_value); if (value.has_value()) { - sl_log_debug(LOG_TAG, "BarrierCapabilities attribute value is %s", unify_value.dump().c_str()); - UN::BarrierCapabilities::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::BarrierControl::Id, MN::BarrierCapabilities::Id, - ZCL_BITMAP8_ATTRIBUTE_TYPE, reinterpret_cast(&value.value())); + sl_log_debug(LOG_TAG, "PhysicalClosedLimitTilt attribute value is %s", unify_value.dump().c_str()); + UN::PhysicalClosedLimitTilt::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::WindowCovering::Id, + MN::PhysicalClosedLimitTilt::Id, ZCL_INT16U_ATTRIBUTE_TYPE, + reinterpret_cast(&value.value())); } break; } // type is int16u - case MN::BarrierOpenEvents::Id: { - using T = MN::BarrierOpenEvents::TypeInfo::Type; + case MN::CurrentPositionLift::Id: { + using T = MN::CurrentPositionLift::TypeInfo::Type; std::optional value = from_json(unify_value); if (value.has_value()) { - sl_log_debug(LOG_TAG, "BarrierOpenEvents attribute value is %s", unify_value.dump().c_str()); - UN::BarrierOpenEvents::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::BarrierControl::Id, MN::BarrierOpenEvents::Id, + sl_log_debug(LOG_TAG, "CurrentPositionLift attribute value is %s", unify_value.dump().c_str()); + UN::CurrentPositionLift::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::WindowCovering::Id, MN::CurrentPositionLift::Id, ZCL_INT16U_ATTRIBUTE_TYPE, reinterpret_cast(&value.value())); } break; } // type is int16u - case MN::BarrierCloseEvents::Id: { - using T = MN::BarrierCloseEvents::TypeInfo::Type; + case MN::CurrentPositionTilt::Id: { + using T = MN::CurrentPositionTilt::TypeInfo::Type; std::optional value = from_json(unify_value); if (value.has_value()) { - sl_log_debug(LOG_TAG, "BarrierCloseEvents attribute value is %s", unify_value.dump().c_str()); - UN::BarrierCloseEvents::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::BarrierControl::Id, MN::BarrierCloseEvents::Id, + sl_log_debug(LOG_TAG, "CurrentPositionTilt attribute value is %s", unify_value.dump().c_str()); + UN::CurrentPositionTilt::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::WindowCovering::Id, MN::CurrentPositionTilt::Id, ZCL_INT16U_ATTRIBUTE_TYPE, reinterpret_cast(&value.value())); } break; } // type is int16u - case MN::BarrierCommandOpenEvents::Id: { - using T = MN::BarrierCommandOpenEvents::TypeInfo::Type; + case MN::NumberOfActuationsLift::Id: { + using T = MN::NumberOfActuationsLift::TypeInfo::Type; std::optional value = from_json(unify_value); if (value.has_value()) { - sl_log_debug(LOG_TAG, "BarrierCommandOpenEvents attribute value is %s", unify_value.dump().c_str()); - UN::BarrierCommandOpenEvents::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::BarrierControl::Id, - MN::BarrierCommandOpenEvents::Id, ZCL_INT16U_ATTRIBUTE_TYPE, + sl_log_debug(LOG_TAG, "NumberOfActuationsLift attribute value is %s", unify_value.dump().c_str()); + UN::NumberOfActuationsLift::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::WindowCovering::Id, + MN::NumberOfActuationsLift::Id, ZCL_INT16U_ATTRIBUTE_TYPE, reinterpret_cast(&value.value())); } break; } // type is int16u - case MN::BarrierCommandCloseEvents::Id: { - using T = MN::BarrierCommandCloseEvents::TypeInfo::Type; + case MN::NumberOfActuationsTilt::Id: { + using T = MN::NumberOfActuationsTilt::TypeInfo::Type; + std::optional value = from_json(unify_value); + + if (value.has_value()) + { + sl_log_debug(LOG_TAG, "NumberOfActuationsTilt attribute value is %s", unify_value.dump().c_str()); + UN::NumberOfActuationsTilt::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::WindowCovering::Id, + MN::NumberOfActuationsTilt::Id, ZCL_INT16U_ATTRIBUTE_TYPE, + reinterpret_cast(&value.value())); + } + break; + } + // type is ConfigStatus + case MN::ConfigStatus::Id: { + std::optional value = from_json_ConfigStatus(unify_value); + + if (value.has_value()) + { + sl_log_debug(LOG_TAG, "ConfigStatus attribute value is %s", unify_value.dump().c_str()); + UN::ConfigStatus::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::WindowCovering::Id, MN::ConfigStatus::Id, + ZCL_BITMAP8_ATTRIBUTE_TYPE, reinterpret_cast(&value.value())); + } + break; + } + // type is Percent + case MN::CurrentPositionLiftPercentage::Id: { + using T = MN::CurrentPositionLiftPercentage::TypeInfo::Type; + std::optional value = from_json(unify_value); + + if (value.has_value()) + { + sl_log_debug(LOG_TAG, "CurrentPositionLiftPercentage attribute value is %s", unify_value.dump().c_str()); + UN::CurrentPositionLiftPercentage::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::WindowCovering::Id, + MN::CurrentPositionLiftPercentage::Id, ZCL_PERCENT_ATTRIBUTE_TYPE, + reinterpret_cast(&value.value())); + } + break; + } + // type is Percent + case MN::CurrentPositionTiltPercentage::Id: { + using T = MN::CurrentPositionTiltPercentage::TypeInfo::Type; + std::optional value = from_json(unify_value); + + if (value.has_value()) + { + sl_log_debug(LOG_TAG, "CurrentPositionTiltPercentage attribute value is %s", unify_value.dump().c_str()); + UN::CurrentPositionTiltPercentage::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::WindowCovering::Id, + MN::CurrentPositionTiltPercentage::Id, ZCL_PERCENT_ATTRIBUTE_TYPE, + reinterpret_cast(&value.value())); + } + break; + } + // type is OperationalStatus + case MN::OperationalStatus::Id: { + std::optional value = from_json_OperationalStatus(unify_value); + + if (value.has_value()) + { + sl_log_debug(LOG_TAG, "OperationalStatus attribute value is %s", unify_value.dump().c_str()); + UN::OperationalStatus::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::WindowCovering::Id, MN::OperationalStatus::Id, + ZCL_BITMAP8_ATTRIBUTE_TYPE, reinterpret_cast(&value.value())); + } + break; + } + // type is Percent100ths + case MN::TargetPositionLiftPercent100ths::Id: { + using T = MN::TargetPositionLiftPercent100ths::TypeInfo::Type; + std::optional value = from_json(unify_value); + + if (value.has_value()) + { + sl_log_debug(LOG_TAG, "TargetPositionLiftPercent100ths attribute value is %s", unify_value.dump().c_str()); + UN::TargetPositionLiftPercent100ths::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::WindowCovering::Id, + MN::TargetPositionLiftPercent100ths::Id, ZCL_PERCENT100THS_ATTRIBUTE_TYPE, + reinterpret_cast(&value.value())); + } + break; + } + // type is Percent100ths + case MN::TargetPositionTiltPercent100ths::Id: { + using T = MN::TargetPositionTiltPercent100ths::TypeInfo::Type; + std::optional value = from_json(unify_value); + + if (value.has_value()) + { + sl_log_debug(LOG_TAG, "TargetPositionTiltPercent100ths attribute value is %s", unify_value.dump().c_str()); + UN::TargetPositionTiltPercent100ths::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::WindowCovering::Id, + MN::TargetPositionTiltPercent100ths::Id, ZCL_PERCENT100THS_ATTRIBUTE_TYPE, + reinterpret_cast(&value.value())); + } + break; + } + // type is EndProductType + case MN::EndProductType::Id: { + using T = MN::EndProductType::TypeInfo::Type; + std::optional value = from_json(unify_value); + + if (value.has_value()) + { + sl_log_debug(LOG_TAG, "EndProductType attribute value is %s", unify_value.dump().c_str()); + UN::EndProductType::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::WindowCovering::Id, MN::EndProductType::Id, + ZCL_ENUM8_ATTRIBUTE_TYPE, reinterpret_cast(&value.value())); + } + break; + } + // type is Percent100ths + case MN::CurrentPositionLiftPercent100ths::Id: { + using T = MN::CurrentPositionLiftPercent100ths::TypeInfo::Type; + std::optional value = from_json(unify_value); + + if (value.has_value()) + { + sl_log_debug(LOG_TAG, "CurrentPositionLiftPercent100ths attribute value is %s", unify_value.dump().c_str()); + UN::CurrentPositionLiftPercent100ths::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::WindowCovering::Id, + MN::CurrentPositionLiftPercent100ths::Id, ZCL_PERCENT100THS_ATTRIBUTE_TYPE, + reinterpret_cast(&value.value())); + } + break; + } + // type is Percent100ths + case MN::CurrentPositionTiltPercent100ths::Id: { + using T = MN::CurrentPositionTiltPercent100ths::TypeInfo::Type; + std::optional value = from_json(unify_value); + + if (value.has_value()) + { + sl_log_debug(LOG_TAG, "CurrentPositionTiltPercent100ths attribute value is %s", unify_value.dump().c_str()); + UN::CurrentPositionTiltPercent100ths::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::WindowCovering::Id, + MN::CurrentPositionTiltPercent100ths::Id, ZCL_PERCENT100THS_ATTRIBUTE_TYPE, + reinterpret_cast(&value.value())); + } + break; + } + // type is int16u + case MN::InstalledOpenLimitLift::Id: { + using T = MN::InstalledOpenLimitLift::TypeInfo::Type; + std::optional value = from_json(unify_value); + + if (value.has_value()) + { + sl_log_debug(LOG_TAG, "InstalledOpenLimitLift attribute value is %s", unify_value.dump().c_str()); + UN::InstalledOpenLimitLift::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::WindowCovering::Id, + MN::InstalledOpenLimitLift::Id, ZCL_INT16U_ATTRIBUTE_TYPE, + reinterpret_cast(&value.value())); + } + break; + } + // type is int16u + case MN::InstalledClosedLimitLift::Id: { + using T = MN::InstalledClosedLimitLift::TypeInfo::Type; + std::optional value = from_json(unify_value); + + if (value.has_value()) + { + sl_log_debug(LOG_TAG, "InstalledClosedLimitLift attribute value is %s", unify_value.dump().c_str()); + UN::InstalledClosedLimitLift::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::WindowCovering::Id, + MN::InstalledClosedLimitLift::Id, ZCL_INT16U_ATTRIBUTE_TYPE, + reinterpret_cast(&value.value())); + } + break; + } + // type is int16u + case MN::InstalledOpenLimitTilt::Id: { + using T = MN::InstalledOpenLimitTilt::TypeInfo::Type; std::optional value = from_json(unify_value); if (value.has_value()) { - sl_log_debug(LOG_TAG, "BarrierCommandCloseEvents attribute value is %s", unify_value.dump().c_str()); - UN::BarrierCommandCloseEvents::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::BarrierControl::Id, - MN::BarrierCommandCloseEvents::Id, ZCL_INT16U_ATTRIBUTE_TYPE, + sl_log_debug(LOG_TAG, "InstalledOpenLimitTilt attribute value is %s", unify_value.dump().c_str()); + UN::InstalledOpenLimitTilt::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::WindowCovering::Id, + MN::InstalledOpenLimitTilt::Id, ZCL_INT16U_ATTRIBUTE_TYPE, reinterpret_cast(&value.value())); } break; } // type is int16u - case MN::BarrierOpenPeriod::Id: { - using T = MN::BarrierOpenPeriod::TypeInfo::Type; + case MN::InstalledClosedLimitTilt::Id: { + using T = MN::InstalledClosedLimitTilt::TypeInfo::Type; std::optional value = from_json(unify_value); if (value.has_value()) { - sl_log_debug(LOG_TAG, "BarrierOpenPeriod attribute value is %s", unify_value.dump().c_str()); - UN::BarrierOpenPeriod::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::BarrierControl::Id, MN::BarrierOpenPeriod::Id, - ZCL_INT16U_ATTRIBUTE_TYPE, reinterpret_cast(&value.value())); + sl_log_debug(LOG_TAG, "InstalledClosedLimitTilt attribute value is %s", unify_value.dump().c_str()); + UN::InstalledClosedLimitTilt::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::WindowCovering::Id, + MN::InstalledClosedLimitTilt::Id, ZCL_INT16U_ATTRIBUTE_TYPE, + reinterpret_cast(&value.value())); } break; } - // type is int16u - case MN::BarrierClosePeriod::Id: { - using T = MN::BarrierClosePeriod::TypeInfo::Type; - std::optional value = from_json(unify_value); + // type is Mode + case MN::Mode::Id: { + std::optional value = from_json_Mode(unify_value); if (value.has_value()) { - sl_log_debug(LOG_TAG, "BarrierClosePeriod attribute value is %s", unify_value.dump().c_str()); - UN::BarrierClosePeriod::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::BarrierControl::Id, MN::BarrierClosePeriod::Id, - ZCL_INT16U_ATTRIBUTE_TYPE, reinterpret_cast(&value.value())); + sl_log_debug(LOG_TAG, "Mode attribute value is %s", unify_value.dump().c_str()); + UN::Mode::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::WindowCovering::Id, MN::Mode::Id, + ZCL_BITMAP8_ATTRIBUTE_TYPE, reinterpret_cast(&value.value())); } break; } - // type is int8u - case MN::BarrierPosition::Id: { - using T = MN::BarrierPosition::TypeInfo::Type; - std::optional value = from_json(unify_value); + // type is SafetyStatus + case MN::SafetyStatus::Id: { + std::optional value = from_json_SafetyStatus(unify_value); if (value.has_value()) { - sl_log_debug(LOG_TAG, "BarrierPosition attribute value is %s", unify_value.dump().c_str()); - UN::BarrierPosition::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::BarrierControl::Id, MN::BarrierPosition::Id, - ZCL_INT8U_ATTRIBUTE_TYPE, reinterpret_cast(&value.value())); + sl_log_debug(LOG_TAG, "SafetyStatus attribute value is %s", unify_value.dump().c_str()); + UN::SafetyStatus::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::WindowCovering::Id, MN::SafetyStatus::Id, + ZCL_BITMAP16_ATTRIBUTE_TYPE, reinterpret_cast(&value.value())); } break; } @@ -11196,7 +9321,7 @@ void BarrierControlAttributeAccess::reported_updated(const bridged_endpoint * ep { sl_log_debug(LOG_TAG, "FeatureMap attribute value is %s", unify_value.dump().c_str()); UN::FeatureMap::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::BarrierControl::Id, MN::FeatureMap::Id, + MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::WindowCovering::Id, MN::FeatureMap::Id, ZCL_BITMAP32_ATTRIBUTE_TYPE, reinterpret_cast(&value.value())); } break; @@ -11210,7 +9335,7 @@ void BarrierControlAttributeAccess::reported_updated(const bridged_endpoint * ep { sl_log_debug(LOG_TAG, "ClusterRevision attribute value is %s", unify_value.dump().c_str()); UN::ClusterRevision::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::BarrierControl::Id, MN::ClusterRevision::Id, + MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::WindowCovering::Id, MN::ClusterRevision::Id, ZCL_INT16U_ATTRIBUTE_TYPE, reinterpret_cast(&value.value())); } break; @@ -11219,166 +9344,75 @@ void BarrierControlAttributeAccess::reported_updated(const bridged_endpoint * ep } CHIP_ERROR -PumpConfigurationAndControlAttributeAccess::Read(const ConcreteReadAttributePath & aPath, AttributeValueEncoder & aEncoder) +BarrierControlAttributeAccess::Read(const ConcreteReadAttributePath & aPath, AttributeValueEncoder & aEncoder) { - namespace MN = chip::app::Clusters::PumpConfigurationAndControl::Attributes; - namespace UN = unify::matter_bridge::PumpConfigurationAndControl::Attributes; - if (aPath.mClusterId != Clusters::PumpConfigurationAndControl::Id) + namespace MN = chip::app::Clusters::BarrierControl::Attributes; + namespace UN = unify::matter_bridge::BarrierControl::Attributes; + if (aPath.mClusterId != Clusters::BarrierControl::Id) { return CHIP_ERROR_INVALID_ARGUMENT; } ConcreteAttributePath atrpath = ConcreteAttributePath(aPath.mEndpointId, aPath.mClusterId, aPath.mAttributeId); - try { switch (aPath.mAttributeId) { - - case MN::MaxPressure::Id: { // type is int16s - MN::MaxPressure::TypeInfo::Type value; - UN::MaxPressure::Get(atrpath, value); - return aEncoder.Encode(value); - } - - case MN::MaxSpeed::Id: { // type is int16u - MN::MaxSpeed::TypeInfo::Type value; - UN::MaxSpeed::Get(atrpath, value); - return aEncoder.Encode(value); - } - - case MN::MaxFlow::Id: { // type is int16u - MN::MaxFlow::TypeInfo::Type value; - UN::MaxFlow::Get(atrpath, value); - return aEncoder.Encode(value); - } - - case MN::MinConstPressure::Id: { // type is int16s - MN::MinConstPressure::TypeInfo::Type value; - UN::MinConstPressure::Get(atrpath, value); - return aEncoder.Encode(value); - } - - case MN::MaxConstPressure::Id: { // type is int16s - MN::MaxConstPressure::TypeInfo::Type value; - UN::MaxConstPressure::Get(atrpath, value); - return aEncoder.Encode(value); - } - - case MN::MinCompPressure::Id: { // type is int16s - MN::MinCompPressure::TypeInfo::Type value; - UN::MinCompPressure::Get(atrpath, value); - return aEncoder.Encode(value); - } - - case MN::MaxCompPressure::Id: { // type is int16s - MN::MaxCompPressure::TypeInfo::Type value; - UN::MaxCompPressure::Get(atrpath, value); - return aEncoder.Encode(value); - } - - case MN::MinConstSpeed::Id: { // type is int16u - MN::MinConstSpeed::TypeInfo::Type value; - UN::MinConstSpeed::Get(atrpath, value); - return aEncoder.Encode(value); - } - - case MN::MaxConstSpeed::Id: { // type is int16u - MN::MaxConstSpeed::TypeInfo::Type value; - UN::MaxConstSpeed::Get(atrpath, value); - return aEncoder.Encode(value); - } - - case MN::MinConstFlow::Id: { // type is int16u - MN::MinConstFlow::TypeInfo::Type value; - UN::MinConstFlow::Get(atrpath, value); - return aEncoder.Encode(value); - } - - case MN::MaxConstFlow::Id: { // type is int16u - MN::MaxConstFlow::TypeInfo::Type value; - UN::MaxConstFlow::Get(atrpath, value); - return aEncoder.Encode(value); - } - - case MN::MinConstTemp::Id: { // type is int16s - MN::MinConstTemp::TypeInfo::Type value; - UN::MinConstTemp::Get(atrpath, value); - return aEncoder.Encode(value); - } - - case MN::MaxConstTemp::Id: { // type is int16s - MN::MaxConstTemp::TypeInfo::Type value; - UN::MaxConstTemp::Get(atrpath, value); - return aEncoder.Encode(value); - } - - case MN::PumpStatus::Id: { // type is PumpStatus - MN::PumpStatus::TypeInfo::Type value; - UN::PumpStatus::Get(atrpath, value); + case MN::BarrierMovingState::Id: { // type is enum8 + MN::BarrierMovingState::TypeInfo::Type value; + UN::BarrierMovingState::Get(atrpath, value); return aEncoder.Encode(value); } - - case MN::EffectiveOperationMode::Id: { // type is PumpOperationMode - MN::EffectiveOperationMode::TypeInfo::Type value; - UN::EffectiveOperationMode::Get(atrpath, value); + case MN::BarrierSafetyStatus::Id: { // type is bitmap16 + MN::BarrierSafetyStatus::TypeInfo::Type value; + UN::BarrierSafetyStatus::Get(atrpath, value); return aEncoder.Encode(value); } - - case MN::EffectiveControlMode::Id: { // type is PumpControlMode - MN::EffectiveControlMode::TypeInfo::Type value; - UN::EffectiveControlMode::Get(atrpath, value); + case MN::BarrierCapabilities::Id: { // type is bitmap8 + MN::BarrierCapabilities::TypeInfo::Type value; + UN::BarrierCapabilities::Get(atrpath, value); return aEncoder.Encode(value); } - - case MN::Capacity::Id: { // type is int16s - MN::Capacity::TypeInfo::Type value; - UN::Capacity::Get(atrpath, value); + case MN::BarrierOpenEvents::Id: { // type is int16u + MN::BarrierOpenEvents::TypeInfo::Type value; + UN::BarrierOpenEvents::Get(atrpath, value); return aEncoder.Encode(value); } - - case MN::Speed::Id: { // type is int16u - MN::Speed::TypeInfo::Type value; - UN::Speed::Get(atrpath, value); + case MN::BarrierCloseEvents::Id: { // type is int16u + MN::BarrierCloseEvents::TypeInfo::Type value; + UN::BarrierCloseEvents::Get(atrpath, value); return aEncoder.Encode(value); } - - case MN::LifetimeRunningHours::Id: { // type is int24u - MN::LifetimeRunningHours::TypeInfo::Type value; - UN::LifetimeRunningHours::Get(atrpath, value); + case MN::BarrierCommandOpenEvents::Id: { // type is int16u + MN::BarrierCommandOpenEvents::TypeInfo::Type value; + UN::BarrierCommandOpenEvents::Get(atrpath, value); return aEncoder.Encode(value); } - - case MN::Power::Id: { // type is int24u - MN::Power::TypeInfo::Type value; - UN::Power::Get(atrpath, value); + case MN::BarrierCommandCloseEvents::Id: { // type is int16u + MN::BarrierCommandCloseEvents::TypeInfo::Type value; + UN::BarrierCommandCloseEvents::Get(atrpath, value); return aEncoder.Encode(value); } - - case MN::LifetimeEnergyConsumed::Id: { // type is int32u - MN::LifetimeEnergyConsumed::TypeInfo::Type value; - UN::LifetimeEnergyConsumed::Get(atrpath, value); + case MN::BarrierOpenPeriod::Id: { // type is int16u + MN::BarrierOpenPeriod::TypeInfo::Type value; + UN::BarrierOpenPeriod::Get(atrpath, value); return aEncoder.Encode(value); } - - case MN::OperationMode::Id: { // type is PumpOperationMode - MN::OperationMode::TypeInfo::Type value; - UN::OperationMode::Get(atrpath, value); + case MN::BarrierClosePeriod::Id: { // type is int16u + MN::BarrierClosePeriod::TypeInfo::Type value; + UN::BarrierClosePeriod::Get(atrpath, value); return aEncoder.Encode(value); } - - case MN::ControlMode::Id: { // type is PumpControlMode - MN::ControlMode::TypeInfo::Type value; - UN::ControlMode::Get(atrpath, value); + case MN::BarrierPosition::Id: { // type is int8u + MN::BarrierPosition::TypeInfo::Type value; + UN::BarrierPosition::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::FeatureMap::Id: { // type is bitmap32 MN::FeatureMap::TypeInfo::Type value; UN::FeatureMap::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::ClusterRevision::Id: { // type is int16u MN::ClusterRevision::TypeInfo::Type value; UN::ClusterRevision::Get(atrpath, value); @@ -11396,12 +9430,11 @@ PumpConfigurationAndControlAttributeAccess::Read(const ConcreteReadAttributePath return CHIP_NO_ERROR; } -CHIP_ERROR PumpConfigurationAndControlAttributeAccess::Write(const ConcreteDataAttributePath & aPath, - AttributeValueDecoder & aDecoder) +CHIP_ERROR BarrierControlAttributeAccess::Write(const ConcreteDataAttributePath & aPath, AttributeValueDecoder & aDecoder) { - using namespace chip::app::Clusters::PumpConfigurationAndControl; + using namespace chip::app::Clusters::BarrierControl; - if (aPath.mClusterId != Clusters::PumpConfigurationAndControl::Id) + if (aPath.mClusterId != Clusters::BarrierControl::Id) { return CHIP_ERROR_INVALID_ARGUMENT; } @@ -11416,388 +9449,186 @@ CHIP_ERROR PumpConfigurationAndControlAttributeAccess::Write(const ConcreteDataA nlohmann::json jsn; switch (aPath.mAttributeId) - { - } + {} if (!attribute_name.empty()) { std::string payload_str; std::string topic = "ucl/by-unid/" + unify_node->unify_unid + "/ep" + std::to_string(unify_node->unify_endpoint) + - "/PumpConfigurationAndControl/Attributes/" + attribute_name + "/Desired"; + "/BarrierControl/Attributes/" + attribute_name + "/Desired"; payload_str = jsn.dump(); - uic_mqtt_publish(topic.c_str(), payload_str.c_str(), payload_str.length(), true); - return CHIP_ERROR_NO_MESSAGE_HANDLER; - } - - return CHIP_NO_ERROR; -} - -void PumpConfigurationAndControlAttributeAccess::reported_updated(const bridged_endpoint * ep, const std::string & cluster, - const std::string & attribute, const nlohmann::json & unify_value) -{ - namespace MN = chip::app::Clusters::PumpConfigurationAndControl::Attributes; - namespace UN = unify::matter_bridge::PumpConfigurationAndControl::Attributes; - - auto cluster_id = device_translator::instance().get_cluster_id(cluster); - - if (!cluster_id.has_value() || (cluster_id.value() != Clusters::PumpConfigurationAndControl::Id)) - { - return; - } - - // get attribute id - auto attribute_id = device_translator::instance().get_attribute_id(cluster, attribute); - - if (!attribute_id.has_value()) - { - return; - } - - chip::EndpointId node_matter_endpoint = ep->matter_endpoint; - ConcreteAttributePath attrpath = - ConcreteAttributePath(node_matter_endpoint, Clusters::PumpConfigurationAndControl::Id, attribute_id.value()); - - switch (attribute_id.value()) - { - // type is int16s - case MN::MaxPressure::Id: { - using T = MN::MaxPressure::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) - { - sl_log_debug(LOG_TAG, "MaxPressure attribute value is %s", unify_value.dump().c_str()); - UN::MaxPressure::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::PumpConfigurationAndControl::Id, - MN::MaxPressure::Id, ZCL_INT16S_ATTRIBUTE_TYPE, - reinterpret_cast(&value.value())); - } - break; - } - // type is int16u - case MN::MaxSpeed::Id: { - using T = MN::MaxSpeed::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) - { - sl_log_debug(LOG_TAG, "MaxSpeed attribute value is %s", unify_value.dump().c_str()); - UN::MaxSpeed::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::PumpConfigurationAndControl::Id, - MN::MaxSpeed::Id, ZCL_INT16U_ATTRIBUTE_TYPE, - reinterpret_cast(&value.value())); - } - break; - } - // type is int16u - case MN::MaxFlow::Id: { - using T = MN::MaxFlow::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) - { - sl_log_debug(LOG_TAG, "MaxFlow attribute value is %s", unify_value.dump().c_str()); - UN::MaxFlow::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::PumpConfigurationAndControl::Id, MN::MaxFlow::Id, - ZCL_INT16U_ATTRIBUTE_TYPE, reinterpret_cast(&value.value())); - } - break; - } - // type is int16s - case MN::MinConstPressure::Id: { - using T = MN::MinConstPressure::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) - { - sl_log_debug(LOG_TAG, "MinConstPressure attribute value is %s", unify_value.dump().c_str()); - UN::MinConstPressure::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::PumpConfigurationAndControl::Id, - MN::MinConstPressure::Id, ZCL_INT16S_ATTRIBUTE_TYPE, - reinterpret_cast(&value.value())); - } - break; - } - // type is int16s - case MN::MaxConstPressure::Id: { - using T = MN::MaxConstPressure::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) - { - sl_log_debug(LOG_TAG, "MaxConstPressure attribute value is %s", unify_value.dump().c_str()); - UN::MaxConstPressure::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::PumpConfigurationAndControl::Id, - MN::MaxConstPressure::Id, ZCL_INT16S_ATTRIBUTE_TYPE, - reinterpret_cast(&value.value())); - } - break; - } - // type is int16s - case MN::MinCompPressure::Id: { - using T = MN::MinCompPressure::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) - { - sl_log_debug(LOG_TAG, "MinCompPressure attribute value is %s", unify_value.dump().c_str()); - UN::MinCompPressure::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::PumpConfigurationAndControl::Id, - MN::MinCompPressure::Id, ZCL_INT16S_ATTRIBUTE_TYPE, - reinterpret_cast(&value.value())); - } - break; - } - // type is int16s - case MN::MaxCompPressure::Id: { - using T = MN::MaxCompPressure::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) - { - sl_log_debug(LOG_TAG, "MaxCompPressure attribute value is %s", unify_value.dump().c_str()); - UN::MaxCompPressure::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::PumpConfigurationAndControl::Id, - MN::MaxCompPressure::Id, ZCL_INT16S_ATTRIBUTE_TYPE, - reinterpret_cast(&value.value())); - } - break; - } - // type is int16u - case MN::MinConstSpeed::Id: { - using T = MN::MinConstSpeed::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) - { - sl_log_debug(LOG_TAG, "MinConstSpeed attribute value is %s", unify_value.dump().c_str()); - UN::MinConstSpeed::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::PumpConfigurationAndControl::Id, - MN::MinConstSpeed::Id, ZCL_INT16U_ATTRIBUTE_TYPE, - reinterpret_cast(&value.value())); - } - break; - } - // type is int16u - case MN::MaxConstSpeed::Id: { - using T = MN::MaxConstSpeed::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) - { - sl_log_debug(LOG_TAG, "MaxConstSpeed attribute value is %s", unify_value.dump().c_str()); - UN::MaxConstSpeed::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::PumpConfigurationAndControl::Id, - MN::MaxConstSpeed::Id, ZCL_INT16U_ATTRIBUTE_TYPE, - reinterpret_cast(&value.value())); - } - break; + uic_mqtt_publish(topic.c_str(), payload_str.c_str(), payload_str.length(), true); + return CHIP_ERROR_NO_MESSAGE_HANDLER; } - // type is int16u - case MN::MinConstFlow::Id: { - using T = MN::MinConstFlow::TypeInfo::Type; - std::optional value = from_json(unify_value); - if (value.has_value()) - { - sl_log_debug(LOG_TAG, "MinConstFlow attribute value is %s", unify_value.dump().c_str()); - UN::MinConstFlow::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::PumpConfigurationAndControl::Id, - MN::MinConstFlow::Id, ZCL_INT16U_ATTRIBUTE_TYPE, - reinterpret_cast(&value.value())); - } - break; - } - // type is int16u - case MN::MaxConstFlow::Id: { - using T = MN::MaxConstFlow::TypeInfo::Type; - std::optional value = from_json(unify_value); + return CHIP_NO_ERROR; +} - if (value.has_value()) - { - sl_log_debug(LOG_TAG, "MaxConstFlow attribute value is %s", unify_value.dump().c_str()); - UN::MaxConstFlow::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::PumpConfigurationAndControl::Id, - MN::MaxConstFlow::Id, ZCL_INT16U_ATTRIBUTE_TYPE, - reinterpret_cast(&value.value())); - } - break; - } - // type is int16s - case MN::MinConstTemp::Id: { - using T = MN::MinConstTemp::TypeInfo::Type; - std::optional value = from_json(unify_value); +void BarrierControlAttributeAccess::reported_updated(const bridged_endpoint * ep, const std::string & cluster, + const std::string & attribute, const nlohmann::json & unify_value) +{ + namespace MN = chip::app::Clusters::BarrierControl::Attributes; + namespace UN = unify::matter_bridge::BarrierControl::Attributes; - if (value.has_value()) - { - sl_log_debug(LOG_TAG, "MinConstTemp attribute value is %s", unify_value.dump().c_str()); - UN::MinConstTemp::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::PumpConfigurationAndControl::Id, - MN::MinConstTemp::Id, ZCL_INT16S_ATTRIBUTE_TYPE, - reinterpret_cast(&value.value())); - } - break; + auto cluster_id = device_translator::instance().get_cluster_id(cluster); + + if (!cluster_id.has_value() || (cluster_id.value() != Clusters::BarrierControl::Id)) + { + return; } - // type is int16s - case MN::MaxConstTemp::Id: { - using T = MN::MaxConstTemp::TypeInfo::Type; - std::optional value = from_json(unify_value); - if (value.has_value()) - { - sl_log_debug(LOG_TAG, "MaxConstTemp attribute value is %s", unify_value.dump().c_str()); - UN::MaxConstTemp::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::PumpConfigurationAndControl::Id, - MN::MaxConstTemp::Id, ZCL_INT16S_ATTRIBUTE_TYPE, - reinterpret_cast(&value.value())); - } - break; + // get attribute id + auto attribute_id = device_translator::instance().get_attribute_id(cluster, attribute); + + if (!attribute_id.has_value()) + { + return; } - // type is PumpStatus - case MN::PumpStatus::Id: { - using T = MN::PumpStatus::TypeInfo::Type; + + chip::EndpointId node_matter_endpoint = ep->matter_endpoint; + ConcreteAttributePath attrpath = + ConcreteAttributePath(node_matter_endpoint, Clusters::BarrierControl::Id, attribute_id.value()); + switch (attribute_id.value()) + { + // type is enum8 + case MN::BarrierMovingState::Id: { + using T = MN::BarrierMovingState::TypeInfo::Type; std::optional value = from_json(unify_value); if (value.has_value()) { - sl_log_debug(LOG_TAG, "PumpStatus attribute value is %s", unify_value.dump().c_str()); - UN::PumpStatus::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::PumpConfigurationAndControl::Id, - MN::PumpStatus::Id, ZCL_BITMAP16_ATTRIBUTE_TYPE, - reinterpret_cast(&value.value())); + sl_log_debug(LOG_TAG, "BarrierMovingState attribute value is %s", unify_value.dump().c_str()); + UN::BarrierMovingState::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::BarrierControl::Id, MN::BarrierMovingState::Id, + ZCL_ENUM8_ATTRIBUTE_TYPE, reinterpret_cast(&value.value())); } break; } - // type is PumpOperationMode - case MN::EffectiveOperationMode::Id: { - using T = MN::EffectiveOperationMode::TypeInfo::Type; + // type is bitmap16 + case MN::BarrierSafetyStatus::Id: { + using T = MN::BarrierSafetyStatus::TypeInfo::Type; std::optional value = from_json(unify_value); if (value.has_value()) { - sl_log_debug(LOG_TAG, "EffectiveOperationMode attribute value is %s", unify_value.dump().c_str()); - UN::EffectiveOperationMode::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::PumpConfigurationAndControl::Id, - MN::EffectiveOperationMode::Id, ZCL_ENUM8_ATTRIBUTE_TYPE, - reinterpret_cast(&value.value())); + sl_log_debug(LOG_TAG, "BarrierSafetyStatus attribute value is %s", unify_value.dump().c_str()); + UN::BarrierSafetyStatus::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::BarrierControl::Id, MN::BarrierSafetyStatus::Id, + ZCL_BITMAP16_ATTRIBUTE_TYPE, reinterpret_cast(&value.value())); } break; } - // type is PumpControlMode - case MN::EffectiveControlMode::Id: { - using T = MN::EffectiveControlMode::TypeInfo::Type; + // type is bitmap8 + case MN::BarrierCapabilities::Id: { + using T = MN::BarrierCapabilities::TypeInfo::Type; std::optional value = from_json(unify_value); if (value.has_value()) { - sl_log_debug(LOG_TAG, "EffectiveControlMode attribute value is %s", unify_value.dump().c_str()); - UN::EffectiveControlMode::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::PumpConfigurationAndControl::Id, - MN::EffectiveControlMode::Id, ZCL_ENUM8_ATTRIBUTE_TYPE, - reinterpret_cast(&value.value())); + sl_log_debug(LOG_TAG, "BarrierCapabilities attribute value is %s", unify_value.dump().c_str()); + UN::BarrierCapabilities::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::BarrierControl::Id, MN::BarrierCapabilities::Id, + ZCL_BITMAP8_ATTRIBUTE_TYPE, reinterpret_cast(&value.value())); } break; } - // type is int16s - case MN::Capacity::Id: { - using T = MN::Capacity::TypeInfo::Type; + // type is int16u + case MN::BarrierOpenEvents::Id: { + using T = MN::BarrierOpenEvents::TypeInfo::Type; std::optional value = from_json(unify_value); if (value.has_value()) { - sl_log_debug(LOG_TAG, "Capacity attribute value is %s", unify_value.dump().c_str()); - UN::Capacity::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::PumpConfigurationAndControl::Id, - MN::Capacity::Id, ZCL_INT16S_ATTRIBUTE_TYPE, - reinterpret_cast(&value.value())); + sl_log_debug(LOG_TAG, "BarrierOpenEvents attribute value is %s", unify_value.dump().c_str()); + UN::BarrierOpenEvents::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::BarrierControl::Id, MN::BarrierOpenEvents::Id, + ZCL_INT16U_ATTRIBUTE_TYPE, reinterpret_cast(&value.value())); } break; } // type is int16u - case MN::Speed::Id: { - using T = MN::Speed::TypeInfo::Type; + case MN::BarrierCloseEvents::Id: { + using T = MN::BarrierCloseEvents::TypeInfo::Type; std::optional value = from_json(unify_value); if (value.has_value()) { - sl_log_debug(LOG_TAG, "Speed attribute value is %s", unify_value.dump().c_str()); - UN::Speed::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::PumpConfigurationAndControl::Id, MN::Speed::Id, + sl_log_debug(LOG_TAG, "BarrierCloseEvents attribute value is %s", unify_value.dump().c_str()); + UN::BarrierCloseEvents::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::BarrierControl::Id, MN::BarrierCloseEvents::Id, ZCL_INT16U_ATTRIBUTE_TYPE, reinterpret_cast(&value.value())); } break; } - // type is int24u - case MN::LifetimeRunningHours::Id: { - using T = MN::LifetimeRunningHours::TypeInfo::Type; + // type is int16u + case MN::BarrierCommandOpenEvents::Id: { + using T = MN::BarrierCommandOpenEvents::TypeInfo::Type; std::optional value = from_json(unify_value); if (value.has_value()) { - sl_log_debug(LOG_TAG, "LifetimeRunningHours attribute value is %s", unify_value.dump().c_str()); - UN::LifetimeRunningHours::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::PumpConfigurationAndControl::Id, - MN::LifetimeRunningHours::Id, ZCL_INT24U_ATTRIBUTE_TYPE, + sl_log_debug(LOG_TAG, "BarrierCommandOpenEvents attribute value is %s", unify_value.dump().c_str()); + UN::BarrierCommandOpenEvents::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::BarrierControl::Id, + MN::BarrierCommandOpenEvents::Id, ZCL_INT16U_ATTRIBUTE_TYPE, reinterpret_cast(&value.value())); } break; } - // type is int24u - case MN::Power::Id: { - using T = MN::Power::TypeInfo::Type; + // type is int16u + case MN::BarrierCommandCloseEvents::Id: { + using T = MN::BarrierCommandCloseEvents::TypeInfo::Type; std::optional value = from_json(unify_value); if (value.has_value()) { - sl_log_debug(LOG_TAG, "Power attribute value is %s", unify_value.dump().c_str()); - UN::Power::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::PumpConfigurationAndControl::Id, MN::Power::Id, - ZCL_INT24U_ATTRIBUTE_TYPE, reinterpret_cast(&value.value())); + sl_log_debug(LOG_TAG, "BarrierCommandCloseEvents attribute value is %s", unify_value.dump().c_str()); + UN::BarrierCommandCloseEvents::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::BarrierControl::Id, + MN::BarrierCommandCloseEvents::Id, ZCL_INT16U_ATTRIBUTE_TYPE, + reinterpret_cast(&value.value())); } break; } - // type is int32u - case MN::LifetimeEnergyConsumed::Id: { - using T = MN::LifetimeEnergyConsumed::TypeInfo::Type; + // type is int16u + case MN::BarrierOpenPeriod::Id: { + using T = MN::BarrierOpenPeriod::TypeInfo::Type; std::optional value = from_json(unify_value); if (value.has_value()) { - sl_log_debug(LOG_TAG, "LifetimeEnergyConsumed attribute value is %s", unify_value.dump().c_str()); - UN::LifetimeEnergyConsumed::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::PumpConfigurationAndControl::Id, - MN::LifetimeEnergyConsumed::Id, ZCL_INT32U_ATTRIBUTE_TYPE, - reinterpret_cast(&value.value())); + sl_log_debug(LOG_TAG, "BarrierOpenPeriod attribute value is %s", unify_value.dump().c_str()); + UN::BarrierOpenPeriod::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::BarrierControl::Id, MN::BarrierOpenPeriod::Id, + ZCL_INT16U_ATTRIBUTE_TYPE, reinterpret_cast(&value.value())); } break; } - // type is PumpOperationMode - case MN::OperationMode::Id: { - using T = MN::OperationMode::TypeInfo::Type; + // type is int16u + case MN::BarrierClosePeriod::Id: { + using T = MN::BarrierClosePeriod::TypeInfo::Type; std::optional value = from_json(unify_value); if (value.has_value()) { - sl_log_debug(LOG_TAG, "OperationMode attribute value is %s", unify_value.dump().c_str()); - UN::OperationMode::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::PumpConfigurationAndControl::Id, - MN::OperationMode::Id, ZCL_ENUM8_ATTRIBUTE_TYPE, - reinterpret_cast(&value.value())); + sl_log_debug(LOG_TAG, "BarrierClosePeriod attribute value is %s", unify_value.dump().c_str()); + UN::BarrierClosePeriod::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::BarrierControl::Id, MN::BarrierClosePeriod::Id, + ZCL_INT16U_ATTRIBUTE_TYPE, reinterpret_cast(&value.value())); } break; } - // type is PumpControlMode - case MN::ControlMode::Id: { - using T = MN::ControlMode::TypeInfo::Type; + // type is int8u + case MN::BarrierPosition::Id: { + using T = MN::BarrierPosition::TypeInfo::Type; std::optional value = from_json(unify_value); if (value.has_value()) { - sl_log_debug(LOG_TAG, "ControlMode attribute value is %s", unify_value.dump().c_str()); - UN::ControlMode::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::PumpConfigurationAndControl::Id, - MN::ControlMode::Id, ZCL_ENUM8_ATTRIBUTE_TYPE, - reinterpret_cast(&value.value())); + sl_log_debug(LOG_TAG, "BarrierPosition attribute value is %s", unify_value.dump().c_str()); + UN::BarrierPosition::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::BarrierControl::Id, MN::BarrierPosition::Id, + ZCL_INT8U_ATTRIBUTE_TYPE, reinterpret_cast(&value.value())); } break; } @@ -11810,9 +9641,8 @@ void PumpConfigurationAndControlAttributeAccess::reported_updated(const bridged_ { sl_log_debug(LOG_TAG, "FeatureMap attribute value is %s", unify_value.dump().c_str()); UN::FeatureMap::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::PumpConfigurationAndControl::Id, - MN::FeatureMap::Id, ZCL_BITMAP32_ATTRIBUTE_TYPE, - reinterpret_cast(&value.value())); + MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::BarrierControl::Id, MN::FeatureMap::Id, + ZCL_BITMAP32_ATTRIBUTE_TYPE, reinterpret_cast(&value.value())); } break; } @@ -11825,9 +9655,8 @@ void PumpConfigurationAndControlAttributeAccess::reported_updated(const bridged_ { sl_log_debug(LOG_TAG, "ClusterRevision attribute value is %s", unify_value.dump().c_str()); UN::ClusterRevision::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::PumpConfigurationAndControl::Id, - MN::ClusterRevision::Id, ZCL_INT16U_ATTRIBUTE_TYPE, - reinterpret_cast(&value.value())); + MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::BarrierControl::Id, MN::ClusterRevision::Id, + ZCL_INT16U_ATTRIBUTE_TYPE, reinterpret_cast(&value.value())); } break; } @@ -11845,312 +9674,260 @@ ThermostatAttributeAccess::Read(const ConcreteReadAttributePath & aPath, Attribu } ConcreteAttributePath atrpath = ConcreteAttributePath(aPath.mEndpointId, aPath.mClusterId, aPath.mAttributeId); - try { switch (aPath.mAttributeId) { - case MN::LocalTemperature::Id: { // type is int16s MN::LocalTemperature::TypeInfo::Type value; UN::LocalTemperature::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::OutdoorTemperature::Id: { // type is int16s MN::OutdoorTemperature::TypeInfo::Type value; UN::OutdoorTemperature::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::Occupancy::Id: { // type is bitmap8 MN::Occupancy::TypeInfo::Type value; UN::Occupancy::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::AbsMinHeatSetpointLimit::Id: { // type is int16s MN::AbsMinHeatSetpointLimit::TypeInfo::Type value; UN::AbsMinHeatSetpointLimit::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::AbsMaxHeatSetpointLimit::Id: { // type is int16s MN::AbsMaxHeatSetpointLimit::TypeInfo::Type value; UN::AbsMaxHeatSetpointLimit::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::AbsMinCoolSetpointLimit::Id: { // type is int16s MN::AbsMinCoolSetpointLimit::TypeInfo::Type value; UN::AbsMinCoolSetpointLimit::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::AbsMaxCoolSetpointLimit::Id: { // type is int16s MN::AbsMaxCoolSetpointLimit::TypeInfo::Type value; UN::AbsMaxCoolSetpointLimit::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::PICoolingDemand::Id: { // type is int8u MN::PICoolingDemand::TypeInfo::Type value; UN::PICoolingDemand::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::PIHeatingDemand::Id: { // type is int8u MN::PIHeatingDemand::TypeInfo::Type value; UN::PIHeatingDemand::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::HVACSystemTypeConfiguration::Id: { // type is bitmap8 MN::HVACSystemTypeConfiguration::TypeInfo::Type value; UN::HVACSystemTypeConfiguration::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::LocalTemperatureCalibration::Id: { // type is int8s MN::LocalTemperatureCalibration::TypeInfo::Type value; UN::LocalTemperatureCalibration::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::OccupiedCoolingSetpoint::Id: { // type is int16s MN::OccupiedCoolingSetpoint::TypeInfo::Type value; UN::OccupiedCoolingSetpoint::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::OccupiedHeatingSetpoint::Id: { // type is int16s MN::OccupiedHeatingSetpoint::TypeInfo::Type value; UN::OccupiedHeatingSetpoint::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::UnoccupiedCoolingSetpoint::Id: { // type is int16s MN::UnoccupiedCoolingSetpoint::TypeInfo::Type value; UN::UnoccupiedCoolingSetpoint::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::UnoccupiedHeatingSetpoint::Id: { // type is int16s MN::UnoccupiedHeatingSetpoint::TypeInfo::Type value; UN::UnoccupiedHeatingSetpoint::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::MinHeatSetpointLimit::Id: { // type is int16s MN::MinHeatSetpointLimit::TypeInfo::Type value; UN::MinHeatSetpointLimit::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::MaxHeatSetpointLimit::Id: { // type is int16s MN::MaxHeatSetpointLimit::TypeInfo::Type value; UN::MaxHeatSetpointLimit::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::MinCoolSetpointLimit::Id: { // type is int16s MN::MinCoolSetpointLimit::TypeInfo::Type value; UN::MinCoolSetpointLimit::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::MaxCoolSetpointLimit::Id: { // type is int16s MN::MaxCoolSetpointLimit::TypeInfo::Type value; UN::MaxCoolSetpointLimit::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::MinSetpointDeadBand::Id: { // type is int8s MN::MinSetpointDeadBand::TypeInfo::Type value; UN::MinSetpointDeadBand::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::RemoteSensing::Id: { // type is bitmap8 MN::RemoteSensing::TypeInfo::Type value; UN::RemoteSensing::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::ControlSequenceOfOperation::Id: { // type is ThermostatControlSequence MN::ControlSequenceOfOperation::TypeInfo::Type value; UN::ControlSequenceOfOperation::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::SystemMode::Id: { // type is enum8 MN::SystemMode::TypeInfo::Type value; UN::SystemMode::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::ThermostatRunningMode::Id: { // type is enum8 MN::ThermostatRunningMode::TypeInfo::Type value; UN::ThermostatRunningMode::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::StartOfWeek::Id: { // type is enum8 MN::StartOfWeek::TypeInfo::Type value; UN::StartOfWeek::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::NumberOfWeeklyTransitions::Id: { // type is int8u MN::NumberOfWeeklyTransitions::TypeInfo::Type value; UN::NumberOfWeeklyTransitions::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::NumberOfDailyTransitions::Id: { // type is int8u MN::NumberOfDailyTransitions::TypeInfo::Type value; UN::NumberOfDailyTransitions::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::TemperatureSetpointHold::Id: { // type is enum8 MN::TemperatureSetpointHold::TypeInfo::Type value; UN::TemperatureSetpointHold::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::TemperatureSetpointHoldDuration::Id: { // type is int16u MN::TemperatureSetpointHoldDuration::TypeInfo::Type value; UN::TemperatureSetpointHoldDuration::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::ThermostatProgrammingOperationMode::Id: { // type is bitmap8 MN::ThermostatProgrammingOperationMode::TypeInfo::Type value; UN::ThermostatProgrammingOperationMode::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::ThermostatRunningState::Id: { // type is bitmap16 MN::ThermostatRunningState::TypeInfo::Type value; UN::ThermostatRunningState::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::SetpointChangeSource::Id: { // type is enum8 MN::SetpointChangeSource::TypeInfo::Type value; UN::SetpointChangeSource::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::SetpointChangeAmount::Id: { // type is int16s MN::SetpointChangeAmount::TypeInfo::Type value; UN::SetpointChangeAmount::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::SetpointChangeSourceTimestamp::Id: { // type is utc MN::SetpointChangeSourceTimestamp::TypeInfo::Type value; UN::SetpointChangeSourceTimestamp::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::OccupiedSetback::Id: { // type is int8u MN::OccupiedSetback::TypeInfo::Type value; UN::OccupiedSetback::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::OccupiedSetbackMin::Id: { // type is int8u MN::OccupiedSetbackMin::TypeInfo::Type value; UN::OccupiedSetbackMin::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::OccupiedSetbackMax::Id: { // type is int8u MN::OccupiedSetbackMax::TypeInfo::Type value; UN::OccupiedSetbackMax::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::UnoccupiedSetback::Id: { // type is int8u MN::UnoccupiedSetback::TypeInfo::Type value; UN::UnoccupiedSetback::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::UnoccupiedSetbackMin::Id: { // type is int8u MN::UnoccupiedSetbackMin::TypeInfo::Type value; UN::UnoccupiedSetbackMin::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::UnoccupiedSetbackMax::Id: { // type is int8u MN::UnoccupiedSetbackMax::TypeInfo::Type value; UN::UnoccupiedSetbackMax::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::EmergencyHeatDelta::Id: { // type is int8u MN::EmergencyHeatDelta::TypeInfo::Type value; UN::EmergencyHeatDelta::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::ACType::Id: { // type is enum8 MN::ACType::TypeInfo::Type value; UN::ACType::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::ACCapacity::Id: { // type is int16u MN::ACCapacity::TypeInfo::Type value; UN::ACCapacity::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::ACRefrigerantType::Id: { // type is enum8 MN::ACRefrigerantType::TypeInfo::Type value; UN::ACRefrigerantType::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::ACCompressorType::Id: { // type is enum8 MN::ACCompressorType::TypeInfo::Type value; UN::ACCompressorType::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::ACErrorCode::Id: { // type is bitmap32 MN::ACErrorCode::TypeInfo::Type value; UN::ACErrorCode::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::ACLouverPosition::Id: { // type is enum8 MN::ACLouverPosition::TypeInfo::Type value; UN::ACLouverPosition::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::ACCoilTemperature::Id: { // type is int16s MN::ACCoilTemperature::TypeInfo::Type value; UN::ACCoilTemperature::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::ACCapacityformat::Id: { // type is enum8 MN::ACCapacityformat::TypeInfo::Type value; UN::ACCapacityformat::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::FeatureMap::Id: { // type is bitmap32 MN::FeatureMap::TypeInfo::Type value; UN::FeatureMap::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::ClusterRevision::Id: { // type is int16u MN::ClusterRevision::TypeInfo::Type value; UN::ClusterRevision::Get(atrpath, value); @@ -12187,8 +9964,7 @@ CHIP_ERROR ThermostatAttributeAccess::Write(const ConcreteDataAttributePath & aP nlohmann::json jsn; switch (aPath.mAttributeId) - { - } + {} if (!attribute_name.empty()) { @@ -12226,7 +10002,6 @@ void ThermostatAttributeAccess::reported_updated(const bridged_endpoint * ep, co chip::EndpointId node_matter_endpoint = ep->matter_endpoint; ConcreteAttributePath attrpath = ConcreteAttributePath(node_matter_endpoint, Clusters::Thermostat::Id, attribute_id.value()); - switch (attribute_id.value()) { // type is int16s @@ -12259,8 +10034,7 @@ void ThermostatAttributeAccess::reported_updated(const bridged_endpoint * ep, co } // type is bitmap8 case MN::Occupancy::Id: { - using T = MN::Occupancy::TypeInfo::Type; - std::optional value = from_json(unify_value); + std::optional value = from_json_Occupancy(unify_value); if (value.has_value()) { @@ -12659,8 +10433,7 @@ void ThermostatAttributeAccess::reported_updated(const bridged_endpoint * ep, co } // type is bitmap16 case MN::ThermostatRunningState::Id: { - using T = MN::ThermostatRunningState::TypeInfo::Type; - std::optional value = from_json(unify_value); + std::optional value = from_json_ThermostatRunningState(unify_value); if (value.has_value()) { @@ -12966,84 +10739,70 @@ FanControlAttributeAccess::Read(const ConcreteReadAttributePath & aPath, Attribu } ConcreteAttributePath atrpath = ConcreteAttributePath(aPath.mEndpointId, aPath.mClusterId, aPath.mAttributeId); - try { switch (aPath.mAttributeId) { - case MN::FanMode::Id: { // type is FanModeType MN::FanMode::TypeInfo::Type value; UN::FanMode::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::FanModeSequence::Id: { // type is FanModeSequenceType MN::FanModeSequence::TypeInfo::Type value; UN::FanModeSequence::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::PercentSetting::Id: { // type is int8u MN::PercentSetting::TypeInfo::Type value; UN::PercentSetting::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::PercentCurrent::Id: { // type is int8u MN::PercentCurrent::TypeInfo::Type value; UN::PercentCurrent::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::SpeedMax::Id: { // type is int8u MN::SpeedMax::TypeInfo::Type value; UN::SpeedMax::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::SpeedSetting::Id: { // type is int8u MN::SpeedSetting::TypeInfo::Type value; UN::SpeedSetting::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::SpeedCurrent::Id: { // type is int8u MN::SpeedCurrent::TypeInfo::Type value; UN::SpeedCurrent::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::RockSupport::Id: { // type is bitmap8 MN::RockSupport::TypeInfo::Type value; UN::RockSupport::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::RockSetting::Id: { // type is bitmap8 MN::RockSetting::TypeInfo::Type value; UN::RockSetting::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::WindSupport::Id: { // type is bitmap8 MN::WindSupport::TypeInfo::Type value; UN::WindSupport::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::WindSetting::Id: { // type is bitmap8 MN::WindSetting::TypeInfo::Type value; UN::WindSetting::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::FeatureMap::Id: { // type is bitmap32 MN::FeatureMap::TypeInfo::Type value; UN::FeatureMap::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::ClusterRevision::Id: { // type is int16u MN::ClusterRevision::TypeInfo::Type value; UN::ClusterRevision::Get(atrpath, value); @@ -13080,8 +10839,7 @@ CHIP_ERROR FanControlAttributeAccess::Write(const ConcreteDataAttributePath & aP nlohmann::json jsn; switch (aPath.mAttributeId) - { - } + {} if (!attribute_name.empty()) { @@ -13119,7 +10877,6 @@ void FanControlAttributeAccess::reported_updated(const bridged_endpoint * ep, co chip::EndpointId node_matter_endpoint = ep->matter_endpoint; ConcreteAttributePath attrpath = ConcreteAttributePath(node_matter_endpoint, Clusters::FanControl::Id, attribute_id.value()); - switch (attribute_id.value()) { // type is FanModeType @@ -13318,36 +11075,30 @@ ThermostatUserInterfaceConfigurationAttributeAccess::Read(const ConcreteReadAttr } ConcreteAttributePath atrpath = ConcreteAttributePath(aPath.mEndpointId, aPath.mClusterId, aPath.mAttributeId); - try { switch (aPath.mAttributeId) { - case MN::TemperatureDisplayMode::Id: { // type is enum8 MN::TemperatureDisplayMode::TypeInfo::Type value; UN::TemperatureDisplayMode::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::KeypadLockout::Id: { // type is enum8 MN::KeypadLockout::TypeInfo::Type value; UN::KeypadLockout::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::ScheduleProgrammingVisibility::Id: { // type is enum8 MN::ScheduleProgrammingVisibility::TypeInfo::Type value; UN::ScheduleProgrammingVisibility::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::FeatureMap::Id: { // type is bitmap32 MN::FeatureMap::TypeInfo::Type value; UN::FeatureMap::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::ClusterRevision::Id: { // type is int16u MN::ClusterRevision::TypeInfo::Type value; UN::ClusterRevision::Get(atrpath, value); @@ -13385,8 +11136,7 @@ CHIP_ERROR ThermostatUserInterfaceConfigurationAttributeAccess::Write(const Conc nlohmann::json jsn; switch (aPath.mAttributeId) - { - } + {} if (!attribute_name.empty()) { @@ -13426,7 +11176,6 @@ void ThermostatUserInterfaceConfigurationAttributeAccess::reported_updated(const chip::EndpointId node_matter_endpoint = ep->matter_endpoint; ConcreteAttributePath attrpath = ConcreteAttributePath(node_matter_endpoint, Clusters::ThermostatUserInterfaceConfiguration::Id, attribute_id.value()); - switch (attribute_id.value()) { // type is enum8 @@ -13518,330 +11267,288 @@ ColorControlAttributeAccess::Read(const ConcreteReadAttributePath & aPath, Attri } ConcreteAttributePath atrpath = ConcreteAttributePath(aPath.mEndpointId, aPath.mClusterId, aPath.mAttributeId); - try { switch (aPath.mAttributeId) { - case MN::CurrentHue::Id: { // type is int8u MN::CurrentHue::TypeInfo::Type value; UN::CurrentHue::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::CurrentSaturation::Id: { // type is int8u MN::CurrentSaturation::TypeInfo::Type value; UN::CurrentSaturation::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::RemainingTime::Id: { // type is int16u MN::RemainingTime::TypeInfo::Type value; UN::RemainingTime::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::CurrentX::Id: { // type is int16u MN::CurrentX::TypeInfo::Type value; UN::CurrentX::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::CurrentY::Id: { // type is int16u MN::CurrentY::TypeInfo::Type value; UN::CurrentY::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::DriftCompensation::Id: { // type is enum8 MN::DriftCompensation::TypeInfo::Type value; UN::DriftCompensation::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::CompensationText::Id: { // type is char_string MN::CompensationText::TypeInfo::Type value; UN::CompensationText::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::ColorTemperatureMireds::Id: { // type is int16u MN::ColorTemperatureMireds::TypeInfo::Type value; UN::ColorTemperatureMireds::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::ColorMode::Id: { // type is enum8 MN::ColorMode::TypeInfo::Type value; UN::ColorMode::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::Options::Id: { // type is bitmap8 MN::Options::TypeInfo::Type value; UN::Options::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::NumberOfPrimaries::Id: { // type is int8u MN::NumberOfPrimaries::TypeInfo::Type value; UN::NumberOfPrimaries::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::Primary1X::Id: { // type is int16u MN::Primary1X::TypeInfo::Type value; UN::Primary1X::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::Primary1Y::Id: { // type is int16u MN::Primary1Y::TypeInfo::Type value; UN::Primary1Y::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::Primary1Intensity::Id: { // type is int8u MN::Primary1Intensity::TypeInfo::Type value; UN::Primary1Intensity::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::Primary2X::Id: { // type is int16u MN::Primary2X::TypeInfo::Type value; UN::Primary2X::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::Primary2Y::Id: { // type is int16u MN::Primary2Y::TypeInfo::Type value; UN::Primary2Y::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::Primary2Intensity::Id: { // type is int8u MN::Primary2Intensity::TypeInfo::Type value; UN::Primary2Intensity::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::Primary3X::Id: { // type is int16u MN::Primary3X::TypeInfo::Type value; UN::Primary3X::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::Primary3Y::Id: { // type is int16u MN::Primary3Y::TypeInfo::Type value; UN::Primary3Y::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::Primary3Intensity::Id: { // type is int8u MN::Primary3Intensity::TypeInfo::Type value; UN::Primary3Intensity::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::Primary4X::Id: { // type is int16u MN::Primary4X::TypeInfo::Type value; UN::Primary4X::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::Primary4Y::Id: { // type is int16u MN::Primary4Y::TypeInfo::Type value; UN::Primary4Y::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::Primary4Intensity::Id: { // type is int8u MN::Primary4Intensity::TypeInfo::Type value; UN::Primary4Intensity::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::Primary5X::Id: { // type is int16u MN::Primary5X::TypeInfo::Type value; UN::Primary5X::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::Primary5Y::Id: { // type is int16u MN::Primary5Y::TypeInfo::Type value; UN::Primary5Y::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::Primary5Intensity::Id: { // type is int8u MN::Primary5Intensity::TypeInfo::Type value; UN::Primary5Intensity::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::Primary6X::Id: { // type is int16u MN::Primary6X::TypeInfo::Type value; UN::Primary6X::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::Primary6Y::Id: { // type is int16u MN::Primary6Y::TypeInfo::Type value; UN::Primary6Y::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::Primary6Intensity::Id: { // type is int8u MN::Primary6Intensity::TypeInfo::Type value; UN::Primary6Intensity::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::WhitePointX::Id: { // type is int16u MN::WhitePointX::TypeInfo::Type value; UN::WhitePointX::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::WhitePointY::Id: { // type is int16u MN::WhitePointY::TypeInfo::Type value; UN::WhitePointY::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::ColorPointRX::Id: { // type is int16u MN::ColorPointRX::TypeInfo::Type value; UN::ColorPointRX::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::ColorPointRY::Id: { // type is int16u MN::ColorPointRY::TypeInfo::Type value; UN::ColorPointRY::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::ColorPointRIntensity::Id: { // type is int8u MN::ColorPointRIntensity::TypeInfo::Type value; UN::ColorPointRIntensity::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::ColorPointGX::Id: { // type is int16u MN::ColorPointGX::TypeInfo::Type value; UN::ColorPointGX::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::ColorPointGY::Id: { // type is int16u MN::ColorPointGY::TypeInfo::Type value; UN::ColorPointGY::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::ColorPointGIntensity::Id: { // type is int8u MN::ColorPointGIntensity::TypeInfo::Type value; UN::ColorPointGIntensity::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::ColorPointBX::Id: { // type is int16u MN::ColorPointBX::TypeInfo::Type value; UN::ColorPointBX::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::ColorPointBY::Id: { // type is int16u MN::ColorPointBY::TypeInfo::Type value; UN::ColorPointBY::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::ColorPointBIntensity::Id: { // type is int8u MN::ColorPointBIntensity::TypeInfo::Type value; UN::ColorPointBIntensity::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::EnhancedCurrentHue::Id: { // type is int16u MN::EnhancedCurrentHue::TypeInfo::Type value; UN::EnhancedCurrentHue::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::EnhancedColorMode::Id: { // type is enum8 MN::EnhancedColorMode::TypeInfo::Type value; UN::EnhancedColorMode::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::ColorLoopActive::Id: { // type is int8u MN::ColorLoopActive::TypeInfo::Type value; UN::ColorLoopActive::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::ColorLoopDirection::Id: { // type is int8u MN::ColorLoopDirection::TypeInfo::Type value; UN::ColorLoopDirection::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::ColorLoopTime::Id: { // type is int16u MN::ColorLoopTime::TypeInfo::Type value; UN::ColorLoopTime::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::ColorLoopStartEnhancedHue::Id: { // type is int16u MN::ColorLoopStartEnhancedHue::TypeInfo::Type value; UN::ColorLoopStartEnhancedHue::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::ColorLoopStoredEnhancedHue::Id: { // type is int16u MN::ColorLoopStoredEnhancedHue::TypeInfo::Type value; UN::ColorLoopStoredEnhancedHue::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::ColorCapabilities::Id: { // type is bitmap16 MN::ColorCapabilities::TypeInfo::Type value; UN::ColorCapabilities::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::ColorTempPhysicalMinMireds::Id: { // type is int16u MN::ColorTempPhysicalMinMireds::TypeInfo::Type value; UN::ColorTempPhysicalMinMireds::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::ColorTempPhysicalMaxMireds::Id: { // type is int16u MN::ColorTempPhysicalMaxMireds::TypeInfo::Type value; UN::ColorTempPhysicalMaxMireds::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::CoupleColorTempToLevelMinMireds::Id: { // type is int16u MN::CoupleColorTempToLevelMinMireds::TypeInfo::Type value; UN::CoupleColorTempToLevelMinMireds::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::StartUpColorTemperatureMireds::Id: { // type is int16u MN::StartUpColorTemperatureMireds::TypeInfo::Type value; UN::StartUpColorTemperatureMireds::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::FeatureMap::Id: { // type is bitmap32 MN::FeatureMap::TypeInfo::Type value; - UN::FeatureMap::Get(atrpath, value); + { + ConcreteAttributePath cc_atrpath = + ConcreteAttributePath(aPath.mEndpointId, aPath.mClusterId, MN::ColorCapabilities::Id); + MN::ColorCapabilities::TypeInfo::Type colorControlCapabilities; + if (EMBER_ZCL_STATUS_SUCCESS == UN::ColorCapabilities::Get(cc_atrpath, colorControlCapabilities)) + { + value = static_cast(colorControlCapabilities); + } + else + { + sl_log_warning(LOG_TAG, "Failed to read ColorCapabilities, setting featuremap to HueSaturationSupported"); + value = 1; + } + } return aEncoder.Encode(value); } - case MN::ClusterRevision::Id: { // type is int16u MN::ClusterRevision::TypeInfo::Type value; UN::ClusterRevision::Get(atrpath, value); @@ -13878,8 +11585,7 @@ CHIP_ERROR ColorControlAttributeAccess::Write(const ConcreteDataAttributePath & nlohmann::json jsn; switch (aPath.mAttributeId) - { - } + {} if (!attribute_name.empty()) { @@ -13917,7 +11623,6 @@ void ColorControlAttributeAccess::reported_updated(const bridged_endpoint * ep, chip::EndpointId node_matter_endpoint = ep->matter_endpoint; ConcreteAttributePath attrpath = ConcreteAttributePath(node_matter_endpoint, Clusters::ColorControl::Id, attribute_id.value()); - switch (attribute_id.value()) { // type is int8u @@ -14034,7 +11739,7 @@ void ColorControlAttributeAccess::reported_updated(const bridged_endpoint * ep, } // type is enum8 case MN::ColorMode::Id: { - using T = MN::ColorMode::TypeInfo::Type; + using T = ZclEnumColorMode; std::optional value = from_json(unify_value); if (value.has_value()) @@ -14361,714 +12066,294 @@ void ColorControlAttributeAccess::reported_updated(const bridged_endpoint * ep, if (value.has_value()) { - sl_log_debug(LOG_TAG, "ColorPointRX attribute value is %s", unify_value.dump().c_str()); - UN::ColorPointRX::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::ColorControl::Id, MN::ColorPointRX::Id, - ZCL_INT16U_ATTRIBUTE_TYPE, reinterpret_cast(&value.value())); - } - break; - } - // type is int16u - case MN::ColorPointRY::Id: { - using T = MN::ColorPointRY::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) - { - sl_log_debug(LOG_TAG, "ColorPointRY attribute value is %s", unify_value.dump().c_str()); - UN::ColorPointRY::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::ColorControl::Id, MN::ColorPointRY::Id, - ZCL_INT16U_ATTRIBUTE_TYPE, reinterpret_cast(&value.value())); - } - break; - } - // type is int8u - case MN::ColorPointRIntensity::Id: { - using T = MN::ColorPointRIntensity::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) - { - sl_log_debug(LOG_TAG, "ColorPointRIntensity attribute value is %s", unify_value.dump().c_str()); - UN::ColorPointRIntensity::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::ColorControl::Id, MN::ColorPointRIntensity::Id, - ZCL_INT8U_ATTRIBUTE_TYPE, reinterpret_cast(&value.value())); - } - break; - } - // type is int16u - case MN::ColorPointGX::Id: { - using T = MN::ColorPointGX::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) - { - sl_log_debug(LOG_TAG, "ColorPointGX attribute value is %s", unify_value.dump().c_str()); - UN::ColorPointGX::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::ColorControl::Id, MN::ColorPointGX::Id, - ZCL_INT16U_ATTRIBUTE_TYPE, reinterpret_cast(&value.value())); - } - break; - } - // type is int16u - case MN::ColorPointGY::Id: { - using T = MN::ColorPointGY::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) - { - sl_log_debug(LOG_TAG, "ColorPointGY attribute value is %s", unify_value.dump().c_str()); - UN::ColorPointGY::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::ColorControl::Id, MN::ColorPointGY::Id, - ZCL_INT16U_ATTRIBUTE_TYPE, reinterpret_cast(&value.value())); - } - break; - } - // type is int8u - case MN::ColorPointGIntensity::Id: { - using T = MN::ColorPointGIntensity::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) - { - sl_log_debug(LOG_TAG, "ColorPointGIntensity attribute value is %s", unify_value.dump().c_str()); - UN::ColorPointGIntensity::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::ColorControl::Id, MN::ColorPointGIntensity::Id, - ZCL_INT8U_ATTRIBUTE_TYPE, reinterpret_cast(&value.value())); - } - break; - } - // type is int16u - case MN::ColorPointBX::Id: { - using T = MN::ColorPointBX::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) - { - sl_log_debug(LOG_TAG, "ColorPointBX attribute value is %s", unify_value.dump().c_str()); - UN::ColorPointBX::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::ColorControl::Id, MN::ColorPointBX::Id, - ZCL_INT16U_ATTRIBUTE_TYPE, reinterpret_cast(&value.value())); - } - break; - } - // type is int16u - case MN::ColorPointBY::Id: { - using T = MN::ColorPointBY::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) - { - sl_log_debug(LOG_TAG, "ColorPointBY attribute value is %s", unify_value.dump().c_str()); - UN::ColorPointBY::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::ColorControl::Id, MN::ColorPointBY::Id, - ZCL_INT16U_ATTRIBUTE_TYPE, reinterpret_cast(&value.value())); - } - break; - } - // type is int8u - case MN::ColorPointBIntensity::Id: { - using T = MN::ColorPointBIntensity::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) - { - sl_log_debug(LOG_TAG, "ColorPointBIntensity attribute value is %s", unify_value.dump().c_str()); - UN::ColorPointBIntensity::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::ColorControl::Id, MN::ColorPointBIntensity::Id, - ZCL_INT8U_ATTRIBUTE_TYPE, reinterpret_cast(&value.value())); - } - break; - } - // type is int16u - case MN::EnhancedCurrentHue::Id: { - using T = MN::EnhancedCurrentHue::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) - { - sl_log_debug(LOG_TAG, "EnhancedCurrentHue attribute value is %s", unify_value.dump().c_str()); - UN::EnhancedCurrentHue::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::ColorControl::Id, MN::EnhancedCurrentHue::Id, - ZCL_INT16U_ATTRIBUTE_TYPE, reinterpret_cast(&value.value())); - } - break; - } - // type is enum8 - case MN::EnhancedColorMode::Id: { - using T = MN::EnhancedColorMode::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) - { - sl_log_debug(LOG_TAG, "EnhancedColorMode attribute value is %s", unify_value.dump().c_str()); - UN::EnhancedColorMode::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::ColorControl::Id, MN::EnhancedColorMode::Id, - ZCL_ENUM8_ATTRIBUTE_TYPE, reinterpret_cast(&value.value())); - } - break; - } - // type is int8u - case MN::ColorLoopActive::Id: { - using T = MN::ColorLoopActive::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) - { - sl_log_debug(LOG_TAG, "ColorLoopActive attribute value is %s", unify_value.dump().c_str()); - UN::ColorLoopActive::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::ColorControl::Id, MN::ColorLoopActive::Id, - ZCL_INT8U_ATTRIBUTE_TYPE, reinterpret_cast(&value.value())); - } - break; - } - // type is int8u - case MN::ColorLoopDirection::Id: { - using T = MN::ColorLoopDirection::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) - { - sl_log_debug(LOG_TAG, "ColorLoopDirection attribute value is %s", unify_value.dump().c_str()); - UN::ColorLoopDirection::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::ColorControl::Id, MN::ColorLoopDirection::Id, - ZCL_INT8U_ATTRIBUTE_TYPE, reinterpret_cast(&value.value())); - } - break; - } - // type is int16u - case MN::ColorLoopTime::Id: { - using T = MN::ColorLoopTime::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) - { - sl_log_debug(LOG_TAG, "ColorLoopTime attribute value is %s", unify_value.dump().c_str()); - UN::ColorLoopTime::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::ColorControl::Id, MN::ColorLoopTime::Id, - ZCL_INT16U_ATTRIBUTE_TYPE, reinterpret_cast(&value.value())); - } - break; - } - // type is int16u - case MN::ColorLoopStartEnhancedHue::Id: { - using T = MN::ColorLoopStartEnhancedHue::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) - { - sl_log_debug(LOG_TAG, "ColorLoopStartEnhancedHue attribute value is %s", unify_value.dump().c_str()); - UN::ColorLoopStartEnhancedHue::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::ColorControl::Id, - MN::ColorLoopStartEnhancedHue::Id, ZCL_INT16U_ATTRIBUTE_TYPE, - reinterpret_cast(&value.value())); - } - break; - } - // type is int16u - case MN::ColorLoopStoredEnhancedHue::Id: { - using T = MN::ColorLoopStoredEnhancedHue::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) - { - sl_log_debug(LOG_TAG, "ColorLoopStoredEnhancedHue attribute value is %s", unify_value.dump().c_str()); - UN::ColorLoopStoredEnhancedHue::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::ColorControl::Id, - MN::ColorLoopStoredEnhancedHue::Id, ZCL_INT16U_ATTRIBUTE_TYPE, - reinterpret_cast(&value.value())); - } - break; - } - // type is bitmap16 - case MN::ColorCapabilities::Id: { - using T = MN::ColorCapabilities::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) - { - sl_log_debug(LOG_TAG, "ColorCapabilities attribute value is %s", unify_value.dump().c_str()); - UN::ColorCapabilities::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::ColorControl::Id, MN::ColorCapabilities::Id, - ZCL_BITMAP16_ATTRIBUTE_TYPE, reinterpret_cast(&value.value())); + sl_log_debug(LOG_TAG, "ColorPointRX attribute value is %s", unify_value.dump().c_str()); + UN::ColorPointRX::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::ColorControl::Id, MN::ColorPointRX::Id, + ZCL_INT16U_ATTRIBUTE_TYPE, reinterpret_cast(&value.value())); } break; } // type is int16u - case MN::ColorTempPhysicalMinMireds::Id: { - using T = MN::ColorTempPhysicalMinMireds::TypeInfo::Type; + case MN::ColorPointRY::Id: { + using T = MN::ColorPointRY::TypeInfo::Type; std::optional value = from_json(unify_value); if (value.has_value()) { - sl_log_debug(LOG_TAG, "ColorTempPhysicalMinMireds attribute value is %s", unify_value.dump().c_str()); - UN::ColorTempPhysicalMinMireds::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::ColorControl::Id, - MN::ColorTempPhysicalMinMireds::Id, ZCL_INT16U_ATTRIBUTE_TYPE, - reinterpret_cast(&value.value())); + sl_log_debug(LOG_TAG, "ColorPointRY attribute value is %s", unify_value.dump().c_str()); + UN::ColorPointRY::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::ColorControl::Id, MN::ColorPointRY::Id, + ZCL_INT16U_ATTRIBUTE_TYPE, reinterpret_cast(&value.value())); } break; } - // type is int16u - case MN::ColorTempPhysicalMaxMireds::Id: { - using T = MN::ColorTempPhysicalMaxMireds::TypeInfo::Type; + // type is int8u + case MN::ColorPointRIntensity::Id: { + using T = MN::ColorPointRIntensity::TypeInfo::Type; std::optional value = from_json(unify_value); if (value.has_value()) { - sl_log_debug(LOG_TAG, "ColorTempPhysicalMaxMireds attribute value is %s", unify_value.dump().c_str()); - UN::ColorTempPhysicalMaxMireds::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::ColorControl::Id, - MN::ColorTempPhysicalMaxMireds::Id, ZCL_INT16U_ATTRIBUTE_TYPE, - reinterpret_cast(&value.value())); + sl_log_debug(LOG_TAG, "ColorPointRIntensity attribute value is %s", unify_value.dump().c_str()); + UN::ColorPointRIntensity::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::ColorControl::Id, MN::ColorPointRIntensity::Id, + ZCL_INT8U_ATTRIBUTE_TYPE, reinterpret_cast(&value.value())); } break; } // type is int16u - case MN::CoupleColorTempToLevelMinMireds::Id: { - using T = MN::CoupleColorTempToLevelMinMireds::TypeInfo::Type; + case MN::ColorPointGX::Id: { + using T = MN::ColorPointGX::TypeInfo::Type; std::optional value = from_json(unify_value); if (value.has_value()) { - sl_log_debug(LOG_TAG, "CoupleColorTempToLevelMinMireds attribute value is %s", unify_value.dump().c_str()); - UN::CoupleColorTempToLevelMinMireds::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::ColorControl::Id, - MN::CoupleColorTempToLevelMinMireds::Id, ZCL_INT16U_ATTRIBUTE_TYPE, - reinterpret_cast(&value.value())); + sl_log_debug(LOG_TAG, "ColorPointGX attribute value is %s", unify_value.dump().c_str()); + UN::ColorPointGX::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::ColorControl::Id, MN::ColorPointGX::Id, + ZCL_INT16U_ATTRIBUTE_TYPE, reinterpret_cast(&value.value())); } break; } // type is int16u - case MN::StartUpColorTemperatureMireds::Id: { - using T = MN::StartUpColorTemperatureMireds::TypeInfo::Type; + case MN::ColorPointGY::Id: { + using T = MN::ColorPointGY::TypeInfo::Type; std::optional value = from_json(unify_value); if (value.has_value()) { - sl_log_debug(LOG_TAG, "StartUpColorTemperatureMireds attribute value is %s", unify_value.dump().c_str()); - UN::StartUpColorTemperatureMireds::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::ColorControl::Id, - MN::StartUpColorTemperatureMireds::Id, ZCL_INT16U_ATTRIBUTE_TYPE, - reinterpret_cast(&value.value())); + sl_log_debug(LOG_TAG, "ColorPointGY attribute value is %s", unify_value.dump().c_str()); + UN::ColorPointGY::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::ColorControl::Id, MN::ColorPointGY::Id, + ZCL_INT16U_ATTRIBUTE_TYPE, reinterpret_cast(&value.value())); } break; } - // type is bitmap32 - case MN::FeatureMap::Id: { - using T = MN::FeatureMap::TypeInfo::Type; + // type is int8u + case MN::ColorPointGIntensity::Id: { + using T = MN::ColorPointGIntensity::TypeInfo::Type; std::optional value = from_json(unify_value); if (value.has_value()) { - sl_log_debug(LOG_TAG, "FeatureMap attribute value is %s", unify_value.dump().c_str()); - UN::FeatureMap::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::ColorControl::Id, MN::FeatureMap::Id, - ZCL_BITMAP32_ATTRIBUTE_TYPE, reinterpret_cast(&value.value())); + sl_log_debug(LOG_TAG, "ColorPointGIntensity attribute value is %s", unify_value.dump().c_str()); + UN::ColorPointGIntensity::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::ColorControl::Id, MN::ColorPointGIntensity::Id, + ZCL_INT8U_ATTRIBUTE_TYPE, reinterpret_cast(&value.value())); } break; } // type is int16u - case MN::ClusterRevision::Id: { - using T = MN::ClusterRevision::TypeInfo::Type; + case MN::ColorPointBX::Id: { + using T = MN::ColorPointBX::TypeInfo::Type; std::optional value = from_json(unify_value); if (value.has_value()) { - sl_log_debug(LOG_TAG, "ClusterRevision attribute value is %s", unify_value.dump().c_str()); - UN::ClusterRevision::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::ColorControl::Id, MN::ClusterRevision::Id, + sl_log_debug(LOG_TAG, "ColorPointBX attribute value is %s", unify_value.dump().c_str()); + UN::ColorPointBX::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::ColorControl::Id, MN::ColorPointBX::Id, ZCL_INT16U_ATTRIBUTE_TYPE, reinterpret_cast(&value.value())); } break; } - } -} - -CHIP_ERROR -BallastConfigurationAttributeAccess::Read(const ConcreteReadAttributePath & aPath, AttributeValueEncoder & aEncoder) -{ - namespace MN = chip::app::Clusters::BallastConfiguration::Attributes; - namespace UN = unify::matter_bridge::BallastConfiguration::Attributes; - if (aPath.mClusterId != Clusters::BallastConfiguration::Id) - { - return CHIP_ERROR_INVALID_ARGUMENT; - } - - ConcreteAttributePath atrpath = ConcreteAttributePath(aPath.mEndpointId, aPath.mClusterId, aPath.mAttributeId); - - try - { - switch (aPath.mAttributeId) - { - - case MN::PhysicalMinLevel::Id: { // type is int8u - MN::PhysicalMinLevel::TypeInfo::Type value; - UN::PhysicalMinLevel::Get(atrpath, value); - return aEncoder.Encode(value); - } - - case MN::PhysicalMaxLevel::Id: { // type is int8u - MN::PhysicalMaxLevel::TypeInfo::Type value; - UN::PhysicalMaxLevel::Get(atrpath, value); - return aEncoder.Encode(value); - } - - case MN::BallastStatus::Id: { // type is bitmap8 - MN::BallastStatus::TypeInfo::Type value; - UN::BallastStatus::Get(atrpath, value); - return aEncoder.Encode(value); - } - - case MN::MinLevel::Id: { // type is int8u - MN::MinLevel::TypeInfo::Type value; - UN::MinLevel::Get(atrpath, value); - return aEncoder.Encode(value); - } - - case MN::MaxLevel::Id: { // type is int8u - MN::MaxLevel::TypeInfo::Type value; - UN::MaxLevel::Get(atrpath, value); - return aEncoder.Encode(value); - } - - case MN::IntrinsicBalanceFactor::Id: { // type is int8u - MN::IntrinsicBalanceFactor::TypeInfo::Type value; - UN::IntrinsicBalanceFactor::Get(atrpath, value); - return aEncoder.Encode(value); - } - - case MN::BallastFactorAdjustment::Id: { // type is int8u - MN::BallastFactorAdjustment::TypeInfo::Type value; - UN::BallastFactorAdjustment::Get(atrpath, value); - return aEncoder.Encode(value); - } - - case MN::LampQuantity::Id: { // type is int8u - MN::LampQuantity::TypeInfo::Type value; - UN::LampQuantity::Get(atrpath, value); - return aEncoder.Encode(value); - } - - case MN::LampType::Id: { // type is char_string - MN::LampType::TypeInfo::Type value; - UN::LampType::Get(atrpath, value); - return aEncoder.Encode(value); - } - - case MN::LampManufacturer::Id: { // type is char_string - MN::LampManufacturer::TypeInfo::Type value; - UN::LampManufacturer::Get(atrpath, value); - return aEncoder.Encode(value); - } - - case MN::LampRatedHours::Id: { // type is int24u - MN::LampRatedHours::TypeInfo::Type value; - UN::LampRatedHours::Get(atrpath, value); - return aEncoder.Encode(value); - } - - case MN::LampBurnHours::Id: { // type is int24u - MN::LampBurnHours::TypeInfo::Type value; - UN::LampBurnHours::Get(atrpath, value); - return aEncoder.Encode(value); - } - - case MN::LampAlarmMode::Id: { // type is bitmap8 - MN::LampAlarmMode::TypeInfo::Type value; - UN::LampAlarmMode::Get(atrpath, value); - return aEncoder.Encode(value); - } - - case MN::LampBurnHoursTripPoint::Id: { // type is int24u - MN::LampBurnHoursTripPoint::TypeInfo::Type value; - UN::LampBurnHoursTripPoint::Get(atrpath, value); - return aEncoder.Encode(value); - } - - case MN::FeatureMap::Id: { // type is bitmap32 - MN::FeatureMap::TypeInfo::Type value; - UN::FeatureMap::Get(atrpath, value); - return aEncoder.Encode(value); - } - - case MN::ClusterRevision::Id: { // type is int16u - MN::ClusterRevision::TypeInfo::Type value; - UN::ClusterRevision::Get(atrpath, value); - return aEncoder.Encode(value); - } - } - } catch (const std::out_of_range & e) - { - sl_log_info(LOG_TAG, - "The request attribute Path is not found in the attribute state " - "contanier, %s\n", - e.what()); - return CHIP_ERROR_NO_MESSAGE_HANDLER; - } - return CHIP_NO_ERROR; -} - -CHIP_ERROR BallastConfigurationAttributeAccess::Write(const ConcreteDataAttributePath & aPath, AttributeValueDecoder & aDecoder) -{ - using namespace chip::app::Clusters::BallastConfiguration; - - if (aPath.mClusterId != Clusters::BallastConfiguration::Id) - { - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto unify_node = m_node_state_monitor.bridged_endpoint(aPath.mEndpointId); - - if (!unify_node) - { - return CHIP_ERROR_NO_MESSAGE_HANDLER; - } - - std::string attribute_name; - nlohmann::json jsn; - - switch (aPath.mAttributeId) - { - } - - if (!attribute_name.empty()) - { - std::string payload_str; - std::string topic = "ucl/by-unid/" + unify_node->unify_unid + "/ep" + std::to_string(unify_node->unify_endpoint) + - "/BallastConfiguration/Attributes/" + attribute_name + "/Desired"; - payload_str = jsn.dump(); - uic_mqtt_publish(topic.c_str(), payload_str.c_str(), payload_str.length(), true); - return CHIP_ERROR_NO_MESSAGE_HANDLER; - } - - return CHIP_NO_ERROR; -} - -void BallastConfigurationAttributeAccess::reported_updated(const bridged_endpoint * ep, const std::string & cluster, - const std::string & attribute, const nlohmann::json & unify_value) -{ - namespace MN = chip::app::Clusters::BallastConfiguration::Attributes; - namespace UN = unify::matter_bridge::BallastConfiguration::Attributes; - - auto cluster_id = device_translator::instance().get_cluster_id(cluster); - - if (!cluster_id.has_value() || (cluster_id.value() != Clusters::BallastConfiguration::Id)) - { - return; - } - - // get attribute id - auto attribute_id = device_translator::instance().get_attribute_id(cluster, attribute); - - if (!attribute_id.has_value()) - { - return; - } - - chip::EndpointId node_matter_endpoint = ep->matter_endpoint; - ConcreteAttributePath attrpath = - ConcreteAttributePath(node_matter_endpoint, Clusters::BallastConfiguration::Id, attribute_id.value()); - - switch (attribute_id.value()) - { - // type is int8u - case MN::PhysicalMinLevel::Id: { - using T = MN::PhysicalMinLevel::TypeInfo::Type; + // type is int16u + case MN::ColorPointBY::Id: { + using T = MN::ColorPointBY::TypeInfo::Type; std::optional value = from_json(unify_value); if (value.has_value()) { - sl_log_debug(LOG_TAG, "PhysicalMinLevel attribute value is %s", unify_value.dump().c_str()); - UN::PhysicalMinLevel::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::BallastConfiguration::Id, - MN::PhysicalMinLevel::Id, ZCL_INT8U_ATTRIBUTE_TYPE, - reinterpret_cast(&value.value())); + sl_log_debug(LOG_TAG, "ColorPointBY attribute value is %s", unify_value.dump().c_str()); + UN::ColorPointBY::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::ColorControl::Id, MN::ColorPointBY::Id, + ZCL_INT16U_ATTRIBUTE_TYPE, reinterpret_cast(&value.value())); } break; } // type is int8u - case MN::PhysicalMaxLevel::Id: { - using T = MN::PhysicalMaxLevel::TypeInfo::Type; + case MN::ColorPointBIntensity::Id: { + using T = MN::ColorPointBIntensity::TypeInfo::Type; std::optional value = from_json(unify_value); if (value.has_value()) { - sl_log_debug(LOG_TAG, "PhysicalMaxLevel attribute value is %s", unify_value.dump().c_str()); - UN::PhysicalMaxLevel::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::BallastConfiguration::Id, - MN::PhysicalMaxLevel::Id, ZCL_INT8U_ATTRIBUTE_TYPE, - reinterpret_cast(&value.value())); + sl_log_debug(LOG_TAG, "ColorPointBIntensity attribute value is %s", unify_value.dump().c_str()); + UN::ColorPointBIntensity::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::ColorControl::Id, MN::ColorPointBIntensity::Id, + ZCL_INT8U_ATTRIBUTE_TYPE, reinterpret_cast(&value.value())); } break; } - // type is bitmap8 - case MN::BallastStatus::Id: { - using T = MN::BallastStatus::TypeInfo::Type; + // type is int16u + case MN::EnhancedCurrentHue::Id: { + using T = MN::EnhancedCurrentHue::TypeInfo::Type; std::optional value = from_json(unify_value); if (value.has_value()) { - sl_log_debug(LOG_TAG, "BallastStatus attribute value is %s", unify_value.dump().c_str()); - UN::BallastStatus::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::BallastConfiguration::Id, MN::BallastStatus::Id, - ZCL_BITMAP8_ATTRIBUTE_TYPE, reinterpret_cast(&value.value())); + sl_log_debug(LOG_TAG, "EnhancedCurrentHue attribute value is %s", unify_value.dump().c_str()); + UN::EnhancedCurrentHue::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::ColorControl::Id, MN::EnhancedCurrentHue::Id, + ZCL_INT16U_ATTRIBUTE_TYPE, reinterpret_cast(&value.value())); } break; } - // type is int8u - case MN::MinLevel::Id: { - using T = MN::MinLevel::TypeInfo::Type; + // type is enum8 + case MN::EnhancedColorMode::Id: { + using T = ZclEnumEnhancedColorMode; std::optional value = from_json(unify_value); if (value.has_value()) { - sl_log_debug(LOG_TAG, "MinLevel attribute value is %s", unify_value.dump().c_str()); - UN::MinLevel::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::BallastConfiguration::Id, MN::MinLevel::Id, - ZCL_INT8U_ATTRIBUTE_TYPE, reinterpret_cast(&value.value())); + sl_log_debug(LOG_TAG, "EnhancedColorMode attribute value is %s", unify_value.dump().c_str()); + UN::EnhancedColorMode::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::ColorControl::Id, MN::EnhancedColorMode::Id, + ZCL_ENUM8_ATTRIBUTE_TYPE, reinterpret_cast(&value.value())); } break; } // type is int8u - case MN::MaxLevel::Id: { - using T = MN::MaxLevel::TypeInfo::Type; + case MN::ColorLoopActive::Id: { + using T = MN::ColorLoopActive::TypeInfo::Type; std::optional value = from_json(unify_value); if (value.has_value()) { - sl_log_debug(LOG_TAG, "MaxLevel attribute value is %s", unify_value.dump().c_str()); - UN::MaxLevel::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::BallastConfiguration::Id, MN::MaxLevel::Id, + sl_log_debug(LOG_TAG, "ColorLoopActive attribute value is %s", unify_value.dump().c_str()); + UN::ColorLoopActive::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::ColorControl::Id, MN::ColorLoopActive::Id, ZCL_INT8U_ATTRIBUTE_TYPE, reinterpret_cast(&value.value())); } break; } // type is int8u - case MN::IntrinsicBalanceFactor::Id: { - using T = MN::IntrinsicBalanceFactor::TypeInfo::Type; + case MN::ColorLoopDirection::Id: { + using T = MN::ColorLoopDirection::TypeInfo::Type; std::optional value = from_json(unify_value); if (value.has_value()) { - sl_log_debug(LOG_TAG, "IntrinsicBalanceFactor attribute value is %s", unify_value.dump().c_str()); - UN::IntrinsicBalanceFactor::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::BallastConfiguration::Id, - MN::IntrinsicBalanceFactor::Id, ZCL_INT8U_ATTRIBUTE_TYPE, - reinterpret_cast(&value.value())); + sl_log_debug(LOG_TAG, "ColorLoopDirection attribute value is %s", unify_value.dump().c_str()); + UN::ColorLoopDirection::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::ColorControl::Id, MN::ColorLoopDirection::Id, + ZCL_INT8U_ATTRIBUTE_TYPE, reinterpret_cast(&value.value())); } break; } - // type is int8u - case MN::BallastFactorAdjustment::Id: { - using T = MN::BallastFactorAdjustment::TypeInfo::Type; + // type is int16u + case MN::ColorLoopTime::Id: { + using T = MN::ColorLoopTime::TypeInfo::Type; std::optional value = from_json(unify_value); if (value.has_value()) { - sl_log_debug(LOG_TAG, "BallastFactorAdjustment attribute value is %s", unify_value.dump().c_str()); - UN::BallastFactorAdjustment::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::BallastConfiguration::Id, - MN::BallastFactorAdjustment::Id, ZCL_INT8U_ATTRIBUTE_TYPE, - reinterpret_cast(&value.value())); + sl_log_debug(LOG_TAG, "ColorLoopTime attribute value is %s", unify_value.dump().c_str()); + UN::ColorLoopTime::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::ColorControl::Id, MN::ColorLoopTime::Id, + ZCL_INT16U_ATTRIBUTE_TYPE, reinterpret_cast(&value.value())); } break; } - // type is int8u - case MN::LampQuantity::Id: { - using T = MN::LampQuantity::TypeInfo::Type; + // type is int16u + case MN::ColorLoopStartEnhancedHue::Id: { + using T = MN::ColorLoopStartEnhancedHue::TypeInfo::Type; std::optional value = from_json(unify_value); if (value.has_value()) { - sl_log_debug(LOG_TAG, "LampQuantity attribute value is %s", unify_value.dump().c_str()); - UN::LampQuantity::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::BallastConfiguration::Id, MN::LampQuantity::Id, - ZCL_INT8U_ATTRIBUTE_TYPE, reinterpret_cast(&value.value())); + sl_log_debug(LOG_TAG, "ColorLoopStartEnhancedHue attribute value is %s", unify_value.dump().c_str()); + UN::ColorLoopStartEnhancedHue::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::ColorControl::Id, + MN::ColorLoopStartEnhancedHue::Id, ZCL_INT16U_ATTRIBUTE_TYPE, + reinterpret_cast(&value.value())); } break; } - // type is char_string - case MN::LampType::Id: { - using T = MN::LampType::TypeInfo::Type; + // type is int16u + case MN::ColorLoopStoredEnhancedHue::Id: { + using T = MN::ColorLoopStoredEnhancedHue::TypeInfo::Type; std::optional value = from_json(unify_value); if (value.has_value()) { - sl_log_debug(LOG_TAG, "LampType attribute value is %s", unify_value.dump().c_str()); - UN::LampType::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::BallastConfiguration::Id, MN::LampType::Id, - ZCL_CHAR_STRING_ATTRIBUTE_TYPE, reinterpret_cast(&value.value())); + sl_log_debug(LOG_TAG, "ColorLoopStoredEnhancedHue attribute value is %s", unify_value.dump().c_str()); + UN::ColorLoopStoredEnhancedHue::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::ColorControl::Id, + MN::ColorLoopStoredEnhancedHue::Id, ZCL_INT16U_ATTRIBUTE_TYPE, + reinterpret_cast(&value.value())); } break; } - // type is char_string - case MN::LampManufacturer::Id: { - using T = MN::LampManufacturer::TypeInfo::Type; - std::optional value = from_json(unify_value); + // type is bitmap16 + case MN::ColorCapabilities::Id: { + std::optional value = from_json_ColorCapabilities(unify_value); if (value.has_value()) { - sl_log_debug(LOG_TAG, "LampManufacturer attribute value is %s", unify_value.dump().c_str()); - UN::LampManufacturer::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::BallastConfiguration::Id, - MN::LampManufacturer::Id, ZCL_CHAR_STRING_ATTRIBUTE_TYPE, - reinterpret_cast(&value.value())); + sl_log_debug(LOG_TAG, "ColorCapabilities attribute value is %s", unify_value.dump().c_str()); + UN::ColorCapabilities::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::ColorControl::Id, MN::ColorCapabilities::Id, + ZCL_BITMAP16_ATTRIBUTE_TYPE, reinterpret_cast(&value.value())); } break; } - // type is int24u - case MN::LampRatedHours::Id: { - using T = MN::LampRatedHours::TypeInfo::Type; + // type is int16u + case MN::ColorTempPhysicalMinMireds::Id: { + using T = MN::ColorTempPhysicalMinMireds::TypeInfo::Type; std::optional value = from_json(unify_value); if (value.has_value()) { - sl_log_debug(LOG_TAG, "LampRatedHours attribute value is %s", unify_value.dump().c_str()); - UN::LampRatedHours::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::BallastConfiguration::Id, MN::LampRatedHours::Id, - ZCL_INT24U_ATTRIBUTE_TYPE, reinterpret_cast(&value.value())); + sl_log_debug(LOG_TAG, "ColorTempPhysicalMinMireds attribute value is %s", unify_value.dump().c_str()); + UN::ColorTempPhysicalMinMireds::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::ColorControl::Id, + MN::ColorTempPhysicalMinMireds::Id, ZCL_INT16U_ATTRIBUTE_TYPE, + reinterpret_cast(&value.value())); } break; } - // type is int24u - case MN::LampBurnHours::Id: { - using T = MN::LampBurnHours::TypeInfo::Type; + // type is int16u + case MN::ColorTempPhysicalMaxMireds::Id: { + using T = MN::ColorTempPhysicalMaxMireds::TypeInfo::Type; std::optional value = from_json(unify_value); if (value.has_value()) { - sl_log_debug(LOG_TAG, "LampBurnHours attribute value is %s", unify_value.dump().c_str()); - UN::LampBurnHours::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::BallastConfiguration::Id, MN::LampBurnHours::Id, - ZCL_INT24U_ATTRIBUTE_TYPE, reinterpret_cast(&value.value())); + sl_log_debug(LOG_TAG, "ColorTempPhysicalMaxMireds attribute value is %s", unify_value.dump().c_str()); + UN::ColorTempPhysicalMaxMireds::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::ColorControl::Id, + MN::ColorTempPhysicalMaxMireds::Id, ZCL_INT16U_ATTRIBUTE_TYPE, + reinterpret_cast(&value.value())); } break; } - // type is bitmap8 - case MN::LampAlarmMode::Id: { - using T = MN::LampAlarmMode::TypeInfo::Type; + // type is int16u + case MN::CoupleColorTempToLevelMinMireds::Id: { + using T = MN::CoupleColorTempToLevelMinMireds::TypeInfo::Type; std::optional value = from_json(unify_value); if (value.has_value()) { - sl_log_debug(LOG_TAG, "LampAlarmMode attribute value is %s", unify_value.dump().c_str()); - UN::LampAlarmMode::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::BallastConfiguration::Id, MN::LampAlarmMode::Id, - ZCL_BITMAP8_ATTRIBUTE_TYPE, reinterpret_cast(&value.value())); + sl_log_debug(LOG_TAG, "CoupleColorTempToLevelMinMireds attribute value is %s", unify_value.dump().c_str()); + UN::CoupleColorTempToLevelMinMireds::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::ColorControl::Id, + MN::CoupleColorTempToLevelMinMireds::Id, ZCL_INT16U_ATTRIBUTE_TYPE, + reinterpret_cast(&value.value())); } break; } - // type is int24u - case MN::LampBurnHoursTripPoint::Id: { - using T = MN::LampBurnHoursTripPoint::TypeInfo::Type; + // type is int16u + case MN::StartUpColorTemperatureMireds::Id: { + using T = MN::StartUpColorTemperatureMireds::TypeInfo::Type; std::optional value = from_json(unify_value); if (value.has_value()) { - sl_log_debug(LOG_TAG, "LampBurnHoursTripPoint attribute value is %s", unify_value.dump().c_str()); - UN::LampBurnHoursTripPoint::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::BallastConfiguration::Id, - MN::LampBurnHoursTripPoint::Id, ZCL_INT24U_ATTRIBUTE_TYPE, + sl_log_debug(LOG_TAG, "StartUpColorTemperatureMireds attribute value is %s", unify_value.dump().c_str()); + UN::StartUpColorTemperatureMireds::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::ColorControl::Id, + MN::StartUpColorTemperatureMireds::Id, ZCL_INT16U_ATTRIBUTE_TYPE, reinterpret_cast(&value.value())); } break; @@ -15082,7 +12367,7 @@ void BallastConfigurationAttributeAccess::reported_updated(const bridged_endpoin { sl_log_debug(LOG_TAG, "FeatureMap attribute value is %s", unify_value.dump().c_str()); UN::FeatureMap::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::BallastConfiguration::Id, MN::FeatureMap::Id, + MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::ColorControl::Id, MN::FeatureMap::Id, ZCL_BITMAP32_ATTRIBUTE_TYPE, reinterpret_cast(&value.value())); } break; @@ -15096,9 +12381,8 @@ void BallastConfigurationAttributeAccess::reported_updated(const bridged_endpoin { sl_log_debug(LOG_TAG, "ClusterRevision attribute value is %s", unify_value.dump().c_str()); UN::ClusterRevision::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::BallastConfiguration::Id, - MN::ClusterRevision::Id, ZCL_INT16U_ATTRIBUTE_TYPE, - reinterpret_cast(&value.value())); + MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::ColorControl::Id, MN::ClusterRevision::Id, + ZCL_INT16U_ATTRIBUTE_TYPE, reinterpret_cast(&value.value())); } break; } @@ -15116,48 +12400,40 @@ IlluminanceMeasurementAttributeAccess::Read(const ConcreteReadAttributePath & aP } ConcreteAttributePath atrpath = ConcreteAttributePath(aPath.mEndpointId, aPath.mClusterId, aPath.mAttributeId); - try { switch (aPath.mAttributeId) { - case MN::MeasuredValue::Id: { // type is int16u MN::MeasuredValue::TypeInfo::Type value; UN::MeasuredValue::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::MinMeasuredValue::Id: { // type is int16u MN::MinMeasuredValue::TypeInfo::Type value; UN::MinMeasuredValue::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::MaxMeasuredValue::Id: { // type is int16u MN::MaxMeasuredValue::TypeInfo::Type value; UN::MaxMeasuredValue::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::Tolerance::Id: { // type is int16u MN::Tolerance::TypeInfo::Type value; UN::Tolerance::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::LightSensorType::Id: { // type is enum8 MN::LightSensorType::TypeInfo::Type value; UN::LightSensorType::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::FeatureMap::Id: { // type is bitmap32 MN::FeatureMap::TypeInfo::Type value; UN::FeatureMap::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::ClusterRevision::Id: { // type is int16u MN::ClusterRevision::TypeInfo::Type value; UN::ClusterRevision::Get(atrpath, value); @@ -15194,8 +12470,7 @@ CHIP_ERROR IlluminanceMeasurementAttributeAccess::Write(const ConcreteDataAttrib nlohmann::json jsn; switch (aPath.mAttributeId) - { - } + {} if (!attribute_name.empty()) { @@ -15234,7 +12509,6 @@ void IlluminanceMeasurementAttributeAccess::reported_updated(const bridged_endpo chip::EndpointId node_matter_endpoint = ep->matter_endpoint; ConcreteAttributePath attrpath = ConcreteAttributePath(node_matter_endpoint, Clusters::IlluminanceMeasurement::Id, attribute_id.value()); - switch (attribute_id.value()) { // type is int16u @@ -15354,42 +12628,35 @@ TemperatureMeasurementAttributeAccess::Read(const ConcreteReadAttributePath & aP } ConcreteAttributePath atrpath = ConcreteAttributePath(aPath.mEndpointId, aPath.mClusterId, aPath.mAttributeId); - try { switch (aPath.mAttributeId) { - case MN::MeasuredValue::Id: { // type is int16s MN::MeasuredValue::TypeInfo::Type value; UN::MeasuredValue::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::MinMeasuredValue::Id: { // type is int16s MN::MinMeasuredValue::TypeInfo::Type value; UN::MinMeasuredValue::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::MaxMeasuredValue::Id: { // type is int16s MN::MaxMeasuredValue::TypeInfo::Type value; UN::MaxMeasuredValue::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::Tolerance::Id: { // type is int16u MN::Tolerance::TypeInfo::Type value; UN::Tolerance::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::FeatureMap::Id: { // type is bitmap32 MN::FeatureMap::TypeInfo::Type value; UN::FeatureMap::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::ClusterRevision::Id: { // type is int16u MN::ClusterRevision::TypeInfo::Type value; UN::ClusterRevision::Get(atrpath, value); @@ -15426,8 +12693,7 @@ CHIP_ERROR TemperatureMeasurementAttributeAccess::Write(const ConcreteDataAttrib nlohmann::json jsn; switch (aPath.mAttributeId) - { - } + {} if (!attribute_name.empty()) { @@ -15466,7 +12732,6 @@ void TemperatureMeasurementAttributeAccess::reported_updated(const bridged_endpo chip::EndpointId node_matter_endpoint = ep->matter_endpoint; ConcreteAttributePath attrpath = ConcreteAttributePath(node_matter_endpoint, Clusters::TemperatureMeasurement::Id, attribute_id.value()); - switch (attribute_id.value()) { // type is int16s @@ -15571,72 +12836,60 @@ PressureMeasurementAttributeAccess::Read(const ConcreteReadAttributePath & aPath } ConcreteAttributePath atrpath = ConcreteAttributePath(aPath.mEndpointId, aPath.mClusterId, aPath.mAttributeId); - try { switch (aPath.mAttributeId) { - case MN::MeasuredValue::Id: { // type is int16s MN::MeasuredValue::TypeInfo::Type value; UN::MeasuredValue::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::MinMeasuredValue::Id: { // type is int16s MN::MinMeasuredValue::TypeInfo::Type value; UN::MinMeasuredValue::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::MaxMeasuredValue::Id: { // type is int16s MN::MaxMeasuredValue::TypeInfo::Type value; UN::MaxMeasuredValue::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::Tolerance::Id: { // type is int16u MN::Tolerance::TypeInfo::Type value; UN::Tolerance::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::ScaledValue::Id: { // type is int16s MN::ScaledValue::TypeInfo::Type value; UN::ScaledValue::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::MinScaledValue::Id: { // type is int16s MN::MinScaledValue::TypeInfo::Type value; UN::MinScaledValue::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::MaxScaledValue::Id: { // type is int16s MN::MaxScaledValue::TypeInfo::Type value; UN::MaxScaledValue::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::ScaledTolerance::Id: { // type is int16u MN::ScaledTolerance::TypeInfo::Type value; UN::ScaledTolerance::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::Scale::Id: { // type is int8s MN::Scale::TypeInfo::Type value; UN::Scale::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::FeatureMap::Id: { // type is bitmap32 MN::FeatureMap::TypeInfo::Type value; UN::FeatureMap::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::ClusterRevision::Id: { // type is int16u MN::ClusterRevision::TypeInfo::Type value; UN::ClusterRevision::Get(atrpath, value); @@ -15673,8 +12926,7 @@ CHIP_ERROR PressureMeasurementAttributeAccess::Write(const ConcreteDataAttribute nlohmann::json jsn; switch (aPath.mAttributeId) - { - } + {} if (!attribute_name.empty()) { @@ -15713,7 +12965,6 @@ void PressureMeasurementAttributeAccess::reported_updated(const bridged_endpoint chip::EndpointId node_matter_endpoint = ep->matter_endpoint; ConcreteAttributePath attrpath = ConcreteAttributePath(node_matter_endpoint, Clusters::PressureMeasurement::Id, attribute_id.value()); - switch (attribute_id.value()) { // type is int16s @@ -15886,42 +13137,35 @@ FlowMeasurementAttributeAccess::Read(const ConcreteReadAttributePath & aPath, At } ConcreteAttributePath atrpath = ConcreteAttributePath(aPath.mEndpointId, aPath.mClusterId, aPath.mAttributeId); - try { switch (aPath.mAttributeId) { - case MN::MeasuredValue::Id: { // type is int16u MN::MeasuredValue::TypeInfo::Type value; UN::MeasuredValue::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::MinMeasuredValue::Id: { // type is int16u MN::MinMeasuredValue::TypeInfo::Type value; UN::MinMeasuredValue::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::MaxMeasuredValue::Id: { // type is int16u MN::MaxMeasuredValue::TypeInfo::Type value; UN::MaxMeasuredValue::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::Tolerance::Id: { // type is int16u MN::Tolerance::TypeInfo::Type value; UN::Tolerance::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::FeatureMap::Id: { // type is bitmap32 MN::FeatureMap::TypeInfo::Type value; UN::FeatureMap::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::ClusterRevision::Id: { // type is int16u MN::ClusterRevision::TypeInfo::Type value; UN::ClusterRevision::Get(atrpath, value); @@ -15958,8 +13202,7 @@ CHIP_ERROR FlowMeasurementAttributeAccess::Write(const ConcreteDataAttributePath nlohmann::json jsn; switch (aPath.mAttributeId) - { - } + {} if (!attribute_name.empty()) { @@ -15998,7 +13241,6 @@ void FlowMeasurementAttributeAccess::reported_updated(const bridged_endpoint * e chip::EndpointId node_matter_endpoint = ep->matter_endpoint; ConcreteAttributePath attrpath = ConcreteAttributePath(node_matter_endpoint, Clusters::FlowMeasurement::Id, attribute_id.value()); - switch (attribute_id.value()) { // type is int16u @@ -16099,42 +13341,35 @@ RelativeHumidityMeasurementAttributeAccess::Read(const ConcreteReadAttributePath } ConcreteAttributePath atrpath = ConcreteAttributePath(aPath.mEndpointId, aPath.mClusterId, aPath.mAttributeId); - try { switch (aPath.mAttributeId) { - case MN::MeasuredValue::Id: { // type is int16u MN::MeasuredValue::TypeInfo::Type value; UN::MeasuredValue::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::MinMeasuredValue::Id: { // type is int16u MN::MinMeasuredValue::TypeInfo::Type value; UN::MinMeasuredValue::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::MaxMeasuredValue::Id: { // type is int16u MN::MaxMeasuredValue::TypeInfo::Type value; UN::MaxMeasuredValue::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::Tolerance::Id: { // type is int16u MN::Tolerance::TypeInfo::Type value; UN::Tolerance::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::FeatureMap::Id: { // type is bitmap32 MN::FeatureMap::TypeInfo::Type value; UN::FeatureMap::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::ClusterRevision::Id: { // type is int16u MN::ClusterRevision::TypeInfo::Type value; UN::ClusterRevision::Get(atrpath, value); @@ -16172,8 +13407,7 @@ CHIP_ERROR RelativeHumidityMeasurementAttributeAccess::Write(const ConcreteDataA nlohmann::json jsn; switch (aPath.mAttributeId) - { - } + {} if (!attribute_name.empty()) { @@ -16212,7 +13446,6 @@ void RelativeHumidityMeasurementAttributeAccess::reported_updated(const bridged_ chip::EndpointId node_matter_endpoint = ep->matter_endpoint; ConcreteAttributePath attrpath = ConcreteAttributePath(node_matter_endpoint, Clusters::RelativeHumidityMeasurement::Id, attribute_id.value()); - switch (attribute_id.value()) { // type is int16u @@ -16319,90 +13552,75 @@ OccupancySensingAttributeAccess::Read(const ConcreteReadAttributePath & aPath, A } ConcreteAttributePath atrpath = ConcreteAttributePath(aPath.mEndpointId, aPath.mClusterId, aPath.mAttributeId); - try { switch (aPath.mAttributeId) { - case MN::Occupancy::Id: { // type is bitmap8 MN::Occupancy::TypeInfo::Type value; UN::Occupancy::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::OccupancySensorType::Id: { // type is enum8 MN::OccupancySensorType::TypeInfo::Type value; UN::OccupancySensorType::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::OccupancySensorTypeBitmap::Id: { // type is bitmap8 MN::OccupancySensorTypeBitmap::TypeInfo::Type value; UN::OccupancySensorTypeBitmap::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::PirOccupiedToUnoccupiedDelay::Id: { // type is int16u MN::PirOccupiedToUnoccupiedDelay::TypeInfo::Type value; UN::PirOccupiedToUnoccupiedDelay::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::PirUnoccupiedToOccupiedDelay::Id: { // type is int16u MN::PirUnoccupiedToOccupiedDelay::TypeInfo::Type value; UN::PirUnoccupiedToOccupiedDelay::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::PirUnoccupiedToOccupiedThreshold::Id: { // type is int8u MN::PirUnoccupiedToOccupiedThreshold::TypeInfo::Type value; UN::PirUnoccupiedToOccupiedThreshold::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::UltrasonicOccupiedToUnoccupiedDelay::Id: { // type is int16u MN::UltrasonicOccupiedToUnoccupiedDelay::TypeInfo::Type value; UN::UltrasonicOccupiedToUnoccupiedDelay::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::UltrasonicUnoccupiedToOccupiedDelay::Id: { // type is int16u MN::UltrasonicUnoccupiedToOccupiedDelay::TypeInfo::Type value; UN::UltrasonicUnoccupiedToOccupiedDelay::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::UltrasonicUnoccupiedToOccupiedThreshold::Id: { // type is int8u MN::UltrasonicUnoccupiedToOccupiedThreshold::TypeInfo::Type value; UN::UltrasonicUnoccupiedToOccupiedThreshold::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::PhysicalContactOccupiedToUnoccupiedDelay::Id: { // type is int16u MN::PhysicalContactOccupiedToUnoccupiedDelay::TypeInfo::Type value; UN::PhysicalContactOccupiedToUnoccupiedDelay::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::PhysicalContactUnoccupiedToOccupiedDelay::Id: { // type is int16u MN::PhysicalContactUnoccupiedToOccupiedDelay::TypeInfo::Type value; UN::PhysicalContactUnoccupiedToOccupiedDelay::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::PhysicalContactUnoccupiedToOccupiedThreshold::Id: { // type is int8u MN::PhysicalContactUnoccupiedToOccupiedThreshold::TypeInfo::Type value; UN::PhysicalContactUnoccupiedToOccupiedThreshold::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::FeatureMap::Id: { // type is bitmap32 MN::FeatureMap::TypeInfo::Type value; UN::FeatureMap::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::ClusterRevision::Id: { // type is int16u MN::ClusterRevision::TypeInfo::Type value; UN::ClusterRevision::Get(atrpath, value); @@ -16439,8 +13657,7 @@ CHIP_ERROR OccupancySensingAttributeAccess::Write(const ConcreteDataAttributePat nlohmann::json jsn; switch (aPath.mAttributeId) - { - } + {} if (!attribute_name.empty()) { @@ -16479,13 +13696,11 @@ void OccupancySensingAttributeAccess::reported_updated(const bridged_endpoint * chip::EndpointId node_matter_endpoint = ep->matter_endpoint; ConcreteAttributePath attrpath = ConcreteAttributePath(node_matter_endpoint, Clusters::OccupancySensing::Id, attribute_id.value()); - switch (attribute_id.value()) { // type is bitmap8 case MN::Occupancy::Id: { - using T = MN::Occupancy::TypeInfo::Type; - std::optional value = from_json(unify_value); + std::optional value = from_json_Occupancy(unify_value); if (value.has_value()) { @@ -16498,7 +13713,7 @@ void OccupancySensingAttributeAccess::reported_updated(const bridged_endpoint * } // type is enum8 case MN::OccupancySensorType::Id: { - using T = MN::OccupancySensorType::TypeInfo::Type; + using T = ZclEnumOccupancySensorType; std::optional value = from_json(unify_value); if (value.has_value()) @@ -16513,8 +13728,7 @@ void OccupancySensingAttributeAccess::reported_updated(const bridged_endpoint * } // type is bitmap8 case MN::OccupancySensorTypeBitmap::Id: { - using T = MN::OccupancySensorTypeBitmap::TypeInfo::Type; - std::optional value = from_json(unify_value); + std::optional value = from_json_OccupancySensorTypeBitmap(unify_value); if (value.has_value()) { @@ -16703,24 +13917,20 @@ WakeOnLanAttributeAccess::Read(const ConcreteReadAttributePath & aPath, Attribut } ConcreteAttributePath atrpath = ConcreteAttributePath(aPath.mEndpointId, aPath.mClusterId, aPath.mAttributeId); - try { switch (aPath.mAttributeId) { - case MN::MACAddress::Id: { // type is char_string MN::MACAddress::TypeInfo::Type value; UN::MACAddress::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::FeatureMap::Id: { // type is bitmap32 MN::FeatureMap::TypeInfo::Type value; UN::FeatureMap::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::ClusterRevision::Id: { // type is int16u MN::ClusterRevision::TypeInfo::Type value; UN::ClusterRevision::Get(atrpath, value); @@ -16757,8 +13967,7 @@ CHIP_ERROR WakeOnLanAttributeAccess::Write(const ConcreteDataAttributePath & aPa nlohmann::json jsn; switch (aPath.mAttributeId) - { - } + {} if (!attribute_name.empty()) { @@ -16796,7 +14005,6 @@ void WakeOnLanAttributeAccess::reported_updated(const bridged_endpoint * ep, con chip::EndpointId node_matter_endpoint = ep->matter_endpoint; ConcreteAttributePath attrpath = ConcreteAttributePath(node_matter_endpoint, Clusters::WakeOnLan::Id, attribute_id.value()); - switch (attribute_id.value()) { // type is char_string @@ -16855,18 +14063,15 @@ ChannelAttributeAccess::Read(const ConcreteReadAttributePath & aPath, AttributeV } ConcreteAttributePath atrpath = ConcreteAttributePath(aPath.mEndpointId, aPath.mClusterId, aPath.mAttributeId); - try { switch (aPath.mAttributeId) { - case MN::FeatureMap::Id: { // type is bitmap32 MN::FeatureMap::TypeInfo::Type value; UN::FeatureMap::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::ClusterRevision::Id: { // type is int16u MN::ClusterRevision::TypeInfo::Type value; UN::ClusterRevision::Get(atrpath, value); @@ -16903,8 +14108,7 @@ CHIP_ERROR ChannelAttributeAccess::Write(const ConcreteDataAttributePath & aPath nlohmann::json jsn; switch (aPath.mAttributeId) - { - } + {} if (!attribute_name.empty()) { @@ -16942,7 +14146,6 @@ void ChannelAttributeAccess::reported_updated(const bridged_endpoint * ep, const chip::EndpointId node_matter_endpoint = ep->matter_endpoint; ConcreteAttributePath attrpath = ConcreteAttributePath(node_matter_endpoint, Clusters::Channel::Id, attribute_id.value()); - switch (attribute_id.value()) { // type is bitmap32 @@ -16987,24 +14190,20 @@ TargetNavigatorAttributeAccess::Read(const ConcreteReadAttributePath & aPath, At } ConcreteAttributePath atrpath = ConcreteAttributePath(aPath.mEndpointId, aPath.mClusterId, aPath.mAttributeId); - try { switch (aPath.mAttributeId) { - case MN::CurrentTarget::Id: { // type is int8u MN::CurrentTarget::TypeInfo::Type value; UN::CurrentTarget::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::FeatureMap::Id: { // type is bitmap32 MN::FeatureMap::TypeInfo::Type value; UN::FeatureMap::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::ClusterRevision::Id: { // type is int16u MN::ClusterRevision::TypeInfo::Type value; UN::ClusterRevision::Get(atrpath, value); @@ -17041,8 +14240,7 @@ CHIP_ERROR TargetNavigatorAttributeAccess::Write(const ConcreteDataAttributePath nlohmann::json jsn; switch (aPath.mAttributeId) - { - } + {} if (!attribute_name.empty()) { @@ -17081,7 +14279,6 @@ void TargetNavigatorAttributeAccess::reported_updated(const bridged_endpoint * e chip::EndpointId node_matter_endpoint = ep->matter_endpoint; ConcreteAttributePath attrpath = ConcreteAttributePath(node_matter_endpoint, Clusters::TargetNavigator::Id, attribute_id.value()); - switch (attribute_id.value()) { // type is int8u @@ -17140,54 +14337,45 @@ MediaPlaybackAttributeAccess::Read(const ConcreteReadAttributePath & aPath, Attr } ConcreteAttributePath atrpath = ConcreteAttributePath(aPath.mEndpointId, aPath.mClusterId, aPath.mAttributeId); - try { switch (aPath.mAttributeId) { - case MN::CurrentState::Id: { // type is PlaybackStateEnum MN::CurrentState::TypeInfo::Type value; UN::CurrentState::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::StartTime::Id: { // type is epoch_us MN::StartTime::TypeInfo::Type value; UN::StartTime::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::Duration::Id: { // type is int64u MN::Duration::TypeInfo::Type value; UN::Duration::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::PlaybackSpeed::Id: { // type is single MN::PlaybackSpeed::TypeInfo::Type value; UN::PlaybackSpeed::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::SeekRangeEnd::Id: { // type is int64u MN::SeekRangeEnd::TypeInfo::Type value; UN::SeekRangeEnd::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::SeekRangeStart::Id: { // type is int64u MN::SeekRangeStart::TypeInfo::Type value; UN::SeekRangeStart::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::FeatureMap::Id: { // type is bitmap32 MN::FeatureMap::TypeInfo::Type value; UN::FeatureMap::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::ClusterRevision::Id: { // type is int16u MN::ClusterRevision::TypeInfo::Type value; UN::ClusterRevision::Get(atrpath, value); @@ -17224,8 +14412,7 @@ CHIP_ERROR MediaPlaybackAttributeAccess::Write(const ConcreteDataAttributePath & nlohmann::json jsn; switch (aPath.mAttributeId) - { - } + {} if (!attribute_name.empty()) { @@ -17263,7 +14450,6 @@ void MediaPlaybackAttributeAccess::reported_updated(const bridged_endpoint * ep, chip::EndpointId node_matter_endpoint = ep->matter_endpoint; ConcreteAttributePath attrpath = ConcreteAttributePath(node_matter_endpoint, Clusters::MediaPlayback::Id, attribute_id.value()); - switch (attribute_id.value()) { // type is PlaybackStateEnum @@ -17392,24 +14578,20 @@ MediaInputAttributeAccess::Read(const ConcreteReadAttributePath & aPath, Attribu } ConcreteAttributePath atrpath = ConcreteAttributePath(aPath.mEndpointId, aPath.mClusterId, aPath.mAttributeId); - try { switch (aPath.mAttributeId) { - case MN::CurrentInput::Id: { // type is int8u MN::CurrentInput::TypeInfo::Type value; UN::CurrentInput::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::FeatureMap::Id: { // type is bitmap32 MN::FeatureMap::TypeInfo::Type value; UN::FeatureMap::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::ClusterRevision::Id: { // type is int16u MN::ClusterRevision::TypeInfo::Type value; UN::ClusterRevision::Get(atrpath, value); @@ -17446,8 +14628,7 @@ CHIP_ERROR MediaInputAttributeAccess::Write(const ConcreteDataAttributePath & aP nlohmann::json jsn; switch (aPath.mAttributeId) - { - } + {} if (!attribute_name.empty()) { @@ -17485,7 +14666,6 @@ void MediaInputAttributeAccess::reported_updated(const bridged_endpoint * ep, co chip::EndpointId node_matter_endpoint = ep->matter_endpoint; ConcreteAttributePath attrpath = ConcreteAttributePath(node_matter_endpoint, Clusters::MediaInput::Id, attribute_id.value()); - switch (attribute_id.value()) { // type is int8u @@ -17544,18 +14724,15 @@ LowPowerAttributeAccess::Read(const ConcreteReadAttributePath & aPath, Attribute } ConcreteAttributePath atrpath = ConcreteAttributePath(aPath.mEndpointId, aPath.mClusterId, aPath.mAttributeId); - try { switch (aPath.mAttributeId) { - case MN::FeatureMap::Id: { // type is bitmap32 MN::FeatureMap::TypeInfo::Type value; UN::FeatureMap::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::ClusterRevision::Id: { // type is int16u MN::ClusterRevision::TypeInfo::Type value; UN::ClusterRevision::Get(atrpath, value); @@ -17592,8 +14769,7 @@ CHIP_ERROR LowPowerAttributeAccess::Write(const ConcreteDataAttributePath & aPat nlohmann::json jsn; switch (aPath.mAttributeId) - { - } + {} if (!attribute_name.empty()) { @@ -17631,7 +14807,6 @@ void LowPowerAttributeAccess::reported_updated(const bridged_endpoint * ep, cons chip::EndpointId node_matter_endpoint = ep->matter_endpoint; ConcreteAttributePath attrpath = ConcreteAttributePath(node_matter_endpoint, Clusters::LowPower::Id, attribute_id.value()); - switch (attribute_id.value()) { // type is bitmap32 @@ -17676,18 +14851,15 @@ KeypadInputAttributeAccess::Read(const ConcreteReadAttributePath & aPath, Attrib } ConcreteAttributePath atrpath = ConcreteAttributePath(aPath.mEndpointId, aPath.mClusterId, aPath.mAttributeId); - try { switch (aPath.mAttributeId) { - case MN::FeatureMap::Id: { // type is bitmap32 MN::FeatureMap::TypeInfo::Type value; UN::FeatureMap::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::ClusterRevision::Id: { // type is int16u MN::ClusterRevision::TypeInfo::Type value; UN::ClusterRevision::Get(atrpath, value); @@ -17724,8 +14896,7 @@ CHIP_ERROR KeypadInputAttributeAccess::Write(const ConcreteDataAttributePath & a nlohmann::json jsn; switch (aPath.mAttributeId) - { - } + {} if (!attribute_name.empty()) { @@ -17763,7 +14934,6 @@ void KeypadInputAttributeAccess::reported_updated(const bridged_endpoint * ep, c chip::EndpointId node_matter_endpoint = ep->matter_endpoint; ConcreteAttributePath attrpath = ConcreteAttributePath(node_matter_endpoint, Clusters::KeypadInput::Id, attribute_id.value()); - switch (attribute_id.value()) { // type is bitmap32 @@ -17808,24 +14978,20 @@ ContentLauncherAttributeAccess::Read(const ConcreteReadAttributePath & aPath, At } ConcreteAttributePath atrpath = ConcreteAttributePath(aPath.mEndpointId, aPath.mClusterId, aPath.mAttributeId); - try { switch (aPath.mAttributeId) { - case MN::SupportedStreamingProtocols::Id: { // type is bitmap32 MN::SupportedStreamingProtocols::TypeInfo::Type value; UN::SupportedStreamingProtocols::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::FeatureMap::Id: { // type is bitmap32 MN::FeatureMap::TypeInfo::Type value; UN::FeatureMap::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::ClusterRevision::Id: { // type is int16u MN::ClusterRevision::TypeInfo::Type value; UN::ClusterRevision::Get(atrpath, value); @@ -17862,8 +15028,7 @@ CHIP_ERROR ContentLauncherAttributeAccess::Write(const ConcreteDataAttributePath nlohmann::json jsn; switch (aPath.mAttributeId) - { - } + {} if (!attribute_name.empty()) { @@ -17902,7 +15067,6 @@ void ContentLauncherAttributeAccess::reported_updated(const bridged_endpoint * e chip::EndpointId node_matter_endpoint = ep->matter_endpoint; ConcreteAttributePath attrpath = ConcreteAttributePath(node_matter_endpoint, Clusters::ContentLauncher::Id, attribute_id.value()); - switch (attribute_id.value()) { // type is bitmap32 @@ -17962,24 +15126,20 @@ AudioOutputAttributeAccess::Read(const ConcreteReadAttributePath & aPath, Attrib } ConcreteAttributePath atrpath = ConcreteAttributePath(aPath.mEndpointId, aPath.mClusterId, aPath.mAttributeId); - try { switch (aPath.mAttributeId) { - case MN::CurrentOutput::Id: { // type is int8u MN::CurrentOutput::TypeInfo::Type value; UN::CurrentOutput::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::FeatureMap::Id: { // type is bitmap32 MN::FeatureMap::TypeInfo::Type value; UN::FeatureMap::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::ClusterRevision::Id: { // type is int16u MN::ClusterRevision::TypeInfo::Type value; UN::ClusterRevision::Get(atrpath, value); @@ -18016,8 +15176,7 @@ CHIP_ERROR AudioOutputAttributeAccess::Write(const ConcreteDataAttributePath & a nlohmann::json jsn; switch (aPath.mAttributeId) - { - } + {} if (!attribute_name.empty()) { @@ -18055,7 +15214,6 @@ void AudioOutputAttributeAccess::reported_updated(const bridged_endpoint * ep, c chip::EndpointId node_matter_endpoint = ep->matter_endpoint; ConcreteAttributePath attrpath = ConcreteAttributePath(node_matter_endpoint, Clusters::AudioOutput::Id, attribute_id.value()); - switch (attribute_id.value()) { // type is int8u @@ -18114,18 +15272,15 @@ ApplicationLauncherAttributeAccess::Read(const ConcreteReadAttributePath & aPath } ConcreteAttributePath atrpath = ConcreteAttributePath(aPath.mEndpointId, aPath.mClusterId, aPath.mAttributeId); - try { switch (aPath.mAttributeId) { - case MN::FeatureMap::Id: { // type is bitmap32 MN::FeatureMap::TypeInfo::Type value; UN::FeatureMap::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::ClusterRevision::Id: { // type is int16u MN::ClusterRevision::TypeInfo::Type value; UN::ClusterRevision::Get(atrpath, value); @@ -18162,8 +15317,7 @@ CHIP_ERROR ApplicationLauncherAttributeAccess::Write(const ConcreteDataAttribute nlohmann::json jsn; switch (aPath.mAttributeId) - { - } + {} if (!attribute_name.empty()) { @@ -18202,7 +15356,6 @@ void ApplicationLauncherAttributeAccess::reported_updated(const bridged_endpoint chip::EndpointId node_matter_endpoint = ep->matter_endpoint; ConcreteAttributePath attrpath = ConcreteAttributePath(node_matter_endpoint, Clusters::ApplicationLauncher::Id, attribute_id.value()); - switch (attribute_id.value()) { // type is bitmap32 @@ -18247,54 +15400,45 @@ ApplicationBasicAttributeAccess::Read(const ConcreteReadAttributePath & aPath, A } ConcreteAttributePath atrpath = ConcreteAttributePath(aPath.mEndpointId, aPath.mClusterId, aPath.mAttributeId); - try { switch (aPath.mAttributeId) { - case MN::VendorName::Id: { // type is char_string MN::VendorName::TypeInfo::Type value; UN::VendorName::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::VendorID::Id: { // type is vendor_id MN::VendorID::TypeInfo::Type value; UN::VendorID::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::ApplicationName::Id: { // type is char_string MN::ApplicationName::TypeInfo::Type value; UN::ApplicationName::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::ProductID::Id: { // type is int16u MN::ProductID::TypeInfo::Type value; UN::ProductID::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::Status::Id: { // type is ApplicationStatusEnum MN::Status::TypeInfo::Type value; UN::Status::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::ApplicationVersion::Id: { // type is char_string MN::ApplicationVersion::TypeInfo::Type value; UN::ApplicationVersion::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::FeatureMap::Id: { // type is bitmap32 MN::FeatureMap::TypeInfo::Type value; UN::FeatureMap::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::ClusterRevision::Id: { // type is int16u MN::ClusterRevision::TypeInfo::Type value; UN::ClusterRevision::Get(atrpath, value); @@ -18331,8 +15475,7 @@ CHIP_ERROR ApplicationBasicAttributeAccess::Write(const ConcreteDataAttributePat nlohmann::json jsn; switch (aPath.mAttributeId) - { - } + {} if (!attribute_name.empty()) { @@ -18371,7 +15514,6 @@ void ApplicationBasicAttributeAccess::reported_updated(const bridged_endpoint * chip::EndpointId node_matter_endpoint = ep->matter_endpoint; ConcreteAttributePath attrpath = ConcreteAttributePath(node_matter_endpoint, Clusters::ApplicationBasic::Id, attribute_id.value()); - switch (attribute_id.value()) { // type is char_string @@ -18500,18 +15642,15 @@ AccountLoginAttributeAccess::Read(const ConcreteReadAttributePath & aPath, Attri } ConcreteAttributePath atrpath = ConcreteAttributePath(aPath.mEndpointId, aPath.mClusterId, aPath.mAttributeId); - try { switch (aPath.mAttributeId) { - case MN::FeatureMap::Id: { // type is bitmap32 MN::FeatureMap::TypeInfo::Type value; UN::FeatureMap::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::ClusterRevision::Id: { // type is int16u MN::ClusterRevision::TypeInfo::Type value; UN::ClusterRevision::Get(atrpath, value); @@ -18548,8 +15687,7 @@ CHIP_ERROR AccountLoginAttributeAccess::Write(const ConcreteDataAttributePath & nlohmann::json jsn; switch (aPath.mAttributeId) - { - } + {} if (!attribute_name.empty()) { @@ -18587,7 +15725,6 @@ void AccountLoginAttributeAccess::reported_updated(const bridged_endpoint * ep, chip::EndpointId node_matter_endpoint = ep->matter_endpoint; ConcreteAttributePath attrpath = ConcreteAttributePath(node_matter_endpoint, Clusters::AccountLogin::Id, attribute_id.value()); - switch (attribute_id.value()) { // type is bitmap32 @@ -18632,786 +15769,655 @@ ElectricalMeasurementAttributeAccess::Read(const ConcreteReadAttributePath & aPa } ConcreteAttributePath atrpath = ConcreteAttributePath(aPath.mEndpointId, aPath.mClusterId, aPath.mAttributeId); - try { switch (aPath.mAttributeId) { - case MN::MeasurementType::Id: { // type is bitmap32 MN::MeasurementType::TypeInfo::Type value; UN::MeasurementType::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::DcVoltage::Id: { // type is int16s MN::DcVoltage::TypeInfo::Type value; UN::DcVoltage::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::DcVoltageMin::Id: { // type is int16s MN::DcVoltageMin::TypeInfo::Type value; UN::DcVoltageMin::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::DcVoltageMax::Id: { // type is int16s MN::DcVoltageMax::TypeInfo::Type value; UN::DcVoltageMax::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::DcCurrent::Id: { // type is int16s MN::DcCurrent::TypeInfo::Type value; UN::DcCurrent::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::DcCurrentMin::Id: { // type is int16s MN::DcCurrentMin::TypeInfo::Type value; UN::DcCurrentMin::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::DcCurrentMax::Id: { // type is int16s MN::DcCurrentMax::TypeInfo::Type value; UN::DcCurrentMax::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::DcPower::Id: { // type is int16s MN::DcPower::TypeInfo::Type value; UN::DcPower::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::DcPowerMin::Id: { // type is int16s MN::DcPowerMin::TypeInfo::Type value; UN::DcPowerMin::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::DcPowerMax::Id: { // type is int16s MN::DcPowerMax::TypeInfo::Type value; UN::DcPowerMax::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::DcVoltageMultiplier::Id: { // type is int16u MN::DcVoltageMultiplier::TypeInfo::Type value; UN::DcVoltageMultiplier::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::DcVoltageDivisor::Id: { // type is int16u MN::DcVoltageDivisor::TypeInfo::Type value; UN::DcVoltageDivisor::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::DcCurrentMultiplier::Id: { // type is int16u MN::DcCurrentMultiplier::TypeInfo::Type value; UN::DcCurrentMultiplier::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::DcCurrentDivisor::Id: { // type is int16u MN::DcCurrentDivisor::TypeInfo::Type value; UN::DcCurrentDivisor::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::DcPowerMultiplier::Id: { // type is int16u MN::DcPowerMultiplier::TypeInfo::Type value; UN::DcPowerMultiplier::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::DcPowerDivisor::Id: { // type is int16u MN::DcPowerDivisor::TypeInfo::Type value; UN::DcPowerDivisor::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::AcFrequency::Id: { // type is int16u MN::AcFrequency::TypeInfo::Type value; UN::AcFrequency::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::AcFrequencyMin::Id: { // type is int16u MN::AcFrequencyMin::TypeInfo::Type value; UN::AcFrequencyMin::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::AcFrequencyMax::Id: { // type is int16u MN::AcFrequencyMax::TypeInfo::Type value; UN::AcFrequencyMax::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::NeutralCurrent::Id: { // type is int16u MN::NeutralCurrent::TypeInfo::Type value; UN::NeutralCurrent::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::TotalActivePower::Id: { // type is int32s MN::TotalActivePower::TypeInfo::Type value; UN::TotalActivePower::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::TotalReactivePower::Id: { // type is int32s MN::TotalReactivePower::TypeInfo::Type value; UN::TotalReactivePower::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::TotalApparentPower::Id: { // type is int32u MN::TotalApparentPower::TypeInfo::Type value; UN::TotalApparentPower::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::Measured1stHarmonicCurrent::Id: { // type is int16s MN::Measured1stHarmonicCurrent::TypeInfo::Type value; UN::Measured1stHarmonicCurrent::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::Measured3rdHarmonicCurrent::Id: { // type is int16s MN::Measured3rdHarmonicCurrent::TypeInfo::Type value; UN::Measured3rdHarmonicCurrent::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::Measured5thHarmonicCurrent::Id: { // type is int16s MN::Measured5thHarmonicCurrent::TypeInfo::Type value; UN::Measured5thHarmonicCurrent::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::Measured7thHarmonicCurrent::Id: { // type is int16s MN::Measured7thHarmonicCurrent::TypeInfo::Type value; UN::Measured7thHarmonicCurrent::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::Measured9thHarmonicCurrent::Id: { // type is int16s MN::Measured9thHarmonicCurrent::TypeInfo::Type value; UN::Measured9thHarmonicCurrent::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::Measured11thHarmonicCurrent::Id: { // type is int16s MN::Measured11thHarmonicCurrent::TypeInfo::Type value; UN::Measured11thHarmonicCurrent::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::MeasuredPhase1stHarmonicCurrent::Id: { // type is int16s MN::MeasuredPhase1stHarmonicCurrent::TypeInfo::Type value; UN::MeasuredPhase1stHarmonicCurrent::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::MeasuredPhase3rdHarmonicCurrent::Id: { // type is int16s MN::MeasuredPhase3rdHarmonicCurrent::TypeInfo::Type value; UN::MeasuredPhase3rdHarmonicCurrent::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::MeasuredPhase5thHarmonicCurrent::Id: { // type is int16s MN::MeasuredPhase5thHarmonicCurrent::TypeInfo::Type value; UN::MeasuredPhase5thHarmonicCurrent::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::MeasuredPhase7thHarmonicCurrent::Id: { // type is int16s MN::MeasuredPhase7thHarmonicCurrent::TypeInfo::Type value; UN::MeasuredPhase7thHarmonicCurrent::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::MeasuredPhase9thHarmonicCurrent::Id: { // type is int16s MN::MeasuredPhase9thHarmonicCurrent::TypeInfo::Type value; UN::MeasuredPhase9thHarmonicCurrent::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::MeasuredPhase11thHarmonicCurrent::Id: { // type is int16s MN::MeasuredPhase11thHarmonicCurrent::TypeInfo::Type value; UN::MeasuredPhase11thHarmonicCurrent::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::AcFrequencyMultiplier::Id: { // type is int16u MN::AcFrequencyMultiplier::TypeInfo::Type value; UN::AcFrequencyMultiplier::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::AcFrequencyDivisor::Id: { // type is int16u MN::AcFrequencyDivisor::TypeInfo::Type value; UN::AcFrequencyDivisor::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::PowerMultiplier::Id: { // type is int32u MN::PowerMultiplier::TypeInfo::Type value; UN::PowerMultiplier::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::PowerDivisor::Id: { // type is int32u MN::PowerDivisor::TypeInfo::Type value; UN::PowerDivisor::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::HarmonicCurrentMultiplier::Id: { // type is int8s MN::HarmonicCurrentMultiplier::TypeInfo::Type value; UN::HarmonicCurrentMultiplier::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::PhaseHarmonicCurrentMultiplier::Id: { // type is int8s MN::PhaseHarmonicCurrentMultiplier::TypeInfo::Type value; UN::PhaseHarmonicCurrentMultiplier::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::InstantaneousVoltage::Id: { // type is int16s MN::InstantaneousVoltage::TypeInfo::Type value; UN::InstantaneousVoltage::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::InstantaneousLineCurrent::Id: { // type is int16u MN::InstantaneousLineCurrent::TypeInfo::Type value; UN::InstantaneousLineCurrent::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::InstantaneousActiveCurrent::Id: { // type is int16s MN::InstantaneousActiveCurrent::TypeInfo::Type value; UN::InstantaneousActiveCurrent::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::InstantaneousReactiveCurrent::Id: { // type is int16s MN::InstantaneousReactiveCurrent::TypeInfo::Type value; UN::InstantaneousReactiveCurrent::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::InstantaneousPower::Id: { // type is int16s MN::InstantaneousPower::TypeInfo::Type value; UN::InstantaneousPower::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::RmsVoltage::Id: { // type is int16u MN::RmsVoltage::TypeInfo::Type value; UN::RmsVoltage::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::RmsVoltageMin::Id: { // type is int16u MN::RmsVoltageMin::TypeInfo::Type value; UN::RmsVoltageMin::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::RmsVoltageMax::Id: { // type is int16u MN::RmsVoltageMax::TypeInfo::Type value; UN::RmsVoltageMax::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::RmsCurrent::Id: { // type is int16u MN::RmsCurrent::TypeInfo::Type value; UN::RmsCurrent::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::RmsCurrentMin::Id: { // type is int16u MN::RmsCurrentMin::TypeInfo::Type value; UN::RmsCurrentMin::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::RmsCurrentMax::Id: { // type is int16u MN::RmsCurrentMax::TypeInfo::Type value; UN::RmsCurrentMax::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::ActivePower::Id: { // type is int16s MN::ActivePower::TypeInfo::Type value; UN::ActivePower::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::ActivePowerMin::Id: { // type is int16s MN::ActivePowerMin::TypeInfo::Type value; UN::ActivePowerMin::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::ActivePowerMax::Id: { // type is int16s MN::ActivePowerMax::TypeInfo::Type value; UN::ActivePowerMax::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::ReactivePower::Id: { // type is int16s MN::ReactivePower::TypeInfo::Type value; UN::ReactivePower::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::ApparentPower::Id: { // type is int16u MN::ApparentPower::TypeInfo::Type value; UN::ApparentPower::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::PowerFactor::Id: { // type is int8s MN::PowerFactor::TypeInfo::Type value; UN::PowerFactor::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::AverageRmsVoltageMeasurementPeriod::Id: { // type is int16u MN::AverageRmsVoltageMeasurementPeriod::TypeInfo::Type value; UN::AverageRmsVoltageMeasurementPeriod::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::AverageRmsUnderVoltageCounter::Id: { // type is int16u MN::AverageRmsUnderVoltageCounter::TypeInfo::Type value; UN::AverageRmsUnderVoltageCounter::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::RmsExtremeOverVoltagePeriod::Id: { // type is int16u MN::RmsExtremeOverVoltagePeriod::TypeInfo::Type value; UN::RmsExtremeOverVoltagePeriod::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::RmsExtremeUnderVoltagePeriod::Id: { // type is int16u MN::RmsExtremeUnderVoltagePeriod::TypeInfo::Type value; UN::RmsExtremeUnderVoltagePeriod::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::RmsVoltageSagPeriod::Id: { // type is int16u MN::RmsVoltageSagPeriod::TypeInfo::Type value; UN::RmsVoltageSagPeriod::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::RmsVoltageSwellPeriod::Id: { // type is int16u MN::RmsVoltageSwellPeriod::TypeInfo::Type value; UN::RmsVoltageSwellPeriod::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::AcVoltageMultiplier::Id: { // type is int16u MN::AcVoltageMultiplier::TypeInfo::Type value; UN::AcVoltageMultiplier::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::AcVoltageDivisor::Id: { // type is int16u MN::AcVoltageDivisor::TypeInfo::Type value; UN::AcVoltageDivisor::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::AcCurrentMultiplier::Id: { // type is int16u MN::AcCurrentMultiplier::TypeInfo::Type value; UN::AcCurrentMultiplier::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::AcCurrentDivisor::Id: { // type is int16u MN::AcCurrentDivisor::TypeInfo::Type value; UN::AcCurrentDivisor::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::AcPowerMultiplier::Id: { // type is int16u MN::AcPowerMultiplier::TypeInfo::Type value; UN::AcPowerMultiplier::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::AcPowerDivisor::Id: { // type is int16u MN::AcPowerDivisor::TypeInfo::Type value; UN::AcPowerDivisor::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::OverloadAlarmsMask::Id: { // type is bitmap8 MN::OverloadAlarmsMask::TypeInfo::Type value; UN::OverloadAlarmsMask::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::VoltageOverload::Id: { // type is int16s MN::VoltageOverload::TypeInfo::Type value; UN::VoltageOverload::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::CurrentOverload::Id: { // type is int16s MN::CurrentOverload::TypeInfo::Type value; UN::CurrentOverload::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::AcOverloadAlarmsMask::Id: { // type is bitmap16 MN::AcOverloadAlarmsMask::TypeInfo::Type value; UN::AcOverloadAlarmsMask::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::AcVoltageOverload::Id: { // type is int16s MN::AcVoltageOverload::TypeInfo::Type value; UN::AcVoltageOverload::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::AcCurrentOverload::Id: { // type is int16s MN::AcCurrentOverload::TypeInfo::Type value; UN::AcCurrentOverload::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::AcActivePowerOverload::Id: { // type is int16s MN::AcActivePowerOverload::TypeInfo::Type value; UN::AcActivePowerOverload::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::AcReactivePowerOverload::Id: { // type is int16s MN::AcReactivePowerOverload::TypeInfo::Type value; UN::AcReactivePowerOverload::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::AverageRmsOverVoltage::Id: { // type is int16s MN::AverageRmsOverVoltage::TypeInfo::Type value; UN::AverageRmsOverVoltage::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::AverageRmsUnderVoltage::Id: { // type is int16s MN::AverageRmsUnderVoltage::TypeInfo::Type value; UN::AverageRmsUnderVoltage::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::RmsExtremeOverVoltage::Id: { // type is int16s MN::RmsExtremeOverVoltage::TypeInfo::Type value; UN::RmsExtremeOverVoltage::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::RmsExtremeUnderVoltage::Id: { // type is int16s MN::RmsExtremeUnderVoltage::TypeInfo::Type value; UN::RmsExtremeUnderVoltage::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::RmsVoltageSag::Id: { // type is int16s MN::RmsVoltageSag::TypeInfo::Type value; UN::RmsVoltageSag::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::RmsVoltageSwell::Id: { // type is int16s MN::RmsVoltageSwell::TypeInfo::Type value; UN::RmsVoltageSwell::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::LineCurrentPhaseB::Id: { // type is int16u MN::LineCurrentPhaseB::TypeInfo::Type value; UN::LineCurrentPhaseB::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::ActiveCurrentPhaseB::Id: { // type is int16s MN::ActiveCurrentPhaseB::TypeInfo::Type value; UN::ActiveCurrentPhaseB::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::ReactiveCurrentPhaseB::Id: { // type is int16s MN::ReactiveCurrentPhaseB::TypeInfo::Type value; UN::ReactiveCurrentPhaseB::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::RmsVoltagePhaseB::Id: { // type is int16u MN::RmsVoltagePhaseB::TypeInfo::Type value; UN::RmsVoltagePhaseB::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::RmsVoltageMinPhaseB::Id: { // type is int16u MN::RmsVoltageMinPhaseB::TypeInfo::Type value; UN::RmsVoltageMinPhaseB::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::RmsVoltageMaxPhaseB::Id: { // type is int16u MN::RmsVoltageMaxPhaseB::TypeInfo::Type value; UN::RmsVoltageMaxPhaseB::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::RmsCurrentPhaseB::Id: { // type is int16u MN::RmsCurrentPhaseB::TypeInfo::Type value; UN::RmsCurrentPhaseB::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::RmsCurrentMinPhaseB::Id: { // type is int16u MN::RmsCurrentMinPhaseB::TypeInfo::Type value; UN::RmsCurrentMinPhaseB::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::RmsCurrentMaxPhaseB::Id: { // type is int16u MN::RmsCurrentMaxPhaseB::TypeInfo::Type value; UN::RmsCurrentMaxPhaseB::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::ActivePowerPhaseB::Id: { // type is int16s MN::ActivePowerPhaseB::TypeInfo::Type value; UN::ActivePowerPhaseB::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::ActivePowerMinPhaseB::Id: { // type is int16s MN::ActivePowerMinPhaseB::TypeInfo::Type value; UN::ActivePowerMinPhaseB::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::ActivePowerMaxPhaseB::Id: { // type is int16s MN::ActivePowerMaxPhaseB::TypeInfo::Type value; UN::ActivePowerMaxPhaseB::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::ReactivePowerPhaseB::Id: { // type is int16s MN::ReactivePowerPhaseB::TypeInfo::Type value; UN::ReactivePowerPhaseB::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::ApparentPowerPhaseB::Id: { // type is int16u MN::ApparentPowerPhaseB::TypeInfo::Type value; UN::ApparentPowerPhaseB::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::PowerFactorPhaseB::Id: { // type is int8s MN::PowerFactorPhaseB::TypeInfo::Type value; UN::PowerFactorPhaseB::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::AverageRmsVoltageMeasurementPeriodPhaseB::Id: { // type is int16u MN::AverageRmsVoltageMeasurementPeriodPhaseB::TypeInfo::Type value; UN::AverageRmsVoltageMeasurementPeriodPhaseB::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::AverageRmsOverVoltageCounterPhaseB::Id: { // type is int16u MN::AverageRmsOverVoltageCounterPhaseB::TypeInfo::Type value; UN::AverageRmsOverVoltageCounterPhaseB::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::AverageRmsUnderVoltageCounterPhaseB::Id: { // type is int16u MN::AverageRmsUnderVoltageCounterPhaseB::TypeInfo::Type value; UN::AverageRmsUnderVoltageCounterPhaseB::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::RmsExtremeOverVoltagePeriodPhaseB::Id: { // type is int16u MN::RmsExtremeOverVoltagePeriodPhaseB::TypeInfo::Type value; UN::RmsExtremeOverVoltagePeriodPhaseB::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::RmsExtremeUnderVoltagePeriodPhaseB::Id: { // type is int16u MN::RmsExtremeUnderVoltagePeriodPhaseB::TypeInfo::Type value; UN::RmsExtremeUnderVoltagePeriodPhaseB::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::RmsVoltageSagPeriodPhaseB::Id: { // type is int16u MN::RmsVoltageSagPeriodPhaseB::TypeInfo::Type value; UN::RmsVoltageSagPeriodPhaseB::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::RmsVoltageSwellPeriodPhaseB::Id: { // type is int16u MN::RmsVoltageSwellPeriodPhaseB::TypeInfo::Type value; UN::RmsVoltageSwellPeriodPhaseB::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::LineCurrentPhaseC::Id: { // type is int16u MN::LineCurrentPhaseC::TypeInfo::Type value; UN::LineCurrentPhaseC::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::ActiveCurrentPhaseC::Id: { // type is int16s MN::ActiveCurrentPhaseC::TypeInfo::Type value; UN::ActiveCurrentPhaseC::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::ReactiveCurrentPhaseC::Id: { // type is int16s MN::ReactiveCurrentPhaseC::TypeInfo::Type value; UN::ReactiveCurrentPhaseC::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::RmsVoltagePhaseC::Id: { // type is int16u MN::RmsVoltagePhaseC::TypeInfo::Type value; UN::RmsVoltagePhaseC::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::RmsVoltageMinPhaseC::Id: { // type is int16u MN::RmsVoltageMinPhaseC::TypeInfo::Type value; UN::RmsVoltageMinPhaseC::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::RmsVoltageMaxPhaseC::Id: { // type is int16u MN::RmsVoltageMaxPhaseC::TypeInfo::Type value; UN::RmsVoltageMaxPhaseC::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::RmsCurrentPhaseC::Id: { // type is int16u MN::RmsCurrentPhaseC::TypeInfo::Type value; UN::RmsCurrentPhaseC::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::RmsCurrentMinPhaseC::Id: { // type is int16u MN::RmsCurrentMinPhaseC::TypeInfo::Type value; UN::RmsCurrentMinPhaseC::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::RmsCurrentMaxPhaseC::Id: { // type is int16u MN::RmsCurrentMaxPhaseC::TypeInfo::Type value; UN::RmsCurrentMaxPhaseC::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::ActivePowerPhaseC::Id: { // type is int16s MN::ActivePowerPhaseC::TypeInfo::Type value; UN::ActivePowerPhaseC::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::ActivePowerMinPhaseC::Id: { // type is int16s MN::ActivePowerMinPhaseC::TypeInfo::Type value; UN::ActivePowerMinPhaseC::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::ActivePowerMaxPhaseC::Id: { // type is int16s MN::ActivePowerMaxPhaseC::TypeInfo::Type value; UN::ActivePowerMaxPhaseC::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::ReactivePowerPhaseC::Id: { // type is int16s MN::ReactivePowerPhaseC::TypeInfo::Type value; UN::ReactivePowerPhaseC::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::ApparentPowerPhaseC::Id: { // type is int16u MN::ApparentPowerPhaseC::TypeInfo::Type value; UN::ApparentPowerPhaseC::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::PowerFactorPhaseC::Id: { // type is int8s MN::PowerFactorPhaseC::TypeInfo::Type value; UN::PowerFactorPhaseC::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::AverageRmsVoltageMeasurementPeriodPhaseC::Id: { // type is int16u MN::AverageRmsVoltageMeasurementPeriodPhaseC::TypeInfo::Type value; UN::AverageRmsVoltageMeasurementPeriodPhaseC::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::AverageRmsOverVoltageCounterPhaseC::Id: { // type is int16u MN::AverageRmsOverVoltageCounterPhaseC::TypeInfo::Type value; UN::AverageRmsOverVoltageCounterPhaseC::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::AverageRmsUnderVoltageCounterPhaseC::Id: { // type is int16u MN::AverageRmsUnderVoltageCounterPhaseC::TypeInfo::Type value; UN::AverageRmsUnderVoltageCounterPhaseC::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::RmsExtremeOverVoltagePeriodPhaseC::Id: { // type is int16u MN::RmsExtremeOverVoltagePeriodPhaseC::TypeInfo::Type value; UN::RmsExtremeOverVoltagePeriodPhaseC::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::RmsExtremeUnderVoltagePeriodPhaseC::Id: { // type is int16u MN::RmsExtremeUnderVoltagePeriodPhaseC::TypeInfo::Type value; UN::RmsExtremeUnderVoltagePeriodPhaseC::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::RmsVoltageSagPeriodPhaseC::Id: { // type is int16u MN::RmsVoltageSagPeriodPhaseC::TypeInfo::Type value; UN::RmsVoltageSagPeriodPhaseC::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::RmsVoltageSwellPeriodPhaseC::Id: { // type is int16u MN::RmsVoltageSwellPeriodPhaseC::TypeInfo::Type value; UN::RmsVoltageSwellPeriodPhaseC::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::FeatureMap::Id: { // type is bitmap32 MN::FeatureMap::TypeInfo::Type value; UN::FeatureMap::Get(atrpath, value); return aEncoder.Encode(value); } - case MN::ClusterRevision::Id: { // type is int16u MN::ClusterRevision::TypeInfo::Type value; UN::ClusterRevision::Get(atrpath, value); @@ -19448,8 +16454,7 @@ CHIP_ERROR ElectricalMeasurementAttributeAccess::Write(const ConcreteDataAttribu nlohmann::json jsn; switch (aPath.mAttributeId) - { - } + {} if (!attribute_name.empty()) { @@ -19488,7 +16493,6 @@ void ElectricalMeasurementAttributeAccess::reported_updated(const bridged_endpoi chip::EndpointId node_matter_endpoint = ep->matter_endpoint; ConcreteAttributePath attrpath = ConcreteAttributePath(node_matter_endpoint, Clusters::ElectricalMeasurement::Id, attribute_id.value()); - switch (attribute_id.value()) { // type is bitmap32 @@ -21420,136 +18424,3 @@ void ElectricalMeasurementAttributeAccess::reported_updated(const bridged_endpoi } } } - -CHIP_ERROR -FaultInjectionAttributeAccess::Read(const ConcreteReadAttributePath & aPath, AttributeValueEncoder & aEncoder) -{ - namespace MN = chip::app::Clusters::FaultInjection::Attributes; - namespace UN = unify::matter_bridge::FaultInjection::Attributes; - if (aPath.mClusterId != Clusters::FaultInjection::Id) - { - return CHIP_ERROR_INVALID_ARGUMENT; - } - - ConcreteAttributePath atrpath = ConcreteAttributePath(aPath.mEndpointId, aPath.mClusterId, aPath.mAttributeId); - - try - { - switch (aPath.mAttributeId) - { - - case MN::FeatureMap::Id: { // type is bitmap32 - MN::FeatureMap::TypeInfo::Type value; - UN::FeatureMap::Get(atrpath, value); - return aEncoder.Encode(value); - } - - case MN::ClusterRevision::Id: { // type is int16u - MN::ClusterRevision::TypeInfo::Type value; - UN::ClusterRevision::Get(atrpath, value); - return aEncoder.Encode(value); - } - } - } catch (const std::out_of_range & e) - { - sl_log_info(LOG_TAG, - "The request attribute Path is not found in the attribute state " - "contanier, %s\n", - e.what()); - return CHIP_ERROR_NO_MESSAGE_HANDLER; - } - return CHIP_NO_ERROR; -} - -CHIP_ERROR FaultInjectionAttributeAccess::Write(const ConcreteDataAttributePath & aPath, AttributeValueDecoder & aDecoder) -{ - using namespace chip::app::Clusters::FaultInjection; - - if (aPath.mClusterId != Clusters::FaultInjection::Id) - { - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto unify_node = m_node_state_monitor.bridged_endpoint(aPath.mEndpointId); - - if (!unify_node) - { - return CHIP_ERROR_NO_MESSAGE_HANDLER; - } - - std::string attribute_name; - nlohmann::json jsn; - - switch (aPath.mAttributeId) - { - } - - if (!attribute_name.empty()) - { - std::string payload_str; - std::string topic = "ucl/by-unid/" + unify_node->unify_unid + "/ep" + std::to_string(unify_node->unify_endpoint) + - "/FaultInjection/Attributes/" + attribute_name + "/Desired"; - payload_str = jsn.dump(); - uic_mqtt_publish(topic.c_str(), payload_str.c_str(), payload_str.length(), true); - return CHIP_ERROR_NO_MESSAGE_HANDLER; - } - - return CHIP_NO_ERROR; -} - -void FaultInjectionAttributeAccess::reported_updated(const bridged_endpoint * ep, const std::string & cluster, - const std::string & attribute, const nlohmann::json & unify_value) -{ - namespace MN = chip::app::Clusters::FaultInjection::Attributes; - namespace UN = unify::matter_bridge::FaultInjection::Attributes; - - auto cluster_id = device_translator::instance().get_cluster_id(cluster); - - if (!cluster_id.has_value() || (cluster_id.value() != Clusters::FaultInjection::Id)) - { - return; - } - - // get attribute id - auto attribute_id = device_translator::instance().get_attribute_id(cluster, attribute); - - if (!attribute_id.has_value()) - { - return; - } - - chip::EndpointId node_matter_endpoint = ep->matter_endpoint; - ConcreteAttributePath attrpath = - ConcreteAttributePath(node_matter_endpoint, Clusters::FaultInjection::Id, attribute_id.value()); - - switch (attribute_id.value()) - { - // type is bitmap32 - case MN::FeatureMap::Id: { - using T = MN::FeatureMap::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) - { - sl_log_debug(LOG_TAG, "FeatureMap attribute value is %s", unify_value.dump().c_str()); - UN::FeatureMap::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::FaultInjection::Id, MN::FeatureMap::Id, - ZCL_BITMAP32_ATTRIBUTE_TYPE, reinterpret_cast(&value.value())); - } - break; - } - // type is int16u - case MN::ClusterRevision::Id: { - using T = MN::ClusterRevision::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) - { - sl_log_debug(LOG_TAG, "ClusterRevision attribute value is %s", unify_value.dump().c_str()); - UN::ClusterRevision::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::FaultInjection::Id, MN::ClusterRevision::Id, - ZCL_INT16U_ATTRIBUTE_TYPE, reinterpret_cast(&value.value())); - } - break; - } - } -} diff --git a/silabs_examples/unify-matter-bridge/linux/zap-handlers/gen/attribute_translator.hpp b/silabs_examples/unify-matter-bridge/linux/zap-handlers/gen/attribute_translator.hpp index 129c273783eba4..af87c8dcf7913a 100644 --- a/silabs_examples/unify-matter-bridge/linux/zap-handlers/gen/attribute_translator.hpp +++ b/silabs_examples/unify-matter-bridge/linux/zap-handlers/gen/attribute_translator.hpp @@ -27,7 +27,8 @@ class IdentifyAttributeAccess : public attribute_translator_interface { public: IdentifyAttributeAccess(matter_node_state_monitor & node_state_monitor) : - attribute_translator_interface(node_state_monitor, chip::app::Clusters::Identify::Id) + attribute_translator_interface(node_state_monitor, chip::app::Clusters::Identify::Id, "attr_translator_Identify") + {} CHIP_ERROR Read(const chip::app::ConcreteReadAttributePath & aPath, chip::app::AttributeValueEncoder & aEncoder) override; @@ -43,7 +44,8 @@ class ScenesAttributeAccess : public attribute_translator_interface { public: ScenesAttributeAccess(matter_node_state_monitor & node_state_monitor) : - attribute_translator_interface(node_state_monitor, chip::app::Clusters::Scenes::Id) + attribute_translator_interface(node_state_monitor, chip::app::Clusters::Scenes::Id, "attr_translator_Scenes") + {} CHIP_ERROR Read(const chip::app::ConcreteReadAttributePath & aPath, chip::app::AttributeValueEncoder & aEncoder) override; @@ -59,7 +61,8 @@ class OnOffAttributeAccess : public attribute_translator_interface { public: OnOffAttributeAccess(matter_node_state_monitor & node_state_monitor) : - attribute_translator_interface(node_state_monitor, chip::app::Clusters::OnOff::Id) + attribute_translator_interface(node_state_monitor, chip::app::Clusters::OnOff::Id, "attr_translator_OnOff") + {} CHIP_ERROR Read(const chip::app::ConcreteReadAttributePath & aPath, chip::app::AttributeValueEncoder & aEncoder) override; @@ -75,7 +78,9 @@ class OnOffSwitchConfigurationAttributeAccess : public attribute_translator_inte { public: OnOffSwitchConfigurationAttributeAccess(matter_node_state_monitor & node_state_monitor) : - attribute_translator_interface(node_state_monitor, chip::app::Clusters::OnOffSwitchConfiguration::Id) + attribute_translator_interface(node_state_monitor, chip::app::Clusters::OnOffSwitchConfiguration::Id, + "attr_translator_OnOffSwitchConfiguration") + {} CHIP_ERROR Read(const chip::app::ConcreteReadAttributePath & aPath, chip::app::AttributeValueEncoder & aEncoder) override; @@ -94,7 +99,8 @@ class LevelControlAttributeAccess : public attribute_translator_interface { public: LevelControlAttributeAccess(matter_node_state_monitor & node_state_monitor) : - attribute_translator_interface(node_state_monitor, chip::app::Clusters::LevelControl::Id) + attribute_translator_interface(node_state_monitor, chip::app::Clusters::LevelControl::Id, "attr_translator_LevelControl") + {} CHIP_ERROR Read(const chip::app::ConcreteReadAttributePath & aPath, chip::app::AttributeValueEncoder & aEncoder) override; @@ -110,7 +116,9 @@ class BinaryInputBasicAttributeAccess : public attribute_translator_interface { public: BinaryInputBasicAttributeAccess(matter_node_state_monitor & node_state_monitor) : - attribute_translator_interface(node_state_monitor, chip::app::Clusters::BinaryInputBasic::Id) + attribute_translator_interface(node_state_monitor, chip::app::Clusters::BinaryInputBasic::Id, + "attr_translator_BinaryInputBasic") + {} CHIP_ERROR Read(const chip::app::ConcreteReadAttributePath & aPath, chip::app::AttributeValueEncoder & aEncoder) override; @@ -126,23 +134,9 @@ class PulseWidthModulationAttributeAccess : public attribute_translator_interfac { public: PulseWidthModulationAttributeAccess(matter_node_state_monitor & node_state_monitor) : - attribute_translator_interface(node_state_monitor, chip::app::Clusters::PulseWidthModulation::Id) - {} - - CHIP_ERROR Read(const chip::app::ConcreteReadAttributePath & aPath, chip::app::AttributeValueEncoder & aEncoder) override; - CHIP_ERROR Write(const chip::app::ConcreteDataAttributePath & aPath, chip::app::AttributeValueDecoder & aDecoder) override; + attribute_translator_interface(node_state_monitor, chip::app::Clusters::PulseWidthModulation::Id, + "attr_translator_PulseWidthModulation") -private: - void reported_updated(const bridged_endpoint * ep, const std::string & cluster, const std::string & attribute, - const nlohmann::json & unify_value) override; - - std::vector unify_cluster_names() const override { return std::vector({ "PulseWidthModulation" }); } -}; -class ActionsAttributeAccess : public attribute_translator_interface -{ -public: - ActionsAttributeAccess(matter_node_state_monitor & node_state_monitor) : - attribute_translator_interface(node_state_monitor, chip::app::Clusters::Actions::Id) {} CHIP_ERROR Read(const chip::app::ConcreteReadAttributePath & aPath, chip::app::AttributeValueEncoder & aEncoder) override; @@ -152,13 +146,14 @@ class ActionsAttributeAccess : public attribute_translator_interface void reported_updated(const bridged_endpoint * ep, const std::string & cluster, const std::string & attribute, const nlohmann::json & unify_value) override; - std::vector unify_cluster_names() const override { return std::vector({ "Actions" }); } + std::vector unify_cluster_names() const override { return std::vector({ "PulseWidthModulation" }); } }; class BasicAttributeAccess : public attribute_translator_interface { public: BasicAttributeAccess(matter_node_state_monitor & node_state_monitor) : - attribute_translator_interface(node_state_monitor, chip::app::Clusters::Basic::Id) + attribute_translator_interface(node_state_monitor, chip::app::Clusters::Basic::Id, "attr_translator_Basic") + {} CHIP_ERROR Read(const chip::app::ConcreteReadAttributePath & aPath, chip::app::AttributeValueEncoder & aEncoder) override; @@ -174,7 +169,9 @@ class OtaSoftwareUpdateProviderAttributeAccess : public attribute_translator_int { public: OtaSoftwareUpdateProviderAttributeAccess(matter_node_state_monitor & node_state_monitor) : - attribute_translator_interface(node_state_monitor, chip::app::Clusters::OtaSoftwareUpdateProvider::Id) + attribute_translator_interface(node_state_monitor, chip::app::Clusters::OtaSoftwareUpdateProvider::Id, + "attr_translator_OtaSoftwareUpdateProvider") + {} CHIP_ERROR Read(const chip::app::ConcreteReadAttributePath & aPath, chip::app::AttributeValueEncoder & aEncoder) override; @@ -193,7 +190,9 @@ class OtaSoftwareUpdateRequestorAttributeAccess : public attribute_translator_in { public: OtaSoftwareUpdateRequestorAttributeAccess(matter_node_state_monitor & node_state_monitor) : - attribute_translator_interface(node_state_monitor, chip::app::Clusters::OtaSoftwareUpdateRequestor::Id) + attribute_translator_interface(node_state_monitor, chip::app::Clusters::OtaSoftwareUpdateRequestor::Id, + "attr_translator_OtaSoftwareUpdateRequestor") + {} CHIP_ERROR Read(const chip::app::ConcreteReadAttributePath & aPath, chip::app::AttributeValueEncoder & aEncoder) override; @@ -212,7 +211,9 @@ class LocalizationConfigurationAttributeAccess : public attribute_translator_int { public: LocalizationConfigurationAttributeAccess(matter_node_state_monitor & node_state_monitor) : - attribute_translator_interface(node_state_monitor, chip::app::Clusters::LocalizationConfiguration::Id) + attribute_translator_interface(node_state_monitor, chip::app::Clusters::LocalizationConfiguration::Id, + "attr_translator_LocalizationConfiguration") + {} CHIP_ERROR Read(const chip::app::ConcreteReadAttributePath & aPath, chip::app::AttributeValueEncoder & aEncoder) override; @@ -231,7 +232,9 @@ class TimeFormatLocalizationAttributeAccess : public attribute_translator_interf { public: TimeFormatLocalizationAttributeAccess(matter_node_state_monitor & node_state_monitor) : - attribute_translator_interface(node_state_monitor, chip::app::Clusters::TimeFormatLocalization::Id) + attribute_translator_interface(node_state_monitor, chip::app::Clusters::TimeFormatLocalization::Id, + "attr_translator_TimeFormatLocalization") + {} CHIP_ERROR Read(const chip::app::ConcreteReadAttributePath & aPath, chip::app::AttributeValueEncoder & aEncoder) override; @@ -250,7 +253,9 @@ class UnitLocalizationAttributeAccess : public attribute_translator_interface { public: UnitLocalizationAttributeAccess(matter_node_state_monitor & node_state_monitor) : - attribute_translator_interface(node_state_monitor, chip::app::Clusters::UnitLocalization::Id) + attribute_translator_interface(node_state_monitor, chip::app::Clusters::UnitLocalization::Id, + "attr_translator_UnitLocalization") + {} CHIP_ERROR Read(const chip::app::ConcreteReadAttributePath & aPath, chip::app::AttributeValueEncoder & aEncoder) override; @@ -266,7 +271,9 @@ class PowerSourceConfigurationAttributeAccess : public attribute_translator_inte { public: PowerSourceConfigurationAttributeAccess(matter_node_state_monitor & node_state_monitor) : - attribute_translator_interface(node_state_monitor, chip::app::Clusters::PowerSourceConfiguration::Id) + attribute_translator_interface(node_state_monitor, chip::app::Clusters::PowerSourceConfiguration::Id, + "attr_translator_PowerSourceConfiguration") + {} CHIP_ERROR Read(const chip::app::ConcreteReadAttributePath & aPath, chip::app::AttributeValueEncoder & aEncoder) override; @@ -285,7 +292,8 @@ class PowerSourceAttributeAccess : public attribute_translator_interface { public: PowerSourceAttributeAccess(matter_node_state_monitor & node_state_monitor) : - attribute_translator_interface(node_state_monitor, chip::app::Clusters::PowerSource::Id) + attribute_translator_interface(node_state_monitor, chip::app::Clusters::PowerSource::Id, "attr_translator_PowerSource") + {} CHIP_ERROR Read(const chip::app::ConcreteReadAttributePath & aPath, chip::app::AttributeValueEncoder & aEncoder) override; @@ -301,7 +309,9 @@ class GeneralCommissioningAttributeAccess : public attribute_translator_interfac { public: GeneralCommissioningAttributeAccess(matter_node_state_monitor & node_state_monitor) : - attribute_translator_interface(node_state_monitor, chip::app::Clusters::GeneralCommissioning::Id) + attribute_translator_interface(node_state_monitor, chip::app::Clusters::GeneralCommissioning::Id, + "attr_translator_GeneralCommissioning") + {} CHIP_ERROR Read(const chip::app::ConcreteReadAttributePath & aPath, chip::app::AttributeValueEncoder & aEncoder) override; @@ -317,7 +327,9 @@ class DiagnosticLogsAttributeAccess : public attribute_translator_interface { public: DiagnosticLogsAttributeAccess(matter_node_state_monitor & node_state_monitor) : - attribute_translator_interface(node_state_monitor, chip::app::Clusters::DiagnosticLogs::Id) + attribute_translator_interface(node_state_monitor, chip::app::Clusters::DiagnosticLogs::Id, + "attr_translator_DiagnosticLogs") + {} CHIP_ERROR Read(const chip::app::ConcreteReadAttributePath & aPath, chip::app::AttributeValueEncoder & aEncoder) override; @@ -333,7 +345,9 @@ class GeneralDiagnosticsAttributeAccess : public attribute_translator_interface { public: GeneralDiagnosticsAttributeAccess(matter_node_state_monitor & node_state_monitor) : - attribute_translator_interface(node_state_monitor, chip::app::Clusters::GeneralDiagnostics::Id) + attribute_translator_interface(node_state_monitor, chip::app::Clusters::GeneralDiagnostics::Id, + "attr_translator_GeneralDiagnostics") + {} CHIP_ERROR Read(const chip::app::ConcreteReadAttributePath & aPath, chip::app::AttributeValueEncoder & aEncoder) override; @@ -349,7 +363,9 @@ class SoftwareDiagnosticsAttributeAccess : public attribute_translator_interface { public: SoftwareDiagnosticsAttributeAccess(matter_node_state_monitor & node_state_monitor) : - attribute_translator_interface(node_state_monitor, chip::app::Clusters::SoftwareDiagnostics::Id) + attribute_translator_interface(node_state_monitor, chip::app::Clusters::SoftwareDiagnostics::Id, + "attr_translator_SoftwareDiagnostics") + {} CHIP_ERROR Read(const chip::app::ConcreteReadAttributePath & aPath, chip::app::AttributeValueEncoder & aEncoder) override; @@ -365,7 +381,9 @@ class ThreadNetworkDiagnosticsAttributeAccess : public attribute_translator_inte { public: ThreadNetworkDiagnosticsAttributeAccess(matter_node_state_monitor & node_state_monitor) : - attribute_translator_interface(node_state_monitor, chip::app::Clusters::ThreadNetworkDiagnostics::Id) + attribute_translator_interface(node_state_monitor, chip::app::Clusters::ThreadNetworkDiagnostics::Id, + "attr_translator_ThreadNetworkDiagnostics") + {} CHIP_ERROR Read(const chip::app::ConcreteReadAttributePath & aPath, chip::app::AttributeValueEncoder & aEncoder) override; @@ -384,26 +402,9 @@ class WiFiNetworkDiagnosticsAttributeAccess : public attribute_translator_interf { public: WiFiNetworkDiagnosticsAttributeAccess(matter_node_state_monitor & node_state_monitor) : - attribute_translator_interface(node_state_monitor, chip::app::Clusters::WiFiNetworkDiagnostics::Id) - {} - - CHIP_ERROR Read(const chip::app::ConcreteReadAttributePath & aPath, chip::app::AttributeValueEncoder & aEncoder) override; - CHIP_ERROR Write(const chip::app::ConcreteDataAttributePath & aPath, chip::app::AttributeValueDecoder & aDecoder) override; - -private: - void reported_updated(const bridged_endpoint * ep, const std::string & cluster, const std::string & attribute, - const nlohmann::json & unify_value) override; + attribute_translator_interface(node_state_monitor, chip::app::Clusters::WiFiNetworkDiagnostics::Id, + "attr_translator_WiFiNetworkDiagnostics") - std::vector unify_cluster_names() const override - { - return std::vector({ "WiFiNetworkDiagnostics" }); - } -}; -class EthernetNetworkDiagnosticsAttributeAccess : public attribute_translator_interface -{ -public: - EthernetNetworkDiagnosticsAttributeAccess(matter_node_state_monitor & node_state_monitor) : - attribute_translator_interface(node_state_monitor, chip::app::Clusters::EthernetNetworkDiagnostics::Id) {} CHIP_ERROR Read(const chip::app::ConcreteReadAttributePath & aPath, chip::app::AttributeValueEncoder & aEncoder) override; @@ -415,30 +416,16 @@ class EthernetNetworkDiagnosticsAttributeAccess : public attribute_translator_in std::vector unify_cluster_names() const override { - return std::vector({ "EthernetNetworkDiagnostics" }); + return std::vector({ "WiFiNetworkDiagnostics" }); } }; class TimeSynchronizationAttributeAccess : public attribute_translator_interface { public: TimeSynchronizationAttributeAccess(matter_node_state_monitor & node_state_monitor) : - attribute_translator_interface(node_state_monitor, chip::app::Clusters::TimeSynchronization::Id) - {} + attribute_translator_interface(node_state_monitor, chip::app::Clusters::TimeSynchronization::Id, + "attr_translator_TimeSynchronization") - CHIP_ERROR Read(const chip::app::ConcreteReadAttributePath & aPath, chip::app::AttributeValueEncoder & aEncoder) override; - CHIP_ERROR Write(const chip::app::ConcreteDataAttributePath & aPath, chip::app::AttributeValueDecoder & aDecoder) override; - -private: - void reported_updated(const bridged_endpoint * ep, const std::string & cluster, const std::string & attribute, - const nlohmann::json & unify_value) override; - - std::vector unify_cluster_names() const override { return std::vector({ "TimeSynchronization" }); } -}; -class BridgedDeviceBasicAttributeAccess : public attribute_translator_interface -{ -public: - BridgedDeviceBasicAttributeAccess(matter_node_state_monitor & node_state_monitor) : - attribute_translator_interface(node_state_monitor, chip::app::Clusters::BridgedDeviceBasic::Id) {} CHIP_ERROR Read(const chip::app::ConcreteReadAttributePath & aPath, chip::app::AttributeValueEncoder & aEncoder) override; @@ -448,29 +435,14 @@ class BridgedDeviceBasicAttributeAccess : public attribute_translator_interface void reported_updated(const bridged_endpoint * ep, const std::string & cluster, const std::string & attribute, const nlohmann::json & unify_value) override; - std::vector unify_cluster_names() const override { return std::vector({ "BridgedDeviceBasic" }); } + std::vector unify_cluster_names() const override { return std::vector({ "TimeSynchronization" }); } }; class SwitchAttributeAccess : public attribute_translator_interface { public: SwitchAttributeAccess(matter_node_state_monitor & node_state_monitor) : - attribute_translator_interface(node_state_monitor, chip::app::Clusters::Switch::Id) - {} + attribute_translator_interface(node_state_monitor, chip::app::Clusters::Switch::Id, "attr_translator_Switch") - CHIP_ERROR Read(const chip::app::ConcreteReadAttributePath & aPath, chip::app::AttributeValueEncoder & aEncoder) override; - CHIP_ERROR Write(const chip::app::ConcreteDataAttributePath & aPath, chip::app::AttributeValueDecoder & aDecoder) override; - -private: - void reported_updated(const bridged_endpoint * ep, const std::string & cluster, const std::string & attribute, - const nlohmann::json & unify_value) override; - - std::vector unify_cluster_names() const override { return std::vector({ "Switch" }); } -}; -class AdministratorCommissioningAttributeAccess : public attribute_translator_interface -{ -public: - AdministratorCommissioningAttributeAccess(matter_node_state_monitor & node_state_monitor) : - attribute_translator_interface(node_state_monitor, chip::app::Clusters::AdministratorCommissioning::Id) {} CHIP_ERROR Read(const chip::app::ConcreteReadAttributePath & aPath, chip::app::AttributeValueEncoder & aEncoder) override; @@ -480,16 +452,15 @@ class AdministratorCommissioningAttributeAccess : public attribute_translator_in void reported_updated(const bridged_endpoint * ep, const std::string & cluster, const std::string & attribute, const nlohmann::json & unify_value) override; - std::vector unify_cluster_names() const override - { - return std::vector({ "AdministratorCommissioning" }); - } + std::vector unify_cluster_names() const override { return std::vector({ "Switch" }); } }; class OperationalCredentialsAttributeAccess : public attribute_translator_interface { public: OperationalCredentialsAttributeAccess(matter_node_state_monitor & node_state_monitor) : - attribute_translator_interface(node_state_monitor, chip::app::Clusters::OperationalCredentials::Id) + attribute_translator_interface(node_state_monitor, chip::app::Clusters::OperationalCredentials::Id, + "attr_translator_OperationalCredentials") + {} CHIP_ERROR Read(const chip::app::ConcreteReadAttributePath & aPath, chip::app::AttributeValueEncoder & aEncoder) override; @@ -508,7 +479,9 @@ class GroupKeyManagementAttributeAccess : public attribute_translator_interface { public: GroupKeyManagementAttributeAccess(matter_node_state_monitor & node_state_monitor) : - attribute_translator_interface(node_state_monitor, chip::app::Clusters::GroupKeyManagement::Id) + attribute_translator_interface(node_state_monitor, chip::app::Clusters::GroupKeyManagement::Id, + "attr_translator_GroupKeyManagement") + {} CHIP_ERROR Read(const chip::app::ConcreteReadAttributePath & aPath, chip::app::AttributeValueEncoder & aEncoder) override; @@ -524,7 +497,8 @@ class FixedLabelAttributeAccess : public attribute_translator_interface { public: FixedLabelAttributeAccess(matter_node_state_monitor & node_state_monitor) : - attribute_translator_interface(node_state_monitor, chip::app::Clusters::FixedLabel::Id) + attribute_translator_interface(node_state_monitor, chip::app::Clusters::FixedLabel::Id, "attr_translator_FixedLabel") + {} CHIP_ERROR Read(const chip::app::ConcreteReadAttributePath & aPath, chip::app::AttributeValueEncoder & aEncoder) override; @@ -540,7 +514,8 @@ class UserLabelAttributeAccess : public attribute_translator_interface { public: UserLabelAttributeAccess(matter_node_state_monitor & node_state_monitor) : - attribute_translator_interface(node_state_monitor, chip::app::Clusters::UserLabel::Id) + attribute_translator_interface(node_state_monitor, chip::app::Clusters::UserLabel::Id, "attr_translator_UserLabel") + {} CHIP_ERROR Read(const chip::app::ConcreteReadAttributePath & aPath, chip::app::AttributeValueEncoder & aEncoder) override; @@ -556,7 +531,9 @@ class ProxyConfigurationAttributeAccess : public attribute_translator_interface { public: ProxyConfigurationAttributeAccess(matter_node_state_monitor & node_state_monitor) : - attribute_translator_interface(node_state_monitor, chip::app::Clusters::ProxyConfiguration::Id) + attribute_translator_interface(node_state_monitor, chip::app::Clusters::ProxyConfiguration::Id, + "attr_translator_ProxyConfiguration") + {} CHIP_ERROR Read(const chip::app::ConcreteReadAttributePath & aPath, chip::app::AttributeValueEncoder & aEncoder) override; @@ -572,7 +549,9 @@ class ProxyDiscoveryAttributeAccess : public attribute_translator_interface { public: ProxyDiscoveryAttributeAccess(matter_node_state_monitor & node_state_monitor) : - attribute_translator_interface(node_state_monitor, chip::app::Clusters::ProxyDiscovery::Id) + attribute_translator_interface(node_state_monitor, chip::app::Clusters::ProxyDiscovery::Id, + "attr_translator_ProxyDiscovery") + {} CHIP_ERROR Read(const chip::app::ConcreteReadAttributePath & aPath, chip::app::AttributeValueEncoder & aEncoder) override; @@ -588,7 +567,8 @@ class ProxyValidAttributeAccess : public attribute_translator_interface { public: ProxyValidAttributeAccess(matter_node_state_monitor & node_state_monitor) : - attribute_translator_interface(node_state_monitor, chip::app::Clusters::ProxyValid::Id) + attribute_translator_interface(node_state_monitor, chip::app::Clusters::ProxyValid::Id, "attr_translator_ProxyValid") + {} CHIP_ERROR Read(const chip::app::ConcreteReadAttributePath & aPath, chip::app::AttributeValueEncoder & aEncoder) override; @@ -604,7 +584,8 @@ class BooleanStateAttributeAccess : public attribute_translator_interface { public: BooleanStateAttributeAccess(matter_node_state_monitor & node_state_monitor) : - attribute_translator_interface(node_state_monitor, chip::app::Clusters::BooleanState::Id) + attribute_translator_interface(node_state_monitor, chip::app::Clusters::BooleanState::Id, "attr_translator_BooleanState") + {} CHIP_ERROR Read(const chip::app::ConcreteReadAttributePath & aPath, chip::app::AttributeValueEncoder & aEncoder) override; @@ -620,7 +601,8 @@ class ModeSelectAttributeAccess : public attribute_translator_interface { public: ModeSelectAttributeAccess(matter_node_state_monitor & node_state_monitor) : - attribute_translator_interface(node_state_monitor, chip::app::Clusters::ModeSelect::Id) + attribute_translator_interface(node_state_monitor, chip::app::Clusters::ModeSelect::Id, "attr_translator_ModeSelect") + {} CHIP_ERROR Read(const chip::app::ConcreteReadAttributePath & aPath, chip::app::AttributeValueEncoder & aEncoder) override; @@ -636,7 +618,8 @@ class DoorLockAttributeAccess : public attribute_translator_interface { public: DoorLockAttributeAccess(matter_node_state_monitor & node_state_monitor) : - attribute_translator_interface(node_state_monitor, chip::app::Clusters::DoorLock::Id) + attribute_translator_interface(node_state_monitor, chip::app::Clusters::DoorLock::Id, "attr_translator_DoorLock") + {} CHIP_ERROR Read(const chip::app::ConcreteReadAttributePath & aPath, chip::app::AttributeValueEncoder & aEncoder) override; @@ -652,7 +635,9 @@ class WindowCoveringAttributeAccess : public attribute_translator_interface { public: WindowCoveringAttributeAccess(matter_node_state_monitor & node_state_monitor) : - attribute_translator_interface(node_state_monitor, chip::app::Clusters::WindowCovering::Id) + attribute_translator_interface(node_state_monitor, chip::app::Clusters::WindowCovering::Id, + "attr_translator_WindowCovering") + {} CHIP_ERROR Read(const chip::app::ConcreteReadAttributePath & aPath, chip::app::AttributeValueEncoder & aEncoder) override; @@ -668,23 +653,9 @@ class BarrierControlAttributeAccess : public attribute_translator_interface { public: BarrierControlAttributeAccess(matter_node_state_monitor & node_state_monitor) : - attribute_translator_interface(node_state_monitor, chip::app::Clusters::BarrierControl::Id) - {} - - CHIP_ERROR Read(const chip::app::ConcreteReadAttributePath & aPath, chip::app::AttributeValueEncoder & aEncoder) override; - CHIP_ERROR Write(const chip::app::ConcreteDataAttributePath & aPath, chip::app::AttributeValueDecoder & aDecoder) override; - -private: - void reported_updated(const bridged_endpoint * ep, const std::string & cluster, const std::string & attribute, - const nlohmann::json & unify_value) override; + attribute_translator_interface(node_state_monitor, chip::app::Clusters::BarrierControl::Id, + "attr_translator_BarrierControl") - std::vector unify_cluster_names() const override { return std::vector({ "BarrierControl" }); } -}; -class PumpConfigurationAndControlAttributeAccess : public attribute_translator_interface -{ -public: - PumpConfigurationAndControlAttributeAccess(matter_node_state_monitor & node_state_monitor) : - attribute_translator_interface(node_state_monitor, chip::app::Clusters::PumpConfigurationAndControl::Id) {} CHIP_ERROR Read(const chip::app::ConcreteReadAttributePath & aPath, chip::app::AttributeValueEncoder & aEncoder) override; @@ -694,16 +665,14 @@ class PumpConfigurationAndControlAttributeAccess : public attribute_translator_i void reported_updated(const bridged_endpoint * ep, const std::string & cluster, const std::string & attribute, const nlohmann::json & unify_value) override; - std::vector unify_cluster_names() const override - { - return std::vector({ "PumpConfigurationAndControl" }); - } + std::vector unify_cluster_names() const override { return std::vector({ "BarrierControl" }); } }; class ThermostatAttributeAccess : public attribute_translator_interface { public: ThermostatAttributeAccess(matter_node_state_monitor & node_state_monitor) : - attribute_translator_interface(node_state_monitor, chip::app::Clusters::Thermostat::Id) + attribute_translator_interface(node_state_monitor, chip::app::Clusters::Thermostat::Id, "attr_translator_Thermostat") + {} CHIP_ERROR Read(const chip::app::ConcreteReadAttributePath & aPath, chip::app::AttributeValueEncoder & aEncoder) override; @@ -719,7 +688,8 @@ class FanControlAttributeAccess : public attribute_translator_interface { public: FanControlAttributeAccess(matter_node_state_monitor & node_state_monitor) : - attribute_translator_interface(node_state_monitor, chip::app::Clusters::FanControl::Id) + attribute_translator_interface(node_state_monitor, chip::app::Clusters::FanControl::Id, "attr_translator_FanControl") + {} CHIP_ERROR Read(const chip::app::ConcreteReadAttributePath & aPath, chip::app::AttributeValueEncoder & aEncoder) override; @@ -735,7 +705,9 @@ class ThermostatUserInterfaceConfigurationAttributeAccess : public attribute_tra { public: ThermostatUserInterfaceConfigurationAttributeAccess(matter_node_state_monitor & node_state_monitor) : - attribute_translator_interface(node_state_monitor, chip::app::Clusters::ThermostatUserInterfaceConfiguration::Id) + attribute_translator_interface(node_state_monitor, chip::app::Clusters::ThermostatUserInterfaceConfiguration::Id, + "attr_translator_ThermostatUserInterfaceConfiguration") + {} CHIP_ERROR Read(const chip::app::ConcreteReadAttributePath & aPath, chip::app::AttributeValueEncoder & aEncoder) override; @@ -754,23 +726,8 @@ class ColorControlAttributeAccess : public attribute_translator_interface { public: ColorControlAttributeAccess(matter_node_state_monitor & node_state_monitor) : - attribute_translator_interface(node_state_monitor, chip::app::Clusters::ColorControl::Id) - {} + attribute_translator_interface(node_state_monitor, chip::app::Clusters::ColorControl::Id, "attr_translator_ColorControl") - CHIP_ERROR Read(const chip::app::ConcreteReadAttributePath & aPath, chip::app::AttributeValueEncoder & aEncoder) override; - CHIP_ERROR Write(const chip::app::ConcreteDataAttributePath & aPath, chip::app::AttributeValueDecoder & aDecoder) override; - -private: - void reported_updated(const bridged_endpoint * ep, const std::string & cluster, const std::string & attribute, - const nlohmann::json & unify_value) override; - - std::vector unify_cluster_names() const override { return std::vector({ "ColorControl" }); } -}; -class BallastConfigurationAttributeAccess : public attribute_translator_interface -{ -public: - BallastConfigurationAttributeAccess(matter_node_state_monitor & node_state_monitor) : - attribute_translator_interface(node_state_monitor, chip::app::Clusters::BallastConfiguration::Id) {} CHIP_ERROR Read(const chip::app::ConcreteReadAttributePath & aPath, chip::app::AttributeValueEncoder & aEncoder) override; @@ -780,13 +737,15 @@ class BallastConfigurationAttributeAccess : public attribute_translator_interfac void reported_updated(const bridged_endpoint * ep, const std::string & cluster, const std::string & attribute, const nlohmann::json & unify_value) override; - std::vector unify_cluster_names() const override { return std::vector({ "BallastConfiguration" }); } + std::vector unify_cluster_names() const override { return std::vector({ "ColorControl" }); } }; class IlluminanceMeasurementAttributeAccess : public attribute_translator_interface { public: IlluminanceMeasurementAttributeAccess(matter_node_state_monitor & node_state_monitor) : - attribute_translator_interface(node_state_monitor, chip::app::Clusters::IlluminanceMeasurement::Id) + attribute_translator_interface(node_state_monitor, chip::app::Clusters::IlluminanceMeasurement::Id, + "attr_translator_IlluminanceMeasurement") + {} CHIP_ERROR Read(const chip::app::ConcreteReadAttributePath & aPath, chip::app::AttributeValueEncoder & aEncoder) override; @@ -805,7 +764,9 @@ class TemperatureMeasurementAttributeAccess : public attribute_translator_interf { public: TemperatureMeasurementAttributeAccess(matter_node_state_monitor & node_state_monitor) : - attribute_translator_interface(node_state_monitor, chip::app::Clusters::TemperatureMeasurement::Id) + attribute_translator_interface(node_state_monitor, chip::app::Clusters::TemperatureMeasurement::Id, + "attr_translator_TemperatureMeasurement") + {} CHIP_ERROR Read(const chip::app::ConcreteReadAttributePath & aPath, chip::app::AttributeValueEncoder & aEncoder) override; @@ -824,7 +785,9 @@ class PressureMeasurementAttributeAccess : public attribute_translator_interface { public: PressureMeasurementAttributeAccess(matter_node_state_monitor & node_state_monitor) : - attribute_translator_interface(node_state_monitor, chip::app::Clusters::PressureMeasurement::Id) + attribute_translator_interface(node_state_monitor, chip::app::Clusters::PressureMeasurement::Id, + "attr_translator_PressureMeasurement") + {} CHIP_ERROR Read(const chip::app::ConcreteReadAttributePath & aPath, chip::app::AttributeValueEncoder & aEncoder) override; @@ -840,7 +803,9 @@ class FlowMeasurementAttributeAccess : public attribute_translator_interface { public: FlowMeasurementAttributeAccess(matter_node_state_monitor & node_state_monitor) : - attribute_translator_interface(node_state_monitor, chip::app::Clusters::FlowMeasurement::Id) + attribute_translator_interface(node_state_monitor, chip::app::Clusters::FlowMeasurement::Id, + "attr_translator_FlowMeasurement") + {} CHIP_ERROR Read(const chip::app::ConcreteReadAttributePath & aPath, chip::app::AttributeValueEncoder & aEncoder) override; @@ -856,7 +821,9 @@ class RelativeHumidityMeasurementAttributeAccess : public attribute_translator_i { public: RelativeHumidityMeasurementAttributeAccess(matter_node_state_monitor & node_state_monitor) : - attribute_translator_interface(node_state_monitor, chip::app::Clusters::RelativeHumidityMeasurement::Id) + attribute_translator_interface(node_state_monitor, chip::app::Clusters::RelativeHumidityMeasurement::Id, + "attr_translator_RelativeHumidityMeasurement") + {} CHIP_ERROR Read(const chip::app::ConcreteReadAttributePath & aPath, chip::app::AttributeValueEncoder & aEncoder) override; @@ -875,7 +842,9 @@ class OccupancySensingAttributeAccess : public attribute_translator_interface { public: OccupancySensingAttributeAccess(matter_node_state_monitor & node_state_monitor) : - attribute_translator_interface(node_state_monitor, chip::app::Clusters::OccupancySensing::Id) + attribute_translator_interface(node_state_monitor, chip::app::Clusters::OccupancySensing::Id, + "attr_translator_OccupancySensing") + {} CHIP_ERROR Read(const chip::app::ConcreteReadAttributePath & aPath, chip::app::AttributeValueEncoder & aEncoder) override; @@ -891,7 +860,8 @@ class WakeOnLanAttributeAccess : public attribute_translator_interface { public: WakeOnLanAttributeAccess(matter_node_state_monitor & node_state_monitor) : - attribute_translator_interface(node_state_monitor, chip::app::Clusters::WakeOnLan::Id) + attribute_translator_interface(node_state_monitor, chip::app::Clusters::WakeOnLan::Id, "attr_translator_WakeOnLan") + {} CHIP_ERROR Read(const chip::app::ConcreteReadAttributePath & aPath, chip::app::AttributeValueEncoder & aEncoder) override; @@ -907,7 +877,8 @@ class ChannelAttributeAccess : public attribute_translator_interface { public: ChannelAttributeAccess(matter_node_state_monitor & node_state_monitor) : - attribute_translator_interface(node_state_monitor, chip::app::Clusters::Channel::Id) + attribute_translator_interface(node_state_monitor, chip::app::Clusters::Channel::Id, "attr_translator_Channel") + {} CHIP_ERROR Read(const chip::app::ConcreteReadAttributePath & aPath, chip::app::AttributeValueEncoder & aEncoder) override; @@ -923,7 +894,9 @@ class TargetNavigatorAttributeAccess : public attribute_translator_interface { public: TargetNavigatorAttributeAccess(matter_node_state_monitor & node_state_monitor) : - attribute_translator_interface(node_state_monitor, chip::app::Clusters::TargetNavigator::Id) + attribute_translator_interface(node_state_monitor, chip::app::Clusters::TargetNavigator::Id, + "attr_translator_TargetNavigator") + {} CHIP_ERROR Read(const chip::app::ConcreteReadAttributePath & aPath, chip::app::AttributeValueEncoder & aEncoder) override; @@ -939,7 +912,8 @@ class MediaPlaybackAttributeAccess : public attribute_translator_interface { public: MediaPlaybackAttributeAccess(matter_node_state_monitor & node_state_monitor) : - attribute_translator_interface(node_state_monitor, chip::app::Clusters::MediaPlayback::Id) + attribute_translator_interface(node_state_monitor, chip::app::Clusters::MediaPlayback::Id, "attr_translator_MediaPlayback") + {} CHIP_ERROR Read(const chip::app::ConcreteReadAttributePath & aPath, chip::app::AttributeValueEncoder & aEncoder) override; @@ -955,7 +929,8 @@ class MediaInputAttributeAccess : public attribute_translator_interface { public: MediaInputAttributeAccess(matter_node_state_monitor & node_state_monitor) : - attribute_translator_interface(node_state_monitor, chip::app::Clusters::MediaInput::Id) + attribute_translator_interface(node_state_monitor, chip::app::Clusters::MediaInput::Id, "attr_translator_MediaInput") + {} CHIP_ERROR Read(const chip::app::ConcreteReadAttributePath & aPath, chip::app::AttributeValueEncoder & aEncoder) override; @@ -971,7 +946,8 @@ class LowPowerAttributeAccess : public attribute_translator_interface { public: LowPowerAttributeAccess(matter_node_state_monitor & node_state_monitor) : - attribute_translator_interface(node_state_monitor, chip::app::Clusters::LowPower::Id) + attribute_translator_interface(node_state_monitor, chip::app::Clusters::LowPower::Id, "attr_translator_LowPower") + {} CHIP_ERROR Read(const chip::app::ConcreteReadAttributePath & aPath, chip::app::AttributeValueEncoder & aEncoder) override; @@ -987,7 +963,8 @@ class KeypadInputAttributeAccess : public attribute_translator_interface { public: KeypadInputAttributeAccess(matter_node_state_monitor & node_state_monitor) : - attribute_translator_interface(node_state_monitor, chip::app::Clusters::KeypadInput::Id) + attribute_translator_interface(node_state_monitor, chip::app::Clusters::KeypadInput::Id, "attr_translator_KeypadInput") + {} CHIP_ERROR Read(const chip::app::ConcreteReadAttributePath & aPath, chip::app::AttributeValueEncoder & aEncoder) override; @@ -1003,7 +980,9 @@ class ContentLauncherAttributeAccess : public attribute_translator_interface { public: ContentLauncherAttributeAccess(matter_node_state_monitor & node_state_monitor) : - attribute_translator_interface(node_state_monitor, chip::app::Clusters::ContentLauncher::Id) + attribute_translator_interface(node_state_monitor, chip::app::Clusters::ContentLauncher::Id, + "attr_translator_ContentLauncher") + {} CHIP_ERROR Read(const chip::app::ConcreteReadAttributePath & aPath, chip::app::AttributeValueEncoder & aEncoder) override; @@ -1019,7 +998,8 @@ class AudioOutputAttributeAccess : public attribute_translator_interface { public: AudioOutputAttributeAccess(matter_node_state_monitor & node_state_monitor) : - attribute_translator_interface(node_state_monitor, chip::app::Clusters::AudioOutput::Id) + attribute_translator_interface(node_state_monitor, chip::app::Clusters::AudioOutput::Id, "attr_translator_AudioOutput") + {} CHIP_ERROR Read(const chip::app::ConcreteReadAttributePath & aPath, chip::app::AttributeValueEncoder & aEncoder) override; @@ -1035,7 +1015,9 @@ class ApplicationLauncherAttributeAccess : public attribute_translator_interface { public: ApplicationLauncherAttributeAccess(matter_node_state_monitor & node_state_monitor) : - attribute_translator_interface(node_state_monitor, chip::app::Clusters::ApplicationLauncher::Id) + attribute_translator_interface(node_state_monitor, chip::app::Clusters::ApplicationLauncher::Id, + "attr_translator_ApplicationLauncher") + {} CHIP_ERROR Read(const chip::app::ConcreteReadAttributePath & aPath, chip::app::AttributeValueEncoder & aEncoder) override; @@ -1051,7 +1033,9 @@ class ApplicationBasicAttributeAccess : public attribute_translator_interface { public: ApplicationBasicAttributeAccess(matter_node_state_monitor & node_state_monitor) : - attribute_translator_interface(node_state_monitor, chip::app::Clusters::ApplicationBasic::Id) + attribute_translator_interface(node_state_monitor, chip::app::Clusters::ApplicationBasic::Id, + "attr_translator_ApplicationBasic") + {} CHIP_ERROR Read(const chip::app::ConcreteReadAttributePath & aPath, chip::app::AttributeValueEncoder & aEncoder) override; @@ -1067,7 +1051,8 @@ class AccountLoginAttributeAccess : public attribute_translator_interface { public: AccountLoginAttributeAccess(matter_node_state_monitor & node_state_monitor) : - attribute_translator_interface(node_state_monitor, chip::app::Clusters::AccountLogin::Id) + attribute_translator_interface(node_state_monitor, chip::app::Clusters::AccountLogin::Id, "attr_translator_AccountLogin") + {} CHIP_ERROR Read(const chip::app::ConcreteReadAttributePath & aPath, chip::app::AttributeValueEncoder & aEncoder) override; @@ -1083,7 +1068,9 @@ class ElectricalMeasurementAttributeAccess : public attribute_translator_interfa { public: ElectricalMeasurementAttributeAccess(matter_node_state_monitor & node_state_monitor) : - attribute_translator_interface(node_state_monitor, chip::app::Clusters::ElectricalMeasurement::Id) + attribute_translator_interface(node_state_monitor, chip::app::Clusters::ElectricalMeasurement::Id, + "attr_translator_ElectricalMeasurement") + {} CHIP_ERROR Read(const chip::app::ConcreteReadAttributePath & aPath, chip::app::AttributeValueEncoder & aEncoder) override; @@ -1098,20 +1085,4 @@ class ElectricalMeasurementAttributeAccess : public attribute_translator_interfa return std::vector({ "ElectricalMeasurement" }); } }; -class FaultInjectionAttributeAccess : public attribute_translator_interface -{ -public: - FaultInjectionAttributeAccess(matter_node_state_monitor & node_state_monitor) : - attribute_translator_interface(node_state_monitor, chip::app::Clusters::FaultInjection::Id) - {} - - CHIP_ERROR Read(const chip::app::ConcreteReadAttributePath & aPath, chip::app::AttributeValueEncoder & aEncoder) override; - CHIP_ERROR Write(const chip::app::ConcreteDataAttributePath & aPath, chip::app::AttributeValueDecoder & aDecoder) override; - -private: - void reported_updated(const bridged_endpoint * ep, const std::string & cluster, const std::string & attribute, - const nlohmann::json & unify_value) override; - - std::vector unify_cluster_names() const override { return std::vector({ "FaultInjection" }); } -}; } // namespace unify::matter_bridge \ No newline at end of file diff --git a/silabs_examples/unify-matter-bridge/linux/zap-handlers/gen/attribute_type_size.cpp b/silabs_examples/unify-matter-bridge/linux/zap-handlers/gen/attribute_type_size.cpp new file mode 100644 index 00000000000000..9657b575f153d3 --- /dev/null +++ b/silabs_examples/unify-matter-bridge/linux/zap-handlers/gen/attribute_type_size.cpp @@ -0,0 +1,3698 @@ +/****************************************************************************** + * # License + * Copyright 2022 Silicon Laboratories Inc. www.silabs.com + ****************************************************************************** + * The licensor of this software is Silicon Laboratories Inc. Your use of this + * software is governed by the terms of Silicon Labs Master Software License + * Agreement (MSLA) available at + * www.silabs.com/about-us/legal/master-software-license-agreement. This + * software is distributed to you in Source Code format and is governed by the + * sections of the MSLA applicable to Source Code. + * + *****************************************************************************/ + +#include "attribute_type_size.hpp" +#include "matter.h" + +using namespace chip; +using namespace chip::app; +using namespace chip::app::Clusters; + +// ZCL attribute types +constexpr uint8_t ZCL_NO_DATA_ATTRIBUTE_TYPES = 0x00; +constexpr uint8_t ZCL_BOOLEAN_ATTRIBUTE_TYPES = 0x10; +constexpr uint8_t ZCL_BITMAP8_ATTRIBUTE_TYPES = 0x18; +constexpr uint8_t ZCL_BITMAP16_ATTRIBUTE_TYPES = 0x19; +constexpr uint8_t ZCL_BITMAP24_ATTRIBUTE_TYPES = 0x1A; +constexpr uint8_t ZCL_BITMAP32_ATTRIBUTE_TYPES = 0x1B; +constexpr uint8_t ZCL_BITMAP64_ATTRIBUTE_TYPES = 0x1F; +constexpr uint8_t ZCL_INT8U_ATTRIBUTE_TYPES = 0x20; +constexpr uint8_t ZCL_INT16U_ATTRIBUTE_TYPES = 0x21; +constexpr uint8_t ZCL_INT24U_ATTRIBUTE_TYPES = 0x22; +constexpr uint8_t ZCL_INT32U_ATTRIBUTE_TYPES = 0x23; +constexpr uint8_t ZCL_INT40U_ATTRIBUTE_TYPES = 0x24; +constexpr uint8_t ZCL_INT48U_ATTRIBUTE_TYPES = 0x25; +constexpr uint8_t ZCL_INT56U_ATTRIBUTE_TYPES = 0x26; +constexpr uint8_t ZCL_INT64U_ATTRIBUTE_TYPES = 0x27; +constexpr uint8_t ZCL_INT8S_ATTRIBUTE_TYPES = 0x28; +constexpr uint8_t ZCL_INT16S_ATTRIBUTE_TYPES = 0x29; +constexpr uint8_t ZCL_INT24S_ATTRIBUTE_TYPES = 0x2A; +constexpr uint8_t ZCL_INT32S_ATTRIBUTE_TYPES = 0x2B; +constexpr uint8_t ZCL_INT40S_ATTRIBUTE_TYPES = 0x2C; +constexpr uint8_t ZCL_INT48S_ATTRIBUTE_TYPES = 0x2D; +constexpr uint8_t ZCL_INT56S_ATTRIBUTE_TYPES = 0x2E; +constexpr uint8_t ZCL_INT64S_ATTRIBUTE_TYPES = 0x2F; +constexpr uint8_t ZCL_ENUM8_ATTRIBUTE_TYPES = 0x30; +constexpr uint8_t ZCL_ENUM16_ATTRIBUTE_TYPES = 0x31; +constexpr uint8_t ZCL_SINGLE_ATTRIBUTE_TYPES = 0x39; +constexpr uint8_t ZCL_DOUBLE_ATTRIBUTE_TYPES = 0x3A; +constexpr uint8_t ZCL_OCTET_STRING_ATTRIBUTE_TYPES = 0x41; +constexpr uint8_t ZCL_CHAR_STRING_ATTRIBUTE_TYPES = 0x42; +constexpr uint8_t ZCL_LONG_OCTET_STRING_ATTRIBUTE_TYPES = 0x43; +constexpr uint8_t ZCL_LONG_CHAR_STRING_ATTRIBUTE_TYPES = 0x44; +constexpr uint8_t ZCL_ARRAY_ATTRIBUTE_TYPES = 0x48; +constexpr uint8_t ZCL_STRUCT_ATTRIBUTE_TYPES = 0x4C; +constexpr uint8_t ZCL_TOD_ATTRIBUTE_TYPES = 0xE0; +constexpr uint8_t ZCL_DATE_ATTRIBUTE_TYPES = 0xE1; +constexpr uint8_t ZCL_UTC_ATTRIBUTE_TYPES = 0xE2; +constexpr uint8_t ZCL_EPOCH_US_ATTRIBUTE_TYPES = 0xE3; +constexpr uint8_t ZCL_EPOCH_S_ATTRIBUTE_TYPES = 0xE4; +constexpr uint8_t ZCL_SYSTIME_US_ATTRIBUTE_TYPES = 0xE5; +constexpr uint8_t ZCL_PERCENT_ATTRIBUTE_TYPES = 0xE6; +constexpr uint8_t ZCL_PERCENT100THS_ATTRIBUTE_TYPES = 0xE7; +constexpr uint8_t ZCL_CLUSTER_ID_ATTRIBUTE_TYPES = 0xE8; +constexpr uint8_t ZCL_ATTRIB_ID_ATTRIBUTE_TYPES = 0xE9; +constexpr uint8_t ZCL_FIELD_ID_ATTRIBUTE_TYPES = 0xEA; +constexpr uint8_t ZCL_EVENT_ID_ATTRIBUTE_TYPES = 0xEB; +constexpr uint8_t ZCL_COMMAND_ID_ATTRIBUTE_TYPES = 0xEC; +constexpr uint8_t ZCL_ACTION_ID_ATTRIBUTE_TYPES = 0xED; +constexpr uint8_t ZCL_TRANS_ID_ATTRIBUTE_TYPES = 0xEF; +constexpr uint8_t ZCL_NODE_ID_ATTRIBUTE_TYPES = 0xF0; +constexpr uint8_t ZCL_VENDOR_ID_ATTRIBUTE_TYPES = 0xF1; +constexpr uint8_t ZCL_DEVTYPE_ID_ATTRIBUTE_TYPES = 0xF2; +constexpr uint8_t ZCL_FABRIC_ID_ATTRIBUTE_TYPES = 0xF3; +constexpr uint8_t ZCL_GROUP_ID_ATTRIBUTE_TYPES = 0xF4; +constexpr uint8_t ZCL_STATUS_ATTRIBUTE_TYPES = 0xF5; +constexpr uint8_t ZCL_DATA_VER_ATTRIBUTE_TYPES = 0xF6; +constexpr uint8_t ZCL_EVENT_NO_ATTRIBUTE_TYPES = 0xF7; +constexpr uint8_t ZCL_ENDPOINT_NO_ATTRIBUTE_TYPES = 0xF8; +constexpr uint8_t ZCL_FABRIC_IDX_ATTRIBUTE_TYPES = 0xF9; +constexpr uint8_t ZCL_IPADR_ATTRIBUTE_TYPES = 0xFA; +constexpr uint8_t ZCL_IPV4ADR_ATTRIBUTE_TYPES = 0xFB; +constexpr uint8_t ZCL_IPV6ADR_ATTRIBUTE_TYPES = 0xFC; +constexpr uint8_t ZCL_IPV6PRE_ATTRIBUTE_TYPES = 0xFD; +constexpr uint8_t ZCL_HWADR_ATTRIBUTE_TYPES = 0xFE; +constexpr uint8_t ZCL_UNKNOWN_ATTRIBUTE_TYPES = 0xFF; + +// ZCL attribute sizes +constexpr uint8_t ZCL_BOOLEAN_ATTRIBUTE_TYPES_SIZE = 1; +constexpr uint8_t ZCL_BITMAP8_ATTRIBUTE_TYPES_SIZE = 1; +constexpr uint8_t ZCL_BITMAP16_ATTRIBUTE_TYPES_SIZE = 2; +constexpr uint8_t ZCL_BITMAP24_ATTRIBUTE_TYPES_SIZE = 3; +constexpr uint8_t ZCL_BITMAP32_ATTRIBUTE_TYPES_SIZE = 4; +constexpr uint8_t ZCL_BITMAP64_ATTRIBUTE_TYPES_SIZE = 8; +constexpr uint8_t ZCL_INT8U_ATTRIBUTE_TYPES_SIZE = 1; +constexpr uint8_t ZCL_INT16U_ATTRIBUTE_TYPES_SIZE = 2; +constexpr uint8_t ZCL_INT24U_ATTRIBUTE_TYPES_SIZE = 3; +constexpr uint8_t ZCL_INT32U_ATTRIBUTE_TYPES_SIZE = 4; +constexpr uint8_t ZCL_INT40U_ATTRIBUTE_TYPES_SIZE = 5; +constexpr uint8_t ZCL_INT48U_ATTRIBUTE_TYPES_SIZE = 6; +constexpr uint8_t ZCL_INT56U_ATTRIBUTE_TYPES_SIZE = 7; +constexpr uint8_t ZCL_INT64U_ATTRIBUTE_TYPES_SIZE = 8; +constexpr uint8_t ZCL_INT8S_ATTRIBUTE_TYPES_SIZE = 1; +constexpr uint8_t ZCL_INT16S_ATTRIBUTE_TYPES_SIZE = 2; +constexpr uint8_t ZCL_INT24S_ATTRIBUTE_TYPES_SIZE = 3; +constexpr uint8_t ZCL_INT32S_ATTRIBUTE_TYPES_SIZE = 4; +constexpr uint8_t ZCL_INT40S_ATTRIBUTE_TYPES_SIZE = 5; +constexpr uint8_t ZCL_INT48S_ATTRIBUTE_TYPES_SIZE = 6; +constexpr uint8_t ZCL_INT56S_ATTRIBUTE_TYPES_SIZE = 7; +constexpr uint8_t ZCL_INT64S_ATTRIBUTE_TYPES_SIZE = 8; +constexpr uint8_t ZCL_ENUM8_ATTRIBUTE_TYPES_SIZE = 1; +constexpr uint8_t ZCL_ENUM16_ATTRIBUTE_TYPES_SIZE = 2; +constexpr uint8_t ZCL_SINGLE_ATTRIBUTE_TYPES_SIZE = 4; +constexpr uint8_t ZCL_DOUBLE_ATTRIBUTE_TYPES_SIZE = 8; +constexpr uint8_t ZCL_TOD_ATTRIBUTE_TYPES_SIZE = 4; +constexpr uint8_t ZCL_DATE_ATTRIBUTE_TYPES_SIZE = 4; +constexpr uint8_t ZCL_UTC_ATTRIBUTE_TYPES_SIZE = 4; +constexpr uint8_t ZCL_EPOCH_US_ATTRIBUTE_TYPES_SIZE = 8; +constexpr uint8_t ZCL_EPOCH_S_ATTRIBUTE_TYPES_SIZE = 4; +constexpr uint8_t ZCL_SYSTIME_US_ATTRIBUTE_TYPES_SIZE = 8; +constexpr uint8_t ZCL_PERCENT_ATTRIBUTE_TYPES_SIZE = 1; +constexpr uint8_t ZCL_PERCENT100THS_ATTRIBUTE_TYPES_SIZE = 2; +constexpr uint8_t ZCL_CLUSTER_ID_ATTRIBUTE_TYPES_SIZE = 4; +constexpr uint8_t ZCL_ATTRIB_ID_ATTRIBUTE_TYPES_SIZE = 4; +constexpr uint8_t ZCL_FIELD_ID_ATTRIBUTE_TYPES_SIZE = 4; +constexpr uint8_t ZCL_EVENT_ID_ATTRIBUTE_TYPES_SIZE = 4; +constexpr uint8_t ZCL_COMMAND_ID_ATTRIBUTE_TYPES_SIZE = 4; +constexpr uint8_t ZCL_ACTION_ID_ATTRIBUTE_TYPES_SIZE = 1; +constexpr uint8_t ZCL_TRANS_ID_ATTRIBUTE_TYPES_SIZE = 4; +constexpr uint8_t ZCL_NODE_ID_ATTRIBUTE_TYPES_SIZE = 8; +constexpr uint8_t ZCL_VENDOR_ID_ATTRIBUTE_TYPES_SIZE = 2; +constexpr uint8_t ZCL_DEVTYPE_ID_ATTRIBUTE_TYPES_SIZE = 4; +constexpr uint8_t ZCL_FABRIC_ID_ATTRIBUTE_TYPES_SIZE = 8; +constexpr uint8_t ZCL_GROUP_ID_ATTRIBUTE_TYPES_SIZE = 2; +constexpr uint8_t ZCL_STATUS_ATTRIBUTE_TYPES_SIZE = 2; +constexpr uint8_t ZCL_DATA_VER_ATTRIBUTE_TYPES_SIZE = 4; +constexpr uint8_t ZCL_EVENT_NO_ATTRIBUTE_TYPES_SIZE = 8; +constexpr uint8_t ZCL_ENDPOINT_NO_ATTRIBUTE_TYPES_SIZE = 2; +constexpr uint8_t ZCL_FABRIC_IDX_ATTRIBUTE_TYPES_SIZE = 1; +constexpr uint8_t ZCL_IPV4ADR_ATTRIBUTE_TYPES_SIZE = 4; +constexpr uint8_t ZCL_IPV6ADR_ATTRIBUTE_TYPES_SIZE = 16; + +// Setting the attribute tpe size which is not defined in 'chip-type.xml' +constexpr uint8_t ZCL_NO_DATA_ATTRIBUTE_TYPES_SIZE = 0; +constexpr uint8_t ZCL_OCTET_STRING_ATTRIBUTE_TYPES_SIZE = 32; +constexpr uint8_t ZCL_CHAR_STRING_ATTRIBUTE_TYPES_SIZE = 32; +constexpr uint8_t ZCL_LONG_OCTET_STRING_ATTRIBUTE_TYPES_SIZE = 32; +constexpr uint8_t ZCL_LONG_CHAR_STRING_ATTRIBUTE_TYPES_SIZE = 32; +constexpr uint8_t ZCL_STRUCT_ATTRIBUTE_TYPES_SIZE = 254; +constexpr uint8_t ZCL_ARRAY_ATTRIBUTE_TYPES_SIZE = 254; + +constexpr uint8_t ZCL_IDENTIFY_EFFECT_IDENTIFIER_ATTRIBUTE_TYPES = ZCL_ENUM8_ATTRIBUTE_TYPES; +constexpr uint8_t ZCL_IDENTIFY_EFFECT_IDENTIFIER_ATTRIBUTE_TYPES_SIZE = ZCL_ENUM8_ATTRIBUTE_TYPES_SIZE; +constexpr uint8_t ZCL_IDENTIFY_EFFECT_VARIANT_ATTRIBUTE_TYPES = ZCL_ENUM8_ATTRIBUTE_TYPES; +constexpr uint8_t ZCL_IDENTIFY_EFFECT_VARIANT_ATTRIBUTE_TYPES_SIZE = ZCL_ENUM8_ATTRIBUTE_TYPES_SIZE; +constexpr uint8_t ZCL_IDENTIFY_IDENTIFY_TYPE_ATTRIBUTE_TYPES = ZCL_ENUM8_ATTRIBUTE_TYPES; +constexpr uint8_t ZCL_IDENTIFY_IDENTIFY_TYPE_ATTRIBUTE_TYPES_SIZE = ZCL_ENUM8_ATTRIBUTE_TYPES_SIZE; + +constexpr uint8_t ZCL_SCENES_COPY_MODE_ATTRIBUTE_TYPES = ZCL_BITMAP32_ATTRIBUTE_TYPES; +constexpr uint8_t ZCL_SCENES_COPY_MODE_ATTRIBUTE_TYPES_SIZE = ZCL_BITMAP32_ATTRIBUTE_TYPES_SIZE; + +constexpr uint8_t ZCL_ATTRIBUTE_VALUE_PAIR_ATTRIBUTE_TYPES = ZCL_STRUCT_ATTRIBUTE_TYPES; +constexpr uint8_t ZCL_ATTRIBUTE_VALUE_PAIR_ATTRIBUTE_TYPES_SIZE = ZCL_STRUCT_ATTRIBUTE_TYPES_SIZE; +constexpr uint8_t ZCL_EXTENSION_FIELD_SET_ATTRIBUTE_TYPES = ZCL_STRUCT_ATTRIBUTE_TYPES; +constexpr uint8_t ZCL_EXTENSION_FIELD_SET_ATTRIBUTE_TYPES_SIZE = ZCL_STRUCT_ATTRIBUTE_TYPES_SIZE; + +constexpr uint8_t ZCL_ON_OFF_CONTROL_ATTRIBUTE_TYPES = ZCL_BITMAP32_ATTRIBUTE_TYPES; +constexpr uint8_t ZCL_ON_OFF_CONTROL_ATTRIBUTE_TYPES_SIZE = ZCL_BITMAP32_ATTRIBUTE_TYPES_SIZE; +constexpr uint8_t ZCL_ON_OFF_FEATURE_ATTRIBUTE_TYPES = ZCL_BITMAP32_ATTRIBUTE_TYPES; +constexpr uint8_t ZCL_ON_OFF_FEATURE_ATTRIBUTE_TYPES_SIZE = ZCL_BITMAP32_ATTRIBUTE_TYPES_SIZE; +constexpr uint8_t ZCL_SCENE_FEATURES_ATTRIBUTE_TYPES = ZCL_BITMAP32_ATTRIBUTE_TYPES; +constexpr uint8_t ZCL_SCENE_FEATURES_ATTRIBUTE_TYPES_SIZE = ZCL_BITMAP32_ATTRIBUTE_TYPES_SIZE; + +constexpr uint8_t ZCL_ON_OFF_DELAYED_ALL_OFF_EFFECT_VARIANT_ATTRIBUTE_TYPES = ZCL_ENUM8_ATTRIBUTE_TYPES; +constexpr uint8_t ZCL_ON_OFF_DELAYED_ALL_OFF_EFFECT_VARIANT_ATTRIBUTE_TYPES_SIZE = ZCL_ENUM8_ATTRIBUTE_TYPES_SIZE; +constexpr uint8_t ZCL_ON_OFF_DYING_LIGHT_EFFECT_VARIANT_ATTRIBUTE_TYPES = ZCL_ENUM8_ATTRIBUTE_TYPES; +constexpr uint8_t ZCL_ON_OFF_DYING_LIGHT_EFFECT_VARIANT_ATTRIBUTE_TYPES_SIZE = ZCL_ENUM8_ATTRIBUTE_TYPES_SIZE; +constexpr uint8_t ZCL_ON_OFF_EFFECT_IDENTIFIER_ATTRIBUTE_TYPES = ZCL_ENUM8_ATTRIBUTE_TYPES; +constexpr uint8_t ZCL_ON_OFF_EFFECT_IDENTIFIER_ATTRIBUTE_TYPES_SIZE = ZCL_ENUM8_ATTRIBUTE_TYPES_SIZE; +constexpr uint8_t ZCL_ON_OFF_START_UP_ON_OFF_ATTRIBUTE_TYPES = ZCL_ENUM8_ATTRIBUTE_TYPES; +constexpr uint8_t ZCL_ON_OFF_START_UP_ON_OFF_ATTRIBUTE_TYPES_SIZE = ZCL_ENUM8_ATTRIBUTE_TYPES_SIZE; + +constexpr uint8_t ZCL_LEVEL_CONTROL_FEATURE_ATTRIBUTE_TYPES = ZCL_BITMAP32_ATTRIBUTE_TYPES; +constexpr uint8_t ZCL_LEVEL_CONTROL_FEATURE_ATTRIBUTE_TYPES_SIZE = ZCL_BITMAP32_ATTRIBUTE_TYPES_SIZE; + +constexpr uint8_t ZCL_MOVE_MODE_ATTRIBUTE_TYPES = ZCL_ENUM8_ATTRIBUTE_TYPES; +constexpr uint8_t ZCL_MOVE_MODE_ATTRIBUTE_TYPES_SIZE = ZCL_ENUM8_ATTRIBUTE_TYPES_SIZE; +constexpr uint8_t ZCL_STEP_MODE_ATTRIBUTE_TYPES = ZCL_ENUM8_ATTRIBUTE_TYPES; +constexpr uint8_t ZCL_STEP_MODE_ATTRIBUTE_TYPES_SIZE = ZCL_ENUM8_ATTRIBUTE_TYPES_SIZE; + +constexpr uint8_t ZCL_CAPABILITY_MINIMA_STRUCT_ATTRIBUTE_TYPES = ZCL_STRUCT_ATTRIBUTE_TYPES; +constexpr uint8_t ZCL_CAPABILITY_MINIMA_STRUCT_ATTRIBUTE_TYPES_SIZE = ZCL_STRUCT_ATTRIBUTE_TYPES_SIZE; + +constexpr uint8_t ZCL_OTA_APPLY_UPDATE_ACTION_ATTRIBUTE_TYPES = ZCL_ENUM8_ATTRIBUTE_TYPES; +constexpr uint8_t ZCL_OTA_APPLY_UPDATE_ACTION_ATTRIBUTE_TYPES_SIZE = ZCL_ENUM8_ATTRIBUTE_TYPES_SIZE; +constexpr uint8_t ZCL_OTA_DOWNLOAD_PROTOCOL_ATTRIBUTE_TYPES = ZCL_ENUM8_ATTRIBUTE_TYPES; +constexpr uint8_t ZCL_OTA_DOWNLOAD_PROTOCOL_ATTRIBUTE_TYPES_SIZE = ZCL_ENUM8_ATTRIBUTE_TYPES_SIZE; +constexpr uint8_t ZCL_OTA_QUERY_STATUS_ATTRIBUTE_TYPES = ZCL_ENUM8_ATTRIBUTE_TYPES; +constexpr uint8_t ZCL_OTA_QUERY_STATUS_ATTRIBUTE_TYPES_SIZE = ZCL_ENUM8_ATTRIBUTE_TYPES_SIZE; + +constexpr uint8_t ZCL_OTA_ANNOUNCEMENT_REASON_ATTRIBUTE_TYPES = ZCL_ENUM8_ATTRIBUTE_TYPES; +constexpr uint8_t ZCL_OTA_ANNOUNCEMENT_REASON_ATTRIBUTE_TYPES_SIZE = ZCL_ENUM8_ATTRIBUTE_TYPES_SIZE; +constexpr uint8_t ZCL_OTA_CHANGE_REASON_ENUM_ATTRIBUTE_TYPES = ZCL_ENUM8_ATTRIBUTE_TYPES; +constexpr uint8_t ZCL_OTA_CHANGE_REASON_ENUM_ATTRIBUTE_TYPES_SIZE = ZCL_ENUM8_ATTRIBUTE_TYPES_SIZE; +constexpr uint8_t ZCL_OTA_UPDATE_STATE_ENUM_ATTRIBUTE_TYPES = ZCL_ENUM8_ATTRIBUTE_TYPES; +constexpr uint8_t ZCL_OTA_UPDATE_STATE_ENUM_ATTRIBUTE_TYPES_SIZE = ZCL_ENUM8_ATTRIBUTE_TYPES_SIZE; + +constexpr uint8_t ZCL_PROVIDER_LOCATION_ATTRIBUTE_TYPES = ZCL_STRUCT_ATTRIBUTE_TYPES; +constexpr uint8_t ZCL_PROVIDER_LOCATION_ATTRIBUTE_TYPES_SIZE = ZCL_STRUCT_ATTRIBUTE_TYPES_SIZE; + +constexpr uint8_t ZCL_CALENDAR_TYPE_ATTRIBUTE_TYPES = ZCL_ENUM8_ATTRIBUTE_TYPES; +constexpr uint8_t ZCL_CALENDAR_TYPE_ATTRIBUTE_TYPES_SIZE = ZCL_ENUM8_ATTRIBUTE_TYPES_SIZE; +constexpr uint8_t ZCL_HOUR_FORMAT_ATTRIBUTE_TYPES = ZCL_ENUM8_ATTRIBUTE_TYPES; +constexpr uint8_t ZCL_HOUR_FORMAT_ATTRIBUTE_TYPES_SIZE = ZCL_ENUM8_ATTRIBUTE_TYPES_SIZE; + +constexpr uint8_t ZCL_UNIT_LOCALIZATION_FEATURE_ATTRIBUTE_TYPES = ZCL_BITMAP32_ATTRIBUTE_TYPES; +constexpr uint8_t ZCL_UNIT_LOCALIZATION_FEATURE_ATTRIBUTE_TYPES_SIZE = ZCL_BITMAP32_ATTRIBUTE_TYPES_SIZE; + +constexpr uint8_t ZCL_TEMP_UNIT_ATTRIBUTE_TYPES = ZCL_ENUM8_ATTRIBUTE_TYPES; +constexpr uint8_t ZCL_TEMP_UNIT_ATTRIBUTE_TYPES_SIZE = ZCL_ENUM8_ATTRIBUTE_TYPES_SIZE; + +constexpr uint8_t ZCL_POWER_SOURCE_FEATURE_ATTRIBUTE_TYPES = ZCL_BITMAP32_ATTRIBUTE_TYPES; +constexpr uint8_t ZCL_POWER_SOURCE_FEATURE_ATTRIBUTE_TYPES_SIZE = ZCL_BITMAP32_ATTRIBUTE_TYPES_SIZE; + +constexpr uint8_t ZCL_BAT_CHARGE_FAULT_ATTRIBUTE_TYPES = ZCL_ENUM8_ATTRIBUTE_TYPES; +constexpr uint8_t ZCL_BAT_CHARGE_FAULT_ATTRIBUTE_TYPES_SIZE = ZCL_ENUM8_ATTRIBUTE_TYPES_SIZE; +constexpr uint8_t ZCL_BAT_CHARGE_LEVEL_ATTRIBUTE_TYPES = ZCL_ENUM8_ATTRIBUTE_TYPES; +constexpr uint8_t ZCL_BAT_CHARGE_LEVEL_ATTRIBUTE_TYPES_SIZE = ZCL_ENUM8_ATTRIBUTE_TYPES_SIZE; +constexpr uint8_t ZCL_BAT_CHARGE_STATE_ATTRIBUTE_TYPES = ZCL_ENUM8_ATTRIBUTE_TYPES; +constexpr uint8_t ZCL_BAT_CHARGE_STATE_ATTRIBUTE_TYPES_SIZE = ZCL_ENUM8_ATTRIBUTE_TYPES_SIZE; +constexpr uint8_t ZCL_BAT_FAULT_ATTRIBUTE_TYPES = ZCL_ENUM8_ATTRIBUTE_TYPES; +constexpr uint8_t ZCL_BAT_FAULT_ATTRIBUTE_TYPES_SIZE = ZCL_ENUM8_ATTRIBUTE_TYPES_SIZE; +constexpr uint8_t ZCL_BAT_REPLACEABILITY_ATTRIBUTE_TYPES = ZCL_ENUM8_ATTRIBUTE_TYPES; +constexpr uint8_t ZCL_BAT_REPLACEABILITY_ATTRIBUTE_TYPES_SIZE = ZCL_ENUM8_ATTRIBUTE_TYPES_SIZE; +constexpr uint8_t ZCL_POWER_SOURCE_STATUS_ATTRIBUTE_TYPES = ZCL_ENUM8_ATTRIBUTE_TYPES; +constexpr uint8_t ZCL_POWER_SOURCE_STATUS_ATTRIBUTE_TYPES_SIZE = ZCL_ENUM8_ATTRIBUTE_TYPES_SIZE; +constexpr uint8_t ZCL_WIRED_CURRENT_TYPE_ATTRIBUTE_TYPES = ZCL_ENUM8_ATTRIBUTE_TYPES; +constexpr uint8_t ZCL_WIRED_CURRENT_TYPE_ATTRIBUTE_TYPES_SIZE = ZCL_ENUM8_ATTRIBUTE_TYPES_SIZE; +constexpr uint8_t ZCL_WIRED_FAULT_ATTRIBUTE_TYPES = ZCL_ENUM8_ATTRIBUTE_TYPES; +constexpr uint8_t ZCL_WIRED_FAULT_ATTRIBUTE_TYPES_SIZE = ZCL_ENUM8_ATTRIBUTE_TYPES_SIZE; + +constexpr uint8_t ZCL_BAT_CHARGE_FAULT_CHANGE_TYPE_ATTRIBUTE_TYPES = ZCL_STRUCT_ATTRIBUTE_TYPES; +constexpr uint8_t ZCL_BAT_CHARGE_FAULT_CHANGE_TYPE_ATTRIBUTE_TYPES_SIZE = ZCL_STRUCT_ATTRIBUTE_TYPES_SIZE; +constexpr uint8_t ZCL_BAT_FAULT_CHANGE_TYPE_ATTRIBUTE_TYPES = ZCL_STRUCT_ATTRIBUTE_TYPES; +constexpr uint8_t ZCL_BAT_FAULT_CHANGE_TYPE_ATTRIBUTE_TYPES_SIZE = ZCL_STRUCT_ATTRIBUTE_TYPES_SIZE; +constexpr uint8_t ZCL_WIRED_FAULT_CHANGE_TYPE_ATTRIBUTE_TYPES = ZCL_STRUCT_ATTRIBUTE_TYPES; +constexpr uint8_t ZCL_WIRED_FAULT_CHANGE_TYPE_ATTRIBUTE_TYPES_SIZE = ZCL_STRUCT_ATTRIBUTE_TYPES_SIZE; + +constexpr uint8_t ZCL_COMMISSIONING_ERROR_ATTRIBUTE_TYPES = ZCL_ENUM8_ATTRIBUTE_TYPES; +constexpr uint8_t ZCL_COMMISSIONING_ERROR_ATTRIBUTE_TYPES_SIZE = ZCL_ENUM8_ATTRIBUTE_TYPES_SIZE; +constexpr uint8_t ZCL_REGULATORY_LOCATION_TYPE_ATTRIBUTE_TYPES = ZCL_ENUM8_ATTRIBUTE_TYPES; +constexpr uint8_t ZCL_REGULATORY_LOCATION_TYPE_ATTRIBUTE_TYPES_SIZE = ZCL_ENUM8_ATTRIBUTE_TYPES_SIZE; + +constexpr uint8_t ZCL_BASIC_COMMISSIONING_INFO_ATTRIBUTE_TYPES = ZCL_STRUCT_ATTRIBUTE_TYPES; +constexpr uint8_t ZCL_BASIC_COMMISSIONING_INFO_ATTRIBUTE_TYPES_SIZE = ZCL_STRUCT_ATTRIBUTE_TYPES_SIZE; + +constexpr uint8_t ZCL_LOGS_INTENT_ATTRIBUTE_TYPES = ZCL_ENUM8_ATTRIBUTE_TYPES; +constexpr uint8_t ZCL_LOGS_INTENT_ATTRIBUTE_TYPES_SIZE = ZCL_ENUM8_ATTRIBUTE_TYPES_SIZE; +constexpr uint8_t ZCL_LOGS_STATUS_ATTRIBUTE_TYPES = ZCL_ENUM8_ATTRIBUTE_TYPES; +constexpr uint8_t ZCL_LOGS_STATUS_ATTRIBUTE_TYPES_SIZE = ZCL_ENUM8_ATTRIBUTE_TYPES_SIZE; +constexpr uint8_t ZCL_LOGS_TRANSFER_PROTOCOL_ATTRIBUTE_TYPES = ZCL_ENUM8_ATTRIBUTE_TYPES; +constexpr uint8_t ZCL_LOGS_TRANSFER_PROTOCOL_ATTRIBUTE_TYPES_SIZE = ZCL_ENUM8_ATTRIBUTE_TYPES_SIZE; + +constexpr uint8_t ZCL_BOOT_REASON_TYPE_ATTRIBUTE_TYPES = ZCL_ENUM8_ATTRIBUTE_TYPES; +constexpr uint8_t ZCL_BOOT_REASON_TYPE_ATTRIBUTE_TYPES_SIZE = ZCL_ENUM8_ATTRIBUTE_TYPES_SIZE; +constexpr uint8_t ZCL_HARDWARE_FAULT_TYPE_ATTRIBUTE_TYPES = ZCL_ENUM8_ATTRIBUTE_TYPES; +constexpr uint8_t ZCL_HARDWARE_FAULT_TYPE_ATTRIBUTE_TYPES_SIZE = ZCL_ENUM8_ATTRIBUTE_TYPES_SIZE; +constexpr uint8_t ZCL_INTERFACE_TYPE_ATTRIBUTE_TYPES = ZCL_ENUM8_ATTRIBUTE_TYPES; +constexpr uint8_t ZCL_INTERFACE_TYPE_ATTRIBUTE_TYPES_SIZE = ZCL_ENUM8_ATTRIBUTE_TYPES_SIZE; +constexpr uint8_t ZCL_NETWORK_FAULT_TYPE_ATTRIBUTE_TYPES = ZCL_ENUM8_ATTRIBUTE_TYPES; +constexpr uint8_t ZCL_NETWORK_FAULT_TYPE_ATTRIBUTE_TYPES_SIZE = ZCL_ENUM8_ATTRIBUTE_TYPES_SIZE; +constexpr uint8_t ZCL_RADIO_FAULT_TYPE_ATTRIBUTE_TYPES = ZCL_ENUM8_ATTRIBUTE_TYPES; +constexpr uint8_t ZCL_RADIO_FAULT_TYPE_ATTRIBUTE_TYPES_SIZE = ZCL_ENUM8_ATTRIBUTE_TYPES_SIZE; + +constexpr uint8_t ZCL_NETWORK_INTERFACE_TYPE_ATTRIBUTE_TYPES = ZCL_STRUCT_ATTRIBUTE_TYPES; +constexpr uint8_t ZCL_NETWORK_INTERFACE_TYPE_ATTRIBUTE_TYPES_SIZE = ZCL_STRUCT_ATTRIBUTE_TYPES_SIZE; + +constexpr uint8_t ZCL_SOFTWARE_DIAGNOSTICS_FEATURE_ATTRIBUTE_TYPES = ZCL_BITMAP32_ATTRIBUTE_TYPES; +constexpr uint8_t ZCL_SOFTWARE_DIAGNOSTICS_FEATURE_ATTRIBUTE_TYPES_SIZE = ZCL_BITMAP32_ATTRIBUTE_TYPES_SIZE; + +constexpr uint8_t ZCL_THREAD_METRICS_ATTRIBUTE_TYPES = ZCL_STRUCT_ATTRIBUTE_TYPES; +constexpr uint8_t ZCL_THREAD_METRICS_ATTRIBUTE_TYPES_SIZE = ZCL_STRUCT_ATTRIBUTE_TYPES_SIZE; + +constexpr uint8_t ZCL_THREAD_NETWORK_DIAGNOSTICS_FEATURE_ATTRIBUTE_TYPES = ZCL_BITMAP32_ATTRIBUTE_TYPES; +constexpr uint8_t ZCL_THREAD_NETWORK_DIAGNOSTICS_FEATURE_ATTRIBUTE_TYPES_SIZE = ZCL_BITMAP32_ATTRIBUTE_TYPES_SIZE; + +constexpr uint8_t ZCL_NETWORK_FAULT_ATTRIBUTE_TYPES = ZCL_ENUM8_ATTRIBUTE_TYPES; +constexpr uint8_t ZCL_NETWORK_FAULT_ATTRIBUTE_TYPES_SIZE = ZCL_ENUM8_ATTRIBUTE_TYPES_SIZE; +constexpr uint8_t ZCL_ROUTING_ROLE_ATTRIBUTE_TYPES = ZCL_ENUM8_ATTRIBUTE_TYPES; +constexpr uint8_t ZCL_ROUTING_ROLE_ATTRIBUTE_TYPES_SIZE = ZCL_ENUM8_ATTRIBUTE_TYPES_SIZE; +constexpr uint8_t ZCL_THREAD_CONNECTION_STATUS_ATTRIBUTE_TYPES = ZCL_ENUM8_ATTRIBUTE_TYPES; +constexpr uint8_t ZCL_THREAD_CONNECTION_STATUS_ATTRIBUTE_TYPES_SIZE = ZCL_ENUM8_ATTRIBUTE_TYPES_SIZE; + +constexpr uint8_t ZCL_NEIGHBOR_TABLE_ATTRIBUTE_TYPES = ZCL_STRUCT_ATTRIBUTE_TYPES; +constexpr uint8_t ZCL_NEIGHBOR_TABLE_ATTRIBUTE_TYPES_SIZE = ZCL_STRUCT_ATTRIBUTE_TYPES_SIZE; +constexpr uint8_t ZCL_OPERATIONAL_DATASET_COMPONENTS_ATTRIBUTE_TYPES = ZCL_STRUCT_ATTRIBUTE_TYPES; +constexpr uint8_t ZCL_OPERATIONAL_DATASET_COMPONENTS_ATTRIBUTE_TYPES_SIZE = ZCL_STRUCT_ATTRIBUTE_TYPES_SIZE; +constexpr uint8_t ZCL_ROUTE_TABLE_ATTRIBUTE_TYPES = ZCL_STRUCT_ATTRIBUTE_TYPES; +constexpr uint8_t ZCL_ROUTE_TABLE_ATTRIBUTE_TYPES_SIZE = ZCL_STRUCT_ATTRIBUTE_TYPES_SIZE; +constexpr uint8_t ZCL_SECURITY_POLICY_ATTRIBUTE_TYPES = ZCL_STRUCT_ATTRIBUTE_TYPES; +constexpr uint8_t ZCL_SECURITY_POLICY_ATTRIBUTE_TYPES_SIZE = ZCL_STRUCT_ATTRIBUTE_TYPES_SIZE; + +constexpr uint8_t ZCL_ASSOCIATION_FAILURE_CAUSE_ATTRIBUTE_TYPES = ZCL_ENUM8_ATTRIBUTE_TYPES; +constexpr uint8_t ZCL_ASSOCIATION_FAILURE_CAUSE_ATTRIBUTE_TYPES_SIZE = ZCL_ENUM8_ATTRIBUTE_TYPES_SIZE; +constexpr uint8_t ZCL_SECURITY_TYPE_ATTRIBUTE_TYPES = ZCL_ENUM8_ATTRIBUTE_TYPES; +constexpr uint8_t ZCL_SECURITY_TYPE_ATTRIBUTE_TYPES_SIZE = ZCL_ENUM8_ATTRIBUTE_TYPES_SIZE; +constexpr uint8_t ZCL_WI_FI_CONNECTION_STATUS_ATTRIBUTE_TYPES = ZCL_ENUM8_ATTRIBUTE_TYPES; +constexpr uint8_t ZCL_WI_FI_CONNECTION_STATUS_ATTRIBUTE_TYPES_SIZE = ZCL_ENUM8_ATTRIBUTE_TYPES_SIZE; +constexpr uint8_t ZCL_WI_FI_VERSION_TYPE_ATTRIBUTE_TYPES = ZCL_ENUM8_ATTRIBUTE_TYPES; +constexpr uint8_t ZCL_WI_FI_VERSION_TYPE_ATTRIBUTE_TYPES_SIZE = ZCL_ENUM8_ATTRIBUTE_TYPES_SIZE; + +constexpr uint8_t ZCL_GRANULARITY_ENUM_ATTRIBUTE_TYPES = ZCL_ENUM8_ATTRIBUTE_TYPES; +constexpr uint8_t ZCL_GRANULARITY_ENUM_ATTRIBUTE_TYPES_SIZE = ZCL_ENUM8_ATTRIBUTE_TYPES_SIZE; +constexpr uint8_t ZCL_TIME_SOURCE_ENUM_ATTRIBUTE_TYPES = ZCL_ENUM8_ATTRIBUTE_TYPES; +constexpr uint8_t ZCL_TIME_SOURCE_ENUM_ATTRIBUTE_TYPES_SIZE = ZCL_ENUM8_ATTRIBUTE_TYPES_SIZE; + +constexpr uint8_t ZCL_DST_OFFSET_TYPE_ATTRIBUTE_TYPES = ZCL_STRUCT_ATTRIBUTE_TYPES; +constexpr uint8_t ZCL_DST_OFFSET_TYPE_ATTRIBUTE_TYPES_SIZE = ZCL_STRUCT_ATTRIBUTE_TYPES_SIZE; +constexpr uint8_t ZCL_TIME_ZONE_TYPE_ATTRIBUTE_TYPES = ZCL_STRUCT_ATTRIBUTE_TYPES; +constexpr uint8_t ZCL_TIME_ZONE_TYPE_ATTRIBUTE_TYPES_SIZE = ZCL_STRUCT_ATTRIBUTE_TYPES_SIZE; + +constexpr uint8_t ZCL_SWITCH_FEATURE_ATTRIBUTE_TYPES = ZCL_BITMAP32_ATTRIBUTE_TYPES; +constexpr uint8_t ZCL_SWITCH_FEATURE_ATTRIBUTE_TYPES_SIZE = ZCL_BITMAP32_ATTRIBUTE_TYPES_SIZE; + +constexpr uint8_t ZCL_OPERATIONAL_CERT_STATUS_ATTRIBUTE_TYPES = ZCL_ENUM8_ATTRIBUTE_TYPES; +constexpr uint8_t ZCL_OPERATIONAL_CERT_STATUS_ATTRIBUTE_TYPES_SIZE = ZCL_ENUM8_ATTRIBUTE_TYPES_SIZE; + +constexpr uint8_t ZCL_FABRIC_DESCRIPTOR_ATTRIBUTE_TYPES = ZCL_STRUCT_ATTRIBUTE_TYPES; +constexpr uint8_t ZCL_FABRIC_DESCRIPTOR_ATTRIBUTE_TYPES_SIZE = ZCL_STRUCT_ATTRIBUTE_TYPES_SIZE; +constexpr uint8_t ZCL_NOC_STRUCT_ATTRIBUTE_TYPES = ZCL_STRUCT_ATTRIBUTE_TYPES; +constexpr uint8_t ZCL_NOC_STRUCT_ATTRIBUTE_TYPES_SIZE = ZCL_STRUCT_ATTRIBUTE_TYPES_SIZE; + +constexpr uint8_t ZCL_GROUP_KEY_SECURITY_POLICY_ATTRIBUTE_TYPES = ZCL_ENUM8_ATTRIBUTE_TYPES; +constexpr uint8_t ZCL_GROUP_KEY_SECURITY_POLICY_ATTRIBUTE_TYPES_SIZE = ZCL_ENUM8_ATTRIBUTE_TYPES_SIZE; + +constexpr uint8_t ZCL_GROUP_INFO_MAP_STRUCT_ATTRIBUTE_TYPES = ZCL_STRUCT_ATTRIBUTE_TYPES; +constexpr uint8_t ZCL_GROUP_INFO_MAP_STRUCT_ATTRIBUTE_TYPES_SIZE = ZCL_STRUCT_ATTRIBUTE_TYPES_SIZE; +constexpr uint8_t ZCL_GROUP_KEY_MAP_STRUCT_ATTRIBUTE_TYPES = ZCL_STRUCT_ATTRIBUTE_TYPES; +constexpr uint8_t ZCL_GROUP_KEY_MAP_STRUCT_ATTRIBUTE_TYPES_SIZE = ZCL_STRUCT_ATTRIBUTE_TYPES_SIZE; +constexpr uint8_t ZCL_GROUP_KEY_SET_STRUCT_ATTRIBUTE_TYPES = ZCL_STRUCT_ATTRIBUTE_TYPES; +constexpr uint8_t ZCL_GROUP_KEY_SET_STRUCT_ATTRIBUTE_TYPES_SIZE = ZCL_STRUCT_ATTRIBUTE_TYPES_SIZE; + +constexpr uint8_t ZCL_MODE_SELECT_FEATURE_ATTRIBUTE_TYPES = ZCL_BITMAP32_ATTRIBUTE_TYPES; +constexpr uint8_t ZCL_MODE_SELECT_FEATURE_ATTRIBUTE_TYPES_SIZE = ZCL_BITMAP32_ATTRIBUTE_TYPES_SIZE; + +constexpr uint8_t ZCL_SEMANTIC_TAG_ATTRIBUTE_TYPES = ZCL_STRUCT_ATTRIBUTE_TYPES; +constexpr uint8_t ZCL_SEMANTIC_TAG_ATTRIBUTE_TYPES_SIZE = ZCL_STRUCT_ATTRIBUTE_TYPES_SIZE; +constexpr uint8_t ZCL_MODE_OPTION_STRUCT_ATTRIBUTE_TYPES = ZCL_STRUCT_ATTRIBUTE_TYPES; +constexpr uint8_t ZCL_MODE_OPTION_STRUCT_ATTRIBUTE_TYPES_SIZE = ZCL_STRUCT_ATTRIBUTE_TYPES_SIZE; + +constexpr uint8_t ZCL_DL_CREDENTIAL_RULE_MASK_ATTRIBUTE_TYPES = ZCL_BITMAP32_ATTRIBUTE_TYPES; +constexpr uint8_t ZCL_DL_CREDENTIAL_RULE_MASK_ATTRIBUTE_TYPES_SIZE = ZCL_BITMAP32_ATTRIBUTE_TYPES_SIZE; +constexpr uint8_t ZCL_DL_CREDENTIAL_RULES_SUPPORT_ATTRIBUTE_TYPES = ZCL_BITMAP32_ATTRIBUTE_TYPES; +constexpr uint8_t ZCL_DL_CREDENTIAL_RULES_SUPPORT_ATTRIBUTE_TYPES_SIZE = ZCL_BITMAP32_ATTRIBUTE_TYPES_SIZE; +constexpr uint8_t ZCL_DL_DAYS_MASK_MAP_ATTRIBUTE_TYPES = ZCL_BITMAP32_ATTRIBUTE_TYPES; +constexpr uint8_t ZCL_DL_DAYS_MASK_MAP_ATTRIBUTE_TYPES_SIZE = ZCL_BITMAP32_ATTRIBUTE_TYPES_SIZE; +constexpr uint8_t ZCL_DL_DEFAULT_CONFIGURATION_REGISTER_ATTRIBUTE_TYPES = ZCL_BITMAP32_ATTRIBUTE_TYPES; +constexpr uint8_t ZCL_DL_DEFAULT_CONFIGURATION_REGISTER_ATTRIBUTE_TYPES_SIZE = ZCL_BITMAP32_ATTRIBUTE_TYPES_SIZE; +constexpr uint8_t ZCL_DL_KEYPAD_OPERATION_EVENT_MASK_ATTRIBUTE_TYPES = ZCL_BITMAP32_ATTRIBUTE_TYPES; +constexpr uint8_t ZCL_DL_KEYPAD_OPERATION_EVENT_MASK_ATTRIBUTE_TYPES_SIZE = ZCL_BITMAP32_ATTRIBUTE_TYPES_SIZE; +constexpr uint8_t ZCL_DL_KEYPAD_PROGRAMMING_EVENT_MASK_ATTRIBUTE_TYPES = ZCL_BITMAP32_ATTRIBUTE_TYPES; +constexpr uint8_t ZCL_DL_KEYPAD_PROGRAMMING_EVENT_MASK_ATTRIBUTE_TYPES_SIZE = ZCL_BITMAP32_ATTRIBUTE_TYPES_SIZE; +constexpr uint8_t ZCL_DL_LOCAL_PROGRAMMING_FEATURES_ATTRIBUTE_TYPES = ZCL_BITMAP32_ATTRIBUTE_TYPES; +constexpr uint8_t ZCL_DL_LOCAL_PROGRAMMING_FEATURES_ATTRIBUTE_TYPES_SIZE = ZCL_BITMAP32_ATTRIBUTE_TYPES_SIZE; +constexpr uint8_t ZCL_DL_MANUAL_OPERATION_EVENT_MASK_ATTRIBUTE_TYPES = ZCL_BITMAP32_ATTRIBUTE_TYPES; +constexpr uint8_t ZCL_DL_MANUAL_OPERATION_EVENT_MASK_ATTRIBUTE_TYPES_SIZE = ZCL_BITMAP32_ATTRIBUTE_TYPES_SIZE; +constexpr uint8_t ZCL_DL_RFID_OPERATION_EVENT_MASK_ATTRIBUTE_TYPES = ZCL_BITMAP32_ATTRIBUTE_TYPES; +constexpr uint8_t ZCL_DL_RFID_OPERATION_EVENT_MASK_ATTRIBUTE_TYPES_SIZE = ZCL_BITMAP32_ATTRIBUTE_TYPES_SIZE; +constexpr uint8_t ZCL_DL_RFID_PROGRAMMING_EVENT_MASK_ATTRIBUTE_TYPES = ZCL_BITMAP32_ATTRIBUTE_TYPES; +constexpr uint8_t ZCL_DL_RFID_PROGRAMMING_EVENT_MASK_ATTRIBUTE_TYPES_SIZE = ZCL_BITMAP32_ATTRIBUTE_TYPES_SIZE; +constexpr uint8_t ZCL_DL_REMOTE_OPERATION_EVENT_MASK_ATTRIBUTE_TYPES = ZCL_BITMAP32_ATTRIBUTE_TYPES; +constexpr uint8_t ZCL_DL_REMOTE_OPERATION_EVENT_MASK_ATTRIBUTE_TYPES_SIZE = ZCL_BITMAP32_ATTRIBUTE_TYPES_SIZE; +constexpr uint8_t ZCL_DL_REMOTE_PROGRAMMING_EVENT_MASK_ATTRIBUTE_TYPES = ZCL_BITMAP32_ATTRIBUTE_TYPES; +constexpr uint8_t ZCL_DL_REMOTE_PROGRAMMING_EVENT_MASK_ATTRIBUTE_TYPES_SIZE = ZCL_BITMAP32_ATTRIBUTE_TYPES_SIZE; +constexpr uint8_t ZCL_DL_SUPPORTED_OPERATING_MODES_ATTRIBUTE_TYPES = ZCL_BITMAP32_ATTRIBUTE_TYPES; +constexpr uint8_t ZCL_DL_SUPPORTED_OPERATING_MODES_ATTRIBUTE_TYPES_SIZE = ZCL_BITMAP32_ATTRIBUTE_TYPES_SIZE; +constexpr uint8_t ZCL_DOOR_LOCK_DAY_OF_WEEK_ATTRIBUTE_TYPES = ZCL_BITMAP32_ATTRIBUTE_TYPES; +constexpr uint8_t ZCL_DOOR_LOCK_DAY_OF_WEEK_ATTRIBUTE_TYPES_SIZE = ZCL_BITMAP32_ATTRIBUTE_TYPES_SIZE; +constexpr uint8_t ZCL_DOOR_LOCK_FEATURE_ATTRIBUTE_TYPES = ZCL_BITMAP32_ATTRIBUTE_TYPES; +constexpr uint8_t ZCL_DOOR_LOCK_FEATURE_ATTRIBUTE_TYPES_SIZE = ZCL_BITMAP32_ATTRIBUTE_TYPES_SIZE; + +constexpr uint8_t ZCL_DL_ALARM_CODE_ATTRIBUTE_TYPES = ZCL_ENUM8_ATTRIBUTE_TYPES; +constexpr uint8_t ZCL_DL_ALARM_CODE_ATTRIBUTE_TYPES_SIZE = ZCL_ENUM8_ATTRIBUTE_TYPES_SIZE; +constexpr uint8_t ZCL_DL_CREDENTIAL_RULE_ATTRIBUTE_TYPES = ZCL_ENUM8_ATTRIBUTE_TYPES; +constexpr uint8_t ZCL_DL_CREDENTIAL_RULE_ATTRIBUTE_TYPES_SIZE = ZCL_ENUM8_ATTRIBUTE_TYPES_SIZE; +constexpr uint8_t ZCL_DL_CREDENTIAL_TYPE_ATTRIBUTE_TYPES = ZCL_ENUM8_ATTRIBUTE_TYPES; +constexpr uint8_t ZCL_DL_CREDENTIAL_TYPE_ATTRIBUTE_TYPES_SIZE = ZCL_ENUM8_ATTRIBUTE_TYPES_SIZE; +constexpr uint8_t ZCL_DL_DATA_OPERATION_TYPE_ATTRIBUTE_TYPES = ZCL_ENUM8_ATTRIBUTE_TYPES; +constexpr uint8_t ZCL_DL_DATA_OPERATION_TYPE_ATTRIBUTE_TYPES_SIZE = ZCL_ENUM8_ATTRIBUTE_TYPES_SIZE; +constexpr uint8_t ZCL_DL_DOOR_STATE_ATTRIBUTE_TYPES = ZCL_ENUM8_ATTRIBUTE_TYPES; +constexpr uint8_t ZCL_DL_DOOR_STATE_ATTRIBUTE_TYPES_SIZE = ZCL_ENUM8_ATTRIBUTE_TYPES_SIZE; +constexpr uint8_t ZCL_DL_LOCK_DATA_TYPE_ATTRIBUTE_TYPES = ZCL_ENUM8_ATTRIBUTE_TYPES; +constexpr uint8_t ZCL_DL_LOCK_DATA_TYPE_ATTRIBUTE_TYPES_SIZE = ZCL_ENUM8_ATTRIBUTE_TYPES_SIZE; +constexpr uint8_t ZCL_DL_LOCK_OPERATION_TYPE_ATTRIBUTE_TYPES = ZCL_ENUM8_ATTRIBUTE_TYPES; +constexpr uint8_t ZCL_DL_LOCK_OPERATION_TYPE_ATTRIBUTE_TYPES_SIZE = ZCL_ENUM8_ATTRIBUTE_TYPES_SIZE; +constexpr uint8_t ZCL_DL_LOCK_STATE_ATTRIBUTE_TYPES = ZCL_ENUM8_ATTRIBUTE_TYPES; +constexpr uint8_t ZCL_DL_LOCK_STATE_ATTRIBUTE_TYPES_SIZE = ZCL_ENUM8_ATTRIBUTE_TYPES_SIZE; +constexpr uint8_t ZCL_DL_LOCK_TYPE_ATTRIBUTE_TYPES = ZCL_ENUM8_ATTRIBUTE_TYPES; +constexpr uint8_t ZCL_DL_LOCK_TYPE_ATTRIBUTE_TYPES_SIZE = ZCL_ENUM8_ATTRIBUTE_TYPES_SIZE; +constexpr uint8_t ZCL_DL_OPERATING_MODE_ATTRIBUTE_TYPES = ZCL_ENUM8_ATTRIBUTE_TYPES; +constexpr uint8_t ZCL_DL_OPERATING_MODE_ATTRIBUTE_TYPES_SIZE = ZCL_ENUM8_ATTRIBUTE_TYPES_SIZE; +constexpr uint8_t ZCL_DL_OPERATION_ERROR_ATTRIBUTE_TYPES = ZCL_ENUM8_ATTRIBUTE_TYPES; +constexpr uint8_t ZCL_DL_OPERATION_ERROR_ATTRIBUTE_TYPES_SIZE = ZCL_ENUM8_ATTRIBUTE_TYPES_SIZE; +constexpr uint8_t ZCL_DL_OPERATION_SOURCE_ATTRIBUTE_TYPES = ZCL_ENUM8_ATTRIBUTE_TYPES; +constexpr uint8_t ZCL_DL_OPERATION_SOURCE_ATTRIBUTE_TYPES_SIZE = ZCL_ENUM8_ATTRIBUTE_TYPES_SIZE; +constexpr uint8_t ZCL_DL_STATUS_ATTRIBUTE_TYPES = ZCL_ENUM8_ATTRIBUTE_TYPES; +constexpr uint8_t ZCL_DL_STATUS_ATTRIBUTE_TYPES_SIZE = ZCL_ENUM8_ATTRIBUTE_TYPES_SIZE; +constexpr uint8_t ZCL_DL_USER_STATUS_ATTRIBUTE_TYPES = ZCL_ENUM8_ATTRIBUTE_TYPES; +constexpr uint8_t ZCL_DL_USER_STATUS_ATTRIBUTE_TYPES_SIZE = ZCL_ENUM8_ATTRIBUTE_TYPES_SIZE; +constexpr uint8_t ZCL_DL_USER_TYPE_ATTRIBUTE_TYPES = ZCL_ENUM8_ATTRIBUTE_TYPES; +constexpr uint8_t ZCL_DL_USER_TYPE_ATTRIBUTE_TYPES_SIZE = ZCL_ENUM8_ATTRIBUTE_TYPES_SIZE; +constexpr uint8_t ZCL_DOOR_LOCK_OPERATION_EVENT_CODE_ATTRIBUTE_TYPES = ZCL_ENUM8_ATTRIBUTE_TYPES; +constexpr uint8_t ZCL_DOOR_LOCK_OPERATION_EVENT_CODE_ATTRIBUTE_TYPES_SIZE = ZCL_ENUM8_ATTRIBUTE_TYPES_SIZE; +constexpr uint8_t ZCL_DOOR_LOCK_PROGRAMMING_EVENT_CODE_ATTRIBUTE_TYPES = ZCL_ENUM8_ATTRIBUTE_TYPES; +constexpr uint8_t ZCL_DOOR_LOCK_PROGRAMMING_EVENT_CODE_ATTRIBUTE_TYPES_SIZE = ZCL_ENUM8_ATTRIBUTE_TYPES_SIZE; +constexpr uint8_t ZCL_DOOR_LOCK_SET_PIN_OR_ID_STATUS_ATTRIBUTE_TYPES = ZCL_ENUM8_ATTRIBUTE_TYPES; +constexpr uint8_t ZCL_DOOR_LOCK_SET_PIN_OR_ID_STATUS_ATTRIBUTE_TYPES_SIZE = ZCL_ENUM8_ATTRIBUTE_TYPES_SIZE; +constexpr uint8_t ZCL_DOOR_LOCK_USER_STATUS_ATTRIBUTE_TYPES = ZCL_ENUM8_ATTRIBUTE_TYPES; +constexpr uint8_t ZCL_DOOR_LOCK_USER_STATUS_ATTRIBUTE_TYPES_SIZE = ZCL_ENUM8_ATTRIBUTE_TYPES_SIZE; +constexpr uint8_t ZCL_DOOR_LOCK_USER_TYPE_ATTRIBUTE_TYPES = ZCL_ENUM8_ATTRIBUTE_TYPES; +constexpr uint8_t ZCL_DOOR_LOCK_USER_TYPE_ATTRIBUTE_TYPES_SIZE = ZCL_ENUM8_ATTRIBUTE_TYPES_SIZE; + +constexpr uint8_t ZCL_DL_CREDENTIAL_ATTRIBUTE_TYPES = ZCL_STRUCT_ATTRIBUTE_TYPES; +constexpr uint8_t ZCL_DL_CREDENTIAL_ATTRIBUTE_TYPES_SIZE = ZCL_STRUCT_ATTRIBUTE_TYPES_SIZE; + +constexpr uint8_t ZCL_CONFIG_STATUS_ATTRIBUTE_TYPES = ZCL_BITMAP32_ATTRIBUTE_TYPES; +constexpr uint8_t ZCL_CONFIG_STATUS_ATTRIBUTE_TYPES_SIZE = ZCL_BITMAP32_ATTRIBUTE_TYPES_SIZE; +constexpr uint8_t ZCL_FEATURE_ATTRIBUTE_TYPES = ZCL_BITMAP32_ATTRIBUTE_TYPES; +constexpr uint8_t ZCL_FEATURE_ATTRIBUTE_TYPES_SIZE = ZCL_BITMAP32_ATTRIBUTE_TYPES_SIZE; +constexpr uint8_t ZCL_MODE_ATTRIBUTE_TYPES = ZCL_BITMAP32_ATTRIBUTE_TYPES; +constexpr uint8_t ZCL_MODE_ATTRIBUTE_TYPES_SIZE = ZCL_BITMAP32_ATTRIBUTE_TYPES_SIZE; +constexpr uint8_t ZCL_OPERATIONAL_STATUS_ATTRIBUTE_TYPES = ZCL_BITMAP32_ATTRIBUTE_TYPES; +constexpr uint8_t ZCL_OPERATIONAL_STATUS_ATTRIBUTE_TYPES_SIZE = ZCL_BITMAP32_ATTRIBUTE_TYPES_SIZE; +constexpr uint8_t ZCL_SAFETY_STATUS_ATTRIBUTE_TYPES = ZCL_BITMAP32_ATTRIBUTE_TYPES; +constexpr uint8_t ZCL_SAFETY_STATUS_ATTRIBUTE_TYPES_SIZE = ZCL_BITMAP32_ATTRIBUTE_TYPES_SIZE; + +constexpr uint8_t ZCL_END_PRODUCT_TYPE_ATTRIBUTE_TYPES = ZCL_ENUM8_ATTRIBUTE_TYPES; +constexpr uint8_t ZCL_END_PRODUCT_TYPE_ATTRIBUTE_TYPES_SIZE = ZCL_ENUM8_ATTRIBUTE_TYPES_SIZE; +constexpr uint8_t ZCL_TYPE_ATTRIBUTE_TYPES = ZCL_ENUM8_ATTRIBUTE_TYPES; +constexpr uint8_t ZCL_TYPE_ATTRIBUTE_TYPES_SIZE = ZCL_ENUM8_ATTRIBUTE_TYPES_SIZE; + +constexpr uint8_t ZCL_DAY_OF_WEEK_ATTRIBUTE_TYPES = ZCL_BITMAP32_ATTRIBUTE_TYPES; +constexpr uint8_t ZCL_DAY_OF_WEEK_ATTRIBUTE_TYPES_SIZE = ZCL_BITMAP32_ATTRIBUTE_TYPES_SIZE; +constexpr uint8_t ZCL_MODE_FOR_SEQUENCE_ATTRIBUTE_TYPES = ZCL_BITMAP32_ATTRIBUTE_TYPES; +constexpr uint8_t ZCL_MODE_FOR_SEQUENCE_ATTRIBUTE_TYPES_SIZE = ZCL_BITMAP32_ATTRIBUTE_TYPES_SIZE; +constexpr uint8_t ZCL_THERMOSTAT_FEATURE_ATTRIBUTE_TYPES = ZCL_BITMAP32_ATTRIBUTE_TYPES; +constexpr uint8_t ZCL_THERMOSTAT_FEATURE_ATTRIBUTE_TYPES_SIZE = ZCL_BITMAP32_ATTRIBUTE_TYPES_SIZE; + +constexpr uint8_t ZCL_SETPOINT_ADJUST_MODE_ATTRIBUTE_TYPES = ZCL_ENUM8_ATTRIBUTE_TYPES; +constexpr uint8_t ZCL_SETPOINT_ADJUST_MODE_ATTRIBUTE_TYPES_SIZE = ZCL_ENUM8_ATTRIBUTE_TYPES_SIZE; +constexpr uint8_t ZCL_THERMOSTAT_CONTROL_SEQUENCE_ATTRIBUTE_TYPES = ZCL_ENUM8_ATTRIBUTE_TYPES; +constexpr uint8_t ZCL_THERMOSTAT_CONTROL_SEQUENCE_ATTRIBUTE_TYPES_SIZE = ZCL_ENUM8_ATTRIBUTE_TYPES_SIZE; +constexpr uint8_t ZCL_THERMOSTAT_RUNNING_MODE_ATTRIBUTE_TYPES = ZCL_ENUM8_ATTRIBUTE_TYPES; +constexpr uint8_t ZCL_THERMOSTAT_RUNNING_MODE_ATTRIBUTE_TYPES_SIZE = ZCL_ENUM8_ATTRIBUTE_TYPES_SIZE; +constexpr uint8_t ZCL_THERMOSTAT_SYSTEM_MODE_ATTRIBUTE_TYPES = ZCL_ENUM8_ATTRIBUTE_TYPES; +constexpr uint8_t ZCL_THERMOSTAT_SYSTEM_MODE_ATTRIBUTE_TYPES_SIZE = ZCL_ENUM8_ATTRIBUTE_TYPES_SIZE; + +constexpr uint8_t ZCL_THERMOSTAT_SCHEDULE_TRANSITION_ATTRIBUTE_TYPES = ZCL_STRUCT_ATTRIBUTE_TYPES; +constexpr uint8_t ZCL_THERMOSTAT_SCHEDULE_TRANSITION_ATTRIBUTE_TYPES_SIZE = ZCL_STRUCT_ATTRIBUTE_TYPES_SIZE; + +constexpr uint8_t ZCL_FAN_CONTROL_FEATURE_ATTRIBUTE_TYPES = ZCL_BITMAP32_ATTRIBUTE_TYPES; +constexpr uint8_t ZCL_FAN_CONTROL_FEATURE_ATTRIBUTE_TYPES_SIZE = ZCL_BITMAP32_ATTRIBUTE_TYPES_SIZE; +constexpr uint8_t ZCL_ROCK_SUPPORT_MASK_ATTRIBUTE_TYPES = ZCL_BITMAP32_ATTRIBUTE_TYPES; +constexpr uint8_t ZCL_ROCK_SUPPORT_MASK_ATTRIBUTE_TYPES_SIZE = ZCL_BITMAP32_ATTRIBUTE_TYPES_SIZE; +constexpr uint8_t ZCL_WIND_SETTING_MASK_ATTRIBUTE_TYPES = ZCL_BITMAP32_ATTRIBUTE_TYPES; +constexpr uint8_t ZCL_WIND_SETTING_MASK_ATTRIBUTE_TYPES_SIZE = ZCL_BITMAP32_ATTRIBUTE_TYPES_SIZE; +constexpr uint8_t ZCL_WIND_SUPPORT_MASK_ATTRIBUTE_TYPES = ZCL_BITMAP32_ATTRIBUTE_TYPES; +constexpr uint8_t ZCL_WIND_SUPPORT_MASK_ATTRIBUTE_TYPES_SIZE = ZCL_BITMAP32_ATTRIBUTE_TYPES_SIZE; + +constexpr uint8_t ZCL_FAN_MODE_SEQUENCE_TYPE_ATTRIBUTE_TYPES = ZCL_ENUM8_ATTRIBUTE_TYPES; +constexpr uint8_t ZCL_FAN_MODE_SEQUENCE_TYPE_ATTRIBUTE_TYPES_SIZE = ZCL_ENUM8_ATTRIBUTE_TYPES_SIZE; +constexpr uint8_t ZCL_FAN_MODE_TYPE_ATTRIBUTE_TYPES = ZCL_ENUM8_ATTRIBUTE_TYPES; +constexpr uint8_t ZCL_FAN_MODE_TYPE_ATTRIBUTE_TYPES_SIZE = ZCL_ENUM8_ATTRIBUTE_TYPES_SIZE; + +constexpr uint8_t ZCL_COLOR_CAPABILITIES_ATTRIBUTE_TYPES = ZCL_BITMAP32_ATTRIBUTE_TYPES; +constexpr uint8_t ZCL_COLOR_CAPABILITIES_ATTRIBUTE_TYPES_SIZE = ZCL_BITMAP32_ATTRIBUTE_TYPES_SIZE; +constexpr uint8_t ZCL_COLOR_CONTROL_FEATURE_ATTRIBUTE_TYPES = ZCL_BITMAP32_ATTRIBUTE_TYPES; +constexpr uint8_t ZCL_COLOR_CONTROL_FEATURE_ATTRIBUTE_TYPES_SIZE = ZCL_BITMAP32_ATTRIBUTE_TYPES_SIZE; +constexpr uint8_t ZCL_COLOR_LOOP_UPDATE_FLAGS_ATTRIBUTE_TYPES = ZCL_BITMAP32_ATTRIBUTE_TYPES; +constexpr uint8_t ZCL_COLOR_LOOP_UPDATE_FLAGS_ATTRIBUTE_TYPES_SIZE = ZCL_BITMAP32_ATTRIBUTE_TYPES_SIZE; + +constexpr uint8_t ZCL_COLOR_LOOP_ACTION_ATTRIBUTE_TYPES = ZCL_ENUM8_ATTRIBUTE_TYPES; +constexpr uint8_t ZCL_COLOR_LOOP_ACTION_ATTRIBUTE_TYPES_SIZE = ZCL_ENUM8_ATTRIBUTE_TYPES_SIZE; +constexpr uint8_t ZCL_COLOR_LOOP_DIRECTION_ATTRIBUTE_TYPES = ZCL_ENUM8_ATTRIBUTE_TYPES; +constexpr uint8_t ZCL_COLOR_LOOP_DIRECTION_ATTRIBUTE_TYPES_SIZE = ZCL_ENUM8_ATTRIBUTE_TYPES_SIZE; +constexpr uint8_t ZCL_COLOR_MODE_ATTRIBUTE_TYPES = ZCL_ENUM8_ATTRIBUTE_TYPES; +constexpr uint8_t ZCL_COLOR_MODE_ATTRIBUTE_TYPES_SIZE = ZCL_ENUM8_ATTRIBUTE_TYPES_SIZE; +constexpr uint8_t ZCL_HUE_DIRECTION_ATTRIBUTE_TYPES = ZCL_ENUM8_ATTRIBUTE_TYPES; +constexpr uint8_t ZCL_HUE_DIRECTION_ATTRIBUTE_TYPES_SIZE = ZCL_ENUM8_ATTRIBUTE_TYPES_SIZE; +constexpr uint8_t ZCL_HUE_MOVE_MODE_ATTRIBUTE_TYPES = ZCL_ENUM8_ATTRIBUTE_TYPES; +constexpr uint8_t ZCL_HUE_MOVE_MODE_ATTRIBUTE_TYPES_SIZE = ZCL_ENUM8_ATTRIBUTE_TYPES_SIZE; +constexpr uint8_t ZCL_HUE_STEP_MODE_ATTRIBUTE_TYPES = ZCL_ENUM8_ATTRIBUTE_TYPES; +constexpr uint8_t ZCL_HUE_STEP_MODE_ATTRIBUTE_TYPES_SIZE = ZCL_ENUM8_ATTRIBUTE_TYPES_SIZE; +constexpr uint8_t ZCL_SATURATION_MOVE_MODE_ATTRIBUTE_TYPES = ZCL_ENUM8_ATTRIBUTE_TYPES; +constexpr uint8_t ZCL_SATURATION_MOVE_MODE_ATTRIBUTE_TYPES_SIZE = ZCL_ENUM8_ATTRIBUTE_TYPES_SIZE; +constexpr uint8_t ZCL_SATURATION_STEP_MODE_ATTRIBUTE_TYPES = ZCL_ENUM8_ATTRIBUTE_TYPES; +constexpr uint8_t ZCL_SATURATION_STEP_MODE_ATTRIBUTE_TYPES_SIZE = ZCL_ENUM8_ATTRIBUTE_TYPES_SIZE; + +constexpr uint8_t ZCL_LIGHT_SENSOR_TYPE_ATTRIBUTE_TYPES = ZCL_ENUM8_ATTRIBUTE_TYPES; +constexpr uint8_t ZCL_LIGHT_SENSOR_TYPE_ATTRIBUTE_TYPES_SIZE = ZCL_ENUM8_ATTRIBUTE_TYPES_SIZE; + +constexpr uint8_t ZCL_PRESSURE_FEATURE_ATTRIBUTE_TYPES = ZCL_BITMAP32_ATTRIBUTE_TYPES; +constexpr uint8_t ZCL_PRESSURE_FEATURE_ATTRIBUTE_TYPES_SIZE = ZCL_BITMAP32_ATTRIBUTE_TYPES_SIZE; + +constexpr uint8_t ZCL_CHANNEL_FEATURE_ATTRIBUTE_TYPES = ZCL_BITMAP32_ATTRIBUTE_TYPES; +constexpr uint8_t ZCL_CHANNEL_FEATURE_ATTRIBUTE_TYPES_SIZE = ZCL_BITMAP32_ATTRIBUTE_TYPES_SIZE; + +constexpr uint8_t ZCL_CHANNEL_STATUS_ENUM_ATTRIBUTE_TYPES = ZCL_ENUM8_ATTRIBUTE_TYPES; +constexpr uint8_t ZCL_CHANNEL_STATUS_ENUM_ATTRIBUTE_TYPES_SIZE = ZCL_ENUM8_ATTRIBUTE_TYPES_SIZE; +constexpr uint8_t ZCL_LINEUP_INFO_TYPE_ENUM_ATTRIBUTE_TYPES = ZCL_ENUM8_ATTRIBUTE_TYPES; +constexpr uint8_t ZCL_LINEUP_INFO_TYPE_ENUM_ATTRIBUTE_TYPES_SIZE = ZCL_ENUM8_ATTRIBUTE_TYPES_SIZE; + +constexpr uint8_t ZCL_CHANNEL_INFO_ATTRIBUTE_TYPES = ZCL_STRUCT_ATTRIBUTE_TYPES; +constexpr uint8_t ZCL_CHANNEL_INFO_ATTRIBUTE_TYPES_SIZE = ZCL_STRUCT_ATTRIBUTE_TYPES_SIZE; +constexpr uint8_t ZCL_LINEUP_INFO_ATTRIBUTE_TYPES = ZCL_STRUCT_ATTRIBUTE_TYPES; +constexpr uint8_t ZCL_LINEUP_INFO_ATTRIBUTE_TYPES_SIZE = ZCL_STRUCT_ATTRIBUTE_TYPES_SIZE; + +constexpr uint8_t ZCL_TARGET_NAVIGATOR_STATUS_ENUM_ATTRIBUTE_TYPES = ZCL_ENUM8_ATTRIBUTE_TYPES; +constexpr uint8_t ZCL_TARGET_NAVIGATOR_STATUS_ENUM_ATTRIBUTE_TYPES_SIZE = ZCL_ENUM8_ATTRIBUTE_TYPES_SIZE; + +constexpr uint8_t ZCL_TARGET_INFO_ATTRIBUTE_TYPES = ZCL_STRUCT_ATTRIBUTE_TYPES; +constexpr uint8_t ZCL_TARGET_INFO_ATTRIBUTE_TYPES_SIZE = ZCL_STRUCT_ATTRIBUTE_TYPES_SIZE; + +constexpr uint8_t ZCL_MEDIA_PLAYBACK_FEATURE_ATTRIBUTE_TYPES = ZCL_BITMAP32_ATTRIBUTE_TYPES; +constexpr uint8_t ZCL_MEDIA_PLAYBACK_FEATURE_ATTRIBUTE_TYPES_SIZE = ZCL_BITMAP32_ATTRIBUTE_TYPES_SIZE; + +constexpr uint8_t ZCL_MEDIA_PLAYBACK_STATUS_ENUM_ATTRIBUTE_TYPES = ZCL_ENUM8_ATTRIBUTE_TYPES; +constexpr uint8_t ZCL_MEDIA_PLAYBACK_STATUS_ENUM_ATTRIBUTE_TYPES_SIZE = ZCL_ENUM8_ATTRIBUTE_TYPES_SIZE; +constexpr uint8_t ZCL_PLAYBACK_STATE_ENUM_ATTRIBUTE_TYPES = ZCL_ENUM8_ATTRIBUTE_TYPES; +constexpr uint8_t ZCL_PLAYBACK_STATE_ENUM_ATTRIBUTE_TYPES_SIZE = ZCL_ENUM8_ATTRIBUTE_TYPES_SIZE; + +constexpr uint8_t ZCL_PLAYBACK_POSITION_ATTRIBUTE_TYPES = ZCL_STRUCT_ATTRIBUTE_TYPES; +constexpr uint8_t ZCL_PLAYBACK_POSITION_ATTRIBUTE_TYPES_SIZE = ZCL_STRUCT_ATTRIBUTE_TYPES_SIZE; + +constexpr uint8_t ZCL_MEDIA_INPUT_FEATURE_ATTRIBUTE_TYPES = ZCL_BITMAP32_ATTRIBUTE_TYPES; +constexpr uint8_t ZCL_MEDIA_INPUT_FEATURE_ATTRIBUTE_TYPES_SIZE = ZCL_BITMAP32_ATTRIBUTE_TYPES_SIZE; + +constexpr uint8_t ZCL_INPUT_TYPE_ENUM_ATTRIBUTE_TYPES = ZCL_ENUM8_ATTRIBUTE_TYPES; +constexpr uint8_t ZCL_INPUT_TYPE_ENUM_ATTRIBUTE_TYPES_SIZE = ZCL_ENUM8_ATTRIBUTE_TYPES_SIZE; + +constexpr uint8_t ZCL_INPUT_INFO_ATTRIBUTE_TYPES = ZCL_STRUCT_ATTRIBUTE_TYPES; +constexpr uint8_t ZCL_INPUT_INFO_ATTRIBUTE_TYPES_SIZE = ZCL_STRUCT_ATTRIBUTE_TYPES_SIZE; + +constexpr uint8_t ZCL_KEYPAD_INPUT_FEATURE_ATTRIBUTE_TYPES = ZCL_BITMAP32_ATTRIBUTE_TYPES; +constexpr uint8_t ZCL_KEYPAD_INPUT_FEATURE_ATTRIBUTE_TYPES_SIZE = ZCL_BITMAP32_ATTRIBUTE_TYPES_SIZE; + +constexpr uint8_t ZCL_CEC_KEY_CODE_ATTRIBUTE_TYPES = ZCL_ENUM8_ATTRIBUTE_TYPES; +constexpr uint8_t ZCL_CEC_KEY_CODE_ATTRIBUTE_TYPES_SIZE = ZCL_ENUM8_ATTRIBUTE_TYPES_SIZE; +constexpr uint8_t ZCL_KEYPAD_INPUT_STATUS_ENUM_ATTRIBUTE_TYPES = ZCL_ENUM8_ATTRIBUTE_TYPES; +constexpr uint8_t ZCL_KEYPAD_INPUT_STATUS_ENUM_ATTRIBUTE_TYPES_SIZE = ZCL_ENUM8_ATTRIBUTE_TYPES_SIZE; + +constexpr uint8_t ZCL_CONTENT_LAUNCHER_FEATURE_ATTRIBUTE_TYPES = ZCL_BITMAP32_ATTRIBUTE_TYPES; +constexpr uint8_t ZCL_CONTENT_LAUNCHER_FEATURE_ATTRIBUTE_TYPES_SIZE = ZCL_BITMAP32_ATTRIBUTE_TYPES_SIZE; +constexpr uint8_t ZCL_SUPPORTED_STREAMING_PROTOCOL_ATTRIBUTE_TYPES = ZCL_BITMAP32_ATTRIBUTE_TYPES; +constexpr uint8_t ZCL_SUPPORTED_STREAMING_PROTOCOL_ATTRIBUTE_TYPES_SIZE = ZCL_BITMAP32_ATTRIBUTE_TYPES_SIZE; + +constexpr uint8_t ZCL_CONTENT_LAUNCH_STATUS_ENUM_ATTRIBUTE_TYPES = ZCL_ENUM8_ATTRIBUTE_TYPES; +constexpr uint8_t ZCL_CONTENT_LAUNCH_STATUS_ENUM_ATTRIBUTE_TYPES_SIZE = ZCL_ENUM8_ATTRIBUTE_TYPES_SIZE; +constexpr uint8_t ZCL_METRIC_TYPE_ENUM_ATTRIBUTE_TYPES = ZCL_ENUM8_ATTRIBUTE_TYPES; +constexpr uint8_t ZCL_METRIC_TYPE_ENUM_ATTRIBUTE_TYPES_SIZE = ZCL_ENUM8_ATTRIBUTE_TYPES_SIZE; +constexpr uint8_t ZCL_PARAMETER_ENUM_ATTRIBUTE_TYPES = ZCL_ENUM8_ATTRIBUTE_TYPES; +constexpr uint8_t ZCL_PARAMETER_ENUM_ATTRIBUTE_TYPES_SIZE = ZCL_ENUM8_ATTRIBUTE_TYPES_SIZE; + +constexpr uint8_t ZCL_DIMENSION_ATTRIBUTE_TYPES = ZCL_STRUCT_ATTRIBUTE_TYPES; +constexpr uint8_t ZCL_DIMENSION_ATTRIBUTE_TYPES_SIZE = ZCL_STRUCT_ATTRIBUTE_TYPES_SIZE; +constexpr uint8_t ZCL_ADDITIONAL_INFO_ATTRIBUTE_TYPES = ZCL_STRUCT_ATTRIBUTE_TYPES; +constexpr uint8_t ZCL_ADDITIONAL_INFO_ATTRIBUTE_TYPES_SIZE = ZCL_STRUCT_ATTRIBUTE_TYPES_SIZE; +constexpr uint8_t ZCL_PARAMETER_ATTRIBUTE_TYPES = ZCL_STRUCT_ATTRIBUTE_TYPES; +constexpr uint8_t ZCL_PARAMETER_ATTRIBUTE_TYPES_SIZE = ZCL_STRUCT_ATTRIBUTE_TYPES_SIZE; +constexpr uint8_t ZCL_CONTENT_SEARCH_ATTRIBUTE_TYPES = ZCL_STRUCT_ATTRIBUTE_TYPES; +constexpr uint8_t ZCL_CONTENT_SEARCH_ATTRIBUTE_TYPES_SIZE = ZCL_STRUCT_ATTRIBUTE_TYPES_SIZE; +constexpr uint8_t ZCL_STYLE_INFORMATION_ATTRIBUTE_TYPES = ZCL_STRUCT_ATTRIBUTE_TYPES; +constexpr uint8_t ZCL_STYLE_INFORMATION_ATTRIBUTE_TYPES_SIZE = ZCL_STRUCT_ATTRIBUTE_TYPES_SIZE; +constexpr uint8_t ZCL_BRANDING_INFORMATION_ATTRIBUTE_TYPES = ZCL_STRUCT_ATTRIBUTE_TYPES; +constexpr uint8_t ZCL_BRANDING_INFORMATION_ATTRIBUTE_TYPES_SIZE = ZCL_STRUCT_ATTRIBUTE_TYPES_SIZE; + +constexpr uint8_t ZCL_AUDIO_OUTPUT_FEATURE_ATTRIBUTE_TYPES = ZCL_BITMAP32_ATTRIBUTE_TYPES; +constexpr uint8_t ZCL_AUDIO_OUTPUT_FEATURE_ATTRIBUTE_TYPES_SIZE = ZCL_BITMAP32_ATTRIBUTE_TYPES_SIZE; + +constexpr uint8_t ZCL_OUTPUT_TYPE_ENUM_ATTRIBUTE_TYPES = ZCL_ENUM8_ATTRIBUTE_TYPES; +constexpr uint8_t ZCL_OUTPUT_TYPE_ENUM_ATTRIBUTE_TYPES_SIZE = ZCL_ENUM8_ATTRIBUTE_TYPES_SIZE; + +constexpr uint8_t ZCL_OUTPUT_INFO_ATTRIBUTE_TYPES = ZCL_STRUCT_ATTRIBUTE_TYPES; +constexpr uint8_t ZCL_OUTPUT_INFO_ATTRIBUTE_TYPES_SIZE = ZCL_STRUCT_ATTRIBUTE_TYPES_SIZE; + +constexpr uint8_t ZCL_APPLICATION_LAUNCHER_FEATURE_ATTRIBUTE_TYPES = ZCL_BITMAP32_ATTRIBUTE_TYPES; +constexpr uint8_t ZCL_APPLICATION_LAUNCHER_FEATURE_ATTRIBUTE_TYPES_SIZE = ZCL_BITMAP32_ATTRIBUTE_TYPES_SIZE; + +constexpr uint8_t ZCL_APPLICATION_LAUNCHER_STATUS_ENUM_ATTRIBUTE_TYPES = ZCL_ENUM8_ATTRIBUTE_TYPES; +constexpr uint8_t ZCL_APPLICATION_LAUNCHER_STATUS_ENUM_ATTRIBUTE_TYPES_SIZE = ZCL_ENUM8_ATTRIBUTE_TYPES_SIZE; + +constexpr uint8_t ZCL_APPLICATION_ATTRIBUTE_TYPES = ZCL_STRUCT_ATTRIBUTE_TYPES; +constexpr uint8_t ZCL_APPLICATION_ATTRIBUTE_TYPES_SIZE = ZCL_STRUCT_ATTRIBUTE_TYPES_SIZE; +constexpr uint8_t ZCL_APPLICATION_EP_ATTRIBUTE_TYPES = ZCL_STRUCT_ATTRIBUTE_TYPES; +constexpr uint8_t ZCL_APPLICATION_EP_ATTRIBUTE_TYPES_SIZE = ZCL_STRUCT_ATTRIBUTE_TYPES_SIZE; + +constexpr uint8_t ZCL_APPLICATION_STATUS_ENUM_ATTRIBUTE_TYPES = ZCL_ENUM8_ATTRIBUTE_TYPES; +constexpr uint8_t ZCL_APPLICATION_STATUS_ENUM_ATTRIBUTE_TYPES_SIZE = ZCL_ENUM8_ATTRIBUTE_TYPES_SIZE; + +constexpr uint8_t ZCL_APPLICATION_BASIC_APPLICATION_ATTRIBUTE_TYPES = ZCL_STRUCT_ATTRIBUTE_TYPES; +constexpr uint8_t ZCL_APPLICATION_BASIC_APPLICATION_ATTRIBUTE_TYPES_SIZE = ZCL_STRUCT_ATTRIBUTE_TYPES_SIZE; + +attr_type_size get_attribute_type_size(uint16_t cluster_id, uint16_t attribute_id) +{ + switch (cluster_id) + { + case chip::app::Clusters::Identify::Id: { + switch (attribute_id) + { + case Identify::Attributes::IdentifyTime::Id: { + return { ZCL_INT16U_ATTRIBUTE_TYPES, ZCL_INT16U_ATTRIBUTE_TYPES_SIZE }; + } + case Identify::Attributes::IdentifyType::Id: { + return { ZCL_ENUM8_ATTRIBUTE_TYPES, ZCL_ENUM8_ATTRIBUTE_TYPES_SIZE }; + } + case Identify::Attributes::GeneratedCommandList::Id: { + return { ZCL_ARRAY_ATTRIBUTE_TYPES, ZCL_ARRAY_ATTRIBUTE_TYPES_SIZE }; + } + case Identify::Attributes::AcceptedCommandList::Id: { + return { ZCL_ARRAY_ATTRIBUTE_TYPES, ZCL_ARRAY_ATTRIBUTE_TYPES_SIZE }; + } + case Identify::Attributes::AttributeList::Id: { + return { ZCL_ARRAY_ATTRIBUTE_TYPES, ZCL_ARRAY_ATTRIBUTE_TYPES_SIZE }; + } + case Identify::Attributes::FeatureMap::Id: { + return { ZCL_BITMAP32_ATTRIBUTE_TYPES, ZCL_BITMAP32_ATTRIBUTE_TYPES_SIZE }; + } + case Identify::Attributes::ClusterRevision::Id: { + return { ZCL_INT16U_ATTRIBUTE_TYPES, ZCL_INT16U_ATTRIBUTE_TYPES_SIZE }; + } + default: + return { ZCL_BOOLEAN_ATTRIBUTE_TYPES, 0x01 }; + } + } + case chip::app::Clusters::Scenes::Id: { + switch (attribute_id) + { + case Scenes::Attributes::SceneCount::Id: { + return { ZCL_INT8U_ATTRIBUTE_TYPES, ZCL_INT8U_ATTRIBUTE_TYPES_SIZE }; + } + case Scenes::Attributes::CurrentScene::Id: { + return { ZCL_INT8U_ATTRIBUTE_TYPES, ZCL_INT8U_ATTRIBUTE_TYPES_SIZE }; + } + case Scenes::Attributes::CurrentGroup::Id: { + return { ZCL_GROUP_ID_ATTRIBUTE_TYPES, ZCL_GROUP_ID_ATTRIBUTE_TYPES_SIZE }; + } + case Scenes::Attributes::SceneValid::Id: { + return { ZCL_BOOLEAN_ATTRIBUTE_TYPES, ZCL_BOOLEAN_ATTRIBUTE_TYPES_SIZE }; + } + case Scenes::Attributes::NameSupport::Id: { + return { ZCL_BITMAP8_ATTRIBUTE_TYPES, ZCL_BITMAP8_ATTRIBUTE_TYPES_SIZE }; + } + case Scenes::Attributes::LastConfiguredBy::Id: { + return { ZCL_NODE_ID_ATTRIBUTE_TYPES, ZCL_NODE_ID_ATTRIBUTE_TYPES_SIZE }; + } + case Scenes::Attributes::GeneratedCommandList::Id: { + return { ZCL_ARRAY_ATTRIBUTE_TYPES, ZCL_ARRAY_ATTRIBUTE_TYPES_SIZE }; + } + case Scenes::Attributes::AcceptedCommandList::Id: { + return { ZCL_ARRAY_ATTRIBUTE_TYPES, ZCL_ARRAY_ATTRIBUTE_TYPES_SIZE }; + } + case Scenes::Attributes::AttributeList::Id: { + return { ZCL_ARRAY_ATTRIBUTE_TYPES, ZCL_ARRAY_ATTRIBUTE_TYPES_SIZE }; + } + case Scenes::Attributes::FeatureMap::Id: { + return { ZCL_BITMAP32_ATTRIBUTE_TYPES, ZCL_BITMAP32_ATTRIBUTE_TYPES_SIZE }; + } + case Scenes::Attributes::ClusterRevision::Id: { + return { ZCL_INT16U_ATTRIBUTE_TYPES, ZCL_INT16U_ATTRIBUTE_TYPES_SIZE }; + } + default: + return { ZCL_BOOLEAN_ATTRIBUTE_TYPES, 0x01 }; + } + } + case chip::app::Clusters::OnOff::Id: { + switch (attribute_id) + { + case OnOff::Attributes::OnOff::Id: { + return { ZCL_BOOLEAN_ATTRIBUTE_TYPES, ZCL_BOOLEAN_ATTRIBUTE_TYPES_SIZE }; + } + case OnOff::Attributes::GlobalSceneControl::Id: { + return { ZCL_BOOLEAN_ATTRIBUTE_TYPES, ZCL_BOOLEAN_ATTRIBUTE_TYPES_SIZE }; + } + case OnOff::Attributes::OnTime::Id: { + return { ZCL_INT16U_ATTRIBUTE_TYPES, ZCL_INT16U_ATTRIBUTE_TYPES_SIZE }; + } + case OnOff::Attributes::OffWaitTime::Id: { + return { ZCL_INT16U_ATTRIBUTE_TYPES, ZCL_INT16U_ATTRIBUTE_TYPES_SIZE }; + } + case OnOff::Attributes::StartUpOnOff::Id: { + return { ZCL_ON_OFF_START_UP_ON_OFF_ATTRIBUTE_TYPES, ZCL_ON_OFF_START_UP_ON_OFF_ATTRIBUTE_TYPES_SIZE }; + } + case OnOff::Attributes::GeneratedCommandList::Id: { + return { ZCL_ARRAY_ATTRIBUTE_TYPES, ZCL_ARRAY_ATTRIBUTE_TYPES_SIZE }; + } + case OnOff::Attributes::AcceptedCommandList::Id: { + return { ZCL_ARRAY_ATTRIBUTE_TYPES, ZCL_ARRAY_ATTRIBUTE_TYPES_SIZE }; + } + case OnOff::Attributes::AttributeList::Id: { + return { ZCL_ARRAY_ATTRIBUTE_TYPES, ZCL_ARRAY_ATTRIBUTE_TYPES_SIZE }; + } + case OnOff::Attributes::FeatureMap::Id: { + return { ZCL_BITMAP32_ATTRIBUTE_TYPES, ZCL_BITMAP32_ATTRIBUTE_TYPES_SIZE }; + } + case OnOff::Attributes::ClusterRevision::Id: { + return { ZCL_INT16U_ATTRIBUTE_TYPES, ZCL_INT16U_ATTRIBUTE_TYPES_SIZE }; + } + default: + return { ZCL_BOOLEAN_ATTRIBUTE_TYPES, 0x01 }; + } + } + case chip::app::Clusters::OnOffSwitchConfiguration::Id: { + switch (attribute_id) + { + case OnOffSwitchConfiguration::Attributes::SwitchType::Id: { + return { ZCL_ENUM8_ATTRIBUTE_TYPES, ZCL_ENUM8_ATTRIBUTE_TYPES_SIZE }; + } + case OnOffSwitchConfiguration::Attributes::SwitchActions::Id: { + return { ZCL_ENUM8_ATTRIBUTE_TYPES, ZCL_ENUM8_ATTRIBUTE_TYPES_SIZE }; + } + case OnOffSwitchConfiguration::Attributes::GeneratedCommandList::Id: { + return { ZCL_ARRAY_ATTRIBUTE_TYPES, ZCL_ARRAY_ATTRIBUTE_TYPES_SIZE }; + } + case OnOffSwitchConfiguration::Attributes::AcceptedCommandList::Id: { + return { ZCL_ARRAY_ATTRIBUTE_TYPES, ZCL_ARRAY_ATTRIBUTE_TYPES_SIZE }; + } + case OnOffSwitchConfiguration::Attributes::AttributeList::Id: { + return { ZCL_ARRAY_ATTRIBUTE_TYPES, ZCL_ARRAY_ATTRIBUTE_TYPES_SIZE }; + } + case OnOffSwitchConfiguration::Attributes::FeatureMap::Id: { + return { ZCL_BITMAP32_ATTRIBUTE_TYPES, ZCL_BITMAP32_ATTRIBUTE_TYPES_SIZE }; + } + case OnOffSwitchConfiguration::Attributes::ClusterRevision::Id: { + return { ZCL_INT16U_ATTRIBUTE_TYPES, ZCL_INT16U_ATTRIBUTE_TYPES_SIZE }; + } + default: + return { ZCL_BOOLEAN_ATTRIBUTE_TYPES, 0x01 }; + } + } + case chip::app::Clusters::LevelControl::Id: { + switch (attribute_id) + { + case LevelControl::Attributes::CurrentLevel::Id: { + return { ZCL_INT8U_ATTRIBUTE_TYPES, ZCL_INT8U_ATTRIBUTE_TYPES_SIZE }; + } + case LevelControl::Attributes::RemainingTime::Id: { + return { ZCL_INT16U_ATTRIBUTE_TYPES, ZCL_INT16U_ATTRIBUTE_TYPES_SIZE }; + } + case LevelControl::Attributes::MinLevel::Id: { + return { ZCL_INT8U_ATTRIBUTE_TYPES, ZCL_INT8U_ATTRIBUTE_TYPES_SIZE }; + } + case LevelControl::Attributes::MaxLevel::Id: { + return { ZCL_INT8U_ATTRIBUTE_TYPES, ZCL_INT8U_ATTRIBUTE_TYPES_SIZE }; + } + case LevelControl::Attributes::CurrentFrequency::Id: { + return { ZCL_INT16U_ATTRIBUTE_TYPES, ZCL_INT16U_ATTRIBUTE_TYPES_SIZE }; + } + case LevelControl::Attributes::MinFrequency::Id: { + return { ZCL_INT16U_ATTRIBUTE_TYPES, ZCL_INT16U_ATTRIBUTE_TYPES_SIZE }; + } + case LevelControl::Attributes::MaxFrequency::Id: { + return { ZCL_INT16U_ATTRIBUTE_TYPES, ZCL_INT16U_ATTRIBUTE_TYPES_SIZE }; + } + case LevelControl::Attributes::Options::Id: { + return { ZCL_BITMAP8_ATTRIBUTE_TYPES, ZCL_BITMAP8_ATTRIBUTE_TYPES_SIZE }; + } + case LevelControl::Attributes::OnOffTransitionTime::Id: { + return { ZCL_INT16U_ATTRIBUTE_TYPES, ZCL_INT16U_ATTRIBUTE_TYPES_SIZE }; + } + case LevelControl::Attributes::OnLevel::Id: { + return { ZCL_INT8U_ATTRIBUTE_TYPES, ZCL_INT8U_ATTRIBUTE_TYPES_SIZE }; + } + case LevelControl::Attributes::OnTransitionTime::Id: { + return { ZCL_INT16U_ATTRIBUTE_TYPES, ZCL_INT16U_ATTRIBUTE_TYPES_SIZE }; + } + case LevelControl::Attributes::OffTransitionTime::Id: { + return { ZCL_INT16U_ATTRIBUTE_TYPES, ZCL_INT16U_ATTRIBUTE_TYPES_SIZE }; + } + case LevelControl::Attributes::DefaultMoveRate::Id: { + return { ZCL_INT8U_ATTRIBUTE_TYPES, ZCL_INT8U_ATTRIBUTE_TYPES_SIZE }; + } + case LevelControl::Attributes::StartUpCurrentLevel::Id: { + return { ZCL_INT8U_ATTRIBUTE_TYPES, ZCL_INT8U_ATTRIBUTE_TYPES_SIZE }; + } + case LevelControl::Attributes::GeneratedCommandList::Id: { + return { ZCL_ARRAY_ATTRIBUTE_TYPES, ZCL_ARRAY_ATTRIBUTE_TYPES_SIZE }; + } + case LevelControl::Attributes::AcceptedCommandList::Id: { + return { ZCL_ARRAY_ATTRIBUTE_TYPES, ZCL_ARRAY_ATTRIBUTE_TYPES_SIZE }; + } + case LevelControl::Attributes::AttributeList::Id: { + return { ZCL_ARRAY_ATTRIBUTE_TYPES, ZCL_ARRAY_ATTRIBUTE_TYPES_SIZE }; + } + case LevelControl::Attributes::FeatureMap::Id: { + return { ZCL_BITMAP32_ATTRIBUTE_TYPES, ZCL_BITMAP32_ATTRIBUTE_TYPES_SIZE }; + } + case LevelControl::Attributes::ClusterRevision::Id: { + return { ZCL_INT16U_ATTRIBUTE_TYPES, ZCL_INT16U_ATTRIBUTE_TYPES_SIZE }; + } + default: + return { ZCL_BOOLEAN_ATTRIBUTE_TYPES, 0x01 }; + } + } + case chip::app::Clusters::BinaryInputBasic::Id: { + switch (attribute_id) + { + case BinaryInputBasic::Attributes::ActiveText::Id: { + return { ZCL_CHAR_STRING_ATTRIBUTE_TYPES, ZCL_CHAR_STRING_ATTRIBUTE_TYPES_SIZE }; + } + case BinaryInputBasic::Attributes::Description::Id: { + return { ZCL_CHAR_STRING_ATTRIBUTE_TYPES, ZCL_CHAR_STRING_ATTRIBUTE_TYPES_SIZE }; + } + case BinaryInputBasic::Attributes::InactiveText::Id: { + return { ZCL_CHAR_STRING_ATTRIBUTE_TYPES, ZCL_CHAR_STRING_ATTRIBUTE_TYPES_SIZE }; + } + case BinaryInputBasic::Attributes::OutOfService::Id: { + return { ZCL_BOOLEAN_ATTRIBUTE_TYPES, ZCL_BOOLEAN_ATTRIBUTE_TYPES_SIZE }; + } + case BinaryInputBasic::Attributes::Polarity::Id: { + return { ZCL_ENUM8_ATTRIBUTE_TYPES, ZCL_ENUM8_ATTRIBUTE_TYPES_SIZE }; + } + case BinaryInputBasic::Attributes::PresentValue::Id: { + return { ZCL_BOOLEAN_ATTRIBUTE_TYPES, ZCL_BOOLEAN_ATTRIBUTE_TYPES_SIZE }; + } + case BinaryInputBasic::Attributes::Reliability::Id: { + return { ZCL_ENUM8_ATTRIBUTE_TYPES, ZCL_ENUM8_ATTRIBUTE_TYPES_SIZE }; + } + case BinaryInputBasic::Attributes::StatusFlags::Id: { + return { ZCL_BITMAP8_ATTRIBUTE_TYPES, ZCL_BITMAP8_ATTRIBUTE_TYPES_SIZE }; + } + case BinaryInputBasic::Attributes::ApplicationType::Id: { + return { ZCL_INT32U_ATTRIBUTE_TYPES, ZCL_INT32U_ATTRIBUTE_TYPES_SIZE }; + } + case BinaryInputBasic::Attributes::GeneratedCommandList::Id: { + return { ZCL_ARRAY_ATTRIBUTE_TYPES, ZCL_ARRAY_ATTRIBUTE_TYPES_SIZE }; + } + case BinaryInputBasic::Attributes::AcceptedCommandList::Id: { + return { ZCL_ARRAY_ATTRIBUTE_TYPES, ZCL_ARRAY_ATTRIBUTE_TYPES_SIZE }; + } + case BinaryInputBasic::Attributes::AttributeList::Id: { + return { ZCL_ARRAY_ATTRIBUTE_TYPES, ZCL_ARRAY_ATTRIBUTE_TYPES_SIZE }; + } + case BinaryInputBasic::Attributes::FeatureMap::Id: { + return { ZCL_BITMAP32_ATTRIBUTE_TYPES, ZCL_BITMAP32_ATTRIBUTE_TYPES_SIZE }; + } + case BinaryInputBasic::Attributes::ClusterRevision::Id: { + return { ZCL_INT16U_ATTRIBUTE_TYPES, ZCL_INT16U_ATTRIBUTE_TYPES_SIZE }; + } + default: + return { ZCL_BOOLEAN_ATTRIBUTE_TYPES, 0x01 }; + } + } + case chip::app::Clusters::PulseWidthModulation::Id: { + switch (attribute_id) + { + case PulseWidthModulation::Attributes::GeneratedCommandList::Id: { + return { ZCL_ARRAY_ATTRIBUTE_TYPES, ZCL_ARRAY_ATTRIBUTE_TYPES_SIZE }; + } + case PulseWidthModulation::Attributes::AcceptedCommandList::Id: { + return { ZCL_ARRAY_ATTRIBUTE_TYPES, ZCL_ARRAY_ATTRIBUTE_TYPES_SIZE }; + } + case PulseWidthModulation::Attributes::AttributeList::Id: { + return { ZCL_ARRAY_ATTRIBUTE_TYPES, ZCL_ARRAY_ATTRIBUTE_TYPES_SIZE }; + } + case PulseWidthModulation::Attributes::FeatureMap::Id: { + return { ZCL_BITMAP32_ATTRIBUTE_TYPES, ZCL_BITMAP32_ATTRIBUTE_TYPES_SIZE }; + } + case PulseWidthModulation::Attributes::ClusterRevision::Id: { + return { ZCL_INT16U_ATTRIBUTE_TYPES, ZCL_INT16U_ATTRIBUTE_TYPES_SIZE }; + } + default: + return { ZCL_BOOLEAN_ATTRIBUTE_TYPES, 0x01 }; + } + } + case chip::app::Clusters::Basic::Id: { + switch (attribute_id) + { + case Basic::Attributes::DataModelRevision::Id: { + return { ZCL_INT16U_ATTRIBUTE_TYPES, ZCL_INT16U_ATTRIBUTE_TYPES_SIZE }; + } + case Basic::Attributes::VendorName::Id: { + return { ZCL_CHAR_STRING_ATTRIBUTE_TYPES, ZCL_CHAR_STRING_ATTRIBUTE_TYPES_SIZE }; + } + case Basic::Attributes::VendorID::Id: { + return { ZCL_VENDOR_ID_ATTRIBUTE_TYPES, ZCL_VENDOR_ID_ATTRIBUTE_TYPES_SIZE }; + } + case Basic::Attributes::ProductName::Id: { + return { ZCL_CHAR_STRING_ATTRIBUTE_TYPES, ZCL_CHAR_STRING_ATTRIBUTE_TYPES_SIZE }; + } + case Basic::Attributes::ProductID::Id: { + return { ZCL_INT16U_ATTRIBUTE_TYPES, ZCL_INT16U_ATTRIBUTE_TYPES_SIZE }; + } + case Basic::Attributes::NodeLabel::Id: { + return { ZCL_CHAR_STRING_ATTRIBUTE_TYPES, ZCL_CHAR_STRING_ATTRIBUTE_TYPES_SIZE }; + } + case Basic::Attributes::Location::Id: { + return { ZCL_CHAR_STRING_ATTRIBUTE_TYPES, ZCL_CHAR_STRING_ATTRIBUTE_TYPES_SIZE }; + } + case Basic::Attributes::HardwareVersion::Id: { + return { ZCL_INT16U_ATTRIBUTE_TYPES, ZCL_INT16U_ATTRIBUTE_TYPES_SIZE }; + } + case Basic::Attributes::HardwareVersionString::Id: { + return { ZCL_CHAR_STRING_ATTRIBUTE_TYPES, ZCL_CHAR_STRING_ATTRIBUTE_TYPES_SIZE }; + } + case Basic::Attributes::SoftwareVersion::Id: { + return { ZCL_INT32U_ATTRIBUTE_TYPES, ZCL_INT32U_ATTRIBUTE_TYPES_SIZE }; + } + case Basic::Attributes::SoftwareVersionString::Id: { + return { ZCL_CHAR_STRING_ATTRIBUTE_TYPES, ZCL_CHAR_STRING_ATTRIBUTE_TYPES_SIZE }; + } + case Basic::Attributes::ManufacturingDate::Id: { + return { ZCL_CHAR_STRING_ATTRIBUTE_TYPES, ZCL_CHAR_STRING_ATTRIBUTE_TYPES_SIZE }; + } + case Basic::Attributes::PartNumber::Id: { + return { ZCL_CHAR_STRING_ATTRIBUTE_TYPES, ZCL_CHAR_STRING_ATTRIBUTE_TYPES_SIZE }; + } + case Basic::Attributes::ProductURL::Id: { + return { ZCL_LONG_CHAR_STRING_ATTRIBUTE_TYPES, ZCL_LONG_CHAR_STRING_ATTRIBUTE_TYPES_SIZE }; + } + case Basic::Attributes::ProductLabel::Id: { + return { ZCL_CHAR_STRING_ATTRIBUTE_TYPES, ZCL_CHAR_STRING_ATTRIBUTE_TYPES_SIZE }; + } + case Basic::Attributes::SerialNumber::Id: { + return { ZCL_CHAR_STRING_ATTRIBUTE_TYPES, ZCL_CHAR_STRING_ATTRIBUTE_TYPES_SIZE }; + } + case Basic::Attributes::LocalConfigDisabled::Id: { + return { ZCL_BOOLEAN_ATTRIBUTE_TYPES, ZCL_BOOLEAN_ATTRIBUTE_TYPES_SIZE }; + } + case Basic::Attributes::Reachable::Id: { + return { ZCL_BOOLEAN_ATTRIBUTE_TYPES, ZCL_BOOLEAN_ATTRIBUTE_TYPES_SIZE }; + } + case Basic::Attributes::UniqueID::Id: { + return { ZCL_CHAR_STRING_ATTRIBUTE_TYPES, ZCL_CHAR_STRING_ATTRIBUTE_TYPES_SIZE }; + } + case Basic::Attributes::CapabilityMinima::Id: { + return { ZCL_CAPABILITY_MINIMA_STRUCT_ATTRIBUTE_TYPES, ZCL_CAPABILITY_MINIMA_STRUCT_ATTRIBUTE_TYPES_SIZE }; + } + case Basic::Attributes::GeneratedCommandList::Id: { + return { ZCL_ARRAY_ATTRIBUTE_TYPES, ZCL_ARRAY_ATTRIBUTE_TYPES_SIZE }; + } + case Basic::Attributes::AcceptedCommandList::Id: { + return { ZCL_ARRAY_ATTRIBUTE_TYPES, ZCL_ARRAY_ATTRIBUTE_TYPES_SIZE }; + } + case Basic::Attributes::AttributeList::Id: { + return { ZCL_ARRAY_ATTRIBUTE_TYPES, ZCL_ARRAY_ATTRIBUTE_TYPES_SIZE }; + } + case Basic::Attributes::FeatureMap::Id: { + return { ZCL_BITMAP32_ATTRIBUTE_TYPES, ZCL_BITMAP32_ATTRIBUTE_TYPES_SIZE }; + } + case Basic::Attributes::ClusterRevision::Id: { + return { ZCL_INT16U_ATTRIBUTE_TYPES, ZCL_INT16U_ATTRIBUTE_TYPES_SIZE }; + } + default: + return { ZCL_BOOLEAN_ATTRIBUTE_TYPES, 0x01 }; + } + } + case chip::app::Clusters::OtaSoftwareUpdateProvider::Id: { + switch (attribute_id) + { + case OtaSoftwareUpdateProvider::Attributes::GeneratedCommandList::Id: { + return { ZCL_ARRAY_ATTRIBUTE_TYPES, ZCL_ARRAY_ATTRIBUTE_TYPES_SIZE }; + } + case OtaSoftwareUpdateProvider::Attributes::AcceptedCommandList::Id: { + return { ZCL_ARRAY_ATTRIBUTE_TYPES, ZCL_ARRAY_ATTRIBUTE_TYPES_SIZE }; + } + case OtaSoftwareUpdateProvider::Attributes::AttributeList::Id: { + return { ZCL_ARRAY_ATTRIBUTE_TYPES, ZCL_ARRAY_ATTRIBUTE_TYPES_SIZE }; + } + case OtaSoftwareUpdateProvider::Attributes::FeatureMap::Id: { + return { ZCL_BITMAP32_ATTRIBUTE_TYPES, ZCL_BITMAP32_ATTRIBUTE_TYPES_SIZE }; + } + case OtaSoftwareUpdateProvider::Attributes::ClusterRevision::Id: { + return { ZCL_INT16U_ATTRIBUTE_TYPES, ZCL_INT16U_ATTRIBUTE_TYPES_SIZE }; + } + default: + return { ZCL_BOOLEAN_ATTRIBUTE_TYPES, 0x01 }; + } + } + case chip::app::Clusters::OtaSoftwareUpdateRequestor::Id: { + switch (attribute_id) + { + case OtaSoftwareUpdateRequestor::Attributes::DefaultOtaProviders::Id: { + return { ZCL_ARRAY_ATTRIBUTE_TYPES, ZCL_ARRAY_ATTRIBUTE_TYPES_SIZE }; + } + case OtaSoftwareUpdateRequestor::Attributes::UpdatePossible::Id: { + return { ZCL_BOOLEAN_ATTRIBUTE_TYPES, ZCL_BOOLEAN_ATTRIBUTE_TYPES_SIZE }; + } + case OtaSoftwareUpdateRequestor::Attributes::UpdateState::Id: { + return { ZCL_OTA_UPDATE_STATE_ENUM_ATTRIBUTE_TYPES, ZCL_OTA_UPDATE_STATE_ENUM_ATTRIBUTE_TYPES_SIZE }; + } + case OtaSoftwareUpdateRequestor::Attributes::UpdateStateProgress::Id: { + return { ZCL_INT8U_ATTRIBUTE_TYPES, ZCL_INT8U_ATTRIBUTE_TYPES_SIZE }; + } + case OtaSoftwareUpdateRequestor::Attributes::GeneratedCommandList::Id: { + return { ZCL_ARRAY_ATTRIBUTE_TYPES, ZCL_ARRAY_ATTRIBUTE_TYPES_SIZE }; + } + case OtaSoftwareUpdateRequestor::Attributes::AcceptedCommandList::Id: { + return { ZCL_ARRAY_ATTRIBUTE_TYPES, ZCL_ARRAY_ATTRIBUTE_TYPES_SIZE }; + } + case OtaSoftwareUpdateRequestor::Attributes::AttributeList::Id: { + return { ZCL_ARRAY_ATTRIBUTE_TYPES, ZCL_ARRAY_ATTRIBUTE_TYPES_SIZE }; + } + case OtaSoftwareUpdateRequestor::Attributes::FeatureMap::Id: { + return { ZCL_BITMAP32_ATTRIBUTE_TYPES, ZCL_BITMAP32_ATTRIBUTE_TYPES_SIZE }; + } + case OtaSoftwareUpdateRequestor::Attributes::ClusterRevision::Id: { + return { ZCL_INT16U_ATTRIBUTE_TYPES, ZCL_INT16U_ATTRIBUTE_TYPES_SIZE }; + } + default: + return { ZCL_BOOLEAN_ATTRIBUTE_TYPES, 0x01 }; + } + } + case chip::app::Clusters::LocalizationConfiguration::Id: { + switch (attribute_id) + { + case LocalizationConfiguration::Attributes::ActiveLocale::Id: { + return { ZCL_CHAR_STRING_ATTRIBUTE_TYPES, ZCL_CHAR_STRING_ATTRIBUTE_TYPES_SIZE }; + } + case LocalizationConfiguration::Attributes::SupportedLocales::Id: { + return { ZCL_ARRAY_ATTRIBUTE_TYPES, ZCL_ARRAY_ATTRIBUTE_TYPES_SIZE }; + } + case LocalizationConfiguration::Attributes::GeneratedCommandList::Id: { + return { ZCL_ARRAY_ATTRIBUTE_TYPES, ZCL_ARRAY_ATTRIBUTE_TYPES_SIZE }; + } + case LocalizationConfiguration::Attributes::AcceptedCommandList::Id: { + return { ZCL_ARRAY_ATTRIBUTE_TYPES, ZCL_ARRAY_ATTRIBUTE_TYPES_SIZE }; + } + case LocalizationConfiguration::Attributes::AttributeList::Id: { + return { ZCL_ARRAY_ATTRIBUTE_TYPES, ZCL_ARRAY_ATTRIBUTE_TYPES_SIZE }; + } + case LocalizationConfiguration::Attributes::FeatureMap::Id: { + return { ZCL_BITMAP32_ATTRIBUTE_TYPES, ZCL_BITMAP32_ATTRIBUTE_TYPES_SIZE }; + } + case LocalizationConfiguration::Attributes::ClusterRevision::Id: { + return { ZCL_INT16U_ATTRIBUTE_TYPES, ZCL_INT16U_ATTRIBUTE_TYPES_SIZE }; + } + default: + return { ZCL_BOOLEAN_ATTRIBUTE_TYPES, 0x01 }; + } + } + case chip::app::Clusters::TimeFormatLocalization::Id: { + switch (attribute_id) + { + case TimeFormatLocalization::Attributes::HourFormat::Id: { + return { ZCL_HOUR_FORMAT_ATTRIBUTE_TYPES, ZCL_HOUR_FORMAT_ATTRIBUTE_TYPES_SIZE }; + } + case TimeFormatLocalization::Attributes::ActiveCalendarType::Id: { + return { ZCL_CALENDAR_TYPE_ATTRIBUTE_TYPES, ZCL_CALENDAR_TYPE_ATTRIBUTE_TYPES_SIZE }; + } + case TimeFormatLocalization::Attributes::SupportedCalendarTypes::Id: { + return { ZCL_ARRAY_ATTRIBUTE_TYPES, ZCL_ARRAY_ATTRIBUTE_TYPES_SIZE }; + } + case TimeFormatLocalization::Attributes::GeneratedCommandList::Id: { + return { ZCL_ARRAY_ATTRIBUTE_TYPES, ZCL_ARRAY_ATTRIBUTE_TYPES_SIZE }; + } + case TimeFormatLocalization::Attributes::AcceptedCommandList::Id: { + return { ZCL_ARRAY_ATTRIBUTE_TYPES, ZCL_ARRAY_ATTRIBUTE_TYPES_SIZE }; + } + case TimeFormatLocalization::Attributes::AttributeList::Id: { + return { ZCL_ARRAY_ATTRIBUTE_TYPES, ZCL_ARRAY_ATTRIBUTE_TYPES_SIZE }; + } + case TimeFormatLocalization::Attributes::FeatureMap::Id: { + return { ZCL_BITMAP32_ATTRIBUTE_TYPES, ZCL_BITMAP32_ATTRIBUTE_TYPES_SIZE }; + } + case TimeFormatLocalization::Attributes::ClusterRevision::Id: { + return { ZCL_INT16U_ATTRIBUTE_TYPES, ZCL_INT16U_ATTRIBUTE_TYPES_SIZE }; + } + default: + return { ZCL_BOOLEAN_ATTRIBUTE_TYPES, 0x01 }; + } + } + case chip::app::Clusters::UnitLocalization::Id: { + switch (attribute_id) + { + case UnitLocalization::Attributes::TemperatureUnit::Id: { + return { ZCL_TEMP_UNIT_ATTRIBUTE_TYPES, ZCL_TEMP_UNIT_ATTRIBUTE_TYPES_SIZE }; + } + case UnitLocalization::Attributes::GeneratedCommandList::Id: { + return { ZCL_ARRAY_ATTRIBUTE_TYPES, ZCL_ARRAY_ATTRIBUTE_TYPES_SIZE }; + } + case UnitLocalization::Attributes::AcceptedCommandList::Id: { + return { ZCL_ARRAY_ATTRIBUTE_TYPES, ZCL_ARRAY_ATTRIBUTE_TYPES_SIZE }; + } + case UnitLocalization::Attributes::AttributeList::Id: { + return { ZCL_ARRAY_ATTRIBUTE_TYPES, ZCL_ARRAY_ATTRIBUTE_TYPES_SIZE }; + } + case UnitLocalization::Attributes::FeatureMap::Id: { + return { ZCL_BITMAP32_ATTRIBUTE_TYPES, ZCL_BITMAP32_ATTRIBUTE_TYPES_SIZE }; + } + case UnitLocalization::Attributes::ClusterRevision::Id: { + return { ZCL_INT16U_ATTRIBUTE_TYPES, ZCL_INT16U_ATTRIBUTE_TYPES_SIZE }; + } + default: + return { ZCL_BOOLEAN_ATTRIBUTE_TYPES, 0x01 }; + } + } + case chip::app::Clusters::PowerSourceConfiguration::Id: { + switch (attribute_id) + { + case PowerSourceConfiguration::Attributes::Sources::Id: { + return { ZCL_ARRAY_ATTRIBUTE_TYPES, ZCL_ARRAY_ATTRIBUTE_TYPES_SIZE }; + } + case PowerSourceConfiguration::Attributes::GeneratedCommandList::Id: { + return { ZCL_ARRAY_ATTRIBUTE_TYPES, ZCL_ARRAY_ATTRIBUTE_TYPES_SIZE }; + } + case PowerSourceConfiguration::Attributes::AcceptedCommandList::Id: { + return { ZCL_ARRAY_ATTRIBUTE_TYPES, ZCL_ARRAY_ATTRIBUTE_TYPES_SIZE }; + } + case PowerSourceConfiguration::Attributes::AttributeList::Id: { + return { ZCL_ARRAY_ATTRIBUTE_TYPES, ZCL_ARRAY_ATTRIBUTE_TYPES_SIZE }; + } + case PowerSourceConfiguration::Attributes::FeatureMap::Id: { + return { ZCL_BITMAP32_ATTRIBUTE_TYPES, ZCL_BITMAP32_ATTRIBUTE_TYPES_SIZE }; + } + case PowerSourceConfiguration::Attributes::ClusterRevision::Id: { + return { ZCL_INT16U_ATTRIBUTE_TYPES, ZCL_INT16U_ATTRIBUTE_TYPES_SIZE }; + } + default: + return { ZCL_BOOLEAN_ATTRIBUTE_TYPES, 0x01 }; + } + } + case chip::app::Clusters::PowerSource::Id: { + switch (attribute_id) + { + case PowerSource::Attributes::Status::Id: { + return { ZCL_POWER_SOURCE_STATUS_ATTRIBUTE_TYPES, ZCL_POWER_SOURCE_STATUS_ATTRIBUTE_TYPES_SIZE }; + } + case PowerSource::Attributes::Order::Id: { + return { ZCL_INT8U_ATTRIBUTE_TYPES, ZCL_INT8U_ATTRIBUTE_TYPES_SIZE }; + } + case PowerSource::Attributes::Description::Id: { + return { ZCL_CHAR_STRING_ATTRIBUTE_TYPES, ZCL_CHAR_STRING_ATTRIBUTE_TYPES_SIZE }; + } + case PowerSource::Attributes::WiredAssessedInputVoltage::Id: { + return { ZCL_INT32U_ATTRIBUTE_TYPES, ZCL_INT32U_ATTRIBUTE_TYPES_SIZE }; + } + case PowerSource::Attributes::WiredAssessedInputFrequency::Id: { + return { ZCL_INT16U_ATTRIBUTE_TYPES, ZCL_INT16U_ATTRIBUTE_TYPES_SIZE }; + } + case PowerSource::Attributes::WiredCurrentType::Id: { + return { ZCL_WIRED_CURRENT_TYPE_ATTRIBUTE_TYPES, ZCL_WIRED_CURRENT_TYPE_ATTRIBUTE_TYPES_SIZE }; + } + case PowerSource::Attributes::WiredAssessedCurrent::Id: { + return { ZCL_INT32U_ATTRIBUTE_TYPES, ZCL_INT32U_ATTRIBUTE_TYPES_SIZE }; + } + case PowerSource::Attributes::WiredNominalVoltage::Id: { + return { ZCL_INT32U_ATTRIBUTE_TYPES, ZCL_INT32U_ATTRIBUTE_TYPES_SIZE }; + } + case PowerSource::Attributes::WiredMaximumCurrent::Id: { + return { ZCL_INT32U_ATTRIBUTE_TYPES, ZCL_INT32U_ATTRIBUTE_TYPES_SIZE }; + } + case PowerSource::Attributes::WiredPresent::Id: { + return { ZCL_BOOLEAN_ATTRIBUTE_TYPES, ZCL_BOOLEAN_ATTRIBUTE_TYPES_SIZE }; + } + case PowerSource::Attributes::ActiveWiredFaults::Id: { + return { ZCL_ARRAY_ATTRIBUTE_TYPES, ZCL_ARRAY_ATTRIBUTE_TYPES_SIZE }; + } + case PowerSource::Attributes::BatVoltage::Id: { + return { ZCL_INT32U_ATTRIBUTE_TYPES, ZCL_INT32U_ATTRIBUTE_TYPES_SIZE }; + } + case PowerSource::Attributes::BatPercentRemaining::Id: { + return { ZCL_INT8U_ATTRIBUTE_TYPES, ZCL_INT8U_ATTRIBUTE_TYPES_SIZE }; + } + case PowerSource::Attributes::BatTimeRemaining::Id: { + return { ZCL_INT32U_ATTRIBUTE_TYPES, ZCL_INT32U_ATTRIBUTE_TYPES_SIZE }; + } + case PowerSource::Attributes::BatChargeLevel::Id: { + return { ZCL_BAT_CHARGE_LEVEL_ATTRIBUTE_TYPES, ZCL_BAT_CHARGE_LEVEL_ATTRIBUTE_TYPES_SIZE }; + } + case PowerSource::Attributes::BatReplacementNeeded::Id: { + return { ZCL_BOOLEAN_ATTRIBUTE_TYPES, ZCL_BOOLEAN_ATTRIBUTE_TYPES_SIZE }; + } + case PowerSource::Attributes::BatReplaceability::Id: { + return { ZCL_BAT_REPLACEABILITY_ATTRIBUTE_TYPES, ZCL_BAT_REPLACEABILITY_ATTRIBUTE_TYPES_SIZE }; + } + case PowerSource::Attributes::BatPresent::Id: { + return { ZCL_BOOLEAN_ATTRIBUTE_TYPES, ZCL_BOOLEAN_ATTRIBUTE_TYPES_SIZE }; + } + case PowerSource::Attributes::ActiveBatFaults::Id: { + return { ZCL_ARRAY_ATTRIBUTE_TYPES, ZCL_ARRAY_ATTRIBUTE_TYPES_SIZE }; + } + case PowerSource::Attributes::BatReplacementDescription::Id: { + return { ZCL_CHAR_STRING_ATTRIBUTE_TYPES, ZCL_CHAR_STRING_ATTRIBUTE_TYPES_SIZE }; + } + case PowerSource::Attributes::BatCommonDesignation::Id: { + return { ZCL_INT32U_ATTRIBUTE_TYPES, ZCL_INT32U_ATTRIBUTE_TYPES_SIZE }; + } + case PowerSource::Attributes::BatANSIDesignation::Id: { + return { ZCL_CHAR_STRING_ATTRIBUTE_TYPES, ZCL_CHAR_STRING_ATTRIBUTE_TYPES_SIZE }; + } + case PowerSource::Attributes::BatIECDesignation::Id: { + return { ZCL_CHAR_STRING_ATTRIBUTE_TYPES, ZCL_CHAR_STRING_ATTRIBUTE_TYPES_SIZE }; + } + case PowerSource::Attributes::BatApprovedChemistry::Id: { + return { ZCL_INT32U_ATTRIBUTE_TYPES, ZCL_INT32U_ATTRIBUTE_TYPES_SIZE }; + } + case PowerSource::Attributes::BatCapacity::Id: { + return { ZCL_INT32U_ATTRIBUTE_TYPES, ZCL_INT32U_ATTRIBUTE_TYPES_SIZE }; + } + case PowerSource::Attributes::BatQuantity::Id: { + return { ZCL_INT8U_ATTRIBUTE_TYPES, ZCL_INT8U_ATTRIBUTE_TYPES_SIZE }; + } + case PowerSource::Attributes::BatChargeState::Id: { + return { ZCL_BAT_CHARGE_STATE_ATTRIBUTE_TYPES, ZCL_BAT_CHARGE_STATE_ATTRIBUTE_TYPES_SIZE }; + } + case PowerSource::Attributes::BatTimeToFullCharge::Id: { + return { ZCL_INT32U_ATTRIBUTE_TYPES, ZCL_INT32U_ATTRIBUTE_TYPES_SIZE }; + } + case PowerSource::Attributes::BatFunctionalWhileCharging::Id: { + return { ZCL_BOOLEAN_ATTRIBUTE_TYPES, ZCL_BOOLEAN_ATTRIBUTE_TYPES_SIZE }; + } + case PowerSource::Attributes::BatChargingCurrent::Id: { + return { ZCL_INT32U_ATTRIBUTE_TYPES, ZCL_INT32U_ATTRIBUTE_TYPES_SIZE }; + } + case PowerSource::Attributes::ActiveBatChargeFaults::Id: { + return { ZCL_ARRAY_ATTRIBUTE_TYPES, ZCL_ARRAY_ATTRIBUTE_TYPES_SIZE }; + } + case PowerSource::Attributes::GeneratedCommandList::Id: { + return { ZCL_ARRAY_ATTRIBUTE_TYPES, ZCL_ARRAY_ATTRIBUTE_TYPES_SIZE }; + } + case PowerSource::Attributes::AcceptedCommandList::Id: { + return { ZCL_ARRAY_ATTRIBUTE_TYPES, ZCL_ARRAY_ATTRIBUTE_TYPES_SIZE }; + } + case PowerSource::Attributes::AttributeList::Id: { + return { ZCL_ARRAY_ATTRIBUTE_TYPES, ZCL_ARRAY_ATTRIBUTE_TYPES_SIZE }; + } + case PowerSource::Attributes::FeatureMap::Id: { + return { ZCL_BITMAP32_ATTRIBUTE_TYPES, ZCL_BITMAP32_ATTRIBUTE_TYPES_SIZE }; + } + case PowerSource::Attributes::ClusterRevision::Id: { + return { ZCL_INT16U_ATTRIBUTE_TYPES, ZCL_INT16U_ATTRIBUTE_TYPES_SIZE }; + } + default: + return { ZCL_BOOLEAN_ATTRIBUTE_TYPES, 0x01 }; + } + } + case chip::app::Clusters::GeneralCommissioning::Id: { + switch (attribute_id) + { + case GeneralCommissioning::Attributes::Breadcrumb::Id: { + return { ZCL_INT64U_ATTRIBUTE_TYPES, ZCL_INT64U_ATTRIBUTE_TYPES_SIZE }; + } + case GeneralCommissioning::Attributes::BasicCommissioningInfo::Id: { + return { ZCL_BASIC_COMMISSIONING_INFO_ATTRIBUTE_TYPES, ZCL_BASIC_COMMISSIONING_INFO_ATTRIBUTE_TYPES_SIZE }; + } + case GeneralCommissioning::Attributes::RegulatoryConfig::Id: { + return { ZCL_REGULATORY_LOCATION_TYPE_ATTRIBUTE_TYPES, ZCL_REGULATORY_LOCATION_TYPE_ATTRIBUTE_TYPES_SIZE }; + } + case GeneralCommissioning::Attributes::LocationCapability::Id: { + return { ZCL_REGULATORY_LOCATION_TYPE_ATTRIBUTE_TYPES, ZCL_REGULATORY_LOCATION_TYPE_ATTRIBUTE_TYPES_SIZE }; + } + case GeneralCommissioning::Attributes::SupportsConcurrentConnection::Id: { + return { ZCL_BOOLEAN_ATTRIBUTE_TYPES, ZCL_BOOLEAN_ATTRIBUTE_TYPES_SIZE }; + } + case GeneralCommissioning::Attributes::GeneratedCommandList::Id: { + return { ZCL_ARRAY_ATTRIBUTE_TYPES, ZCL_ARRAY_ATTRIBUTE_TYPES_SIZE }; + } + case GeneralCommissioning::Attributes::AcceptedCommandList::Id: { + return { ZCL_ARRAY_ATTRIBUTE_TYPES, ZCL_ARRAY_ATTRIBUTE_TYPES_SIZE }; + } + case GeneralCommissioning::Attributes::AttributeList::Id: { + return { ZCL_ARRAY_ATTRIBUTE_TYPES, ZCL_ARRAY_ATTRIBUTE_TYPES_SIZE }; + } + case GeneralCommissioning::Attributes::FeatureMap::Id: { + return { ZCL_BITMAP32_ATTRIBUTE_TYPES, ZCL_BITMAP32_ATTRIBUTE_TYPES_SIZE }; + } + case GeneralCommissioning::Attributes::ClusterRevision::Id: { + return { ZCL_INT16U_ATTRIBUTE_TYPES, ZCL_INT16U_ATTRIBUTE_TYPES_SIZE }; + } + default: + return { ZCL_BOOLEAN_ATTRIBUTE_TYPES, 0x01 }; + } + } + case chip::app::Clusters::DiagnosticLogs::Id: { + switch (attribute_id) + { + case DiagnosticLogs::Attributes::GeneratedCommandList::Id: { + return { ZCL_ARRAY_ATTRIBUTE_TYPES, ZCL_ARRAY_ATTRIBUTE_TYPES_SIZE }; + } + case DiagnosticLogs::Attributes::AcceptedCommandList::Id: { + return { ZCL_ARRAY_ATTRIBUTE_TYPES, ZCL_ARRAY_ATTRIBUTE_TYPES_SIZE }; + } + case DiagnosticLogs::Attributes::AttributeList::Id: { + return { ZCL_ARRAY_ATTRIBUTE_TYPES, ZCL_ARRAY_ATTRIBUTE_TYPES_SIZE }; + } + case DiagnosticLogs::Attributes::FeatureMap::Id: { + return { ZCL_BITMAP32_ATTRIBUTE_TYPES, ZCL_BITMAP32_ATTRIBUTE_TYPES_SIZE }; + } + case DiagnosticLogs::Attributes::ClusterRevision::Id: { + return { ZCL_INT16U_ATTRIBUTE_TYPES, ZCL_INT16U_ATTRIBUTE_TYPES_SIZE }; + } + default: + return { ZCL_BOOLEAN_ATTRIBUTE_TYPES, 0x01 }; + } + } + case chip::app::Clusters::GeneralDiagnostics::Id: { + switch (attribute_id) + { + case GeneralDiagnostics::Attributes::NetworkInterfaces::Id: { + return { ZCL_ARRAY_ATTRIBUTE_TYPES, ZCL_ARRAY_ATTRIBUTE_TYPES_SIZE }; + } + case GeneralDiagnostics::Attributes::RebootCount::Id: { + return { ZCL_INT16U_ATTRIBUTE_TYPES, ZCL_INT16U_ATTRIBUTE_TYPES_SIZE }; + } + case GeneralDiagnostics::Attributes::UpTime::Id: { + return { ZCL_INT64U_ATTRIBUTE_TYPES, ZCL_INT64U_ATTRIBUTE_TYPES_SIZE }; + } + case GeneralDiagnostics::Attributes::TotalOperationalHours::Id: { + return { ZCL_INT32U_ATTRIBUTE_TYPES, ZCL_INT32U_ATTRIBUTE_TYPES_SIZE }; + } + case GeneralDiagnostics::Attributes::BootReasons::Id: { + return { ZCL_ENUM8_ATTRIBUTE_TYPES, ZCL_ENUM8_ATTRIBUTE_TYPES_SIZE }; + } + case GeneralDiagnostics::Attributes::ActiveHardwareFaults::Id: { + return { ZCL_ARRAY_ATTRIBUTE_TYPES, ZCL_ARRAY_ATTRIBUTE_TYPES_SIZE }; + } + case GeneralDiagnostics::Attributes::ActiveRadioFaults::Id: { + return { ZCL_ARRAY_ATTRIBUTE_TYPES, ZCL_ARRAY_ATTRIBUTE_TYPES_SIZE }; + } + case GeneralDiagnostics::Attributes::ActiveNetworkFaults::Id: { + return { ZCL_ARRAY_ATTRIBUTE_TYPES, ZCL_ARRAY_ATTRIBUTE_TYPES_SIZE }; + } + case GeneralDiagnostics::Attributes::TestEventTriggersEnabled::Id: { + return { ZCL_BOOLEAN_ATTRIBUTE_TYPES, ZCL_BOOLEAN_ATTRIBUTE_TYPES_SIZE }; + } + case GeneralDiagnostics::Attributes::GeneratedCommandList::Id: { + return { ZCL_ARRAY_ATTRIBUTE_TYPES, ZCL_ARRAY_ATTRIBUTE_TYPES_SIZE }; + } + case GeneralDiagnostics::Attributes::AcceptedCommandList::Id: { + return { ZCL_ARRAY_ATTRIBUTE_TYPES, ZCL_ARRAY_ATTRIBUTE_TYPES_SIZE }; + } + case GeneralDiagnostics::Attributes::AttributeList::Id: { + return { ZCL_ARRAY_ATTRIBUTE_TYPES, ZCL_ARRAY_ATTRIBUTE_TYPES_SIZE }; + } + case GeneralDiagnostics::Attributes::FeatureMap::Id: { + return { ZCL_BITMAP32_ATTRIBUTE_TYPES, ZCL_BITMAP32_ATTRIBUTE_TYPES_SIZE }; + } + case GeneralDiagnostics::Attributes::ClusterRevision::Id: { + return { ZCL_INT16U_ATTRIBUTE_TYPES, ZCL_INT16U_ATTRIBUTE_TYPES_SIZE }; + } + default: + return { ZCL_BOOLEAN_ATTRIBUTE_TYPES, 0x01 }; + } + } + case chip::app::Clusters::SoftwareDiagnostics::Id: { + switch (attribute_id) + { + case SoftwareDiagnostics::Attributes::ThreadMetrics::Id: { + return { ZCL_ARRAY_ATTRIBUTE_TYPES, ZCL_ARRAY_ATTRIBUTE_TYPES_SIZE }; + } + case SoftwareDiagnostics::Attributes::CurrentHeapFree::Id: { + return { ZCL_INT64U_ATTRIBUTE_TYPES, ZCL_INT64U_ATTRIBUTE_TYPES_SIZE }; + } + case SoftwareDiagnostics::Attributes::CurrentHeapUsed::Id: { + return { ZCL_INT64U_ATTRIBUTE_TYPES, ZCL_INT64U_ATTRIBUTE_TYPES_SIZE }; + } + case SoftwareDiagnostics::Attributes::CurrentHeapHighWatermark::Id: { + return { ZCL_INT64U_ATTRIBUTE_TYPES, ZCL_INT64U_ATTRIBUTE_TYPES_SIZE }; + } + case SoftwareDiagnostics::Attributes::GeneratedCommandList::Id: { + return { ZCL_ARRAY_ATTRIBUTE_TYPES, ZCL_ARRAY_ATTRIBUTE_TYPES_SIZE }; + } + case SoftwareDiagnostics::Attributes::AcceptedCommandList::Id: { + return { ZCL_ARRAY_ATTRIBUTE_TYPES, ZCL_ARRAY_ATTRIBUTE_TYPES_SIZE }; + } + case SoftwareDiagnostics::Attributes::AttributeList::Id: { + return { ZCL_ARRAY_ATTRIBUTE_TYPES, ZCL_ARRAY_ATTRIBUTE_TYPES_SIZE }; + } + case SoftwareDiagnostics::Attributes::FeatureMap::Id: { + return { ZCL_BITMAP32_ATTRIBUTE_TYPES, ZCL_BITMAP32_ATTRIBUTE_TYPES_SIZE }; + } + case SoftwareDiagnostics::Attributes::ClusterRevision::Id: { + return { ZCL_INT16U_ATTRIBUTE_TYPES, ZCL_INT16U_ATTRIBUTE_TYPES_SIZE }; + } + default: + return { ZCL_BOOLEAN_ATTRIBUTE_TYPES, 0x01 }; + } + } + case chip::app::Clusters::ThreadNetworkDiagnostics::Id: { + switch (attribute_id) + { + case ThreadNetworkDiagnostics::Attributes::Channel::Id: { + return { ZCL_INT16U_ATTRIBUTE_TYPES, ZCL_INT16U_ATTRIBUTE_TYPES_SIZE }; + } + case ThreadNetworkDiagnostics::Attributes::RoutingRole::Id: { + return { ZCL_ROUTING_ROLE_ATTRIBUTE_TYPES, ZCL_ROUTING_ROLE_ATTRIBUTE_TYPES_SIZE }; + } + case ThreadNetworkDiagnostics::Attributes::NetworkName::Id: { + return { ZCL_CHAR_STRING_ATTRIBUTE_TYPES, ZCL_CHAR_STRING_ATTRIBUTE_TYPES_SIZE }; + } + case ThreadNetworkDiagnostics::Attributes::PanId::Id: { + return { ZCL_INT16U_ATTRIBUTE_TYPES, ZCL_INT16U_ATTRIBUTE_TYPES_SIZE }; + } + case ThreadNetworkDiagnostics::Attributes::ExtendedPanId::Id: { + return { ZCL_INT64U_ATTRIBUTE_TYPES, ZCL_INT64U_ATTRIBUTE_TYPES_SIZE }; + } + case ThreadNetworkDiagnostics::Attributes::MeshLocalPrefix::Id: { + return { ZCL_OCTET_STRING_ATTRIBUTE_TYPES, ZCL_OCTET_STRING_ATTRIBUTE_TYPES_SIZE }; + } + case ThreadNetworkDiagnostics::Attributes::OverrunCount::Id: { + return { ZCL_INT64U_ATTRIBUTE_TYPES, ZCL_INT64U_ATTRIBUTE_TYPES_SIZE }; + } + case ThreadNetworkDiagnostics::Attributes::NeighborTableList::Id: { + return { ZCL_ARRAY_ATTRIBUTE_TYPES, ZCL_ARRAY_ATTRIBUTE_TYPES_SIZE }; + } + case ThreadNetworkDiagnostics::Attributes::RouteTableList::Id: { + return { ZCL_ARRAY_ATTRIBUTE_TYPES, ZCL_ARRAY_ATTRIBUTE_TYPES_SIZE }; + } + case ThreadNetworkDiagnostics::Attributes::PartitionId::Id: { + return { ZCL_INT32U_ATTRIBUTE_TYPES, ZCL_INT32U_ATTRIBUTE_TYPES_SIZE }; + } + case ThreadNetworkDiagnostics::Attributes::Weighting::Id: { + return { ZCL_INT8U_ATTRIBUTE_TYPES, ZCL_INT8U_ATTRIBUTE_TYPES_SIZE }; + } + case ThreadNetworkDiagnostics::Attributes::DataVersion::Id: { + return { ZCL_INT8U_ATTRIBUTE_TYPES, ZCL_INT8U_ATTRIBUTE_TYPES_SIZE }; + } + case ThreadNetworkDiagnostics::Attributes::StableDataVersion::Id: { + return { ZCL_INT8U_ATTRIBUTE_TYPES, ZCL_INT8U_ATTRIBUTE_TYPES_SIZE }; + } + case ThreadNetworkDiagnostics::Attributes::LeaderRouterId::Id: { + return { ZCL_INT8U_ATTRIBUTE_TYPES, ZCL_INT8U_ATTRIBUTE_TYPES_SIZE }; + } + case ThreadNetworkDiagnostics::Attributes::DetachedRoleCount::Id: { + return { ZCL_INT16U_ATTRIBUTE_TYPES, ZCL_INT16U_ATTRIBUTE_TYPES_SIZE }; + } + case ThreadNetworkDiagnostics::Attributes::ChildRoleCount::Id: { + return { ZCL_INT16U_ATTRIBUTE_TYPES, ZCL_INT16U_ATTRIBUTE_TYPES_SIZE }; + } + case ThreadNetworkDiagnostics::Attributes::RouterRoleCount::Id: { + return { ZCL_INT16U_ATTRIBUTE_TYPES, ZCL_INT16U_ATTRIBUTE_TYPES_SIZE }; + } + case ThreadNetworkDiagnostics::Attributes::LeaderRoleCount::Id: { + return { ZCL_INT16U_ATTRIBUTE_TYPES, ZCL_INT16U_ATTRIBUTE_TYPES_SIZE }; + } + case ThreadNetworkDiagnostics::Attributes::AttachAttemptCount::Id: { + return { ZCL_INT16U_ATTRIBUTE_TYPES, ZCL_INT16U_ATTRIBUTE_TYPES_SIZE }; + } + case ThreadNetworkDiagnostics::Attributes::PartitionIdChangeCount::Id: { + return { ZCL_INT16U_ATTRIBUTE_TYPES, ZCL_INT16U_ATTRIBUTE_TYPES_SIZE }; + } + case ThreadNetworkDiagnostics::Attributes::BetterPartitionAttachAttemptCount::Id: { + return { ZCL_INT16U_ATTRIBUTE_TYPES, ZCL_INT16U_ATTRIBUTE_TYPES_SIZE }; + } + case ThreadNetworkDiagnostics::Attributes::ParentChangeCount::Id: { + return { ZCL_INT16U_ATTRIBUTE_TYPES, ZCL_INT16U_ATTRIBUTE_TYPES_SIZE }; + } + case ThreadNetworkDiagnostics::Attributes::TxTotalCount::Id: { + return { ZCL_INT32U_ATTRIBUTE_TYPES, ZCL_INT32U_ATTRIBUTE_TYPES_SIZE }; + } + case ThreadNetworkDiagnostics::Attributes::TxUnicastCount::Id: { + return { ZCL_INT32U_ATTRIBUTE_TYPES, ZCL_INT32U_ATTRIBUTE_TYPES_SIZE }; + } + case ThreadNetworkDiagnostics::Attributes::TxBroadcastCount::Id: { + return { ZCL_INT32U_ATTRIBUTE_TYPES, ZCL_INT32U_ATTRIBUTE_TYPES_SIZE }; + } + case ThreadNetworkDiagnostics::Attributes::TxAckRequestedCount::Id: { + return { ZCL_INT32U_ATTRIBUTE_TYPES, ZCL_INT32U_ATTRIBUTE_TYPES_SIZE }; + } + case ThreadNetworkDiagnostics::Attributes::TxAckedCount::Id: { + return { ZCL_INT32U_ATTRIBUTE_TYPES, ZCL_INT32U_ATTRIBUTE_TYPES_SIZE }; + } + case ThreadNetworkDiagnostics::Attributes::TxNoAckRequestedCount::Id: { + return { ZCL_INT32U_ATTRIBUTE_TYPES, ZCL_INT32U_ATTRIBUTE_TYPES_SIZE }; + } + case ThreadNetworkDiagnostics::Attributes::TxDataCount::Id: { + return { ZCL_INT32U_ATTRIBUTE_TYPES, ZCL_INT32U_ATTRIBUTE_TYPES_SIZE }; + } + case ThreadNetworkDiagnostics::Attributes::TxDataPollCount::Id: { + return { ZCL_INT32U_ATTRIBUTE_TYPES, ZCL_INT32U_ATTRIBUTE_TYPES_SIZE }; + } + case ThreadNetworkDiagnostics::Attributes::TxBeaconCount::Id: { + return { ZCL_INT32U_ATTRIBUTE_TYPES, ZCL_INT32U_ATTRIBUTE_TYPES_SIZE }; + } + case ThreadNetworkDiagnostics::Attributes::TxBeaconRequestCount::Id: { + return { ZCL_INT32U_ATTRIBUTE_TYPES, ZCL_INT32U_ATTRIBUTE_TYPES_SIZE }; + } + case ThreadNetworkDiagnostics::Attributes::TxOtherCount::Id: { + return { ZCL_INT32U_ATTRIBUTE_TYPES, ZCL_INT32U_ATTRIBUTE_TYPES_SIZE }; + } + case ThreadNetworkDiagnostics::Attributes::TxRetryCount::Id: { + return { ZCL_INT32U_ATTRIBUTE_TYPES, ZCL_INT32U_ATTRIBUTE_TYPES_SIZE }; + } + case ThreadNetworkDiagnostics::Attributes::TxDirectMaxRetryExpiryCount::Id: { + return { ZCL_INT32U_ATTRIBUTE_TYPES, ZCL_INT32U_ATTRIBUTE_TYPES_SIZE }; + } + case ThreadNetworkDiagnostics::Attributes::TxIndirectMaxRetryExpiryCount::Id: { + return { ZCL_INT32U_ATTRIBUTE_TYPES, ZCL_INT32U_ATTRIBUTE_TYPES_SIZE }; + } + case ThreadNetworkDiagnostics::Attributes::TxErrCcaCount::Id: { + return { ZCL_INT32U_ATTRIBUTE_TYPES, ZCL_INT32U_ATTRIBUTE_TYPES_SIZE }; + } + case ThreadNetworkDiagnostics::Attributes::TxErrAbortCount::Id: { + return { ZCL_INT32U_ATTRIBUTE_TYPES, ZCL_INT32U_ATTRIBUTE_TYPES_SIZE }; + } + case ThreadNetworkDiagnostics::Attributes::TxErrBusyChannelCount::Id: { + return { ZCL_INT32U_ATTRIBUTE_TYPES, ZCL_INT32U_ATTRIBUTE_TYPES_SIZE }; + } + case ThreadNetworkDiagnostics::Attributes::RxTotalCount::Id: { + return { ZCL_INT32U_ATTRIBUTE_TYPES, ZCL_INT32U_ATTRIBUTE_TYPES_SIZE }; + } + case ThreadNetworkDiagnostics::Attributes::RxUnicastCount::Id: { + return { ZCL_INT32U_ATTRIBUTE_TYPES, ZCL_INT32U_ATTRIBUTE_TYPES_SIZE }; + } + case ThreadNetworkDiagnostics::Attributes::RxBroadcastCount::Id: { + return { ZCL_INT32U_ATTRIBUTE_TYPES, ZCL_INT32U_ATTRIBUTE_TYPES_SIZE }; + } + case ThreadNetworkDiagnostics::Attributes::RxDataCount::Id: { + return { ZCL_INT32U_ATTRIBUTE_TYPES, ZCL_INT32U_ATTRIBUTE_TYPES_SIZE }; + } + case ThreadNetworkDiagnostics::Attributes::RxDataPollCount::Id: { + return { ZCL_INT32U_ATTRIBUTE_TYPES, ZCL_INT32U_ATTRIBUTE_TYPES_SIZE }; + } + case ThreadNetworkDiagnostics::Attributes::RxBeaconCount::Id: { + return { ZCL_INT32U_ATTRIBUTE_TYPES, ZCL_INT32U_ATTRIBUTE_TYPES_SIZE }; + } + case ThreadNetworkDiagnostics::Attributes::RxBeaconRequestCount::Id: { + return { ZCL_INT32U_ATTRIBUTE_TYPES, ZCL_INT32U_ATTRIBUTE_TYPES_SIZE }; + } + case ThreadNetworkDiagnostics::Attributes::RxOtherCount::Id: { + return { ZCL_INT32U_ATTRIBUTE_TYPES, ZCL_INT32U_ATTRIBUTE_TYPES_SIZE }; + } + case ThreadNetworkDiagnostics::Attributes::RxAddressFilteredCount::Id: { + return { ZCL_INT32U_ATTRIBUTE_TYPES, ZCL_INT32U_ATTRIBUTE_TYPES_SIZE }; + } + case ThreadNetworkDiagnostics::Attributes::RxDestAddrFilteredCount::Id: { + return { ZCL_INT32U_ATTRIBUTE_TYPES, ZCL_INT32U_ATTRIBUTE_TYPES_SIZE }; + } + case ThreadNetworkDiagnostics::Attributes::RxDuplicatedCount::Id: { + return { ZCL_INT32U_ATTRIBUTE_TYPES, ZCL_INT32U_ATTRIBUTE_TYPES_SIZE }; + } + case ThreadNetworkDiagnostics::Attributes::RxErrNoFrameCount::Id: { + return { ZCL_INT32U_ATTRIBUTE_TYPES, ZCL_INT32U_ATTRIBUTE_TYPES_SIZE }; + } + case ThreadNetworkDiagnostics::Attributes::RxErrUnknownNeighborCount::Id: { + return { ZCL_INT32U_ATTRIBUTE_TYPES, ZCL_INT32U_ATTRIBUTE_TYPES_SIZE }; + } + case ThreadNetworkDiagnostics::Attributes::RxErrInvalidSrcAddrCount::Id: { + return { ZCL_INT32U_ATTRIBUTE_TYPES, ZCL_INT32U_ATTRIBUTE_TYPES_SIZE }; + } + case ThreadNetworkDiagnostics::Attributes::RxErrSecCount::Id: { + return { ZCL_INT32U_ATTRIBUTE_TYPES, ZCL_INT32U_ATTRIBUTE_TYPES_SIZE }; + } + case ThreadNetworkDiagnostics::Attributes::RxErrFcsCount::Id: { + return { ZCL_INT32U_ATTRIBUTE_TYPES, ZCL_INT32U_ATTRIBUTE_TYPES_SIZE }; + } + case ThreadNetworkDiagnostics::Attributes::RxErrOtherCount::Id: { + return { ZCL_INT32U_ATTRIBUTE_TYPES, ZCL_INT32U_ATTRIBUTE_TYPES_SIZE }; + } + case ThreadNetworkDiagnostics::Attributes::ActiveTimestamp::Id: { + return { ZCL_INT64U_ATTRIBUTE_TYPES, ZCL_INT64U_ATTRIBUTE_TYPES_SIZE }; + } + case ThreadNetworkDiagnostics::Attributes::PendingTimestamp::Id: { + return { ZCL_INT64U_ATTRIBUTE_TYPES, ZCL_INT64U_ATTRIBUTE_TYPES_SIZE }; + } + case ThreadNetworkDiagnostics::Attributes::Delay::Id: { + return { ZCL_INT32U_ATTRIBUTE_TYPES, ZCL_INT32U_ATTRIBUTE_TYPES_SIZE }; + } + case ThreadNetworkDiagnostics::Attributes::SecurityPolicy::Id: { + return { ZCL_SECURITY_POLICY_ATTRIBUTE_TYPES, ZCL_SECURITY_POLICY_ATTRIBUTE_TYPES_SIZE }; + } + case ThreadNetworkDiagnostics::Attributes::ChannelPage0Mask::Id: { + return { ZCL_OCTET_STRING_ATTRIBUTE_TYPES, ZCL_OCTET_STRING_ATTRIBUTE_TYPES_SIZE }; + } + case ThreadNetworkDiagnostics::Attributes::OperationalDatasetComponents::Id: { + return { ZCL_OPERATIONAL_DATASET_COMPONENTS_ATTRIBUTE_TYPES, ZCL_OPERATIONAL_DATASET_COMPONENTS_ATTRIBUTE_TYPES_SIZE }; + } + case ThreadNetworkDiagnostics::Attributes::ActiveNetworkFaultsList::Id: { + return { ZCL_ARRAY_ATTRIBUTE_TYPES, ZCL_ARRAY_ATTRIBUTE_TYPES_SIZE }; + } + case ThreadNetworkDiagnostics::Attributes::GeneratedCommandList::Id: { + return { ZCL_ARRAY_ATTRIBUTE_TYPES, ZCL_ARRAY_ATTRIBUTE_TYPES_SIZE }; + } + case ThreadNetworkDiagnostics::Attributes::AcceptedCommandList::Id: { + return { ZCL_ARRAY_ATTRIBUTE_TYPES, ZCL_ARRAY_ATTRIBUTE_TYPES_SIZE }; + } + case ThreadNetworkDiagnostics::Attributes::AttributeList::Id: { + return { ZCL_ARRAY_ATTRIBUTE_TYPES, ZCL_ARRAY_ATTRIBUTE_TYPES_SIZE }; + } + case ThreadNetworkDiagnostics::Attributes::FeatureMap::Id: { + return { ZCL_BITMAP32_ATTRIBUTE_TYPES, ZCL_BITMAP32_ATTRIBUTE_TYPES_SIZE }; + } + case ThreadNetworkDiagnostics::Attributes::ClusterRevision::Id: { + return { ZCL_INT16U_ATTRIBUTE_TYPES, ZCL_INT16U_ATTRIBUTE_TYPES_SIZE }; + } + default: + return { ZCL_BOOLEAN_ATTRIBUTE_TYPES, 0x01 }; + } + } + case chip::app::Clusters::WiFiNetworkDiagnostics::Id: { + switch (attribute_id) + { + case WiFiNetworkDiagnostics::Attributes::Bssid::Id: { + return { ZCL_OCTET_STRING_ATTRIBUTE_TYPES, ZCL_OCTET_STRING_ATTRIBUTE_TYPES_SIZE }; + } + case WiFiNetworkDiagnostics::Attributes::SecurityType::Id: { + return { ZCL_SECURITY_TYPE_ATTRIBUTE_TYPES, ZCL_SECURITY_TYPE_ATTRIBUTE_TYPES_SIZE }; + } + case WiFiNetworkDiagnostics::Attributes::WiFiVersion::Id: { + return { ZCL_WI_FI_VERSION_TYPE_ATTRIBUTE_TYPES, ZCL_WI_FI_VERSION_TYPE_ATTRIBUTE_TYPES_SIZE }; + } + case WiFiNetworkDiagnostics::Attributes::ChannelNumber::Id: { + return { ZCL_INT16U_ATTRIBUTE_TYPES, ZCL_INT16U_ATTRIBUTE_TYPES_SIZE }; + } + case WiFiNetworkDiagnostics::Attributes::Rssi::Id: { + return { ZCL_INT8S_ATTRIBUTE_TYPES, ZCL_INT8S_ATTRIBUTE_TYPES_SIZE }; + } + case WiFiNetworkDiagnostics::Attributes::BeaconLostCount::Id: { + return { ZCL_INT32U_ATTRIBUTE_TYPES, ZCL_INT32U_ATTRIBUTE_TYPES_SIZE }; + } + case WiFiNetworkDiagnostics::Attributes::BeaconRxCount::Id: { + return { ZCL_INT32U_ATTRIBUTE_TYPES, ZCL_INT32U_ATTRIBUTE_TYPES_SIZE }; + } + case WiFiNetworkDiagnostics::Attributes::PacketMulticastRxCount::Id: { + return { ZCL_INT32U_ATTRIBUTE_TYPES, ZCL_INT32U_ATTRIBUTE_TYPES_SIZE }; + } + case WiFiNetworkDiagnostics::Attributes::PacketMulticastTxCount::Id: { + return { ZCL_INT32U_ATTRIBUTE_TYPES, ZCL_INT32U_ATTRIBUTE_TYPES_SIZE }; + } + case WiFiNetworkDiagnostics::Attributes::PacketUnicastRxCount::Id: { + return { ZCL_INT32U_ATTRIBUTE_TYPES, ZCL_INT32U_ATTRIBUTE_TYPES_SIZE }; + } + case WiFiNetworkDiagnostics::Attributes::PacketUnicastTxCount::Id: { + return { ZCL_INT32U_ATTRIBUTE_TYPES, ZCL_INT32U_ATTRIBUTE_TYPES_SIZE }; + } + case WiFiNetworkDiagnostics::Attributes::CurrentMaxRate::Id: { + return { ZCL_INT64U_ATTRIBUTE_TYPES, ZCL_INT64U_ATTRIBUTE_TYPES_SIZE }; + } + case WiFiNetworkDiagnostics::Attributes::OverrunCount::Id: { + return { ZCL_INT64U_ATTRIBUTE_TYPES, ZCL_INT64U_ATTRIBUTE_TYPES_SIZE }; + } + case WiFiNetworkDiagnostics::Attributes::GeneratedCommandList::Id: { + return { ZCL_ARRAY_ATTRIBUTE_TYPES, ZCL_ARRAY_ATTRIBUTE_TYPES_SIZE }; + } + case WiFiNetworkDiagnostics::Attributes::AcceptedCommandList::Id: { + return { ZCL_ARRAY_ATTRIBUTE_TYPES, ZCL_ARRAY_ATTRIBUTE_TYPES_SIZE }; + } + case WiFiNetworkDiagnostics::Attributes::AttributeList::Id: { + return { ZCL_ARRAY_ATTRIBUTE_TYPES, ZCL_ARRAY_ATTRIBUTE_TYPES_SIZE }; + } + case WiFiNetworkDiagnostics::Attributes::FeatureMap::Id: { + return { ZCL_BITMAP32_ATTRIBUTE_TYPES, ZCL_BITMAP32_ATTRIBUTE_TYPES_SIZE }; + } + case WiFiNetworkDiagnostics::Attributes::ClusterRevision::Id: { + return { ZCL_INT16U_ATTRIBUTE_TYPES, ZCL_INT16U_ATTRIBUTE_TYPES_SIZE }; + } + default: + return { ZCL_BOOLEAN_ATTRIBUTE_TYPES, 0x01 }; + } + } + case chip::app::Clusters::TimeSynchronization::Id: { + switch (attribute_id) + { + case TimeSynchronization::Attributes::UTCTime::Id: { + return { ZCL_EPOCH_US_ATTRIBUTE_TYPES, ZCL_EPOCH_US_ATTRIBUTE_TYPES_SIZE }; + } + case TimeSynchronization::Attributes::Granularity::Id: { + return { ZCL_GRANULARITY_ENUM_ATTRIBUTE_TYPES, ZCL_GRANULARITY_ENUM_ATTRIBUTE_TYPES_SIZE }; + } + case TimeSynchronization::Attributes::TimeSource::Id: { + return { ZCL_TIME_SOURCE_ENUM_ATTRIBUTE_TYPES, ZCL_TIME_SOURCE_ENUM_ATTRIBUTE_TYPES_SIZE }; + } + case TimeSynchronization::Attributes::TrustedTimeNodeId::Id: { + return { ZCL_NODE_ID_ATTRIBUTE_TYPES, ZCL_NODE_ID_ATTRIBUTE_TYPES_SIZE }; + } + case TimeSynchronization::Attributes::DefaultNtp::Id: { + return { ZCL_CHAR_STRING_ATTRIBUTE_TYPES, ZCL_CHAR_STRING_ATTRIBUTE_TYPES_SIZE }; + } + case TimeSynchronization::Attributes::TimeZone::Id: { + return { ZCL_ARRAY_ATTRIBUTE_TYPES, ZCL_ARRAY_ATTRIBUTE_TYPES_SIZE }; + } + case TimeSynchronization::Attributes::DstOffset::Id: { + return { ZCL_ARRAY_ATTRIBUTE_TYPES, ZCL_ARRAY_ATTRIBUTE_TYPES_SIZE }; + } + case TimeSynchronization::Attributes::LocalTime::Id: { + return { ZCL_EPOCH_US_ATTRIBUTE_TYPES, ZCL_EPOCH_US_ATTRIBUTE_TYPES_SIZE }; + } + case TimeSynchronization::Attributes::TimeZoneDatabase::Id: { + return { ZCL_BOOLEAN_ATTRIBUTE_TYPES, ZCL_BOOLEAN_ATTRIBUTE_TYPES_SIZE }; + } + case TimeSynchronization::Attributes::NtpServerPort::Id: { + return { ZCL_INT16U_ATTRIBUTE_TYPES, ZCL_INT16U_ATTRIBUTE_TYPES_SIZE }; + } + case TimeSynchronization::Attributes::GeneratedCommandList::Id: { + return { ZCL_ARRAY_ATTRIBUTE_TYPES, ZCL_ARRAY_ATTRIBUTE_TYPES_SIZE }; + } + case TimeSynchronization::Attributes::AcceptedCommandList::Id: { + return { ZCL_ARRAY_ATTRIBUTE_TYPES, ZCL_ARRAY_ATTRIBUTE_TYPES_SIZE }; + } + case TimeSynchronization::Attributes::AttributeList::Id: { + return { ZCL_ARRAY_ATTRIBUTE_TYPES, ZCL_ARRAY_ATTRIBUTE_TYPES_SIZE }; + } + case TimeSynchronization::Attributes::FeatureMap::Id: { + return { ZCL_BITMAP32_ATTRIBUTE_TYPES, ZCL_BITMAP32_ATTRIBUTE_TYPES_SIZE }; + } + case TimeSynchronization::Attributes::ClusterRevision::Id: { + return { ZCL_INT16U_ATTRIBUTE_TYPES, ZCL_INT16U_ATTRIBUTE_TYPES_SIZE }; + } + default: + return { ZCL_BOOLEAN_ATTRIBUTE_TYPES, 0x01 }; + } + } + case chip::app::Clusters::Switch::Id: { + switch (attribute_id) + { + case Switch::Attributes::NumberOfPositions::Id: { + return { ZCL_INT8U_ATTRIBUTE_TYPES, ZCL_INT8U_ATTRIBUTE_TYPES_SIZE }; + } + case Switch::Attributes::CurrentPosition::Id: { + return { ZCL_INT8U_ATTRIBUTE_TYPES, ZCL_INT8U_ATTRIBUTE_TYPES_SIZE }; + } + case Switch::Attributes::MultiPressMax::Id: { + return { ZCL_INT8U_ATTRIBUTE_TYPES, ZCL_INT8U_ATTRIBUTE_TYPES_SIZE }; + } + case Switch::Attributes::GeneratedCommandList::Id: { + return { ZCL_ARRAY_ATTRIBUTE_TYPES, ZCL_ARRAY_ATTRIBUTE_TYPES_SIZE }; + } + case Switch::Attributes::AcceptedCommandList::Id: { + return { ZCL_ARRAY_ATTRIBUTE_TYPES, ZCL_ARRAY_ATTRIBUTE_TYPES_SIZE }; + } + case Switch::Attributes::AttributeList::Id: { + return { ZCL_ARRAY_ATTRIBUTE_TYPES, ZCL_ARRAY_ATTRIBUTE_TYPES_SIZE }; + } + case Switch::Attributes::FeatureMap::Id: { + return { ZCL_BITMAP32_ATTRIBUTE_TYPES, ZCL_BITMAP32_ATTRIBUTE_TYPES_SIZE }; + } + case Switch::Attributes::ClusterRevision::Id: { + return { ZCL_INT16U_ATTRIBUTE_TYPES, ZCL_INT16U_ATTRIBUTE_TYPES_SIZE }; + } + default: + return { ZCL_BOOLEAN_ATTRIBUTE_TYPES, 0x01 }; + } + } + case chip::app::Clusters::OperationalCredentials::Id: { + switch (attribute_id) + { + case OperationalCredentials::Attributes::NOCs::Id: { + return { ZCL_ARRAY_ATTRIBUTE_TYPES, ZCL_ARRAY_ATTRIBUTE_TYPES_SIZE }; + } + case OperationalCredentials::Attributes::Fabrics::Id: { + return { ZCL_ARRAY_ATTRIBUTE_TYPES, ZCL_ARRAY_ATTRIBUTE_TYPES_SIZE }; + } + case OperationalCredentials::Attributes::SupportedFabrics::Id: { + return { ZCL_INT8U_ATTRIBUTE_TYPES, ZCL_INT8U_ATTRIBUTE_TYPES_SIZE }; + } + case OperationalCredentials::Attributes::CommissionedFabrics::Id: { + return { ZCL_INT8U_ATTRIBUTE_TYPES, ZCL_INT8U_ATTRIBUTE_TYPES_SIZE }; + } + case OperationalCredentials::Attributes::TrustedRootCertificates::Id: { + return { ZCL_ARRAY_ATTRIBUTE_TYPES, ZCL_ARRAY_ATTRIBUTE_TYPES_SIZE }; + } + case OperationalCredentials::Attributes::CurrentFabricIndex::Id: { + return { ZCL_INT8U_ATTRIBUTE_TYPES, ZCL_INT8U_ATTRIBUTE_TYPES_SIZE }; + } + case OperationalCredentials::Attributes::GeneratedCommandList::Id: { + return { ZCL_ARRAY_ATTRIBUTE_TYPES, ZCL_ARRAY_ATTRIBUTE_TYPES_SIZE }; + } + case OperationalCredentials::Attributes::AcceptedCommandList::Id: { + return { ZCL_ARRAY_ATTRIBUTE_TYPES, ZCL_ARRAY_ATTRIBUTE_TYPES_SIZE }; + } + case OperationalCredentials::Attributes::AttributeList::Id: { + return { ZCL_ARRAY_ATTRIBUTE_TYPES, ZCL_ARRAY_ATTRIBUTE_TYPES_SIZE }; + } + case OperationalCredentials::Attributes::FeatureMap::Id: { + return { ZCL_BITMAP32_ATTRIBUTE_TYPES, ZCL_BITMAP32_ATTRIBUTE_TYPES_SIZE }; + } + case OperationalCredentials::Attributes::ClusterRevision::Id: { + return { ZCL_INT16U_ATTRIBUTE_TYPES, ZCL_INT16U_ATTRIBUTE_TYPES_SIZE }; + } + default: + return { ZCL_BOOLEAN_ATTRIBUTE_TYPES, 0x01 }; + } + } + case chip::app::Clusters::GroupKeyManagement::Id: { + switch (attribute_id) + { + case GroupKeyManagement::Attributes::GroupKeyMap::Id: { + return { ZCL_ARRAY_ATTRIBUTE_TYPES, ZCL_ARRAY_ATTRIBUTE_TYPES_SIZE }; + } + case GroupKeyManagement::Attributes::GroupTable::Id: { + return { ZCL_ARRAY_ATTRIBUTE_TYPES, ZCL_ARRAY_ATTRIBUTE_TYPES_SIZE }; + } + case GroupKeyManagement::Attributes::MaxGroupsPerFabric::Id: { + return { ZCL_INT16U_ATTRIBUTE_TYPES, ZCL_INT16U_ATTRIBUTE_TYPES_SIZE }; + } + case GroupKeyManagement::Attributes::MaxGroupKeysPerFabric::Id: { + return { ZCL_INT16U_ATTRIBUTE_TYPES, ZCL_INT16U_ATTRIBUTE_TYPES_SIZE }; + } + case GroupKeyManagement::Attributes::GeneratedCommandList::Id: { + return { ZCL_ARRAY_ATTRIBUTE_TYPES, ZCL_ARRAY_ATTRIBUTE_TYPES_SIZE }; + } + case GroupKeyManagement::Attributes::AcceptedCommandList::Id: { + return { ZCL_ARRAY_ATTRIBUTE_TYPES, ZCL_ARRAY_ATTRIBUTE_TYPES_SIZE }; + } + case GroupKeyManagement::Attributes::AttributeList::Id: { + return { ZCL_ARRAY_ATTRIBUTE_TYPES, ZCL_ARRAY_ATTRIBUTE_TYPES_SIZE }; + } + case GroupKeyManagement::Attributes::FeatureMap::Id: { + return { ZCL_BITMAP32_ATTRIBUTE_TYPES, ZCL_BITMAP32_ATTRIBUTE_TYPES_SIZE }; + } + case GroupKeyManagement::Attributes::ClusterRevision::Id: { + return { ZCL_INT16U_ATTRIBUTE_TYPES, ZCL_INT16U_ATTRIBUTE_TYPES_SIZE }; + } + default: + return { ZCL_BOOLEAN_ATTRIBUTE_TYPES, 0x01 }; + } + } + case chip::app::Clusters::FixedLabel::Id: { + switch (attribute_id) + { + case FixedLabel::Attributes::LabelList::Id: { + return { ZCL_ARRAY_ATTRIBUTE_TYPES, ZCL_ARRAY_ATTRIBUTE_TYPES_SIZE }; + } + case FixedLabel::Attributes::GeneratedCommandList::Id: { + return { ZCL_ARRAY_ATTRIBUTE_TYPES, ZCL_ARRAY_ATTRIBUTE_TYPES_SIZE }; + } + case FixedLabel::Attributes::AcceptedCommandList::Id: { + return { ZCL_ARRAY_ATTRIBUTE_TYPES, ZCL_ARRAY_ATTRIBUTE_TYPES_SIZE }; + } + case FixedLabel::Attributes::AttributeList::Id: { + return { ZCL_ARRAY_ATTRIBUTE_TYPES, ZCL_ARRAY_ATTRIBUTE_TYPES_SIZE }; + } + case FixedLabel::Attributes::FeatureMap::Id: { + return { ZCL_BITMAP32_ATTRIBUTE_TYPES, ZCL_BITMAP32_ATTRIBUTE_TYPES_SIZE }; + } + case FixedLabel::Attributes::ClusterRevision::Id: { + return { ZCL_INT16U_ATTRIBUTE_TYPES, ZCL_INT16U_ATTRIBUTE_TYPES_SIZE }; + } + default: + return { ZCL_BOOLEAN_ATTRIBUTE_TYPES, 0x01 }; + } + } + case chip::app::Clusters::UserLabel::Id: { + switch (attribute_id) + { + case UserLabel::Attributes::LabelList::Id: { + return { ZCL_ARRAY_ATTRIBUTE_TYPES, ZCL_ARRAY_ATTRIBUTE_TYPES_SIZE }; + } + case UserLabel::Attributes::GeneratedCommandList::Id: { + return { ZCL_ARRAY_ATTRIBUTE_TYPES, ZCL_ARRAY_ATTRIBUTE_TYPES_SIZE }; + } + case UserLabel::Attributes::AcceptedCommandList::Id: { + return { ZCL_ARRAY_ATTRIBUTE_TYPES, ZCL_ARRAY_ATTRIBUTE_TYPES_SIZE }; + } + case UserLabel::Attributes::AttributeList::Id: { + return { ZCL_ARRAY_ATTRIBUTE_TYPES, ZCL_ARRAY_ATTRIBUTE_TYPES_SIZE }; + } + case UserLabel::Attributes::FeatureMap::Id: { + return { ZCL_BITMAP32_ATTRIBUTE_TYPES, ZCL_BITMAP32_ATTRIBUTE_TYPES_SIZE }; + } + case UserLabel::Attributes::ClusterRevision::Id: { + return { ZCL_INT16U_ATTRIBUTE_TYPES, ZCL_INT16U_ATTRIBUTE_TYPES_SIZE }; + } + default: + return { ZCL_BOOLEAN_ATTRIBUTE_TYPES, 0x01 }; + } + } + case chip::app::Clusters::ProxyConfiguration::Id: { + switch (attribute_id) + { + case ProxyConfiguration::Attributes::GeneratedCommandList::Id: { + return { ZCL_ARRAY_ATTRIBUTE_TYPES, ZCL_ARRAY_ATTRIBUTE_TYPES_SIZE }; + } + case ProxyConfiguration::Attributes::AcceptedCommandList::Id: { + return { ZCL_ARRAY_ATTRIBUTE_TYPES, ZCL_ARRAY_ATTRIBUTE_TYPES_SIZE }; + } + case ProxyConfiguration::Attributes::AttributeList::Id: { + return { ZCL_ARRAY_ATTRIBUTE_TYPES, ZCL_ARRAY_ATTRIBUTE_TYPES_SIZE }; + } + case ProxyConfiguration::Attributes::FeatureMap::Id: { + return { ZCL_BITMAP32_ATTRIBUTE_TYPES, ZCL_BITMAP32_ATTRIBUTE_TYPES_SIZE }; + } + case ProxyConfiguration::Attributes::ClusterRevision::Id: { + return { ZCL_INT16U_ATTRIBUTE_TYPES, ZCL_INT16U_ATTRIBUTE_TYPES_SIZE }; + } + default: + return { ZCL_BOOLEAN_ATTRIBUTE_TYPES, 0x01 }; + } + } + case chip::app::Clusters::ProxyDiscovery::Id: { + switch (attribute_id) + { + case ProxyDiscovery::Attributes::GeneratedCommandList::Id: { + return { ZCL_ARRAY_ATTRIBUTE_TYPES, ZCL_ARRAY_ATTRIBUTE_TYPES_SIZE }; + } + case ProxyDiscovery::Attributes::AcceptedCommandList::Id: { + return { ZCL_ARRAY_ATTRIBUTE_TYPES, ZCL_ARRAY_ATTRIBUTE_TYPES_SIZE }; + } + case ProxyDiscovery::Attributes::AttributeList::Id: { + return { ZCL_ARRAY_ATTRIBUTE_TYPES, ZCL_ARRAY_ATTRIBUTE_TYPES_SIZE }; + } + case ProxyDiscovery::Attributes::FeatureMap::Id: { + return { ZCL_BITMAP32_ATTRIBUTE_TYPES, ZCL_BITMAP32_ATTRIBUTE_TYPES_SIZE }; + } + case ProxyDiscovery::Attributes::ClusterRevision::Id: { + return { ZCL_INT16U_ATTRIBUTE_TYPES, ZCL_INT16U_ATTRIBUTE_TYPES_SIZE }; + } + default: + return { ZCL_BOOLEAN_ATTRIBUTE_TYPES, 0x01 }; + } + } + case chip::app::Clusters::ProxyValid::Id: { + switch (attribute_id) + { + case ProxyValid::Attributes::GeneratedCommandList::Id: { + return { ZCL_ARRAY_ATTRIBUTE_TYPES, ZCL_ARRAY_ATTRIBUTE_TYPES_SIZE }; + } + case ProxyValid::Attributes::AcceptedCommandList::Id: { + return { ZCL_ARRAY_ATTRIBUTE_TYPES, ZCL_ARRAY_ATTRIBUTE_TYPES_SIZE }; + } + case ProxyValid::Attributes::AttributeList::Id: { + return { ZCL_ARRAY_ATTRIBUTE_TYPES, ZCL_ARRAY_ATTRIBUTE_TYPES_SIZE }; + } + case ProxyValid::Attributes::FeatureMap::Id: { + return { ZCL_BITMAP32_ATTRIBUTE_TYPES, ZCL_BITMAP32_ATTRIBUTE_TYPES_SIZE }; + } + case ProxyValid::Attributes::ClusterRevision::Id: { + return { ZCL_INT16U_ATTRIBUTE_TYPES, ZCL_INT16U_ATTRIBUTE_TYPES_SIZE }; + } + default: + return { ZCL_BOOLEAN_ATTRIBUTE_TYPES, 0x01 }; + } + } + case chip::app::Clusters::BooleanState::Id: { + switch (attribute_id) + { + case BooleanState::Attributes::StateValue::Id: { + return { ZCL_BOOLEAN_ATTRIBUTE_TYPES, ZCL_BOOLEAN_ATTRIBUTE_TYPES_SIZE }; + } + case BooleanState::Attributes::GeneratedCommandList::Id: { + return { ZCL_ARRAY_ATTRIBUTE_TYPES, ZCL_ARRAY_ATTRIBUTE_TYPES_SIZE }; + } + case BooleanState::Attributes::AcceptedCommandList::Id: { + return { ZCL_ARRAY_ATTRIBUTE_TYPES, ZCL_ARRAY_ATTRIBUTE_TYPES_SIZE }; + } + case BooleanState::Attributes::AttributeList::Id: { + return { ZCL_ARRAY_ATTRIBUTE_TYPES, ZCL_ARRAY_ATTRIBUTE_TYPES_SIZE }; + } + case BooleanState::Attributes::FeatureMap::Id: { + return { ZCL_BITMAP32_ATTRIBUTE_TYPES, ZCL_BITMAP32_ATTRIBUTE_TYPES_SIZE }; + } + case BooleanState::Attributes::ClusterRevision::Id: { + return { ZCL_INT16U_ATTRIBUTE_TYPES, ZCL_INT16U_ATTRIBUTE_TYPES_SIZE }; + } + default: + return { ZCL_BOOLEAN_ATTRIBUTE_TYPES, 0x01 }; + } + } + case chip::app::Clusters::ModeSelect::Id: { + switch (attribute_id) + { + case ModeSelect::Attributes::Description::Id: { + return { ZCL_CHAR_STRING_ATTRIBUTE_TYPES, ZCL_CHAR_STRING_ATTRIBUTE_TYPES_SIZE }; + } + case ModeSelect::Attributes::StandardNamespace::Id: { + return { ZCL_ENUM16_ATTRIBUTE_TYPES, ZCL_ENUM16_ATTRIBUTE_TYPES_SIZE }; + } + case ModeSelect::Attributes::SupportedModes::Id: { + return { ZCL_ARRAY_ATTRIBUTE_TYPES, ZCL_ARRAY_ATTRIBUTE_TYPES_SIZE }; + } + case ModeSelect::Attributes::CurrentMode::Id: { + return { ZCL_INT8U_ATTRIBUTE_TYPES, ZCL_INT8U_ATTRIBUTE_TYPES_SIZE }; + } + case ModeSelect::Attributes::StartUpMode::Id: { + return { ZCL_INT8U_ATTRIBUTE_TYPES, ZCL_INT8U_ATTRIBUTE_TYPES_SIZE }; + } + case ModeSelect::Attributes::OnMode::Id: { + return { ZCL_INT8U_ATTRIBUTE_TYPES, ZCL_INT8U_ATTRIBUTE_TYPES_SIZE }; + } + case ModeSelect::Attributes::GeneratedCommandList::Id: { + return { ZCL_ARRAY_ATTRIBUTE_TYPES, ZCL_ARRAY_ATTRIBUTE_TYPES_SIZE }; + } + case ModeSelect::Attributes::AcceptedCommandList::Id: { + return { ZCL_ARRAY_ATTRIBUTE_TYPES, ZCL_ARRAY_ATTRIBUTE_TYPES_SIZE }; + } + case ModeSelect::Attributes::AttributeList::Id: { + return { ZCL_ARRAY_ATTRIBUTE_TYPES, ZCL_ARRAY_ATTRIBUTE_TYPES_SIZE }; + } + case ModeSelect::Attributes::FeatureMap::Id: { + return { ZCL_BITMAP32_ATTRIBUTE_TYPES, ZCL_BITMAP32_ATTRIBUTE_TYPES_SIZE }; + } + case ModeSelect::Attributes::ClusterRevision::Id: { + return { ZCL_INT16U_ATTRIBUTE_TYPES, ZCL_INT16U_ATTRIBUTE_TYPES_SIZE }; + } + default: + return { ZCL_BOOLEAN_ATTRIBUTE_TYPES, 0x01 }; + } + } + case chip::app::Clusters::DoorLock::Id: { + switch (attribute_id) + { + case DoorLock::Attributes::LockState::Id: { + return { ZCL_DL_LOCK_STATE_ATTRIBUTE_TYPES, ZCL_DL_LOCK_STATE_ATTRIBUTE_TYPES_SIZE }; + } + case DoorLock::Attributes::LockType::Id: { + return { ZCL_DL_LOCK_TYPE_ATTRIBUTE_TYPES, ZCL_DL_LOCK_TYPE_ATTRIBUTE_TYPES_SIZE }; + } + case DoorLock::Attributes::ActuatorEnabled::Id: { + return { ZCL_BOOLEAN_ATTRIBUTE_TYPES, ZCL_BOOLEAN_ATTRIBUTE_TYPES_SIZE }; + } + case DoorLock::Attributes::DoorState::Id: { + return { ZCL_DL_DOOR_STATE_ATTRIBUTE_TYPES, ZCL_DL_DOOR_STATE_ATTRIBUTE_TYPES_SIZE }; + } + case DoorLock::Attributes::DoorOpenEvents::Id: { + return { ZCL_INT32U_ATTRIBUTE_TYPES, ZCL_INT32U_ATTRIBUTE_TYPES_SIZE }; + } + case DoorLock::Attributes::DoorClosedEvents::Id: { + return { ZCL_INT32U_ATTRIBUTE_TYPES, ZCL_INT32U_ATTRIBUTE_TYPES_SIZE }; + } + case DoorLock::Attributes::OpenPeriod::Id: { + return { ZCL_INT16U_ATTRIBUTE_TYPES, ZCL_INT16U_ATTRIBUTE_TYPES_SIZE }; + } + case DoorLock::Attributes::NumberOfTotalUsersSupported::Id: { + return { ZCL_INT16U_ATTRIBUTE_TYPES, ZCL_INT16U_ATTRIBUTE_TYPES_SIZE }; + } + case DoorLock::Attributes::NumberOfPINUsersSupported::Id: { + return { ZCL_INT16U_ATTRIBUTE_TYPES, ZCL_INT16U_ATTRIBUTE_TYPES_SIZE }; + } + case DoorLock::Attributes::NumberOfRFIDUsersSupported::Id: { + return { ZCL_INT16U_ATTRIBUTE_TYPES, ZCL_INT16U_ATTRIBUTE_TYPES_SIZE }; + } + case DoorLock::Attributes::NumberOfWeekDaySchedulesSupportedPerUser::Id: { + return { ZCL_INT8U_ATTRIBUTE_TYPES, ZCL_INT8U_ATTRIBUTE_TYPES_SIZE }; + } + case DoorLock::Attributes::NumberOfYearDaySchedulesSupportedPerUser::Id: { + return { ZCL_INT8U_ATTRIBUTE_TYPES, ZCL_INT8U_ATTRIBUTE_TYPES_SIZE }; + } + case DoorLock::Attributes::NumberOfHolidaySchedulesSupported::Id: { + return { ZCL_INT8U_ATTRIBUTE_TYPES, ZCL_INT8U_ATTRIBUTE_TYPES_SIZE }; + } + case DoorLock::Attributes::MaxPINCodeLength::Id: { + return { ZCL_INT8U_ATTRIBUTE_TYPES, ZCL_INT8U_ATTRIBUTE_TYPES_SIZE }; + } + case DoorLock::Attributes::MinPINCodeLength::Id: { + return { ZCL_INT8U_ATTRIBUTE_TYPES, ZCL_INT8U_ATTRIBUTE_TYPES_SIZE }; + } + case DoorLock::Attributes::MaxRFIDCodeLength::Id: { + return { ZCL_INT8U_ATTRIBUTE_TYPES, ZCL_INT8U_ATTRIBUTE_TYPES_SIZE }; + } + case DoorLock::Attributes::MinRFIDCodeLength::Id: { + return { ZCL_INT8U_ATTRIBUTE_TYPES, ZCL_INT8U_ATTRIBUTE_TYPES_SIZE }; + } + case DoorLock::Attributes::CredentialRulesSupport::Id: { + return { ZCL_DL_CREDENTIAL_RULE_MASK_ATTRIBUTE_TYPES, ZCL_DL_CREDENTIAL_RULE_MASK_ATTRIBUTE_TYPES_SIZE }; + } + case DoorLock::Attributes::NumberOfCredentialsSupportedPerUser::Id: { + return { ZCL_INT8U_ATTRIBUTE_TYPES, ZCL_INT8U_ATTRIBUTE_TYPES_SIZE }; + } + case DoorLock::Attributes::Language::Id: { + return { ZCL_CHAR_STRING_ATTRIBUTE_TYPES, ZCL_CHAR_STRING_ATTRIBUTE_TYPES_SIZE }; + } + case DoorLock::Attributes::LEDSettings::Id: { + return { ZCL_INT8U_ATTRIBUTE_TYPES, ZCL_INT8U_ATTRIBUTE_TYPES_SIZE }; + } + case DoorLock::Attributes::AutoRelockTime::Id: { + return { ZCL_INT32U_ATTRIBUTE_TYPES, ZCL_INT32U_ATTRIBUTE_TYPES_SIZE }; + } + case DoorLock::Attributes::SoundVolume::Id: { + return { ZCL_INT8U_ATTRIBUTE_TYPES, ZCL_INT8U_ATTRIBUTE_TYPES_SIZE }; + } + case DoorLock::Attributes::OperatingMode::Id: { + return { ZCL_DL_OPERATING_MODE_ATTRIBUTE_TYPES, ZCL_DL_OPERATING_MODE_ATTRIBUTE_TYPES_SIZE }; + } + case DoorLock::Attributes::SupportedOperatingModes::Id: { + return { ZCL_DL_SUPPORTED_OPERATING_MODES_ATTRIBUTE_TYPES, ZCL_DL_SUPPORTED_OPERATING_MODES_ATTRIBUTE_TYPES_SIZE }; + } + case DoorLock::Attributes::DefaultConfigurationRegister::Id: { + return { ZCL_DL_DEFAULT_CONFIGURATION_REGISTER_ATTRIBUTE_TYPES, + ZCL_DL_DEFAULT_CONFIGURATION_REGISTER_ATTRIBUTE_TYPES_SIZE }; + } + case DoorLock::Attributes::EnableLocalProgramming::Id: { + return { ZCL_BOOLEAN_ATTRIBUTE_TYPES, ZCL_BOOLEAN_ATTRIBUTE_TYPES_SIZE }; + } + case DoorLock::Attributes::EnableOneTouchLocking::Id: { + return { ZCL_BOOLEAN_ATTRIBUTE_TYPES, ZCL_BOOLEAN_ATTRIBUTE_TYPES_SIZE }; + } + case DoorLock::Attributes::EnableInsideStatusLED::Id: { + return { ZCL_BOOLEAN_ATTRIBUTE_TYPES, ZCL_BOOLEAN_ATTRIBUTE_TYPES_SIZE }; + } + case DoorLock::Attributes::EnablePrivacyModeButton::Id: { + return { ZCL_BOOLEAN_ATTRIBUTE_TYPES, ZCL_BOOLEAN_ATTRIBUTE_TYPES_SIZE }; + } + case DoorLock::Attributes::LocalProgrammingFeatures::Id: { + return { ZCL_DL_LOCAL_PROGRAMMING_FEATURES_ATTRIBUTE_TYPES, ZCL_DL_LOCAL_PROGRAMMING_FEATURES_ATTRIBUTE_TYPES_SIZE }; + } + case DoorLock::Attributes::WrongCodeEntryLimit::Id: { + return { ZCL_INT8U_ATTRIBUTE_TYPES, ZCL_INT8U_ATTRIBUTE_TYPES_SIZE }; + } + case DoorLock::Attributes::UserCodeTemporaryDisableTime::Id: { + return { ZCL_INT8U_ATTRIBUTE_TYPES, ZCL_INT8U_ATTRIBUTE_TYPES_SIZE }; + } + case DoorLock::Attributes::SendPINOverTheAir::Id: { + return { ZCL_BOOLEAN_ATTRIBUTE_TYPES, ZCL_BOOLEAN_ATTRIBUTE_TYPES_SIZE }; + } + case DoorLock::Attributes::RequirePINforRemoteOperation::Id: { + return { ZCL_BOOLEAN_ATTRIBUTE_TYPES, ZCL_BOOLEAN_ATTRIBUTE_TYPES_SIZE }; + } + case DoorLock::Attributes::ExpiringUserTimeout::Id: { + return { ZCL_INT16U_ATTRIBUTE_TYPES, ZCL_INT16U_ATTRIBUTE_TYPES_SIZE }; + } + case DoorLock::Attributes::GeneratedCommandList::Id: { + return { ZCL_ARRAY_ATTRIBUTE_TYPES, ZCL_ARRAY_ATTRIBUTE_TYPES_SIZE }; + } + case DoorLock::Attributes::AcceptedCommandList::Id: { + return { ZCL_ARRAY_ATTRIBUTE_TYPES, ZCL_ARRAY_ATTRIBUTE_TYPES_SIZE }; + } + case DoorLock::Attributes::AttributeList::Id: { + return { ZCL_ARRAY_ATTRIBUTE_TYPES, ZCL_ARRAY_ATTRIBUTE_TYPES_SIZE }; + } + case DoorLock::Attributes::FeatureMap::Id: { + return { ZCL_BITMAP32_ATTRIBUTE_TYPES, ZCL_BITMAP32_ATTRIBUTE_TYPES_SIZE }; + } + case DoorLock::Attributes::ClusterRevision::Id: { + return { ZCL_INT16U_ATTRIBUTE_TYPES, ZCL_INT16U_ATTRIBUTE_TYPES_SIZE }; + } + default: + return { ZCL_BOOLEAN_ATTRIBUTE_TYPES, 0x01 }; + } + } + case chip::app::Clusters::WindowCovering::Id: { + switch (attribute_id) + { + case WindowCovering::Attributes::Type::Id: { + return { ZCL_TYPE_ATTRIBUTE_TYPES, ZCL_TYPE_ATTRIBUTE_TYPES_SIZE }; + } + case WindowCovering::Attributes::PhysicalClosedLimitLift::Id: { + return { ZCL_INT16U_ATTRIBUTE_TYPES, ZCL_INT16U_ATTRIBUTE_TYPES_SIZE }; + } + case WindowCovering::Attributes::PhysicalClosedLimitTilt::Id: { + return { ZCL_INT16U_ATTRIBUTE_TYPES, ZCL_INT16U_ATTRIBUTE_TYPES_SIZE }; + } + case WindowCovering::Attributes::CurrentPositionLift::Id: { + return { ZCL_INT16U_ATTRIBUTE_TYPES, ZCL_INT16U_ATTRIBUTE_TYPES_SIZE }; + } + case WindowCovering::Attributes::CurrentPositionTilt::Id: { + return { ZCL_INT16U_ATTRIBUTE_TYPES, ZCL_INT16U_ATTRIBUTE_TYPES_SIZE }; + } + case WindowCovering::Attributes::NumberOfActuationsLift::Id: { + return { ZCL_INT16U_ATTRIBUTE_TYPES, ZCL_INT16U_ATTRIBUTE_TYPES_SIZE }; + } + case WindowCovering::Attributes::NumberOfActuationsTilt::Id: { + return { ZCL_INT16U_ATTRIBUTE_TYPES, ZCL_INT16U_ATTRIBUTE_TYPES_SIZE }; + } + case WindowCovering::Attributes::ConfigStatus::Id: { + return { ZCL_CONFIG_STATUS_ATTRIBUTE_TYPES, ZCL_CONFIG_STATUS_ATTRIBUTE_TYPES_SIZE }; + } + case WindowCovering::Attributes::CurrentPositionLiftPercentage::Id: { + return { ZCL_PERCENT_ATTRIBUTE_TYPES, ZCL_PERCENT_ATTRIBUTE_TYPES_SIZE }; + } + case WindowCovering::Attributes::CurrentPositionTiltPercentage::Id: { + return { ZCL_PERCENT_ATTRIBUTE_TYPES, ZCL_PERCENT_ATTRIBUTE_TYPES_SIZE }; + } + case WindowCovering::Attributes::OperationalStatus::Id: { + return { ZCL_OPERATIONAL_STATUS_ATTRIBUTE_TYPES, ZCL_OPERATIONAL_STATUS_ATTRIBUTE_TYPES_SIZE }; + } + case WindowCovering::Attributes::TargetPositionLiftPercent100ths::Id: { + return { ZCL_PERCENT100THS_ATTRIBUTE_TYPES, ZCL_PERCENT100THS_ATTRIBUTE_TYPES_SIZE }; + } + case WindowCovering::Attributes::TargetPositionTiltPercent100ths::Id: { + return { ZCL_PERCENT100THS_ATTRIBUTE_TYPES, ZCL_PERCENT100THS_ATTRIBUTE_TYPES_SIZE }; + } + case WindowCovering::Attributes::EndProductType::Id: { + return { ZCL_END_PRODUCT_TYPE_ATTRIBUTE_TYPES, ZCL_END_PRODUCT_TYPE_ATTRIBUTE_TYPES_SIZE }; + } + case WindowCovering::Attributes::CurrentPositionLiftPercent100ths::Id: { + return { ZCL_PERCENT100THS_ATTRIBUTE_TYPES, ZCL_PERCENT100THS_ATTRIBUTE_TYPES_SIZE }; + } + case WindowCovering::Attributes::CurrentPositionTiltPercent100ths::Id: { + return { ZCL_PERCENT100THS_ATTRIBUTE_TYPES, ZCL_PERCENT100THS_ATTRIBUTE_TYPES_SIZE }; + } + case WindowCovering::Attributes::InstalledOpenLimitLift::Id: { + return { ZCL_INT16U_ATTRIBUTE_TYPES, ZCL_INT16U_ATTRIBUTE_TYPES_SIZE }; + } + case WindowCovering::Attributes::InstalledClosedLimitLift::Id: { + return { ZCL_INT16U_ATTRIBUTE_TYPES, ZCL_INT16U_ATTRIBUTE_TYPES_SIZE }; + } + case WindowCovering::Attributes::InstalledOpenLimitTilt::Id: { + return { ZCL_INT16U_ATTRIBUTE_TYPES, ZCL_INT16U_ATTRIBUTE_TYPES_SIZE }; + } + case WindowCovering::Attributes::InstalledClosedLimitTilt::Id: { + return { ZCL_INT16U_ATTRIBUTE_TYPES, ZCL_INT16U_ATTRIBUTE_TYPES_SIZE }; + } + case WindowCovering::Attributes::Mode::Id: { + return { ZCL_MODE_ATTRIBUTE_TYPES, ZCL_MODE_ATTRIBUTE_TYPES_SIZE }; + } + case WindowCovering::Attributes::SafetyStatus::Id: { + return { ZCL_SAFETY_STATUS_ATTRIBUTE_TYPES, ZCL_SAFETY_STATUS_ATTRIBUTE_TYPES_SIZE }; + } + case WindowCovering::Attributes::GeneratedCommandList::Id: { + return { ZCL_ARRAY_ATTRIBUTE_TYPES, ZCL_ARRAY_ATTRIBUTE_TYPES_SIZE }; + } + case WindowCovering::Attributes::AcceptedCommandList::Id: { + return { ZCL_ARRAY_ATTRIBUTE_TYPES, ZCL_ARRAY_ATTRIBUTE_TYPES_SIZE }; + } + case WindowCovering::Attributes::AttributeList::Id: { + return { ZCL_ARRAY_ATTRIBUTE_TYPES, ZCL_ARRAY_ATTRIBUTE_TYPES_SIZE }; + } + case WindowCovering::Attributes::FeatureMap::Id: { + return { ZCL_BITMAP32_ATTRIBUTE_TYPES, ZCL_BITMAP32_ATTRIBUTE_TYPES_SIZE }; + } + case WindowCovering::Attributes::ClusterRevision::Id: { + return { ZCL_INT16U_ATTRIBUTE_TYPES, ZCL_INT16U_ATTRIBUTE_TYPES_SIZE }; + } + default: + return { ZCL_BOOLEAN_ATTRIBUTE_TYPES, 0x01 }; + } + } + case chip::app::Clusters::BarrierControl::Id: { + switch (attribute_id) + { + case BarrierControl::Attributes::BarrierMovingState::Id: { + return { ZCL_ENUM8_ATTRIBUTE_TYPES, ZCL_ENUM8_ATTRIBUTE_TYPES_SIZE }; + } + case BarrierControl::Attributes::BarrierSafetyStatus::Id: { + return { ZCL_BITMAP16_ATTRIBUTE_TYPES, ZCL_BITMAP16_ATTRIBUTE_TYPES_SIZE }; + } + case BarrierControl::Attributes::BarrierCapabilities::Id: { + return { ZCL_BITMAP8_ATTRIBUTE_TYPES, ZCL_BITMAP8_ATTRIBUTE_TYPES_SIZE }; + } + case BarrierControl::Attributes::BarrierOpenEvents::Id: { + return { ZCL_INT16U_ATTRIBUTE_TYPES, ZCL_INT16U_ATTRIBUTE_TYPES_SIZE }; + } + case BarrierControl::Attributes::BarrierCloseEvents::Id: { + return { ZCL_INT16U_ATTRIBUTE_TYPES, ZCL_INT16U_ATTRIBUTE_TYPES_SIZE }; + } + case BarrierControl::Attributes::BarrierCommandOpenEvents::Id: { + return { ZCL_INT16U_ATTRIBUTE_TYPES, ZCL_INT16U_ATTRIBUTE_TYPES_SIZE }; + } + case BarrierControl::Attributes::BarrierCommandCloseEvents::Id: { + return { ZCL_INT16U_ATTRIBUTE_TYPES, ZCL_INT16U_ATTRIBUTE_TYPES_SIZE }; + } + case BarrierControl::Attributes::BarrierOpenPeriod::Id: { + return { ZCL_INT16U_ATTRIBUTE_TYPES, ZCL_INT16U_ATTRIBUTE_TYPES_SIZE }; + } + case BarrierControl::Attributes::BarrierClosePeriod::Id: { + return { ZCL_INT16U_ATTRIBUTE_TYPES, ZCL_INT16U_ATTRIBUTE_TYPES_SIZE }; + } + case BarrierControl::Attributes::BarrierPosition::Id: { + return { ZCL_INT8U_ATTRIBUTE_TYPES, ZCL_INT8U_ATTRIBUTE_TYPES_SIZE }; + } + case BarrierControl::Attributes::GeneratedCommandList::Id: { + return { ZCL_ARRAY_ATTRIBUTE_TYPES, ZCL_ARRAY_ATTRIBUTE_TYPES_SIZE }; + } + case BarrierControl::Attributes::AcceptedCommandList::Id: { + return { ZCL_ARRAY_ATTRIBUTE_TYPES, ZCL_ARRAY_ATTRIBUTE_TYPES_SIZE }; + } + case BarrierControl::Attributes::AttributeList::Id: { + return { ZCL_ARRAY_ATTRIBUTE_TYPES, ZCL_ARRAY_ATTRIBUTE_TYPES_SIZE }; + } + case BarrierControl::Attributes::FeatureMap::Id: { + return { ZCL_BITMAP32_ATTRIBUTE_TYPES, ZCL_BITMAP32_ATTRIBUTE_TYPES_SIZE }; + } + case BarrierControl::Attributes::ClusterRevision::Id: { + return { ZCL_INT16U_ATTRIBUTE_TYPES, ZCL_INT16U_ATTRIBUTE_TYPES_SIZE }; + } + default: + return { ZCL_BOOLEAN_ATTRIBUTE_TYPES, 0x01 }; + } + } + case chip::app::Clusters::Thermostat::Id: { + switch (attribute_id) + { + case Thermostat::Attributes::LocalTemperature::Id: { + return { ZCL_INT16S_ATTRIBUTE_TYPES, ZCL_INT16S_ATTRIBUTE_TYPES_SIZE }; + } + case Thermostat::Attributes::OutdoorTemperature::Id: { + return { ZCL_INT16S_ATTRIBUTE_TYPES, ZCL_INT16S_ATTRIBUTE_TYPES_SIZE }; + } + case Thermostat::Attributes::Occupancy::Id: { + return { ZCL_BITMAP8_ATTRIBUTE_TYPES, ZCL_BITMAP8_ATTRIBUTE_TYPES_SIZE }; + } + case Thermostat::Attributes::AbsMinHeatSetpointLimit::Id: { + return { ZCL_INT16S_ATTRIBUTE_TYPES, ZCL_INT16S_ATTRIBUTE_TYPES_SIZE }; + } + case Thermostat::Attributes::AbsMaxHeatSetpointLimit::Id: { + return { ZCL_INT16S_ATTRIBUTE_TYPES, ZCL_INT16S_ATTRIBUTE_TYPES_SIZE }; + } + case Thermostat::Attributes::AbsMinCoolSetpointLimit::Id: { + return { ZCL_INT16S_ATTRIBUTE_TYPES, ZCL_INT16S_ATTRIBUTE_TYPES_SIZE }; + } + case Thermostat::Attributes::AbsMaxCoolSetpointLimit::Id: { + return { ZCL_INT16S_ATTRIBUTE_TYPES, ZCL_INT16S_ATTRIBUTE_TYPES_SIZE }; + } + case Thermostat::Attributes::PICoolingDemand::Id: { + return { ZCL_INT8U_ATTRIBUTE_TYPES, ZCL_INT8U_ATTRIBUTE_TYPES_SIZE }; + } + case Thermostat::Attributes::PIHeatingDemand::Id: { + return { ZCL_INT8U_ATTRIBUTE_TYPES, ZCL_INT8U_ATTRIBUTE_TYPES_SIZE }; + } + case Thermostat::Attributes::HVACSystemTypeConfiguration::Id: { + return { ZCL_BITMAP8_ATTRIBUTE_TYPES, ZCL_BITMAP8_ATTRIBUTE_TYPES_SIZE }; + } + case Thermostat::Attributes::LocalTemperatureCalibration::Id: { + return { ZCL_INT8S_ATTRIBUTE_TYPES, ZCL_INT8S_ATTRIBUTE_TYPES_SIZE }; + } + case Thermostat::Attributes::OccupiedCoolingSetpoint::Id: { + return { ZCL_INT16S_ATTRIBUTE_TYPES, ZCL_INT16S_ATTRIBUTE_TYPES_SIZE }; + } + case Thermostat::Attributes::OccupiedHeatingSetpoint::Id: { + return { ZCL_INT16S_ATTRIBUTE_TYPES, ZCL_INT16S_ATTRIBUTE_TYPES_SIZE }; + } + case Thermostat::Attributes::UnoccupiedCoolingSetpoint::Id: { + return { ZCL_INT16S_ATTRIBUTE_TYPES, ZCL_INT16S_ATTRIBUTE_TYPES_SIZE }; + } + case Thermostat::Attributes::UnoccupiedHeatingSetpoint::Id: { + return { ZCL_INT16S_ATTRIBUTE_TYPES, ZCL_INT16S_ATTRIBUTE_TYPES_SIZE }; + } + case Thermostat::Attributes::MinHeatSetpointLimit::Id: { + return { ZCL_INT16S_ATTRIBUTE_TYPES, ZCL_INT16S_ATTRIBUTE_TYPES_SIZE }; + } + case Thermostat::Attributes::MaxHeatSetpointLimit::Id: { + return { ZCL_INT16S_ATTRIBUTE_TYPES, ZCL_INT16S_ATTRIBUTE_TYPES_SIZE }; + } + case Thermostat::Attributes::MinCoolSetpointLimit::Id: { + return { ZCL_INT16S_ATTRIBUTE_TYPES, ZCL_INT16S_ATTRIBUTE_TYPES_SIZE }; + } + case Thermostat::Attributes::MaxCoolSetpointLimit::Id: { + return { ZCL_INT16S_ATTRIBUTE_TYPES, ZCL_INT16S_ATTRIBUTE_TYPES_SIZE }; + } + case Thermostat::Attributes::MinSetpointDeadBand::Id: { + return { ZCL_INT8S_ATTRIBUTE_TYPES, ZCL_INT8S_ATTRIBUTE_TYPES_SIZE }; + } + case Thermostat::Attributes::RemoteSensing::Id: { + return { ZCL_BITMAP8_ATTRIBUTE_TYPES, ZCL_BITMAP8_ATTRIBUTE_TYPES_SIZE }; + } + case Thermostat::Attributes::ControlSequenceOfOperation::Id: { + return { ZCL_THERMOSTAT_CONTROL_SEQUENCE_ATTRIBUTE_TYPES, ZCL_THERMOSTAT_CONTROL_SEQUENCE_ATTRIBUTE_TYPES_SIZE }; + } + case Thermostat::Attributes::SystemMode::Id: { + return { ZCL_ENUM8_ATTRIBUTE_TYPES, ZCL_ENUM8_ATTRIBUTE_TYPES_SIZE }; + } + case Thermostat::Attributes::ThermostatRunningMode::Id: { + return { ZCL_ENUM8_ATTRIBUTE_TYPES, ZCL_ENUM8_ATTRIBUTE_TYPES_SIZE }; + } + case Thermostat::Attributes::StartOfWeek::Id: { + return { ZCL_ENUM8_ATTRIBUTE_TYPES, ZCL_ENUM8_ATTRIBUTE_TYPES_SIZE }; + } + case Thermostat::Attributes::NumberOfWeeklyTransitions::Id: { + return { ZCL_INT8U_ATTRIBUTE_TYPES, ZCL_INT8U_ATTRIBUTE_TYPES_SIZE }; + } + case Thermostat::Attributes::NumberOfDailyTransitions::Id: { + return { ZCL_INT8U_ATTRIBUTE_TYPES, ZCL_INT8U_ATTRIBUTE_TYPES_SIZE }; + } + case Thermostat::Attributes::TemperatureSetpointHold::Id: { + return { ZCL_ENUM8_ATTRIBUTE_TYPES, ZCL_ENUM8_ATTRIBUTE_TYPES_SIZE }; + } + case Thermostat::Attributes::TemperatureSetpointHoldDuration::Id: { + return { ZCL_INT16U_ATTRIBUTE_TYPES, ZCL_INT16U_ATTRIBUTE_TYPES_SIZE }; + } + case Thermostat::Attributes::ThermostatProgrammingOperationMode::Id: { + return { ZCL_BITMAP8_ATTRIBUTE_TYPES, ZCL_BITMAP8_ATTRIBUTE_TYPES_SIZE }; + } + case Thermostat::Attributes::ThermostatRunningState::Id: { + return { ZCL_BITMAP16_ATTRIBUTE_TYPES, ZCL_BITMAP16_ATTRIBUTE_TYPES_SIZE }; + } + case Thermostat::Attributes::SetpointChangeSource::Id: { + return { ZCL_ENUM8_ATTRIBUTE_TYPES, ZCL_ENUM8_ATTRIBUTE_TYPES_SIZE }; + } + case Thermostat::Attributes::SetpointChangeAmount::Id: { + return { ZCL_INT16S_ATTRIBUTE_TYPES, ZCL_INT16S_ATTRIBUTE_TYPES_SIZE }; + } + case Thermostat::Attributes::SetpointChangeSourceTimestamp::Id: { + return { ZCL_UTC_ATTRIBUTE_TYPES, ZCL_UTC_ATTRIBUTE_TYPES_SIZE }; + } + case Thermostat::Attributes::OccupiedSetback::Id: { + return { ZCL_INT8U_ATTRIBUTE_TYPES, ZCL_INT8U_ATTRIBUTE_TYPES_SIZE }; + } + case Thermostat::Attributes::OccupiedSetbackMin::Id: { + return { ZCL_INT8U_ATTRIBUTE_TYPES, ZCL_INT8U_ATTRIBUTE_TYPES_SIZE }; + } + case Thermostat::Attributes::OccupiedSetbackMax::Id: { + return { ZCL_INT8U_ATTRIBUTE_TYPES, ZCL_INT8U_ATTRIBUTE_TYPES_SIZE }; + } + case Thermostat::Attributes::UnoccupiedSetback::Id: { + return { ZCL_INT8U_ATTRIBUTE_TYPES, ZCL_INT8U_ATTRIBUTE_TYPES_SIZE }; + } + case Thermostat::Attributes::UnoccupiedSetbackMin::Id: { + return { ZCL_INT8U_ATTRIBUTE_TYPES, ZCL_INT8U_ATTRIBUTE_TYPES_SIZE }; + } + case Thermostat::Attributes::UnoccupiedSetbackMax::Id: { + return { ZCL_INT8U_ATTRIBUTE_TYPES, ZCL_INT8U_ATTRIBUTE_TYPES_SIZE }; + } + case Thermostat::Attributes::EmergencyHeatDelta::Id: { + return { ZCL_INT8U_ATTRIBUTE_TYPES, ZCL_INT8U_ATTRIBUTE_TYPES_SIZE }; + } + case Thermostat::Attributes::ACType::Id: { + return { ZCL_ENUM8_ATTRIBUTE_TYPES, ZCL_ENUM8_ATTRIBUTE_TYPES_SIZE }; + } + case Thermostat::Attributes::ACCapacity::Id: { + return { ZCL_INT16U_ATTRIBUTE_TYPES, ZCL_INT16U_ATTRIBUTE_TYPES_SIZE }; + } + case Thermostat::Attributes::ACRefrigerantType::Id: { + return { ZCL_ENUM8_ATTRIBUTE_TYPES, ZCL_ENUM8_ATTRIBUTE_TYPES_SIZE }; + } + case Thermostat::Attributes::ACCompressorType::Id: { + return { ZCL_ENUM8_ATTRIBUTE_TYPES, ZCL_ENUM8_ATTRIBUTE_TYPES_SIZE }; + } + case Thermostat::Attributes::ACErrorCode::Id: { + return { ZCL_BITMAP32_ATTRIBUTE_TYPES, ZCL_BITMAP32_ATTRIBUTE_TYPES_SIZE }; + } + case Thermostat::Attributes::ACLouverPosition::Id: { + return { ZCL_ENUM8_ATTRIBUTE_TYPES, ZCL_ENUM8_ATTRIBUTE_TYPES_SIZE }; + } + case Thermostat::Attributes::ACCoilTemperature::Id: { + return { ZCL_INT16S_ATTRIBUTE_TYPES, ZCL_INT16S_ATTRIBUTE_TYPES_SIZE }; + } + case Thermostat::Attributes::ACCapacityformat::Id: { + return { ZCL_ENUM8_ATTRIBUTE_TYPES, ZCL_ENUM8_ATTRIBUTE_TYPES_SIZE }; + } + case Thermostat::Attributes::GeneratedCommandList::Id: { + return { ZCL_ARRAY_ATTRIBUTE_TYPES, ZCL_ARRAY_ATTRIBUTE_TYPES_SIZE }; + } + case Thermostat::Attributes::AcceptedCommandList::Id: { + return { ZCL_ARRAY_ATTRIBUTE_TYPES, ZCL_ARRAY_ATTRIBUTE_TYPES_SIZE }; + } + case Thermostat::Attributes::AttributeList::Id: { + return { ZCL_ARRAY_ATTRIBUTE_TYPES, ZCL_ARRAY_ATTRIBUTE_TYPES_SIZE }; + } + case Thermostat::Attributes::FeatureMap::Id: { + return { ZCL_BITMAP32_ATTRIBUTE_TYPES, ZCL_BITMAP32_ATTRIBUTE_TYPES_SIZE }; + } + case Thermostat::Attributes::ClusterRevision::Id: { + return { ZCL_INT16U_ATTRIBUTE_TYPES, ZCL_INT16U_ATTRIBUTE_TYPES_SIZE }; + } + default: + return { ZCL_BOOLEAN_ATTRIBUTE_TYPES, 0x01 }; + } + } + case chip::app::Clusters::FanControl::Id: { + switch (attribute_id) + { + case FanControl::Attributes::FanMode::Id: { + return { ZCL_FAN_MODE_TYPE_ATTRIBUTE_TYPES, ZCL_FAN_MODE_TYPE_ATTRIBUTE_TYPES_SIZE }; + } + case FanControl::Attributes::FanModeSequence::Id: { + return { ZCL_FAN_MODE_SEQUENCE_TYPE_ATTRIBUTE_TYPES, ZCL_FAN_MODE_SEQUENCE_TYPE_ATTRIBUTE_TYPES_SIZE }; + } + case FanControl::Attributes::PercentSetting::Id: { + return { ZCL_INT8U_ATTRIBUTE_TYPES, ZCL_INT8U_ATTRIBUTE_TYPES_SIZE }; + } + case FanControl::Attributes::PercentCurrent::Id: { + return { ZCL_INT8U_ATTRIBUTE_TYPES, ZCL_INT8U_ATTRIBUTE_TYPES_SIZE }; + } + case FanControl::Attributes::SpeedMax::Id: { + return { ZCL_INT8U_ATTRIBUTE_TYPES, ZCL_INT8U_ATTRIBUTE_TYPES_SIZE }; + } + case FanControl::Attributes::SpeedSetting::Id: { + return { ZCL_INT8U_ATTRIBUTE_TYPES, ZCL_INT8U_ATTRIBUTE_TYPES_SIZE }; + } + case FanControl::Attributes::SpeedCurrent::Id: { + return { ZCL_INT8U_ATTRIBUTE_TYPES, ZCL_INT8U_ATTRIBUTE_TYPES_SIZE }; + } + case FanControl::Attributes::RockSupport::Id: { + return { ZCL_BITMAP8_ATTRIBUTE_TYPES, ZCL_BITMAP8_ATTRIBUTE_TYPES_SIZE }; + } + case FanControl::Attributes::RockSetting::Id: { + return { ZCL_BITMAP8_ATTRIBUTE_TYPES, ZCL_BITMAP8_ATTRIBUTE_TYPES_SIZE }; + } + case FanControl::Attributes::WindSupport::Id: { + return { ZCL_BITMAP8_ATTRIBUTE_TYPES, ZCL_BITMAP8_ATTRIBUTE_TYPES_SIZE }; + } + case FanControl::Attributes::WindSetting::Id: { + return { ZCL_BITMAP8_ATTRIBUTE_TYPES, ZCL_BITMAP8_ATTRIBUTE_TYPES_SIZE }; + } + case FanControl::Attributes::GeneratedCommandList::Id: { + return { ZCL_ARRAY_ATTRIBUTE_TYPES, ZCL_ARRAY_ATTRIBUTE_TYPES_SIZE }; + } + case FanControl::Attributes::AcceptedCommandList::Id: { + return { ZCL_ARRAY_ATTRIBUTE_TYPES, ZCL_ARRAY_ATTRIBUTE_TYPES_SIZE }; + } + case FanControl::Attributes::AttributeList::Id: { + return { ZCL_ARRAY_ATTRIBUTE_TYPES, ZCL_ARRAY_ATTRIBUTE_TYPES_SIZE }; + } + case FanControl::Attributes::FeatureMap::Id: { + return { ZCL_BITMAP32_ATTRIBUTE_TYPES, ZCL_BITMAP32_ATTRIBUTE_TYPES_SIZE }; + } + case FanControl::Attributes::ClusterRevision::Id: { + return { ZCL_INT16U_ATTRIBUTE_TYPES, ZCL_INT16U_ATTRIBUTE_TYPES_SIZE }; + } + default: + return { ZCL_BOOLEAN_ATTRIBUTE_TYPES, 0x01 }; + } + } + case chip::app::Clusters::ThermostatUserInterfaceConfiguration::Id: { + switch (attribute_id) + { + case ThermostatUserInterfaceConfiguration::Attributes::TemperatureDisplayMode::Id: { + return { ZCL_ENUM8_ATTRIBUTE_TYPES, ZCL_ENUM8_ATTRIBUTE_TYPES_SIZE }; + } + case ThermostatUserInterfaceConfiguration::Attributes::KeypadLockout::Id: { + return { ZCL_ENUM8_ATTRIBUTE_TYPES, ZCL_ENUM8_ATTRIBUTE_TYPES_SIZE }; + } + case ThermostatUserInterfaceConfiguration::Attributes::ScheduleProgrammingVisibility::Id: { + return { ZCL_ENUM8_ATTRIBUTE_TYPES, ZCL_ENUM8_ATTRIBUTE_TYPES_SIZE }; + } + case ThermostatUserInterfaceConfiguration::Attributes::GeneratedCommandList::Id: { + return { ZCL_ARRAY_ATTRIBUTE_TYPES, ZCL_ARRAY_ATTRIBUTE_TYPES_SIZE }; + } + case ThermostatUserInterfaceConfiguration::Attributes::AcceptedCommandList::Id: { + return { ZCL_ARRAY_ATTRIBUTE_TYPES, ZCL_ARRAY_ATTRIBUTE_TYPES_SIZE }; + } + case ThermostatUserInterfaceConfiguration::Attributes::AttributeList::Id: { + return { ZCL_ARRAY_ATTRIBUTE_TYPES, ZCL_ARRAY_ATTRIBUTE_TYPES_SIZE }; + } + case ThermostatUserInterfaceConfiguration::Attributes::FeatureMap::Id: { + return { ZCL_BITMAP32_ATTRIBUTE_TYPES, ZCL_BITMAP32_ATTRIBUTE_TYPES_SIZE }; + } + case ThermostatUserInterfaceConfiguration::Attributes::ClusterRevision::Id: { + return { ZCL_INT16U_ATTRIBUTE_TYPES, ZCL_INT16U_ATTRIBUTE_TYPES_SIZE }; + } + default: + return { ZCL_BOOLEAN_ATTRIBUTE_TYPES, 0x01 }; + } + } + case chip::app::Clusters::ColorControl::Id: { + switch (attribute_id) + { + case ColorControl::Attributes::CurrentHue::Id: { + return { ZCL_INT8U_ATTRIBUTE_TYPES, ZCL_INT8U_ATTRIBUTE_TYPES_SIZE }; + } + case ColorControl::Attributes::CurrentSaturation::Id: { + return { ZCL_INT8U_ATTRIBUTE_TYPES, ZCL_INT8U_ATTRIBUTE_TYPES_SIZE }; + } + case ColorControl::Attributes::RemainingTime::Id: { + return { ZCL_INT16U_ATTRIBUTE_TYPES, ZCL_INT16U_ATTRIBUTE_TYPES_SIZE }; + } + case ColorControl::Attributes::CurrentX::Id: { + return { ZCL_INT16U_ATTRIBUTE_TYPES, ZCL_INT16U_ATTRIBUTE_TYPES_SIZE }; + } + case ColorControl::Attributes::CurrentY::Id: { + return { ZCL_INT16U_ATTRIBUTE_TYPES, ZCL_INT16U_ATTRIBUTE_TYPES_SIZE }; + } + case ColorControl::Attributes::DriftCompensation::Id: { + return { ZCL_ENUM8_ATTRIBUTE_TYPES, ZCL_ENUM8_ATTRIBUTE_TYPES_SIZE }; + } + case ColorControl::Attributes::CompensationText::Id: { + return { ZCL_CHAR_STRING_ATTRIBUTE_TYPES, ZCL_CHAR_STRING_ATTRIBUTE_TYPES_SIZE }; + } + case ColorControl::Attributes::ColorTemperatureMireds::Id: { + return { ZCL_INT16U_ATTRIBUTE_TYPES, ZCL_INT16U_ATTRIBUTE_TYPES_SIZE }; + } + case ColorControl::Attributes::ColorMode::Id: { + return { ZCL_ENUM8_ATTRIBUTE_TYPES, ZCL_ENUM8_ATTRIBUTE_TYPES_SIZE }; + } + case ColorControl::Attributes::Options::Id: { + return { ZCL_BITMAP8_ATTRIBUTE_TYPES, ZCL_BITMAP8_ATTRIBUTE_TYPES_SIZE }; + } + case ColorControl::Attributes::NumberOfPrimaries::Id: { + return { ZCL_INT8U_ATTRIBUTE_TYPES, ZCL_INT8U_ATTRIBUTE_TYPES_SIZE }; + } + case ColorControl::Attributes::Primary1X::Id: { + return { ZCL_INT16U_ATTRIBUTE_TYPES, ZCL_INT16U_ATTRIBUTE_TYPES_SIZE }; + } + case ColorControl::Attributes::Primary1Y::Id: { + return { ZCL_INT16U_ATTRIBUTE_TYPES, ZCL_INT16U_ATTRIBUTE_TYPES_SIZE }; + } + case ColorControl::Attributes::Primary1Intensity::Id: { + return { ZCL_INT8U_ATTRIBUTE_TYPES, ZCL_INT8U_ATTRIBUTE_TYPES_SIZE }; + } + case ColorControl::Attributes::Primary2X::Id: { + return { ZCL_INT16U_ATTRIBUTE_TYPES, ZCL_INT16U_ATTRIBUTE_TYPES_SIZE }; + } + case ColorControl::Attributes::Primary2Y::Id: { + return { ZCL_INT16U_ATTRIBUTE_TYPES, ZCL_INT16U_ATTRIBUTE_TYPES_SIZE }; + } + case ColorControl::Attributes::Primary2Intensity::Id: { + return { ZCL_INT8U_ATTRIBUTE_TYPES, ZCL_INT8U_ATTRIBUTE_TYPES_SIZE }; + } + case ColorControl::Attributes::Primary3X::Id: { + return { ZCL_INT16U_ATTRIBUTE_TYPES, ZCL_INT16U_ATTRIBUTE_TYPES_SIZE }; + } + case ColorControl::Attributes::Primary3Y::Id: { + return { ZCL_INT16U_ATTRIBUTE_TYPES, ZCL_INT16U_ATTRIBUTE_TYPES_SIZE }; + } + case ColorControl::Attributes::Primary3Intensity::Id: { + return { ZCL_INT8U_ATTRIBUTE_TYPES, ZCL_INT8U_ATTRIBUTE_TYPES_SIZE }; + } + case ColorControl::Attributes::Primary4X::Id: { + return { ZCL_INT16U_ATTRIBUTE_TYPES, ZCL_INT16U_ATTRIBUTE_TYPES_SIZE }; + } + case ColorControl::Attributes::Primary4Y::Id: { + return { ZCL_INT16U_ATTRIBUTE_TYPES, ZCL_INT16U_ATTRIBUTE_TYPES_SIZE }; + } + case ColorControl::Attributes::Primary4Intensity::Id: { + return { ZCL_INT8U_ATTRIBUTE_TYPES, ZCL_INT8U_ATTRIBUTE_TYPES_SIZE }; + } + case ColorControl::Attributes::Primary5X::Id: { + return { ZCL_INT16U_ATTRIBUTE_TYPES, ZCL_INT16U_ATTRIBUTE_TYPES_SIZE }; + } + case ColorControl::Attributes::Primary5Y::Id: { + return { ZCL_INT16U_ATTRIBUTE_TYPES, ZCL_INT16U_ATTRIBUTE_TYPES_SIZE }; + } + case ColorControl::Attributes::Primary5Intensity::Id: { + return { ZCL_INT8U_ATTRIBUTE_TYPES, ZCL_INT8U_ATTRIBUTE_TYPES_SIZE }; + } + case ColorControl::Attributes::Primary6X::Id: { + return { ZCL_INT16U_ATTRIBUTE_TYPES, ZCL_INT16U_ATTRIBUTE_TYPES_SIZE }; + } + case ColorControl::Attributes::Primary6Y::Id: { + return { ZCL_INT16U_ATTRIBUTE_TYPES, ZCL_INT16U_ATTRIBUTE_TYPES_SIZE }; + } + case ColorControl::Attributes::Primary6Intensity::Id: { + return { ZCL_INT8U_ATTRIBUTE_TYPES, ZCL_INT8U_ATTRIBUTE_TYPES_SIZE }; + } + case ColorControl::Attributes::WhitePointX::Id: { + return { ZCL_INT16U_ATTRIBUTE_TYPES, ZCL_INT16U_ATTRIBUTE_TYPES_SIZE }; + } + case ColorControl::Attributes::WhitePointY::Id: { + return { ZCL_INT16U_ATTRIBUTE_TYPES, ZCL_INT16U_ATTRIBUTE_TYPES_SIZE }; + } + case ColorControl::Attributes::ColorPointRX::Id: { + return { ZCL_INT16U_ATTRIBUTE_TYPES, ZCL_INT16U_ATTRIBUTE_TYPES_SIZE }; + } + case ColorControl::Attributes::ColorPointRY::Id: { + return { ZCL_INT16U_ATTRIBUTE_TYPES, ZCL_INT16U_ATTRIBUTE_TYPES_SIZE }; + } + case ColorControl::Attributes::ColorPointRIntensity::Id: { + return { ZCL_INT8U_ATTRIBUTE_TYPES, ZCL_INT8U_ATTRIBUTE_TYPES_SIZE }; + } + case ColorControl::Attributes::ColorPointGX::Id: { + return { ZCL_INT16U_ATTRIBUTE_TYPES, ZCL_INT16U_ATTRIBUTE_TYPES_SIZE }; + } + case ColorControl::Attributes::ColorPointGY::Id: { + return { ZCL_INT16U_ATTRIBUTE_TYPES, ZCL_INT16U_ATTRIBUTE_TYPES_SIZE }; + } + case ColorControl::Attributes::ColorPointGIntensity::Id: { + return { ZCL_INT8U_ATTRIBUTE_TYPES, ZCL_INT8U_ATTRIBUTE_TYPES_SIZE }; + } + case ColorControl::Attributes::ColorPointBX::Id: { + return { ZCL_INT16U_ATTRIBUTE_TYPES, ZCL_INT16U_ATTRIBUTE_TYPES_SIZE }; + } + case ColorControl::Attributes::ColorPointBY::Id: { + return { ZCL_INT16U_ATTRIBUTE_TYPES, ZCL_INT16U_ATTRIBUTE_TYPES_SIZE }; + } + case ColorControl::Attributes::ColorPointBIntensity::Id: { + return { ZCL_INT8U_ATTRIBUTE_TYPES, ZCL_INT8U_ATTRIBUTE_TYPES_SIZE }; + } + case ColorControl::Attributes::EnhancedCurrentHue::Id: { + return { ZCL_INT16U_ATTRIBUTE_TYPES, ZCL_INT16U_ATTRIBUTE_TYPES_SIZE }; + } + case ColorControl::Attributes::EnhancedColorMode::Id: { + return { ZCL_ENUM8_ATTRIBUTE_TYPES, ZCL_ENUM8_ATTRIBUTE_TYPES_SIZE }; + } + case ColorControl::Attributes::ColorLoopActive::Id: { + return { ZCL_INT8U_ATTRIBUTE_TYPES, ZCL_INT8U_ATTRIBUTE_TYPES_SIZE }; + } + case ColorControl::Attributes::ColorLoopDirection::Id: { + return { ZCL_INT8U_ATTRIBUTE_TYPES, ZCL_INT8U_ATTRIBUTE_TYPES_SIZE }; + } + case ColorControl::Attributes::ColorLoopTime::Id: { + return { ZCL_INT16U_ATTRIBUTE_TYPES, ZCL_INT16U_ATTRIBUTE_TYPES_SIZE }; + } + case ColorControl::Attributes::ColorLoopStartEnhancedHue::Id: { + return { ZCL_INT16U_ATTRIBUTE_TYPES, ZCL_INT16U_ATTRIBUTE_TYPES_SIZE }; + } + case ColorControl::Attributes::ColorLoopStoredEnhancedHue::Id: { + return { ZCL_INT16U_ATTRIBUTE_TYPES, ZCL_INT16U_ATTRIBUTE_TYPES_SIZE }; + } + case ColorControl::Attributes::ColorCapabilities::Id: { + return { ZCL_BITMAP16_ATTRIBUTE_TYPES, ZCL_BITMAP16_ATTRIBUTE_TYPES_SIZE }; + } + case ColorControl::Attributes::ColorTempPhysicalMinMireds::Id: { + return { ZCL_INT16U_ATTRIBUTE_TYPES, ZCL_INT16U_ATTRIBUTE_TYPES_SIZE }; + } + case ColorControl::Attributes::ColorTempPhysicalMaxMireds::Id: { + return { ZCL_INT16U_ATTRIBUTE_TYPES, ZCL_INT16U_ATTRIBUTE_TYPES_SIZE }; + } + case ColorControl::Attributes::CoupleColorTempToLevelMinMireds::Id: { + return { ZCL_INT16U_ATTRIBUTE_TYPES, ZCL_INT16U_ATTRIBUTE_TYPES_SIZE }; + } + case ColorControl::Attributes::StartUpColorTemperatureMireds::Id: { + return { ZCL_INT16U_ATTRIBUTE_TYPES, ZCL_INT16U_ATTRIBUTE_TYPES_SIZE }; + } + case ColorControl::Attributes::GeneratedCommandList::Id: { + return { ZCL_ARRAY_ATTRIBUTE_TYPES, ZCL_ARRAY_ATTRIBUTE_TYPES_SIZE }; + } + case ColorControl::Attributes::AcceptedCommandList::Id: { + return { ZCL_ARRAY_ATTRIBUTE_TYPES, ZCL_ARRAY_ATTRIBUTE_TYPES_SIZE }; + } + case ColorControl::Attributes::AttributeList::Id: { + return { ZCL_ARRAY_ATTRIBUTE_TYPES, ZCL_ARRAY_ATTRIBUTE_TYPES_SIZE }; + } + case ColorControl::Attributes::FeatureMap::Id: { + return { ZCL_BITMAP32_ATTRIBUTE_TYPES, ZCL_BITMAP32_ATTRIBUTE_TYPES_SIZE }; + } + case ColorControl::Attributes::ClusterRevision::Id: { + return { ZCL_INT16U_ATTRIBUTE_TYPES, ZCL_INT16U_ATTRIBUTE_TYPES_SIZE }; + } + default: + return { ZCL_BOOLEAN_ATTRIBUTE_TYPES, 0x01 }; + } + } + case chip::app::Clusters::IlluminanceMeasurement::Id: { + switch (attribute_id) + { + case IlluminanceMeasurement::Attributes::MeasuredValue::Id: { + return { ZCL_INT16U_ATTRIBUTE_TYPES, ZCL_INT16U_ATTRIBUTE_TYPES_SIZE }; + } + case IlluminanceMeasurement::Attributes::MinMeasuredValue::Id: { + return { ZCL_INT16U_ATTRIBUTE_TYPES, ZCL_INT16U_ATTRIBUTE_TYPES_SIZE }; + } + case IlluminanceMeasurement::Attributes::MaxMeasuredValue::Id: { + return { ZCL_INT16U_ATTRIBUTE_TYPES, ZCL_INT16U_ATTRIBUTE_TYPES_SIZE }; + } + case IlluminanceMeasurement::Attributes::Tolerance::Id: { + return { ZCL_INT16U_ATTRIBUTE_TYPES, ZCL_INT16U_ATTRIBUTE_TYPES_SIZE }; + } + case IlluminanceMeasurement::Attributes::LightSensorType::Id: { + return { ZCL_ENUM8_ATTRIBUTE_TYPES, ZCL_ENUM8_ATTRIBUTE_TYPES_SIZE }; + } + case IlluminanceMeasurement::Attributes::GeneratedCommandList::Id: { + return { ZCL_ARRAY_ATTRIBUTE_TYPES, ZCL_ARRAY_ATTRIBUTE_TYPES_SIZE }; + } + case IlluminanceMeasurement::Attributes::AcceptedCommandList::Id: { + return { ZCL_ARRAY_ATTRIBUTE_TYPES, ZCL_ARRAY_ATTRIBUTE_TYPES_SIZE }; + } + case IlluminanceMeasurement::Attributes::AttributeList::Id: { + return { ZCL_ARRAY_ATTRIBUTE_TYPES, ZCL_ARRAY_ATTRIBUTE_TYPES_SIZE }; + } + case IlluminanceMeasurement::Attributes::FeatureMap::Id: { + return { ZCL_BITMAP32_ATTRIBUTE_TYPES, ZCL_BITMAP32_ATTRIBUTE_TYPES_SIZE }; + } + case IlluminanceMeasurement::Attributes::ClusterRevision::Id: { + return { ZCL_INT16U_ATTRIBUTE_TYPES, ZCL_INT16U_ATTRIBUTE_TYPES_SIZE }; + } + default: + return { ZCL_BOOLEAN_ATTRIBUTE_TYPES, 0x01 }; + } + } + case chip::app::Clusters::TemperatureMeasurement::Id: { + switch (attribute_id) + { + case TemperatureMeasurement::Attributes::MeasuredValue::Id: { + return { ZCL_INT16S_ATTRIBUTE_TYPES, ZCL_INT16S_ATTRIBUTE_TYPES_SIZE }; + } + case TemperatureMeasurement::Attributes::MinMeasuredValue::Id: { + return { ZCL_INT16S_ATTRIBUTE_TYPES, ZCL_INT16S_ATTRIBUTE_TYPES_SIZE }; + } + case TemperatureMeasurement::Attributes::MaxMeasuredValue::Id: { + return { ZCL_INT16S_ATTRIBUTE_TYPES, ZCL_INT16S_ATTRIBUTE_TYPES_SIZE }; + } + case TemperatureMeasurement::Attributes::Tolerance::Id: { + return { ZCL_INT16U_ATTRIBUTE_TYPES, ZCL_INT16U_ATTRIBUTE_TYPES_SIZE }; + } + case TemperatureMeasurement::Attributes::GeneratedCommandList::Id: { + return { ZCL_ARRAY_ATTRIBUTE_TYPES, ZCL_ARRAY_ATTRIBUTE_TYPES_SIZE }; + } + case TemperatureMeasurement::Attributes::AcceptedCommandList::Id: { + return { ZCL_ARRAY_ATTRIBUTE_TYPES, ZCL_ARRAY_ATTRIBUTE_TYPES_SIZE }; + } + case TemperatureMeasurement::Attributes::AttributeList::Id: { + return { ZCL_ARRAY_ATTRIBUTE_TYPES, ZCL_ARRAY_ATTRIBUTE_TYPES_SIZE }; + } + case TemperatureMeasurement::Attributes::FeatureMap::Id: { + return { ZCL_BITMAP32_ATTRIBUTE_TYPES, ZCL_BITMAP32_ATTRIBUTE_TYPES_SIZE }; + } + case TemperatureMeasurement::Attributes::ClusterRevision::Id: { + return { ZCL_INT16U_ATTRIBUTE_TYPES, ZCL_INT16U_ATTRIBUTE_TYPES_SIZE }; + } + default: + return { ZCL_BOOLEAN_ATTRIBUTE_TYPES, 0x01 }; + } + } + case chip::app::Clusters::PressureMeasurement::Id: { + switch (attribute_id) + { + case PressureMeasurement::Attributes::MeasuredValue::Id: { + return { ZCL_INT16S_ATTRIBUTE_TYPES, ZCL_INT16S_ATTRIBUTE_TYPES_SIZE }; + } + case PressureMeasurement::Attributes::MinMeasuredValue::Id: { + return { ZCL_INT16S_ATTRIBUTE_TYPES, ZCL_INT16S_ATTRIBUTE_TYPES_SIZE }; + } + case PressureMeasurement::Attributes::MaxMeasuredValue::Id: { + return { ZCL_INT16S_ATTRIBUTE_TYPES, ZCL_INT16S_ATTRIBUTE_TYPES_SIZE }; + } + case PressureMeasurement::Attributes::Tolerance::Id: { + return { ZCL_INT16U_ATTRIBUTE_TYPES, ZCL_INT16U_ATTRIBUTE_TYPES_SIZE }; + } + case PressureMeasurement::Attributes::ScaledValue::Id: { + return { ZCL_INT16S_ATTRIBUTE_TYPES, ZCL_INT16S_ATTRIBUTE_TYPES_SIZE }; + } + case PressureMeasurement::Attributes::MinScaledValue::Id: { + return { ZCL_INT16S_ATTRIBUTE_TYPES, ZCL_INT16S_ATTRIBUTE_TYPES_SIZE }; + } + case PressureMeasurement::Attributes::MaxScaledValue::Id: { + return { ZCL_INT16S_ATTRIBUTE_TYPES, ZCL_INT16S_ATTRIBUTE_TYPES_SIZE }; + } + case PressureMeasurement::Attributes::ScaledTolerance::Id: { + return { ZCL_INT16U_ATTRIBUTE_TYPES, ZCL_INT16U_ATTRIBUTE_TYPES_SIZE }; + } + case PressureMeasurement::Attributes::Scale::Id: { + return { ZCL_INT8S_ATTRIBUTE_TYPES, ZCL_INT8S_ATTRIBUTE_TYPES_SIZE }; + } + case PressureMeasurement::Attributes::GeneratedCommandList::Id: { + return { ZCL_ARRAY_ATTRIBUTE_TYPES, ZCL_ARRAY_ATTRIBUTE_TYPES_SIZE }; + } + case PressureMeasurement::Attributes::AcceptedCommandList::Id: { + return { ZCL_ARRAY_ATTRIBUTE_TYPES, ZCL_ARRAY_ATTRIBUTE_TYPES_SIZE }; + } + case PressureMeasurement::Attributes::AttributeList::Id: { + return { ZCL_ARRAY_ATTRIBUTE_TYPES, ZCL_ARRAY_ATTRIBUTE_TYPES_SIZE }; + } + case PressureMeasurement::Attributes::FeatureMap::Id: { + return { ZCL_BITMAP32_ATTRIBUTE_TYPES, ZCL_BITMAP32_ATTRIBUTE_TYPES_SIZE }; + } + case PressureMeasurement::Attributes::ClusterRevision::Id: { + return { ZCL_INT16U_ATTRIBUTE_TYPES, ZCL_INT16U_ATTRIBUTE_TYPES_SIZE }; + } + default: + return { ZCL_BOOLEAN_ATTRIBUTE_TYPES, 0x01 }; + } + } + case chip::app::Clusters::FlowMeasurement::Id: { + switch (attribute_id) + { + case FlowMeasurement::Attributes::MeasuredValue::Id: { + return { ZCL_INT16U_ATTRIBUTE_TYPES, ZCL_INT16U_ATTRIBUTE_TYPES_SIZE }; + } + case FlowMeasurement::Attributes::MinMeasuredValue::Id: { + return { ZCL_INT16U_ATTRIBUTE_TYPES, ZCL_INT16U_ATTRIBUTE_TYPES_SIZE }; + } + case FlowMeasurement::Attributes::MaxMeasuredValue::Id: { + return { ZCL_INT16U_ATTRIBUTE_TYPES, ZCL_INT16U_ATTRIBUTE_TYPES_SIZE }; + } + case FlowMeasurement::Attributes::Tolerance::Id: { + return { ZCL_INT16U_ATTRIBUTE_TYPES, ZCL_INT16U_ATTRIBUTE_TYPES_SIZE }; + } + case FlowMeasurement::Attributes::GeneratedCommandList::Id: { + return { ZCL_ARRAY_ATTRIBUTE_TYPES, ZCL_ARRAY_ATTRIBUTE_TYPES_SIZE }; + } + case FlowMeasurement::Attributes::AcceptedCommandList::Id: { + return { ZCL_ARRAY_ATTRIBUTE_TYPES, ZCL_ARRAY_ATTRIBUTE_TYPES_SIZE }; + } + case FlowMeasurement::Attributes::AttributeList::Id: { + return { ZCL_ARRAY_ATTRIBUTE_TYPES, ZCL_ARRAY_ATTRIBUTE_TYPES_SIZE }; + } + case FlowMeasurement::Attributes::FeatureMap::Id: { + return { ZCL_BITMAP32_ATTRIBUTE_TYPES, ZCL_BITMAP32_ATTRIBUTE_TYPES_SIZE }; + } + case FlowMeasurement::Attributes::ClusterRevision::Id: { + return { ZCL_INT16U_ATTRIBUTE_TYPES, ZCL_INT16U_ATTRIBUTE_TYPES_SIZE }; + } + default: + return { ZCL_BOOLEAN_ATTRIBUTE_TYPES, 0x01 }; + } + } + case chip::app::Clusters::RelativeHumidityMeasurement::Id: { + switch (attribute_id) + { + case RelativeHumidityMeasurement::Attributes::MeasuredValue::Id: { + return { ZCL_INT16U_ATTRIBUTE_TYPES, ZCL_INT16U_ATTRIBUTE_TYPES_SIZE }; + } + case RelativeHumidityMeasurement::Attributes::MinMeasuredValue::Id: { + return { ZCL_INT16U_ATTRIBUTE_TYPES, ZCL_INT16U_ATTRIBUTE_TYPES_SIZE }; + } + case RelativeHumidityMeasurement::Attributes::MaxMeasuredValue::Id: { + return { ZCL_INT16U_ATTRIBUTE_TYPES, ZCL_INT16U_ATTRIBUTE_TYPES_SIZE }; + } + case RelativeHumidityMeasurement::Attributes::Tolerance::Id: { + return { ZCL_INT16U_ATTRIBUTE_TYPES, ZCL_INT16U_ATTRIBUTE_TYPES_SIZE }; + } + case RelativeHumidityMeasurement::Attributes::GeneratedCommandList::Id: { + return { ZCL_ARRAY_ATTRIBUTE_TYPES, ZCL_ARRAY_ATTRIBUTE_TYPES_SIZE }; + } + case RelativeHumidityMeasurement::Attributes::AcceptedCommandList::Id: { + return { ZCL_ARRAY_ATTRIBUTE_TYPES, ZCL_ARRAY_ATTRIBUTE_TYPES_SIZE }; + } + case RelativeHumidityMeasurement::Attributes::AttributeList::Id: { + return { ZCL_ARRAY_ATTRIBUTE_TYPES, ZCL_ARRAY_ATTRIBUTE_TYPES_SIZE }; + } + case RelativeHumidityMeasurement::Attributes::FeatureMap::Id: { + return { ZCL_BITMAP32_ATTRIBUTE_TYPES, ZCL_BITMAP32_ATTRIBUTE_TYPES_SIZE }; + } + case RelativeHumidityMeasurement::Attributes::ClusterRevision::Id: { + return { ZCL_INT16U_ATTRIBUTE_TYPES, ZCL_INT16U_ATTRIBUTE_TYPES_SIZE }; + } + default: + return { ZCL_BOOLEAN_ATTRIBUTE_TYPES, 0x01 }; + } + } + case chip::app::Clusters::OccupancySensing::Id: { + switch (attribute_id) + { + case OccupancySensing::Attributes::Occupancy::Id: { + return { ZCL_BITMAP8_ATTRIBUTE_TYPES, ZCL_BITMAP8_ATTRIBUTE_TYPES_SIZE }; + } + case OccupancySensing::Attributes::OccupancySensorType::Id: { + return { ZCL_ENUM8_ATTRIBUTE_TYPES, ZCL_ENUM8_ATTRIBUTE_TYPES_SIZE }; + } + case OccupancySensing::Attributes::OccupancySensorTypeBitmap::Id: { + return { ZCL_BITMAP8_ATTRIBUTE_TYPES, ZCL_BITMAP8_ATTRIBUTE_TYPES_SIZE }; + } + case OccupancySensing::Attributes::PirOccupiedToUnoccupiedDelay::Id: { + return { ZCL_INT16U_ATTRIBUTE_TYPES, ZCL_INT16U_ATTRIBUTE_TYPES_SIZE }; + } + case OccupancySensing::Attributes::PirUnoccupiedToOccupiedDelay::Id: { + return { ZCL_INT16U_ATTRIBUTE_TYPES, ZCL_INT16U_ATTRIBUTE_TYPES_SIZE }; + } + case OccupancySensing::Attributes::PirUnoccupiedToOccupiedThreshold::Id: { + return { ZCL_INT8U_ATTRIBUTE_TYPES, ZCL_INT8U_ATTRIBUTE_TYPES_SIZE }; + } + case OccupancySensing::Attributes::UltrasonicOccupiedToUnoccupiedDelay::Id: { + return { ZCL_INT16U_ATTRIBUTE_TYPES, ZCL_INT16U_ATTRIBUTE_TYPES_SIZE }; + } + case OccupancySensing::Attributes::UltrasonicUnoccupiedToOccupiedDelay::Id: { + return { ZCL_INT16U_ATTRIBUTE_TYPES, ZCL_INT16U_ATTRIBUTE_TYPES_SIZE }; + } + case OccupancySensing::Attributes::UltrasonicUnoccupiedToOccupiedThreshold::Id: { + return { ZCL_INT8U_ATTRIBUTE_TYPES, ZCL_INT8U_ATTRIBUTE_TYPES_SIZE }; + } + case OccupancySensing::Attributes::PhysicalContactOccupiedToUnoccupiedDelay::Id: { + return { ZCL_INT16U_ATTRIBUTE_TYPES, ZCL_INT16U_ATTRIBUTE_TYPES_SIZE }; + } + case OccupancySensing::Attributes::PhysicalContactUnoccupiedToOccupiedDelay::Id: { + return { ZCL_INT16U_ATTRIBUTE_TYPES, ZCL_INT16U_ATTRIBUTE_TYPES_SIZE }; + } + case OccupancySensing::Attributes::PhysicalContactUnoccupiedToOccupiedThreshold::Id: { + return { ZCL_INT8U_ATTRIBUTE_TYPES, ZCL_INT8U_ATTRIBUTE_TYPES_SIZE }; + } + case OccupancySensing::Attributes::GeneratedCommandList::Id: { + return { ZCL_ARRAY_ATTRIBUTE_TYPES, ZCL_ARRAY_ATTRIBUTE_TYPES_SIZE }; + } + case OccupancySensing::Attributes::AcceptedCommandList::Id: { + return { ZCL_ARRAY_ATTRIBUTE_TYPES, ZCL_ARRAY_ATTRIBUTE_TYPES_SIZE }; + } + case OccupancySensing::Attributes::AttributeList::Id: { + return { ZCL_ARRAY_ATTRIBUTE_TYPES, ZCL_ARRAY_ATTRIBUTE_TYPES_SIZE }; + } + case OccupancySensing::Attributes::FeatureMap::Id: { + return { ZCL_BITMAP32_ATTRIBUTE_TYPES, ZCL_BITMAP32_ATTRIBUTE_TYPES_SIZE }; + } + case OccupancySensing::Attributes::ClusterRevision::Id: { + return { ZCL_INT16U_ATTRIBUTE_TYPES, ZCL_INT16U_ATTRIBUTE_TYPES_SIZE }; + } + default: + return { ZCL_BOOLEAN_ATTRIBUTE_TYPES, 0x01 }; + } + } + case chip::app::Clusters::WakeOnLan::Id: { + switch (attribute_id) + { + case WakeOnLan::Attributes::MACAddress::Id: { + return { ZCL_CHAR_STRING_ATTRIBUTE_TYPES, ZCL_CHAR_STRING_ATTRIBUTE_TYPES_SIZE }; + } + case WakeOnLan::Attributes::GeneratedCommandList::Id: { + return { ZCL_ARRAY_ATTRIBUTE_TYPES, ZCL_ARRAY_ATTRIBUTE_TYPES_SIZE }; + } + case WakeOnLan::Attributes::AcceptedCommandList::Id: { + return { ZCL_ARRAY_ATTRIBUTE_TYPES, ZCL_ARRAY_ATTRIBUTE_TYPES_SIZE }; + } + case WakeOnLan::Attributes::AttributeList::Id: { + return { ZCL_ARRAY_ATTRIBUTE_TYPES, ZCL_ARRAY_ATTRIBUTE_TYPES_SIZE }; + } + case WakeOnLan::Attributes::FeatureMap::Id: { + return { ZCL_BITMAP32_ATTRIBUTE_TYPES, ZCL_BITMAP32_ATTRIBUTE_TYPES_SIZE }; + } + case WakeOnLan::Attributes::ClusterRevision::Id: { + return { ZCL_INT16U_ATTRIBUTE_TYPES, ZCL_INT16U_ATTRIBUTE_TYPES_SIZE }; + } + default: + return { ZCL_BOOLEAN_ATTRIBUTE_TYPES, 0x01 }; + } + } + case chip::app::Clusters::Channel::Id: { + switch (attribute_id) + { + case Channel::Attributes::ChannelList::Id: { + return { ZCL_ARRAY_ATTRIBUTE_TYPES, ZCL_ARRAY_ATTRIBUTE_TYPES_SIZE }; + } + case Channel::Attributes::Lineup::Id: { + return { ZCL_LINEUP_INFO_ATTRIBUTE_TYPES, ZCL_LINEUP_INFO_ATTRIBUTE_TYPES_SIZE }; + } + case Channel::Attributes::CurrentChannel::Id: { + return { ZCL_CHANNEL_INFO_ATTRIBUTE_TYPES, ZCL_CHANNEL_INFO_ATTRIBUTE_TYPES_SIZE }; + } + case Channel::Attributes::GeneratedCommandList::Id: { + return { ZCL_ARRAY_ATTRIBUTE_TYPES, ZCL_ARRAY_ATTRIBUTE_TYPES_SIZE }; + } + case Channel::Attributes::AcceptedCommandList::Id: { + return { ZCL_ARRAY_ATTRIBUTE_TYPES, ZCL_ARRAY_ATTRIBUTE_TYPES_SIZE }; + } + case Channel::Attributes::AttributeList::Id: { + return { ZCL_ARRAY_ATTRIBUTE_TYPES, ZCL_ARRAY_ATTRIBUTE_TYPES_SIZE }; + } + case Channel::Attributes::FeatureMap::Id: { + return { ZCL_BITMAP32_ATTRIBUTE_TYPES, ZCL_BITMAP32_ATTRIBUTE_TYPES_SIZE }; + } + case Channel::Attributes::ClusterRevision::Id: { + return { ZCL_INT16U_ATTRIBUTE_TYPES, ZCL_INT16U_ATTRIBUTE_TYPES_SIZE }; + } + default: + return { ZCL_BOOLEAN_ATTRIBUTE_TYPES, 0x01 }; + } + } + case chip::app::Clusters::TargetNavigator::Id: { + switch (attribute_id) + { + case TargetNavigator::Attributes::TargetList::Id: { + return { ZCL_ARRAY_ATTRIBUTE_TYPES, ZCL_ARRAY_ATTRIBUTE_TYPES_SIZE }; + } + case TargetNavigator::Attributes::CurrentTarget::Id: { + return { ZCL_INT8U_ATTRIBUTE_TYPES, ZCL_INT8U_ATTRIBUTE_TYPES_SIZE }; + } + case TargetNavigator::Attributes::GeneratedCommandList::Id: { + return { ZCL_ARRAY_ATTRIBUTE_TYPES, ZCL_ARRAY_ATTRIBUTE_TYPES_SIZE }; + } + case TargetNavigator::Attributes::AcceptedCommandList::Id: { + return { ZCL_ARRAY_ATTRIBUTE_TYPES, ZCL_ARRAY_ATTRIBUTE_TYPES_SIZE }; + } + case TargetNavigator::Attributes::AttributeList::Id: { + return { ZCL_ARRAY_ATTRIBUTE_TYPES, ZCL_ARRAY_ATTRIBUTE_TYPES_SIZE }; + } + case TargetNavigator::Attributes::FeatureMap::Id: { + return { ZCL_BITMAP32_ATTRIBUTE_TYPES, ZCL_BITMAP32_ATTRIBUTE_TYPES_SIZE }; + } + case TargetNavigator::Attributes::ClusterRevision::Id: { + return { ZCL_INT16U_ATTRIBUTE_TYPES, ZCL_INT16U_ATTRIBUTE_TYPES_SIZE }; + } + default: + return { ZCL_BOOLEAN_ATTRIBUTE_TYPES, 0x01 }; + } + } + case chip::app::Clusters::MediaPlayback::Id: { + switch (attribute_id) + { + case MediaPlayback::Attributes::CurrentState::Id: { + return { ZCL_PLAYBACK_STATE_ENUM_ATTRIBUTE_TYPES, ZCL_PLAYBACK_STATE_ENUM_ATTRIBUTE_TYPES_SIZE }; + } + case MediaPlayback::Attributes::StartTime::Id: { + return { ZCL_EPOCH_US_ATTRIBUTE_TYPES, ZCL_EPOCH_US_ATTRIBUTE_TYPES_SIZE }; + } + case MediaPlayback::Attributes::Duration::Id: { + return { ZCL_INT64U_ATTRIBUTE_TYPES, ZCL_INT64U_ATTRIBUTE_TYPES_SIZE }; + } + case MediaPlayback::Attributes::SampledPosition::Id: { + return { ZCL_PLAYBACK_POSITION_ATTRIBUTE_TYPES, ZCL_PLAYBACK_POSITION_ATTRIBUTE_TYPES_SIZE }; + } + case MediaPlayback::Attributes::PlaybackSpeed::Id: { + return { ZCL_SINGLE_ATTRIBUTE_TYPES, ZCL_SINGLE_ATTRIBUTE_TYPES_SIZE }; + } + case MediaPlayback::Attributes::SeekRangeEnd::Id: { + return { ZCL_INT64U_ATTRIBUTE_TYPES, ZCL_INT64U_ATTRIBUTE_TYPES_SIZE }; + } + case MediaPlayback::Attributes::SeekRangeStart::Id: { + return { ZCL_INT64U_ATTRIBUTE_TYPES, ZCL_INT64U_ATTRIBUTE_TYPES_SIZE }; + } + case MediaPlayback::Attributes::GeneratedCommandList::Id: { + return { ZCL_ARRAY_ATTRIBUTE_TYPES, ZCL_ARRAY_ATTRIBUTE_TYPES_SIZE }; + } + case MediaPlayback::Attributes::AcceptedCommandList::Id: { + return { ZCL_ARRAY_ATTRIBUTE_TYPES, ZCL_ARRAY_ATTRIBUTE_TYPES_SIZE }; + } + case MediaPlayback::Attributes::AttributeList::Id: { + return { ZCL_ARRAY_ATTRIBUTE_TYPES, ZCL_ARRAY_ATTRIBUTE_TYPES_SIZE }; + } + case MediaPlayback::Attributes::FeatureMap::Id: { + return { ZCL_BITMAP32_ATTRIBUTE_TYPES, ZCL_BITMAP32_ATTRIBUTE_TYPES_SIZE }; + } + case MediaPlayback::Attributes::ClusterRevision::Id: { + return { ZCL_INT16U_ATTRIBUTE_TYPES, ZCL_INT16U_ATTRIBUTE_TYPES_SIZE }; + } + default: + return { ZCL_BOOLEAN_ATTRIBUTE_TYPES, 0x01 }; + } + } + case chip::app::Clusters::MediaInput::Id: { + switch (attribute_id) + { + case MediaInput::Attributes::InputList::Id: { + return { ZCL_ARRAY_ATTRIBUTE_TYPES, ZCL_ARRAY_ATTRIBUTE_TYPES_SIZE }; + } + case MediaInput::Attributes::CurrentInput::Id: { + return { ZCL_INT8U_ATTRIBUTE_TYPES, ZCL_INT8U_ATTRIBUTE_TYPES_SIZE }; + } + case MediaInput::Attributes::GeneratedCommandList::Id: { + return { ZCL_ARRAY_ATTRIBUTE_TYPES, ZCL_ARRAY_ATTRIBUTE_TYPES_SIZE }; + } + case MediaInput::Attributes::AcceptedCommandList::Id: { + return { ZCL_ARRAY_ATTRIBUTE_TYPES, ZCL_ARRAY_ATTRIBUTE_TYPES_SIZE }; + } + case MediaInput::Attributes::AttributeList::Id: { + return { ZCL_ARRAY_ATTRIBUTE_TYPES, ZCL_ARRAY_ATTRIBUTE_TYPES_SIZE }; + } + case MediaInput::Attributes::FeatureMap::Id: { + return { ZCL_BITMAP32_ATTRIBUTE_TYPES, ZCL_BITMAP32_ATTRIBUTE_TYPES_SIZE }; + } + case MediaInput::Attributes::ClusterRevision::Id: { + return { ZCL_INT16U_ATTRIBUTE_TYPES, ZCL_INT16U_ATTRIBUTE_TYPES_SIZE }; + } + default: + return { ZCL_BOOLEAN_ATTRIBUTE_TYPES, 0x01 }; + } + } + case chip::app::Clusters::LowPower::Id: { + switch (attribute_id) + { + case LowPower::Attributes::GeneratedCommandList::Id: { + return { ZCL_ARRAY_ATTRIBUTE_TYPES, ZCL_ARRAY_ATTRIBUTE_TYPES_SIZE }; + } + case LowPower::Attributes::AcceptedCommandList::Id: { + return { ZCL_ARRAY_ATTRIBUTE_TYPES, ZCL_ARRAY_ATTRIBUTE_TYPES_SIZE }; + } + case LowPower::Attributes::AttributeList::Id: { + return { ZCL_ARRAY_ATTRIBUTE_TYPES, ZCL_ARRAY_ATTRIBUTE_TYPES_SIZE }; + } + case LowPower::Attributes::FeatureMap::Id: { + return { ZCL_BITMAP32_ATTRIBUTE_TYPES, ZCL_BITMAP32_ATTRIBUTE_TYPES_SIZE }; + } + case LowPower::Attributes::ClusterRevision::Id: { + return { ZCL_INT16U_ATTRIBUTE_TYPES, ZCL_INT16U_ATTRIBUTE_TYPES_SIZE }; + } + default: + return { ZCL_BOOLEAN_ATTRIBUTE_TYPES, 0x01 }; + } + } + case chip::app::Clusters::KeypadInput::Id: { + switch (attribute_id) + { + case KeypadInput::Attributes::GeneratedCommandList::Id: { + return { ZCL_ARRAY_ATTRIBUTE_TYPES, ZCL_ARRAY_ATTRIBUTE_TYPES_SIZE }; + } + case KeypadInput::Attributes::AcceptedCommandList::Id: { + return { ZCL_ARRAY_ATTRIBUTE_TYPES, ZCL_ARRAY_ATTRIBUTE_TYPES_SIZE }; + } + case KeypadInput::Attributes::AttributeList::Id: { + return { ZCL_ARRAY_ATTRIBUTE_TYPES, ZCL_ARRAY_ATTRIBUTE_TYPES_SIZE }; + } + case KeypadInput::Attributes::FeatureMap::Id: { + return { ZCL_BITMAP32_ATTRIBUTE_TYPES, ZCL_BITMAP32_ATTRIBUTE_TYPES_SIZE }; + } + case KeypadInput::Attributes::ClusterRevision::Id: { + return { ZCL_INT16U_ATTRIBUTE_TYPES, ZCL_INT16U_ATTRIBUTE_TYPES_SIZE }; + } + default: + return { ZCL_BOOLEAN_ATTRIBUTE_TYPES, 0x01 }; + } + } + case chip::app::Clusters::ContentLauncher::Id: { + switch (attribute_id) + { + case ContentLauncher::Attributes::AcceptHeader::Id: { + return { ZCL_ARRAY_ATTRIBUTE_TYPES, ZCL_ARRAY_ATTRIBUTE_TYPES_SIZE }; + } + case ContentLauncher::Attributes::SupportedStreamingProtocols::Id: { + return { ZCL_BITMAP32_ATTRIBUTE_TYPES, ZCL_BITMAP32_ATTRIBUTE_TYPES_SIZE }; + } + case ContentLauncher::Attributes::GeneratedCommandList::Id: { + return { ZCL_ARRAY_ATTRIBUTE_TYPES, ZCL_ARRAY_ATTRIBUTE_TYPES_SIZE }; + } + case ContentLauncher::Attributes::AcceptedCommandList::Id: { + return { ZCL_ARRAY_ATTRIBUTE_TYPES, ZCL_ARRAY_ATTRIBUTE_TYPES_SIZE }; + } + case ContentLauncher::Attributes::AttributeList::Id: { + return { ZCL_ARRAY_ATTRIBUTE_TYPES, ZCL_ARRAY_ATTRIBUTE_TYPES_SIZE }; + } + case ContentLauncher::Attributes::FeatureMap::Id: { + return { ZCL_BITMAP32_ATTRIBUTE_TYPES, ZCL_BITMAP32_ATTRIBUTE_TYPES_SIZE }; + } + case ContentLauncher::Attributes::ClusterRevision::Id: { + return { ZCL_INT16U_ATTRIBUTE_TYPES, ZCL_INT16U_ATTRIBUTE_TYPES_SIZE }; + } + default: + return { ZCL_BOOLEAN_ATTRIBUTE_TYPES, 0x01 }; + } + } + case chip::app::Clusters::AudioOutput::Id: { + switch (attribute_id) + { + case AudioOutput::Attributes::OutputList::Id: { + return { ZCL_ARRAY_ATTRIBUTE_TYPES, ZCL_ARRAY_ATTRIBUTE_TYPES_SIZE }; + } + case AudioOutput::Attributes::CurrentOutput::Id: { + return { ZCL_INT8U_ATTRIBUTE_TYPES, ZCL_INT8U_ATTRIBUTE_TYPES_SIZE }; + } + case AudioOutput::Attributes::GeneratedCommandList::Id: { + return { ZCL_ARRAY_ATTRIBUTE_TYPES, ZCL_ARRAY_ATTRIBUTE_TYPES_SIZE }; + } + case AudioOutput::Attributes::AcceptedCommandList::Id: { + return { ZCL_ARRAY_ATTRIBUTE_TYPES, ZCL_ARRAY_ATTRIBUTE_TYPES_SIZE }; + } + case AudioOutput::Attributes::AttributeList::Id: { + return { ZCL_ARRAY_ATTRIBUTE_TYPES, ZCL_ARRAY_ATTRIBUTE_TYPES_SIZE }; + } + case AudioOutput::Attributes::FeatureMap::Id: { + return { ZCL_BITMAP32_ATTRIBUTE_TYPES, ZCL_BITMAP32_ATTRIBUTE_TYPES_SIZE }; + } + case AudioOutput::Attributes::ClusterRevision::Id: { + return { ZCL_INT16U_ATTRIBUTE_TYPES, ZCL_INT16U_ATTRIBUTE_TYPES_SIZE }; + } + default: + return { ZCL_BOOLEAN_ATTRIBUTE_TYPES, 0x01 }; + } + } + case chip::app::Clusters::ApplicationLauncher::Id: { + switch (attribute_id) + { + case ApplicationLauncher::Attributes::CatalogList::Id: { + return { ZCL_ARRAY_ATTRIBUTE_TYPES, ZCL_ARRAY_ATTRIBUTE_TYPES_SIZE }; + } + case ApplicationLauncher::Attributes::CurrentApp::Id: { + return { ZCL_APPLICATION_EP_ATTRIBUTE_TYPES, ZCL_APPLICATION_EP_ATTRIBUTE_TYPES_SIZE }; + } + case ApplicationLauncher::Attributes::GeneratedCommandList::Id: { + return { ZCL_ARRAY_ATTRIBUTE_TYPES, ZCL_ARRAY_ATTRIBUTE_TYPES_SIZE }; + } + case ApplicationLauncher::Attributes::AcceptedCommandList::Id: { + return { ZCL_ARRAY_ATTRIBUTE_TYPES, ZCL_ARRAY_ATTRIBUTE_TYPES_SIZE }; + } + case ApplicationLauncher::Attributes::AttributeList::Id: { + return { ZCL_ARRAY_ATTRIBUTE_TYPES, ZCL_ARRAY_ATTRIBUTE_TYPES_SIZE }; + } + case ApplicationLauncher::Attributes::FeatureMap::Id: { + return { ZCL_BITMAP32_ATTRIBUTE_TYPES, ZCL_BITMAP32_ATTRIBUTE_TYPES_SIZE }; + } + case ApplicationLauncher::Attributes::ClusterRevision::Id: { + return { ZCL_INT16U_ATTRIBUTE_TYPES, ZCL_INT16U_ATTRIBUTE_TYPES_SIZE }; + } + default: + return { ZCL_BOOLEAN_ATTRIBUTE_TYPES, 0x01 }; + } + } + case chip::app::Clusters::ApplicationBasic::Id: { + switch (attribute_id) + { + case ApplicationBasic::Attributes::VendorName::Id: { + return { ZCL_CHAR_STRING_ATTRIBUTE_TYPES, ZCL_CHAR_STRING_ATTRIBUTE_TYPES_SIZE }; + } + case ApplicationBasic::Attributes::VendorID::Id: { + return { ZCL_VENDOR_ID_ATTRIBUTE_TYPES, ZCL_VENDOR_ID_ATTRIBUTE_TYPES_SIZE }; + } + case ApplicationBasic::Attributes::ApplicationName::Id: { + return { ZCL_CHAR_STRING_ATTRIBUTE_TYPES, ZCL_CHAR_STRING_ATTRIBUTE_TYPES_SIZE }; + } + case ApplicationBasic::Attributes::ProductID::Id: { + return { ZCL_INT16U_ATTRIBUTE_TYPES, ZCL_INT16U_ATTRIBUTE_TYPES_SIZE }; + } + case ApplicationBasic::Attributes::Application::Id: { + return { ZCL_APPLICATION_BASIC_APPLICATION_ATTRIBUTE_TYPES, ZCL_APPLICATION_BASIC_APPLICATION_ATTRIBUTE_TYPES_SIZE }; + } + case ApplicationBasic::Attributes::Status::Id: { + return { ZCL_APPLICATION_STATUS_ENUM_ATTRIBUTE_TYPES, ZCL_APPLICATION_STATUS_ENUM_ATTRIBUTE_TYPES_SIZE }; + } + case ApplicationBasic::Attributes::ApplicationVersion::Id: { + return { ZCL_CHAR_STRING_ATTRIBUTE_TYPES, ZCL_CHAR_STRING_ATTRIBUTE_TYPES_SIZE }; + } + case ApplicationBasic::Attributes::AllowedVendorList::Id: { + return { ZCL_ARRAY_ATTRIBUTE_TYPES, ZCL_ARRAY_ATTRIBUTE_TYPES_SIZE }; + } + case ApplicationBasic::Attributes::GeneratedCommandList::Id: { + return { ZCL_ARRAY_ATTRIBUTE_TYPES, ZCL_ARRAY_ATTRIBUTE_TYPES_SIZE }; + } + case ApplicationBasic::Attributes::AcceptedCommandList::Id: { + return { ZCL_ARRAY_ATTRIBUTE_TYPES, ZCL_ARRAY_ATTRIBUTE_TYPES_SIZE }; + } + case ApplicationBasic::Attributes::AttributeList::Id: { + return { ZCL_ARRAY_ATTRIBUTE_TYPES, ZCL_ARRAY_ATTRIBUTE_TYPES_SIZE }; + } + case ApplicationBasic::Attributes::FeatureMap::Id: { + return { ZCL_BITMAP32_ATTRIBUTE_TYPES, ZCL_BITMAP32_ATTRIBUTE_TYPES_SIZE }; + } + case ApplicationBasic::Attributes::ClusterRevision::Id: { + return { ZCL_INT16U_ATTRIBUTE_TYPES, ZCL_INT16U_ATTRIBUTE_TYPES_SIZE }; + } + default: + return { ZCL_BOOLEAN_ATTRIBUTE_TYPES, 0x01 }; + } + } + case chip::app::Clusters::AccountLogin::Id: { + switch (attribute_id) + { + case AccountLogin::Attributes::GeneratedCommandList::Id: { + return { ZCL_ARRAY_ATTRIBUTE_TYPES, ZCL_ARRAY_ATTRIBUTE_TYPES_SIZE }; + } + case AccountLogin::Attributes::AcceptedCommandList::Id: { + return { ZCL_ARRAY_ATTRIBUTE_TYPES, ZCL_ARRAY_ATTRIBUTE_TYPES_SIZE }; + } + case AccountLogin::Attributes::AttributeList::Id: { + return { ZCL_ARRAY_ATTRIBUTE_TYPES, ZCL_ARRAY_ATTRIBUTE_TYPES_SIZE }; + } + case AccountLogin::Attributes::FeatureMap::Id: { + return { ZCL_BITMAP32_ATTRIBUTE_TYPES, ZCL_BITMAP32_ATTRIBUTE_TYPES_SIZE }; + } + case AccountLogin::Attributes::ClusterRevision::Id: { + return { ZCL_INT16U_ATTRIBUTE_TYPES, ZCL_INT16U_ATTRIBUTE_TYPES_SIZE }; + } + default: + return { ZCL_BOOLEAN_ATTRIBUTE_TYPES, 0x01 }; + } + } + case chip::app::Clusters::ElectricalMeasurement::Id: { + switch (attribute_id) + { + case ElectricalMeasurement::Attributes::MeasurementType::Id: { + return { ZCL_BITMAP32_ATTRIBUTE_TYPES, ZCL_BITMAP32_ATTRIBUTE_TYPES_SIZE }; + } + case ElectricalMeasurement::Attributes::DcVoltage::Id: { + return { ZCL_INT16S_ATTRIBUTE_TYPES, ZCL_INT16S_ATTRIBUTE_TYPES_SIZE }; + } + case ElectricalMeasurement::Attributes::DcVoltageMin::Id: { + return { ZCL_INT16S_ATTRIBUTE_TYPES, ZCL_INT16S_ATTRIBUTE_TYPES_SIZE }; + } + case ElectricalMeasurement::Attributes::DcVoltageMax::Id: { + return { ZCL_INT16S_ATTRIBUTE_TYPES, ZCL_INT16S_ATTRIBUTE_TYPES_SIZE }; + } + case ElectricalMeasurement::Attributes::DcCurrent::Id: { + return { ZCL_INT16S_ATTRIBUTE_TYPES, ZCL_INT16S_ATTRIBUTE_TYPES_SIZE }; + } + case ElectricalMeasurement::Attributes::DcCurrentMin::Id: { + return { ZCL_INT16S_ATTRIBUTE_TYPES, ZCL_INT16S_ATTRIBUTE_TYPES_SIZE }; + } + case ElectricalMeasurement::Attributes::DcCurrentMax::Id: { + return { ZCL_INT16S_ATTRIBUTE_TYPES, ZCL_INT16S_ATTRIBUTE_TYPES_SIZE }; + } + case ElectricalMeasurement::Attributes::DcPower::Id: { + return { ZCL_INT16S_ATTRIBUTE_TYPES, ZCL_INT16S_ATTRIBUTE_TYPES_SIZE }; + } + case ElectricalMeasurement::Attributes::DcPowerMin::Id: { + return { ZCL_INT16S_ATTRIBUTE_TYPES, ZCL_INT16S_ATTRIBUTE_TYPES_SIZE }; + } + case ElectricalMeasurement::Attributes::DcPowerMax::Id: { + return { ZCL_INT16S_ATTRIBUTE_TYPES, ZCL_INT16S_ATTRIBUTE_TYPES_SIZE }; + } + case ElectricalMeasurement::Attributes::DcVoltageMultiplier::Id: { + return { ZCL_INT16U_ATTRIBUTE_TYPES, ZCL_INT16U_ATTRIBUTE_TYPES_SIZE }; + } + case ElectricalMeasurement::Attributes::DcVoltageDivisor::Id: { + return { ZCL_INT16U_ATTRIBUTE_TYPES, ZCL_INT16U_ATTRIBUTE_TYPES_SIZE }; + } + case ElectricalMeasurement::Attributes::DcCurrentMultiplier::Id: { + return { ZCL_INT16U_ATTRIBUTE_TYPES, ZCL_INT16U_ATTRIBUTE_TYPES_SIZE }; + } + case ElectricalMeasurement::Attributes::DcCurrentDivisor::Id: { + return { ZCL_INT16U_ATTRIBUTE_TYPES, ZCL_INT16U_ATTRIBUTE_TYPES_SIZE }; + } + case ElectricalMeasurement::Attributes::DcPowerMultiplier::Id: { + return { ZCL_INT16U_ATTRIBUTE_TYPES, ZCL_INT16U_ATTRIBUTE_TYPES_SIZE }; + } + case ElectricalMeasurement::Attributes::DcPowerDivisor::Id: { + return { ZCL_INT16U_ATTRIBUTE_TYPES, ZCL_INT16U_ATTRIBUTE_TYPES_SIZE }; + } + case ElectricalMeasurement::Attributes::AcFrequency::Id: { + return { ZCL_INT16U_ATTRIBUTE_TYPES, ZCL_INT16U_ATTRIBUTE_TYPES_SIZE }; + } + case ElectricalMeasurement::Attributes::AcFrequencyMin::Id: { + return { ZCL_INT16U_ATTRIBUTE_TYPES, ZCL_INT16U_ATTRIBUTE_TYPES_SIZE }; + } + case ElectricalMeasurement::Attributes::AcFrequencyMax::Id: { + return { ZCL_INT16U_ATTRIBUTE_TYPES, ZCL_INT16U_ATTRIBUTE_TYPES_SIZE }; + } + case ElectricalMeasurement::Attributes::NeutralCurrent::Id: { + return { ZCL_INT16U_ATTRIBUTE_TYPES, ZCL_INT16U_ATTRIBUTE_TYPES_SIZE }; + } + case ElectricalMeasurement::Attributes::TotalActivePower::Id: { + return { ZCL_INT32S_ATTRIBUTE_TYPES, ZCL_INT32S_ATTRIBUTE_TYPES_SIZE }; + } + case ElectricalMeasurement::Attributes::TotalReactivePower::Id: { + return { ZCL_INT32S_ATTRIBUTE_TYPES, ZCL_INT32S_ATTRIBUTE_TYPES_SIZE }; + } + case ElectricalMeasurement::Attributes::TotalApparentPower::Id: { + return { ZCL_INT32U_ATTRIBUTE_TYPES, ZCL_INT32U_ATTRIBUTE_TYPES_SIZE }; + } + case ElectricalMeasurement::Attributes::Measured1stHarmonicCurrent::Id: { + return { ZCL_INT16S_ATTRIBUTE_TYPES, ZCL_INT16S_ATTRIBUTE_TYPES_SIZE }; + } + case ElectricalMeasurement::Attributes::Measured3rdHarmonicCurrent::Id: { + return { ZCL_INT16S_ATTRIBUTE_TYPES, ZCL_INT16S_ATTRIBUTE_TYPES_SIZE }; + } + case ElectricalMeasurement::Attributes::Measured5thHarmonicCurrent::Id: { + return { ZCL_INT16S_ATTRIBUTE_TYPES, ZCL_INT16S_ATTRIBUTE_TYPES_SIZE }; + } + case ElectricalMeasurement::Attributes::Measured7thHarmonicCurrent::Id: { + return { ZCL_INT16S_ATTRIBUTE_TYPES, ZCL_INT16S_ATTRIBUTE_TYPES_SIZE }; + } + case ElectricalMeasurement::Attributes::Measured9thHarmonicCurrent::Id: { + return { ZCL_INT16S_ATTRIBUTE_TYPES, ZCL_INT16S_ATTRIBUTE_TYPES_SIZE }; + } + case ElectricalMeasurement::Attributes::Measured11thHarmonicCurrent::Id: { + return { ZCL_INT16S_ATTRIBUTE_TYPES, ZCL_INT16S_ATTRIBUTE_TYPES_SIZE }; + } + case ElectricalMeasurement::Attributes::MeasuredPhase1stHarmonicCurrent::Id: { + return { ZCL_INT16S_ATTRIBUTE_TYPES, ZCL_INT16S_ATTRIBUTE_TYPES_SIZE }; + } + case ElectricalMeasurement::Attributes::MeasuredPhase3rdHarmonicCurrent::Id: { + return { ZCL_INT16S_ATTRIBUTE_TYPES, ZCL_INT16S_ATTRIBUTE_TYPES_SIZE }; + } + case ElectricalMeasurement::Attributes::MeasuredPhase5thHarmonicCurrent::Id: { + return { ZCL_INT16S_ATTRIBUTE_TYPES, ZCL_INT16S_ATTRIBUTE_TYPES_SIZE }; + } + case ElectricalMeasurement::Attributes::MeasuredPhase7thHarmonicCurrent::Id: { + return { ZCL_INT16S_ATTRIBUTE_TYPES, ZCL_INT16S_ATTRIBUTE_TYPES_SIZE }; + } + case ElectricalMeasurement::Attributes::MeasuredPhase9thHarmonicCurrent::Id: { + return { ZCL_INT16S_ATTRIBUTE_TYPES, ZCL_INT16S_ATTRIBUTE_TYPES_SIZE }; + } + case ElectricalMeasurement::Attributes::MeasuredPhase11thHarmonicCurrent::Id: { + return { ZCL_INT16S_ATTRIBUTE_TYPES, ZCL_INT16S_ATTRIBUTE_TYPES_SIZE }; + } + case ElectricalMeasurement::Attributes::AcFrequencyMultiplier::Id: { + return { ZCL_INT16U_ATTRIBUTE_TYPES, ZCL_INT16U_ATTRIBUTE_TYPES_SIZE }; + } + case ElectricalMeasurement::Attributes::AcFrequencyDivisor::Id: { + return { ZCL_INT16U_ATTRIBUTE_TYPES, ZCL_INT16U_ATTRIBUTE_TYPES_SIZE }; + } + case ElectricalMeasurement::Attributes::PowerMultiplier::Id: { + return { ZCL_INT32U_ATTRIBUTE_TYPES, ZCL_INT32U_ATTRIBUTE_TYPES_SIZE }; + } + case ElectricalMeasurement::Attributes::PowerDivisor::Id: { + return { ZCL_INT32U_ATTRIBUTE_TYPES, ZCL_INT32U_ATTRIBUTE_TYPES_SIZE }; + } + case ElectricalMeasurement::Attributes::HarmonicCurrentMultiplier::Id: { + return { ZCL_INT8S_ATTRIBUTE_TYPES, ZCL_INT8S_ATTRIBUTE_TYPES_SIZE }; + } + case ElectricalMeasurement::Attributes::PhaseHarmonicCurrentMultiplier::Id: { + return { ZCL_INT8S_ATTRIBUTE_TYPES, ZCL_INT8S_ATTRIBUTE_TYPES_SIZE }; + } + case ElectricalMeasurement::Attributes::InstantaneousVoltage::Id: { + return { ZCL_INT16S_ATTRIBUTE_TYPES, ZCL_INT16S_ATTRIBUTE_TYPES_SIZE }; + } + case ElectricalMeasurement::Attributes::InstantaneousLineCurrent::Id: { + return { ZCL_INT16U_ATTRIBUTE_TYPES, ZCL_INT16U_ATTRIBUTE_TYPES_SIZE }; + } + case ElectricalMeasurement::Attributes::InstantaneousActiveCurrent::Id: { + return { ZCL_INT16S_ATTRIBUTE_TYPES, ZCL_INT16S_ATTRIBUTE_TYPES_SIZE }; + } + case ElectricalMeasurement::Attributes::InstantaneousReactiveCurrent::Id: { + return { ZCL_INT16S_ATTRIBUTE_TYPES, ZCL_INT16S_ATTRIBUTE_TYPES_SIZE }; + } + case ElectricalMeasurement::Attributes::InstantaneousPower::Id: { + return { ZCL_INT16S_ATTRIBUTE_TYPES, ZCL_INT16S_ATTRIBUTE_TYPES_SIZE }; + } + case ElectricalMeasurement::Attributes::RmsVoltage::Id: { + return { ZCL_INT16U_ATTRIBUTE_TYPES, ZCL_INT16U_ATTRIBUTE_TYPES_SIZE }; + } + case ElectricalMeasurement::Attributes::RmsVoltageMin::Id: { + return { ZCL_INT16U_ATTRIBUTE_TYPES, ZCL_INT16U_ATTRIBUTE_TYPES_SIZE }; + } + case ElectricalMeasurement::Attributes::RmsVoltageMax::Id: { + return { ZCL_INT16U_ATTRIBUTE_TYPES, ZCL_INT16U_ATTRIBUTE_TYPES_SIZE }; + } + case ElectricalMeasurement::Attributes::RmsCurrent::Id: { + return { ZCL_INT16U_ATTRIBUTE_TYPES, ZCL_INT16U_ATTRIBUTE_TYPES_SIZE }; + } + case ElectricalMeasurement::Attributes::RmsCurrentMin::Id: { + return { ZCL_INT16U_ATTRIBUTE_TYPES, ZCL_INT16U_ATTRIBUTE_TYPES_SIZE }; + } + case ElectricalMeasurement::Attributes::RmsCurrentMax::Id: { + return { ZCL_INT16U_ATTRIBUTE_TYPES, ZCL_INT16U_ATTRIBUTE_TYPES_SIZE }; + } + case ElectricalMeasurement::Attributes::ActivePower::Id: { + return { ZCL_INT16S_ATTRIBUTE_TYPES, ZCL_INT16S_ATTRIBUTE_TYPES_SIZE }; + } + case ElectricalMeasurement::Attributes::ActivePowerMin::Id: { + return { ZCL_INT16S_ATTRIBUTE_TYPES, ZCL_INT16S_ATTRIBUTE_TYPES_SIZE }; + } + case ElectricalMeasurement::Attributes::ActivePowerMax::Id: { + return { ZCL_INT16S_ATTRIBUTE_TYPES, ZCL_INT16S_ATTRIBUTE_TYPES_SIZE }; + } + case ElectricalMeasurement::Attributes::ReactivePower::Id: { + return { ZCL_INT16S_ATTRIBUTE_TYPES, ZCL_INT16S_ATTRIBUTE_TYPES_SIZE }; + } + case ElectricalMeasurement::Attributes::ApparentPower::Id: { + return { ZCL_INT16U_ATTRIBUTE_TYPES, ZCL_INT16U_ATTRIBUTE_TYPES_SIZE }; + } + case ElectricalMeasurement::Attributes::PowerFactor::Id: { + return { ZCL_INT8S_ATTRIBUTE_TYPES, ZCL_INT8S_ATTRIBUTE_TYPES_SIZE }; + } + case ElectricalMeasurement::Attributes::AverageRmsVoltageMeasurementPeriod::Id: { + return { ZCL_INT16U_ATTRIBUTE_TYPES, ZCL_INT16U_ATTRIBUTE_TYPES_SIZE }; + } + case ElectricalMeasurement::Attributes::AverageRmsUnderVoltageCounter::Id: { + return { ZCL_INT16U_ATTRIBUTE_TYPES, ZCL_INT16U_ATTRIBUTE_TYPES_SIZE }; + } + case ElectricalMeasurement::Attributes::RmsExtremeOverVoltagePeriod::Id: { + return { ZCL_INT16U_ATTRIBUTE_TYPES, ZCL_INT16U_ATTRIBUTE_TYPES_SIZE }; + } + case ElectricalMeasurement::Attributes::RmsExtremeUnderVoltagePeriod::Id: { + return { ZCL_INT16U_ATTRIBUTE_TYPES, ZCL_INT16U_ATTRIBUTE_TYPES_SIZE }; + } + case ElectricalMeasurement::Attributes::RmsVoltageSagPeriod::Id: { + return { ZCL_INT16U_ATTRIBUTE_TYPES, ZCL_INT16U_ATTRIBUTE_TYPES_SIZE }; + } + case ElectricalMeasurement::Attributes::RmsVoltageSwellPeriod::Id: { + return { ZCL_INT16U_ATTRIBUTE_TYPES, ZCL_INT16U_ATTRIBUTE_TYPES_SIZE }; + } + case ElectricalMeasurement::Attributes::AcVoltageMultiplier::Id: { + return { ZCL_INT16U_ATTRIBUTE_TYPES, ZCL_INT16U_ATTRIBUTE_TYPES_SIZE }; + } + case ElectricalMeasurement::Attributes::AcVoltageDivisor::Id: { + return { ZCL_INT16U_ATTRIBUTE_TYPES, ZCL_INT16U_ATTRIBUTE_TYPES_SIZE }; + } + case ElectricalMeasurement::Attributes::AcCurrentMultiplier::Id: { + return { ZCL_INT16U_ATTRIBUTE_TYPES, ZCL_INT16U_ATTRIBUTE_TYPES_SIZE }; + } + case ElectricalMeasurement::Attributes::AcCurrentDivisor::Id: { + return { ZCL_INT16U_ATTRIBUTE_TYPES, ZCL_INT16U_ATTRIBUTE_TYPES_SIZE }; + } + case ElectricalMeasurement::Attributes::AcPowerMultiplier::Id: { + return { ZCL_INT16U_ATTRIBUTE_TYPES, ZCL_INT16U_ATTRIBUTE_TYPES_SIZE }; + } + case ElectricalMeasurement::Attributes::AcPowerDivisor::Id: { + return { ZCL_INT16U_ATTRIBUTE_TYPES, ZCL_INT16U_ATTRIBUTE_TYPES_SIZE }; + } + case ElectricalMeasurement::Attributes::OverloadAlarmsMask::Id: { + return { ZCL_BITMAP8_ATTRIBUTE_TYPES, ZCL_BITMAP8_ATTRIBUTE_TYPES_SIZE }; + } + case ElectricalMeasurement::Attributes::VoltageOverload::Id: { + return { ZCL_INT16S_ATTRIBUTE_TYPES, ZCL_INT16S_ATTRIBUTE_TYPES_SIZE }; + } + case ElectricalMeasurement::Attributes::CurrentOverload::Id: { + return { ZCL_INT16S_ATTRIBUTE_TYPES, ZCL_INT16S_ATTRIBUTE_TYPES_SIZE }; + } + case ElectricalMeasurement::Attributes::AcOverloadAlarmsMask::Id: { + return { ZCL_BITMAP16_ATTRIBUTE_TYPES, ZCL_BITMAP16_ATTRIBUTE_TYPES_SIZE }; + } + case ElectricalMeasurement::Attributes::AcVoltageOverload::Id: { + return { ZCL_INT16S_ATTRIBUTE_TYPES, ZCL_INT16S_ATTRIBUTE_TYPES_SIZE }; + } + case ElectricalMeasurement::Attributes::AcCurrentOverload::Id: { + return { ZCL_INT16S_ATTRIBUTE_TYPES, ZCL_INT16S_ATTRIBUTE_TYPES_SIZE }; + } + case ElectricalMeasurement::Attributes::AcActivePowerOverload::Id: { + return { ZCL_INT16S_ATTRIBUTE_TYPES, ZCL_INT16S_ATTRIBUTE_TYPES_SIZE }; + } + case ElectricalMeasurement::Attributes::AcReactivePowerOverload::Id: { + return { ZCL_INT16S_ATTRIBUTE_TYPES, ZCL_INT16S_ATTRIBUTE_TYPES_SIZE }; + } + case ElectricalMeasurement::Attributes::AverageRmsOverVoltage::Id: { + return { ZCL_INT16S_ATTRIBUTE_TYPES, ZCL_INT16S_ATTRIBUTE_TYPES_SIZE }; + } + case ElectricalMeasurement::Attributes::AverageRmsUnderVoltage::Id: { + return { ZCL_INT16S_ATTRIBUTE_TYPES, ZCL_INT16S_ATTRIBUTE_TYPES_SIZE }; + } + case ElectricalMeasurement::Attributes::RmsExtremeOverVoltage::Id: { + return { ZCL_INT16S_ATTRIBUTE_TYPES, ZCL_INT16S_ATTRIBUTE_TYPES_SIZE }; + } + case ElectricalMeasurement::Attributes::RmsExtremeUnderVoltage::Id: { + return { ZCL_INT16S_ATTRIBUTE_TYPES, ZCL_INT16S_ATTRIBUTE_TYPES_SIZE }; + } + case ElectricalMeasurement::Attributes::RmsVoltageSag::Id: { + return { ZCL_INT16S_ATTRIBUTE_TYPES, ZCL_INT16S_ATTRIBUTE_TYPES_SIZE }; + } + case ElectricalMeasurement::Attributes::RmsVoltageSwell::Id: { + return { ZCL_INT16S_ATTRIBUTE_TYPES, ZCL_INT16S_ATTRIBUTE_TYPES_SIZE }; + } + case ElectricalMeasurement::Attributes::LineCurrentPhaseB::Id: { + return { ZCL_INT16U_ATTRIBUTE_TYPES, ZCL_INT16U_ATTRIBUTE_TYPES_SIZE }; + } + case ElectricalMeasurement::Attributes::ActiveCurrentPhaseB::Id: { + return { ZCL_INT16S_ATTRIBUTE_TYPES, ZCL_INT16S_ATTRIBUTE_TYPES_SIZE }; + } + case ElectricalMeasurement::Attributes::ReactiveCurrentPhaseB::Id: { + return { ZCL_INT16S_ATTRIBUTE_TYPES, ZCL_INT16S_ATTRIBUTE_TYPES_SIZE }; + } + case ElectricalMeasurement::Attributes::RmsVoltagePhaseB::Id: { + return { ZCL_INT16U_ATTRIBUTE_TYPES, ZCL_INT16U_ATTRIBUTE_TYPES_SIZE }; + } + case ElectricalMeasurement::Attributes::RmsVoltageMinPhaseB::Id: { + return { ZCL_INT16U_ATTRIBUTE_TYPES, ZCL_INT16U_ATTRIBUTE_TYPES_SIZE }; + } + case ElectricalMeasurement::Attributes::RmsVoltageMaxPhaseB::Id: { + return { ZCL_INT16U_ATTRIBUTE_TYPES, ZCL_INT16U_ATTRIBUTE_TYPES_SIZE }; + } + case ElectricalMeasurement::Attributes::RmsCurrentPhaseB::Id: { + return { ZCL_INT16U_ATTRIBUTE_TYPES, ZCL_INT16U_ATTRIBUTE_TYPES_SIZE }; + } + case ElectricalMeasurement::Attributes::RmsCurrentMinPhaseB::Id: { + return { ZCL_INT16U_ATTRIBUTE_TYPES, ZCL_INT16U_ATTRIBUTE_TYPES_SIZE }; + } + case ElectricalMeasurement::Attributes::RmsCurrentMaxPhaseB::Id: { + return { ZCL_INT16U_ATTRIBUTE_TYPES, ZCL_INT16U_ATTRIBUTE_TYPES_SIZE }; + } + case ElectricalMeasurement::Attributes::ActivePowerPhaseB::Id: { + return { ZCL_INT16S_ATTRIBUTE_TYPES, ZCL_INT16S_ATTRIBUTE_TYPES_SIZE }; + } + case ElectricalMeasurement::Attributes::ActivePowerMinPhaseB::Id: { + return { ZCL_INT16S_ATTRIBUTE_TYPES, ZCL_INT16S_ATTRIBUTE_TYPES_SIZE }; + } + case ElectricalMeasurement::Attributes::ActivePowerMaxPhaseB::Id: { + return { ZCL_INT16S_ATTRIBUTE_TYPES, ZCL_INT16S_ATTRIBUTE_TYPES_SIZE }; + } + case ElectricalMeasurement::Attributes::ReactivePowerPhaseB::Id: { + return { ZCL_INT16S_ATTRIBUTE_TYPES, ZCL_INT16S_ATTRIBUTE_TYPES_SIZE }; + } + case ElectricalMeasurement::Attributes::ApparentPowerPhaseB::Id: { + return { ZCL_INT16U_ATTRIBUTE_TYPES, ZCL_INT16U_ATTRIBUTE_TYPES_SIZE }; + } + case ElectricalMeasurement::Attributes::PowerFactorPhaseB::Id: { + return { ZCL_INT8S_ATTRIBUTE_TYPES, ZCL_INT8S_ATTRIBUTE_TYPES_SIZE }; + } + case ElectricalMeasurement::Attributes::AverageRmsVoltageMeasurementPeriodPhaseB::Id: { + return { ZCL_INT16U_ATTRIBUTE_TYPES, ZCL_INT16U_ATTRIBUTE_TYPES_SIZE }; + } + case ElectricalMeasurement::Attributes::AverageRmsOverVoltageCounterPhaseB::Id: { + return { ZCL_INT16U_ATTRIBUTE_TYPES, ZCL_INT16U_ATTRIBUTE_TYPES_SIZE }; + } + case ElectricalMeasurement::Attributes::AverageRmsUnderVoltageCounterPhaseB::Id: { + return { ZCL_INT16U_ATTRIBUTE_TYPES, ZCL_INT16U_ATTRIBUTE_TYPES_SIZE }; + } + case ElectricalMeasurement::Attributes::RmsExtremeOverVoltagePeriodPhaseB::Id: { + return { ZCL_INT16U_ATTRIBUTE_TYPES, ZCL_INT16U_ATTRIBUTE_TYPES_SIZE }; + } + case ElectricalMeasurement::Attributes::RmsExtremeUnderVoltagePeriodPhaseB::Id: { + return { ZCL_INT16U_ATTRIBUTE_TYPES, ZCL_INT16U_ATTRIBUTE_TYPES_SIZE }; + } + case ElectricalMeasurement::Attributes::RmsVoltageSagPeriodPhaseB::Id: { + return { ZCL_INT16U_ATTRIBUTE_TYPES, ZCL_INT16U_ATTRIBUTE_TYPES_SIZE }; + } + case ElectricalMeasurement::Attributes::RmsVoltageSwellPeriodPhaseB::Id: { + return { ZCL_INT16U_ATTRIBUTE_TYPES, ZCL_INT16U_ATTRIBUTE_TYPES_SIZE }; + } + case ElectricalMeasurement::Attributes::LineCurrentPhaseC::Id: { + return { ZCL_INT16U_ATTRIBUTE_TYPES, ZCL_INT16U_ATTRIBUTE_TYPES_SIZE }; + } + case ElectricalMeasurement::Attributes::ActiveCurrentPhaseC::Id: { + return { ZCL_INT16S_ATTRIBUTE_TYPES, ZCL_INT16S_ATTRIBUTE_TYPES_SIZE }; + } + case ElectricalMeasurement::Attributes::ReactiveCurrentPhaseC::Id: { + return { ZCL_INT16S_ATTRIBUTE_TYPES, ZCL_INT16S_ATTRIBUTE_TYPES_SIZE }; + } + case ElectricalMeasurement::Attributes::RmsVoltagePhaseC::Id: { + return { ZCL_INT16U_ATTRIBUTE_TYPES, ZCL_INT16U_ATTRIBUTE_TYPES_SIZE }; + } + case ElectricalMeasurement::Attributes::RmsVoltageMinPhaseC::Id: { + return { ZCL_INT16U_ATTRIBUTE_TYPES, ZCL_INT16U_ATTRIBUTE_TYPES_SIZE }; + } + case ElectricalMeasurement::Attributes::RmsVoltageMaxPhaseC::Id: { + return { ZCL_INT16U_ATTRIBUTE_TYPES, ZCL_INT16U_ATTRIBUTE_TYPES_SIZE }; + } + case ElectricalMeasurement::Attributes::RmsCurrentPhaseC::Id: { + return { ZCL_INT16U_ATTRIBUTE_TYPES, ZCL_INT16U_ATTRIBUTE_TYPES_SIZE }; + } + case ElectricalMeasurement::Attributes::RmsCurrentMinPhaseC::Id: { + return { ZCL_INT16U_ATTRIBUTE_TYPES, ZCL_INT16U_ATTRIBUTE_TYPES_SIZE }; + } + case ElectricalMeasurement::Attributes::RmsCurrentMaxPhaseC::Id: { + return { ZCL_INT16U_ATTRIBUTE_TYPES, ZCL_INT16U_ATTRIBUTE_TYPES_SIZE }; + } + case ElectricalMeasurement::Attributes::ActivePowerPhaseC::Id: { + return { ZCL_INT16S_ATTRIBUTE_TYPES, ZCL_INT16S_ATTRIBUTE_TYPES_SIZE }; + } + case ElectricalMeasurement::Attributes::ActivePowerMinPhaseC::Id: { + return { ZCL_INT16S_ATTRIBUTE_TYPES, ZCL_INT16S_ATTRIBUTE_TYPES_SIZE }; + } + case ElectricalMeasurement::Attributes::ActivePowerMaxPhaseC::Id: { + return { ZCL_INT16S_ATTRIBUTE_TYPES, ZCL_INT16S_ATTRIBUTE_TYPES_SIZE }; + } + case ElectricalMeasurement::Attributes::ReactivePowerPhaseC::Id: { + return { ZCL_INT16S_ATTRIBUTE_TYPES, ZCL_INT16S_ATTRIBUTE_TYPES_SIZE }; + } + case ElectricalMeasurement::Attributes::ApparentPowerPhaseC::Id: { + return { ZCL_INT16U_ATTRIBUTE_TYPES, ZCL_INT16U_ATTRIBUTE_TYPES_SIZE }; + } + case ElectricalMeasurement::Attributes::PowerFactorPhaseC::Id: { + return { ZCL_INT8S_ATTRIBUTE_TYPES, ZCL_INT8S_ATTRIBUTE_TYPES_SIZE }; + } + case ElectricalMeasurement::Attributes::AverageRmsVoltageMeasurementPeriodPhaseC::Id: { + return { ZCL_INT16U_ATTRIBUTE_TYPES, ZCL_INT16U_ATTRIBUTE_TYPES_SIZE }; + } + case ElectricalMeasurement::Attributes::AverageRmsOverVoltageCounterPhaseC::Id: { + return { ZCL_INT16U_ATTRIBUTE_TYPES, ZCL_INT16U_ATTRIBUTE_TYPES_SIZE }; + } + case ElectricalMeasurement::Attributes::AverageRmsUnderVoltageCounterPhaseC::Id: { + return { ZCL_INT16U_ATTRIBUTE_TYPES, ZCL_INT16U_ATTRIBUTE_TYPES_SIZE }; + } + case ElectricalMeasurement::Attributes::RmsExtremeOverVoltagePeriodPhaseC::Id: { + return { ZCL_INT16U_ATTRIBUTE_TYPES, ZCL_INT16U_ATTRIBUTE_TYPES_SIZE }; + } + case ElectricalMeasurement::Attributes::RmsExtremeUnderVoltagePeriodPhaseC::Id: { + return { ZCL_INT16U_ATTRIBUTE_TYPES, ZCL_INT16U_ATTRIBUTE_TYPES_SIZE }; + } + case ElectricalMeasurement::Attributes::RmsVoltageSagPeriodPhaseC::Id: { + return { ZCL_INT16U_ATTRIBUTE_TYPES, ZCL_INT16U_ATTRIBUTE_TYPES_SIZE }; + } + case ElectricalMeasurement::Attributes::RmsVoltageSwellPeriodPhaseC::Id: { + return { ZCL_INT16U_ATTRIBUTE_TYPES, ZCL_INT16U_ATTRIBUTE_TYPES_SIZE }; + } + case ElectricalMeasurement::Attributes::GeneratedCommandList::Id: { + return { ZCL_ARRAY_ATTRIBUTE_TYPES, ZCL_ARRAY_ATTRIBUTE_TYPES_SIZE }; + } + case ElectricalMeasurement::Attributes::AcceptedCommandList::Id: { + return { ZCL_ARRAY_ATTRIBUTE_TYPES, ZCL_ARRAY_ATTRIBUTE_TYPES_SIZE }; + } + case ElectricalMeasurement::Attributes::AttributeList::Id: { + return { ZCL_ARRAY_ATTRIBUTE_TYPES, ZCL_ARRAY_ATTRIBUTE_TYPES_SIZE }; + } + case ElectricalMeasurement::Attributes::FeatureMap::Id: { + return { ZCL_BITMAP32_ATTRIBUTE_TYPES, ZCL_BITMAP32_ATTRIBUTE_TYPES_SIZE }; + } + case ElectricalMeasurement::Attributes::ClusterRevision::Id: { + return { ZCL_INT16U_ATTRIBUTE_TYPES, ZCL_INT16U_ATTRIBUTE_TYPES_SIZE }; + } + default: + return { ZCL_BOOLEAN_ATTRIBUTE_TYPES, 0x01 }; + } + } + default: + return { ZCL_BOOLEAN_ATTRIBUTE_TYPES, 0x01 }; + } +} \ No newline at end of file diff --git a/silabs_examples/unify-matter-bridge/linux/zap-handlers/gen/attribute_type_size.hpp b/silabs_examples/unify-matter-bridge/linux/zap-handlers/gen/attribute_type_size.hpp new file mode 100644 index 00000000000000..b6efad63b5f801 --- /dev/null +++ b/silabs_examples/unify-matter-bridge/linux/zap-handlers/gen/attribute_type_size.hpp @@ -0,0 +1,22 @@ +/******************************************************************************* + * # License + * Copyright 2020 Silicon Laboratories Inc. www.silabs.com + ******************************************************************************* + * + * The licensor of this software is Silicon Laboratories Inc. Your use of this + * software is governed by the terms of Silicon Labs Master Software License + * Agreement (MSLA) available at + * www.silabs.com/about-us/legal/master-software-license-agreement. This + * software is distributed to you in Source Code format and is governed by the + * sections of the MSLA applicable to Source Code. + * + ******************************************************************************/ +#include + +struct attr_type_size +{ + uint8_t attrType; + uint8_t attrSize; +}; + +attr_type_size get_attribute_type_size(uint16_t cluster_id, uint16_t attribute_id); \ No newline at end of file diff --git a/silabs_examples/unify-matter-bridge/linux/zap-handlers/gen/chip_types_from_json.hpp b/silabs_examples/unify-matter-bridge/linux/zap-handlers/gen/chip_types_from_json.hpp index 1e2984565403a1..a095e2bb8b108b 100644 --- a/silabs_examples/unify-matter-bridge/linux/zap-handlers/gen/chip_types_from_json.hpp +++ b/silabs_examples/unify-matter-bridge/linux/zap-handlers/gen/chip_types_from_json.hpp @@ -12,6 +12,7 @@ * ******************************************************************************/ #include "app/data-model/NullObject.h" +#include "zcl_global_types.hpp" // Default translation template @@ -19,7 +20,7 @@ std::optional from_json(const nlohmann::json & value) { return std::nullopt; } -/***************************** Simple types Convertes **************/ +/***************************** Simple type Convertes **************/ template <> inline std::optional from_json(const nlohmann::json & value) @@ -60,7 +61,7 @@ inline std::optional from_json(const nlohmann::json & value) return value; } template <> -inline std::optional> from_json(const nlohmann::json & value) +inline std::optional> from_json(const nlohmann::json & value) { if (value.is_null()) { @@ -68,7 +69,43 @@ inline std::optional> from_json(const nlohma } else { - return chip::app::DataModel::Nullable(value); + return chip::app::DataModel::Nullable(value); + } +} +template <> +inline std::optional> from_json(const nlohmann::json & value) +{ + if (value.is_null()) + { + return std::nullopt; + } + else + { + return chip::app::DataModel::Nullable(value); + } +} +template <> +inline std::optional> from_json(const nlohmann::json & value) +{ + if (value.is_null()) + { + return std::nullopt; + } + else + { + return chip::app::DataModel::Nullable(value); + } +} +template <> +inline std::optional> from_json(const nlohmann::json & value) +{ + if (value.is_null()) + { + return std::nullopt; + } + else + { + return chip::app::DataModel::Nullable(value); } } template <> @@ -119,10 +156,10 @@ inline std::optional> from_json(const n return chip::app::DataModel::Nullable(value); } } -/***************************** Bitmap Convertes **************/ +/***************************** Bitmap Converters **************/ // -// -/***************************** Struct Convertes **************/ + +/***************************** Struct Converters **************/ // template <> @@ -147,7 +184,6 @@ inline std::optional from_json(const nlohman return std::nullopt; } } - template <> inline std::optional from_json(const nlohmann::json & value) { @@ -165,7 +201,6 @@ inline std::optional from_json(const nlohmann:: return std::nullopt; } } - template <> inline std::optional from_json(const nlohmann::json & value) { @@ -188,13 +223,14 @@ inline std::optional from_json(const nlohmann::j return std::nullopt; } } - // // template<> inline nlohmann::json to_json(const chip::BitFlags& value) { // return "{\"no bitmap support\"}"; //} -/***************************** Struct Convertes **************/ +// + +/***************************** Struct Converters **************/ // // @@ -202,7 +238,9 @@ inline std::optional from_json(const nlohmann::j // return "{\"no bitmap support\"}"; //} -/***************************** Struct Convertes **************/ +// + +/***************************** Struct Converters **************/ // // template<> inline nlohmann::json to_json(const Scenes::Structs::AttributeValuePair::Type& value) { // return "no struct support"; @@ -220,15 +258,19 @@ inline std::optional from_json(const nlohmann::j // return "{\"no bitmap support\"}"; //} +// // template<> inline nlohmann::json to_json(const chip::BitFlags& value) { -// return "{\"no bitmap support\"}"; -// } +// return "{\"no bitmap support\"}"; +//} +// // template<> inline nlohmann::json to_json(const chip::BitFlags& value) { -// return "{\"no bitmap support\"}"; -// } +// return "{\"no bitmap support\"}"; +//} + +// -/***************************** Struct Convertes **************/ +/***************************** Struct Converters **************/ // template <> @@ -251,7 +293,6 @@ inline std::optional from_json(const nlo return std::nullopt; } } - template <> inline std::optional from_json(const nlohmann::json & value) { @@ -270,7 +311,6 @@ inline std::optional from_json(const nlohma return std::nullopt; } } - template <> inline std::optional from_json(const nlohmann::json & value) { @@ -289,7 +329,6 @@ inline std::optional from_json(const nlohmann::jso return std::nullopt; } } - template <> inline std::optional from_json(const nlohmann::json & value) { @@ -309,9 +348,9 @@ inline std::optional from_json(const nlohmann::json & return std::nullopt; } } - // -/***************************** Struct Convertes **************/ + +/***************************** Struct Converters **************/ // // @@ -319,7 +358,9 @@ inline std::optional from_json(const nlohmann::json & // return "{\"no bitmap support\"}"; //} -/***************************** Struct Convertes **************/ +// + +/***************************** Struct Converters **************/ // template <> @@ -340,7 +381,6 @@ inline std::optional from_json(const nlohmann::json & va return std::nullopt; } } - template <> inline std::optional from_json(const nlohmann::json & value) { @@ -359,17 +399,19 @@ inline std::optional from_json(const nlohmann::json & va return std::nullopt; } } - // -/***************************** Struct Convertes **************/ + +/***************************** Struct Converters **************/ // // -/***************************** Struct Convertes **************/ + +/***************************** Struct Converters **************/ // // -/***************************** Struct Convertes **************/ + +/***************************** Struct Converters **************/ // // template<> inline nlohmann::json to_json(const Descriptor::Structs::DeviceTypeStruct::Type& value) { // return "no struct support"; @@ -378,7 +420,8 @@ inline std::optional from_json(const nlohmann::json & va // // -/***************************** Struct Convertes **************/ + +/***************************** Struct Converters **************/ // // template<> inline nlohmann::json to_json(const Binding::Structs::TargetStruct::Type& value) { // return "no struct support"; @@ -387,7 +430,8 @@ inline std::optional from_json(const nlohmann::json & va // // -/***************************** Struct Convertes **************/ + +/***************************** Struct Converters **************/ // // template<> inline nlohmann::json to_json(const AccessControl::Structs::Target::Type& value) { // return "no struct support"; @@ -424,7 +468,6 @@ inline std::optional from_json(const nlohmann::json & v return std::nullopt; } } - template <> inline std::optional from_json(const nlohmann::json & value) { @@ -444,7 +487,6 @@ inline std::optional from_json(const nlohmann::js return std::nullopt; } } - template <> inline std::optional from_json(const nlohmann::json & value) { @@ -466,13 +508,14 @@ inline std::optional from_json(const nlohmann::json & return std::nullopt; } } - // // template<> inline nlohmann::json to_json(const chip::BitFlags& value) { // return "{\"no bitmap support\"}"; //} -/***************************** Struct Convertes **************/ +// + +/***************************** Struct Converters **************/ // // template<> inline nlohmann::json to_json(const Actions::Structs::ActionStruct::Type& value) { // return "no struct support"; @@ -503,7 +546,6 @@ inline std::optional from_json(const nlohmann::json & return std::nullopt; } } - template <> inline std::optional from_json(const nlohmann::json & value) { @@ -524,7 +566,6 @@ inline std::optional from_json(const nlohmann::json & return std::nullopt; } } - template <> inline std::optional from_json(const nlohmann::json & value) { @@ -545,7 +586,6 @@ inline std::optional from_json(const nlohmann::json & v return std::nullopt; } } - template <> inline std::optional from_json(const nlohmann::json & value) { @@ -565,9 +605,9 @@ inline std::optional from_json(const nlohmann::js return std::nullopt; } } - // -/***************************** Struct Convertes **************/ + +/***************************** Struct Converters **************/ // // template<> inline nlohmann::json to_json(const Basic::Structs::CapabilityMinimaStruct::Type& value) { // return "no struct support"; @@ -576,7 +616,8 @@ inline std::optional from_json(const nlohmann::js // // -/***************************** Struct Convertes **************/ + +/***************************** Struct Converters **************/ // template <> @@ -598,7 +639,6 @@ inline std::optional from_json( return std::nullopt; } } - template <> inline std::optional from_json(const nlohmann::json & value) { @@ -619,7 +659,6 @@ inline std::optional from_json(c return std::nullopt; } } - template <> inline std::optional from_json(const nlohmann::json & value) { @@ -640,9 +679,9 @@ inline std::optional from_json(const return std::nullopt; } } - // -/***************************** Struct Convertes **************/ + +/***************************** Struct Converters **************/ // // template<> inline nlohmann::json to_json(const OtaSoftwareUpdateRequestor::Structs::ProviderLocation::Type& value) { // return "no struct support"; @@ -669,7 +708,6 @@ inline std::optional from_jso return std::nullopt; } } - template <> inline std::optional from_json(const nlohmann::json & value) { @@ -691,7 +729,6 @@ inline std::optional from_json( return std::nullopt; } } - template <> inline std::optional from_json(const nlohmann::json & value) { @@ -717,13 +754,14 @@ inline std::optional from_json(c return std::nullopt; } } - // -/***************************** Struct Convertes **************/ + +/***************************** Struct Converters **************/ // // -/***************************** Struct Convertes **************/ + +/***************************** Struct Converters **************/ // template <> @@ -754,7 +792,6 @@ inline std::optional from_json(const nlohm return std::nullopt; } } - template <> inline std::optional from_json(const nlohmann::json & value) { @@ -773,13 +810,14 @@ inline std::optional from_json(const nlohman return std::nullopt; } } - // // template<> inline nlohmann::json to_json(const chip::BitFlags& value) { // return "{\"no bitmap support\"}"; //} -/***************************** Struct Convertes **************/ +// + +/***************************** Struct Converters **************/ // template <> @@ -801,9 +839,9 @@ inline std::optional from_json(const nlohmann::json return std::nullopt; } } - // -/***************************** Struct Convertes **************/ + +/***************************** Struct Converters **************/ // // @@ -811,7 +849,9 @@ inline std::optional from_json(const nlohmann::json // return "{\"no bitmap support\"}"; //} -/***************************** Struct Convertes **************/ +// + +/***************************** Struct Converters **************/ // // template<> inline nlohmann::json to_json(const PowerSource::Structs::BatChargeFaultChangeType::Type& value) { // return "no struct support"; @@ -856,7 +896,6 @@ inline std::optional from_json(const nlohmann::json return std::nullopt; } } - template <> inline std::optional from_json(const nlohmann::json & value) { @@ -876,7 +915,6 @@ inline std::optional from_json(const nlohmann::json return std::nullopt; } } - template <> inline std::optional from_json(const nlohmann::json & value) { @@ -897,7 +935,6 @@ inline std::optional from_json(const nlohmann::json return std::nullopt; } } - template <> inline std::optional from_json(const nlohmann::json & value) { @@ -917,7 +954,6 @@ inline std::optional from_json(const nlohmann::json & val return std::nullopt; } } - template <> inline std::optional from_json(const nlohmann::json & value) { @@ -938,7 +974,6 @@ inline std::optional from_json(const nlohmann::j return std::nullopt; } } - template <> inline std::optional from_json(const nlohmann::json & value) { @@ -959,7 +994,6 @@ inline std::optional from_json(const nlohmann::j return std::nullopt; } } - template <> inline std::optional from_json(const nlohmann::json & value) { @@ -978,7 +1012,6 @@ inline std::optional from_json(const nlohmann::js return std::nullopt; } } - template <> inline std::optional from_json(const nlohmann::json & value) { @@ -998,9 +1031,9 @@ inline std::optional from_json(const nlohmann::json & v return std::nullopt; } } - // -/***************************** Struct Convertes **************/ + +/***************************** Struct Converters **************/ // // template<> inline nlohmann::json to_json(const GeneralCommissioning::Structs::BasicCommissioningInfo::Type& value) { // return "no struct support"; @@ -1029,7 +1062,6 @@ inline std::optional from_json(const n return std::nullopt; } } - template <> inline std::optional from_json(const nlohmann::json & value) { @@ -1049,18 +1081,20 @@ inline std::optional from_json(con return std::nullopt; } } - // // template<> inline nlohmann::json to_json(const chip::BitFlags& value) // { // return "{\"no bitmap support\"}"; //} +// // template<> inline nlohmann::json to_json(const chip::BitFlags& value) { -// return "{\"no bitmap support\"}"; -// } +// return "{\"no bitmap support\"}"; +//} + +// -/***************************** Struct Convertes **************/ +/***************************** Struct Converters **************/ // // template<> inline nlohmann::json to_json(const NetworkCommissioning::Structs::NetworkInfo::Type& value) { // return "no struct support"; @@ -1107,7 +1141,6 @@ inline std::optional from_json return std::nullopt; } } - template <> inline std::optional from_json(const nlohmann::json & value) { @@ -1127,9 +1160,9 @@ inline std::optional from_json(const nlohmann::j return std::nullopt; } } - // -/***************************** Struct Convertes **************/ + +/***************************** Struct Converters **************/ // template <> @@ -1151,7 +1184,6 @@ inline std::optional from_json(const nlohmann::json return std::nullopt; } } - template <> inline std::optional from_json(const nlohmann::json & value) { @@ -1171,7 +1203,6 @@ inline std::optional from_json(const nlohmann::json return std::nullopt; } } - template <> inline std::optional from_json(const nlohmann::json & value) { @@ -1190,9 +1221,9 @@ inline std::optional from_json(const nlohm return std::nullopt; } } - // -/***************************** Struct Convertes **************/ + +/***************************** Struct Converters **************/ // // template<> inline nlohmann::json to_json(const GeneralDiagnostics::Structs::NetworkInterfaceType::Type& value) { // return "no struct support"; @@ -1223,7 +1254,6 @@ inline std::optional from_json(const nlohman return std::nullopt; } } - template <> inline std::optional from_json(const nlohmann::json & value) { @@ -1251,7 +1281,6 @@ inline std::optional from_json(const nloh return std::nullopt; } } - template <> inline std::optional from_json(const nlohmann::json & value) { @@ -1273,7 +1302,6 @@ inline std::optional from_json(const nlohmann return std::nullopt; } } - template <> inline std::optional from_json(const nlohmann::json & value) { @@ -1294,7 +1322,6 @@ inline std::optional from_json(const nlohm return std::nullopt; } } - template <> inline std::optional from_json(const nlohmann::json & value) { @@ -1318,13 +1345,14 @@ inline std::optional from_json(const nlohman return std::nullopt; } } - // // template<> inline nlohmann::json to_json(const chip::BitFlags& value) { // return "{\"no bitmap support\"}"; //} -/***************************** Struct Convertes **************/ +// + +/***************************** Struct Converters **************/ // // template<> inline nlohmann::json to_json(const SoftwareDiagnostics::Structs::ThreadMetrics::Type& value) { // return "no struct support"; @@ -1338,7 +1366,9 @@ inline std::optional from_json(const nlohman // return "{\"no bitmap support\"}"; //} -/***************************** Struct Convertes **************/ +// + +/***************************** Struct Converters **************/ // // template<> inline nlohmann::json to_json(const ThreadNetworkDiagnostics::Structs::NeighborTable::Type& value) { // return "no struct support"; @@ -1381,7 +1411,6 @@ inline std::optional from_json(const nlo return std::nullopt; } } - template <> inline std::optional from_json(const nlohmann::json & value) { @@ -1405,7 +1434,6 @@ inline std::optional from_json(const nloh return std::nullopt; } } - template <> inline std::optional from_json(const nlohmann::json & value) { @@ -1424,9 +1452,9 @@ inline std::optional from_json return std::nullopt; } } - // -/***************************** Struct Convertes **************/ + +/***************************** Struct Converters **************/ // template <> @@ -1449,7 +1477,6 @@ inline std::optional from_json( return std::nullopt; } } - template <> inline std::optional from_json(const nlohmann::json & value) { @@ -1472,7 +1499,6 @@ inline std::optional from_json(const nlohm return std::nullopt; } } - template <> inline std::optional from_json(const nlohmann::json & value) { @@ -1491,7 +1517,6 @@ inline std::optional from_json(con return std::nullopt; } } - template <> inline std::optional from_json(const nlohmann::json & value) { @@ -1514,9 +1539,9 @@ inline std::optional from_json(const nl return std::nullopt; } } - // -/***************************** Struct Convertes **************/ + +/***************************** Struct Converters **************/ // template <> @@ -1540,9 +1565,9 @@ inline std::optional from_json(const nl return std::nullopt; } } - // -/***************************** Struct Convertes **************/ + +/***************************** Struct Converters **************/ // // template<> inline nlohmann::json to_json(const TimeSynchronization::Structs::DstOffsetType::Type& value) { // return "no struct support"; @@ -1576,7 +1601,6 @@ inline std::optional from_json(const nlohm return std::nullopt; } } - template <> inline std::optional from_json(const nlohmann::json & value) { @@ -1610,9 +1634,9 @@ inline std::optional from_json(const nlohma return std::nullopt; } } - // -/***************************** Struct Convertes **************/ + +/***************************** Struct Converters **************/ // // @@ -1620,11 +1644,14 @@ inline std::optional from_json(const nlohma // return "{\"no bitmap support\"}"; //} -/***************************** Struct Convertes **************/ +// + +/***************************** Struct Converters **************/ // // -/***************************** Struct Convertes **************/ + +/***************************** Struct Converters **************/ // template <> @@ -1646,7 +1673,6 @@ inline std::optional from return std::nullopt; } } - template <> inline std::optional from_json(const nlohmann::json & value) { @@ -1666,9 +1692,9 @@ inline std::optional from_json(const nlo return std::nullopt; } } - // -/***************************** Struct Convertes **************/ + +/***************************** Struct Converters **************/ // // template<> inline nlohmann::json to_json(const OperationalCredentials::Structs::FabricDescriptor::Type& value) { // return "no struct support"; @@ -1707,9 +1733,9 @@ inline std::optional from_json(co return std::nullopt; } } - // -/***************************** Struct Convertes **************/ + +/***************************** Struct Converters **************/ // // template<> inline nlohmann::json to_json(const GroupKeyManagement::Structs::GroupInfoMapStruct::Type& value) { // return "no struct support"; @@ -1745,9 +1771,9 @@ inline std::optional from_json(const return std::nullopt; } } - // -/***************************** Struct Convertes **************/ + +/***************************** Struct Converters **************/ // // template<> inline nlohmann::json to_json(const FixedLabel::Structs::LabelStruct::Type& value) { // return "no struct support"; @@ -1756,7 +1782,8 @@ inline std::optional from_json(const // // -/***************************** Struct Convertes **************/ + +/***************************** Struct Converters **************/ // // template<> inline nlohmann::json to_json(const UserLabel::Structs::LabelStruct::Type& value) { // return "no struct support"; @@ -1765,19 +1792,23 @@ inline std::optional from_json(const // // -/***************************** Struct Convertes **************/ + +/***************************** Struct Converters **************/ // // -/***************************** Struct Convertes **************/ + +/***************************** Struct Converters **************/ // // -/***************************** Struct Convertes **************/ + +/***************************** Struct Converters **************/ // // -/***************************** Struct Convertes **************/ + +/***************************** Struct Converters **************/ // // @@ -1785,7 +1816,9 @@ inline std::optional from_json(const // return "{\"no bitmap support\"}"; //} -/***************************** Struct Convertes **************/ +// + +/***************************** Struct Converters **************/ // // template<> inline nlohmann::json to_json(const ModeSelect::Structs::SemanticTag::Type& value) { // return "no struct support"; @@ -1803,63 +1836,79 @@ inline std::optional from_json(const // return "{\"no bitmap support\"}"; //} +// // template<> inline nlohmann::json to_json(const chip::BitFlags& value) { -// return "{\"no bitmap support\"}"; -// } +// return "{\"no bitmap support\"}"; +//} +// // template<> inline nlohmann::json to_json(const chip::BitFlags& value) { -// return "{\"no bitmap support\"}"; -// } +// return "{\"no bitmap support\"}"; +//} +// // template<> inline nlohmann::json to_json(const chip::BitFlags& value) { -// return "{\"no bitmap support\"}"; -// } +// return "{\"no bitmap support\"}"; +//} +// // template<> inline nlohmann::json to_json(const chip::BitFlags& value) { -// return "{\"no bitmap support\"}"; -// } +// return "{\"no bitmap support\"}"; +//} +// // template<> inline nlohmann::json to_json(const chip::BitFlags& value) { -// return "{\"no bitmap support\"}"; -// } +// return "{\"no bitmap support\"}"; +//} +// // template<> inline nlohmann::json to_json(const chip::BitFlags& value) { -// return "{\"no bitmap support\"}"; -// } +// return "{\"no bitmap support\"}"; +//} +// // template<> inline nlohmann::json to_json(const chip::BitFlags& value) { -// return "{\"no bitmap support\"}"; -// } +// return "{\"no bitmap support\"}"; +//} +// // template<> inline nlohmann::json to_json(const chip::BitFlags& value) { -// return "{\"no bitmap support\"}"; -// } +// return "{\"no bitmap support\"}"; +//} +// // template<> inline nlohmann::json to_json(const chip::BitFlags& value) { -// return "{\"no bitmap support\"}"; -// } +// return "{\"no bitmap support\"}"; +//} +// // template<> inline nlohmann::json to_json(const chip::BitFlags& value) { -// return "{\"no bitmap support\"}"; -// } +// return "{\"no bitmap support\"}"; +//} +// // template<> inline nlohmann::json to_json(const chip::BitFlags& value) { -// return "{\"no bitmap support\"}"; -// } +// return "{\"no bitmap support\"}"; +//} +// // template<> inline nlohmann::json to_json(const chip::BitFlags& value) { -// return "{\"no bitmap support\"}"; -// } +// return "{\"no bitmap support\"}"; +//} +// // template<> inline nlohmann::json to_json(const chip::BitFlags& value) { -// return "{\"no bitmap support\"}"; -// } +// return "{\"no bitmap support\"}"; +//} +// // template<> inline nlohmann::json to_json(const chip::BitFlags& value) { -// return "{\"no bitmap support\"}"; -// } +// return "{\"no bitmap support\"}"; +//} + +// -/***************************** Struct Convertes **************/ +/***************************** Struct Converters **************/ // // template<> inline nlohmann::json to_json(const DoorLock::Structs::DlCredential::Type& value) { // return "no struct support"; @@ -1891,7 +1940,6 @@ inline std::optional from_json(const nlohmann::json & val return std::nullopt; } } - template <> inline std::optional from_json(const nlohmann::json & value) { @@ -1911,7 +1959,6 @@ inline std::optional from_json(const nlohmann::json return std::nullopt; } } - template <> inline std::optional from_json(const nlohmann::json & value) { @@ -1934,7 +1981,6 @@ inline std::optional from_json(const nlohmann::json return std::nullopt; } } - template <> inline std::optional from_json(const nlohmann::json & value) { @@ -1954,7 +2000,6 @@ inline std::optional from_json(const nlohmann::js return std::nullopt; } } - template <> inline std::optional from_json(const nlohmann::json & value) { @@ -1977,7 +2022,6 @@ inline std::optional from_json(const nlohmann::json & val return std::nullopt; } } - template <> inline std::optional from_json(const nlohmann::json & value) { @@ -2003,7 +2047,6 @@ inline std::optional from_json(const nlohmann::json & return std::nullopt; } } - template <> inline std::optional from_json(const nlohmann::json & value) { @@ -2024,7 +2067,6 @@ inline std::optional from_json(const nlohmann::js return std::nullopt; } } - template <> inline std::optional from_json(const nlohmann::json & value) { @@ -2044,7 +2086,6 @@ inline std::optional from_json(const nlohmann::json & val return std::nullopt; } } - template <> inline std::optional from_json(const nlohmann::json & value) { @@ -2072,7 +2113,6 @@ inline std::optional from_json(const nlohmann::json & valu return std::nullopt; } } - template <> inline std::optional from_json(const nlohmann::json & value) { @@ -2094,7 +2134,6 @@ inline std::optional from_json(const nlohmann::json & return std::nullopt; } } - template <> inline std::optional from_json(const nlohmann::json & value) { @@ -2116,7 +2155,6 @@ inline std::optional from_json(const nlohmann::json return std::nullopt; } } - template <> inline std::optional from_json(const nlohmann::json & value) { @@ -2143,7 +2181,6 @@ inline std::optional from_json(const nlohmann::json return std::nullopt; } } - template <> inline std::optional from_json(const nlohmann::json & value) { @@ -2164,7 +2201,6 @@ inline std::optional from_json(const nlohmann::json & value) return std::nullopt; } } - template <> inline std::optional from_json(const nlohmann::json & value) { @@ -2184,7 +2220,6 @@ inline std::optional from_json(const nlohmann::json & va return std::nullopt; } } - template <> inline std::optional from_json(const nlohmann::json & value) { @@ -2211,7 +2246,6 @@ inline std::optional from_json(const nlohmann::json & valu return std::nullopt; } } - template <> inline std::optional from_json(const nlohmann::json & value) { @@ -2243,7 +2277,6 @@ inline std::optional from_json(const nlohm return std::nullopt; } } - template <> inline std::optional from_json(const nlohmann::json & value) { @@ -2267,7 +2300,6 @@ inline std::optional from_json(const nlo return std::nullopt; } } - template <> inline std::optional from_json(const nlohmann::json & value) { @@ -2288,7 +2320,6 @@ inline std::optional from_json(const nlohman return std::nullopt; } } - template <> inline std::optional from_json(const nlohmann::json & value) { @@ -2309,7 +2340,6 @@ inline std::optional from_json(const nlohmann::jso return std::nullopt; } } - template <> inline std::optional from_json(const nlohmann::json & value) { @@ -2332,29 +2362,34 @@ inline std::optional from_json(const nlohmann::json return std::nullopt; } } - // // template<> inline nlohmann::json to_json(const chip::BitFlags& value) { // return "{\"no bitmap support\"}"; //} +// // template<> inline nlohmann::json to_json(const chip::BitFlags& value) { -// return "{\"no bitmap support\"}"; -// } +// return "{\"no bitmap support\"}"; +//} +// // template<> inline nlohmann::json to_json(const chip::BitFlags& value) { -// return "{\"no bitmap support\"}"; -// } +// return "{\"no bitmap support\"}"; +//} +// // template<> inline nlohmann::json to_json(const chip::BitFlags& value) { -// return "{\"no bitmap support\"}"; -// } +// return "{\"no bitmap support\"}"; +//} +// // template<> inline nlohmann::json to_json(const chip::BitFlags& value) { -// return "{\"no bitmap support\"}"; -// } +// return "{\"no bitmap support\"}"; +//} -/***************************** Struct Convertes **************/ +// + +/***************************** Struct Converters **************/ // template <> @@ -2398,7 +2433,6 @@ inline std::optional from_json(const nlohmann::j return std::nullopt; } } - template <> inline std::optional from_json(const nlohmann::json & value) { @@ -2426,9 +2460,9 @@ inline std::optional from_json(const nlohmann::json & valu return std::nullopt; } } - // -/***************************** Struct Convertes **************/ + +/***************************** Struct Converters **************/ // // @@ -2436,7 +2470,9 @@ inline std::optional from_json(const nlohmann::json & valu // return "{\"no bitmap support\"}"; //} -/***************************** Struct Convertes **************/ +// + +/***************************** Struct Converters **************/ // template <> @@ -2461,7 +2497,6 @@ inline std::optional from_json(con return std::nullopt; } } - template <> inline std::optional from_json(const nlohmann::json & value) { @@ -2482,21 +2517,24 @@ inline std::optional from_json(c return std::nullopt; } } - // // template<> inline nlohmann::json to_json(const chip::BitFlags& value) { // return "{\"no bitmap support\"}"; //} +// // template<> inline nlohmann::json to_json(const chip::BitFlags& value) { -// return "{\"no bitmap support\"}"; -// } +// return "{\"no bitmap support\"}"; +//} +// // template<> inline nlohmann::json to_json(const chip::BitFlags& value) { -// return "{\"no bitmap support\"}"; -// } +// return "{\"no bitmap support\"}"; +//} + +// -/***************************** Struct Convertes **************/ +/***************************** Struct Converters **************/ // // template<> inline nlohmann::json to_json(const Thermostat::Structs::ThermostatScheduleTransition::Type& value) { // return "no struct support"; @@ -2523,7 +2561,6 @@ inline std::optional from_json(const nlohmann::j return std::nullopt; } } - template <> inline std::optional from_json(const nlohmann::json & value) { @@ -2546,7 +2583,6 @@ inline std::optional from_json(const nloh return std::nullopt; } } - template <> inline std::optional from_json(const nlohmann::json & value) { @@ -2566,7 +2602,6 @@ inline std::optional from_json(const nlohmann return std::nullopt; } } - template <> inline std::optional from_json(const nlohmann::json & value) { @@ -2590,25 +2625,29 @@ inline std::optional from_json(const nlohmann: return std::nullopt; } } - // // template<> inline nlohmann::json to_json(const chip::BitFlags& value) { // return "{\"no bitmap support\"}"; //} +// // template<> inline nlohmann::json to_json(const chip::BitFlags& value) { -// return "{\"no bitmap support\"}"; -// } +// return "{\"no bitmap support\"}"; +//} +// // template<> inline nlohmann::json to_json(const chip::BitFlags& value) { -// return "{\"no bitmap support\"}"; -// } +// return "{\"no bitmap support\"}"; +//} +// // template<> inline nlohmann::json to_json(const chip::BitFlags& value) { -// return "{\"no bitmap support\"}"; -// } +// return "{\"no bitmap support\"}"; +//} + +// -/***************************** Struct Convertes **************/ +/***************************** Struct Converters **************/ // template <> @@ -2633,7 +2672,6 @@ inline std::optional from_json(const nlohmann:: return std::nullopt; } } - template <> inline std::optional from_json(const nlohmann::json & value) { @@ -2654,9 +2692,9 @@ inline std::optional from_json(const nlohmann::json & v return std::nullopt; } } - // -/***************************** Struct Convertes **************/ + +/***************************** Struct Converters **************/ // // @@ -2664,15 +2702,19 @@ inline std::optional from_json(const nlohmann::json & v // return "{\"no bitmap support\"}"; //} +// // template<> inline nlohmann::json to_json(const chip::BitFlags& value) { -// return "{\"no bitmap support\"}"; -// } +// return "{\"no bitmap support\"}"; +//} +// // template<> inline nlohmann::json to_json(const chip::BitFlags& value) { -// return "{\"no bitmap support\"}"; -// } +// return "{\"no bitmap support\"}"; +//} + +// -/***************************** Struct Convertes **************/ +/***************************** Struct Converters **************/ // template <> @@ -2694,7 +2736,6 @@ inline std::optional from_json(const nlohmann::js return std::nullopt; } } - template <> inline std::optional from_json(const nlohmann::json & value) { @@ -2713,7 +2754,6 @@ inline std::optional from_json(const nlohmann: return std::nullopt; } } - template <> inline std::optional from_json(const nlohmann::json & value) { @@ -2733,7 +2773,6 @@ inline std::optional from_json(const nlohmann::json & v return std::nullopt; } } - template <> inline std::optional from_json(const nlohmann::json & value) { @@ -2754,7 +2793,6 @@ inline std::optional from_json(const nlohmann::json return std::nullopt; } } - template <> inline std::optional from_json(const nlohmann::json & value) { @@ -2774,7 +2812,6 @@ inline std::optional from_json(const nlohmann::json & return std::nullopt; } } - template <> inline std::optional from_json(const nlohmann::json & value) { @@ -2793,7 +2830,6 @@ inline std::optional from_json(const nlohmann::json & return std::nullopt; } } - template <> inline std::optional from_json(const nlohmann::json & value) { @@ -2813,7 +2849,6 @@ inline std::optional from_json(const nlohmann: return std::nullopt; } } - template <> inline std::optional from_json(const nlohmann::json & value) { @@ -2832,13 +2867,14 @@ inline std::optional from_json(const nlohmann: return std::nullopt; } } - // -/***************************** Struct Convertes **************/ + +/***************************** Struct Converters **************/ // // -/***************************** Struct Convertes **************/ + +/***************************** Struct Converters **************/ // template <> @@ -2859,9 +2895,9 @@ inline std::optional from_json(const nl return std::nullopt; } } - // -/***************************** Struct Convertes **************/ + +/***************************** Struct Converters **************/ // // @@ -2869,23 +2905,29 @@ inline std::optional from_json(const nl // return "{\"no bitmap support\"}"; //} -/***************************** Struct Convertes **************/ +// + +/***************************** Struct Converters **************/ // // -/***************************** Struct Convertes **************/ + +/***************************** Struct Converters **************/ // // -/***************************** Struct Convertes **************/ + +/***************************** Struct Converters **************/ // // -/***************************** Struct Convertes **************/ + +/***************************** Struct Converters **************/ // // -/***************************** Struct Convertes **************/ + +/***************************** Struct Converters **************/ // // @@ -2893,7 +2935,9 @@ inline std::optional from_json(const nl // return "{\"no bitmap support\"}"; //} -/***************************** Struct Convertes **************/ +// + +/***************************** Struct Converters **************/ // // template<> inline nlohmann::json to_json(const Channel::Structs::ChannelInfo::Type& value) { // return "no struct support"; @@ -2925,7 +2969,6 @@ inline std::optional from_json(const nlohmann::json return std::nullopt; } } - template <> inline std::optional from_json(const nlohmann::json & value) { @@ -2943,9 +2986,9 @@ inline std::optional from_json(const nlohmann::json return std::nullopt; } } - // -/***************************** Struct Convertes **************/ + +/***************************** Struct Converters **************/ // // template<> inline nlohmann::json to_json(const TargetNavigator::Structs::TargetInfo::Type& value) { // return "no struct support"; @@ -2972,13 +3015,14 @@ inline std::optional from_json(const return std::nullopt; } } - // // template<> inline nlohmann::json to_json(const chip::BitFlags& value) { // return "{\"no bitmap support\"}"; //} -/***************************** Struct Convertes **************/ +// + +/***************************** Struct Converters **************/ // // template<> inline nlohmann::json to_json(const MediaPlayback::Structs::PlaybackPosition::Type& value) { // return "no struct support"; @@ -3008,7 +3052,6 @@ inline std::optional from_json(const nlo return std::nullopt; } } - template <> inline std::optional from_json(const nlohmann::json & value) { @@ -3029,13 +3072,14 @@ inline std::optional from_json(const nlohmann: return std::nullopt; } } - // // template<> inline nlohmann::json to_json(const chip::BitFlags& value) { // return "{\"no bitmap support\"}"; //} -/***************************** Struct Convertes **************/ +// + +/***************************** Struct Converters **************/ // // template<> inline nlohmann::json to_json(const MediaInput::Structs::InputInfo::Type& value) { // return "no struct support"; @@ -3065,9 +3109,9 @@ inline std::optional from_json(const nlohmann::json & return std::nullopt; } } - // -/***************************** Struct Convertes **************/ + +/***************************** Struct Converters **************/ // // @@ -3075,7 +3119,9 @@ inline std::optional from_json(const nlohmann::json & // return "{\"no bitmap support\"}"; //} -/***************************** Struct Convertes **************/ +// + +/***************************** Struct Converters **************/ // template <> @@ -3180,7 +3226,6 @@ inline std::optional from_json(const nlohmann::json & v return std::nullopt; } } - template <> inline std::optional from_json(const nlohmann::json & value) { @@ -3200,17 +3245,19 @@ inline std::optional from_json(const nlohman return std::nullopt; } } - // // template<> inline nlohmann::json to_json(const chip::BitFlags& value) { // return "{\"no bitmap support\"}"; //} +// // template<> inline nlohmann::json to_json(const chip::BitFlags& value) { -// return "{\"no bitmap support\"}"; -// } +// return "{\"no bitmap support\"}"; +//} + +// -/***************************** Struct Convertes **************/ +/***************************** Struct Converters **************/ // // template<> inline nlohmann::json to_json(const ContentLauncher::Structs::Dimension::Type& value) { // return "no struct support"; @@ -3262,7 +3309,6 @@ inline std::optional from_json(const n return std::nullopt; } } - template <> inline std::optional from_json(const nlohmann::json & value) { @@ -3281,7 +3327,6 @@ inline std::optional from_json(const nlohmann:: return std::nullopt; } } - template <> inline std::optional from_json(const nlohmann::json & value) { @@ -3311,13 +3356,14 @@ inline std::optional from_json(const nlohmann::j return std::nullopt; } } - // // template<> inline nlohmann::json to_json(const chip::BitFlags& value) { // return "{\"no bitmap support\"}"; //} -/***************************** Struct Convertes **************/ +// + +/***************************** Struct Converters **************/ // // template<> inline nlohmann::json to_json(const AudioOutput::Structs::OutputInfo::Type& value) { // return "no struct support"; @@ -3344,13 +3390,14 @@ inline std::optional from_json(const nlohmann::json return std::nullopt; } } - // // template<> inline nlohmann::json to_json(const chip::BitFlags& value) { // return "{\"no bitmap support\"}"; //} -/***************************** Struct Convertes **************/ +// + +/***************************** Struct Converters **************/ // // template<> inline nlohmann::json to_json(const ApplicationLauncher::Structs::Application::Type& value) { // return "no struct support"; @@ -3382,9 +3429,9 @@ inline std::optional from_js return std::nullopt; } } - // -/***************************** Struct Convertes **************/ + +/***************************** Struct Converters **************/ // // template<> inline nlohmann::json to_json(const ApplicationBasic::Structs::ApplicationBasicApplication::Type& value) { // return "no struct support"; @@ -3412,13 +3459,14 @@ inline std::optional from_json(const nl return std::nullopt; } } - // -/***************************** Struct Convertes **************/ + +/***************************** Struct Converters **************/ // // -/***************************** Struct Convertes **************/ + +/***************************** Struct Converters **************/ // // @@ -3426,23 +3474,29 @@ inline std::optional from_json(const nl // return "{\"no bitmap support\"}"; //} +// // template<> inline nlohmann::json to_json(const chip::BitFlags& value) { -// return "{\"no bitmap support\"}"; -// } +// return "{\"no bitmap support\"}"; +//} +// // template<> inline nlohmann::json to_json(const chip::BitFlags& value) { -// return "{\"no bitmap support\"}"; -// } +// return "{\"no bitmap support\"}"; +//} +// // template<> inline nlohmann::json to_json(const chip::BitFlags& value) { -// return "{\"no bitmap support\"}"; -// } +// return "{\"no bitmap support\"}"; +//} +// // template<> inline nlohmann::json to_json(const chip::BitFlags& value) { -// return "{\"no bitmap support\"}"; -// } +// return "{\"no bitmap support\"}"; +//} + +// -/***************************** Struct Convertes **************/ +/***************************** Struct Converters **************/ // // template<> inline nlohmann::json to_json(const TestCluster::Structs::SimpleStruct::Type& value) { // return "no struct support"; @@ -3500,9 +3554,9 @@ inline std::optional from_json(const nlohmann::json & v return std::nullopt; } } - // -/***************************** Struct Convertes **************/ + +/***************************** Struct Converters **************/ // template <> @@ -3524,3 +3578,2518 @@ inline std::optional from_json(const nlohmann::json & return std::nullopt; } } + +// ZCL global enums +template <> +inline std::optional from_json(const nlohmann::json & value) +{ + const std::map table = { + { "CurrentHueAndCurrentSaturation", ZCL_COLOR_MODE_CURRENT_HUE_AND_CURRENT_SATURATION }, + { "CurrentXAndCurrentY", ZCL_COLOR_MODE_CURRENT_X_AND_CURRENT_Y }, + { "ColorTemperature", ZCL_COLOR_MODE_COLOR_TEMPERATURE }, + }; + + auto i = table.find(value); + if (i != table.end()) + { + return i->second; + } + else + { + return std::nullopt; + } +} +template <> +inline std::optional from_json(const nlohmann::json & value) +{ + const std::map table = { + { "CurrentHueAndCurrentSaturation", ZCL_ENHANCED_COLOR_MODE_CURRENT_HUE_AND_CURRENT_SATURATION }, + { "CurrentXAndCurrentY", ZCL_ENHANCED_COLOR_MODE_CURRENT_X_AND_CURRENT_Y }, + { "ColorTemperature", ZCL_ENHANCED_COLOR_MODE_COLOR_TEMPERATURE }, + { "EnhancedCurrentHueAndCurrentSaturation", ZCL_ENHANCED_COLOR_MODE_ENHANCED_CURRENT_HUE_AND_CURRENT_SATURATION }, + }; + + auto i = table.find(value); + if (i != table.end()) + { + return i->second; + } + else + { + return std::nullopt; + } +} +// Because some bitmaps are defined as in Matter xml files, this handles translating bitmaps for them. +// TODO: Check if is enum instead of LevelControlOptions +std::optional from_json_LevelControlOptions(const nlohmann::json & value) +{ + uint8_t bitmap_value = 0x00; + try + { + if (value["ExecuteIfOff"].get()) + { + bitmap_value |= ZCL_BITMAP_LEVEL_CONTROL_OPTIONS_EXECUTE_IF_OFF; + } + if (value["CoupleColorTempToLevel"].get()) + { + bitmap_value |= ZCL_BITMAP_LEVEL_CONTROL_OPTIONS_COUPLE_COLOR_TEMP_TO_LEVEL; + } + return bitmap_value; + } catch (const nlohmann::json::exception & e) + { + sl_log_warning(LOG_TAG, "Failed to parse bitmap %s, error %s", value.dump().c_str(), e.what()); + return std::nullopt; + } +} +template <> +inline std::optional from_json(const nlohmann::json & value) +{ + const std::map table = { + { "PIR", ZCL_OCCUPANCY_SENSOR_TYPE_PIR }, + { "Ultrasonic", ZCL_OCCUPANCY_SENSOR_TYPE_ULTRASONIC }, + { "pirAndUltrasonic", ZCL_OCCUPANCY_SENSOR_TYPE_PIR_AND_ULTRASONIC }, + { "physicalContact", ZCL_OCCUPANCY_SENSOR_TYPE_PHYSICAL_CONTACT }, + }; + + auto i = table.find(value); + if (i != table.end()) + { + return i->second; + } + else + { + return std::nullopt; + } +} + +std::optional from_json_AlarmMask(const nlohmann::json & value) +{ + uint8_t bitmap_value = 0x00; + try + { + if (value["GeneralHwFault"].get()) + { + bitmap_value |= ZCL_BITMAP_ALARM_MASK_GENERAL_HW_FAULT; + } + if (value["GeneralSwFault"].get()) + { + bitmap_value |= ZCL_BITMAP_ALARM_MASK_GENERAL_SW_FAULT; + } + return bitmap_value; + } catch (const nlohmann::json::exception & e) + { + sl_log_warning(LOG_TAG, "Failed to parse bitmap %s, error %s", value.dump().c_str(), e.what()); + return std::nullopt; + } +} + +std::optional from_json_ApplicationLauncherFeature(const nlohmann::json & value) +{ + uint32_t bitmap_value = 0x00; + try + { + if (value["ApplicationPlatform"].get()) + { + bitmap_value |= ZCL_BITMAP_APPLICATION_LAUNCHER_FEATURE_APPLICATION_PLATFORM; + } + return bitmap_value; + } catch (const nlohmann::json::exception & e) + { + sl_log_warning(LOG_TAG, "Failed to parse bitmap %s, error %s", value.dump().c_str(), e.what()); + return std::nullopt; + } +} + +std::optional from_json_AudioOutputFeature(const nlohmann::json & value) +{ + uint32_t bitmap_value = 0x00; + try + { + if (value["NameUpdates"].get()) + { + bitmap_value |= ZCL_BITMAP_AUDIO_OUTPUT_FEATURE_NAME_UPDATES; + } + return bitmap_value; + } catch (const nlohmann::json::exception & e) + { + sl_log_warning(LOG_TAG, "Failed to parse bitmap %s, error %s", value.dump().c_str(), e.what()); + return std::nullopt; + } +} + +std::optional from_json_BallastStatus(const nlohmann::json & value) +{ + uint8_t bitmap_value = 0x00; + try + { + if (value["NonOperational"].get()) + { + bitmap_value |= ZCL_BITMAP_BALLAST_STATUS_NON_OPERATIONAL; + } + if (value["LampNotInSocket"].get()) + { + bitmap_value |= ZCL_BITMAP_BALLAST_STATUS_LAMP_NOT_IN_SOCKET; + } + return bitmap_value; + } catch (const nlohmann::json::exception & e) + { + sl_log_warning(LOG_TAG, "Failed to parse bitmap %s, error %s", value.dump().c_str(), e.what()); + return std::nullopt; + } +} + +std::optional from_json_BarrierControlCapabilities(const nlohmann::json & value) +{ + uint8_t bitmap_value = 0x00; + try + { + if (value["PartialBarrier"].get()) + { + bitmap_value |= ZCL_BITMAP_BARRIER_CONTROL_CAPABILITIES_PARTIAL_BARRIER; + } + return bitmap_value; + } catch (const nlohmann::json::exception & e) + { + sl_log_warning(LOG_TAG, "Failed to parse bitmap %s, error %s", value.dump().c_str(), e.what()); + return std::nullopt; + } +} + +std::optional from_json_BarrierControlSafetyStatus(const nlohmann::json & value) +{ + uint16_t bitmap_value = 0x00; + try + { + if (value["RemoteLockout"].get()) + { + bitmap_value |= ZCL_BITMAP_BARRIER_CONTROL_SAFETY_STATUS_REMOTE_LOCKOUT; + } + if (value["TemperDetected"].get()) + { + bitmap_value |= ZCL_BITMAP_BARRIER_CONTROL_SAFETY_STATUS_TEMPER_DETECTED; + } + if (value["FailedCommunication"].get()) + { + bitmap_value |= ZCL_BITMAP_BARRIER_CONTROL_SAFETY_STATUS_FAILED_COMMUNICATION; + } + if (value["PositionFailure"].get()) + { + bitmap_value |= ZCL_BITMAP_BARRIER_CONTROL_SAFETY_STATUS_POSITION_FAILURE; + } + return bitmap_value; + } catch (const nlohmann::json::exception & e) + { + sl_log_warning(LOG_TAG, "Failed to parse bitmap %s, error %s", value.dump().c_str(), e.what()); + return std::nullopt; + } +} + +std::optional from_json_BatteryAlarmMask(const nlohmann::json & value) +{ + uint8_t bitmap_value = 0x00; + try + { + if (value["VoltageTooLow"].get()) + { + bitmap_value |= ZCL_BITMAP_BATTERY_ALARM_MASK_VOLTAGE_TOO_LOW; + } + return bitmap_value; + } catch (const nlohmann::json::exception & e) + { + sl_log_warning(LOG_TAG, "Failed to parse bitmap %s, error %s", value.dump().c_str(), e.what()); + return std::nullopt; + } +} + +std::optional from_json_Bitmap16MaskMap(const nlohmann::json & value) +{ + uint16_t bitmap_value = 0x00; + try + { + if (value["MaskVal1"].get()) + { + bitmap_value |= ZCL_BITMAP_BITMAP16_MASK_MAP_MASK_VAL1; + } + if (value["MaskVal2"].get()) + { + bitmap_value |= ZCL_BITMAP_BITMAP16_MASK_MAP_MASK_VAL2; + } + if (value["MaskVal3"].get()) + { + bitmap_value |= ZCL_BITMAP_BITMAP16_MASK_MAP_MASK_VAL3; + } + if (value["MaskVal4"].get()) + { + bitmap_value |= ZCL_BITMAP_BITMAP16_MASK_MAP_MASK_VAL4; + } + return bitmap_value; + } catch (const nlohmann::json::exception & e) + { + sl_log_warning(LOG_TAG, "Failed to parse bitmap %s, error %s", value.dump().c_str(), e.what()); + return std::nullopt; + } +} + +std::optional from_json_Bitmap32MaskMap(const nlohmann::json & value) +{ + uint32_t bitmap_value = 0x00; + try + { + if (value["MaskVal1"].get()) + { + bitmap_value |= ZCL_BITMAP_BITMAP32_MASK_MAP_MASK_VAL1; + } + if (value["MaskVal2"].get()) + { + bitmap_value |= ZCL_BITMAP_BITMAP32_MASK_MAP_MASK_VAL2; + } + if (value["MaskVal3"].get()) + { + bitmap_value |= ZCL_BITMAP_BITMAP32_MASK_MAP_MASK_VAL3; + } + if (value["MaskVal4"].get()) + { + bitmap_value |= ZCL_BITMAP_BITMAP32_MASK_MAP_MASK_VAL4; + } + return bitmap_value; + } catch (const nlohmann::json::exception & e) + { + sl_log_warning(LOG_TAG, "Failed to parse bitmap %s, error %s", value.dump().c_str(), e.what()); + return std::nullopt; + } +} + +std::optional from_json_Bitmap64MaskMap(const nlohmann::json & value) +{ + uint64_t bitmap_value = 0x00; + try + { + if (value["MaskVal1"].get()) + { + bitmap_value |= ZCL_BITMAP_BITMAP64_MASK_MAP_MASK_VAL1; + } + if (value["MaskVal2"].get()) + { + bitmap_value |= ZCL_BITMAP_BITMAP64_MASK_MAP_MASK_VAL2; + } + if (value["MaskVal3"].get()) + { + bitmap_value |= ZCL_BITMAP_BITMAP64_MASK_MAP_MASK_VAL3; + } + if (value["MaskVal4"].get()) + { + bitmap_value |= ZCL_BITMAP_BITMAP64_MASK_MAP_MASK_VAL4; + } + return bitmap_value; + } catch (const nlohmann::json::exception & e) + { + sl_log_warning(LOG_TAG, "Failed to parse bitmap %s, error %s", value.dump().c_str(), e.what()); + return std::nullopt; + } +} + +std::optional from_json_Bitmap8MaskMap(const nlohmann::json & value) +{ + uint8_t bitmap_value = 0x00; + try + { + if (value["MaskVal1"].get()) + { + bitmap_value |= ZCL_BITMAP_BITMAP8_MASK_MAP_MASK_VAL1; + } + if (value["MaskVal2"].get()) + { + bitmap_value |= ZCL_BITMAP_BITMAP8_MASK_MAP_MASK_VAL2; + } + if (value["MaskVal3"].get()) + { + bitmap_value |= ZCL_BITMAP_BITMAP8_MASK_MAP_MASK_VAL3; + } + if (value["MaskVal4"].get()) + { + bitmap_value |= ZCL_BITMAP_BITMAP8_MASK_MAP_MASK_VAL4; + } + return bitmap_value; + } catch (const nlohmann::json::exception & e) + { + sl_log_warning(LOG_TAG, "Failed to parse bitmap %s, error %s", value.dump().c_str(), e.what()); + return std::nullopt; + } +} + +std::optional from_json_ChannelFeature(const nlohmann::json & value) +{ + uint32_t bitmap_value = 0x00; + try + { + if (value["ChannelList"].get()) + { + bitmap_value |= ZCL_BITMAP_CHANNEL_FEATURE_CHANNEL_LIST; + } + if (value["LineupInfo"].get()) + { + bitmap_value |= ZCL_BITMAP_CHANNEL_FEATURE_LINEUP_INFO; + } + return bitmap_value; + } catch (const nlohmann::json::exception & e) + { + sl_log_warning(LOG_TAG, "Failed to parse bitmap %s, error %s", value.dump().c_str(), e.what()); + return std::nullopt; + } +} + +std::optional from_json_ColorCapabilities(const nlohmann::json & value) +{ + uint16_t bitmap_value = 0x00; + try + { + if (value["HueSaturationSupported"].get()) + { + bitmap_value |= ZCL_BITMAP_COLOR_CAPABILITIES_HUE_SATURATION_SUPPORTED; + } + if (value["EnhancedHueSupported"].get()) + { + bitmap_value |= ZCL_BITMAP_COLOR_CAPABILITIES_ENHANCED_HUE_SUPPORTED; + } + if (value["ColorLoopSupported"].get()) + { + bitmap_value |= ZCL_BITMAP_COLOR_CAPABILITIES_COLOR_LOOP_SUPPORTED; + } + if (value["XYSupported"].get()) + { + bitmap_value |= ZCL_BITMAP_COLOR_CAPABILITIES_XY_ATTRIBUTES_SUPPORTED; + } + if (value["ColorTemperatureSupported"].get()) + { + bitmap_value |= ZCL_BITMAP_COLOR_CAPABILITIES_COLOR_TEMPERATURE_SUPPORTED; + } + return bitmap_value; + } catch (const nlohmann::json::exception & e) + { + sl_log_warning(LOG_TAG, "Failed to parse bitmap %s, error %s", value.dump().c_str(), e.what()); + return std::nullopt; + } +} + +std::optional from_json_ColorControlFeature(const nlohmann::json & value) +{ + uint32_t bitmap_value = 0x00; + try + { + if (value["HueAndSaturation"].get()) + { + bitmap_value |= ZCL_BITMAP_COLOR_CONTROL_FEATURE_HUE_AND_SATURATION; + } + if (value["EnhancedHue"].get()) + { + bitmap_value |= ZCL_BITMAP_COLOR_CONTROL_FEATURE_ENHANCED_HUE; + } + if (value["ColorLoop"].get()) + { + bitmap_value |= ZCL_BITMAP_COLOR_CONTROL_FEATURE_COLOR_LOOP; + } + if (value["Xy"].get()) + { + bitmap_value |= ZCL_BITMAP_COLOR_CONTROL_FEATURE_XY; + } + if (value["ColorTemperatureMireds"].get()) + { + bitmap_value |= ZCL_BITMAP_COLOR_CONTROL_FEATURE_COLOR_TEMPERATURE; + } + return bitmap_value; + } catch (const nlohmann::json::exception & e) + { + sl_log_warning(LOG_TAG, "Failed to parse bitmap %s, error %s", value.dump().c_str(), e.what()); + return std::nullopt; + } +} + +std::optional from_json_ColorLoopUpdateFlags(const nlohmann::json & value) +{ + uint8_t bitmap_value = 0x00; + try + { + if (value["UpdateAction"].get()) + { + bitmap_value |= ZCL_BITMAP_COLOR_LOOP_UPDATE_FLAGS_UPDATE_ACTION; + } + if (value["UpdateDirection"].get()) + { + bitmap_value |= ZCL_BITMAP_COLOR_LOOP_UPDATE_FLAGS_UPDATE_DIRECTION; + } + if (value["UpdateTime"].get()) + { + bitmap_value |= ZCL_BITMAP_COLOR_LOOP_UPDATE_FLAGS_UPDATE_TIME; + } + if (value["UpdateStartHue"].get()) + { + bitmap_value |= ZCL_BITMAP_COLOR_LOOP_UPDATE_FLAGS_UPDATE_START_HUE; + } + return bitmap_value; + } catch (const nlohmann::json::exception & e) + { + sl_log_warning(LOG_TAG, "Failed to parse bitmap %s, error %s", value.dump().c_str(), e.what()); + return std::nullopt; + } +} + +std::optional from_json_CommandBits(const nlohmann::json & value) +{ + uint16_t bitmap_value = 0x00; + try + { + if (value["InstantAction"].get()) + { + bitmap_value |= ZCL_BITMAP_COMMAND_BITS_INSTANT_ACTION; + } + if (value["InstantActionWithTransition"].get()) + { + bitmap_value |= ZCL_BITMAP_COMMAND_BITS_INSTANT_ACTION_WITH_TRANSITION; + } + if (value["StartAction"].get()) + { + bitmap_value |= ZCL_BITMAP_COMMAND_BITS_START_ACTION; + } + if (value["StartActionWithDuration"].get()) + { + bitmap_value |= ZCL_BITMAP_COMMAND_BITS_START_ACTION_WITH_DURATION; + } + if (value["StopAction"].get()) + { + bitmap_value |= ZCL_BITMAP_COMMAND_BITS_STOP_ACTION; + } + if (value["PauseAction"].get()) + { + bitmap_value |= ZCL_BITMAP_COMMAND_BITS_PAUSE_ACTION; + } + if (value["PauseActionWithDuration"].get()) + { + bitmap_value |= ZCL_BITMAP_COMMAND_BITS_PAUSE_ACTION_WITH_DURATION; + } + if (value["ResumeAction"].get()) + { + bitmap_value |= ZCL_BITMAP_COMMAND_BITS_RESUME_ACTION; + } + if (value["EnableAction"].get()) + { + bitmap_value |= ZCL_BITMAP_COMMAND_BITS_ENABLE_ACTION; + } + if (value["EnableActionWithDuration"].get()) + { + bitmap_value |= ZCL_BITMAP_COMMAND_BITS_ENABLE_ACTION_WITH_DURATION; + } + if (value["DisableAction"].get()) + { + bitmap_value |= ZCL_BITMAP_COMMAND_BITS_DISABLE_ACTION; + } + if (value["DisableActionWithDuration"].get()) + { + bitmap_value |= ZCL_BITMAP_COMMAND_BITS_DISABLE_ACTION_WITH_DURATION; + } + return bitmap_value; + } catch (const nlohmann::json::exception & e) + { + sl_log_warning(LOG_TAG, "Failed to parse bitmap %s, error %s", value.dump().c_str(), e.what()); + return std::nullopt; + } +} + +std::optional from_json_ConfigStatus(const nlohmann::json & value) +{ + uint8_t bitmap_value = 0x00; + try + { + if (value["Operational"].get()) + { + bitmap_value |= ZCL_BITMAP_CONFIG_STATUS_OPERATIONAL; + } + if (value["OnlineReserved"].get()) + { + bitmap_value |= ZCL_BITMAP_CONFIG_STATUS_ONLINE_RESERVED; + } + if (value["LiftMovementReversed"].get()) + { + bitmap_value |= ZCL_BITMAP_CONFIG_STATUS_LIFT_MOVEMENT_REVERSED; + } + if (value["LiftPositionAware"].get()) + { + bitmap_value |= ZCL_BITMAP_CONFIG_STATUS_LIFT_POSITION_AWARE; + } + if (value["TiltPositionAware"].get()) + { + bitmap_value |= ZCL_BITMAP_CONFIG_STATUS_TILT_POSITION_AWARE; + } + if (value["LiftEncoderControlled"].get()) + { + bitmap_value |= ZCL_BITMAP_CONFIG_STATUS_LIFT_ENCODER_CONTROLLED; + } + if (value["TiltEncoderControlled"].get()) + { + bitmap_value |= ZCL_BITMAP_CONFIG_STATUS_TILT_ENCODER_CONTROLLED; + } + return bitmap_value; + } catch (const nlohmann::json::exception & e) + { + sl_log_warning(LOG_TAG, "Failed to parse bitmap %s, error %s", value.dump().c_str(), e.what()); + return std::nullopt; + } +} + +std::optional from_json_ContentLauncherFeature(const nlohmann::json & value) +{ + uint32_t bitmap_value = 0x00; + try + { + if (value["ContentSearch"].get()) + { + bitmap_value |= ZCL_BITMAP_CONTENT_LAUNCHER_FEATURE_CONTENT_SEARCH; + } + if (value["URLPlayback"].get()) + { + bitmap_value |= ZCL_BITMAP_CONTENT_LAUNCHER_FEATURE_URL_PLAYBACK; + } + return bitmap_value; + } catch (const nlohmann::json::exception & e) + { + sl_log_warning(LOG_TAG, "Failed to parse bitmap %s, error %s", value.dump().c_str(), e.what()); + return std::nullopt; + } +} + +std::optional from_json_DayOfWeek(const nlohmann::json & value) +{ + uint8_t bitmap_value = 0x00; + try + { + if (value["Sunday"].get()) + { + bitmap_value |= ZCL_BITMAP_DAY_OF_WEEK_SUNDAY; + } + if (value["Monday"].get()) + { + bitmap_value |= ZCL_BITMAP_DAY_OF_WEEK_MONDAY; + } + if (value["Tuesday"].get()) + { + bitmap_value |= ZCL_BITMAP_DAY_OF_WEEK_TUESDAY; + } + if (value["Wednesday"].get()) + { + bitmap_value |= ZCL_BITMAP_DAY_OF_WEEK_WEDNESDAY; + } + if (value["Thursday"].get()) + { + bitmap_value |= ZCL_BITMAP_DAY_OF_WEEK_THURSDAY; + } + if (value["Friday"].get()) + { + bitmap_value |= ZCL_BITMAP_DAY_OF_WEEK_FRIDAY; + } + if (value["Saturday"].get()) + { + bitmap_value |= ZCL_BITMAP_DAY_OF_WEEK_SATURDAY; + } + if (value["AwayOrVacation"].get()) + { + bitmap_value |= ZCL_BITMAP_DAY_OF_WEEK_AWAY_OR_VACATION; + } + return bitmap_value; + } catch (const nlohmann::json::exception & e) + { + sl_log_warning(LOG_TAG, "Failed to parse bitmap %s, error %s", value.dump().c_str(), e.what()); + return std::nullopt; + } +} + +std::optional from_json_DeviceTempAlarmMask(const nlohmann::json & value) +{ + uint8_t bitmap_value = 0x00; + try + { + if (value["TooLow"].get()) + { + bitmap_value |= ZCL_BITMAP_DEVICE_TEMP_ALARM_MASK_TOO_LOW; + } + if (value["TooHigh"].get()) + { + bitmap_value |= ZCL_BITMAP_DEVICE_TEMP_ALARM_MASK_TOO_HIGH; + } + return bitmap_value; + } catch (const nlohmann::json::exception & e) + { + sl_log_warning(LOG_TAG, "Failed to parse bitmap %s, error %s", value.dump().c_str(), e.what()); + return std::nullopt; + } +} + +std::optional from_json_DlCredentialRuleMask(const nlohmann::json & value) +{ + uint8_t bitmap_value = 0x00; + try + { + if (value["Single"].get()) + { + bitmap_value |= ZCL_BITMAP_DL_CREDENTIAL_RULE_MASK_SINGLE; + } + if (value["Dual"].get()) + { + bitmap_value |= ZCL_BITMAP_DL_CREDENTIAL_RULE_MASK_DUAL; + } + if (value["Tri"].get()) + { + bitmap_value |= ZCL_BITMAP_DL_CREDENTIAL_RULE_MASK_TRI; + } + return bitmap_value; + } catch (const nlohmann::json::exception & e) + { + sl_log_warning(LOG_TAG, "Failed to parse bitmap %s, error %s", value.dump().c_str(), e.what()); + return std::nullopt; + } +} + +std::optional from_json_DlCredentialRulesSupport(const nlohmann::json & value) +{ + uint8_t bitmap_value = 0x00; + try + { + if (value["Single"].get()) + { + bitmap_value |= ZCL_BITMAP_DL_CREDENTIAL_RULES_SUPPORT_SINGLE; + } + if (value["Dual"].get()) + { + bitmap_value |= ZCL_BITMAP_DL_CREDENTIAL_RULES_SUPPORT_DUAL; + } + if (value["Tri"].get()) + { + bitmap_value |= ZCL_BITMAP_DL_CREDENTIAL_RULES_SUPPORT_TRI; + } + return bitmap_value; + } catch (const nlohmann::json::exception & e) + { + sl_log_warning(LOG_TAG, "Failed to parse bitmap %s, error %s", value.dump().c_str(), e.what()); + return std::nullopt; + } +} + +std::optional from_json_DlDaysMaskMap(const nlohmann::json & value) +{ + uint8_t bitmap_value = 0x00; + try + { + if (value["Sunday"].get()) + { + bitmap_value |= ZCL_BITMAP_DL_DAYS_MASK_MAP_SUNDAY; + } + if (value["Monday"].get()) + { + bitmap_value |= ZCL_BITMAP_DL_DAYS_MASK_MAP_MONDAY; + } + if (value["Tuesday"].get()) + { + bitmap_value |= ZCL_BITMAP_DL_DAYS_MASK_MAP_TUESDAY; + } + if (value["Wednesday"].get()) + { + bitmap_value |= ZCL_BITMAP_DL_DAYS_MASK_MAP_WEDNESDAY; + } + if (value["Thursday"].get()) + { + bitmap_value |= ZCL_BITMAP_DL_DAYS_MASK_MAP_THURSDAY; + } + if (value["Friday"].get()) + { + bitmap_value |= ZCL_BITMAP_DL_DAYS_MASK_MAP_FRIDAY; + } + if (value["Saturday"].get()) + { + bitmap_value |= ZCL_BITMAP_DL_DAYS_MASK_MAP_SATURDAY; + } + return bitmap_value; + } catch (const nlohmann::json::exception & e) + { + sl_log_warning(LOG_TAG, "Failed to parse bitmap %s, error %s", value.dump().c_str(), e.what()); + return std::nullopt; + } +} + +std::optional from_json_DlDefaultConfigurationRegister(const nlohmann::json & value) +{ + uint16_t bitmap_value = 0x00; + try + { + if (value["EnableLocalProgrammingEnabled"].get()) + { + bitmap_value |= ZCL_BITMAP_DL_DEFAULT_CONFIGURATION_REGISTER_ENABLE_LOCAL_PROGRAMMING_ENABLED; + } + if (value["KeypadInterfaceDefaultAccessEnabled"].get()) + { + bitmap_value |= ZCL_BITMAP_DL_DEFAULT_CONFIGURATION_REGISTER_KEYPAD_INTERFACE_DEFAULT_ACCESS_ENABLED; + } + if (value["RemoteInterfaceDefaultAccessIsEnabled"].get()) + { + bitmap_value |= ZCL_BITMAP_DL_DEFAULT_CONFIGURATION_REGISTER_REMOTE_INTERFACE_DEFAULT_ACCESS_IS_ENABLED; + } + if (value["SoundEnabled"].get()) + { + bitmap_value |= ZCL_BITMAP_DL_DEFAULT_CONFIGURATION_REGISTER_SOUND_ENABLED; + } + if (value["AutoRelockTimeSet"].get()) + { + bitmap_value |= ZCL_BITMAP_DL_DEFAULT_CONFIGURATION_REGISTER_AUTO_RELOCK_TIME_SET; + } + if (value["LEDSettingsSet"].get()) + { + bitmap_value |= ZCL_BITMAP_DL_DEFAULT_CONFIGURATION_REGISTER_LED_SETTINGS_SET; + } + return bitmap_value; + } catch (const nlohmann::json::exception & e) + { + sl_log_warning(LOG_TAG, "Failed to parse bitmap %s, error %s", value.dump().c_str(), e.what()); + return std::nullopt; + } +} + +std::optional from_json_DlKeypadOperationEventMask(const nlohmann::json & value) +{ + uint16_t bitmap_value = 0x00; + try + { + if (value["Unknown"].get()) + { + bitmap_value |= ZCL_BITMAP_DL_KEYPAD_OPERATION_EVENT_MASK_UNKNOWN; + } + if (value["Lock"].get()) + { + bitmap_value |= ZCL_BITMAP_DL_KEYPAD_OPERATION_EVENT_MASK_LOCK; + } + if (value["Unlock"].get()) + { + bitmap_value |= ZCL_BITMAP_DL_KEYPAD_OPERATION_EVENT_MASK_UNLOCK; + } + if (value["LockInvalidPIN"].get()) + { + bitmap_value |= ZCL_BITMAP_DL_KEYPAD_OPERATION_EVENT_MASK_LOCK_INVALID_PIN; + } + if (value["LockInvalidSchedule"].get()) + { + bitmap_value |= ZCL_BITMAP_DL_KEYPAD_OPERATION_EVENT_MASK_LOCK_INVALID_SCHEDULE; + } + if (value["UnlockInvalidCode"].get()) + { + bitmap_value |= ZCL_BITMAP_DL_KEYPAD_OPERATION_EVENT_MASK_UNLOCK_INVALID_CODE; + } + if (value["UnlockInvalidSchedule"].get()) + { + bitmap_value |= ZCL_BITMAP_DL_KEYPAD_OPERATION_EVENT_MASK_UNLOCK_INVALID_SCHEDULE; + } + if (value["NonAccessUserOpEvent"].get()) + { + bitmap_value |= ZCL_BITMAP_DL_KEYPAD_OPERATION_EVENT_MASK_NON_ACCESS_USER_OP_EVENT; + } + return bitmap_value; + } catch (const nlohmann::json::exception & e) + { + sl_log_warning(LOG_TAG, "Failed to parse bitmap %s, error %s", value.dump().c_str(), e.what()); + return std::nullopt; + } +} + +std::optional from_json_DlKeypadProgrammingEventMask(const nlohmann::json & value) +{ + uint16_t bitmap_value = 0x00; + try + { + if (value["Unknown"].get()) + { + bitmap_value |= ZCL_BITMAP_DL_KEYPAD_PROGRAMMING_EVENT_MASK_UNKNOWN; + } + if (value["ProgrammingPINChanged"].get()) + { + bitmap_value |= ZCL_BITMAP_DL_KEYPAD_PROGRAMMING_EVENT_MASK_PROGRAMMING_PIN_CHANGED; + } + if (value["PINAdded"].get()) + { + bitmap_value |= ZCL_BITMAP_DL_KEYPAD_PROGRAMMING_EVENT_MASK_PIN_ADDED; + } + if (value["PINCleared"].get()) + { + bitmap_value |= ZCL_BITMAP_DL_KEYPAD_PROGRAMMING_EVENT_MASK_PIN_CLEARED; + } + if (value["PINChanged"].get()) + { + bitmap_value |= ZCL_BITMAP_DL_KEYPAD_PROGRAMMING_EVENT_MASK_PIN_CHANGED; + } + return bitmap_value; + } catch (const nlohmann::json::exception & e) + { + sl_log_warning(LOG_TAG, "Failed to parse bitmap %s, error %s", value.dump().c_str(), e.what()); + return std::nullopt; + } +} + +std::optional from_json_DlLocalProgrammingFeatures(const nlohmann::json & value) +{ + uint8_t bitmap_value = 0x00; + try + { + if (value["AddUsersCredentialsSchedulesLocally"].get()) + { + bitmap_value |= ZCL_BITMAP_DL_LOCAL_PROGRAMMING_FEATURES_ADD_USERS_CREDENTIALS_SCHEDULES_LOCALLY; + } + if (value["ModifyUsersCredentialsSchedulesLocally"].get()) + { + bitmap_value |= ZCL_BITMAP_DL_LOCAL_PROGRAMMING_FEATURES_MODIFY_USERS_CREDENTIALS_SCHEDULES_LOCALLY; + } + if (value["ClearUsersCredentialsSchedulesLocally"].get()) + { + bitmap_value |= ZCL_BITMAP_DL_LOCAL_PROGRAMMING_FEATURES_CLEAR_USERS_CREDENTIALS_SCHEDULES_LOCALLY; + } + if (value["AdjustLockSettingsLocally"].get()) + { + bitmap_value |= ZCL_BITMAP_DL_LOCAL_PROGRAMMING_FEATURES_ADJUST_LOCK_SETTINGS_LOCALLY; + } + return bitmap_value; + } catch (const nlohmann::json::exception & e) + { + sl_log_warning(LOG_TAG, "Failed to parse bitmap %s, error %s", value.dump().c_str(), e.what()); + return std::nullopt; + } +} + +std::optional from_json_DlManualOperationEventMask(const nlohmann::json & value) +{ + uint16_t bitmap_value = 0x00; + try + { + if (value["Unknown"].get()) + { + bitmap_value |= ZCL_BITMAP_DL_MANUAL_OPERATION_EVENT_MASK_UNKNOWN; + } + if (value["ThumbturnLock"].get()) + { + bitmap_value |= ZCL_BITMAP_DL_MANUAL_OPERATION_EVENT_MASK_THUMBTURN_LOCK; + } + if (value["ThumbturnUnlock"].get()) + { + bitmap_value |= ZCL_BITMAP_DL_MANUAL_OPERATION_EVENT_MASK_THUMBTURN_UNLOCK; + } + if (value["OneTouchLock"].get()) + { + bitmap_value |= ZCL_BITMAP_DL_MANUAL_OPERATION_EVENT_MASK_ONE_TOUCH_LOCK; + } + if (value["KeyLock"].get()) + { + bitmap_value |= ZCL_BITMAP_DL_MANUAL_OPERATION_EVENT_MASK_KEY_LOCK; + } + if (value["KeyUnlock"].get()) + { + bitmap_value |= ZCL_BITMAP_DL_MANUAL_OPERATION_EVENT_MASK_KEY_UNLOCK; + } + if (value["AutoLock"].get()) + { + bitmap_value |= ZCL_BITMAP_DL_MANUAL_OPERATION_EVENT_MASK_AUTO_LOCK; + } + if (value["ScheduleLock"].get()) + { + bitmap_value |= ZCL_BITMAP_DL_MANUAL_OPERATION_EVENT_MASK_SCHEDULE_LOCK; + } + if (value["ScheduleUnlock"].get()) + { + bitmap_value |= ZCL_BITMAP_DL_MANUAL_OPERATION_EVENT_MASK_SCHEDULE_UNLOCK; + } + if (value["ManualLock"].get()) + { + bitmap_value |= ZCL_BITMAP_DL_MANUAL_OPERATION_EVENT_MASK_MANUAL_LOCK; + } + if (value["ManualUnlock"].get()) + { + bitmap_value |= ZCL_BITMAP_DL_MANUAL_OPERATION_EVENT_MASK_MANUAL_UNLOCK; + } + return bitmap_value; + } catch (const nlohmann::json::exception & e) + { + sl_log_warning(LOG_TAG, "Failed to parse bitmap %s, error %s", value.dump().c_str(), e.what()); + return std::nullopt; + } +} + +std::optional from_json_DlRFIDOperationEventMask(const nlohmann::json & value) +{ + uint16_t bitmap_value = 0x00; + try + { + if (value["Unknown"].get()) + { + bitmap_value |= ZCL_BITMAP_DL_RFID_OPERATION_EVENT_MASK_UNKNOWN; + } + if (value["Lock"].get()) + { + bitmap_value |= ZCL_BITMAP_DL_RFID_OPERATION_EVENT_MASK_LOCK; + } + if (value["Unlock"].get()) + { + bitmap_value |= ZCL_BITMAP_DL_RFID_OPERATION_EVENT_MASK_UNLOCK; + } + if (value["LockInvalidRFID"].get()) + { + bitmap_value |= ZCL_BITMAP_DL_RFID_OPERATION_EVENT_MASK_LOCK_INVALID_RFID; + } + if (value["LockInvalidSchedule"].get()) + { + bitmap_value |= ZCL_BITMAP_DL_RFID_OPERATION_EVENT_MASK_LOCK_INVALID_SCHEDULE; + } + if (value["UnlockInvalidRFID"].get()) + { + bitmap_value |= ZCL_BITMAP_DL_RFID_OPERATION_EVENT_MASK_UNLOCK_INVALID_RFID; + } + if (value["UnlockInvalidSchedule"].get()) + { + bitmap_value |= ZCL_BITMAP_DL_RFID_OPERATION_EVENT_MASK_UNLOCK_INVALID_SCHEDULE; + } + return bitmap_value; + } catch (const nlohmann::json::exception & e) + { + sl_log_warning(LOG_TAG, "Failed to parse bitmap %s, error %s", value.dump().c_str(), e.what()); + return std::nullopt; + } +} + +std::optional from_json_DlRFIDProgrammingEventMask(const nlohmann::json & value) +{ + uint16_t bitmap_value = 0x00; + try + { + if (value["Unknown"].get()) + { + bitmap_value |= ZCL_BITMAP_DL_RFID_PROGRAMMING_EVENT_MASK_UNKNOWN; + } + if (value["RFIDCodeAdded"].get()) + { + bitmap_value |= ZCL_BITMAP_DL_RFID_PROGRAMMING_EVENT_MASK_RFID_CODE_ADDED; + } + if (value["RFIDCodeCleared"].get()) + { + bitmap_value |= ZCL_BITMAP_DL_RFID_PROGRAMMING_EVENT_MASK_RFID_CODE_CLEARED; + } + return bitmap_value; + } catch (const nlohmann::json::exception & e) + { + sl_log_warning(LOG_TAG, "Failed to parse bitmap %s, error %s", value.dump().c_str(), e.what()); + return std::nullopt; + } +} + +std::optional from_json_DlRemoteOperationEventMask(const nlohmann::json & value) +{ + uint16_t bitmap_value = 0x00; + try + { + if (value["Unknown"].get()) + { + bitmap_value |= ZCL_BITMAP_DL_REMOTE_OPERATION_EVENT_MASK_UNKNOWN; + } + if (value["Lock"].get()) + { + bitmap_value |= ZCL_BITMAP_DL_REMOTE_OPERATION_EVENT_MASK_LOCK; + } + if (value["Unlock"].get()) + { + bitmap_value |= ZCL_BITMAP_DL_REMOTE_OPERATION_EVENT_MASK_UNLOCK; + } + if (value["LockInvalidCode"].get()) + { + bitmap_value |= ZCL_BITMAP_DL_REMOTE_OPERATION_EVENT_MASK_LOCK_INVALID_CODE; + } + if (value["LockInvalidSchedule"].get()) + { + bitmap_value |= ZCL_BITMAP_DL_REMOTE_OPERATION_EVENT_MASK_LOCK_INVALID_SCHEDULE; + } + if (value["UnlockInvalidCode"].get()) + { + bitmap_value |= ZCL_BITMAP_DL_REMOTE_OPERATION_EVENT_MASK_UNLOCK_INVALID_CODE; + } + if (value["UnlockInvalidSchedule"].get()) + { + bitmap_value |= ZCL_BITMAP_DL_REMOTE_OPERATION_EVENT_MASK_UNLOCK_INVALID_SCHEDULE; + } + return bitmap_value; + } catch (const nlohmann::json::exception & e) + { + sl_log_warning(LOG_TAG, "Failed to parse bitmap %s, error %s", value.dump().c_str(), e.what()); + return std::nullopt; + } +} + +std::optional from_json_DlRemoteProgrammingEventMask(const nlohmann::json & value) +{ + uint16_t bitmap_value = 0x00; + try + { + if (value["Unknown"].get()) + { + bitmap_value |= ZCL_BITMAP_DL_REMOTE_PROGRAMMING_EVENT_MASK_UNKNOWN; + } + if (value["ProgrammingPINChanged"].get()) + { + bitmap_value |= ZCL_BITMAP_DL_REMOTE_PROGRAMMING_EVENT_MASK_PROGRAMMING_PIN_CHANGED; + } + if (value["PINAdded"].get()) + { + bitmap_value |= ZCL_BITMAP_DL_REMOTE_PROGRAMMING_EVENT_MASK_PIN_ADDED; + } + if (value["PINCleared"].get()) + { + bitmap_value |= ZCL_BITMAP_DL_REMOTE_PROGRAMMING_EVENT_MASK_PIN_CLEARED; + } + if (value["PINChanged"].get()) + { + bitmap_value |= ZCL_BITMAP_DL_REMOTE_PROGRAMMING_EVENT_MASK_PIN_CHANGED; + } + if (value["RFIDCodeAdded"].get()) + { + bitmap_value |= ZCL_BITMAP_DL_REMOTE_PROGRAMMING_EVENT_MASK_RFID_CODE_ADDED; + } + if (value["RFIDCodeCleared"].get()) + { + bitmap_value |= ZCL_BITMAP_DL_REMOTE_PROGRAMMING_EVENT_MASK_RFID_CODE_CLEARED; + } + return bitmap_value; + } catch (const nlohmann::json::exception & e) + { + sl_log_warning(LOG_TAG, "Failed to parse bitmap %s, error %s", value.dump().c_str(), e.what()); + return std::nullopt; + } +} + +std::optional from_json_DlSupportedOperatingModes(const nlohmann::json & value) +{ + uint16_t bitmap_value = 0x00; + try + { + if (value["Normal"].get()) + { + bitmap_value |= ZCL_BITMAP_DL_SUPPORTED_OPERATING_MODES_NORMAL; + } + if (value["Vacation"].get()) + { + bitmap_value |= ZCL_BITMAP_DL_SUPPORTED_OPERATING_MODES_VACATION; + } + if (value["Privacy"].get()) + { + bitmap_value |= ZCL_BITMAP_DL_SUPPORTED_OPERATING_MODES_PRIVACY; + } + if (value["NoRemoteLockUnlock"].get()) + { + bitmap_value |= ZCL_BITMAP_DL_SUPPORTED_OPERATING_MODES_NO_REMOTE_LOCK_UNLOCK; + } + if (value["Passage"].get()) + { + bitmap_value |= ZCL_BITMAP_DL_SUPPORTED_OPERATING_MODES_PASSAGE; + } + return bitmap_value; + } catch (const nlohmann::json::exception & e) + { + sl_log_warning(LOG_TAG, "Failed to parse bitmap %s, error %s", value.dump().c_str(), e.what()); + return std::nullopt; + } +} + +std::optional from_json_DoorLockDayOfWeek(const nlohmann::json & value) +{ + uint8_t bitmap_value = 0x00; + try + { + if (value["Sunday"].get()) + { + bitmap_value |= ZCL_BITMAP_DOOR_LOCK_DAY_OF_WEEK_SUNDAY; + } + if (value["Monday"].get()) + { + bitmap_value |= ZCL_BITMAP_DOOR_LOCK_DAY_OF_WEEK_MONDAY; + } + if (value["Tuesday"].get()) + { + bitmap_value |= ZCL_BITMAP_DOOR_LOCK_DAY_OF_WEEK_TUESDAY; + } + if (value["Wednesday"].get()) + { + bitmap_value |= ZCL_BITMAP_DOOR_LOCK_DAY_OF_WEEK_WEDNESDAY; + } + if (value["Thursday"].get()) + { + bitmap_value |= ZCL_BITMAP_DOOR_LOCK_DAY_OF_WEEK_THURSDAY; + } + if (value["Friday"].get()) + { + bitmap_value |= ZCL_BITMAP_DOOR_LOCK_DAY_OF_WEEK_FRIDAY; + } + if (value["Saturday"].get()) + { + bitmap_value |= ZCL_BITMAP_DOOR_LOCK_DAY_OF_WEEK_SATURDAY; + } + return bitmap_value; + } catch (const nlohmann::json::exception & e) + { + sl_log_warning(LOG_TAG, "Failed to parse bitmap %s, error %s", value.dump().c_str(), e.what()); + return std::nullopt; + } +} + +std::optional from_json_DoorLockFeature(const nlohmann::json & value) +{ + uint32_t bitmap_value = 0x00; + try + { + if (value["PINCredentials"].get()) + { + bitmap_value |= ZCL_BITMAP_DOOR_LOCK_FEATURE_PIN_CREDENTIALS; + } + if (value["RFIDCredentials"].get()) + { + bitmap_value |= ZCL_BITMAP_DOOR_LOCK_FEATURE_RFID_CREDENTIALS; + } + if (value["FingerCredentials"].get()) + { + bitmap_value |= ZCL_BITMAP_DOOR_LOCK_FEATURE_FINGER_CREDENTIALS; + } + if (value["Logging"].get()) + { + bitmap_value |= ZCL_BITMAP_DOOR_LOCK_FEATURE_LOGGING; + } + if (value["WeekDaySchedules"].get()) + { + bitmap_value |= ZCL_BITMAP_DOOR_LOCK_FEATURE_WEEK_DAY_SCHEDULES; + } + if (value["DoorPositionSensor"].get()) + { + bitmap_value |= ZCL_BITMAP_DOOR_LOCK_FEATURE_DOOR_POSITION_SENSOR; + } + if (value["FaceCredentials"].get()) + { + bitmap_value |= ZCL_BITMAP_DOOR_LOCK_FEATURE_FACE_CREDENTIALS; + } + if (value["CredentialsOTA"].get()) + { + bitmap_value |= ZCL_BITMAP_DOOR_LOCK_FEATURE_CREDENTIALS_OTA; + } + if (value["UsersManagement"].get()) + { + bitmap_value |= ZCL_BITMAP_DOOR_LOCK_FEATURE_USERS_MANAGEMENT; + } + if (value["Notifications"].get()) + { + bitmap_value |= ZCL_BITMAP_DOOR_LOCK_FEATURE_NOTIFICATIONS; + } + if (value["YearDaySchedules"].get()) + { + bitmap_value |= ZCL_BITMAP_DOOR_LOCK_FEATURE_YEAR_DAY_SCHEDULES; + } + if (value["HolidaySchedules"].get()) + { + bitmap_value |= ZCL_BITMAP_DOOR_LOCK_FEATURE_HOLIDAY_SCHEDULES; + } + return bitmap_value; + } catch (const nlohmann::json::exception & e) + { + sl_log_warning(LOG_TAG, "Failed to parse bitmap %s, error %s", value.dump().c_str(), e.what()); + return std::nullopt; + } +} + +std::optional from_json_EnergyFormatting(const nlohmann::json & value) +{ + uint8_t bitmap_value = 0x00; + try + { + if (value["NumberOfDigitsToTheRightOfTheDecimalPoint"].get()) + { + bitmap_value |= ZCL_BITMAP_ENERGY_FORMATTING_NUMBER_OF_DIGITS_TO_THE_RIGHT_OF_THE_DECIMAL_POINT; + } + if (value["NumberOfDigitsToTheLeftOfTheDecimalPoint"].get()) + { + bitmap_value |= ZCL_BITMAP_ENERGY_FORMATTING_NUMBER_OF_DIGITS_TO_THE_LEFT_OF_THE_DECIMAL_POINT; + } + if (value["SuppressLeadingZeros"].get()) + { + bitmap_value |= ZCL_BITMAP_ENERGY_FORMATTING_SUPPRESS_LEADING_ZEROS; + } + return bitmap_value; + } catch (const nlohmann::json::exception & e) + { + sl_log_warning(LOG_TAG, "Failed to parse bitmap %s, error %s", value.dump().c_str(), e.what()); + return std::nullopt; + } +} + +std::optional from_json_EthernetNetworkDiagnosticsFeature(const nlohmann::json & value) +{ + uint32_t bitmap_value = 0x00; + try + { + if (value["PacketCounts"].get()) + { + bitmap_value |= ZCL_BITMAP_ETHERNET_NETWORK_DIAGNOSTICS_FEATURE_PACKET_COUNTS; + } + if (value["ErrorCounts"].get()) + { + bitmap_value |= ZCL_BITMAP_ETHERNET_NETWORK_DIAGNOSTICS_FEATURE_ERROR_COUNTS; + } + return bitmap_value; + } catch (const nlohmann::json::exception & e) + { + sl_log_warning(LOG_TAG, "Failed to parse bitmap %s, error %s", value.dump().c_str(), e.what()); + return std::nullopt; + } +} + +std::optional from_json_FanControlFeature(const nlohmann::json & value) +{ + uint32_t bitmap_value = 0x00; + try + { + if (value["MultiSpeed"].get()) + { + bitmap_value |= ZCL_BITMAP_FAN_CONTROL_FEATURE_MULTI_SPEED; + } + if (value["Auto"].get()) + { + bitmap_value |= ZCL_BITMAP_FAN_CONTROL_FEATURE_AUTO; + } + if (value["Rocking"].get()) + { + bitmap_value |= ZCL_BITMAP_FAN_CONTROL_FEATURE_ROCKING; + } + if (value["Wind"].get()) + { + bitmap_value |= ZCL_BITMAP_FAN_CONTROL_FEATURE_WIND; + } + return bitmap_value; + } catch (const nlohmann::json::exception & e) + { + sl_log_warning(LOG_TAG, "Failed to parse bitmap %s, error %s", value.dump().c_str(), e.what()); + return std::nullopt; + } +} + +std::optional from_json_Feature(const nlohmann::json & value) +{ + uint32_t bitmap_value = 0x00; + try + { + if (value["Lift"].get()) + { + bitmap_value |= ZCL_BITMAP_FEATURE_LIFT; + } + if (value["Tilt"].get()) + { + bitmap_value |= ZCL_BITMAP_FEATURE_TILT; + } + if (value["PositionAwareLift"].get()) + { + bitmap_value |= ZCL_BITMAP_FEATURE_POSITION_AWARE_LIFT; + } + if (value["AbsolutePosition"].get()) + { + bitmap_value |= ZCL_BITMAP_FEATURE_ABSOLUTE_POSITION; + } + if (value["PositionAwareTilt"].get()) + { + bitmap_value |= ZCL_BITMAP_FEATURE_POSITION_AWARE_TILT; + } + return bitmap_value; + } catch (const nlohmann::json::exception & e) + { + sl_log_warning(LOG_TAG, "Failed to parse bitmap %s, error %s", value.dump().c_str(), e.what()); + return std::nullopt; + } +} + +std::optional from_json_GroupClusterFeature(const nlohmann::json & value) +{ + uint32_t bitmap_value = 0x00; + try + { + if (value["GroupNames"].get()) + { + bitmap_value |= ZCL_BITMAP_GROUP_CLUSTER_FEATURE_GROUP_NAMES; + } + return bitmap_value; + } catch (const nlohmann::json::exception & e) + { + sl_log_warning(LOG_TAG, "Failed to parse bitmap %s, error %s", value.dump().c_str(), e.what()); + return std::nullopt; + } +} + +std::optional from_json_IasZoneStatus(const nlohmann::json & value) +{ + uint16_t bitmap_value = 0x00; + try + { + if (value["Alarm1"].get()) + { + bitmap_value |= ZCL_BITMAP_IAS_ZONE_STATUS_ALARM1; + } + if (value["Alarm2"].get()) + { + bitmap_value |= ZCL_BITMAP_IAS_ZONE_STATUS_ALARM2; + } + if (value["Tamper"].get()) + { + bitmap_value |= ZCL_BITMAP_IAS_ZONE_STATUS_TAMPER; + } + if (value["Battery"].get()) + { + bitmap_value |= ZCL_BITMAP_IAS_ZONE_STATUS_BATTERY; + } + if (value["SupervisionReports"].get()) + { + bitmap_value |= ZCL_BITMAP_IAS_ZONE_STATUS_SUPERVISION_REPORTS; + } + if (value["RestoreReports"].get()) + { + bitmap_value |= ZCL_BITMAP_IAS_ZONE_STATUS_RESTORE_REPORTS; + } + if (value["Trouble"].get()) + { + bitmap_value |= ZCL_BITMAP_IAS_ZONE_STATUS_TROUBLE; + } + if (value["Ac"].get()) + { + bitmap_value |= ZCL_BITMAP_IAS_ZONE_STATUS_AC; + } + if (value["Test"].get()) + { + bitmap_value |= ZCL_BITMAP_IAS_ZONE_STATUS_TEST; + } + if (value["BatteryDefect"].get()) + { + bitmap_value |= ZCL_BITMAP_IAS_ZONE_STATUS_BATTERY_DEFECT; + } + return bitmap_value; + } catch (const nlohmann::json::exception & e) + { + sl_log_warning(LOG_TAG, "Failed to parse bitmap %s, error %s", value.dump().c_str(), e.what()); + return std::nullopt; + } +} + +std::optional from_json_KeypadInputFeature(const nlohmann::json & value) +{ + uint32_t bitmap_value = 0x00; + try + { + if (value["NavigationKeyCodes"].get()) + { + bitmap_value |= ZCL_BITMAP_KEYPAD_INPUT_FEATURE_NAVIGATION_KEY_CODES; + } + if (value["LocationKeys"].get()) + { + bitmap_value |= ZCL_BITMAP_KEYPAD_INPUT_FEATURE_LOCATION_KEYS; + } + if (value["NumberKeys"].get()) + { + bitmap_value |= ZCL_BITMAP_KEYPAD_INPUT_FEATURE_NUMBER_KEYS; + } + return bitmap_value; + } catch (const nlohmann::json::exception & e) + { + sl_log_warning(LOG_TAG, "Failed to parse bitmap %s, error %s", value.dump().c_str(), e.what()); + return std::nullopt; + } +} + +std::optional from_json_LampAlarmMode(const nlohmann::json & value) +{ + uint8_t bitmap_value = 0x00; + try + { + if (value["LampBurnHours"].get()) + { + bitmap_value |= ZCL_BITMAP_LAMP_ALARM_MODE_LAMP_BURN_HOURS; + } + return bitmap_value; + } catch (const nlohmann::json::exception & e) + { + sl_log_warning(LOG_TAG, "Failed to parse bitmap %s, error %s", value.dump().c_str(), e.what()); + return std::nullopt; + } +} + +std::optional from_json_LevelControlFeature(const nlohmann::json & value) +{ + uint32_t bitmap_value = 0x00; + try + { + if (value["OnOff"].get()) + { + bitmap_value |= ZCL_BITMAP_LEVEL_CONTROL_FEATURE_ON_OFF; + } + if (value["Lighting"].get()) + { + bitmap_value |= ZCL_BITMAP_LEVEL_CONTROL_FEATURE_LIGHTING; + } + if (value["Frequency"].get()) + { + bitmap_value |= ZCL_BITMAP_LEVEL_CONTROL_FEATURE_FREQUENCY; + } + return bitmap_value; + } catch (const nlohmann::json::exception & e) + { + sl_log_warning(LOG_TAG, "Failed to parse bitmap %s, error %s", value.dump().c_str(), e.what()); + return std::nullopt; + } +} + +std::optional from_json_MainsAlarmMask(const nlohmann::json & value) +{ + uint8_t bitmap_value = 0x00; + try + { + if (value["VoltageTooLow"].get()) + { + bitmap_value |= ZCL_BITMAP_MAINS_ALARM_MASK_VOLTAGE_TOO_LOW; + } + if (value["VoltageTooHigh"].get()) + { + bitmap_value |= ZCL_BITMAP_MAINS_ALARM_MASK_VOLTAGE_TOO_HIGH; + } + if (value["MainsPowerSupplyLost"].get()) + { + bitmap_value |= ZCL_BITMAP_MAINS_ALARM_MASK_MAINS_POWER_SUPPLY_LOST; + } + return bitmap_value; + } catch (const nlohmann::json::exception & e) + { + sl_log_warning(LOG_TAG, "Failed to parse bitmap %s, error %s", value.dump().c_str(), e.what()); + return std::nullopt; + } +} + +std::optional from_json_MediaInputFeature(const nlohmann::json & value) +{ + uint32_t bitmap_value = 0x00; + try + { + if (value["NameUpdates"].get()) + { + bitmap_value |= ZCL_BITMAP_MEDIA_INPUT_FEATURE_NAME_UPDATES; + } + return bitmap_value; + } catch (const nlohmann::json::exception & e) + { + sl_log_warning(LOG_TAG, "Failed to parse bitmap %s, error %s", value.dump().c_str(), e.what()); + return std::nullopt; + } +} + +std::optional from_json_MediaPlaybackFeature(const nlohmann::json & value) +{ + uint32_t bitmap_value = 0x00; + try + { + if (value["AdvancedSeek"].get()) + { + bitmap_value |= ZCL_BITMAP_MEDIA_PLAYBACK_FEATURE_ADVANCED_SEEK; + } + if (value["VariableSpeed"].get()) + { + bitmap_value |= ZCL_BITMAP_MEDIA_PLAYBACK_FEATURE_VARIABLE_SPEED; + } + return bitmap_value; + } catch (const nlohmann::json::exception & e) + { + sl_log_warning(LOG_TAG, "Failed to parse bitmap %s, error %s", value.dump().c_str(), e.what()); + return std::nullopt; + } +} + +std::optional from_json_Mode(const nlohmann::json & value) +{ + uint8_t bitmap_value = 0x00; + try + { + if (value["MotorDirectionReversed"].get()) + { + bitmap_value |= ZCL_BITMAP_MODE_MOTOR_DIRECTION_REVERSED; + } + if (value["CalibrationMode"].get()) + { + bitmap_value |= ZCL_BITMAP_MODE_CALIBRATION_MODE; + } + if (value["MaintenanceMode"].get()) + { + bitmap_value |= ZCL_BITMAP_MODE_MAINTENANCE_MODE; + } + if (value["LedFeedback"].get()) + { + bitmap_value |= ZCL_BITMAP_MODE_LED_FEEDBACK; + } + return bitmap_value; + } catch (const nlohmann::json::exception & e) + { + sl_log_warning(LOG_TAG, "Failed to parse bitmap %s, error %s", value.dump().c_str(), e.what()); + return std::nullopt; + } +} + +std::optional from_json_ModeForSequence(const nlohmann::json & value) +{ + uint8_t bitmap_value = 0x00; + try + { + if (value["HeatSetpointFieldPresent"].get()) + { + bitmap_value |= ZCL_BITMAP_MODE_FOR_SEQUENCE_HEAT_SETPOINT_FIELD_PRESENT; + } + if (value["CoolSetpointFieldPresent"].get()) + { + bitmap_value |= ZCL_BITMAP_MODE_FOR_SEQUENCE_COOL_SETPOINT_FIELD_PRESENT; + } + return bitmap_value; + } catch (const nlohmann::json::exception & e) + { + sl_log_warning(LOG_TAG, "Failed to parse bitmap %s, error %s", value.dump().c_str(), e.what()); + return std::nullopt; + } +} + +std::optional from_json_ModeSelectFeature(const nlohmann::json & value) +{ + uint32_t bitmap_value = 0x00; + try + { + if (value["Deponoff"].get()) + { + bitmap_value |= ZCL_BITMAP_MODE_SELECT_FEATURE_DEPONOFF; + } + return bitmap_value; + } catch (const nlohmann::json::exception & e) + { + sl_log_warning(LOG_TAG, "Failed to parse bitmap %s, error %s", value.dump().c_str(), e.what()); + return std::nullopt; + } +} + +std::optional from_json_NetworkCommissioningFeature(const nlohmann::json & value) +{ + uint32_t bitmap_value = 0x00; + try + { + if (value["WiFiNetworkInterface"].get()) + { + bitmap_value |= ZCL_BITMAP_NETWORK_COMMISSIONING_FEATURE_WI_FI_NETWORK_INTERFACE; + } + if (value["ThreadNetworkInterface"].get()) + { + bitmap_value |= ZCL_BITMAP_NETWORK_COMMISSIONING_FEATURE_THREAD_NETWORK_INTERFACE; + } + if (value["EthernetNetworkInterface"].get()) + { + bitmap_value |= ZCL_BITMAP_NETWORK_COMMISSIONING_FEATURE_ETHERNET_NETWORK_INTERFACE; + } + return bitmap_value; + } catch (const nlohmann::json::exception & e) + { + sl_log_warning(LOG_TAG, "Failed to parse bitmap %s, error %s", value.dump().c_str(), e.what()); + return std::nullopt; + } +} + +std::optional from_json_Occupancy(const nlohmann::json & value) +{ + uint8_t bitmap_value = 0x00; + try + { + if (value["SensedOccupancy"].get()) + { + bitmap_value |= ZCL_BITMAP_OCCUPANCY_OCCUPIED; + } + return bitmap_value; + } catch (const nlohmann::json::exception & e) + { + sl_log_warning(LOG_TAG, "Failed to parse bitmap %s, error %s", value.dump().c_str(), e.what()); + return std::nullopt; + } +} + +std::optional from_json_OccupancySensorTypeBitmap(const nlohmann::json & value) +{ + uint8_t bitmap_value = 0x00; + try + { + if (value["PIR"].get()) + { + bitmap_value |= ZCL_BITMAP_OCCUPANCY_SENSOR_TYPE_BITMAP_PIR; + } + if (value["Ultrasonic"].get()) + { + bitmap_value |= ZCL_BITMAP_OCCUPANCY_SENSOR_TYPE_BITMAP_ULTRASONIC; + } + if (value["PhysicalContact"].get()) + { + bitmap_value |= ZCL_BITMAP_OCCUPANCY_SENSOR_TYPE_BITMAP_PHYSICAL_CONTACT; + } + return bitmap_value; + } catch (const nlohmann::json::exception & e) + { + sl_log_warning(LOG_TAG, "Failed to parse bitmap %s, error %s", value.dump().c_str(), e.what()); + return std::nullopt; + } +} + +std::optional from_json_OnOffControl(const nlohmann::json & value) +{ + uint8_t bitmap_value = 0x00; + try + { + if (value["AcceptOnlyWhenOn"].get()) + { + bitmap_value |= ZCL_BITMAP_ON_OFF_CONTROL_ACCEPT_ONLY_WHEN_ON; + } + return bitmap_value; + } catch (const nlohmann::json::exception & e) + { + sl_log_warning(LOG_TAG, "Failed to parse bitmap %s, error %s", value.dump().c_str(), e.what()); + return std::nullopt; + } +} + +std::optional from_json_OnOffFeature(const nlohmann::json & value) +{ + uint32_t bitmap_value = 0x00; + try + { + if (value["Lighting"].get()) + { + bitmap_value |= ZCL_BITMAP_ON_OFF_FEATURE_LIGHTING; + } + return bitmap_value; + } catch (const nlohmann::json::exception & e) + { + sl_log_warning(LOG_TAG, "Failed to parse bitmap %s, error %s", value.dump().c_str(), e.what()); + return std::nullopt; + } +} + +std::optional from_json_OperationalStatus(const nlohmann::json & value) +{ + uint8_t bitmap_value = 0x00; + try + { + if (value["Global"].get()) + { + bitmap_value |= ZCL_BITMAP_OPERATIONAL_STATUS_GLOBAL; + } + if (value["Lift"].get()) + { + bitmap_value |= ZCL_BITMAP_OPERATIONAL_STATUS_LIFT; + } + if (value["Tilt"].get()) + { + bitmap_value |= ZCL_BITMAP_OPERATIONAL_STATUS_TILT; + } + return bitmap_value; + } catch (const nlohmann::json::exception & e) + { + sl_log_warning(LOG_TAG, "Failed to parse bitmap %s, error %s", value.dump().c_str(), e.what()); + return std::nullopt; + } +} + +std::optional from_json_PowerSourceFeature(const nlohmann::json & value) +{ + uint32_t bitmap_value = 0x00; + try + { + if (value["Wired"].get()) + { + bitmap_value |= ZCL_BITMAP_POWER_SOURCE_FEATURE_WIRED; + } + if (value["Battery"].get()) + { + bitmap_value |= ZCL_BITMAP_POWER_SOURCE_FEATURE_BATTERY; + } + if (value["Rechargeable"].get()) + { + bitmap_value |= ZCL_BITMAP_POWER_SOURCE_FEATURE_RECHARGEABLE; + } + if (value["Replaceable"].get()) + { + bitmap_value |= ZCL_BITMAP_POWER_SOURCE_FEATURE_REPLACEABLE; + } + return bitmap_value; + } catch (const nlohmann::json::exception & e) + { + sl_log_warning(LOG_TAG, "Failed to parse bitmap %s, error %s", value.dump().c_str(), e.what()); + return std::nullopt; + } +} + +std::optional from_json_PressureFeature(const nlohmann::json & value) +{ + uint32_t bitmap_value = 0x00; + try + { + if (value["Ext"].get()) + { + bitmap_value |= ZCL_BITMAP_PRESSURE_FEATURE_EXT; + } + return bitmap_value; + } catch (const nlohmann::json::exception & e) + { + sl_log_warning(LOG_TAG, "Failed to parse bitmap %s, error %s", value.dump().c_str(), e.what()); + return std::nullopt; + } +} + +std::optional from_json_PumpStatus(const nlohmann::json & value) +{ + uint16_t bitmap_value = 0x00; + try + { + if (value["DeviceFault"].get()) + { + bitmap_value |= ZCL_BITMAP_PUMP_STATUS_DEVICE_FAULT; + } + if (value["Supplyfault"].get()) + { + bitmap_value |= ZCL_BITMAP_PUMP_STATUS_SUPPLYFAULT; + } + if (value["SpeedLow"].get()) + { + bitmap_value |= ZCL_BITMAP_PUMP_STATUS_SPEED_LOW; + } + if (value["SpeedHigh"].get()) + { + bitmap_value |= ZCL_BITMAP_PUMP_STATUS_SPEED_HIGH; + } + if (value["LocalOverride"].get()) + { + bitmap_value |= ZCL_BITMAP_PUMP_STATUS_LOCAL_OVERRIDE; + } + if (value["Running"].get()) + { + bitmap_value |= ZCL_BITMAP_PUMP_STATUS_RUNNING; + } + if (value["RemotePressure"].get()) + { + bitmap_value |= ZCL_BITMAP_PUMP_STATUS_REMOTE_PRESSURE; + } + if (value["RemoteFlow"].get()) + { + bitmap_value |= ZCL_BITMAP_PUMP_STATUS_REMOTE_FLOW; + } + if (value["RemoteTemperature"].get()) + { + bitmap_value |= ZCL_BITMAP_PUMP_STATUS_REMOTE_TEMPERATURE; + } + return bitmap_value; + } catch (const nlohmann::json::exception & e) + { + sl_log_warning(LOG_TAG, "Failed to parse bitmap %s, error %s", value.dump().c_str(), e.what()); + return std::nullopt; + } +} + +std::optional from_json_RockSupportMask(const nlohmann::json & value) +{ + uint8_t bitmap_value = 0x00; + try + { + if (value["RockLeftRight"].get()) + { + bitmap_value |= ZCL_BITMAP_ROCK_SUPPORT_MASK_ROCK_LEFT_RIGHT; + } + if (value["RockUpDown"].get()) + { + bitmap_value |= ZCL_BITMAP_ROCK_SUPPORT_MASK_ROCK_UP_DOWN; + } + if (value["RockRound"].get()) + { + bitmap_value |= ZCL_BITMAP_ROCK_SUPPORT_MASK_ROCK_ROUND; + } + return bitmap_value; + } catch (const nlohmann::json::exception & e) + { + sl_log_warning(LOG_TAG, "Failed to parse bitmap %s, error %s", value.dump().c_str(), e.what()); + return std::nullopt; + } +} + +std::optional from_json_SafetyStatus(const nlohmann::json & value) +{ + uint16_t bitmap_value = 0x00; + try + { + if (value["RemoteLockout"].get()) + { + bitmap_value |= ZCL_BITMAP_SAFETY_STATUS_REMOTE_LOCKOUT; + } + if (value["TamperDetection"].get()) + { + bitmap_value |= ZCL_BITMAP_SAFETY_STATUS_TAMPER_DETECTION; + } + if (value["FailedCommunication"].get()) + { + bitmap_value |= ZCL_BITMAP_SAFETY_STATUS_FAILED_COMMUNICATION; + } + if (value["PositionFailure"].get()) + { + bitmap_value |= ZCL_BITMAP_SAFETY_STATUS_POSITION_FAILURE; + } + if (value["ThermalProtection"].get()) + { + bitmap_value |= ZCL_BITMAP_SAFETY_STATUS_THERMAL_PROTECTION; + } + if (value["ObstacleDetected"].get()) + { + bitmap_value |= ZCL_BITMAP_SAFETY_STATUS_OBSTACLE_DETECTED; + } + if (value["Power"].get()) + { + bitmap_value |= ZCL_BITMAP_SAFETY_STATUS_POWER; + } + if (value["StopInput"].get()) + { + bitmap_value |= ZCL_BITMAP_SAFETY_STATUS_STOP_INPUT; + } + if (value["MotorJammed"].get()) + { + bitmap_value |= ZCL_BITMAP_SAFETY_STATUS_MOTOR_JAMMED; + } + if (value["HardwareFailure"].get()) + { + bitmap_value |= ZCL_BITMAP_SAFETY_STATUS_HARDWARE_FAILURE; + } + if (value["ManualOperation"].get()) + { + bitmap_value |= ZCL_BITMAP_SAFETY_STATUS_MANUAL_OPERATION; + } + if (value["Protection"].get()) + { + bitmap_value |= ZCL_BITMAP_SAFETY_STATUS_PROTECTION; + } + return bitmap_value; + } catch (const nlohmann::json::exception & e) + { + sl_log_warning(LOG_TAG, "Failed to parse bitmap %s, error %s", value.dump().c_str(), e.what()); + return std::nullopt; + } +} + +std::optional from_json_SceneFeatures(const nlohmann::json & value) +{ + uint32_t bitmap_value = 0x00; + try + { + if (value["SceneNames"].get()) + { + bitmap_value |= ZCL_BITMAP_SCENE_FEATURES_SCENE_NAMES; + } + return bitmap_value; + } catch (const nlohmann::json::exception & e) + { + sl_log_warning(LOG_TAG, "Failed to parse bitmap %s, error %s", value.dump().c_str(), e.what()); + return std::nullopt; + } +} + +std::optional from_json_ScenesCopyMode(const nlohmann::json & value) +{ + uint8_t bitmap_value = 0x00; + try + { + if (value["CopyAllScenes"].get()) + { + bitmap_value |= ZCL_BITMAP_SCENES_COPY_MODE_COPY_ALL_SCENES; + } + return bitmap_value; + } catch (const nlohmann::json::exception & e) + { + sl_log_warning(LOG_TAG, "Failed to parse bitmap %s, error %s", value.dump().c_str(), e.what()); + return std::nullopt; + } +} + +std::optional from_json_ShadeClosureStatus(const nlohmann::json & value) +{ + uint8_t bitmap_value = 0x00; + try + { + if (value["Operational"].get()) + { + bitmap_value |= ZCL_BITMAP_SHADE_CLOSURE_STATUS_OPERATIONAL; + } + if (value["Adjusting"].get()) + { + bitmap_value |= ZCL_BITMAP_SHADE_CLOSURE_STATUS_ADJUSTING; + } + if (value["Opening"].get()) + { + bitmap_value |= ZCL_BITMAP_SHADE_CLOSURE_STATUS_OPENING; + } + if (value["MotorOpening"].get()) + { + bitmap_value |= ZCL_BITMAP_SHADE_CLOSURE_STATUS_MOTOR_OPENING; + } + return bitmap_value; + } catch (const nlohmann::json::exception & e) + { + sl_log_warning(LOG_TAG, "Failed to parse bitmap %s, error %s", value.dump().c_str(), e.what()); + return std::nullopt; + } +} + +std::optional from_json_SimpleBitmap(const nlohmann::json & value) +{ + uint8_t bitmap_value = 0x00; + try + { + if (value["ValueA"].get()) + { + bitmap_value |= ZCL_BITMAP_SIMPLE_BITMAP_VALUE_A; + } + if (value["ValueB"].get()) + { + bitmap_value |= ZCL_BITMAP_SIMPLE_BITMAP_VALUE_B; + } + if (value["ValueC"].get()) + { + bitmap_value |= ZCL_BITMAP_SIMPLE_BITMAP_VALUE_C; + } + return bitmap_value; + } catch (const nlohmann::json::exception & e) + { + sl_log_warning(LOG_TAG, "Failed to parse bitmap %s, error %s", value.dump().c_str(), e.what()); + return std::nullopt; + } +} + +std::optional from_json_SoftwareDiagnosticsFeature(const nlohmann::json & value) +{ + uint32_t bitmap_value = 0x00; + try + { + if (value["WaterMarks"].get()) + { + bitmap_value |= ZCL_BITMAP_SOFTWARE_DIAGNOSTICS_FEATURE_WATER_MARKS; + } + return bitmap_value; + } catch (const nlohmann::json::exception & e) + { + sl_log_warning(LOG_TAG, "Failed to parse bitmap %s, error %s", value.dump().c_str(), e.what()); + return std::nullopt; + } +} + +std::optional from_json_SquawkInfo(const nlohmann::json & value) +{ + uint8_t bitmap_value = 0x00; + try + { + if (value["Mode"].get()) + { + bitmap_value |= ZCL_BITMAP_SQUAWK_INFO_MODE; + } + if (value["Strobe"].get()) + { + bitmap_value |= ZCL_BITMAP_SQUAWK_INFO_STROBE; + } + if (value["Level"].get()) + { + bitmap_value |= ZCL_BITMAP_SQUAWK_INFO_LEVEL; + } + return bitmap_value; + } catch (const nlohmann::json::exception & e) + { + sl_log_warning(LOG_TAG, "Failed to parse bitmap %s, error %s", value.dump().c_str(), e.what()); + return std::nullopt; + } +} + +std::optional from_json_StartTime(const nlohmann::json & value) +{ + uint16_t bitmap_value = 0x00; + try + { + if (value["Minutes"].get()) + { + bitmap_value |= ZCL_BITMAP_START_TIME_MINUTES; + } + if (value["TimeEncoding"].get()) + { + bitmap_value |= ZCL_BITMAP_START_TIME_TIME_ENCODING; + } + if (value["Hours"].get()) + { + bitmap_value |= ZCL_BITMAP_START_TIME_HOURS; + } + return bitmap_value; + } catch (const nlohmann::json::exception & e) + { + sl_log_warning(LOG_TAG, "Failed to parse bitmap %s, error %s", value.dump().c_str(), e.what()); + return std::nullopt; + } +} + +std::optional from_json_SupportedStreamingProtocol(const nlohmann::json & value) +{ + uint32_t bitmap_value = 0x00; + try + { + if (value["Dash"].get()) + { + bitmap_value |= ZCL_BITMAP_SUPPORTED_STREAMING_PROTOCOL_DASH; + } + if (value["Hls"].get()) + { + bitmap_value |= ZCL_BITMAP_SUPPORTED_STREAMING_PROTOCOL_HLS; + } + return bitmap_value; + } catch (const nlohmann::json::exception & e) + { + sl_log_warning(LOG_TAG, "Failed to parse bitmap %s, error %s", value.dump().c_str(), e.what()); + return std::nullopt; + } +} + +std::optional from_json_SwitchFeature(const nlohmann::json & value) +{ + uint32_t bitmap_value = 0x00; + try + { + if (value["LatchingSwitch"].get()) + { + bitmap_value |= ZCL_BITMAP_SWITCH_FEATURE_LATCHING_SWITCH; + } + if (value["MomentarySwitch"].get()) + { + bitmap_value |= ZCL_BITMAP_SWITCH_FEATURE_MOMENTARY_SWITCH; + } + if (value["MomentarySwitchRelease"].get()) + { + bitmap_value |= ZCL_BITMAP_SWITCH_FEATURE_MOMENTARY_SWITCH_RELEASE; + } + if (value["MomentarySwitchLongPress"].get()) + { + bitmap_value |= ZCL_BITMAP_SWITCH_FEATURE_MOMENTARY_SWITCH_LONG_PRESS; + } + if (value["MomentarySwitchMultiPress"].get()) + { + bitmap_value |= ZCL_BITMAP_SWITCH_FEATURE_MOMENTARY_SWITCH_MULTI_PRESS; + } + return bitmap_value; + } catch (const nlohmann::json::exception & e) + { + sl_log_warning(LOG_TAG, "Failed to parse bitmap %s, error %s", value.dump().c_str(), e.what()); + return std::nullopt; + } +} + +std::optional from_json_ThermostatAlarmMask(const nlohmann::json & value) +{ + uint8_t bitmap_value = 0x00; + try + { + if (value["InitializationFailure"].get()) + { + bitmap_value |= ZCL_BITMAP_THERMOSTAT_ALARM_MASK_INITIALIZATION_FAILURE; + } + if (value["HardwareFailure"].get()) + { + bitmap_value |= ZCL_BITMAP_THERMOSTAT_ALARM_MASK_HARDWARE_FAILURE; + } + if (value["SelfcalibrationFailure"].get()) + { + bitmap_value |= ZCL_BITMAP_THERMOSTAT_ALARM_MASK_SELFCALIBRATION_FAILURE; + } + return bitmap_value; + } catch (const nlohmann::json::exception & e) + { + sl_log_warning(LOG_TAG, "Failed to parse bitmap %s, error %s", value.dump().c_str(), e.what()); + return std::nullopt; + } +} + +std::optional from_json_ThermostatFeature(const nlohmann::json & value) +{ + uint32_t bitmap_value = 0x00; + try + { + if (value["Heating"].get()) + { + bitmap_value |= ZCL_BITMAP_THERMOSTAT_FEATURE_HEATING; + } + if (value["Cooling"].get()) + { + bitmap_value |= ZCL_BITMAP_THERMOSTAT_FEATURE_COOLING; + } + if (value["Occupancy"].get()) + { + bitmap_value |= ZCL_BITMAP_THERMOSTAT_FEATURE_OCCUPANCY; + } + if (value["Schedule"].get()) + { + bitmap_value |= ZCL_BITMAP_THERMOSTAT_FEATURE_SCHEDULE; + } + if (value["Setback"].get()) + { + bitmap_value |= ZCL_BITMAP_THERMOSTAT_FEATURE_SETBACK; + } + if (value["Automode"].get()) + { + bitmap_value |= ZCL_BITMAP_THERMOSTAT_FEATURE_AUTOMODE; + } + return bitmap_value; + } catch (const nlohmann::json::exception & e) + { + sl_log_warning(LOG_TAG, "Failed to parse bitmap %s, error %s", value.dump().c_str(), e.what()); + return std::nullopt; + } +} + +std::optional from_json_ThermostatOccupancy(const nlohmann::json & value) +{ + uint8_t bitmap_value = 0x00; + try + { + if (value["SensedOccupancy"].get()) + { + bitmap_value |= ZCL_BITMAP_THERMOSTAT_OCCUPANCY_OCCUPIED; + } + return bitmap_value; + } catch (const nlohmann::json::exception & e) + { + sl_log_warning(LOG_TAG, "Failed to parse bitmap %s, error %s", value.dump().c_str(), e.what()); + return std::nullopt; + } +} + +std::optional from_json_ThermostatRunningState(const nlohmann::json & value) +{ + uint16_t bitmap_value = 0x00; + try + { + if (value["HeatStateOn"].get()) + { + bitmap_value |= ZCL_BITMAP_THERMOSTAT_RUNNING_STATE_HEAT_STATE_ON; + } + if (value["CoolStateOn"].get()) + { + bitmap_value |= ZCL_BITMAP_THERMOSTAT_RUNNING_STATE_COOL_STATE_ON; + } + if (value["FanStateOn"].get()) + { + bitmap_value |= ZCL_BITMAP_THERMOSTAT_RUNNING_STATE_FAN_STATE_ON; + } + if (value["HeatSecondStageStateOn"].get()) + { + bitmap_value |= ZCL_BITMAP_THERMOSTAT_RUNNING_STATE_HEAT_SECOND_STAGE_STATE_ON; + } + if (value["CoolSecondStageStateOn"].get()) + { + bitmap_value |= ZCL_BITMAP_THERMOSTAT_RUNNING_STATE_COOL_SECOND_STAGE_STATE_ON; + } + if (value["FanSecondStageStateOn"].get()) + { + bitmap_value |= ZCL_BITMAP_THERMOSTAT_RUNNING_STATE_FAN_SECOND_STAGE_STATE_ON; + } + if (value["FanThirdStageStateOn"].get()) + { + bitmap_value |= ZCL_BITMAP_THERMOSTAT_RUNNING_STATE_FAN_THIRD_STAGE_STATE_ON; + } + return bitmap_value; + } catch (const nlohmann::json::exception & e) + { + sl_log_warning(LOG_TAG, "Failed to parse bitmap %s, error %s", value.dump().c_str(), e.what()); + return std::nullopt; + } +} + +std::optional from_json_ThermostatSensing(const nlohmann::json & value) +{ + uint8_t bitmap_value = 0x00; + try + { + if (value["LocalTempSensedRemotely"].get()) + { + bitmap_value |= ZCL_BITMAP_THERMOSTAT_SENSING_LOCAL_TEMP_SENSED_REMOTELY; + } + if (value["OutdoorTempSensedRemotely"].get()) + { + bitmap_value |= ZCL_BITMAP_THERMOSTAT_SENSING_OUTDOOR_TEMP_SENSED_REMOTELY; + } + if (value["OccupancySensedRemotely"].get()) + { + bitmap_value |= ZCL_BITMAP_THERMOSTAT_SENSING_OCCUPANCY_SENSED_REMOTELY; + } + return bitmap_value; + } catch (const nlohmann::json::exception & e) + { + sl_log_warning(LOG_TAG, "Failed to parse bitmap %s, error %s", value.dump().c_str(), e.what()); + return std::nullopt; + } +} + +std::optional from_json_ThreadNetworkDiagnosticsFeature(const nlohmann::json & value) +{ + uint32_t bitmap_value = 0x00; + try + { + if (value["PacketCounts"].get()) + { + bitmap_value |= ZCL_BITMAP_THREAD_NETWORK_DIAGNOSTICS_FEATURE_PACKET_COUNTS; + } + if (value["ErrorCounts"].get()) + { + bitmap_value |= ZCL_BITMAP_THREAD_NETWORK_DIAGNOSTICS_FEATURE_ERROR_COUNTS; + } + if (value["MLECounts"].get()) + { + bitmap_value |= ZCL_BITMAP_THREAD_NETWORK_DIAGNOSTICS_FEATURE_MLE_COUNTS; + } + if (value["MACCounts"].get()) + { + bitmap_value |= ZCL_BITMAP_THREAD_NETWORK_DIAGNOSTICS_FEATURE_MAC_COUNTS; + } + return bitmap_value; + } catch (const nlohmann::json::exception & e) + { + sl_log_warning(LOG_TAG, "Failed to parse bitmap %s, error %s", value.dump().c_str(), e.what()); + return std::nullopt; + } +} + +std::optional from_json_TimeStatusMask(const nlohmann::json & value) +{ + uint8_t bitmap_value = 0x00; + try + { + if (value["MasterClock"].get()) + { + bitmap_value |= ZCL_BITMAP_TIME_STATUS_MASK_MASTER_CLOCK; + } + if (value["Synchronized"].get()) + { + bitmap_value |= ZCL_BITMAP_TIME_STATUS_MASK_SYNCHRONIZED; + } + if (value["MasterZoneDst"].get()) + { + bitmap_value |= ZCL_BITMAP_TIME_STATUS_MASK_MASTER_ZONE_DST; + } + if (value["Superseding"].get()) + { + bitmap_value |= ZCL_BITMAP_TIME_STATUS_MASK_SUPERSEDING; + } + return bitmap_value; + } catch (const nlohmann::json::exception & e) + { + sl_log_warning(LOG_TAG, "Failed to parse bitmap %s, error %s", value.dump().c_str(), e.what()); + return std::nullopt; + } +} + +std::optional from_json_UnitLocalizationFeature(const nlohmann::json & value) +{ + uint32_t bitmap_value = 0x00; + try + { + if (value["TemperatureUnit"].get()) + { + bitmap_value |= ZCL_BITMAP_UNIT_LOCALIZATION_FEATURE_TEMPERATURE_UNIT; + } + return bitmap_value; + } catch (const nlohmann::json::exception & e) + { + sl_log_warning(LOG_TAG, "Failed to parse bitmap %s, error %s", value.dump().c_str(), e.what()); + return std::nullopt; + } +} + +std::optional from_json_WarningInfo(const nlohmann::json & value) +{ + uint8_t bitmap_value = 0x00; + try + { + if (value["Mode"].get()) + { + bitmap_value |= ZCL_BITMAP_WARNING_INFO_MODE; + } + if (value["Strobe"].get()) + { + bitmap_value |= ZCL_BITMAP_WARNING_INFO_STROBE; + } + if (value["SirenLevel"].get()) + { + bitmap_value |= ZCL_BITMAP_WARNING_INFO_SIREN_LEVEL; + } + return bitmap_value; + } catch (const nlohmann::json::exception & e) + { + sl_log_warning(LOG_TAG, "Failed to parse bitmap %s, error %s", value.dump().c_str(), e.what()); + return std::nullopt; + } +} + +std::optional from_json_WiFiNetworkDiagnosticsFeature(const nlohmann::json & value) +{ + uint32_t bitmap_value = 0x00; + try + { + if (value["PacketCounts"].get()) + { + bitmap_value |= ZCL_BITMAP_WI_FI_NETWORK_DIAGNOSTICS_FEATURE_PACKET_COUNTS; + } + if (value["ErrorCounts"].get()) + { + bitmap_value |= ZCL_BITMAP_WI_FI_NETWORK_DIAGNOSTICS_FEATURE_ERROR_COUNTS; + } + return bitmap_value; + } catch (const nlohmann::json::exception & e) + { + sl_log_warning(LOG_TAG, "Failed to parse bitmap %s, error %s", value.dump().c_str(), e.what()); + return std::nullopt; + } +} + +std::optional from_json_WiFiSecurity(const nlohmann::json & value) +{ + uint8_t bitmap_value = 0x00; + try + { + if (value["Unencrypted"].get()) + { + bitmap_value |= ZCL_BITMAP_WI_FI_SECURITY_UNENCRYPTED; + } + if (value["WepPersonal"].get()) + { + bitmap_value |= ZCL_BITMAP_WI_FI_SECURITY_WEP_PERSONAL; + } + if (value["WpaPersonal"].get()) + { + bitmap_value |= ZCL_BITMAP_WI_FI_SECURITY_WPA_PERSONAL; + } + if (value["Wpa2Personal"].get()) + { + bitmap_value |= ZCL_BITMAP_WI_FI_SECURITY_WPA2_PERSONAL; + } + if (value["Wpa3Personal"].get()) + { + bitmap_value |= ZCL_BITMAP_WI_FI_SECURITY_WPA3_PERSONAL; + } + return bitmap_value; + } catch (const nlohmann::json::exception & e) + { + sl_log_warning(LOG_TAG, "Failed to parse bitmap %s, error %s", value.dump().c_str(), e.what()); + return std::nullopt; + } +} + +std::optional from_json_WindSettingMask(const nlohmann::json & value) +{ + uint8_t bitmap_value = 0x00; + try + { + if (value["SleepWind"].get()) + { + bitmap_value |= ZCL_BITMAP_WIND_SETTING_MASK_SLEEP_WIND; + } + if (value["NaturalWind"].get()) + { + bitmap_value |= ZCL_BITMAP_WIND_SETTING_MASK_NATURAL_WIND; + } + return bitmap_value; + } catch (const nlohmann::json::exception & e) + { + sl_log_warning(LOG_TAG, "Failed to parse bitmap %s, error %s", value.dump().c_str(), e.what()); + return std::nullopt; + } +} + +std::optional from_json_WindSupportMask(const nlohmann::json & value) +{ + uint8_t bitmap_value = 0x00; + try + { + if (value["SleepWind"].get()) + { + bitmap_value |= ZCL_BITMAP_WIND_SUPPORT_MASK_SLEEP_WIND; + } + if (value["NaturalWind"].get()) + { + bitmap_value |= ZCL_BITMAP_WIND_SUPPORT_MASK_NATURAL_WIND; + } + return bitmap_value; + } catch (const nlohmann::json::exception & e) + { + sl_log_warning(LOG_TAG, "Failed to parse bitmap %s, error %s", value.dump().c_str(), e.what()); + return std::nullopt; + } +} + +std::optional from_json_bitmap16(const nlohmann::json & value) +{ + uint16_t bitmap_value = 0x00; + try + { + return bitmap_value; + } catch (const nlohmann::json::exception & e) + { + sl_log_warning(LOG_TAG, "Failed to parse bitmap %s, error %s", value.dump().c_str(), e.what()); + return std::nullopt; + } +} + +std::optional from_json_bitmap24(const nlohmann::json & value) +{ + uint32_t bitmap_value = 0x00; + try + { + return bitmap_value; + } catch (const nlohmann::json::exception & e) + { + sl_log_warning(LOG_TAG, "Failed to parse bitmap %s, error %s", value.dump().c_str(), e.what()); + return std::nullopt; + } +} + +std::optional from_json_bitmap32(const nlohmann::json & value) +{ + uint32_t bitmap_value = 0x00; + try + { + return bitmap_value; + } catch (const nlohmann::json::exception & e) + { + sl_log_warning(LOG_TAG, "Failed to parse bitmap %s, error %s", value.dump().c_str(), e.what()); + return std::nullopt; + } +} + +std::optional from_json_bitmap64(const nlohmann::json & value) +{ + uint64_t bitmap_value = 0x00; + try + { + return bitmap_value; + } catch (const nlohmann::json::exception & e) + { + sl_log_warning(LOG_TAG, "Failed to parse bitmap %s, error %s", value.dump().c_str(), e.what()); + return std::nullopt; + } +} + +std::optional from_json_bitmap8(const nlohmann::json & value) +{ + uint8_t bitmap_value = 0x00; + try + { + return bitmap_value; + } catch (const nlohmann::json::exception & e) + { + sl_log_warning(LOG_TAG, "Failed to parse bitmap %s, error %s", value.dump().c_str(), e.what()); + return std::nullopt; + } +} diff --git a/silabs_examples/unify-matter-bridge/linux/zap-handlers/gen/chip_types_to_json.hpp b/silabs_examples/unify-matter-bridge/linux/zap-handlers/gen/chip_types_to_json.hpp index 3e8c2ebef57e8e..9726ed3d2c56d9 100644 --- a/silabs_examples/unify-matter-bridge/linux/zap-handlers/gen/chip_types_to_json.hpp +++ b/silabs_examples/unify-matter-bridge/linux/zap-handlers/gen/chip_types_to_json.hpp @@ -69,7 +69,7 @@ nlohmann::json inline to_json(const uint64_t & value) template nlohmann::json inline to_json(chip::app::DataModel::Nullable & value) { - if (value.HasValidValue()) + if ((!value.IsNull()) && value.HasValidValue()) { return to_json(value.Value()); } @@ -290,96 +290,6 @@ nlohmann::json inline to_json(const chip::app::Clusters::LevelControl::StepMode /***************************** Struct Converted FIXME**************/ // -/***************************** Bitmap Converter FIXME**************/ -// -// template<> nlohmann::json to_json(const chip::BitFlags& value) { -// return "{\"no bitmap support\"}"; -//} -// - -/***************************** Struct Converted FIXME**************/ -// -// template<> nlohmann::json inline to_json(const Actions::Structs::ActionStruct::Type& value) { -// return "no struct support"; -//} -// -// template<> nlohmann::json inline to_json(const Actions::Structs::EndpointListStruct::Type& value) { -// return "no struct support"; -//} -// - -template <> -nlohmann::json inline to_json(const chip::app::Clusters::Actions::ActionErrorEnum & value) -{ - switch (value) - { - case chip::app::Clusters::Actions::ActionErrorEnum::kUnknown: - return "Unknown"; - case chip::app::Clusters::Actions::ActionErrorEnum::kInterrupted: - return "Interrupted"; - default: - return "{}"; - } -} - -template <> -nlohmann::json inline to_json(const chip::app::Clusters::Actions::ActionStateEnum & value) -{ - switch (value) - { - case chip::app::Clusters::Actions::ActionStateEnum::kInactive: - return "Inactive"; - case chip::app::Clusters::Actions::ActionStateEnum::kActive: - return "Active"; - case chip::app::Clusters::Actions::ActionStateEnum::kPaused: - return "Paused"; - case chip::app::Clusters::Actions::ActionStateEnum::kDisabled: - return "Disabled"; - default: - return "{}"; - } -} - -template <> -nlohmann::json inline to_json(const chip::app::Clusters::Actions::ActionTypeEnum & value) -{ - switch (value) - { - case chip::app::Clusters::Actions::ActionTypeEnum::kOther: - return "Other"; - case chip::app::Clusters::Actions::ActionTypeEnum::kScene: - return "Scene"; - case chip::app::Clusters::Actions::ActionTypeEnum::kSequence: - return "Sequence"; - case chip::app::Clusters::Actions::ActionTypeEnum::kAutomation: - return "Automation"; - case chip::app::Clusters::Actions::ActionTypeEnum::kException: - return "Exception"; - case chip::app::Clusters::Actions::ActionTypeEnum::kNotification: - return "Notification"; - case chip::app::Clusters::Actions::ActionTypeEnum::kAlarm: - return "Alarm"; - default: - return "{}"; - } -} - -template <> -nlohmann::json inline to_json(const chip::app::Clusters::Actions::EndpointListTypeEnum & value) -{ - switch (value) - { - case chip::app::Clusters::Actions::EndpointListTypeEnum::kOther: - return "Other"; - case chip::app::Clusters::Actions::EndpointListTypeEnum::kRoom: - return "Room"; - case chip::app::Clusters::Actions::EndpointListTypeEnum::kZone: - return "Zone"; - default: - return "{}"; - } -} - /***************************** Bitmap Converter FIXME**************/ // @@ -1196,42 +1106,6 @@ nlohmann::json inline to_json(const chip::app::Clusters::WiFiNetworkDiagnostics: /***************************** Bitmap Converter FIXME**************/ // -/***************************** Struct Converted FIXME**************/ -// - -template <> -nlohmann::json inline to_json(const chip::app::Clusters::EthernetNetworkDiagnostics::PHYRateType & value) -{ - switch (value) - { - case chip::app::Clusters::EthernetNetworkDiagnostics::PHYRateType::k10m: - return "10m"; - case chip::app::Clusters::EthernetNetworkDiagnostics::PHYRateType::k100m: - return "100m"; - case chip::app::Clusters::EthernetNetworkDiagnostics::PHYRateType::k1000m: - return "1000m"; - case chip::app::Clusters::EthernetNetworkDiagnostics::PHYRateType::k25g: - return "25g"; - case chip::app::Clusters::EthernetNetworkDiagnostics::PHYRateType::k5g: - return "5g"; - case chip::app::Clusters::EthernetNetworkDiagnostics::PHYRateType::k10g: - return "10g"; - case chip::app::Clusters::EthernetNetworkDiagnostics::PHYRateType::k40g: - return "40g"; - case chip::app::Clusters::EthernetNetworkDiagnostics::PHYRateType::k100g: - return "100g"; - case chip::app::Clusters::EthernetNetworkDiagnostics::PHYRateType::k200g: - return "200g"; - case chip::app::Clusters::EthernetNetworkDiagnostics::PHYRateType::k400g: - return "400g"; - default: - return "{}"; - } -} - -/***************************** Bitmap Converter FIXME**************/ -// - /***************************** Struct Converted FIXME**************/ // // template<> nlohmann::json inline to_json(const TimeSynchronization::Structs::DstOffsetType::Type& value) { @@ -1307,12 +1181,6 @@ nlohmann::json inline to_json(const chip::app::Clusters::TimeSynchronization::Ti } } -/***************************** Bitmap Converter FIXME**************/ -// - -/***************************** Struct Converted FIXME**************/ -// - /***************************** Bitmap Converter FIXME**************/ // // template<> nlohmann::json to_json(const chip::BitFlags& value) { @@ -1326,44 +1194,6 @@ nlohmann::json inline to_json(const chip::app::Clusters::TimeSynchronization::Ti /***************************** Bitmap Converter FIXME**************/ // -/***************************** Struct Converted FIXME**************/ -// - -template <> -nlohmann::json inline to_json(const chip::app::Clusters::AdministratorCommissioning::CommissioningWindowStatus & value) -{ - switch (value) - { - case chip::app::Clusters::AdministratorCommissioning::CommissioningWindowStatus::kWindowNotOpen: - return "WindowNotOpen"; - case chip::app::Clusters::AdministratorCommissioning::CommissioningWindowStatus::kEnhancedWindowOpen: - return "EnhancedWindowOpen"; - case chip::app::Clusters::AdministratorCommissioning::CommissioningWindowStatus::kBasicWindowOpen: - return "BasicWindowOpen"; - default: - return "{}"; - } -} - -template <> -nlohmann::json inline to_json(const chip::app::Clusters::AdministratorCommissioning::StatusCode & value) -{ - switch (value) - { - case chip::app::Clusters::AdministratorCommissioning::StatusCode::kBusy: - return "Busy"; - case chip::app::Clusters::AdministratorCommissioning::StatusCode::kPAKEParameterError: - return "PAKEParameterError"; - case chip::app::Clusters::AdministratorCommissioning::StatusCode::kWindowNotOpen: - return "WindowNotOpen"; - default: - return "{}"; - } -} - -/***************************** Bitmap Converter FIXME**************/ -// - /***************************** Struct Converted FIXME**************/ // // template<> nlohmann::json inline to_json(const OperationalCredentials::Structs::FabricDescriptor::Type& value) { @@ -1847,7 +1677,7 @@ nlohmann::json inline to_json(const chip::app::Clusters::DoorLock::DlStatus & va case chip::app::Clusters::DoorLock::DlStatus::kDuplicate: return "Duplicate"; case chip::app::Clusters::DoorLock::DlStatus::kOccupied: - return "Occupied"; + return "SensedOccupancy"; case chip::app::Clusters::DoorLock::DlStatus::kInvalidField: return "InvalidField"; case chip::app::Clusters::DoorLock::DlStatus::kResourceExhausted: @@ -2151,56 +1981,6 @@ nlohmann::json inline to_json(const chip::app::Clusters::WindowCovering::Type & /***************************** Struct Converted FIXME**************/ // -/***************************** Bitmap Converter FIXME**************/ -// -// template<> nlohmann::json to_json(const chip::BitFlags& value) { -// return "{\"no bitmap support\"}"; -//} -// - -/***************************** Struct Converted FIXME**************/ -// - -template <> -nlohmann::json inline to_json(const chip::app::Clusters::PumpConfigurationAndControl::PumpControlMode & value) -{ - switch (value) - { - case chip::app::Clusters::PumpConfigurationAndControl::PumpControlMode::kConstantSpeed: - return "ConstantSpeed"; - case chip::app::Clusters::PumpConfigurationAndControl::PumpControlMode::kConstantPressure: - return "ConstantPressure"; - case chip::app::Clusters::PumpConfigurationAndControl::PumpControlMode::kProportionalPressure: - return "ProportionalPressure"; - case chip::app::Clusters::PumpConfigurationAndControl::PumpControlMode::kConstantFlow: - return "ConstantFlow"; - case chip::app::Clusters::PumpConfigurationAndControl::PumpControlMode::kConstantTemperature: - return "ConstantTemperature"; - case chip::app::Clusters::PumpConfigurationAndControl::PumpControlMode::kAutomatic: - return "Automatic"; - default: - return "{}"; - } -} - -template <> -nlohmann::json inline to_json(const chip::app::Clusters::PumpConfigurationAndControl::PumpOperationMode & value) -{ - switch (value) - { - case chip::app::Clusters::PumpConfigurationAndControl::PumpOperationMode::kNormal: - return "Normal"; - case chip::app::Clusters::PumpConfigurationAndControl::PumpOperationMode::kMinimum: - return "Minimum"; - case chip::app::Clusters::PumpConfigurationAndControl::PumpOperationMode::kMaximum: - return "Maximum"; - case chip::app::Clusters::PumpConfigurationAndControl::PumpOperationMode::kLocal: - return "Local"; - default: - return "{}"; - } -} - /***************************** Bitmap Converter FIXME**************/ // // template<> nlohmann::json to_json(const chip::BitFlags& value) { @@ -2433,7 +2213,7 @@ nlohmann::json inline to_json(const chip::app::Clusters::ColorControl::ColorMode case chip::app::Clusters::ColorControl::ColorMode::kCurrentXAndCurrentY: return "CurrentXAndCurrentY"; case chip::app::Clusters::ColorControl::ColorMode::kColorTemperature: - return "ColorTemperature"; + return "ColorTemperatureMireds"; default: return "{}"; } @@ -2523,12 +2303,6 @@ nlohmann::json inline to_json(const chip::app::Clusters::ColorControl::Saturatio /***************************** Struct Converted FIXME**************/ // -/***************************** Bitmap Converter FIXME**************/ -// - -/***************************** Struct Converted FIXME**************/ -// - template <> nlohmann::json inline to_json(const chip::app::Clusters::IlluminanceMeasurement::LightSensorType & value) { @@ -3184,29 +2958,3 @@ nlohmann::json inline to_json(const chip::app::Clusters::ApplicationBasic::Appli /***************************** Struct Converted FIXME**************/ // - -/***************************** Bitmap Converter FIXME**************/ -// - -/***************************** Struct Converted FIXME**************/ -// - -template <> -nlohmann::json inline to_json(const chip::app::Clusters::FaultInjection::FaultType & value) -{ - switch (value) - { - case chip::app::Clusters::FaultInjection::FaultType::kUnspecified: - return "Unspecified"; - case chip::app::Clusters::FaultInjection::FaultType::kSystemFault: - return "SystemFault"; - case chip::app::Clusters::FaultInjection::FaultType::kInetFault: - return "InetFault"; - case chip::app::Clusters::FaultInjection::FaultType::kChipFault: - return "ChipFault"; - case chip::app::Clusters::FaultInjection::FaultType::kCertFault: - return "CertFault"; - default: - return "{}"; - } -} diff --git a/silabs_examples/unify-matter-bridge/linux/zap-handlers/gen/command_translator.cpp b/silabs_examples/unify-matter-bridge/linux/zap-handlers/gen/command_translator.cpp index ac1a123d0fcea7..4b0bb916c16d16 100644 --- a/silabs_examples/unify-matter-bridge/linux/zap-handlers/gen/command_translator.cpp +++ b/silabs_examples/unify-matter-bridge/linux/zap-handlers/gen/command_translator.cpp @@ -425,24 +425,21 @@ void OnOffClusterCommandHandler::InvokeCommand(CommandHandlerInterface::HandlerC cmd = "Off"; Commands::Off::DecodableType data; if (DataModel::Decode(ctxt.GetReader(), data) == CHIP_NO_ERROR) - { - } + {} } break; case Commands::On::Id: { cmd = "On"; Commands::On::DecodableType data; if (DataModel::Decode(ctxt.GetReader(), data) == CHIP_NO_ERROR) - { - } + {} } break; case Commands::Toggle::Id: { cmd = "Toggle"; Commands::Toggle::DecodableType data; if (DataModel::Decode(ctxt.GetReader(), data) == CHIP_NO_ERROR) - { - } + {} } break; case Commands::OffWithEffect::Id: { @@ -471,8 +468,7 @@ void OnOffClusterCommandHandler::InvokeCommand(CommandHandlerInterface::HandlerC cmd = "OnWithRecallGlobalScene"; Commands::OnWithRecallGlobalScene::DecodableType data; if (DataModel::Decode(ctxt.GetReader(), data) == CHIP_NO_ERROR) - { - } + {} } break; case Commands::OnWithTimedOff::Id: { @@ -534,8 +530,7 @@ void OnOffSwitchConfigurationClusterCommandHandler::InvokeCommand(CommandHandler nlohmann::json payload = {}; switch (ctxt.mRequestPath.mCommandId) - { - } + {} if (!cmd.empty()) { @@ -885,8 +880,7 @@ void BinaryInputBasicClusterCommandHandler::InvokeCommand(CommandHandlerInterfac nlohmann::json payload = {}; switch (ctxt.mRequestPath.mCommandId) - { - } + {} if (!cmd.empty()) { @@ -916,374 +910,7 @@ void PulseWidthModulationClusterCommandHandler::InvokeCommand(CommandHandlerInte nlohmann::json payload = {}; switch (ctxt.mRequestPath.mCommandId) - { - } - - if (!cmd.empty()) - { - ctxt.mCommandHandler.AddStatus(ctxt.mRequestPath, Protocols::InteractionModel::Status::Success); - send_unify_mqtt_cmd(ctxt, cmd, payload); - sl_log_debug(LOG_TAG, "Mapped [%] command to unify dotdot data model", cmd.c_str()); - } - else - { - ctxt.mCommandHandler.AddStatus(ctxt.mRequestPath, Protocols::InteractionModel::Status::UnsupportedCommand); - } - ctxt.SetCommandHandled(); -} - -void ActionsClusterCommandHandler::InvokeCommand(CommandHandlerInterface::HandlerContext & ctxt) -{ - using namespace chip::app::Clusters::Actions; - - auto unify_node = m_node_state_monitor.bridged_endpoint(ctxt.mRequestPath.mEndpointId); - if (!unify_node) - { - sl_log_info(LOG_TAG, "The endpoint [%i] is not a part of unify matter bridge node", ctxt.mRequestPath.mEndpointId); - return; - } - - std::string cmd; - nlohmann::json payload = {}; - - switch (ctxt.mRequestPath.mCommandId) - { - case Commands::InstantAction::Id: { - cmd = "InstantAction"; - Commands::InstantAction::DecodableType data; - if (DataModel::Decode(ctxt.GetReader(), data) == CHIP_NO_ERROR) - { - try - { - payload["ActionID"] = to_json(data.actionID); - } catch (std::exception & ex) - { - sl_log_warning(LOG_TAG, "Failed to add the command argument value to json format: %s", ex.what()); - } - if (data.invokeID.HasValue()) - { - try - { - payload["InvokeID"] = to_json(data.invokeID.Value()); - } catch (std::exception & ex) - { - sl_log_warning(LOG_TAG, "Failed to add the command arguments value to json format: %s", ex.what()); - } - } - } - } - break; - case Commands::InstantActionWithTransition::Id: { - cmd = "InstantActionWithTransition"; - Commands::InstantActionWithTransition::DecodableType data; - if (DataModel::Decode(ctxt.GetReader(), data) == CHIP_NO_ERROR) - { - try - { - payload["ActionID"] = to_json(data.actionID); - } catch (std::exception & ex) - { - sl_log_warning(LOG_TAG, "Failed to add the command argument value to json format: %s", ex.what()); - } - if (data.invokeID.HasValue()) - { - try - { - payload["InvokeID"] = to_json(data.invokeID.Value()); - } catch (std::exception & ex) - { - sl_log_warning(LOG_TAG, "Failed to add the command arguments value to json format: %s", ex.what()); - } - } - try - { - payload["TransitionTime"] = to_json(data.transitionTime); - } catch (std::exception & ex) - { - sl_log_warning(LOG_TAG, "Failed to add the command argument value to json format: %s", ex.what()); - } - } - } - break; - case Commands::StartAction::Id: { - cmd = "StartAction"; - Commands::StartAction::DecodableType data; - if (DataModel::Decode(ctxt.GetReader(), data) == CHIP_NO_ERROR) - { - try - { - payload["ActionID"] = to_json(data.actionID); - } catch (std::exception & ex) - { - sl_log_warning(LOG_TAG, "Failed to add the command argument value to json format: %s", ex.what()); - } - if (data.invokeID.HasValue()) - { - try - { - payload["InvokeID"] = to_json(data.invokeID.Value()); - } catch (std::exception & ex) - { - sl_log_warning(LOG_TAG, "Failed to add the command arguments value to json format: %s", ex.what()); - } - } - } - } - break; - case Commands::StartActionWithDuration::Id: { - cmd = "StartActionWithDuration"; - Commands::StartActionWithDuration::DecodableType data; - if (DataModel::Decode(ctxt.GetReader(), data) == CHIP_NO_ERROR) - { - try - { - payload["ActionID"] = to_json(data.actionID); - } catch (std::exception & ex) - { - sl_log_warning(LOG_TAG, "Failed to add the command argument value to json format: %s", ex.what()); - } - if (data.invokeID.HasValue()) - { - try - { - payload["InvokeID"] = to_json(data.invokeID.Value()); - } catch (std::exception & ex) - { - sl_log_warning(LOG_TAG, "Failed to add the command arguments value to json format: %s", ex.what()); - } - } - try - { - payload["Duration"] = to_json(data.duration); - } catch (std::exception & ex) - { - sl_log_warning(LOG_TAG, "Failed to add the command argument value to json format: %s", ex.what()); - } - } - } - break; - case Commands::StopAction::Id: { - cmd = "StopAction"; - Commands::StopAction::DecodableType data; - if (DataModel::Decode(ctxt.GetReader(), data) == CHIP_NO_ERROR) - { - try - { - payload["ActionID"] = to_json(data.actionID); - } catch (std::exception & ex) - { - sl_log_warning(LOG_TAG, "Failed to add the command argument value to json format: %s", ex.what()); - } - if (data.invokeID.HasValue()) - { - try - { - payload["InvokeID"] = to_json(data.invokeID.Value()); - } catch (std::exception & ex) - { - sl_log_warning(LOG_TAG, "Failed to add the command arguments value to json format: %s", ex.what()); - } - } - } - } - break; - case Commands::PauseAction::Id: { - cmd = "PauseAction"; - Commands::PauseAction::DecodableType data; - if (DataModel::Decode(ctxt.GetReader(), data) == CHIP_NO_ERROR) - { - try - { - payload["ActionID"] = to_json(data.actionID); - } catch (std::exception & ex) - { - sl_log_warning(LOG_TAG, "Failed to add the command argument value to json format: %s", ex.what()); - } - if (data.invokeID.HasValue()) - { - try - { - payload["InvokeID"] = to_json(data.invokeID.Value()); - } catch (std::exception & ex) - { - sl_log_warning(LOG_TAG, "Failed to add the command arguments value to json format: %s", ex.what()); - } - } - } - } - break; - case Commands::PauseActionWithDuration::Id: { - cmd = "PauseActionWithDuration"; - Commands::PauseActionWithDuration::DecodableType data; - if (DataModel::Decode(ctxt.GetReader(), data) == CHIP_NO_ERROR) - { - try - { - payload["ActionID"] = to_json(data.actionID); - } catch (std::exception & ex) - { - sl_log_warning(LOG_TAG, "Failed to add the command argument value to json format: %s", ex.what()); - } - if (data.invokeID.HasValue()) - { - try - { - payload["InvokeID"] = to_json(data.invokeID.Value()); - } catch (std::exception & ex) - { - sl_log_warning(LOG_TAG, "Failed to add the command arguments value to json format: %s", ex.what()); - } - } - try - { - payload["Duration"] = to_json(data.duration); - } catch (std::exception & ex) - { - sl_log_warning(LOG_TAG, "Failed to add the command argument value to json format: %s", ex.what()); - } - } - } - break; - case Commands::ResumeAction::Id: { - cmd = "ResumeAction"; - Commands::ResumeAction::DecodableType data; - if (DataModel::Decode(ctxt.GetReader(), data) == CHIP_NO_ERROR) - { - try - { - payload["ActionID"] = to_json(data.actionID); - } catch (std::exception & ex) - { - sl_log_warning(LOG_TAG, "Failed to add the command argument value to json format: %s", ex.what()); - } - if (data.invokeID.HasValue()) - { - try - { - payload["InvokeID"] = to_json(data.invokeID.Value()); - } catch (std::exception & ex) - { - sl_log_warning(LOG_TAG, "Failed to add the command arguments value to json format: %s", ex.what()); - } - } - } - } - break; - case Commands::EnableAction::Id: { - cmd = "EnableAction"; - Commands::EnableAction::DecodableType data; - if (DataModel::Decode(ctxt.GetReader(), data) == CHIP_NO_ERROR) - { - try - { - payload["ActionID"] = to_json(data.actionID); - } catch (std::exception & ex) - { - sl_log_warning(LOG_TAG, "Failed to add the command argument value to json format: %s", ex.what()); - } - if (data.invokeID.HasValue()) - { - try - { - payload["InvokeID"] = to_json(data.invokeID.Value()); - } catch (std::exception & ex) - { - sl_log_warning(LOG_TAG, "Failed to add the command arguments value to json format: %s", ex.what()); - } - } - } - } - break; - case Commands::EnableActionWithDuration::Id: { - cmd = "EnableActionWithDuration"; - Commands::EnableActionWithDuration::DecodableType data; - if (DataModel::Decode(ctxt.GetReader(), data) == CHIP_NO_ERROR) - { - try - { - payload["ActionID"] = to_json(data.actionID); - } catch (std::exception & ex) - { - sl_log_warning(LOG_TAG, "Failed to add the command argument value to json format: %s", ex.what()); - } - if (data.invokeID.HasValue()) - { - try - { - payload["InvokeID"] = to_json(data.invokeID.Value()); - } catch (std::exception & ex) - { - sl_log_warning(LOG_TAG, "Failed to add the command arguments value to json format: %s", ex.what()); - } - } - try - { - payload["Duration"] = to_json(data.duration); - } catch (std::exception & ex) - { - sl_log_warning(LOG_TAG, "Failed to add the command argument value to json format: %s", ex.what()); - } - } - } - break; - case Commands::DisableAction::Id: { - cmd = "DisableAction"; - Commands::DisableAction::DecodableType data; - if (DataModel::Decode(ctxt.GetReader(), data) == CHIP_NO_ERROR) - { - try - { - payload["ActionID"] = to_json(data.actionID); - } catch (std::exception & ex) - { - sl_log_warning(LOG_TAG, "Failed to add the command argument value to json format: %s", ex.what()); - } - if (data.invokeID.HasValue()) - { - try - { - payload["InvokeID"] = to_json(data.invokeID.Value()); - } catch (std::exception & ex) - { - sl_log_warning(LOG_TAG, "Failed to add the command arguments value to json format: %s", ex.what()); - } - } - } - } - break; - case Commands::DisableActionWithDuration::Id: { - cmd = "DisableActionWithDuration"; - Commands::DisableActionWithDuration::DecodableType data; - if (DataModel::Decode(ctxt.GetReader(), data) == CHIP_NO_ERROR) - { - try - { - payload["ActionID"] = to_json(data.actionID); - } catch (std::exception & ex) - { - sl_log_warning(LOG_TAG, "Failed to add the command argument value to json format: %s", ex.what()); - } - if (data.invokeID.HasValue()) - { - try - { - payload["InvokeID"] = to_json(data.invokeID.Value()); - } catch (std::exception & ex) - { - sl_log_warning(LOG_TAG, "Failed to add the command arguments value to json format: %s", ex.what()); - } - } - try - { - payload["Duration"] = to_json(data.duration); - } catch (std::exception & ex) - { - sl_log_warning(LOG_TAG, "Failed to add the command argument value to json format: %s", ex.what()); - } - } - } - break; - } + {} if (!cmd.empty()) { @@ -1318,8 +945,7 @@ void BasicClusterCommandHandler::InvokeCommand(CommandHandlerInterface::HandlerC cmd = "MfgSpecificPing"; Commands::MfgSpecificPing::DecodableType data; if (DataModel::Decode(ctxt.GetReader(), data) == CHIP_NO_ERROR) - { - } + {} } break; } @@ -1580,8 +1206,7 @@ void LocalizationConfigurationClusterCommandHandler::InvokeCommand(CommandHandle nlohmann::json payload = {}; switch (ctxt.mRequestPath.mCommandId) - { - } + {} if (!cmd.empty()) { @@ -1611,8 +1236,7 @@ void TimeFormatLocalizationClusterCommandHandler::InvokeCommand(CommandHandlerIn nlohmann::json payload = {}; switch (ctxt.mRequestPath.mCommandId) - { - } + {} if (!cmd.empty()) { @@ -1642,8 +1266,7 @@ void UnitLocalizationClusterCommandHandler::InvokeCommand(CommandHandlerInterfac nlohmann::json payload = {}; switch (ctxt.mRequestPath.mCommandId) - { - } + {} if (!cmd.empty()) { @@ -1673,8 +1296,7 @@ void PowerSourceConfigurationClusterCommandHandler::InvokeCommand(CommandHandler nlohmann::json payload = {}; switch (ctxt.mRequestPath.mCommandId) - { - } + {} if (!cmd.empty()) { @@ -1704,8 +1326,7 @@ void PowerSourceClusterCommandHandler::InvokeCommand(CommandHandlerInterface::Ha nlohmann::json payload = {}; switch (ctxt.mRequestPath.mCommandId) - { - } + {} if (!cmd.empty()) { @@ -1791,8 +1412,7 @@ void GeneralCommissioningClusterCommandHandler::InvokeCommand(CommandHandlerInte cmd = "CommissioningComplete"; Commands::CommissioningComplete::DecodableType data; if (DataModel::Decode(ctxt.GetReader(), data) == CHIP_NO_ERROR) - { - } + {} } break; } @@ -1943,8 +1563,7 @@ void SoftwareDiagnosticsClusterCommandHandler::InvokeCommand(CommandHandlerInter cmd = "ResetWatermarks"; Commands::ResetWatermarks::DecodableType data; if (DataModel::Decode(ctxt.GetReader(), data) == CHIP_NO_ERROR) - { - } + {} } break; } @@ -1982,8 +1601,7 @@ void ThreadNetworkDiagnosticsClusterCommandHandler::InvokeCommand(CommandHandler cmd = "ResetCounts"; Commands::ResetCounts::DecodableType data; if (DataModel::Decode(ctxt.GetReader(), data) == CHIP_NO_ERROR) - { - } + {} } break; } @@ -2021,47 +1639,7 @@ void WiFiNetworkDiagnosticsClusterCommandHandler::InvokeCommand(CommandHandlerIn cmd = "ResetCounts"; Commands::ResetCounts::DecodableType data; if (DataModel::Decode(ctxt.GetReader(), data) == CHIP_NO_ERROR) - { - } - } - break; - } - - if (!cmd.empty()) - { - ctxt.mCommandHandler.AddStatus(ctxt.mRequestPath, Protocols::InteractionModel::Status::Success); - send_unify_mqtt_cmd(ctxt, cmd, payload); - sl_log_debug(LOG_TAG, "Mapped [%] command to unify dotdot data model", cmd.c_str()); - } - else - { - ctxt.mCommandHandler.AddStatus(ctxt.mRequestPath, Protocols::InteractionModel::Status::UnsupportedCommand); - } - ctxt.SetCommandHandled(); -} - -void EthernetNetworkDiagnosticsClusterCommandHandler::InvokeCommand(CommandHandlerInterface::HandlerContext & ctxt) -{ - using namespace chip::app::Clusters::EthernetNetworkDiagnostics; - - auto unify_node = m_node_state_monitor.bridged_endpoint(ctxt.mRequestPath.mEndpointId); - if (!unify_node) - { - sl_log_info(LOG_TAG, "The endpoint [%i] is not a part of unify matter bridge node", ctxt.mRequestPath.mEndpointId); - return; - } - - std::string cmd; - nlohmann::json payload = {}; - - switch (ctxt.mRequestPath.mCommandId) - { - case Commands::ResetCounts::Id: { - cmd = "ResetCounts"; - Commands::ResetCounts::DecodableType data; - if (DataModel::Decode(ctxt.GetReader(), data) == CHIP_NO_ERROR) - { - } + {} } break; } @@ -2109,185 +1687,56 @@ void TimeSynchronizationClusterCommandHandler::InvokeCommand(CommandHandlerInter } try { - payload["Granularity"] = to_json(data.granularity); - } catch (std::exception & ex) - { - sl_log_warning(LOG_TAG, "Failed to add the command argument value to json format: %s", ex.what()); - } - if (data.timeSource.HasValue()) - { - try - { - payload["TimeSource"] = to_json(data.timeSource.Value()); - } catch (std::exception & ex) - { - sl_log_warning(LOG_TAG, "Failed to add the command arguments value to json format: %s", ex.what()); - } - } - } - } - break; - } - - if (!cmd.empty()) - { - ctxt.mCommandHandler.AddStatus(ctxt.mRequestPath, Protocols::InteractionModel::Status::Success); - send_unify_mqtt_cmd(ctxt, cmd, payload); - sl_log_debug(LOG_TAG, "Mapped [%] command to unify dotdot data model", cmd.c_str()); - } - else - { - ctxt.mCommandHandler.AddStatus(ctxt.mRequestPath, Protocols::InteractionModel::Status::UnsupportedCommand); - } - ctxt.SetCommandHandled(); -} - -void BridgedDeviceBasicClusterCommandHandler::InvokeCommand(CommandHandlerInterface::HandlerContext & ctxt) -{ - using namespace chip::app::Clusters::BridgedDeviceBasic; - - auto unify_node = m_node_state_monitor.bridged_endpoint(ctxt.mRequestPath.mEndpointId); - if (!unify_node) - { - sl_log_info(LOG_TAG, "The endpoint [%i] is not a part of unify matter bridge node", ctxt.mRequestPath.mEndpointId); - return; - } - - std::string cmd; - nlohmann::json payload = {}; - - switch (ctxt.mRequestPath.mCommandId) - { - } - - if (!cmd.empty()) - { - ctxt.mCommandHandler.AddStatus(ctxt.mRequestPath, Protocols::InteractionModel::Status::Success); - send_unify_mqtt_cmd(ctxt, cmd, payload); - sl_log_debug(LOG_TAG, "Mapped [%] command to unify dotdot data model", cmd.c_str()); - } - else - { - ctxt.mCommandHandler.AddStatus(ctxt.mRequestPath, Protocols::InteractionModel::Status::UnsupportedCommand); - } - ctxt.SetCommandHandled(); -} - -void SwitchClusterCommandHandler::InvokeCommand(CommandHandlerInterface::HandlerContext & ctxt) -{ - using namespace chip::app::Clusters::Switch; - - auto unify_node = m_node_state_monitor.bridged_endpoint(ctxt.mRequestPath.mEndpointId); - if (!unify_node) - { - sl_log_info(LOG_TAG, "The endpoint [%i] is not a part of unify matter bridge node", ctxt.mRequestPath.mEndpointId); - return; - } - - std::string cmd; - nlohmann::json payload = {}; - - switch (ctxt.mRequestPath.mCommandId) - { - } - - if (!cmd.empty()) - { - ctxt.mCommandHandler.AddStatus(ctxt.mRequestPath, Protocols::InteractionModel::Status::Success); - send_unify_mqtt_cmd(ctxt, cmd, payload); - sl_log_debug(LOG_TAG, "Mapped [%] command to unify dotdot data model", cmd.c_str()); - } - else - { - ctxt.mCommandHandler.AddStatus(ctxt.mRequestPath, Protocols::InteractionModel::Status::UnsupportedCommand); - } - ctxt.SetCommandHandled(); -} - -void AdministratorCommissioningClusterCommandHandler::InvokeCommand(CommandHandlerInterface::HandlerContext & ctxt) -{ - using namespace chip::app::Clusters::AdministratorCommissioning; - - auto unify_node = m_node_state_monitor.bridged_endpoint(ctxt.mRequestPath.mEndpointId); - if (!unify_node) - { - sl_log_info(LOG_TAG, "The endpoint [%i] is not a part of unify matter bridge node", ctxt.mRequestPath.mEndpointId); - return; - } - - std::string cmd; - nlohmann::json payload = {}; - - switch (ctxt.mRequestPath.mCommandId) - { - case Commands::OpenCommissioningWindow::Id: { - cmd = "OpenCommissioningWindow"; - Commands::OpenCommissioningWindow::DecodableType data; - if (DataModel::Decode(ctxt.GetReader(), data) == CHIP_NO_ERROR) - { - try - { - payload["CommissioningTimeout"] = to_json(data.commissioningTimeout); - } catch (std::exception & ex) - { - sl_log_warning(LOG_TAG, "Failed to add the command argument value to json format: %s", ex.what()); - } - try - { - payload["PAKEVerifier"] = to_json(data.PAKEVerifier); - } catch (std::exception & ex) - { - sl_log_warning(LOG_TAG, "Failed to add the command argument value to json format: %s", ex.what()); - } - try - { - payload["Discriminator"] = to_json(data.discriminator); - } catch (std::exception & ex) - { - sl_log_warning(LOG_TAG, "Failed to add the command argument value to json format: %s", ex.what()); - } - try - { - payload["Iterations"] = to_json(data.iterations); - } catch (std::exception & ex) - { - sl_log_warning(LOG_TAG, "Failed to add the command argument value to json format: %s", ex.what()); - } - try - { - payload["Salt"] = to_json(data.salt); - } catch (std::exception & ex) - { - sl_log_warning(LOG_TAG, "Failed to add the command argument value to json format: %s", ex.what()); - } - } - } - break; - case Commands::OpenBasicCommissioningWindow::Id: { - cmd = "OpenBasicCommissioningWindow"; - Commands::OpenBasicCommissioningWindow::DecodableType data; - if (DataModel::Decode(ctxt.GetReader(), data) == CHIP_NO_ERROR) - { - try - { - payload["CommissioningTimeout"] = to_json(data.commissioningTimeout); + payload["Granularity"] = to_json(data.granularity); } catch (std::exception & ex) { sl_log_warning(LOG_TAG, "Failed to add the command argument value to json format: %s", ex.what()); } + if (data.timeSource.HasValue()) + { + try + { + payload["TimeSource"] = to_json(data.timeSource.Value()); + } catch (std::exception & ex) + { + sl_log_warning(LOG_TAG, "Failed to add the command arguments value to json format: %s", ex.what()); + } + } } } break; - case Commands::RevokeCommissioning::Id: { - cmd = "RevokeCommissioning"; - Commands::RevokeCommissioning::DecodableType data; - if (DataModel::Decode(ctxt.GetReader(), data) == CHIP_NO_ERROR) - { - } } - break; + + if (!cmd.empty()) + { + ctxt.mCommandHandler.AddStatus(ctxt.mRequestPath, Protocols::InteractionModel::Status::Success); + send_unify_mqtt_cmd(ctxt, cmd, payload); + sl_log_debug(LOG_TAG, "Mapped [%] command to unify dotdot data model", cmd.c_str()); + } + else + { + ctxt.mCommandHandler.AddStatus(ctxt.mRequestPath, Protocols::InteractionModel::Status::UnsupportedCommand); + } + ctxt.SetCommandHandled(); +} + +void SwitchClusterCommandHandler::InvokeCommand(CommandHandlerInterface::HandlerContext & ctxt) +{ + using namespace chip::app::Clusters::Switch; + + auto unify_node = m_node_state_monitor.bridged_endpoint(ctxt.mRequestPath.mEndpointId); + if (!unify_node) + { + sl_log_info(LOG_TAG, "The endpoint [%i] is not a part of unify matter bridge node", ctxt.mRequestPath.mEndpointId); + return; } + std::string cmd; + nlohmann::json payload = {}; + + switch (ctxt.mRequestPath.mCommandId) + {} + if (!cmd.empty()) { ctxt.mCommandHandler.AddStatus(ctxt.mRequestPath, Protocols::InteractionModel::Status::Success); @@ -2609,8 +2058,7 @@ void FixedLabelClusterCommandHandler::InvokeCommand(CommandHandlerInterface::Han nlohmann::json payload = {}; switch (ctxt.mRequestPath.mCommandId) - { - } + {} if (!cmd.empty()) { @@ -2640,8 +2088,7 @@ void UserLabelClusterCommandHandler::InvokeCommand(CommandHandlerInterface::Hand nlohmann::json payload = {}; switch (ctxt.mRequestPath.mCommandId) - { - } + {} if (!cmd.empty()) { @@ -2671,8 +2118,7 @@ void ProxyConfigurationClusterCommandHandler::InvokeCommand(CommandHandlerInterf nlohmann::json payload = {}; switch (ctxt.mRequestPath.mCommandId) - { - } + {} if (!cmd.empty()) { @@ -2702,8 +2148,7 @@ void ProxyDiscoveryClusterCommandHandler::InvokeCommand(CommandHandlerInterface: nlohmann::json payload = {}; switch (ctxt.mRequestPath.mCommandId) - { - } + {} if (!cmd.empty()) { @@ -2733,8 +2178,7 @@ void ProxyValidClusterCommandHandler::InvokeCommand(CommandHandlerInterface::Han nlohmann::json payload = {}; switch (ctxt.mRequestPath.mCommandId) - { - } + {} if (!cmd.empty()) { @@ -2764,8 +2208,7 @@ void BooleanStateClusterCommandHandler::InvokeCommand(CommandHandlerInterface::H nlohmann::json payload = {}; switch (ctxt.mRequestPath.mCommandId) - { - } + {} if (!cmd.empty()) { @@ -3352,24 +2795,21 @@ void WindowCoveringClusterCommandHandler::InvokeCommand(CommandHandlerInterface: cmd = "UpOrOpen"; Commands::UpOrOpen::DecodableType data; if (DataModel::Decode(ctxt.GetReader(), data) == CHIP_NO_ERROR) - { - } + {} } break; case Commands::DownOrClose::Id: { cmd = "DownOrClose"; Commands::DownOrClose::DecodableType data; if (DataModel::Decode(ctxt.GetReader(), data) == CHIP_NO_ERROR) - { - } + {} } break; case Commands::StopMotion::Id: { cmd = "StopMotion"; Commands::StopMotion::DecodableType data; if (DataModel::Decode(ctxt.GetReader(), data) == CHIP_NO_ERROR) - { - } + {} } break; case Commands::GoToLiftValue::Id: { @@ -3482,8 +2922,7 @@ void BarrierControlClusterCommandHandler::InvokeCommand(CommandHandlerInterface: cmd = "BarrierControlStop"; Commands::BarrierControlStop::DecodableType data; if (DataModel::Decode(ctxt.GetReader(), data) == CHIP_NO_ERROR) - { - } + {} } break; } @@ -3501,37 +2940,6 @@ void BarrierControlClusterCommandHandler::InvokeCommand(CommandHandlerInterface: ctxt.SetCommandHandled(); } -void PumpConfigurationAndControlClusterCommandHandler::InvokeCommand(CommandHandlerInterface::HandlerContext & ctxt) -{ - using namespace chip::app::Clusters::PumpConfigurationAndControl; - - auto unify_node = m_node_state_monitor.bridged_endpoint(ctxt.mRequestPath.mEndpointId); - if (!unify_node) - { - sl_log_info(LOG_TAG, "The endpoint [%i] is not a part of unify matter bridge node", ctxt.mRequestPath.mEndpointId); - return; - } - - std::string cmd; - nlohmann::json payload = {}; - - switch (ctxt.mRequestPath.mCommandId) - { - } - - if (!cmd.empty()) - { - ctxt.mCommandHandler.AddStatus(ctxt.mRequestPath, Protocols::InteractionModel::Status::Success); - send_unify_mqtt_cmd(ctxt, cmd, payload); - sl_log_debug(LOG_TAG, "Mapped [%] command to unify dotdot data model", cmd.c_str()); - } - else - { - ctxt.mCommandHandler.AddStatus(ctxt.mRequestPath, Protocols::InteractionModel::Status::UnsupportedCommand); - } - ctxt.SetCommandHandled(); -} - void ThermostatClusterCommandHandler::InvokeCommand(CommandHandlerInterface::HandlerContext & ctxt) { using namespace chip::app::Clusters::Thermostat; @@ -3632,8 +3040,7 @@ void ThermostatClusterCommandHandler::InvokeCommand(CommandHandlerInterface::Han cmd = "ClearWeeklySchedule"; Commands::ClearWeeklySchedule::DecodableType data; if (DataModel::Decode(ctxt.GetReader(), data) == CHIP_NO_ERROR) - { - } + {} } break; } @@ -3666,8 +3073,7 @@ void FanControlClusterCommandHandler::InvokeCommand(CommandHandlerInterface::Han nlohmann::json payload = {}; switch (ctxt.mRequestPath.mCommandId) - { - } + {} if (!cmd.empty()) { @@ -3697,8 +3103,7 @@ void ThermostatUserInterfaceConfigurationClusterCommandHandler::InvokeCommand(Co nlohmann::json payload = {}; switch (ctxt.mRequestPath.mCommandId) - { - } + {} if (!cmd.empty()) { @@ -4138,7 +3543,7 @@ void ColorControlClusterCommandHandler::InvokeCommand(CommandHandlerInterface::H { try { - payload["ColorTemperature"] = to_json(data.colorTemperature); + payload["ColorTemperatureMireds"] = to_json(data.colorTemperature); } catch (std::exception & ex) { sl_log_warning(LOG_TAG, "Failed to add the command argument value to json format: %s", ex.what()); @@ -4533,37 +3938,6 @@ void ColorControlClusterCommandHandler::InvokeCommand(CommandHandlerInterface::H ctxt.SetCommandHandled(); } -void BallastConfigurationClusterCommandHandler::InvokeCommand(CommandHandlerInterface::HandlerContext & ctxt) -{ - using namespace chip::app::Clusters::BallastConfiguration; - - auto unify_node = m_node_state_monitor.bridged_endpoint(ctxt.mRequestPath.mEndpointId); - if (!unify_node) - { - sl_log_info(LOG_TAG, "The endpoint [%i] is not a part of unify matter bridge node", ctxt.mRequestPath.mEndpointId); - return; - } - - std::string cmd; - nlohmann::json payload = {}; - - switch (ctxt.mRequestPath.mCommandId) - { - } - - if (!cmd.empty()) - { - ctxt.mCommandHandler.AddStatus(ctxt.mRequestPath, Protocols::InteractionModel::Status::Success); - send_unify_mqtt_cmd(ctxt, cmd, payload); - sl_log_debug(LOG_TAG, "Mapped [%] command to unify dotdot data model", cmd.c_str()); - } - else - { - ctxt.mCommandHandler.AddStatus(ctxt.mRequestPath, Protocols::InteractionModel::Status::UnsupportedCommand); - } - ctxt.SetCommandHandled(); -} - void IlluminanceMeasurementClusterCommandHandler::InvokeCommand(CommandHandlerInterface::HandlerContext & ctxt) { using namespace chip::app::Clusters::IlluminanceMeasurement; @@ -4579,8 +3953,7 @@ void IlluminanceMeasurementClusterCommandHandler::InvokeCommand(CommandHandlerIn nlohmann::json payload = {}; switch (ctxt.mRequestPath.mCommandId) - { - } + {} if (!cmd.empty()) { @@ -4610,8 +3983,7 @@ void TemperatureMeasurementClusterCommandHandler::InvokeCommand(CommandHandlerIn nlohmann::json payload = {}; switch (ctxt.mRequestPath.mCommandId) - { - } + {} if (!cmd.empty()) { @@ -4641,8 +4013,7 @@ void PressureMeasurementClusterCommandHandler::InvokeCommand(CommandHandlerInter nlohmann::json payload = {}; switch (ctxt.mRequestPath.mCommandId) - { - } + {} if (!cmd.empty()) { @@ -4672,8 +4043,7 @@ void FlowMeasurementClusterCommandHandler::InvokeCommand(CommandHandlerInterface nlohmann::json payload = {}; switch (ctxt.mRequestPath.mCommandId) - { - } + {} if (!cmd.empty()) { @@ -4703,8 +4073,7 @@ void RelativeHumidityMeasurementClusterCommandHandler::InvokeCommand(CommandHand nlohmann::json payload = {}; switch (ctxt.mRequestPath.mCommandId) - { - } + {} if (!cmd.empty()) { @@ -4734,8 +4103,7 @@ void OccupancySensingClusterCommandHandler::InvokeCommand(CommandHandlerInterfac nlohmann::json payload = {}; switch (ctxt.mRequestPath.mCommandId) - { - } + {} if (!cmd.empty()) { @@ -4765,8 +4133,7 @@ void WakeOnLanClusterCommandHandler::InvokeCommand(CommandHandlerInterface::Hand nlohmann::json payload = {}; switch (ctxt.mRequestPath.mCommandId) - { - } + {} if (!cmd.empty()) { @@ -4940,64 +4307,56 @@ void MediaPlaybackClusterCommandHandler::InvokeCommand(CommandHandlerInterface:: cmd = "Play"; Commands::Play::DecodableType data; if (DataModel::Decode(ctxt.GetReader(), data) == CHIP_NO_ERROR) - { - } + {} } break; case Commands::Pause::Id: { cmd = "Pause"; Commands::Pause::DecodableType data; if (DataModel::Decode(ctxt.GetReader(), data) == CHIP_NO_ERROR) - { - } + {} } break; case Commands::StopPlayback::Id: { cmd = "StopPlayback"; Commands::StopPlayback::DecodableType data; if (DataModel::Decode(ctxt.GetReader(), data) == CHIP_NO_ERROR) - { - } + {} } break; case Commands::StartOver::Id: { cmd = "StartOver"; Commands::StartOver::DecodableType data; if (DataModel::Decode(ctxt.GetReader(), data) == CHIP_NO_ERROR) - { - } + {} } break; case Commands::Previous::Id: { cmd = "Previous"; Commands::Previous::DecodableType data; if (DataModel::Decode(ctxt.GetReader(), data) == CHIP_NO_ERROR) - { - } + {} } break; case Commands::Next::Id: { cmd = "Next"; Commands::Next::DecodableType data; if (DataModel::Decode(ctxt.GetReader(), data) == CHIP_NO_ERROR) - { - } + {} } break; case Commands::Rewind::Id: { cmd = "Rewind"; Commands::Rewind::DecodableType data; if (DataModel::Decode(ctxt.GetReader(), data) == CHIP_NO_ERROR) - { - } + {} } break; case Commands::FastForward::Id: { cmd = "FastForward"; Commands::FastForward::DecodableType data; if (DataModel::Decode(ctxt.GetReader(), data) == CHIP_NO_ERROR) - { - } + {} } break; case Commands::SkipForward::Id: { @@ -5095,16 +4454,14 @@ void MediaInputClusterCommandHandler::InvokeCommand(CommandHandlerInterface::Han cmd = "ShowInputStatus"; Commands::ShowInputStatus::DecodableType data; if (DataModel::Decode(ctxt.GetReader(), data) == CHIP_NO_ERROR) - { - } + {} } break; case Commands::HideInputStatus::Id: { cmd = "HideInputStatus"; Commands::HideInputStatus::DecodableType data; if (DataModel::Decode(ctxt.GetReader(), data) == CHIP_NO_ERROR) - { - } + {} } break; case Commands::RenameInput::Id: { @@ -5164,8 +4521,7 @@ void LowPowerClusterCommandHandler::InvokeCommand(CommandHandlerInterface::Handl cmd = "Sleep"; Commands::Sleep::DecodableType data; if (DataModel::Decode(ctxt.GetReader(), data) == CHIP_NO_ERROR) - { - } + {} } break; } @@ -5496,8 +4852,7 @@ void ApplicationBasicClusterCommandHandler::InvokeCommand(CommandHandlerInterfac nlohmann::json payload = {}; switch (ctxt.mRequestPath.mCommandId) - { - } + {} if (!cmd.empty()) { @@ -5569,8 +4924,7 @@ void AccountLoginClusterCommandHandler::InvokeCommand(CommandHandlerInterface::H cmd = "Logout"; Commands::Logout::DecodableType data; if (DataModel::Decode(ctxt.GetReader(), data) == CHIP_NO_ERROR) - { - } + {} } break; } @@ -5608,8 +4962,7 @@ void ElectricalMeasurementClusterCommandHandler::InvokeCommand(CommandHandlerInt cmd = "GetProfileInfoCommand"; Commands::GetProfileInfoCommand::DecodableType data; if (DataModel::Decode(ctxt.GetReader(), data) == CHIP_NO_ERROR) - { - } + {} } break; case Commands::GetMeasurementProfileCommand::Id: { @@ -5655,106 +5008,3 @@ void ElectricalMeasurementClusterCommandHandler::InvokeCommand(CommandHandlerInt } ctxt.SetCommandHandled(); } - -void FaultInjectionClusterCommandHandler::InvokeCommand(CommandHandlerInterface::HandlerContext & ctxt) -{ - using namespace chip::app::Clusters::FaultInjection; - - auto unify_node = m_node_state_monitor.bridged_endpoint(ctxt.mRequestPath.mEndpointId); - if (!unify_node) - { - sl_log_info(LOG_TAG, "The endpoint [%i] is not a part of unify matter bridge node", ctxt.mRequestPath.mEndpointId); - return; - } - - std::string cmd; - nlohmann::json payload = {}; - - switch (ctxt.mRequestPath.mCommandId) - { - case Commands::FailAtFault::Id: { - cmd = "FailAtFault"; - Commands::FailAtFault::DecodableType data; - if (DataModel::Decode(ctxt.GetReader(), data) == CHIP_NO_ERROR) - { - try - { - payload["Type"] = to_json(data.type); - } catch (std::exception & ex) - { - sl_log_warning(LOG_TAG, "Failed to add the command argument value to json format: %s", ex.what()); - } - try - { - payload["Id"] = to_json(data.id); - } catch (std::exception & ex) - { - sl_log_warning(LOG_TAG, "Failed to add the command argument value to json format: %s", ex.what()); - } - try - { - payload["NumCallsToSkip"] = to_json(data.numCallsToSkip); - } catch (std::exception & ex) - { - sl_log_warning(LOG_TAG, "Failed to add the command argument value to json format: %s", ex.what()); - } - try - { - payload["NumCallsToFail"] = to_json(data.numCallsToFail); - } catch (std::exception & ex) - { - sl_log_warning(LOG_TAG, "Failed to add the command argument value to json format: %s", ex.what()); - } - try - { - payload["TakeMutex"] = to_json(data.takeMutex); - } catch (std::exception & ex) - { - sl_log_warning(LOG_TAG, "Failed to add the command argument value to json format: %s", ex.what()); - } - } - } - break; - case Commands::FailRandomlyAtFault::Id: { - cmd = "FailRandomlyAtFault"; - Commands::FailRandomlyAtFault::DecodableType data; - if (DataModel::Decode(ctxt.GetReader(), data) == CHIP_NO_ERROR) - { - try - { - payload["Type"] = to_json(data.type); - } catch (std::exception & ex) - { - sl_log_warning(LOG_TAG, "Failed to add the command argument value to json format: %s", ex.what()); - } - try - { - payload["Id"] = to_json(data.id); - } catch (std::exception & ex) - { - sl_log_warning(LOG_TAG, "Failed to add the command argument value to json format: %s", ex.what()); - } - try - { - payload["Percentage"] = to_json(data.percentage); - } catch (std::exception & ex) - { - sl_log_warning(LOG_TAG, "Failed to add the command argument value to json format: %s", ex.what()); - } - } - } - break; - } - - if (!cmd.empty()) - { - ctxt.mCommandHandler.AddStatus(ctxt.mRequestPath, Protocols::InteractionModel::Status::Success); - send_unify_mqtt_cmd(ctxt, cmd, payload); - sl_log_debug(LOG_TAG, "Mapped [%] command to unify dotdot data model", cmd.c_str()); - } - else - { - ctxt.mCommandHandler.AddStatus(ctxt.mRequestPath, Protocols::InteractionModel::Status::UnsupportedCommand); - } - ctxt.SetCommandHandled(); -} diff --git a/silabs_examples/unify-matter-bridge/linux/zap-handlers/gen/command_translator.hpp b/silabs_examples/unify-matter-bridge/linux/zap-handlers/gen/command_translator.hpp index bf1a0c8633b1e7..6d91d0175eed9b 100644 --- a/silabs_examples/unify-matter-bridge/linux/zap-handlers/gen/command_translator.hpp +++ b/silabs_examples/unify-matter-bridge/linux/zap-handlers/gen/command_translator.hpp @@ -87,14 +87,6 @@ class PulseWidthModulationClusterCommandHandler : public command_translator_inte {} void InvokeCommand(chip::app::CommandHandlerInterface::HandlerContext & HandlerContext) override; }; -class ActionsClusterCommandHandler : public command_translator_interface -{ -public: - ActionsClusterCommandHandler(const matter_node_state_monitor & node_state_monitor, UicMqtt & uic_mqtt) : - command_translator_interface(node_state_monitor, chip::app::Clusters::Actions::Id, "Actions", uic_mqtt) - {} - void InvokeCommand(chip::app::CommandHandlerInterface::HandlerContext & HandlerContext) override; -}; class BasicClusterCommandHandler : public command_translator_interface { public: @@ -217,15 +209,6 @@ class WiFiNetworkDiagnosticsClusterCommandHandler : public command_translator_in {} void InvokeCommand(chip::app::CommandHandlerInterface::HandlerContext & HandlerContext) override; }; -class EthernetNetworkDiagnosticsClusterCommandHandler : public command_translator_interface -{ -public: - EthernetNetworkDiagnosticsClusterCommandHandler(const matter_node_state_monitor & node_state_monitor, UicMqtt & uic_mqtt) : - command_translator_interface(node_state_monitor, chip::app::Clusters::EthernetNetworkDiagnostics::Id, - "EthernetNetworkDiagnostics", uic_mqtt) - {} - void InvokeCommand(chip::app::CommandHandlerInterface::HandlerContext & HandlerContext) override; -}; class TimeSynchronizationClusterCommandHandler : public command_translator_interface { public: @@ -235,15 +218,6 @@ class TimeSynchronizationClusterCommandHandler : public command_translator_inter {} void InvokeCommand(chip::app::CommandHandlerInterface::HandlerContext & HandlerContext) override; }; -class BridgedDeviceBasicClusterCommandHandler : public command_translator_interface -{ -public: - BridgedDeviceBasicClusterCommandHandler(const matter_node_state_monitor & node_state_monitor, UicMqtt & uic_mqtt) : - command_translator_interface(node_state_monitor, chip::app::Clusters::BridgedDeviceBasic::Id, "BridgedDeviceBasic", - uic_mqtt) - {} - void InvokeCommand(chip::app::CommandHandlerInterface::HandlerContext & HandlerContext) override; -}; class SwitchClusterCommandHandler : public command_translator_interface { public: @@ -252,15 +226,6 @@ class SwitchClusterCommandHandler : public command_translator_interface {} void InvokeCommand(chip::app::CommandHandlerInterface::HandlerContext & HandlerContext) override; }; -class AdministratorCommissioningClusterCommandHandler : public command_translator_interface -{ -public: - AdministratorCommissioningClusterCommandHandler(const matter_node_state_monitor & node_state_monitor, UicMqtt & uic_mqtt) : - command_translator_interface(node_state_monitor, chip::app::Clusters::AdministratorCommissioning::Id, - "AdministratorCommissioning", uic_mqtt) - {} - void InvokeCommand(chip::app::CommandHandlerInterface::HandlerContext & HandlerContext) override; -}; class OperationalCredentialsClusterCommandHandler : public command_translator_interface { public: @@ -360,15 +325,6 @@ class BarrierControlClusterCommandHandler : public command_translator_interface {} void InvokeCommand(chip::app::CommandHandlerInterface::HandlerContext & HandlerContext) override; }; -class PumpConfigurationAndControlClusterCommandHandler : public command_translator_interface -{ -public: - PumpConfigurationAndControlClusterCommandHandler(const matter_node_state_monitor & node_state_monitor, UicMqtt & uic_mqtt) : - command_translator_interface(node_state_monitor, chip::app::Clusters::PumpConfigurationAndControl::Id, - "PumpConfigurationAndControl", uic_mqtt) - {} - void InvokeCommand(chip::app::CommandHandlerInterface::HandlerContext & HandlerContext) override; -}; class ThermostatClusterCommandHandler : public command_translator_interface { public: @@ -403,15 +359,6 @@ class ColorControlClusterCommandHandler : public command_translator_interface {} void InvokeCommand(chip::app::CommandHandlerInterface::HandlerContext & HandlerContext) override; }; -class BallastConfigurationClusterCommandHandler : public command_translator_interface -{ -public: - BallastConfigurationClusterCommandHandler(const matter_node_state_monitor & node_state_monitor, UicMqtt & uic_mqtt) : - command_translator_interface(node_state_monitor, chip::app::Clusters::BallastConfiguration::Id, "BallastConfiguration", - uic_mqtt) - {} - void InvokeCommand(chip::app::CommandHandlerInterface::HandlerContext & HandlerContext) override; -}; class IlluminanceMeasurementClusterCommandHandler : public command_translator_interface { public: @@ -570,14 +517,6 @@ class ElectricalMeasurementClusterCommandHandler : public command_translator_int {} void InvokeCommand(chip::app::CommandHandlerInterface::HandlerContext & HandlerContext) override; }; -class FaultInjectionClusterCommandHandler : public command_translator_interface -{ -public: - FaultInjectionClusterCommandHandler(const matter_node_state_monitor & node_state_monitor, UicMqtt & uic_mqtt) : - command_translator_interface(node_state_monitor, chip::app::Clusters::FaultInjection::Id, "FaultInjection", uic_mqtt) - {} - void InvokeCommand(chip::app::CommandHandlerInterface::HandlerContext & HandlerContext) override; -}; } // namespace unify::matter_bridge diff --git a/silabs_examples/unify-matter-bridge/linux/zap-handlers/gen/unify_accessors.cpp b/silabs_examples/unify-matter-bridge/linux/zap-handlers/gen/unify_accessors.cpp index 71c35b00c8aae9..d6eba1137bd256 100644 --- a/silabs_examples/unify-matter-bridge/linux/zap-handlers/gen/unify_accessors.cpp +++ b/silabs_examples/unify-matter-bridge/linux/zap-handlers/gen/unify_accessors.cpp @@ -1566,93 +1566,6 @@ EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const uint1 } // namespace Attributes } // namespace PulseWidthModulation -namespace Actions { -namespace Attributes { - -namespace SetupURL { - -EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, chip::CharSpan & value) -{ - attribute_state_cache & cache = attribute_state_cache::get_instance(); - - using Traits = NumericAttributeTraits; - Traits::StorageType temp_storage; - - cache.get(endpoint, temp_storage); - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; -} - -EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const chip::CharSpan & value) -{ - attribute_state_cache & cache = attribute_state_cache::get_instance(); - cache.set(endpoint, value); - return EMBER_ZCL_STATUS_SUCCESS; -} - -} // namespace SetupURL - -namespace FeatureMap { - -EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, uint32_t & value) -{ - attribute_state_cache & cache = attribute_state_cache::get_instance(); - - using Traits = NumericAttributeTraits; - Traits::StorageType temp_storage; - - cache.get(endpoint, temp_storage); - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; -} - -EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const uint32_t & value) -{ - attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits; - Traits::StorageType storageValue; - Traits::WorkingToStorage(value, storageValue); - cache.set(endpoint, storageValue); - return EMBER_ZCL_STATUS_SUCCESS; -} - -} // namespace FeatureMap - -namespace ClusterRevision { - -EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, uint16_t & value) -{ - attribute_state_cache & cache = attribute_state_cache::get_instance(); - - using Traits = NumericAttributeTraits; - Traits::StorageType temp_storage; - - cache.get(endpoint, temp_storage); - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; -} - -EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const uint16_t & value) -{ - attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits; - Traits::StorageType storageValue; - Traits::WorkingToStorage(value, storageValue); - cache.set(endpoint, storageValue); - return EMBER_ZCL_STATUS_SUCCESS; -} - -} // namespace ClusterRevision - -} // namespace Attributes -} // namespace Actions - namespace Basic { namespace Attributes { @@ -6544,17 +6457,16 @@ EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const uint1 } // namespace Attributes } // namespace WiFiNetworkDiagnostics -namespace EthernetNetworkDiagnostics { +namespace TimeSynchronization { namespace Attributes { -namespace PHYRate { +namespace UTCTime { -EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, - chip::app::DataModel::Nullable & value) +EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, chip::app::DataModel::Nullable & value) { attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType temp_storage; cache.get(endpoint, temp_storage); @@ -6564,11 +6476,10 @@ EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, return EMBER_ZCL_STATUS_SUCCESS; } -EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, - const chip::app::DataModel::Nullable & value) +EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const chip::app::DataModel::Nullable & value) { attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType storageValue; if (value.HasValidValue()) { @@ -6582,50 +6493,46 @@ EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, return EMBER_ZCL_STATUS_SUCCESS; } -} // namespace PHYRate +} // namespace UTCTime -namespace FullDuplex { +namespace Granularity { -EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, chip::app::DataModel::Nullable & value) +EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, + chip::app::Clusters::TimeSynchronization::GranularityEnum & value) { attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType temp_storage; cache.get(endpoint, temp_storage); auto tmp = Traits::StorageToWorking(temp_storage); - value.SetNonNull(tmp); + value = tmp; return EMBER_ZCL_STATUS_SUCCESS; } -EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const chip::app::DataModel::Nullable & value) +EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, + const chip::app::Clusters::TimeSynchronization::GranularityEnum & value) { attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType storageValue; - if (value.HasValidValue()) - { - Traits::WorkingToStorage(value.Value(), storageValue); - } - else - { - return EMBER_ZCL_STATUS_FAILURE; - } + Traits::WorkingToStorage(value, storageValue); cache.set(endpoint, storageValue); return EMBER_ZCL_STATUS_SUCCESS; } -} // namespace FullDuplex +} // namespace Granularity -namespace PacketRxCount { +namespace TimeSource { -EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, uint64_t & value) +EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, + chip::app::Clusters::TimeSynchronization::TimeSourceEnum & value) { attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType temp_storage; cache.get(endpoint, temp_storage); @@ -6635,77 +6542,82 @@ EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, uint64_t & return EMBER_ZCL_STATUS_SUCCESS; } -EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const uint64_t & value) +EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, + const chip::app::Clusters::TimeSynchronization::TimeSourceEnum & value) { attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); cache.set(endpoint, storageValue); return EMBER_ZCL_STATUS_SUCCESS; } -} // namespace PacketRxCount +} // namespace TimeSource -namespace PacketTxCount { +namespace TrustedTimeNodeId { -EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, uint64_t & value) +EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, chip::app::DataModel::Nullable & value) { attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType temp_storage; cache.get(endpoint, temp_storage); auto tmp = Traits::StorageToWorking(temp_storage); - value = tmp; + value.SetNonNull(tmp); return EMBER_ZCL_STATUS_SUCCESS; } -EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const uint64_t & value) +EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const chip::app::DataModel::Nullable & value) { attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType storageValue; - Traits::WorkingToStorage(value, storageValue); + if (value.HasValidValue()) + { + Traits::WorkingToStorage(value.Value(), storageValue); + } + else + { + return EMBER_ZCL_STATUS_FAILURE; + } cache.set(endpoint, storageValue); return EMBER_ZCL_STATUS_SUCCESS; } -} // namespace PacketTxCount +} // namespace TrustedTimeNodeId -namespace TxErrCount { +namespace DefaultNtp { -EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, uint64_t & value) +EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, chip::app::DataModel::Nullable & value) { attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType temp_storage; cache.get(endpoint, temp_storage); auto tmp = Traits::StorageToWorking(temp_storage); - value = tmp; + value.SetNonNull(tmp); return EMBER_ZCL_STATUS_SUCCESS; } -EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const uint64_t & value) +EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const chip::app::DataModel::Nullable & value) { attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits; - Traits::StorageType storageValue; - Traits::WorkingToStorage(value, storageValue); - cache.set(endpoint, storageValue); + cache.set(endpoint, value); return EMBER_ZCL_STATUS_SUCCESS; } -} // namespace TxErrCount +} // namespace DefaultNtp -namespace CollisionCount { +namespace LocalTime { -EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, uint64_t & value) +EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, chip::app::DataModel::Nullable & value) { attribute_state_cache & cache = attribute_state_cache::get_instance(); @@ -6715,29 +6627,36 @@ EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, uint64_t & cache.get(endpoint, temp_storage); auto tmp = Traits::StorageToWorking(temp_storage); - value = tmp; + value.SetNonNull(tmp); return EMBER_ZCL_STATUS_SUCCESS; } -EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const uint64_t & value) +EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const chip::app::DataModel::Nullable & value) { attribute_state_cache & cache = attribute_state_cache::get_instance(); using Traits = NumericAttributeTraits; Traits::StorageType storageValue; - Traits::WorkingToStorage(value, storageValue); + if (value.HasValidValue()) + { + Traits::WorkingToStorage(value.Value(), storageValue); + } + else + { + return EMBER_ZCL_STATUS_FAILURE; + } cache.set(endpoint, storageValue); return EMBER_ZCL_STATUS_SUCCESS; } -} // namespace CollisionCount +} // namespace LocalTime -namespace OverrunCount { +namespace TimeZoneDatabase { -EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, uint64_t & value) +EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, bool & value) { attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType temp_storage; cache.get(endpoint, temp_storage); @@ -6747,25 +6666,25 @@ EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, uint64_t & return EMBER_ZCL_STATUS_SUCCESS; } -EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const uint64_t & value) +EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const bool & value) { attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); cache.set(endpoint, storageValue); return EMBER_ZCL_STATUS_SUCCESS; } -} // namespace OverrunCount +} // namespace TimeZoneDatabase -namespace CarrierDetect { +namespace NtpServerPort { -EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, chip::app::DataModel::Nullable & value) +EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, chip::app::DataModel::Nullable & value) { attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType temp_storage; cache.get(endpoint, temp_storage); @@ -6775,10 +6694,10 @@ EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, chip::app:: return EMBER_ZCL_STATUS_SUCCESS; } -EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const chip::app::DataModel::Nullable & value) +EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const chip::app::DataModel::Nullable & value) { attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType storageValue; if (value.HasValidValue()) { @@ -6792,35 +6711,7 @@ EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const chip: return EMBER_ZCL_STATUS_SUCCESS; } -} // namespace CarrierDetect - -namespace TimeSinceReset { - -EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, uint64_t & value) -{ - attribute_state_cache & cache = attribute_state_cache::get_instance(); - - using Traits = NumericAttributeTraits; - Traits::StorageType temp_storage; - - cache.get(endpoint, temp_storage); - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; -} - -EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const uint64_t & value) -{ - attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits; - Traits::StorageType storageValue; - Traits::WorkingToStorage(value, storageValue); - cache.set(endpoint, storageValue); - return EMBER_ZCL_STATUS_SUCCESS; -} - -} // namespace TimeSinceReset +} // namespace NtpServerPort namespace FeatureMap { @@ -6879,54 +6770,46 @@ EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const uint1 } // namespace ClusterRevision } // namespace Attributes -} // namespace EthernetNetworkDiagnostics +} // namespace TimeSynchronization -namespace TimeSynchronization { +namespace Switch { namespace Attributes { -namespace UTCTime { +namespace NumberOfPositions { -EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, chip::app::DataModel::Nullable & value) +EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, uint8_t & value) { attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType temp_storage; cache.get(endpoint, temp_storage); auto tmp = Traits::StorageToWorking(temp_storage); - value.SetNonNull(tmp); + value = tmp; return EMBER_ZCL_STATUS_SUCCESS; } -EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const chip::app::DataModel::Nullable & value) +EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const uint8_t & value) { attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType storageValue; - if (value.HasValidValue()) - { - Traits::WorkingToStorage(value.Value(), storageValue); - } - else - { - return EMBER_ZCL_STATUS_FAILURE; - } + Traits::WorkingToStorage(value, storageValue); cache.set(endpoint, storageValue); return EMBER_ZCL_STATUS_SUCCESS; } -} // namespace UTCTime +} // namespace NumberOfPositions -namespace Granularity { +namespace CurrentPosition { -EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, - chip::app::Clusters::TimeSynchronization::GranularityEnum & value) +EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, uint8_t & value) { attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType temp_storage; cache.get(endpoint, temp_storage); @@ -6936,27 +6819,25 @@ EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, return EMBER_ZCL_STATUS_SUCCESS; } -EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, - const chip::app::Clusters::TimeSynchronization::GranularityEnum & value) +EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const uint8_t & value) { attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); cache.set(endpoint, storageValue); return EMBER_ZCL_STATUS_SUCCESS; } -} // namespace Granularity +} // namespace CurrentPosition -namespace TimeSource { +namespace MultiPressMax { -EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, - chip::app::Clusters::TimeSynchronization::TimeSourceEnum & value) +EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, uint8_t & value) { attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType temp_storage; cache.get(endpoint, temp_storage); @@ -6966,121 +6847,115 @@ EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, return EMBER_ZCL_STATUS_SUCCESS; } -EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, - const chip::app::Clusters::TimeSynchronization::TimeSourceEnum & value) +EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const uint8_t & value) { attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); cache.set(endpoint, storageValue); return EMBER_ZCL_STATUS_SUCCESS; } -} // namespace TimeSource +} // namespace MultiPressMax -namespace TrustedTimeNodeId { +namespace FeatureMap { -EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, chip::app::DataModel::Nullable & value) +EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, uint32_t & value) { attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType temp_storage; cache.get(endpoint, temp_storage); auto tmp = Traits::StorageToWorking(temp_storage); - value.SetNonNull(tmp); + value = tmp; return EMBER_ZCL_STATUS_SUCCESS; } -EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const chip::app::DataModel::Nullable & value) +EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const uint32_t & value) { attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType storageValue; - if (value.HasValidValue()) - { - Traits::WorkingToStorage(value.Value(), storageValue); - } - else - { - return EMBER_ZCL_STATUS_FAILURE; - } + Traits::WorkingToStorage(value, storageValue); cache.set(endpoint, storageValue); return EMBER_ZCL_STATUS_SUCCESS; } -} // namespace TrustedTimeNodeId +} // namespace FeatureMap -namespace DefaultNtp { +namespace ClusterRevision { -EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, chip::app::DataModel::Nullable & value) +EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, uint16_t & value) { attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType temp_storage; cache.get(endpoint, temp_storage); auto tmp = Traits::StorageToWorking(temp_storage); - value.SetNonNull(tmp); + value = tmp; return EMBER_ZCL_STATUS_SUCCESS; } -EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const chip::app::DataModel::Nullable & value) +EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const uint16_t & value) { attribute_state_cache & cache = attribute_state_cache::get_instance(); - cache.set(endpoint, value); + using Traits = NumericAttributeTraits; + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + cache.set(endpoint, storageValue); return EMBER_ZCL_STATUS_SUCCESS; } -} // namespace DefaultNtp +} // namespace ClusterRevision -namespace LocalTime { +} // namespace Attributes +} // namespace Switch -EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, chip::app::DataModel::Nullable & value) +namespace OperationalCredentials { +namespace Attributes { + +namespace SupportedFabrics { + +EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, uint8_t & value) { attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType temp_storage; cache.get(endpoint, temp_storage); auto tmp = Traits::StorageToWorking(temp_storage); - value.SetNonNull(tmp); + value = tmp; return EMBER_ZCL_STATUS_SUCCESS; } -EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const chip::app::DataModel::Nullable & value) +EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const uint8_t & value) { attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType storageValue; - if (value.HasValidValue()) - { - Traits::WorkingToStorage(value.Value(), storageValue); - } - else - { - return EMBER_ZCL_STATUS_FAILURE; - } + Traits::WorkingToStorage(value, storageValue); cache.set(endpoint, storageValue); return EMBER_ZCL_STATUS_SUCCESS; } -} // namespace LocalTime +} // namespace SupportedFabrics -namespace TimeZoneDatabase { +namespace CommissionedFabrics { -EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, bool & value) +EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, uint8_t & value) { attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType temp_storage; cache.get(endpoint, temp_storage); @@ -7090,52 +6965,45 @@ EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, bool & valu return EMBER_ZCL_STATUS_SUCCESS; } -EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const bool & value) +EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const uint8_t & value) { attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); cache.set(endpoint, storageValue); return EMBER_ZCL_STATUS_SUCCESS; } -} // namespace TimeZoneDatabase +} // namespace CommissionedFabrics -namespace NtpServerPort { +namespace CurrentFabricIndex { -EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, chip::app::DataModel::Nullable & value) +EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, uint8_t & value) { attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType temp_storage; cache.get(endpoint, temp_storage); auto tmp = Traits::StorageToWorking(temp_storage); - value.SetNonNull(tmp); + value = tmp; return EMBER_ZCL_STATUS_SUCCESS; } -EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const chip::app::DataModel::Nullable & value) +EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const uint8_t & value) { attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType storageValue; - if (value.HasValidValue()) - { - Traits::WorkingToStorage(value.Value(), storageValue); - } - else - { - return EMBER_ZCL_STATUS_FAILURE; - } + Traits::WorkingToStorage(value, storageValue); cache.set(endpoint, storageValue); return EMBER_ZCL_STATUS_SUCCESS; } -} // namespace NtpServerPort +} // namespace CurrentFabricIndex namespace FeatureMap { @@ -7194,18 +7062,18 @@ EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const uint1 } // namespace ClusterRevision } // namespace Attributes -} // namespace TimeSynchronization +} // namespace OperationalCredentials -namespace BridgedDeviceBasic { +namespace GroupKeyManagement { namespace Attributes { -namespace VendorName { +namespace MaxGroupsPerFabric { -EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, chip::CharSpan & value) +EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, uint16_t & value) { attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType temp_storage; cache.get(endpoint, temp_storage); @@ -7215,22 +7083,25 @@ EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, chip::CharS return EMBER_ZCL_STATUS_SUCCESS; } -EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const chip::CharSpan & value) +EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const uint16_t & value) { attribute_state_cache & cache = attribute_state_cache::get_instance(); - cache.set(endpoint, value); + using Traits = NumericAttributeTraits; + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + cache.set(endpoint, storageValue); return EMBER_ZCL_STATUS_SUCCESS; } -} // namespace VendorName +} // namespace MaxGroupsPerFabric -namespace VendorID { +namespace MaxGroupKeysPerFabric { -EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, chip::VendorId & value) +EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, uint16_t & value) { attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType temp_storage; cache.get(endpoint, temp_storage); @@ -7240,25 +7111,25 @@ EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, chip::Vendo return EMBER_ZCL_STATUS_SUCCESS; } -EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const chip::VendorId & value) +EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const uint16_t & value) { attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); cache.set(endpoint, storageValue); return EMBER_ZCL_STATUS_SUCCESS; } -} // namespace VendorID +} // namespace MaxGroupKeysPerFabric -namespace ProductName { +namespace FeatureMap { -EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, chip::CharSpan & value) +EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, uint32_t & value) { attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType temp_storage; cache.get(endpoint, temp_storage); @@ -7268,22 +7139,25 @@ EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, chip::CharS return EMBER_ZCL_STATUS_SUCCESS; } -EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const chip::CharSpan & value) +EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const uint32_t & value) { attribute_state_cache & cache = attribute_state_cache::get_instance(); - cache.set(endpoint, value); + using Traits = NumericAttributeTraits; + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + cache.set(endpoint, storageValue); return EMBER_ZCL_STATUS_SUCCESS; } -} // namespace ProductName +} // namespace FeatureMap -namespace NodeLabel { +namespace ClusterRevision { -EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, chip::CharSpan & value) +EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, uint16_t & value) { attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType temp_storage; cache.get(endpoint, temp_storage); @@ -7293,22 +7167,31 @@ EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, chip::CharS return EMBER_ZCL_STATUS_SUCCESS; } -EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const chip::CharSpan & value) +EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const uint16_t & value) { attribute_state_cache & cache = attribute_state_cache::get_instance(); - cache.set(endpoint, value); + using Traits = NumericAttributeTraits; + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + cache.set(endpoint, storageValue); return EMBER_ZCL_STATUS_SUCCESS; } -} // namespace NodeLabel +} // namespace ClusterRevision -namespace HardwareVersion { +} // namespace Attributes +} // namespace GroupKeyManagement -EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, uint16_t & value) +namespace FixedLabel { +namespace Attributes { + +namespace FeatureMap { + +EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, uint32_t & value) { attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType temp_storage; cache.get(endpoint, temp_storage); @@ -7318,25 +7201,25 @@ EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, uint16_t & return EMBER_ZCL_STATUS_SUCCESS; } -EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const uint16_t & value) +EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const uint32_t & value) { attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); cache.set(endpoint, storageValue); return EMBER_ZCL_STATUS_SUCCESS; } -} // namespace HardwareVersion +} // namespace FeatureMap -namespace HardwareVersionString { +namespace ClusterRevision { -EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, chip::CharSpan & value) +EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, uint16_t & value) { attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType temp_storage; cache.get(endpoint, temp_storage); @@ -7346,16 +7229,25 @@ EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, chip::CharS return EMBER_ZCL_STATUS_SUCCESS; } -EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const chip::CharSpan & value) +EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const uint16_t & value) { attribute_state_cache & cache = attribute_state_cache::get_instance(); - cache.set(endpoint, value); + using Traits = NumericAttributeTraits; + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + cache.set(endpoint, storageValue); return EMBER_ZCL_STATUS_SUCCESS; } -} // namespace HardwareVersionString +} // namespace ClusterRevision -namespace SoftwareVersion { +} // namespace Attributes +} // namespace FixedLabel + +namespace UserLabel { +namespace Attributes { + +namespace FeatureMap { EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, uint32_t & value) { @@ -7381,15 +7273,15 @@ EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const uint3 return EMBER_ZCL_STATUS_SUCCESS; } -} // namespace SoftwareVersion +} // namespace FeatureMap -namespace SoftwareVersionString { +namespace ClusterRevision { -EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, chip::CharSpan & value) +EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, uint16_t & value) { attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType temp_storage; cache.get(endpoint, temp_storage); @@ -7399,22 +7291,31 @@ EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, chip::CharS return EMBER_ZCL_STATUS_SUCCESS; } -EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const chip::CharSpan & value) +EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const uint16_t & value) { attribute_state_cache & cache = attribute_state_cache::get_instance(); - cache.set(endpoint, value); + using Traits = NumericAttributeTraits; + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + cache.set(endpoint, storageValue); return EMBER_ZCL_STATUS_SUCCESS; } -} // namespace SoftwareVersionString +} // namespace ClusterRevision -namespace ManufacturingDate { +} // namespace Attributes +} // namespace UserLabel -EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, chip::CharSpan & value) +namespace ProxyConfiguration { +namespace Attributes { + +namespace FeatureMap { + +EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, uint32_t & value) { attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType temp_storage; cache.get(endpoint, temp_storage); @@ -7424,47 +7325,25 @@ EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, chip::CharS return EMBER_ZCL_STATUS_SUCCESS; } -EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const chip::CharSpan & value) -{ - attribute_state_cache & cache = attribute_state_cache::get_instance(); - cache.set(endpoint, value); - return EMBER_ZCL_STATUS_SUCCESS; -} - -} // namespace ManufacturingDate - -namespace PartNumber { - -EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, chip::CharSpan & value) -{ - attribute_state_cache & cache = attribute_state_cache::get_instance(); - - using Traits = NumericAttributeTraits; - Traits::StorageType temp_storage; - - cache.get(endpoint, temp_storage); - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; -} - -EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const chip::CharSpan & value) +EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const uint32_t & value) { attribute_state_cache & cache = attribute_state_cache::get_instance(); - cache.set(endpoint, value); + using Traits = NumericAttributeTraits; + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + cache.set(endpoint, storageValue); return EMBER_ZCL_STATUS_SUCCESS; } -} // namespace PartNumber +} // namespace FeatureMap -namespace ProductURL { +namespace ClusterRevision { -EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, chip::CharSpan & value) +EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, uint16_t & value) { attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType temp_storage; cache.get(endpoint, temp_storage); @@ -7474,47 +7353,31 @@ EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, chip::CharS return EMBER_ZCL_STATUS_SUCCESS; } -EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const chip::CharSpan & value) +EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const uint16_t & value) { attribute_state_cache & cache = attribute_state_cache::get_instance(); - cache.set(endpoint, value); + using Traits = NumericAttributeTraits; + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + cache.set(endpoint, storageValue); return EMBER_ZCL_STATUS_SUCCESS; } -} // namespace ProductURL - -namespace ProductLabel { - -EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, chip::CharSpan & value) -{ - attribute_state_cache & cache = attribute_state_cache::get_instance(); - - using Traits = NumericAttributeTraits; - Traits::StorageType temp_storage; - - cache.get(endpoint, temp_storage); - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; -} +} // namespace ClusterRevision -EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const chip::CharSpan & value) -{ - attribute_state_cache & cache = attribute_state_cache::get_instance(); - cache.set(endpoint, value); - return EMBER_ZCL_STATUS_SUCCESS; -} +} // namespace Attributes +} // namespace ProxyConfiguration -} // namespace ProductLabel +namespace ProxyDiscovery { +namespace Attributes { -namespace SerialNumber { +namespace FeatureMap { -EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, chip::CharSpan & value) +EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, uint32_t & value) { attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType temp_storage; cache.get(endpoint, temp_storage); @@ -7524,22 +7387,25 @@ EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, chip::CharS return EMBER_ZCL_STATUS_SUCCESS; } -EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const chip::CharSpan & value) +EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const uint32_t & value) { attribute_state_cache & cache = attribute_state_cache::get_instance(); - cache.set(endpoint, value); + using Traits = NumericAttributeTraits; + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + cache.set(endpoint, storageValue); return EMBER_ZCL_STATUS_SUCCESS; } -} // namespace SerialNumber +} // namespace FeatureMap -namespace Reachable { +namespace ClusterRevision { -EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, bool & value) +EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, uint16_t & value) { attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType temp_storage; cache.get(endpoint, temp_storage); @@ -7549,42 +7415,23 @@ EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, bool & valu return EMBER_ZCL_STATUS_SUCCESS; } -EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const bool & value) +EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const uint16_t & value) { attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); cache.set(endpoint, storageValue); return EMBER_ZCL_STATUS_SUCCESS; } -} // namespace Reachable - -namespace UniqueID { - -EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, chip::CharSpan & value) -{ - attribute_state_cache & cache = attribute_state_cache::get_instance(); - - using Traits = NumericAttributeTraits; - Traits::StorageType temp_storage; - - cache.get(endpoint, temp_storage); - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; -} +} // namespace ClusterRevision -EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const chip::CharSpan & value) -{ - attribute_state_cache & cache = attribute_state_cache::get_instance(); - cache.set(endpoint, value); - return EMBER_ZCL_STATUS_SUCCESS; -} +} // namespace Attributes +} // namespace ProxyDiscovery -} // namespace UniqueID +namespace ProxyValid { +namespace Attributes { namespace FeatureMap { @@ -7643,18 +7490,18 @@ EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const uint1 } // namespace ClusterRevision } // namespace Attributes -} // namespace BridgedDeviceBasic +} // namespace ProxyValid -namespace Switch { +namespace BooleanState { namespace Attributes { -namespace NumberOfPositions { +namespace StateValue { -EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, uint8_t & value) +EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, bool & value) { attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType temp_storage; cache.get(endpoint, temp_storage); @@ -7664,25 +7511,25 @@ EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, uint8_t & v return EMBER_ZCL_STATUS_SUCCESS; } -EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const uint8_t & value) +EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const bool & value) { attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); cache.set(endpoint, storageValue); return EMBER_ZCL_STATUS_SUCCESS; } -} // namespace NumberOfPositions +} // namespace StateValue -namespace CurrentPosition { +namespace FeatureMap { -EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, uint8_t & value) +EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, uint32_t & value) { attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType temp_storage; cache.get(endpoint, temp_storage); @@ -7692,25 +7539,25 @@ EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, uint8_t & v return EMBER_ZCL_STATUS_SUCCESS; } -EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const uint8_t & value) +EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const uint32_t & value) { attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); cache.set(endpoint, storageValue); return EMBER_ZCL_STATUS_SUCCESS; } -} // namespace CurrentPosition +} // namespace FeatureMap -namespace MultiPressMax { +namespace ClusterRevision { -EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, uint8_t & value) +EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, uint16_t & value) { attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType temp_storage; cache.get(endpoint, temp_storage); @@ -7720,25 +7567,31 @@ EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, uint8_t & v return EMBER_ZCL_STATUS_SUCCESS; } -EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const uint8_t & value) +EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const uint16_t & value) { attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); cache.set(endpoint, storageValue); return EMBER_ZCL_STATUS_SUCCESS; } -} // namespace MultiPressMax +} // namespace ClusterRevision -namespace FeatureMap { +} // namespace Attributes +} // namespace BooleanState -EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, uint32_t & value) +namespace ModeSelect { +namespace Attributes { + +namespace Description { + +EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, chip::CharSpan & value) { attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType temp_storage; cache.get(endpoint, temp_storage); @@ -7748,21 +7601,18 @@ EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, uint32_t & return EMBER_ZCL_STATUS_SUCCESS; } -EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const uint32_t & value) +EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const chip::CharSpan & value) { attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits; - Traits::StorageType storageValue; - Traits::WorkingToStorage(value, storageValue); - cache.set(endpoint, storageValue); + cache.set(endpoint, value); return EMBER_ZCL_STATUS_SUCCESS; } -} // namespace FeatureMap +} // namespace Description -namespace ClusterRevision { +namespace StandardNamespace { -EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, uint16_t & value) +EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, chip::app::DataModel::Nullable & value) { attribute_state_cache & cache = attribute_state_cache::get_instance(); @@ -7772,36 +7622,36 @@ EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, uint16_t & cache.get(endpoint, temp_storage); auto tmp = Traits::StorageToWorking(temp_storage); - value = tmp; + value.SetNonNull(tmp); return EMBER_ZCL_STATUS_SUCCESS; } -EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const uint16_t & value) +EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const chip::app::DataModel::Nullable & value) { attribute_state_cache & cache = attribute_state_cache::get_instance(); using Traits = NumericAttributeTraits; Traits::StorageType storageValue; - Traits::WorkingToStorage(value, storageValue); + if (value.HasValidValue()) + { + Traits::WorkingToStorage(value.Value(), storageValue); + } + else + { + return EMBER_ZCL_STATUS_FAILURE; + } cache.set(endpoint, storageValue); return EMBER_ZCL_STATUS_SUCCESS; } -} // namespace ClusterRevision - -} // namespace Attributes -} // namespace Switch - -namespace AdministratorCommissioning { -namespace Attributes { +} // namespace StandardNamespace -namespace WindowStatus { +namespace CurrentMode { -EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, - chip::app::Clusters::AdministratorCommissioning::CommissioningWindowStatus & value) +EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, uint8_t & value) { attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType temp_storage; cache.get(endpoint, temp_storage); @@ -7811,26 +7661,25 @@ EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, return EMBER_ZCL_STATUS_SUCCESS; } -EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, - const chip::app::Clusters::AdministratorCommissioning::CommissioningWindowStatus & value) +EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const uint8_t & value) { attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); cache.set(endpoint, storageValue); return EMBER_ZCL_STATUS_SUCCESS; } -} // namespace WindowStatus +} // namespace CurrentMode -namespace AdminFabricIndex { +namespace StartUpMode { -EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, chip::app::DataModel::Nullable & value) +EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, chip::app::DataModel::Nullable & value) { attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType temp_storage; cache.get(endpoint, temp_storage); @@ -7840,11 +7689,10 @@ EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, chip::app:: return EMBER_ZCL_STATUS_SUCCESS; } -EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, - const chip::app::DataModel::Nullable & value) +EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const chip::app::DataModel::Nullable & value) { attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType storageValue; if (value.HasValidValue()) { @@ -7858,15 +7706,15 @@ EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, return EMBER_ZCL_STATUS_SUCCESS; } -} // namespace AdminFabricIndex +} // namespace StartUpMode -namespace AdminVendorId { +namespace OnMode { -EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, chip::app::DataModel::Nullable & value) +EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, chip::app::DataModel::Nullable & value) { attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType temp_storage; cache.get(endpoint, temp_storage); @@ -7876,10 +7724,10 @@ EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, chip::app:: return EMBER_ZCL_STATUS_SUCCESS; } -EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const chip::app::DataModel::Nullable & value) +EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const chip::app::DataModel::Nullable & value) { attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType storageValue; if (value.HasValidValue()) { @@ -7893,7 +7741,7 @@ EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const chip: return EMBER_ZCL_STATUS_SUCCESS; } -} // namespace AdminVendorId +} // namespace OnMode namespace FeatureMap { @@ -7952,46 +7800,55 @@ EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const uint1 } // namespace ClusterRevision } // namespace Attributes -} // namespace AdministratorCommissioning +} // namespace ModeSelect -namespace OperationalCredentials { +namespace DoorLock { namespace Attributes { -namespace SupportedFabrics { +namespace LockState { -EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, uint8_t & value) +EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, + chip::app::DataModel::Nullable & value) { attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType temp_storage; cache.get(endpoint, temp_storage); auto tmp = Traits::StorageToWorking(temp_storage); - value = tmp; + value.SetNonNull(tmp); return EMBER_ZCL_STATUS_SUCCESS; } -EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const uint8_t & value) +EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, + const chip::app::DataModel::Nullable & value) { attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType storageValue; - Traits::WorkingToStorage(value, storageValue); + if (value.HasValidValue()) + { + Traits::WorkingToStorage(value.Value(), storageValue); + } + else + { + return EMBER_ZCL_STATUS_FAILURE; + } cache.set(endpoint, storageValue); return EMBER_ZCL_STATUS_SUCCESS; } -} // namespace SupportedFabrics +} // namespace LockState -namespace CommissionedFabrics { +namespace LockType { -EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, uint8_t & value) +EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, chip::app::Clusters::DoorLock::DlLockType & value) { attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType temp_storage; cache.get(endpoint, temp_storage); @@ -8001,25 +7858,25 @@ EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, uint8_t & v return EMBER_ZCL_STATUS_SUCCESS; } -EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const uint8_t & value) +EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const chip::app::Clusters::DoorLock::DlLockType & value) { attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); cache.set(endpoint, storageValue); return EMBER_ZCL_STATUS_SUCCESS; } -} // namespace CommissionedFabrics +} // namespace LockType -namespace CurrentFabricIndex { +namespace ActuatorEnabled { -EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, uint8_t & value) +EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, bool & value) { attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType temp_storage; cache.get(endpoint, temp_storage); @@ -8029,53 +7886,62 @@ EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, uint8_t & v return EMBER_ZCL_STATUS_SUCCESS; } -EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const uint8_t & value) +EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const bool & value) { attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); cache.set(endpoint, storageValue); return EMBER_ZCL_STATUS_SUCCESS; } -} // namespace CurrentFabricIndex +} // namespace ActuatorEnabled -namespace FeatureMap { +namespace DoorState { -EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, uint32_t & value) +EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, + chip::app::DataModel::Nullable & value) { attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType temp_storage; cache.get(endpoint, temp_storage); auto tmp = Traits::StorageToWorking(temp_storage); - value = tmp; + value.SetNonNull(tmp); return EMBER_ZCL_STATUS_SUCCESS; } -EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const uint32_t & value) +EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, + const chip::app::DataModel::Nullable & value) { attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType storageValue; - Traits::WorkingToStorage(value, storageValue); + if (value.HasValidValue()) + { + Traits::WorkingToStorage(value.Value(), storageValue); + } + else + { + return EMBER_ZCL_STATUS_FAILURE; + } cache.set(endpoint, storageValue); return EMBER_ZCL_STATUS_SUCCESS; } -} // namespace FeatureMap +} // namespace DoorState -namespace ClusterRevision { +namespace DoorOpenEvents { -EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, uint16_t & value) +EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, uint32_t & value) { attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType temp_storage; cache.get(endpoint, temp_storage); @@ -8085,31 +7951,25 @@ EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, uint16_t & return EMBER_ZCL_STATUS_SUCCESS; } -EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const uint16_t & value) +EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const uint32_t & value) { attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); cache.set(endpoint, storageValue); return EMBER_ZCL_STATUS_SUCCESS; } -} // namespace ClusterRevision - -} // namespace Attributes -} // namespace OperationalCredentials - -namespace GroupKeyManagement { -namespace Attributes { +} // namespace DoorOpenEvents -namespace MaxGroupsPerFabric { +namespace DoorClosedEvents { -EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, uint16_t & value) +EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, uint32_t & value) { attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType temp_storage; cache.get(endpoint, temp_storage); @@ -8119,19 +7979,19 @@ EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, uint16_t & return EMBER_ZCL_STATUS_SUCCESS; } -EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const uint16_t & value) +EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const uint32_t & value) { attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); cache.set(endpoint, storageValue); return EMBER_ZCL_STATUS_SUCCESS; } -} // namespace MaxGroupsPerFabric +} // namespace DoorClosedEvents -namespace MaxGroupKeysPerFabric { +namespace OpenPeriod { EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, uint16_t & value) { @@ -8157,15 +8017,15 @@ EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const uint1 return EMBER_ZCL_STATUS_SUCCESS; } -} // namespace MaxGroupKeysPerFabric +} // namespace OpenPeriod -namespace FeatureMap { +namespace NumberOfTotalUsersSupported { -EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, uint32_t & value) +EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, uint16_t & value) { attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType temp_storage; cache.get(endpoint, temp_storage); @@ -8175,19 +8035,19 @@ EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, uint32_t & return EMBER_ZCL_STATUS_SUCCESS; } -EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const uint32_t & value) +EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const uint16_t & value) { attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); cache.set(endpoint, storageValue); return EMBER_ZCL_STATUS_SUCCESS; } -} // namespace FeatureMap +} // namespace NumberOfTotalUsersSupported -namespace ClusterRevision { +namespace NumberOfPINUsersSupported { EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, uint16_t & value) { @@ -8213,21 +8073,15 @@ EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const uint1 return EMBER_ZCL_STATUS_SUCCESS; } -} // namespace ClusterRevision - -} // namespace Attributes -} // namespace GroupKeyManagement - -namespace FixedLabel { -namespace Attributes { +} // namespace NumberOfPINUsersSupported -namespace FeatureMap { +namespace NumberOfRFIDUsersSupported { -EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, uint32_t & value) +EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, uint16_t & value) { attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType temp_storage; cache.get(endpoint, temp_storage); @@ -8237,25 +8091,25 @@ EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, uint32_t & return EMBER_ZCL_STATUS_SUCCESS; } -EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const uint32_t & value) +EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const uint16_t & value) { attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); cache.set(endpoint, storageValue); return EMBER_ZCL_STATUS_SUCCESS; } -} // namespace FeatureMap +} // namespace NumberOfRFIDUsersSupported -namespace ClusterRevision { +namespace NumberOfWeekDaySchedulesSupportedPerUser { -EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, uint16_t & value) +EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, uint8_t & value) { attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType temp_storage; cache.get(endpoint, temp_storage); @@ -8265,31 +8119,25 @@ EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, uint16_t & return EMBER_ZCL_STATUS_SUCCESS; } -EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const uint16_t & value) +EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const uint8_t & value) { attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); cache.set(endpoint, storageValue); return EMBER_ZCL_STATUS_SUCCESS; } -} // namespace ClusterRevision - -} // namespace Attributes -} // namespace FixedLabel - -namespace UserLabel { -namespace Attributes { +} // namespace NumberOfWeekDaySchedulesSupportedPerUser -namespace FeatureMap { +namespace NumberOfYearDaySchedulesSupportedPerUser { -EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, uint32_t & value) +EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, uint8_t & value) { attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType temp_storage; cache.get(endpoint, temp_storage); @@ -8299,25 +8147,25 @@ EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, uint32_t & return EMBER_ZCL_STATUS_SUCCESS; } -EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const uint32_t & value) +EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const uint8_t & value) { attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); cache.set(endpoint, storageValue); return EMBER_ZCL_STATUS_SUCCESS; } -} // namespace FeatureMap +} // namespace NumberOfYearDaySchedulesSupportedPerUser -namespace ClusterRevision { +namespace NumberOfHolidaySchedulesSupported { -EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, uint16_t & value) +EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, uint8_t & value) { attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType temp_storage; cache.get(endpoint, temp_storage); @@ -8327,31 +8175,25 @@ EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, uint16_t & return EMBER_ZCL_STATUS_SUCCESS; } -EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const uint16_t & value) +EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const uint8_t & value) { attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); cache.set(endpoint, storageValue); return EMBER_ZCL_STATUS_SUCCESS; } -} // namespace ClusterRevision - -} // namespace Attributes -} // namespace UserLabel - -namespace ProxyConfiguration { -namespace Attributes { +} // namespace NumberOfHolidaySchedulesSupported -namespace FeatureMap { +namespace MaxPINCodeLength { -EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, uint32_t & value) +EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, uint8_t & value) { attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType temp_storage; cache.get(endpoint, temp_storage); @@ -8361,25 +8203,25 @@ EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, uint32_t & return EMBER_ZCL_STATUS_SUCCESS; } -EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const uint32_t & value) +EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const uint8_t & value) { attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); cache.set(endpoint, storageValue); return EMBER_ZCL_STATUS_SUCCESS; } -} // namespace FeatureMap +} // namespace MaxPINCodeLength -namespace ClusterRevision { +namespace MinPINCodeLength { -EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, uint16_t & value) +EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, uint8_t & value) { attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType temp_storage; cache.get(endpoint, temp_storage); @@ -8389,31 +8231,25 @@ EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, uint16_t & return EMBER_ZCL_STATUS_SUCCESS; } -EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const uint16_t & value) +EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const uint8_t & value) { attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); cache.set(endpoint, storageValue); return EMBER_ZCL_STATUS_SUCCESS; } -} // namespace ClusterRevision - -} // namespace Attributes -} // namespace ProxyConfiguration - -namespace ProxyDiscovery { -namespace Attributes { +} // namespace MinPINCodeLength -namespace FeatureMap { +namespace MaxRFIDCodeLength { -EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, uint32_t & value) +EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, uint8_t & value) { attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType temp_storage; cache.get(endpoint, temp_storage); @@ -8423,25 +8259,25 @@ EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, uint32_t & return EMBER_ZCL_STATUS_SUCCESS; } -EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const uint32_t & value) +EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const uint8_t & value) { attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); cache.set(endpoint, storageValue); return EMBER_ZCL_STATUS_SUCCESS; } -} // namespace FeatureMap +} // namespace MaxRFIDCodeLength -namespace ClusterRevision { +namespace MinRFIDCodeLength { -EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, uint16_t & value) +EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, uint8_t & value) { attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType temp_storage; cache.get(endpoint, temp_storage); @@ -8451,31 +8287,26 @@ EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, uint16_t & return EMBER_ZCL_STATUS_SUCCESS; } -EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const uint16_t & value) +EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const uint8_t & value) { attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); cache.set(endpoint, storageValue); return EMBER_ZCL_STATUS_SUCCESS; } -} // namespace ClusterRevision - -} // namespace Attributes -} // namespace ProxyDiscovery - -namespace ProxyValid { -namespace Attributes { +} // namespace MinRFIDCodeLength -namespace FeatureMap { +namespace CredentialRulesSupport { -EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, uint32_t & value) +EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, + chip::BitMask & value) { attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits>; Traits::StorageType temp_storage; cache.get(endpoint, temp_storage); @@ -8485,25 +8316,26 @@ EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, uint32_t & return EMBER_ZCL_STATUS_SUCCESS; } -EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const uint32_t & value) +EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, + const chip::BitMask & value) { attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits>; Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); cache.set(endpoint, storageValue); return EMBER_ZCL_STATUS_SUCCESS; } -} // namespace FeatureMap +} // namespace CredentialRulesSupport -namespace ClusterRevision { +namespace NumberOfCredentialsSupportedPerUser { -EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, uint16_t & value) +EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, uint8_t & value) { attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType temp_storage; cache.get(endpoint, temp_storage); @@ -8513,115 +8345,19 @@ EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, uint16_t & return EMBER_ZCL_STATUS_SUCCESS; } -EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const uint16_t & value) -{ - attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits; - Traits::StorageType storageValue; - Traits::WorkingToStorage(value, storageValue); - cache.set(endpoint, storageValue); - return EMBER_ZCL_STATUS_SUCCESS; -} - -} // namespace ClusterRevision - -} // namespace Attributes -} // namespace ProxyValid - -namespace BooleanState { -namespace Attributes { - -namespace StateValue { - -EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, bool & value) -{ - attribute_state_cache & cache = attribute_state_cache::get_instance(); - - using Traits = NumericAttributeTraits; - Traits::StorageType temp_storage; - - cache.get(endpoint, temp_storage); - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; -} - -EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const bool & value) -{ - attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits; - Traits::StorageType storageValue; - Traits::WorkingToStorage(value, storageValue); - cache.set(endpoint, storageValue); - return EMBER_ZCL_STATUS_SUCCESS; -} - -} // namespace StateValue - -namespace FeatureMap { - -EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, uint32_t & value) -{ - attribute_state_cache & cache = attribute_state_cache::get_instance(); - - using Traits = NumericAttributeTraits; - Traits::StorageType temp_storage; - - cache.get(endpoint, temp_storage); - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; -} - -EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const uint32_t & value) -{ - attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits; - Traits::StorageType storageValue; - Traits::WorkingToStorage(value, storageValue); - cache.set(endpoint, storageValue); - return EMBER_ZCL_STATUS_SUCCESS; -} - -} // namespace FeatureMap - -namespace ClusterRevision { - -EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, uint16_t & value) -{ - attribute_state_cache & cache = attribute_state_cache::get_instance(); - - using Traits = NumericAttributeTraits; - Traits::StorageType temp_storage; - - cache.get(endpoint, temp_storage); - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; -} - -EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const uint16_t & value) +EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const uint8_t & value) { attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); cache.set(endpoint, storageValue); return EMBER_ZCL_STATUS_SUCCESS; } -} // namespace ClusterRevision - -} // namespace Attributes -} // namespace BooleanState - -namespace ModeSelect { -namespace Attributes { +} // namespace NumberOfCredentialsSupportedPerUser -namespace Description { +namespace Language { EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, chip::CharSpan & value) { @@ -8644,44 +8380,9 @@ EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const chip: return EMBER_ZCL_STATUS_SUCCESS; } -} // namespace Description - -namespace StandardNamespace { - -EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, chip::app::DataModel::Nullable & value) -{ - attribute_state_cache & cache = attribute_state_cache::get_instance(); - - using Traits = NumericAttributeTraits; - Traits::StorageType temp_storage; - - cache.get(endpoint, temp_storage); - auto tmp = Traits::StorageToWorking(temp_storage); - - value.SetNonNull(tmp); - return EMBER_ZCL_STATUS_SUCCESS; -} - -EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const chip::app::DataModel::Nullable & value) -{ - attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits; - Traits::StorageType storageValue; - if (value.HasValidValue()) - { - Traits::WorkingToStorage(value.Value(), storageValue); - } - else - { - return EMBER_ZCL_STATUS_FAILURE; - } - cache.set(endpoint, storageValue); - return EMBER_ZCL_STATUS_SUCCESS; -} - -} // namespace StandardNamespace +} // namespace Language -namespace CurrentMode { +namespace LEDSettings { EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, uint8_t & value) { @@ -8707,79 +8408,9 @@ EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const uint8 return EMBER_ZCL_STATUS_SUCCESS; } -} // namespace CurrentMode - -namespace StartUpMode { - -EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, chip::app::DataModel::Nullable & value) -{ - attribute_state_cache & cache = attribute_state_cache::get_instance(); - - using Traits = NumericAttributeTraits; - Traits::StorageType temp_storage; - - cache.get(endpoint, temp_storage); - auto tmp = Traits::StorageToWorking(temp_storage); - - value.SetNonNull(tmp); - return EMBER_ZCL_STATUS_SUCCESS; -} - -EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const chip::app::DataModel::Nullable & value) -{ - attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits; - Traits::StorageType storageValue; - if (value.HasValidValue()) - { - Traits::WorkingToStorage(value.Value(), storageValue); - } - else - { - return EMBER_ZCL_STATUS_FAILURE; - } - cache.set(endpoint, storageValue); - return EMBER_ZCL_STATUS_SUCCESS; -} - -} // namespace StartUpMode - -namespace OnMode { - -EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, chip::app::DataModel::Nullable & value) -{ - attribute_state_cache & cache = attribute_state_cache::get_instance(); - - using Traits = NumericAttributeTraits; - Traits::StorageType temp_storage; - - cache.get(endpoint, temp_storage); - auto tmp = Traits::StorageToWorking(temp_storage); - - value.SetNonNull(tmp); - return EMBER_ZCL_STATUS_SUCCESS; -} - -EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const chip::app::DataModel::Nullable & value) -{ - attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits; - Traits::StorageType storageValue; - if (value.HasValidValue()) - { - Traits::WorkingToStorage(value.Value(), storageValue); - } - else - { - return EMBER_ZCL_STATUS_FAILURE; - } - cache.set(endpoint, storageValue); - return EMBER_ZCL_STATUS_SUCCESS; -} - -} // namespace OnMode +} // namespace LEDSettings -namespace FeatureMap { +namespace AutoRelockTime { EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, uint32_t & value) { @@ -8795,1893 +8426,19 @@ EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, uint32_t & return EMBER_ZCL_STATUS_SUCCESS; } -EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const uint32_t & value) -{ - attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits; - Traits::StorageType storageValue; - Traits::WorkingToStorage(value, storageValue); - cache.set(endpoint, storageValue); - return EMBER_ZCL_STATUS_SUCCESS; -} - -} // namespace FeatureMap - -namespace ClusterRevision { - -EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, uint16_t & value) -{ - attribute_state_cache & cache = attribute_state_cache::get_instance(); - - using Traits = NumericAttributeTraits; - Traits::StorageType temp_storage; - - cache.get(endpoint, temp_storage); - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; -} - -EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const uint16_t & value) -{ - attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits; - Traits::StorageType storageValue; - Traits::WorkingToStorage(value, storageValue); - cache.set(endpoint, storageValue); - return EMBER_ZCL_STATUS_SUCCESS; -} - -} // namespace ClusterRevision - -} // namespace Attributes -} // namespace ModeSelect - -namespace DoorLock { -namespace Attributes { - -namespace LockState { - -EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, - chip::app::DataModel::Nullable & value) -{ - attribute_state_cache & cache = attribute_state_cache::get_instance(); - - using Traits = NumericAttributeTraits; - Traits::StorageType temp_storage; - - cache.get(endpoint, temp_storage); - auto tmp = Traits::StorageToWorking(temp_storage); - - value.SetNonNull(tmp); - return EMBER_ZCL_STATUS_SUCCESS; -} - -EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, - const chip::app::DataModel::Nullable & value) -{ - attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits; - Traits::StorageType storageValue; - if (value.HasValidValue()) - { - Traits::WorkingToStorage(value.Value(), storageValue); - } - else - { - return EMBER_ZCL_STATUS_FAILURE; - } - cache.set(endpoint, storageValue); - return EMBER_ZCL_STATUS_SUCCESS; -} - -} // namespace LockState - -namespace LockType { - -EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, chip::app::Clusters::DoorLock::DlLockType & value) -{ - attribute_state_cache & cache = attribute_state_cache::get_instance(); - - using Traits = NumericAttributeTraits; - Traits::StorageType temp_storage; - - cache.get(endpoint, temp_storage); - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; -} - -EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const chip::app::Clusters::DoorLock::DlLockType & value) -{ - attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits; - Traits::StorageType storageValue; - Traits::WorkingToStorage(value, storageValue); - cache.set(endpoint, storageValue); - return EMBER_ZCL_STATUS_SUCCESS; -} - -} // namespace LockType - -namespace ActuatorEnabled { - -EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, bool & value) -{ - attribute_state_cache & cache = attribute_state_cache::get_instance(); - - using Traits = NumericAttributeTraits; - Traits::StorageType temp_storage; - - cache.get(endpoint, temp_storage); - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; -} - -EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const bool & value) -{ - attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits; - Traits::StorageType storageValue; - Traits::WorkingToStorage(value, storageValue); - cache.set(endpoint, storageValue); - return EMBER_ZCL_STATUS_SUCCESS; -} - -} // namespace ActuatorEnabled - -namespace DoorState { - -EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, - chip::app::DataModel::Nullable & value) -{ - attribute_state_cache & cache = attribute_state_cache::get_instance(); - - using Traits = NumericAttributeTraits; - Traits::StorageType temp_storage; - - cache.get(endpoint, temp_storage); - auto tmp = Traits::StorageToWorking(temp_storage); - - value.SetNonNull(tmp); - return EMBER_ZCL_STATUS_SUCCESS; -} - -EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, - const chip::app::DataModel::Nullable & value) -{ - attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits; - Traits::StorageType storageValue; - if (value.HasValidValue()) - { - Traits::WorkingToStorage(value.Value(), storageValue); - } - else - { - return EMBER_ZCL_STATUS_FAILURE; - } - cache.set(endpoint, storageValue); - return EMBER_ZCL_STATUS_SUCCESS; -} - -} // namespace DoorState - -namespace DoorOpenEvents { - -EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, uint32_t & value) -{ - attribute_state_cache & cache = attribute_state_cache::get_instance(); - - using Traits = NumericAttributeTraits; - Traits::StorageType temp_storage; - - cache.get(endpoint, temp_storage); - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; -} - -EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const uint32_t & value) -{ - attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits; - Traits::StorageType storageValue; - Traits::WorkingToStorage(value, storageValue); - cache.set(endpoint, storageValue); - return EMBER_ZCL_STATUS_SUCCESS; -} - -} // namespace DoorOpenEvents - -namespace DoorClosedEvents { - -EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, uint32_t & value) -{ - attribute_state_cache & cache = attribute_state_cache::get_instance(); - - using Traits = NumericAttributeTraits; - Traits::StorageType temp_storage; - - cache.get(endpoint, temp_storage); - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; -} - -EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const uint32_t & value) -{ - attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits; - Traits::StorageType storageValue; - Traits::WorkingToStorage(value, storageValue); - cache.set(endpoint, storageValue); - return EMBER_ZCL_STATUS_SUCCESS; -} - -} // namespace DoorClosedEvents - -namespace OpenPeriod { - -EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, uint16_t & value) -{ - attribute_state_cache & cache = attribute_state_cache::get_instance(); - - using Traits = NumericAttributeTraits; - Traits::StorageType temp_storage; - - cache.get(endpoint, temp_storage); - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; -} - -EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const uint16_t & value) -{ - attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits; - Traits::StorageType storageValue; - Traits::WorkingToStorage(value, storageValue); - cache.set(endpoint, storageValue); - return EMBER_ZCL_STATUS_SUCCESS; -} - -} // namespace OpenPeriod - -namespace NumberOfTotalUsersSupported { - -EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, uint16_t & value) -{ - attribute_state_cache & cache = attribute_state_cache::get_instance(); - - using Traits = NumericAttributeTraits; - Traits::StorageType temp_storage; - - cache.get(endpoint, temp_storage); - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; -} - -EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const uint16_t & value) -{ - attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits; - Traits::StorageType storageValue; - Traits::WorkingToStorage(value, storageValue); - cache.set(endpoint, storageValue); - return EMBER_ZCL_STATUS_SUCCESS; -} - -} // namespace NumberOfTotalUsersSupported - -namespace NumberOfPINUsersSupported { - -EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, uint16_t & value) -{ - attribute_state_cache & cache = attribute_state_cache::get_instance(); - - using Traits = NumericAttributeTraits; - Traits::StorageType temp_storage; - - cache.get(endpoint, temp_storage); - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; -} - -EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const uint16_t & value) -{ - attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits; - Traits::StorageType storageValue; - Traits::WorkingToStorage(value, storageValue); - cache.set(endpoint, storageValue); - return EMBER_ZCL_STATUS_SUCCESS; -} - -} // namespace NumberOfPINUsersSupported - -namespace NumberOfRFIDUsersSupported { - -EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, uint16_t & value) -{ - attribute_state_cache & cache = attribute_state_cache::get_instance(); - - using Traits = NumericAttributeTraits; - Traits::StorageType temp_storage; - - cache.get(endpoint, temp_storage); - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; -} - -EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const uint16_t & value) -{ - attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits; - Traits::StorageType storageValue; - Traits::WorkingToStorage(value, storageValue); - cache.set(endpoint, storageValue); - return EMBER_ZCL_STATUS_SUCCESS; -} - -} // namespace NumberOfRFIDUsersSupported - -namespace NumberOfWeekDaySchedulesSupportedPerUser { - -EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, uint8_t & value) -{ - attribute_state_cache & cache = attribute_state_cache::get_instance(); - - using Traits = NumericAttributeTraits; - Traits::StorageType temp_storage; - - cache.get(endpoint, temp_storage); - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; -} - -EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const uint8_t & value) -{ - attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits; - Traits::StorageType storageValue; - Traits::WorkingToStorage(value, storageValue); - cache.set(endpoint, storageValue); - return EMBER_ZCL_STATUS_SUCCESS; -} - -} // namespace NumberOfWeekDaySchedulesSupportedPerUser - -namespace NumberOfYearDaySchedulesSupportedPerUser { - -EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, uint8_t & value) -{ - attribute_state_cache & cache = attribute_state_cache::get_instance(); - - using Traits = NumericAttributeTraits; - Traits::StorageType temp_storage; - - cache.get(endpoint, temp_storage); - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; -} - -EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const uint8_t & value) -{ - attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits; - Traits::StorageType storageValue; - Traits::WorkingToStorage(value, storageValue); - cache.set(endpoint, storageValue); - return EMBER_ZCL_STATUS_SUCCESS; -} - -} // namespace NumberOfYearDaySchedulesSupportedPerUser - -namespace NumberOfHolidaySchedulesSupported { - -EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, uint8_t & value) -{ - attribute_state_cache & cache = attribute_state_cache::get_instance(); - - using Traits = NumericAttributeTraits; - Traits::StorageType temp_storage; - - cache.get(endpoint, temp_storage); - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; -} - -EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const uint8_t & value) -{ - attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits; - Traits::StorageType storageValue; - Traits::WorkingToStorage(value, storageValue); - cache.set(endpoint, storageValue); - return EMBER_ZCL_STATUS_SUCCESS; -} - -} // namespace NumberOfHolidaySchedulesSupported - -namespace MaxPINCodeLength { - -EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, uint8_t & value) -{ - attribute_state_cache & cache = attribute_state_cache::get_instance(); - - using Traits = NumericAttributeTraits; - Traits::StorageType temp_storage; - - cache.get(endpoint, temp_storage); - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; -} - -EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const uint8_t & value) -{ - attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits; - Traits::StorageType storageValue; - Traits::WorkingToStorage(value, storageValue); - cache.set(endpoint, storageValue); - return EMBER_ZCL_STATUS_SUCCESS; -} - -} // namespace MaxPINCodeLength - -namespace MinPINCodeLength { - -EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, uint8_t & value) -{ - attribute_state_cache & cache = attribute_state_cache::get_instance(); - - using Traits = NumericAttributeTraits; - Traits::StorageType temp_storage; - - cache.get(endpoint, temp_storage); - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; -} - -EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const uint8_t & value) -{ - attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits; - Traits::StorageType storageValue; - Traits::WorkingToStorage(value, storageValue); - cache.set(endpoint, storageValue); - return EMBER_ZCL_STATUS_SUCCESS; -} - -} // namespace MinPINCodeLength - -namespace MaxRFIDCodeLength { - -EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, uint8_t & value) -{ - attribute_state_cache & cache = attribute_state_cache::get_instance(); - - using Traits = NumericAttributeTraits; - Traits::StorageType temp_storage; - - cache.get(endpoint, temp_storage); - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; -} - -EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const uint8_t & value) -{ - attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits; - Traits::StorageType storageValue; - Traits::WorkingToStorage(value, storageValue); - cache.set(endpoint, storageValue); - return EMBER_ZCL_STATUS_SUCCESS; -} - -} // namespace MaxRFIDCodeLength - -namespace MinRFIDCodeLength { - -EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, uint8_t & value) -{ - attribute_state_cache & cache = attribute_state_cache::get_instance(); - - using Traits = NumericAttributeTraits; - Traits::StorageType temp_storage; - - cache.get(endpoint, temp_storage); - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; -} - -EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const uint8_t & value) -{ - attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits; - Traits::StorageType storageValue; - Traits::WorkingToStorage(value, storageValue); - cache.set(endpoint, storageValue); - return EMBER_ZCL_STATUS_SUCCESS; -} - -} // namespace MinRFIDCodeLength - -namespace CredentialRulesSupport { - -EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, - chip::BitMask & value) -{ - attribute_state_cache & cache = attribute_state_cache::get_instance(); - - using Traits = NumericAttributeTraits>; - Traits::StorageType temp_storage; - - cache.get(endpoint, temp_storage); - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; -} - -EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, - const chip::BitMask & value) -{ - attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits>; - Traits::StorageType storageValue; - Traits::WorkingToStorage(value, storageValue); - cache.set(endpoint, storageValue); - return EMBER_ZCL_STATUS_SUCCESS; -} - -} // namespace CredentialRulesSupport - -namespace NumberOfCredentialsSupportedPerUser { - -EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, uint8_t & value) -{ - attribute_state_cache & cache = attribute_state_cache::get_instance(); - - using Traits = NumericAttributeTraits; - Traits::StorageType temp_storage; - - cache.get(endpoint, temp_storage); - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; -} - -EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const uint8_t & value) -{ - attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits; - Traits::StorageType storageValue; - Traits::WorkingToStorage(value, storageValue); - cache.set(endpoint, storageValue); - return EMBER_ZCL_STATUS_SUCCESS; -} - -} // namespace NumberOfCredentialsSupportedPerUser - -namespace Language { - -EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, chip::CharSpan & value) -{ - attribute_state_cache & cache = attribute_state_cache::get_instance(); - - using Traits = NumericAttributeTraits; - Traits::StorageType temp_storage; - - cache.get(endpoint, temp_storage); - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; -} - -EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const chip::CharSpan & value) -{ - attribute_state_cache & cache = attribute_state_cache::get_instance(); - cache.set(endpoint, value); - return EMBER_ZCL_STATUS_SUCCESS; -} - -} // namespace Language - -namespace LEDSettings { - -EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, uint8_t & value) -{ - attribute_state_cache & cache = attribute_state_cache::get_instance(); - - using Traits = NumericAttributeTraits; - Traits::StorageType temp_storage; - - cache.get(endpoint, temp_storage); - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; -} - -EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const uint8_t & value) -{ - attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits; - Traits::StorageType storageValue; - Traits::WorkingToStorage(value, storageValue); - cache.set(endpoint, storageValue); - return EMBER_ZCL_STATUS_SUCCESS; -} - -} // namespace LEDSettings - -namespace AutoRelockTime { - -EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, uint32_t & value) -{ - attribute_state_cache & cache = attribute_state_cache::get_instance(); - - using Traits = NumericAttributeTraits; - Traits::StorageType temp_storage; - - cache.get(endpoint, temp_storage); - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; -} - -EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const uint32_t & value) -{ - attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits; - Traits::StorageType storageValue; - Traits::WorkingToStorage(value, storageValue); - cache.set(endpoint, storageValue); - return EMBER_ZCL_STATUS_SUCCESS; -} - -} // namespace AutoRelockTime - -namespace SoundVolume { - -EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, uint8_t & value) -{ - attribute_state_cache & cache = attribute_state_cache::get_instance(); - - using Traits = NumericAttributeTraits; - Traits::StorageType temp_storage; - - cache.get(endpoint, temp_storage); - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; -} - -EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const uint8_t & value) -{ - attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits; - Traits::StorageType storageValue; - Traits::WorkingToStorage(value, storageValue); - cache.set(endpoint, storageValue); - return EMBER_ZCL_STATUS_SUCCESS; -} - -} // namespace SoundVolume - -namespace OperatingMode { - -EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, chip::app::Clusters::DoorLock::DlOperatingMode & value) -{ - attribute_state_cache & cache = attribute_state_cache::get_instance(); - - using Traits = NumericAttributeTraits; - Traits::StorageType temp_storage; - - cache.get(endpoint, temp_storage); - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; -} - -EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const chip::app::Clusters::DoorLock::DlOperatingMode & value) -{ - attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits; - Traits::StorageType storageValue; - Traits::WorkingToStorage(value, storageValue); - cache.set(endpoint, storageValue); - return EMBER_ZCL_STATUS_SUCCESS; -} - -} // namespace OperatingMode - -namespace SupportedOperatingModes { - -EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, - chip::BitMask & value) -{ - attribute_state_cache & cache = attribute_state_cache::get_instance(); - - using Traits = NumericAttributeTraits>; - Traits::StorageType temp_storage; - - cache.get(endpoint, temp_storage); - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; -} - -EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, - const chip::BitMask & value) -{ - attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits>; - Traits::StorageType storageValue; - Traits::WorkingToStorage(value, storageValue); - cache.set(endpoint, storageValue); - return EMBER_ZCL_STATUS_SUCCESS; -} - -} // namespace SupportedOperatingModes - -namespace DefaultConfigurationRegister { - -EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, - chip::BitMask & value) -{ - attribute_state_cache & cache = attribute_state_cache::get_instance(); - - using Traits = NumericAttributeTraits>; - Traits::StorageType temp_storage; - - cache.get(endpoint, temp_storage); - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; -} - -EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, - const chip::BitMask & value) -{ - attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits>; - Traits::StorageType storageValue; - Traits::WorkingToStorage(value, storageValue); - cache.set(endpoint, storageValue); - return EMBER_ZCL_STATUS_SUCCESS; -} - -} // namespace DefaultConfigurationRegister - -namespace EnableLocalProgramming { - -EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, bool & value) -{ - attribute_state_cache & cache = attribute_state_cache::get_instance(); - - using Traits = NumericAttributeTraits; - Traits::StorageType temp_storage; - - cache.get(endpoint, temp_storage); - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; -} - -EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const bool & value) -{ - attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits; - Traits::StorageType storageValue; - Traits::WorkingToStorage(value, storageValue); - cache.set(endpoint, storageValue); - return EMBER_ZCL_STATUS_SUCCESS; -} - -} // namespace EnableLocalProgramming - -namespace EnableOneTouchLocking { - -EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, bool & value) -{ - attribute_state_cache & cache = attribute_state_cache::get_instance(); - - using Traits = NumericAttributeTraits; - Traits::StorageType temp_storage; - - cache.get(endpoint, temp_storage); - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; -} - -EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const bool & value) -{ - attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits; - Traits::StorageType storageValue; - Traits::WorkingToStorage(value, storageValue); - cache.set(endpoint, storageValue); - return EMBER_ZCL_STATUS_SUCCESS; -} - -} // namespace EnableOneTouchLocking - -namespace EnableInsideStatusLED { - -EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, bool & value) -{ - attribute_state_cache & cache = attribute_state_cache::get_instance(); - - using Traits = NumericAttributeTraits; - Traits::StorageType temp_storage; - - cache.get(endpoint, temp_storage); - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; -} - -EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const bool & value) -{ - attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits; - Traits::StorageType storageValue; - Traits::WorkingToStorage(value, storageValue); - cache.set(endpoint, storageValue); - return EMBER_ZCL_STATUS_SUCCESS; -} - -} // namespace EnableInsideStatusLED - -namespace EnablePrivacyModeButton { - -EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, bool & value) -{ - attribute_state_cache & cache = attribute_state_cache::get_instance(); - - using Traits = NumericAttributeTraits; - Traits::StorageType temp_storage; - - cache.get(endpoint, temp_storage); - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; -} - -EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const bool & value) -{ - attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits; - Traits::StorageType storageValue; - Traits::WorkingToStorage(value, storageValue); - cache.set(endpoint, storageValue); - return EMBER_ZCL_STATUS_SUCCESS; -} - -} // namespace EnablePrivacyModeButton - -namespace LocalProgrammingFeatures { - -EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, - chip::BitMask & value) -{ - attribute_state_cache & cache = attribute_state_cache::get_instance(); - - using Traits = NumericAttributeTraits>; - Traits::StorageType temp_storage; - - cache.get(endpoint, temp_storage); - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; -} - -EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, - const chip::BitMask & value) -{ - attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits>; - Traits::StorageType storageValue; - Traits::WorkingToStorage(value, storageValue); - cache.set(endpoint, storageValue); - return EMBER_ZCL_STATUS_SUCCESS; -} - -} // namespace LocalProgrammingFeatures - -namespace WrongCodeEntryLimit { - -EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, uint8_t & value) -{ - attribute_state_cache & cache = attribute_state_cache::get_instance(); - - using Traits = NumericAttributeTraits; - Traits::StorageType temp_storage; - - cache.get(endpoint, temp_storage); - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; -} - -EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const uint8_t & value) -{ - attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits; - Traits::StorageType storageValue; - Traits::WorkingToStorage(value, storageValue); - cache.set(endpoint, storageValue); - return EMBER_ZCL_STATUS_SUCCESS; -} - -} // namespace WrongCodeEntryLimit - -namespace UserCodeTemporaryDisableTime { - -EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, uint8_t & value) -{ - attribute_state_cache & cache = attribute_state_cache::get_instance(); - - using Traits = NumericAttributeTraits; - Traits::StorageType temp_storage; - - cache.get(endpoint, temp_storage); - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; -} - -EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const uint8_t & value) -{ - attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits; - Traits::StorageType storageValue; - Traits::WorkingToStorage(value, storageValue); - cache.set(endpoint, storageValue); - return EMBER_ZCL_STATUS_SUCCESS; -} - -} // namespace UserCodeTemporaryDisableTime - -namespace SendPINOverTheAir { - -EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, bool & value) -{ - attribute_state_cache & cache = attribute_state_cache::get_instance(); - - using Traits = NumericAttributeTraits; - Traits::StorageType temp_storage; - - cache.get(endpoint, temp_storage); - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; -} - -EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const bool & value) -{ - attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits; - Traits::StorageType storageValue; - Traits::WorkingToStorage(value, storageValue); - cache.set(endpoint, storageValue); - return EMBER_ZCL_STATUS_SUCCESS; -} - -} // namespace SendPINOverTheAir - -namespace RequirePINforRemoteOperation { - -EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, bool & value) -{ - attribute_state_cache & cache = attribute_state_cache::get_instance(); - - using Traits = NumericAttributeTraits; - Traits::StorageType temp_storage; - - cache.get(endpoint, temp_storage); - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; -} - -EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const bool & value) -{ - attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits; - Traits::StorageType storageValue; - Traits::WorkingToStorage(value, storageValue); - cache.set(endpoint, storageValue); - return EMBER_ZCL_STATUS_SUCCESS; -} - -} // namespace RequirePINforRemoteOperation - -namespace ExpiringUserTimeout { - -EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, uint16_t & value) -{ - attribute_state_cache & cache = attribute_state_cache::get_instance(); - - using Traits = NumericAttributeTraits; - Traits::StorageType temp_storage; - - cache.get(endpoint, temp_storage); - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; -} - -EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const uint16_t & value) -{ - attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits; - Traits::StorageType storageValue; - Traits::WorkingToStorage(value, storageValue); - cache.set(endpoint, storageValue); - return EMBER_ZCL_STATUS_SUCCESS; -} - -} // namespace ExpiringUserTimeout - -namespace FeatureMap { - -EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, uint32_t & value) -{ - attribute_state_cache & cache = attribute_state_cache::get_instance(); - - using Traits = NumericAttributeTraits; - Traits::StorageType temp_storage; - - cache.get(endpoint, temp_storage); - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; -} - -EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const uint32_t & value) -{ - attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits; - Traits::StorageType storageValue; - Traits::WorkingToStorage(value, storageValue); - cache.set(endpoint, storageValue); - return EMBER_ZCL_STATUS_SUCCESS; -} - -} // namespace FeatureMap - -namespace ClusterRevision { - -EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, uint16_t & value) -{ - attribute_state_cache & cache = attribute_state_cache::get_instance(); - - using Traits = NumericAttributeTraits; - Traits::StorageType temp_storage; - - cache.get(endpoint, temp_storage); - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; -} - -EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const uint16_t & value) -{ - attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits; - Traits::StorageType storageValue; - Traits::WorkingToStorage(value, storageValue); - cache.set(endpoint, storageValue); - return EMBER_ZCL_STATUS_SUCCESS; -} - -} // namespace ClusterRevision - -} // namespace Attributes -} // namespace DoorLock - -namespace WindowCovering { -namespace Attributes { - -namespace Type { - -EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, chip::app::Clusters::WindowCovering::Type & value) -{ - attribute_state_cache & cache = attribute_state_cache::get_instance(); - - using Traits = NumericAttributeTraits; - Traits::StorageType temp_storage; - - cache.get(endpoint, temp_storage); - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; -} - -EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const chip::app::Clusters::WindowCovering::Type & value) -{ - attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits; - Traits::StorageType storageValue; - Traits::WorkingToStorage(value, storageValue); - cache.set(endpoint, storageValue); - return EMBER_ZCL_STATUS_SUCCESS; -} - -} // namespace Type - -namespace PhysicalClosedLimitLift { - -EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, uint16_t & value) -{ - attribute_state_cache & cache = attribute_state_cache::get_instance(); - - using Traits = NumericAttributeTraits; - Traits::StorageType temp_storage; - - cache.get(endpoint, temp_storage); - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; -} - -EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const uint16_t & value) -{ - attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits; - Traits::StorageType storageValue; - Traits::WorkingToStorage(value, storageValue); - cache.set(endpoint, storageValue); - return EMBER_ZCL_STATUS_SUCCESS; -} - -} // namespace PhysicalClosedLimitLift - -namespace PhysicalClosedLimitTilt { - -EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, uint16_t & value) -{ - attribute_state_cache & cache = attribute_state_cache::get_instance(); - - using Traits = NumericAttributeTraits; - Traits::StorageType temp_storage; - - cache.get(endpoint, temp_storage); - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; -} - -EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const uint16_t & value) -{ - attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits; - Traits::StorageType storageValue; - Traits::WorkingToStorage(value, storageValue); - cache.set(endpoint, storageValue); - return EMBER_ZCL_STATUS_SUCCESS; -} - -} // namespace PhysicalClosedLimitTilt - -namespace CurrentPositionLift { - -EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, chip::app::DataModel::Nullable & value) -{ - attribute_state_cache & cache = attribute_state_cache::get_instance(); - - using Traits = NumericAttributeTraits; - Traits::StorageType temp_storage; - - cache.get(endpoint, temp_storage); - auto tmp = Traits::StorageToWorking(temp_storage); - - value.SetNonNull(tmp); - return EMBER_ZCL_STATUS_SUCCESS; -} - -EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const chip::app::DataModel::Nullable & value) -{ - attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits; - Traits::StorageType storageValue; - if (value.HasValidValue()) - { - Traits::WorkingToStorage(value.Value(), storageValue); - } - else - { - return EMBER_ZCL_STATUS_FAILURE; - } - cache.set(endpoint, storageValue); - return EMBER_ZCL_STATUS_SUCCESS; -} - -} // namespace CurrentPositionLift - -namespace CurrentPositionTilt { - -EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, chip::app::DataModel::Nullable & value) -{ - attribute_state_cache & cache = attribute_state_cache::get_instance(); - - using Traits = NumericAttributeTraits; - Traits::StorageType temp_storage; - - cache.get(endpoint, temp_storage); - auto tmp = Traits::StorageToWorking(temp_storage); - - value.SetNonNull(tmp); - return EMBER_ZCL_STATUS_SUCCESS; -} - -EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const chip::app::DataModel::Nullable & value) -{ - attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits; - Traits::StorageType storageValue; - if (value.HasValidValue()) - { - Traits::WorkingToStorage(value.Value(), storageValue); - } - else - { - return EMBER_ZCL_STATUS_FAILURE; - } - cache.set(endpoint, storageValue); - return EMBER_ZCL_STATUS_SUCCESS; -} - -} // namespace CurrentPositionTilt - -namespace NumberOfActuationsLift { - -EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, uint16_t & value) -{ - attribute_state_cache & cache = attribute_state_cache::get_instance(); - - using Traits = NumericAttributeTraits; - Traits::StorageType temp_storage; - - cache.get(endpoint, temp_storage); - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; -} - -EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const uint16_t & value) -{ - attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits; - Traits::StorageType storageValue; - Traits::WorkingToStorage(value, storageValue); - cache.set(endpoint, storageValue); - return EMBER_ZCL_STATUS_SUCCESS; -} - -} // namespace NumberOfActuationsLift - -namespace NumberOfActuationsTilt { - -EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, uint16_t & value) -{ - attribute_state_cache & cache = attribute_state_cache::get_instance(); - - using Traits = NumericAttributeTraits; - Traits::StorageType temp_storage; - - cache.get(endpoint, temp_storage); - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; -} - -EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const uint16_t & value) -{ - attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits; - Traits::StorageType storageValue; - Traits::WorkingToStorage(value, storageValue); - cache.set(endpoint, storageValue); - return EMBER_ZCL_STATUS_SUCCESS; -} - -} // namespace NumberOfActuationsTilt - -namespace ConfigStatus { - -EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, - chip::BitMask & value) -{ - attribute_state_cache & cache = attribute_state_cache::get_instance(); - - using Traits = NumericAttributeTraits>; - Traits::StorageType temp_storage; - - cache.get(endpoint, temp_storage); - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; -} - -EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, - const chip::BitMask & value) -{ - attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits>; - Traits::StorageType storageValue; - Traits::WorkingToStorage(value, storageValue); - cache.set(endpoint, storageValue); - return EMBER_ZCL_STATUS_SUCCESS; -} - -} // namespace ConfigStatus - -namespace CurrentPositionLiftPercentage { - -EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, chip::app::DataModel::Nullable & value) -{ - attribute_state_cache & cache = attribute_state_cache::get_instance(); - - using Traits = NumericAttributeTraits; - Traits::StorageType temp_storage; - - cache.get(endpoint, temp_storage); - auto tmp = Traits::StorageToWorking(temp_storage); - - value.SetNonNull(tmp); - return EMBER_ZCL_STATUS_SUCCESS; -} - -EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const chip::app::DataModel::Nullable & value) -{ - attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits; - Traits::StorageType storageValue; - if (value.HasValidValue()) - { - Traits::WorkingToStorage(value.Value(), storageValue); - } - else - { - return EMBER_ZCL_STATUS_FAILURE; - } - cache.set(endpoint, storageValue); - return EMBER_ZCL_STATUS_SUCCESS; -} - -} // namespace CurrentPositionLiftPercentage - -namespace CurrentPositionTiltPercentage { - -EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, chip::app::DataModel::Nullable & value) -{ - attribute_state_cache & cache = attribute_state_cache::get_instance(); - - using Traits = NumericAttributeTraits; - Traits::StorageType temp_storage; - - cache.get(endpoint, temp_storage); - auto tmp = Traits::StorageToWorking(temp_storage); - - value.SetNonNull(tmp); - return EMBER_ZCL_STATUS_SUCCESS; -} - -EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const chip::app::DataModel::Nullable & value) -{ - attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits; - Traits::StorageType storageValue; - if (value.HasValidValue()) - { - Traits::WorkingToStorage(value.Value(), storageValue); - } - else - { - return EMBER_ZCL_STATUS_FAILURE; - } - cache.set(endpoint, storageValue); - return EMBER_ZCL_STATUS_SUCCESS; -} - -} // namespace CurrentPositionTiltPercentage - -namespace OperationalStatus { - -EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, - chip::BitMask & value) -{ - attribute_state_cache & cache = attribute_state_cache::get_instance(); - - using Traits = NumericAttributeTraits>; - Traits::StorageType temp_storage; - - cache.get(endpoint, temp_storage); - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; -} - -EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, - const chip::BitMask & value) -{ - attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits>; - Traits::StorageType storageValue; - Traits::WorkingToStorage(value, storageValue); - cache.set(endpoint, storageValue); - return EMBER_ZCL_STATUS_SUCCESS; -} - -} // namespace OperationalStatus - -namespace TargetPositionLiftPercent100ths { - -EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, chip::app::DataModel::Nullable & value) -{ - attribute_state_cache & cache = attribute_state_cache::get_instance(); - - using Traits = NumericAttributeTraits; - Traits::StorageType temp_storage; - - cache.get(endpoint, temp_storage); - auto tmp = Traits::StorageToWorking(temp_storage); - - value.SetNonNull(tmp); - return EMBER_ZCL_STATUS_SUCCESS; -} - -EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, - const chip::app::DataModel::Nullable & value) -{ - attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits; - Traits::StorageType storageValue; - if (value.HasValidValue()) - { - Traits::WorkingToStorage(value.Value(), storageValue); - } - else - { - return EMBER_ZCL_STATUS_FAILURE; - } - cache.set(endpoint, storageValue); - return EMBER_ZCL_STATUS_SUCCESS; -} - -} // namespace TargetPositionLiftPercent100ths - -namespace TargetPositionTiltPercent100ths { - -EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, chip::app::DataModel::Nullable & value) -{ - attribute_state_cache & cache = attribute_state_cache::get_instance(); - - using Traits = NumericAttributeTraits; - Traits::StorageType temp_storage; - - cache.get(endpoint, temp_storage); - auto tmp = Traits::StorageToWorking(temp_storage); - - value.SetNonNull(tmp); - return EMBER_ZCL_STATUS_SUCCESS; -} - -EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, - const chip::app::DataModel::Nullable & value) -{ - attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits; - Traits::StorageType storageValue; - if (value.HasValidValue()) - { - Traits::WorkingToStorage(value.Value(), storageValue); - } - else - { - return EMBER_ZCL_STATUS_FAILURE; - } - cache.set(endpoint, storageValue); - return EMBER_ZCL_STATUS_SUCCESS; -} - -} // namespace TargetPositionTiltPercent100ths - -namespace EndProductType { - -EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, chip::app::Clusters::WindowCovering::EndProductType & value) -{ - attribute_state_cache & cache = attribute_state_cache::get_instance(); - - using Traits = NumericAttributeTraits; - Traits::StorageType temp_storage; - - cache.get(endpoint, temp_storage); - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; -} - -EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, - const chip::app::Clusters::WindowCovering::EndProductType & value) -{ - attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits; - Traits::StorageType storageValue; - Traits::WorkingToStorage(value, storageValue); - cache.set(endpoint, storageValue); - return EMBER_ZCL_STATUS_SUCCESS; -} - -} // namespace EndProductType - -namespace CurrentPositionLiftPercent100ths { - -EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, chip::app::DataModel::Nullable & value) -{ - attribute_state_cache & cache = attribute_state_cache::get_instance(); - - using Traits = NumericAttributeTraits; - Traits::StorageType temp_storage; - - cache.get(endpoint, temp_storage); - auto tmp = Traits::StorageToWorking(temp_storage); - - value.SetNonNull(tmp); - return EMBER_ZCL_STATUS_SUCCESS; -} - -EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, - const chip::app::DataModel::Nullable & value) -{ - attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits; - Traits::StorageType storageValue; - if (value.HasValidValue()) - { - Traits::WorkingToStorage(value.Value(), storageValue); - } - else - { - return EMBER_ZCL_STATUS_FAILURE; - } - cache.set(endpoint, storageValue); - return EMBER_ZCL_STATUS_SUCCESS; -} - -} // namespace CurrentPositionLiftPercent100ths - -namespace CurrentPositionTiltPercent100ths { - -EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, chip::app::DataModel::Nullable & value) -{ - attribute_state_cache & cache = attribute_state_cache::get_instance(); - - using Traits = NumericAttributeTraits; - Traits::StorageType temp_storage; - - cache.get(endpoint, temp_storage); - auto tmp = Traits::StorageToWorking(temp_storage); - - value.SetNonNull(tmp); - return EMBER_ZCL_STATUS_SUCCESS; -} - -EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, - const chip::app::DataModel::Nullable & value) -{ - attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits; - Traits::StorageType storageValue; - if (value.HasValidValue()) - { - Traits::WorkingToStorage(value.Value(), storageValue); - } - else - { - return EMBER_ZCL_STATUS_FAILURE; - } - cache.set(endpoint, storageValue); - return EMBER_ZCL_STATUS_SUCCESS; -} - -} // namespace CurrentPositionTiltPercent100ths - -namespace InstalledOpenLimitLift { - -EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, uint16_t & value) -{ - attribute_state_cache & cache = attribute_state_cache::get_instance(); - - using Traits = NumericAttributeTraits; - Traits::StorageType temp_storage; - - cache.get(endpoint, temp_storage); - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; -} - -EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const uint16_t & value) -{ - attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits; - Traits::StorageType storageValue; - Traits::WorkingToStorage(value, storageValue); - cache.set(endpoint, storageValue); - return EMBER_ZCL_STATUS_SUCCESS; -} - -} // namespace InstalledOpenLimitLift - -namespace InstalledClosedLimitLift { - -EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, uint16_t & value) -{ - attribute_state_cache & cache = attribute_state_cache::get_instance(); - - using Traits = NumericAttributeTraits; - Traits::StorageType temp_storage; - - cache.get(endpoint, temp_storage); - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; -} - -EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const uint16_t & value) -{ - attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits; - Traits::StorageType storageValue; - Traits::WorkingToStorage(value, storageValue); - cache.set(endpoint, storageValue); - return EMBER_ZCL_STATUS_SUCCESS; -} - -} // namespace InstalledClosedLimitLift - -namespace InstalledOpenLimitTilt { - -EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, uint16_t & value) -{ - attribute_state_cache & cache = attribute_state_cache::get_instance(); - - using Traits = NumericAttributeTraits; - Traits::StorageType temp_storage; - - cache.get(endpoint, temp_storage); - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; -} - -EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const uint16_t & value) -{ - attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits; - Traits::StorageType storageValue; - Traits::WorkingToStorage(value, storageValue); - cache.set(endpoint, storageValue); - return EMBER_ZCL_STATUS_SUCCESS; -} - -} // namespace InstalledOpenLimitTilt - -namespace InstalledClosedLimitTilt { - -EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, uint16_t & value) -{ - attribute_state_cache & cache = attribute_state_cache::get_instance(); - - using Traits = NumericAttributeTraits; - Traits::StorageType temp_storage; - - cache.get(endpoint, temp_storage); - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; -} - -EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const uint16_t & value) -{ - attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits; - Traits::StorageType storageValue; - Traits::WorkingToStorage(value, storageValue); - cache.set(endpoint, storageValue); - return EMBER_ZCL_STATUS_SUCCESS; -} - -} // namespace InstalledClosedLimitTilt - -namespace Mode { - -EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, - chip::BitMask & value) -{ - attribute_state_cache & cache = attribute_state_cache::get_instance(); - - using Traits = NumericAttributeTraits>; - Traits::StorageType temp_storage; - - cache.get(endpoint, temp_storage); - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; -} - -EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, - const chip::BitMask & value) -{ - attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits>; - Traits::StorageType storageValue; - Traits::WorkingToStorage(value, storageValue); - cache.set(endpoint, storageValue); - return EMBER_ZCL_STATUS_SUCCESS; -} - -} // namespace Mode - -namespace SafetyStatus { - -EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, - chip::BitMask & value) -{ - attribute_state_cache & cache = attribute_state_cache::get_instance(); - - using Traits = NumericAttributeTraits>; - Traits::StorageType temp_storage; - - cache.get(endpoint, temp_storage); - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; -} - -EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, - const chip::BitMask & value) -{ - attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits>; - Traits::StorageType storageValue; - Traits::WorkingToStorage(value, storageValue); - cache.set(endpoint, storageValue); - return EMBER_ZCL_STATUS_SUCCESS; -} - -} // namespace SafetyStatus - -namespace FeatureMap { - -EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, uint32_t & value) -{ - attribute_state_cache & cache = attribute_state_cache::get_instance(); - - using Traits = NumericAttributeTraits; - Traits::StorageType temp_storage; - - cache.get(endpoint, temp_storage); - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; -} - -EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const uint32_t & value) -{ - attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits; - Traits::StorageType storageValue; - Traits::WorkingToStorage(value, storageValue); - cache.set(endpoint, storageValue); - return EMBER_ZCL_STATUS_SUCCESS; -} - -} // namespace FeatureMap - -namespace ClusterRevision { - -EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, uint16_t & value) -{ - attribute_state_cache & cache = attribute_state_cache::get_instance(); - - using Traits = NumericAttributeTraits; - Traits::StorageType temp_storage; - - cache.get(endpoint, temp_storage); - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; -} - -EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const uint16_t & value) +EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const uint32_t & value) { attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); cache.set(endpoint, storageValue); return EMBER_ZCL_STATUS_SUCCESS; } -} // namespace ClusterRevision - -} // namespace Attributes -} // namespace WindowCovering - -namespace BarrierControl { -namespace Attributes { +} // namespace AutoRelockTime -namespace BarrierMovingState { +namespace SoundVolume { EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, uint8_t & value) { @@ -10707,15 +8464,15 @@ EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const uint8 return EMBER_ZCL_STATUS_SUCCESS; } -} // namespace BarrierMovingState +} // namespace SoundVolume -namespace BarrierSafetyStatus { +namespace OperatingMode { -EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, uint16_t & value) +EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, chip::app::Clusters::DoorLock::DlOperatingMode & value) { attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType temp_storage; cache.get(endpoint, temp_storage); @@ -10725,25 +8482,26 @@ EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, uint16_t & return EMBER_ZCL_STATUS_SUCCESS; } -EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const uint16_t & value) +EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const chip::app::Clusters::DoorLock::DlOperatingMode & value) { attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); cache.set(endpoint, storageValue); return EMBER_ZCL_STATUS_SUCCESS; } -} // namespace BarrierSafetyStatus +} // namespace OperatingMode -namespace BarrierCapabilities { +namespace SupportedOperatingModes { -EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, uint8_t & value) +EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, + chip::BitMask & value) { attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits>; Traits::StorageType temp_storage; cache.get(endpoint, temp_storage); @@ -10753,25 +8511,27 @@ EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, uint8_t & v return EMBER_ZCL_STATUS_SUCCESS; } -EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const uint8_t & value) +EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, + const chip::BitMask & value) { attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits>; Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); cache.set(endpoint, storageValue); return EMBER_ZCL_STATUS_SUCCESS; } -} // namespace BarrierCapabilities +} // namespace SupportedOperatingModes -namespace BarrierOpenEvents { +namespace DefaultConfigurationRegister { -EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, uint16_t & value) +EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, + chip::BitMask & value) { attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits>; Traits::StorageType temp_storage; cache.get(endpoint, temp_storage); @@ -10781,25 +8541,26 @@ EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, uint16_t & return EMBER_ZCL_STATUS_SUCCESS; } -EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const uint16_t & value) +EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, + const chip::BitMask & value) { attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits>; Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); cache.set(endpoint, storageValue); return EMBER_ZCL_STATUS_SUCCESS; } -} // namespace BarrierOpenEvents +} // namespace DefaultConfigurationRegister -namespace BarrierCloseEvents { +namespace EnableLocalProgramming { -EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, uint16_t & value) +EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, bool & value) { attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType temp_storage; cache.get(endpoint, temp_storage); @@ -10809,25 +8570,25 @@ EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, uint16_t & return EMBER_ZCL_STATUS_SUCCESS; } -EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const uint16_t & value) +EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const bool & value) { attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); cache.set(endpoint, storageValue); return EMBER_ZCL_STATUS_SUCCESS; } -} // namespace BarrierCloseEvents +} // namespace EnableLocalProgramming -namespace BarrierCommandOpenEvents { +namespace EnableOneTouchLocking { -EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, uint16_t & value) +EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, bool & value) { attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType temp_storage; cache.get(endpoint, temp_storage); @@ -10837,25 +8598,25 @@ EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, uint16_t & return EMBER_ZCL_STATUS_SUCCESS; } -EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const uint16_t & value) +EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const bool & value) { attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); cache.set(endpoint, storageValue); return EMBER_ZCL_STATUS_SUCCESS; } -} // namespace BarrierCommandOpenEvents +} // namespace EnableOneTouchLocking -namespace BarrierCommandCloseEvents { +namespace EnableInsideStatusLED { -EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, uint16_t & value) +EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, bool & value) { attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType temp_storage; cache.get(endpoint, temp_storage); @@ -10865,25 +8626,25 @@ EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, uint16_t & return EMBER_ZCL_STATUS_SUCCESS; } -EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const uint16_t & value) +EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const bool & value) { attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); cache.set(endpoint, storageValue); return EMBER_ZCL_STATUS_SUCCESS; } -} // namespace BarrierCommandCloseEvents +} // namespace EnableInsideStatusLED -namespace BarrierOpenPeriod { +namespace EnablePrivacyModeButton { -EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, uint16_t & value) +EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, bool & value) { attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType temp_storage; cache.get(endpoint, temp_storage); @@ -10893,25 +8654,26 @@ EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, uint16_t & return EMBER_ZCL_STATUS_SUCCESS; } -EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const uint16_t & value) +EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const bool & value) { attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); cache.set(endpoint, storageValue); return EMBER_ZCL_STATUS_SUCCESS; } -} // namespace BarrierOpenPeriod +} // namespace EnablePrivacyModeButton -namespace BarrierClosePeriod { +namespace LocalProgrammingFeatures { -EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, uint16_t & value) +EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, + chip::BitMask & value) { attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits>; Traits::StorageType temp_storage; cache.get(endpoint, temp_storage); @@ -10921,19 +8683,20 @@ EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, uint16_t & return EMBER_ZCL_STATUS_SUCCESS; } -EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const uint16_t & value) +EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, + const chip::BitMask & value) { attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits>; Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); cache.set(endpoint, storageValue); return EMBER_ZCL_STATUS_SUCCESS; } -} // namespace BarrierClosePeriod +} // namespace LocalProgrammingFeatures -namespace BarrierPosition { +namespace WrongCodeEntryLimit { EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, uint8_t & value) { @@ -10959,15 +8722,15 @@ EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const uint8 return EMBER_ZCL_STATUS_SUCCESS; } -} // namespace BarrierPosition +} // namespace WrongCodeEntryLimit -namespace FeatureMap { +namespace UserCodeTemporaryDisableTime { -EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, uint32_t & value) +EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, uint8_t & value) { attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType temp_storage; cache.get(endpoint, temp_storage); @@ -10977,25 +8740,25 @@ EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, uint32_t & return EMBER_ZCL_STATUS_SUCCESS; } -EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const uint32_t & value) +EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const uint8_t & value) { attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); cache.set(endpoint, storageValue); return EMBER_ZCL_STATUS_SUCCESS; } -} // namespace FeatureMap +} // namespace UserCodeTemporaryDisableTime -namespace ClusterRevision { +namespace SendPINOverTheAir { -EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, uint16_t & value) +EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, bool & value) { attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType temp_storage; cache.get(endpoint, temp_storage); @@ -11005,62 +8768,49 @@ EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, uint16_t & return EMBER_ZCL_STATUS_SUCCESS; } -EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const uint16_t & value) +EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const bool & value) { attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); cache.set(endpoint, storageValue); return EMBER_ZCL_STATUS_SUCCESS; } -} // namespace ClusterRevision - -} // namespace Attributes -} // namespace BarrierControl - -namespace PumpConfigurationAndControl { -namespace Attributes { +} // namespace SendPINOverTheAir -namespace MaxPressure { +namespace RequirePINforRemoteOperation { -EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, chip::app::DataModel::Nullable & value) +EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, bool & value) { attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType temp_storage; cache.get(endpoint, temp_storage); auto tmp = Traits::StorageToWorking(temp_storage); - value.SetNonNull(tmp); + value = tmp; return EMBER_ZCL_STATUS_SUCCESS; } -EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const chip::app::DataModel::Nullable & value) +EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const bool & value) { attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType storageValue; - if (value.HasValidValue()) - { - Traits::WorkingToStorage(value.Value(), storageValue); - } - else - { - return EMBER_ZCL_STATUS_FAILURE; - } + Traits::WorkingToStorage(value, storageValue); cache.set(endpoint, storageValue); return EMBER_ZCL_STATUS_SUCCESS; } -} // namespace MaxPressure +} // namespace RequirePINforRemoteOperation -namespace MaxSpeed { +namespace ExpiringUserTimeout { -EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, chip::app::DataModel::Nullable & value) +EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, uint16_t & value) { attribute_state_cache & cache = attribute_state_cache::get_instance(); @@ -11070,205 +8820,169 @@ EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, chip::app:: cache.get(endpoint, temp_storage); auto tmp = Traits::StorageToWorking(temp_storage); - value.SetNonNull(tmp); + value = tmp; return EMBER_ZCL_STATUS_SUCCESS; } -EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const chip::app::DataModel::Nullable & value) +EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const uint16_t & value) { attribute_state_cache & cache = attribute_state_cache::get_instance(); using Traits = NumericAttributeTraits; Traits::StorageType storageValue; - if (value.HasValidValue()) - { - Traits::WorkingToStorage(value.Value(), storageValue); - } - else - { - return EMBER_ZCL_STATUS_FAILURE; - } + Traits::WorkingToStorage(value, storageValue); cache.set(endpoint, storageValue); return EMBER_ZCL_STATUS_SUCCESS; } -} // namespace MaxSpeed +} // namespace ExpiringUserTimeout -namespace MaxFlow { +namespace FeatureMap { -EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, chip::app::DataModel::Nullable & value) +EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, uint32_t & value) { attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType temp_storage; cache.get(endpoint, temp_storage); auto tmp = Traits::StorageToWorking(temp_storage); - value.SetNonNull(tmp); + value = tmp; return EMBER_ZCL_STATUS_SUCCESS; } -EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const chip::app::DataModel::Nullable & value) +EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const uint32_t & value) { attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType storageValue; - if (value.HasValidValue()) - { - Traits::WorkingToStorage(value.Value(), storageValue); - } - else - { - return EMBER_ZCL_STATUS_FAILURE; - } + Traits::WorkingToStorage(value, storageValue); cache.set(endpoint, storageValue); return EMBER_ZCL_STATUS_SUCCESS; } -} // namespace MaxFlow +} // namespace FeatureMap -namespace MinConstPressure { +namespace ClusterRevision { -EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, chip::app::DataModel::Nullable & value) +EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, uint16_t & value) { attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType temp_storage; cache.get(endpoint, temp_storage); auto tmp = Traits::StorageToWorking(temp_storage); - value.SetNonNull(tmp); + value = tmp; return EMBER_ZCL_STATUS_SUCCESS; } -EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const chip::app::DataModel::Nullable & value) +EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const uint16_t & value) { attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType storageValue; - if (value.HasValidValue()) - { - Traits::WorkingToStorage(value.Value(), storageValue); - } - else - { - return EMBER_ZCL_STATUS_FAILURE; - } + Traits::WorkingToStorage(value, storageValue); cache.set(endpoint, storageValue); return EMBER_ZCL_STATUS_SUCCESS; } -} // namespace MinConstPressure +} // namespace ClusterRevision + +} // namespace Attributes +} // namespace DoorLock + +namespace WindowCovering { +namespace Attributes { -namespace MaxConstPressure { +namespace Type { -EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, chip::app::DataModel::Nullable & value) +EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, chip::app::Clusters::WindowCovering::Type & value) { attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType temp_storage; cache.get(endpoint, temp_storage); auto tmp = Traits::StorageToWorking(temp_storage); - value.SetNonNull(tmp); + value = tmp; return EMBER_ZCL_STATUS_SUCCESS; } -EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const chip::app::DataModel::Nullable & value) +EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const chip::app::Clusters::WindowCovering::Type & value) { attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType storageValue; - if (value.HasValidValue()) - { - Traits::WorkingToStorage(value.Value(), storageValue); - } - else - { - return EMBER_ZCL_STATUS_FAILURE; - } + Traits::WorkingToStorage(value, storageValue); cache.set(endpoint, storageValue); return EMBER_ZCL_STATUS_SUCCESS; } -} // namespace MaxConstPressure +} // namespace Type -namespace MinCompPressure { +namespace PhysicalClosedLimitLift { -EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, chip::app::DataModel::Nullable & value) +EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, uint16_t & value) { attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType temp_storage; cache.get(endpoint, temp_storage); auto tmp = Traits::StorageToWorking(temp_storage); - value.SetNonNull(tmp); + value = tmp; return EMBER_ZCL_STATUS_SUCCESS; } -EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const chip::app::DataModel::Nullable & value) +EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const uint16_t & value) { attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType storageValue; - if (value.HasValidValue()) - { - Traits::WorkingToStorage(value.Value(), storageValue); - } - else - { - return EMBER_ZCL_STATUS_FAILURE; - } + Traits::WorkingToStorage(value, storageValue); cache.set(endpoint, storageValue); return EMBER_ZCL_STATUS_SUCCESS; } -} // namespace MinCompPressure +} // namespace PhysicalClosedLimitLift -namespace MaxCompPressure { +namespace PhysicalClosedLimitTilt { -EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, chip::app::DataModel::Nullable & value) +EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, uint16_t & value) { attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType temp_storage; cache.get(endpoint, temp_storage); auto tmp = Traits::StorageToWorking(temp_storage); - value.SetNonNull(tmp); + value = tmp; return EMBER_ZCL_STATUS_SUCCESS; } -EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const chip::app::DataModel::Nullable & value) +EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const uint16_t & value) { attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType storageValue; - if (value.HasValidValue()) - { - Traits::WorkingToStorage(value.Value(), storageValue); - } - else - { - return EMBER_ZCL_STATUS_FAILURE; - } + Traits::WorkingToStorage(value, storageValue); cache.set(endpoint, storageValue); return EMBER_ZCL_STATUS_SUCCESS; } -} // namespace MaxCompPressure +} // namespace PhysicalClosedLimitTilt -namespace MinConstSpeed { +namespace CurrentPositionLift { EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, chip::app::DataModel::Nullable & value) { @@ -11301,9 +9015,9 @@ EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const chip: return EMBER_ZCL_STATUS_SUCCESS; } -} // namespace MinConstSpeed +} // namespace CurrentPositionLift -namespace MaxConstSpeed { +namespace CurrentPositionTilt { EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, chip::app::DataModel::Nullable & value) { @@ -11336,11 +9050,11 @@ EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const chip: return EMBER_ZCL_STATUS_SUCCESS; } -} // namespace MaxConstSpeed +} // namespace CurrentPositionTilt -namespace MinConstFlow { +namespace NumberOfActuationsLift { -EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, chip::app::DataModel::Nullable & value) +EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, uint16_t & value) { attribute_state_cache & cache = attribute_state_cache::get_instance(); @@ -11350,32 +9064,25 @@ EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, chip::app:: cache.get(endpoint, temp_storage); auto tmp = Traits::StorageToWorking(temp_storage); - value.SetNonNull(tmp); + value = tmp; return EMBER_ZCL_STATUS_SUCCESS; } -EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const chip::app::DataModel::Nullable & value) +EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const uint16_t & value) { attribute_state_cache & cache = attribute_state_cache::get_instance(); using Traits = NumericAttributeTraits; Traits::StorageType storageValue; - if (value.HasValidValue()) - { - Traits::WorkingToStorage(value.Value(), storageValue); - } - else - { - return EMBER_ZCL_STATUS_FAILURE; - } + Traits::WorkingToStorage(value, storageValue); cache.set(endpoint, storageValue); return EMBER_ZCL_STATUS_SUCCESS; } -} // namespace MinConstFlow +} // namespace NumberOfActuationsLift -namespace MaxConstFlow { +namespace NumberOfActuationsTilt { -EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, chip::app::DataModel::Nullable & value) +EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, uint16_t & value) { attribute_state_cache & cache = attribute_state_cache::get_instance(); @@ -11385,71 +9092,59 @@ EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, chip::app:: cache.get(endpoint, temp_storage); auto tmp = Traits::StorageToWorking(temp_storage); - value.SetNonNull(tmp); + value = tmp; return EMBER_ZCL_STATUS_SUCCESS; } -EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const chip::app::DataModel::Nullable & value) +EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const uint16_t & value) { attribute_state_cache & cache = attribute_state_cache::get_instance(); using Traits = NumericAttributeTraits; Traits::StorageType storageValue; - if (value.HasValidValue()) - { - Traits::WorkingToStorage(value.Value(), storageValue); - } - else - { - return EMBER_ZCL_STATUS_FAILURE; - } + Traits::WorkingToStorage(value, storageValue); cache.set(endpoint, storageValue); return EMBER_ZCL_STATUS_SUCCESS; } -} // namespace MaxConstFlow +} // namespace NumberOfActuationsTilt -namespace MinConstTemp { +namespace ConfigStatus { -EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, chip::app::DataModel::Nullable & value) +EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, + chip::BitMask & value) { attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits>; Traits::StorageType temp_storage; cache.get(endpoint, temp_storage); auto tmp = Traits::StorageToWorking(temp_storage); - value.SetNonNull(tmp); + value = tmp; return EMBER_ZCL_STATUS_SUCCESS; } -EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const chip::app::DataModel::Nullable & value) +EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, + const chip::BitMask & value) { attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits>; Traits::StorageType storageValue; - if (value.HasValidValue()) - { - Traits::WorkingToStorage(value.Value(), storageValue); - } - else - { - return EMBER_ZCL_STATUS_FAILURE; - } + Traits::WorkingToStorage(value, storageValue); cache.set(endpoint, storageValue); return EMBER_ZCL_STATUS_SUCCESS; } -} // namespace MinConstTemp +} // namespace ConfigStatus -namespace MaxConstTemp { +namespace CurrentPositionLiftPercentage { -EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, chip::app::DataModel::Nullable & value) +EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, chip::app::DataModel::Nullable & value) { attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType temp_storage; cache.get(endpoint, temp_storage); @@ -11459,10 +9154,10 @@ EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, chip::app:: return EMBER_ZCL_STATUS_SUCCESS; } -EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const chip::app::DataModel::Nullable & value) +EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const chip::app::DataModel::Nullable & value) { attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType storageValue; if (value.HasValidValue()) { @@ -11476,46 +9171,51 @@ EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const chip: return EMBER_ZCL_STATUS_SUCCESS; } -} // namespace MaxConstTemp +} // namespace CurrentPositionLiftPercentage -namespace PumpStatus { +namespace CurrentPositionTiltPercentage { -EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, - chip::BitMask & value) +EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, chip::app::DataModel::Nullable & value) { attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits>; + using Traits = NumericAttributeTraits; Traits::StorageType temp_storage; cache.get(endpoint, temp_storage); auto tmp = Traits::StorageToWorking(temp_storage); - value = tmp; + value.SetNonNull(tmp); return EMBER_ZCL_STATUS_SUCCESS; } -EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, - const chip::BitMask & value) +EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const chip::app::DataModel::Nullable & value) { attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits>; + using Traits = NumericAttributeTraits; Traits::StorageType storageValue; - Traits::WorkingToStorage(value, storageValue); + if (value.HasValidValue()) + { + Traits::WorkingToStorage(value.Value(), storageValue); + } + else + { + return EMBER_ZCL_STATUS_FAILURE; + } cache.set(endpoint, storageValue); return EMBER_ZCL_STATUS_SUCCESS; } -} // namespace PumpStatus +} // namespace CurrentPositionTiltPercentage -namespace EffectiveOperationMode { +namespace OperationalStatus { EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, - chip::app::Clusters::PumpConfigurationAndControl::PumpOperationMode & value) + chip::BitMask & value) { attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits>; Traits::StorageType temp_storage; cache.get(endpoint, temp_storage); @@ -11526,55 +9226,61 @@ EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, } EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, - const chip::app::Clusters::PumpConfigurationAndControl::PumpOperationMode & value) + const chip::BitMask & value) { attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits>; Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); cache.set(endpoint, storageValue); return EMBER_ZCL_STATUS_SUCCESS; } -} // namespace EffectiveOperationMode +} // namespace OperationalStatus -namespace EffectiveControlMode { +namespace TargetPositionLiftPercent100ths { -EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, - chip::app::Clusters::PumpConfigurationAndControl::PumpControlMode & value) +EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, chip::app::DataModel::Nullable & value) { attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType temp_storage; cache.get(endpoint, temp_storage); auto tmp = Traits::StorageToWorking(temp_storage); - value = tmp; + value.SetNonNull(tmp); return EMBER_ZCL_STATUS_SUCCESS; } EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, - const chip::app::Clusters::PumpConfigurationAndControl::PumpControlMode & value) + const chip::app::DataModel::Nullable & value) { attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType storageValue; - Traits::WorkingToStorage(value, storageValue); + if (value.HasValidValue()) + { + Traits::WorkingToStorage(value.Value(), storageValue); + } + else + { + return EMBER_ZCL_STATUS_FAILURE; + } cache.set(endpoint, storageValue); return EMBER_ZCL_STATUS_SUCCESS; } -} // namespace EffectiveControlMode +} // namespace TargetPositionLiftPercent100ths -namespace Capacity { +namespace TargetPositionTiltPercent100ths { -EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, chip::app::DataModel::Nullable & value) +EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, chip::app::DataModel::Nullable & value) { attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType temp_storage; cache.get(endpoint, temp_storage); @@ -11584,10 +9290,11 @@ EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, chip::app:: return EMBER_ZCL_STATUS_SUCCESS; } -EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const chip::app::DataModel::Nullable & value) +EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, + const chip::app::DataModel::Nullable & value) { attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType storageValue; if (value.HasValidValue()) { @@ -11601,50 +9308,44 @@ EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const chip: return EMBER_ZCL_STATUS_SUCCESS; } -} // namespace Capacity +} // namespace TargetPositionTiltPercent100ths -namespace Speed { +namespace EndProductType { -EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, chip::app::DataModel::Nullable & value) +EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, chip::app::Clusters::WindowCovering::EndProductType & value) { attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType temp_storage; cache.get(endpoint, temp_storage); auto tmp = Traits::StorageToWorking(temp_storage); - value.SetNonNull(tmp); + value = tmp; return EMBER_ZCL_STATUS_SUCCESS; } -EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const chip::app::DataModel::Nullable & value) +EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, + const chip::app::Clusters::WindowCovering::EndProductType & value) { attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType storageValue; - if (value.HasValidValue()) - { - Traits::WorkingToStorage(value.Value(), storageValue); - } - else - { - return EMBER_ZCL_STATUS_FAILURE; - } + Traits::WorkingToStorage(value, storageValue); cache.set(endpoint, storageValue); return EMBER_ZCL_STATUS_SUCCESS; } -} // namespace Speed +} // namespace EndProductType -namespace LifetimeRunningHours { +namespace CurrentPositionLiftPercent100ths { -EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, chip::app::DataModel::Nullable & value) +EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, chip::app::DataModel::Nullable & value) { attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits>; + using Traits = NumericAttributeTraits; Traits::StorageType temp_storage; cache.get(endpoint, temp_storage); @@ -11654,10 +9355,11 @@ EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, chip::app:: return EMBER_ZCL_STATUS_SUCCESS; } -EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const chip::app::DataModel::Nullable & value) +EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, + const chip::app::DataModel::Nullable & value) { attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits>; + using Traits = NumericAttributeTraits; Traits::StorageType storageValue; if (value.HasValidValue()) { @@ -11671,15 +9373,15 @@ EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const chip: return EMBER_ZCL_STATUS_SUCCESS; } -} // namespace LifetimeRunningHours +} // namespace CurrentPositionLiftPercent100ths -namespace Power { +namespace CurrentPositionTiltPercent100ths { -EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, chip::app::DataModel::Nullable & value) +EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, chip::app::DataModel::Nullable & value) { attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits>; + using Traits = NumericAttributeTraits; Traits::StorageType temp_storage; cache.get(endpoint, temp_storage); @@ -11689,10 +9391,11 @@ EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, chip::app:: return EMBER_ZCL_STATUS_SUCCESS; } -EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const chip::app::DataModel::Nullable & value) +EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, + const chip::app::DataModel::Nullable & value) { attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits>; + using Traits = NumericAttributeTraits; Traits::StorageType storageValue; if (value.HasValidValue()) { @@ -11706,51 +9409,43 @@ EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const chip: return EMBER_ZCL_STATUS_SUCCESS; } -} // namespace Power +} // namespace CurrentPositionTiltPercent100ths -namespace LifetimeEnergyConsumed { +namespace InstalledOpenLimitLift { -EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, chip::app::DataModel::Nullable & value) +EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, uint16_t & value) { attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType temp_storage; cache.get(endpoint, temp_storage); auto tmp = Traits::StorageToWorking(temp_storage); - value.SetNonNull(tmp); + value = tmp; return EMBER_ZCL_STATUS_SUCCESS; } -EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const chip::app::DataModel::Nullable & value) +EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const uint16_t & value) { attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType storageValue; - if (value.HasValidValue()) - { - Traits::WorkingToStorage(value.Value(), storageValue); - } - else - { - return EMBER_ZCL_STATUS_FAILURE; - } + Traits::WorkingToStorage(value, storageValue); cache.set(endpoint, storageValue); return EMBER_ZCL_STATUS_SUCCESS; } -} // namespace LifetimeEnergyConsumed +} // namespace InstalledOpenLimitLift -namespace OperationMode { +namespace InstalledClosedLimitLift { -EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, - chip::app::Clusters::PumpConfigurationAndControl::PumpOperationMode & value) +EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, uint16_t & value) { attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType temp_storage; cache.get(endpoint, temp_storage); @@ -11760,27 +9455,25 @@ EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, return EMBER_ZCL_STATUS_SUCCESS; } -EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, - const chip::app::Clusters::PumpConfigurationAndControl::PumpOperationMode & value) +EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const uint16_t & value) { attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); cache.set(endpoint, storageValue); return EMBER_ZCL_STATUS_SUCCESS; } -} // namespace OperationMode +} // namespace InstalledClosedLimitLift -namespace ControlMode { +namespace InstalledOpenLimitTilt { -EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, - chip::app::Clusters::PumpConfigurationAndControl::PumpControlMode & value) +EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, uint16_t & value) { attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType temp_storage; cache.get(endpoint, temp_storage); @@ -11790,26 +9483,25 @@ EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, return EMBER_ZCL_STATUS_SUCCESS; } -EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, - const chip::app::Clusters::PumpConfigurationAndControl::PumpControlMode & value) +EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const uint16_t & value) { attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); cache.set(endpoint, storageValue); return EMBER_ZCL_STATUS_SUCCESS; } -} // namespace ControlMode +} // namespace InstalledOpenLimitTilt -namespace FeatureMap { +namespace InstalledClosedLimitTilt { -EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, uint32_t & value) +EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, uint16_t & value) { attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType temp_storage; cache.get(endpoint, temp_storage); @@ -11819,25 +9511,26 @@ EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, uint32_t & return EMBER_ZCL_STATUS_SUCCESS; } -EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const uint32_t & value) +EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const uint16_t & value) { attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); cache.set(endpoint, storageValue); return EMBER_ZCL_STATUS_SUCCESS; } -} // namespace FeatureMap +} // namespace InstalledClosedLimitTilt -namespace ClusterRevision { +namespace Mode { -EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, uint16_t & value) +EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, + chip::BitMask & value) { attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits>; Traits::StorageType temp_storage; cache.get(endpoint, temp_storage); @@ -11847,101 +9540,84 @@ EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, uint16_t & return EMBER_ZCL_STATUS_SUCCESS; } -EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const uint16_t & value) +EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, + const chip::BitMask & value) { attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits>; Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); cache.set(endpoint, storageValue); return EMBER_ZCL_STATUS_SUCCESS; } -} // namespace ClusterRevision - -} // namespace Attributes -} // namespace PumpConfigurationAndControl - -namespace Thermostat { -namespace Attributes { +} // namespace Mode -namespace LocalTemperature { +namespace SafetyStatus { -EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, chip::app::DataModel::Nullable & value) +EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, + chip::BitMask & value) { attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits>; Traits::StorageType temp_storage; cache.get(endpoint, temp_storage); auto tmp = Traits::StorageToWorking(temp_storage); - value.SetNonNull(tmp); + value = tmp; return EMBER_ZCL_STATUS_SUCCESS; } -EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const chip::app::DataModel::Nullable & value) +EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, + const chip::BitMask & value) { attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits>; Traits::StorageType storageValue; - if (value.HasValidValue()) - { - Traits::WorkingToStorage(value.Value(), storageValue); - } - else - { - return EMBER_ZCL_STATUS_FAILURE; - } + Traits::WorkingToStorage(value, storageValue); cache.set(endpoint, storageValue); return EMBER_ZCL_STATUS_SUCCESS; } -} // namespace LocalTemperature +} // namespace SafetyStatus -namespace OutdoorTemperature { +namespace FeatureMap { -EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, chip::app::DataModel::Nullable & value) +EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, uint32_t & value) { attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType temp_storage; cache.get(endpoint, temp_storage); auto tmp = Traits::StorageToWorking(temp_storage); - value.SetNonNull(tmp); + value = tmp; return EMBER_ZCL_STATUS_SUCCESS; } -EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const chip::app::DataModel::Nullable & value) +EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const uint32_t & value) { attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType storageValue; - if (value.HasValidValue()) - { - Traits::WorkingToStorage(value.Value(), storageValue); - } - else - { - return EMBER_ZCL_STATUS_FAILURE; - } + Traits::WorkingToStorage(value, storageValue); cache.set(endpoint, storageValue); return EMBER_ZCL_STATUS_SUCCESS; } -} // namespace OutdoorTemperature +} // namespace FeatureMap -namespace Occupancy { +namespace ClusterRevision { -EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, uint8_t & value) +EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, uint16_t & value) { attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType temp_storage; cache.get(endpoint, temp_storage); @@ -11951,25 +9627,31 @@ EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, uint8_t & v return EMBER_ZCL_STATUS_SUCCESS; } -EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const uint8_t & value) +EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const uint16_t & value) { attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); cache.set(endpoint, storageValue); return EMBER_ZCL_STATUS_SUCCESS; } -} // namespace Occupancy +} // namespace ClusterRevision -namespace AbsMinHeatSetpointLimit { +} // namespace Attributes +} // namespace WindowCovering -EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, int16_t & value) +namespace BarrierControl { +namespace Attributes { + +namespace BarrierMovingState { + +EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, uint8_t & value) { attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType temp_storage; cache.get(endpoint, temp_storage); @@ -11979,25 +9661,25 @@ EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, int16_t & v return EMBER_ZCL_STATUS_SUCCESS; } -EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const int16_t & value) +EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const uint8_t & value) { attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); cache.set(endpoint, storageValue); return EMBER_ZCL_STATUS_SUCCESS; } -} // namespace AbsMinHeatSetpointLimit +} // namespace BarrierMovingState -namespace AbsMaxHeatSetpointLimit { +namespace BarrierSafetyStatus { -EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, int16_t & value) +EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, uint16_t & value) { attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType temp_storage; cache.get(endpoint, temp_storage); @@ -12007,25 +9689,25 @@ EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, int16_t & v return EMBER_ZCL_STATUS_SUCCESS; } -EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const int16_t & value) +EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const uint16_t & value) { attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); cache.set(endpoint, storageValue); return EMBER_ZCL_STATUS_SUCCESS; } -} // namespace AbsMaxHeatSetpointLimit +} // namespace BarrierSafetyStatus -namespace AbsMinCoolSetpointLimit { +namespace BarrierCapabilities { -EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, int16_t & value) +EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, uint8_t & value) { attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType temp_storage; cache.get(endpoint, temp_storage); @@ -12035,25 +9717,25 @@ EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, int16_t & v return EMBER_ZCL_STATUS_SUCCESS; } -EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const int16_t & value) +EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const uint8_t & value) { attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); cache.set(endpoint, storageValue); return EMBER_ZCL_STATUS_SUCCESS; } -} // namespace AbsMinCoolSetpointLimit +} // namespace BarrierCapabilities -namespace AbsMaxCoolSetpointLimit { +namespace BarrierOpenEvents { -EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, int16_t & value) +EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, uint16_t & value) { attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType temp_storage; cache.get(endpoint, temp_storage); @@ -12063,25 +9745,25 @@ EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, int16_t & v return EMBER_ZCL_STATUS_SUCCESS; } -EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const int16_t & value) +EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const uint16_t & value) { attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); cache.set(endpoint, storageValue); return EMBER_ZCL_STATUS_SUCCESS; } -} // namespace AbsMaxCoolSetpointLimit +} // namespace BarrierOpenEvents -namespace PICoolingDemand { +namespace BarrierCloseEvents { -EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, uint8_t & value) +EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, uint16_t & value) { attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType temp_storage; cache.get(endpoint, temp_storage); @@ -12091,25 +9773,25 @@ EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, uint8_t & v return EMBER_ZCL_STATUS_SUCCESS; } -EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const uint8_t & value) +EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const uint16_t & value) { attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); cache.set(endpoint, storageValue); return EMBER_ZCL_STATUS_SUCCESS; } -} // namespace PICoolingDemand +} // namespace BarrierCloseEvents -namespace PIHeatingDemand { +namespace BarrierCommandOpenEvents { -EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, uint8_t & value) +EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, uint16_t & value) { attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType temp_storage; cache.get(endpoint, temp_storage); @@ -12119,25 +9801,25 @@ EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, uint8_t & v return EMBER_ZCL_STATUS_SUCCESS; } -EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const uint8_t & value) +EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const uint16_t & value) { attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); cache.set(endpoint, storageValue); return EMBER_ZCL_STATUS_SUCCESS; } -} // namespace PIHeatingDemand +} // namespace BarrierCommandOpenEvents -namespace HVACSystemTypeConfiguration { +namespace BarrierCommandCloseEvents { -EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, uint8_t & value) +EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, uint16_t & value) { attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType temp_storage; cache.get(endpoint, temp_storage); @@ -12147,25 +9829,25 @@ EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, uint8_t & v return EMBER_ZCL_STATUS_SUCCESS; } -EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const uint8_t & value) +EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const uint16_t & value) { attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); cache.set(endpoint, storageValue); return EMBER_ZCL_STATUS_SUCCESS; } -} // namespace HVACSystemTypeConfiguration +} // namespace BarrierCommandCloseEvents -namespace LocalTemperatureCalibration { +namespace BarrierOpenPeriod { -EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, int8_t & value) +EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, uint16_t & value) { attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType temp_storage; cache.get(endpoint, temp_storage); @@ -12175,25 +9857,25 @@ EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, int8_t & va return EMBER_ZCL_STATUS_SUCCESS; } -EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const int8_t & value) +EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const uint16_t & value) { attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); cache.set(endpoint, storageValue); return EMBER_ZCL_STATUS_SUCCESS; } -} // namespace LocalTemperatureCalibration +} // namespace BarrierOpenPeriod -namespace OccupiedCoolingSetpoint { +namespace BarrierClosePeriod { -EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, int16_t & value) +EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, uint16_t & value) { attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType temp_storage; cache.get(endpoint, temp_storage); @@ -12203,25 +9885,25 @@ EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, int16_t & v return EMBER_ZCL_STATUS_SUCCESS; } -EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const int16_t & value) +EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const uint16_t & value) { attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); cache.set(endpoint, storageValue); return EMBER_ZCL_STATUS_SUCCESS; } -} // namespace OccupiedCoolingSetpoint +} // namespace BarrierClosePeriod -namespace OccupiedHeatingSetpoint { +namespace BarrierPosition { -EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, int16_t & value) +EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, uint8_t & value) { attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType temp_storage; cache.get(endpoint, temp_storage); @@ -12231,25 +9913,25 @@ EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, int16_t & v return EMBER_ZCL_STATUS_SUCCESS; } -EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const int16_t & value) +EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const uint8_t & value) { attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); cache.set(endpoint, storageValue); return EMBER_ZCL_STATUS_SUCCESS; } -} // namespace OccupiedHeatingSetpoint +} // namespace BarrierPosition -namespace UnoccupiedCoolingSetpoint { +namespace FeatureMap { -EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, int16_t & value) +EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, uint32_t & value) { attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType temp_storage; cache.get(endpoint, temp_storage); @@ -12259,25 +9941,25 @@ EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, int16_t & v return EMBER_ZCL_STATUS_SUCCESS; } -EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const int16_t & value) +EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const uint32_t & value) { attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); cache.set(endpoint, storageValue); return EMBER_ZCL_STATUS_SUCCESS; } -} // namespace UnoccupiedCoolingSetpoint +} // namespace FeatureMap -namespace UnoccupiedHeatingSetpoint { +namespace ClusterRevision { -EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, int16_t & value) +EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, uint16_t & value) { attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType temp_storage; cache.get(endpoint, temp_storage); @@ -12287,21 +9969,27 @@ EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, int16_t & v return EMBER_ZCL_STATUS_SUCCESS; } -EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const int16_t & value) +EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const uint16_t & value) { attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); cache.set(endpoint, storageValue); return EMBER_ZCL_STATUS_SUCCESS; } -} // namespace UnoccupiedHeatingSetpoint +} // namespace ClusterRevision -namespace MinHeatSetpointLimit { +} // namespace Attributes +} // namespace BarrierControl -EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, int16_t & value) +namespace Thermostat { +namespace Attributes { + +namespace LocalTemperature { + +EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, chip::app::DataModel::Nullable & value) { attribute_state_cache & cache = attribute_state_cache::get_instance(); @@ -12311,25 +9999,32 @@ EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, int16_t & v cache.get(endpoint, temp_storage); auto tmp = Traits::StorageToWorking(temp_storage); - value = tmp; + value.SetNonNull(tmp); return EMBER_ZCL_STATUS_SUCCESS; } -EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const int16_t & value) +EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const chip::app::DataModel::Nullable & value) { attribute_state_cache & cache = attribute_state_cache::get_instance(); using Traits = NumericAttributeTraits; Traits::StorageType storageValue; - Traits::WorkingToStorage(value, storageValue); + if (value.HasValidValue()) + { + Traits::WorkingToStorage(value.Value(), storageValue); + } + else + { + return EMBER_ZCL_STATUS_FAILURE; + } cache.set(endpoint, storageValue); return EMBER_ZCL_STATUS_SUCCESS; } -} // namespace MinHeatSetpointLimit +} // namespace LocalTemperature -namespace MaxHeatSetpointLimit { +namespace OutdoorTemperature { -EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, int16_t & value) +EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, chip::app::DataModel::Nullable & value) { attribute_state_cache & cache = attribute_state_cache::get_instance(); @@ -12339,29 +10034,36 @@ EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, int16_t & v cache.get(endpoint, temp_storage); auto tmp = Traits::StorageToWorking(temp_storage); - value = tmp; + value.SetNonNull(tmp); return EMBER_ZCL_STATUS_SUCCESS; } -EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const int16_t & value) +EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const chip::app::DataModel::Nullable & value) { attribute_state_cache & cache = attribute_state_cache::get_instance(); using Traits = NumericAttributeTraits; Traits::StorageType storageValue; - Traits::WorkingToStorage(value, storageValue); + if (value.HasValidValue()) + { + Traits::WorkingToStorage(value.Value(), storageValue); + } + else + { + return EMBER_ZCL_STATUS_FAILURE; + } cache.set(endpoint, storageValue); return EMBER_ZCL_STATUS_SUCCESS; } -} // namespace MaxHeatSetpointLimit +} // namespace OutdoorTemperature -namespace MinCoolSetpointLimit { +namespace Occupancy { -EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, int16_t & value) +EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, uint8_t & value) { attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType temp_storage; cache.get(endpoint, temp_storage); @@ -12371,19 +10073,19 @@ EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, int16_t & v return EMBER_ZCL_STATUS_SUCCESS; } -EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const int16_t & value) +EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const uint8_t & value) { attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); cache.set(endpoint, storageValue); return EMBER_ZCL_STATUS_SUCCESS; } -} // namespace MinCoolSetpointLimit +} // namespace Occupancy -namespace MaxCoolSetpointLimit { +namespace AbsMinHeatSetpointLimit { EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, int16_t & value) { @@ -12409,15 +10111,15 @@ EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const int16 return EMBER_ZCL_STATUS_SUCCESS; } -} // namespace MaxCoolSetpointLimit +} // namespace AbsMinHeatSetpointLimit -namespace MinSetpointDeadBand { +namespace AbsMaxHeatSetpointLimit { -EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, int8_t & value) +EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, int16_t & value) { attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType temp_storage; cache.get(endpoint, temp_storage); @@ -12427,25 +10129,25 @@ EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, int8_t & va return EMBER_ZCL_STATUS_SUCCESS; } -EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const int8_t & value) +EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const int16_t & value) { attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); cache.set(endpoint, storageValue); return EMBER_ZCL_STATUS_SUCCESS; } -} // namespace MinSetpointDeadBand +} // namespace AbsMaxHeatSetpointLimit -namespace RemoteSensing { +namespace AbsMinCoolSetpointLimit { -EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, uint8_t & value) +EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, int16_t & value) { attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType temp_storage; cache.get(endpoint, temp_storage); @@ -12455,26 +10157,25 @@ EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, uint8_t & v return EMBER_ZCL_STATUS_SUCCESS; } -EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const uint8_t & value) +EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const int16_t & value) { attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); cache.set(endpoint, storageValue); return EMBER_ZCL_STATUS_SUCCESS; } -} // namespace RemoteSensing +} // namespace AbsMinCoolSetpointLimit -namespace ControlSequenceOfOperation { +namespace AbsMaxCoolSetpointLimit { -EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, - chip::app::Clusters::Thermostat::ThermostatControlSequence & value) +EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, int16_t & value) { attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType temp_storage; cache.get(endpoint, temp_storage); @@ -12484,20 +10185,19 @@ EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, return EMBER_ZCL_STATUS_SUCCESS; } -EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, - const chip::app::Clusters::Thermostat::ThermostatControlSequence & value) +EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const int16_t & value) { attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); cache.set(endpoint, storageValue); return EMBER_ZCL_STATUS_SUCCESS; } -} // namespace ControlSequenceOfOperation +} // namespace AbsMaxCoolSetpointLimit -namespace SystemMode { +namespace PICoolingDemand { EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, uint8_t & value) { @@ -12523,9 +10223,9 @@ EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const uint8 return EMBER_ZCL_STATUS_SUCCESS; } -} // namespace SystemMode +} // namespace PICoolingDemand -namespace ThermostatRunningMode { +namespace PIHeatingDemand { EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, uint8_t & value) { @@ -12551,9 +10251,9 @@ EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const uint8 return EMBER_ZCL_STATUS_SUCCESS; } -} // namespace ThermostatRunningMode +} // namespace PIHeatingDemand -namespace StartOfWeek { +namespace HVACSystemTypeConfiguration { EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, uint8_t & value) { @@ -12579,15 +10279,15 @@ EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const uint8 return EMBER_ZCL_STATUS_SUCCESS; } -} // namespace StartOfWeek +} // namespace HVACSystemTypeConfiguration -namespace NumberOfWeeklyTransitions { +namespace LocalTemperatureCalibration { -EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, uint8_t & value) +EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, int8_t & value) { attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType temp_storage; cache.get(endpoint, temp_storage); @@ -12597,25 +10297,25 @@ EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, uint8_t & v return EMBER_ZCL_STATUS_SUCCESS; } -EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const uint8_t & value) +EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const int8_t & value) { attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); cache.set(endpoint, storageValue); return EMBER_ZCL_STATUS_SUCCESS; } -} // namespace NumberOfWeeklyTransitions +} // namespace LocalTemperatureCalibration -namespace NumberOfDailyTransitions { +namespace OccupiedCoolingSetpoint { -EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, uint8_t & value) +EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, int16_t & value) { attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType temp_storage; cache.get(endpoint, temp_storage); @@ -12625,25 +10325,25 @@ EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, uint8_t & v return EMBER_ZCL_STATUS_SUCCESS; } -EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const uint8_t & value) +EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const int16_t & value) { attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); cache.set(endpoint, storageValue); return EMBER_ZCL_STATUS_SUCCESS; } -} // namespace NumberOfDailyTransitions +} // namespace OccupiedCoolingSetpoint -namespace TemperatureSetpointHold { +namespace OccupiedHeatingSetpoint { -EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, uint8_t & value) +EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, int16_t & value) { attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType temp_storage; cache.get(endpoint, temp_storage); @@ -12653,60 +10353,53 @@ EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, uint8_t & v return EMBER_ZCL_STATUS_SUCCESS; } -EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const uint8_t & value) +EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const int16_t & value) { attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); cache.set(endpoint, storageValue); return EMBER_ZCL_STATUS_SUCCESS; } -} // namespace TemperatureSetpointHold +} // namespace OccupiedHeatingSetpoint -namespace TemperatureSetpointHoldDuration { +namespace UnoccupiedCoolingSetpoint { -EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, chip::app::DataModel::Nullable & value) +EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, int16_t & value) { attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType temp_storage; cache.get(endpoint, temp_storage); auto tmp = Traits::StorageToWorking(temp_storage); - value.SetNonNull(tmp); + value = tmp; return EMBER_ZCL_STATUS_SUCCESS; } -EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const chip::app::DataModel::Nullable & value) +EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const int16_t & value) { attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType storageValue; - if (value.HasValidValue()) - { - Traits::WorkingToStorage(value.Value(), storageValue); - } - else - { - return EMBER_ZCL_STATUS_FAILURE; - } + Traits::WorkingToStorage(value, storageValue); cache.set(endpoint, storageValue); return EMBER_ZCL_STATUS_SUCCESS; } -} // namespace TemperatureSetpointHoldDuration +} // namespace UnoccupiedCoolingSetpoint -namespace ThermostatProgrammingOperationMode { +namespace UnoccupiedHeatingSetpoint { -EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, uint8_t & value) +EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, int16_t & value) { attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType temp_storage; cache.get(endpoint, temp_storage); @@ -12716,25 +10409,25 @@ EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, uint8_t & v return EMBER_ZCL_STATUS_SUCCESS; } -EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const uint8_t & value) +EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const int16_t & value) { attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); cache.set(endpoint, storageValue); return EMBER_ZCL_STATUS_SUCCESS; } -} // namespace ThermostatProgrammingOperationMode +} // namespace UnoccupiedHeatingSetpoint -namespace ThermostatRunningState { +namespace MinHeatSetpointLimit { -EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, uint16_t & value) +EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, int16_t & value) { attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType temp_storage; cache.get(endpoint, temp_storage); @@ -12744,25 +10437,25 @@ EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, uint16_t & return EMBER_ZCL_STATUS_SUCCESS; } -EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const uint16_t & value) +EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const int16_t & value) { attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); cache.set(endpoint, storageValue); return EMBER_ZCL_STATUS_SUCCESS; } -} // namespace ThermostatRunningState +} // namespace MinHeatSetpointLimit -namespace SetpointChangeSource { +namespace MaxHeatSetpointLimit { -EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, uint8_t & value) +EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, int16_t & value) { attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType temp_storage; cache.get(endpoint, temp_storage); @@ -12772,21 +10465,21 @@ EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, uint8_t & v return EMBER_ZCL_STATUS_SUCCESS; } -EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const uint8_t & value) +EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const int16_t & value) { attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); cache.set(endpoint, storageValue); return EMBER_ZCL_STATUS_SUCCESS; } -} // namespace SetpointChangeSource +} // namespace MaxHeatSetpointLimit -namespace SetpointChangeAmount { +namespace MinCoolSetpointLimit { -EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, chip::app::DataModel::Nullable & value) +EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, int16_t & value) { attribute_state_cache & cache = attribute_state_cache::get_instance(); @@ -12796,36 +10489,29 @@ EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, chip::app:: cache.get(endpoint, temp_storage); auto tmp = Traits::StorageToWorking(temp_storage); - value.SetNonNull(tmp); + value = tmp; return EMBER_ZCL_STATUS_SUCCESS; } -EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const chip::app::DataModel::Nullable & value) +EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const int16_t & value) { attribute_state_cache & cache = attribute_state_cache::get_instance(); using Traits = NumericAttributeTraits; Traits::StorageType storageValue; - if (value.HasValidValue()) - { - Traits::WorkingToStorage(value.Value(), storageValue); - } - else - { - return EMBER_ZCL_STATUS_FAILURE; - } + Traits::WorkingToStorage(value, storageValue); cache.set(endpoint, storageValue); return EMBER_ZCL_STATUS_SUCCESS; } -} // namespace SetpointChangeAmount +} // namespace MinCoolSetpointLimit -namespace SetpointChangeSourceTimestamp { +namespace MaxCoolSetpointLimit { -EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, uint32_t & value) +EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, int16_t & value) { attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType temp_storage; cache.get(endpoint, temp_storage); @@ -12835,56 +10521,49 @@ EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, uint32_t & return EMBER_ZCL_STATUS_SUCCESS; } -EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const uint32_t & value) +EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const int16_t & value) { attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); cache.set(endpoint, storageValue); return EMBER_ZCL_STATUS_SUCCESS; } -} // namespace SetpointChangeSourceTimestamp +} // namespace MaxCoolSetpointLimit -namespace OccupiedSetback { +namespace MinSetpointDeadBand { -EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, chip::app::DataModel::Nullable & value) +EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, int8_t & value) { attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType temp_storage; cache.get(endpoint, temp_storage); auto tmp = Traits::StorageToWorking(temp_storage); - value.SetNonNull(tmp); + value = tmp; return EMBER_ZCL_STATUS_SUCCESS; } -EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const chip::app::DataModel::Nullable & value) +EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const int8_t & value) { attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType storageValue; - if (value.HasValidValue()) - { - Traits::WorkingToStorage(value.Value(), storageValue); - } - else - { - return EMBER_ZCL_STATUS_FAILURE; - } + Traits::WorkingToStorage(value, storageValue); cache.set(endpoint, storageValue); return EMBER_ZCL_STATUS_SUCCESS; } -} // namespace OccupiedSetback +} // namespace MinSetpointDeadBand -namespace OccupiedSetbackMin { +namespace RemoteSensing { -EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, chip::app::DataModel::Nullable & value) +EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, uint8_t & value) { attribute_state_cache & cache = attribute_state_cache::get_instance(); @@ -12894,67 +10573,55 @@ EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, chip::app:: cache.get(endpoint, temp_storage); auto tmp = Traits::StorageToWorking(temp_storage); - value.SetNonNull(tmp); + value = tmp; return EMBER_ZCL_STATUS_SUCCESS; } -EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const chip::app::DataModel::Nullable & value) +EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const uint8_t & value) { attribute_state_cache & cache = attribute_state_cache::get_instance(); using Traits = NumericAttributeTraits; Traits::StorageType storageValue; - if (value.HasValidValue()) - { - Traits::WorkingToStorage(value.Value(), storageValue); - } - else - { - return EMBER_ZCL_STATUS_FAILURE; - } + Traits::WorkingToStorage(value, storageValue); cache.set(endpoint, storageValue); return EMBER_ZCL_STATUS_SUCCESS; } -} // namespace OccupiedSetbackMin +} // namespace RemoteSensing -namespace OccupiedSetbackMax { +namespace ControlSequenceOfOperation { -EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, chip::app::DataModel::Nullable & value) +EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, + chip::app::Clusters::Thermostat::ThermostatControlSequence & value) { attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType temp_storage; cache.get(endpoint, temp_storage); auto tmp = Traits::StorageToWorking(temp_storage); - value.SetNonNull(tmp); + value = tmp; return EMBER_ZCL_STATUS_SUCCESS; } -EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const chip::app::DataModel::Nullable & value) +EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, + const chip::app::Clusters::Thermostat::ThermostatControlSequence & value) { attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType storageValue; - if (value.HasValidValue()) - { - Traits::WorkingToStorage(value.Value(), storageValue); - } - else - { - return EMBER_ZCL_STATUS_FAILURE; - } + Traits::WorkingToStorage(value, storageValue); cache.set(endpoint, storageValue); return EMBER_ZCL_STATUS_SUCCESS; } -} // namespace OccupiedSetbackMax +} // namespace ControlSequenceOfOperation -namespace UnoccupiedSetback { +namespace SystemMode { -EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, chip::app::DataModel::Nullable & value) +EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, uint8_t & value) { attribute_state_cache & cache = attribute_state_cache::get_instance(); @@ -12964,32 +10631,25 @@ EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, chip::app:: cache.get(endpoint, temp_storage); auto tmp = Traits::StorageToWorking(temp_storage); - value.SetNonNull(tmp); + value = tmp; return EMBER_ZCL_STATUS_SUCCESS; } -EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const chip::app::DataModel::Nullable & value) +EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const uint8_t & value) { attribute_state_cache & cache = attribute_state_cache::get_instance(); using Traits = NumericAttributeTraits; Traits::StorageType storageValue; - if (value.HasValidValue()) - { - Traits::WorkingToStorage(value.Value(), storageValue); - } - else - { - return EMBER_ZCL_STATUS_FAILURE; - } + Traits::WorkingToStorage(value, storageValue); cache.set(endpoint, storageValue); return EMBER_ZCL_STATUS_SUCCESS; } -} // namespace UnoccupiedSetback +} // namespace SystemMode -namespace UnoccupiedSetbackMin { +namespace ThermostatRunningMode { -EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, chip::app::DataModel::Nullable & value) +EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, uint8_t & value) { attribute_state_cache & cache = attribute_state_cache::get_instance(); @@ -12999,32 +10659,25 @@ EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, chip::app:: cache.get(endpoint, temp_storage); auto tmp = Traits::StorageToWorking(temp_storage); - value.SetNonNull(tmp); + value = tmp; return EMBER_ZCL_STATUS_SUCCESS; } -EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const chip::app::DataModel::Nullable & value) +EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const uint8_t & value) { attribute_state_cache & cache = attribute_state_cache::get_instance(); using Traits = NumericAttributeTraits; Traits::StorageType storageValue; - if (value.HasValidValue()) - { - Traits::WorkingToStorage(value.Value(), storageValue); - } - else - { - return EMBER_ZCL_STATUS_FAILURE; - } + Traits::WorkingToStorage(value, storageValue); cache.set(endpoint, storageValue); return EMBER_ZCL_STATUS_SUCCESS; } -} // namespace UnoccupiedSetbackMin +} // namespace ThermostatRunningMode -namespace UnoccupiedSetbackMax { +namespace StartOfWeek { -EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, chip::app::DataModel::Nullable & value) +EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, uint8_t & value) { attribute_state_cache & cache = attribute_state_cache::get_instance(); @@ -13034,30 +10687,23 @@ EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, chip::app:: cache.get(endpoint, temp_storage); auto tmp = Traits::StorageToWorking(temp_storage); - value.SetNonNull(tmp); + value = tmp; return EMBER_ZCL_STATUS_SUCCESS; } -EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const chip::app::DataModel::Nullable & value) +EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const uint8_t & value) { attribute_state_cache & cache = attribute_state_cache::get_instance(); using Traits = NumericAttributeTraits; Traits::StorageType storageValue; - if (value.HasValidValue()) - { - Traits::WorkingToStorage(value.Value(), storageValue); - } - else - { - return EMBER_ZCL_STATUS_FAILURE; - } + Traits::WorkingToStorage(value, storageValue); cache.set(endpoint, storageValue); return EMBER_ZCL_STATUS_SUCCESS; } -} // namespace UnoccupiedSetbackMax +} // namespace StartOfWeek -namespace EmergencyHeatDelta { +namespace NumberOfWeeklyTransitions { EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, uint8_t & value) { @@ -13083,9 +10729,9 @@ EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const uint8 return EMBER_ZCL_STATUS_SUCCESS; } -} // namespace EmergencyHeatDelta +} // namespace NumberOfWeeklyTransitions -namespace ACType { +namespace NumberOfDailyTransitions { EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, uint8_t & value) { @@ -13111,15 +10757,15 @@ EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const uint8 return EMBER_ZCL_STATUS_SUCCESS; } -} // namespace ACType +} // namespace NumberOfDailyTransitions -namespace ACCapacity { +namespace TemperatureSetpointHold { -EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, uint16_t & value) +EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, uint8_t & value) { attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType temp_storage; cache.get(endpoint, temp_storage); @@ -13129,47 +10775,54 @@ EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, uint16_t & return EMBER_ZCL_STATUS_SUCCESS; } -EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const uint16_t & value) +EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const uint8_t & value) { attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); cache.set(endpoint, storageValue); return EMBER_ZCL_STATUS_SUCCESS; } -} // namespace ACCapacity +} // namespace TemperatureSetpointHold -namespace ACRefrigerantType { +namespace TemperatureSetpointHoldDuration { -EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, uint8_t & value) +EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, chip::app::DataModel::Nullable & value) { attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType temp_storage; cache.get(endpoint, temp_storage); auto tmp = Traits::StorageToWorking(temp_storage); - value = tmp; + value.SetNonNull(tmp); return EMBER_ZCL_STATUS_SUCCESS; } -EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const uint8_t & value) +EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const chip::app::DataModel::Nullable & value) { attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType storageValue; - Traits::WorkingToStorage(value, storageValue); + if (value.HasValidValue()) + { + Traits::WorkingToStorage(value.Value(), storageValue); + } + else + { + return EMBER_ZCL_STATUS_FAILURE; + } cache.set(endpoint, storageValue); return EMBER_ZCL_STATUS_SUCCESS; } -} // namespace ACRefrigerantType +} // namespace TemperatureSetpointHoldDuration -namespace ACCompressorType { +namespace ThermostatProgrammingOperationMode { EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, uint8_t & value) { @@ -13195,15 +10848,15 @@ EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const uint8 return EMBER_ZCL_STATUS_SUCCESS; } -} // namespace ACCompressorType +} // namespace ThermostatProgrammingOperationMode -namespace ACErrorCode { +namespace ThermostatRunningState { -EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, uint32_t & value) +EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, uint16_t & value) { attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType temp_storage; cache.get(endpoint, temp_storage); @@ -13213,19 +10866,19 @@ EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, uint32_t & return EMBER_ZCL_STATUS_SUCCESS; } -EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const uint32_t & value) +EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const uint16_t & value) { attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); cache.set(endpoint, storageValue); return EMBER_ZCL_STATUS_SUCCESS; } -} // namespace ACErrorCode +} // namespace ThermostatRunningState -namespace ACLouverPosition { +namespace SetpointChangeSource { EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, uint8_t & value) { @@ -13251,9 +10904,9 @@ EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const uint8 return EMBER_ZCL_STATUS_SUCCESS; } -} // namespace ACLouverPosition +} // namespace SetpointChangeSource -namespace ACCoilTemperature { +namespace SetpointChangeAmount { EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, chip::app::DataModel::Nullable & value) { @@ -13286,15 +10939,15 @@ EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const chip: return EMBER_ZCL_STATUS_SUCCESS; } -} // namespace ACCoilTemperature +} // namespace SetpointChangeAmount -namespace ACCapacityformat { +namespace SetpointChangeSourceTimestamp { -EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, uint8_t & value) +EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, uint32_t & value) { attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType temp_storage; cache.get(endpoint, temp_storage); @@ -13304,138 +10957,194 @@ EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, uint8_t & v return EMBER_ZCL_STATUS_SUCCESS; } -EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const uint8_t & value) +EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const uint32_t & value) { attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); cache.set(endpoint, storageValue); return EMBER_ZCL_STATUS_SUCCESS; } -} // namespace ACCapacityformat +} // namespace SetpointChangeSourceTimestamp -namespace FeatureMap { +namespace OccupiedSetback { -EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, uint32_t & value) +EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, chip::app::DataModel::Nullable & value) { attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType temp_storage; cache.get(endpoint, temp_storage); auto tmp = Traits::StorageToWorking(temp_storage); - value = tmp; + value.SetNonNull(tmp); return EMBER_ZCL_STATUS_SUCCESS; } -EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const uint32_t & value) +EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const chip::app::DataModel::Nullable & value) { attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType storageValue; - Traits::WorkingToStorage(value, storageValue); + if (value.HasValidValue()) + { + Traits::WorkingToStorage(value.Value(), storageValue); + } + else + { + return EMBER_ZCL_STATUS_FAILURE; + } cache.set(endpoint, storageValue); return EMBER_ZCL_STATUS_SUCCESS; } -} // namespace FeatureMap +} // namespace OccupiedSetback -namespace ClusterRevision { +namespace OccupiedSetbackMin { -EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, uint16_t & value) +EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, chip::app::DataModel::Nullable & value) { attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType temp_storage; cache.get(endpoint, temp_storage); auto tmp = Traits::StorageToWorking(temp_storage); - value = tmp; + value.SetNonNull(tmp); return EMBER_ZCL_STATUS_SUCCESS; } -EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const uint16_t & value) +EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const chip::app::DataModel::Nullable & value) { attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType storageValue; - Traits::WorkingToStorage(value, storageValue); + if (value.HasValidValue()) + { + Traits::WorkingToStorage(value.Value(), storageValue); + } + else + { + return EMBER_ZCL_STATUS_FAILURE; + } cache.set(endpoint, storageValue); return EMBER_ZCL_STATUS_SUCCESS; } -} // namespace ClusterRevision +} // namespace OccupiedSetbackMin -} // namespace Attributes -} // namespace Thermostat +namespace OccupiedSetbackMax { -namespace FanControl { -namespace Attributes { +EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, chip::app::DataModel::Nullable & value) +{ + attribute_state_cache & cache = attribute_state_cache::get_instance(); -namespace FanMode { + using Traits = NumericAttributeTraits; + Traits::StorageType temp_storage; -EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, chip::app::Clusters::FanControl::FanModeType & value) + cache.get(endpoint, temp_storage); + auto tmp = Traits::StorageToWorking(temp_storage); + + value.SetNonNull(tmp); + return EMBER_ZCL_STATUS_SUCCESS; +} + +EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const chip::app::DataModel::Nullable & value) { attribute_state_cache & cache = attribute_state_cache::get_instance(); + using Traits = NumericAttributeTraits; + Traits::StorageType storageValue; + if (value.HasValidValue()) + { + Traits::WorkingToStorage(value.Value(), storageValue); + } + else + { + return EMBER_ZCL_STATUS_FAILURE; + } + cache.set(endpoint, storageValue); + return EMBER_ZCL_STATUS_SUCCESS; +} - using Traits = NumericAttributeTraits; +} // namespace OccupiedSetbackMax + +namespace UnoccupiedSetback { + +EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, chip::app::DataModel::Nullable & value) +{ + attribute_state_cache & cache = attribute_state_cache::get_instance(); + + using Traits = NumericAttributeTraits; Traits::StorageType temp_storage; cache.get(endpoint, temp_storage); auto tmp = Traits::StorageToWorking(temp_storage); - value = tmp; + value.SetNonNull(tmp); return EMBER_ZCL_STATUS_SUCCESS; } -EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const chip::app::Clusters::FanControl::FanModeType & value) +EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const chip::app::DataModel::Nullable & value) { attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType storageValue; - Traits::WorkingToStorage(value, storageValue); + if (value.HasValidValue()) + { + Traits::WorkingToStorage(value.Value(), storageValue); + } + else + { + return EMBER_ZCL_STATUS_FAILURE; + } cache.set(endpoint, storageValue); return EMBER_ZCL_STATUS_SUCCESS; } -} // namespace FanMode +} // namespace UnoccupiedSetback -namespace FanModeSequence { +namespace UnoccupiedSetbackMin { -EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, chip::app::Clusters::FanControl::FanModeSequenceType & value) +EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, chip::app::DataModel::Nullable & value) { attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType temp_storage; cache.get(endpoint, temp_storage); auto tmp = Traits::StorageToWorking(temp_storage); - value = tmp; + value.SetNonNull(tmp); return EMBER_ZCL_STATUS_SUCCESS; } -EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, - const chip::app::Clusters::FanControl::FanModeSequenceType & value) +EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const chip::app::DataModel::Nullable & value) { attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType storageValue; - Traits::WorkingToStorage(value, storageValue); + if (value.HasValidValue()) + { + Traits::WorkingToStorage(value.Value(), storageValue); + } + else + { + return EMBER_ZCL_STATUS_FAILURE; + } cache.set(endpoint, storageValue); return EMBER_ZCL_STATUS_SUCCESS; } -} // namespace FanModeSequence +} // namespace UnoccupiedSetbackMin -namespace PercentSetting { +namespace UnoccupiedSetbackMax { EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, chip::app::DataModel::Nullable & value) { @@ -13468,9 +11177,9 @@ EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const chip: return EMBER_ZCL_STATUS_SUCCESS; } -} // namespace PercentSetting +} // namespace UnoccupiedSetbackMax -namespace PercentCurrent { +namespace EmergencyHeatDelta { EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, uint8_t & value) { @@ -13496,9 +11205,9 @@ EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const uint8 return EMBER_ZCL_STATUS_SUCCESS; } -} // namespace PercentCurrent +} // namespace EmergencyHeatDelta -namespace SpeedMax { +namespace ACType { EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, uint8_t & value) { @@ -13524,44 +11233,37 @@ EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const uint8 return EMBER_ZCL_STATUS_SUCCESS; } -} // namespace SpeedMax +} // namespace ACType -namespace SpeedSetting { +namespace ACCapacity { -EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, chip::app::DataModel::Nullable & value) +EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, uint16_t & value) { attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType temp_storage; cache.get(endpoint, temp_storage); auto tmp = Traits::StorageToWorking(temp_storage); - value.SetNonNull(tmp); + value = tmp; return EMBER_ZCL_STATUS_SUCCESS; } -EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const chip::app::DataModel::Nullable & value) +EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const uint16_t & value) { attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType storageValue; - if (value.HasValidValue()) - { - Traits::WorkingToStorage(value.Value(), storageValue); - } - else - { - return EMBER_ZCL_STATUS_FAILURE; - } + Traits::WorkingToStorage(value, storageValue); cache.set(endpoint, storageValue); return EMBER_ZCL_STATUS_SUCCESS; } -} // namespace SpeedSetting +} // namespace ACCapacity -namespace SpeedCurrent { +namespace ACRefrigerantType { EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, uint8_t & value) { @@ -13587,9 +11289,9 @@ EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const uint8 return EMBER_ZCL_STATUS_SUCCESS; } -} // namespace SpeedCurrent +} // namespace ACRefrigerantType -namespace RockSupport { +namespace ACCompressorType { EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, uint8_t & value) { @@ -13615,15 +11317,15 @@ EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const uint8 return EMBER_ZCL_STATUS_SUCCESS; } -} // namespace RockSupport +} // namespace ACCompressorType -namespace RockSetting { +namespace ACErrorCode { -EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, uint8_t & value) +EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, uint32_t & value) { attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType temp_storage; cache.get(endpoint, temp_storage); @@ -13633,19 +11335,19 @@ EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, uint8_t & v return EMBER_ZCL_STATUS_SUCCESS; } -EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const uint8_t & value) +EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const uint32_t & value) { attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); cache.set(endpoint, storageValue); return EMBER_ZCL_STATUS_SUCCESS; } -} // namespace RockSetting +} // namespace ACErrorCode -namespace WindSupport { +namespace ACLouverPosition { EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, uint8_t & value) { @@ -13671,9 +11373,44 @@ EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const uint8 return EMBER_ZCL_STATUS_SUCCESS; } -} // namespace WindSupport +} // namespace ACLouverPosition -namespace WindSetting { +namespace ACCoilTemperature { + +EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, chip::app::DataModel::Nullable & value) +{ + attribute_state_cache & cache = attribute_state_cache::get_instance(); + + using Traits = NumericAttributeTraits; + Traits::StorageType temp_storage; + + cache.get(endpoint, temp_storage); + auto tmp = Traits::StorageToWorking(temp_storage); + + value.SetNonNull(tmp); + return EMBER_ZCL_STATUS_SUCCESS; +} + +EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const chip::app::DataModel::Nullable & value) +{ + attribute_state_cache & cache = attribute_state_cache::get_instance(); + using Traits = NumericAttributeTraits; + Traits::StorageType storageValue; + if (value.HasValidValue()) + { + Traits::WorkingToStorage(value.Value(), storageValue); + } + else + { + return EMBER_ZCL_STATUS_FAILURE; + } + cache.set(endpoint, storageValue); + return EMBER_ZCL_STATUS_SUCCESS; +} + +} // namespace ACCoilTemperature + +namespace ACCapacityformat { EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, uint8_t & value) { @@ -13699,7 +11436,7 @@ EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const uint8 return EMBER_ZCL_STATUS_SUCCESS; } -} // namespace WindSetting +} // namespace ACCapacityformat namespace FeatureMap { @@ -13758,18 +11495,18 @@ EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const uint1 } // namespace ClusterRevision } // namespace Attributes -} // namespace FanControl +} // namespace Thermostat -namespace ThermostatUserInterfaceConfiguration { +namespace FanControl { namespace Attributes { -namespace TemperatureDisplayMode { +namespace FanMode { -EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, uint8_t & value) +EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, chip::app::Clusters::FanControl::FanModeType & value) { attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType temp_storage; cache.get(endpoint, temp_storage); @@ -13779,25 +11516,25 @@ EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, uint8_t & v return EMBER_ZCL_STATUS_SUCCESS; } -EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const uint8_t & value) +EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const chip::app::Clusters::FanControl::FanModeType & value) { attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); cache.set(endpoint, storageValue); return EMBER_ZCL_STATUS_SUCCESS; } -} // namespace TemperatureDisplayMode +} // namespace FanMode -namespace KeypadLockout { +namespace FanModeSequence { -EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, uint8_t & value) +EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, chip::app::Clusters::FanControl::FanModeSequenceType & value) { attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType temp_storage; cache.get(endpoint, temp_storage); @@ -13807,21 +11544,22 @@ EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, uint8_t & v return EMBER_ZCL_STATUS_SUCCESS; } -EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const uint8_t & value) +EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, + const chip::app::Clusters::FanControl::FanModeSequenceType & value) { attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); cache.set(endpoint, storageValue); return EMBER_ZCL_STATUS_SUCCESS; } -} // namespace KeypadLockout +} // namespace FanModeSequence -namespace ScheduleProgrammingVisibility { +namespace PercentSetting { -EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, uint8_t & value) +EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, chip::app::DataModel::Nullable & value) { attribute_state_cache & cache = attribute_state_cache::get_instance(); @@ -13831,29 +11569,36 @@ EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, uint8_t & v cache.get(endpoint, temp_storage); auto tmp = Traits::StorageToWorking(temp_storage); - value = tmp; + value.SetNonNull(tmp); return EMBER_ZCL_STATUS_SUCCESS; } -EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const uint8_t & value) +EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const chip::app::DataModel::Nullable & value) { attribute_state_cache & cache = attribute_state_cache::get_instance(); using Traits = NumericAttributeTraits; Traits::StorageType storageValue; - Traits::WorkingToStorage(value, storageValue); + if (value.HasValidValue()) + { + Traits::WorkingToStorage(value.Value(), storageValue); + } + else + { + return EMBER_ZCL_STATUS_FAILURE; + } cache.set(endpoint, storageValue); return EMBER_ZCL_STATUS_SUCCESS; } -} // namespace ScheduleProgrammingVisibility +} // namespace PercentSetting -namespace FeatureMap { +namespace PercentCurrent { -EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, uint32_t & value) +EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, uint8_t & value) { attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType temp_storage; cache.get(endpoint, temp_storage); @@ -13863,25 +11608,25 @@ EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, uint32_t & return EMBER_ZCL_STATUS_SUCCESS; } -EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const uint32_t & value) +EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const uint8_t & value) { attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); cache.set(endpoint, storageValue); return EMBER_ZCL_STATUS_SUCCESS; } -} // namespace FeatureMap +} // namespace PercentCurrent -namespace ClusterRevision { +namespace SpeedMax { -EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, uint16_t & value) +EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, uint8_t & value) { attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType temp_storage; cache.get(endpoint, temp_storage); @@ -13891,27 +11636,21 @@ EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, uint16_t & return EMBER_ZCL_STATUS_SUCCESS; } -EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const uint16_t & value) +EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const uint8_t & value) { attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); cache.set(endpoint, storageValue); return EMBER_ZCL_STATUS_SUCCESS; } -} // namespace ClusterRevision - -} // namespace Attributes -} // namespace ThermostatUserInterfaceConfiguration - -namespace ColorControl { -namespace Attributes { +} // namespace SpeedMax -namespace CurrentHue { +namespace SpeedSetting { -EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, uint8_t & value) +EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, chip::app::DataModel::Nullable & value) { attribute_state_cache & cache = attribute_state_cache::get_instance(); @@ -13921,23 +11660,30 @@ EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, uint8_t & v cache.get(endpoint, temp_storage); auto tmp = Traits::StorageToWorking(temp_storage); - value = tmp; + value.SetNonNull(tmp); return EMBER_ZCL_STATUS_SUCCESS; } -EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const uint8_t & value) +EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const chip::app::DataModel::Nullable & value) { attribute_state_cache & cache = attribute_state_cache::get_instance(); using Traits = NumericAttributeTraits; Traits::StorageType storageValue; - Traits::WorkingToStorage(value, storageValue); + if (value.HasValidValue()) + { + Traits::WorkingToStorage(value.Value(), storageValue); + } + else + { + return EMBER_ZCL_STATUS_FAILURE; + } cache.set(endpoint, storageValue); return EMBER_ZCL_STATUS_SUCCESS; } -} // namespace CurrentHue +} // namespace SpeedSetting -namespace CurrentSaturation { +namespace SpeedCurrent { EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, uint8_t & value) { @@ -13963,15 +11709,15 @@ EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const uint8 return EMBER_ZCL_STATUS_SUCCESS; } -} // namespace CurrentSaturation +} // namespace SpeedCurrent -namespace RemainingTime { +namespace RockSupport { -EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, uint16_t & value) +EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, uint8_t & value) { attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType temp_storage; cache.get(endpoint, temp_storage); @@ -13981,25 +11727,25 @@ EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, uint16_t & return EMBER_ZCL_STATUS_SUCCESS; } -EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const uint16_t & value) +EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const uint8_t & value) { attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); cache.set(endpoint, storageValue); return EMBER_ZCL_STATUS_SUCCESS; } -} // namespace RemainingTime +} // namespace RockSupport -namespace CurrentX { +namespace RockSetting { -EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, uint16_t & value) +EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, uint8_t & value) { attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType temp_storage; cache.get(endpoint, temp_storage); @@ -14009,25 +11755,25 @@ EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, uint16_t & return EMBER_ZCL_STATUS_SUCCESS; } -EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const uint16_t & value) +EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const uint8_t & value) { attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); cache.set(endpoint, storageValue); return EMBER_ZCL_STATUS_SUCCESS; } -} // namespace CurrentX +} // namespace RockSetting -namespace CurrentY { +namespace WindSupport { -EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, uint16_t & value) +EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, uint8_t & value) { attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType temp_storage; cache.get(endpoint, temp_storage); @@ -14037,19 +11783,19 @@ EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, uint16_t & return EMBER_ZCL_STATUS_SUCCESS; } -EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const uint16_t & value) +EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const uint8_t & value) { attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); cache.set(endpoint, storageValue); return EMBER_ZCL_STATUS_SUCCESS; } -} // namespace CurrentY +} // namespace WindSupport -namespace DriftCompensation { +namespace WindSetting { EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, uint8_t & value) { @@ -14075,15 +11821,15 @@ EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const uint8 return EMBER_ZCL_STATUS_SUCCESS; } -} // namespace DriftCompensation +} // namespace WindSetting -namespace CompensationText { +namespace FeatureMap { -EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, chip::CharSpan & value) +EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, uint32_t & value) { attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType temp_storage; cache.get(endpoint, temp_storage); @@ -14093,16 +11839,19 @@ EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, chip::CharS return EMBER_ZCL_STATUS_SUCCESS; } -EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const chip::CharSpan & value) +EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const uint32_t & value) { attribute_state_cache & cache = attribute_state_cache::get_instance(); - cache.set(endpoint, value); + using Traits = NumericAttributeTraits; + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + cache.set(endpoint, storageValue); return EMBER_ZCL_STATUS_SUCCESS; } -} // namespace CompensationText +} // namespace FeatureMap -namespace ColorTemperatureMireds { +namespace ClusterRevision { EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, uint16_t & value) { @@ -14128,9 +11877,15 @@ EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const uint1 return EMBER_ZCL_STATUS_SUCCESS; } -} // namespace ColorTemperatureMireds +} // namespace ClusterRevision -namespace ColorMode { +} // namespace Attributes +} // namespace FanControl + +namespace ThermostatUserInterfaceConfiguration { +namespace Attributes { + +namespace TemperatureDisplayMode { EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, uint8_t & value) { @@ -14156,9 +11911,9 @@ EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const uint8 return EMBER_ZCL_STATUS_SUCCESS; } -} // namespace ColorMode +} // namespace TemperatureDisplayMode -namespace Options { +namespace KeypadLockout { EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, uint8_t & value) { @@ -14184,11 +11939,11 @@ EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const uint8 return EMBER_ZCL_STATUS_SUCCESS; } -} // namespace Options +} // namespace KeypadLockout -namespace NumberOfPrimaries { +namespace ScheduleProgrammingVisibility { -EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, chip::app::DataModel::Nullable & value) +EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, uint8_t & value) { attribute_state_cache & cache = attribute_state_cache::get_instance(); @@ -14198,36 +11953,29 @@ EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, chip::app:: cache.get(endpoint, temp_storage); auto tmp = Traits::StorageToWorking(temp_storage); - value.SetNonNull(tmp); + value = tmp; return EMBER_ZCL_STATUS_SUCCESS; } -EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const chip::app::DataModel::Nullable & value) +EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const uint8_t & value) { attribute_state_cache & cache = attribute_state_cache::get_instance(); using Traits = NumericAttributeTraits; Traits::StorageType storageValue; - if (value.HasValidValue()) - { - Traits::WorkingToStorage(value.Value(), storageValue); - } - else - { - return EMBER_ZCL_STATUS_FAILURE; - } + Traits::WorkingToStorage(value, storageValue); cache.set(endpoint, storageValue); return EMBER_ZCL_STATUS_SUCCESS; } -} // namespace NumberOfPrimaries +} // namespace ScheduleProgrammingVisibility -namespace Primary1X { +namespace FeatureMap { -EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, uint16_t & value) +EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, uint32_t & value) { attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType temp_storage; cache.get(endpoint, temp_storage); @@ -14237,19 +11985,19 @@ EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, uint16_t & return EMBER_ZCL_STATUS_SUCCESS; } -EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const uint16_t & value) +EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const uint32_t & value) { attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); cache.set(endpoint, storageValue); return EMBER_ZCL_STATUS_SUCCESS; } -} // namespace Primary1X +} // namespace FeatureMap -namespace Primary1Y { +namespace ClusterRevision { EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, uint16_t & value) { @@ -14275,11 +12023,17 @@ EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const uint1 return EMBER_ZCL_STATUS_SUCCESS; } -} // namespace Primary1Y +} // namespace ClusterRevision -namespace Primary1Intensity { +} // namespace Attributes +} // namespace ThermostatUserInterfaceConfiguration -EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, chip::app::DataModel::Nullable & value) +namespace ColorControl { +namespace Attributes { + +namespace CurrentHue { + +EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, uint8_t & value) { attribute_state_cache & cache = attribute_state_cache::get_instance(); @@ -14289,36 +12043,29 @@ EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, chip::app:: cache.get(endpoint, temp_storage); auto tmp = Traits::StorageToWorking(temp_storage); - value.SetNonNull(tmp); + value = tmp; return EMBER_ZCL_STATUS_SUCCESS; } -EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const chip::app::DataModel::Nullable & value) +EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const uint8_t & value) { attribute_state_cache & cache = attribute_state_cache::get_instance(); using Traits = NumericAttributeTraits; Traits::StorageType storageValue; - if (value.HasValidValue()) - { - Traits::WorkingToStorage(value.Value(), storageValue); - } - else - { - return EMBER_ZCL_STATUS_FAILURE; - } + Traits::WorkingToStorage(value, storageValue); cache.set(endpoint, storageValue); return EMBER_ZCL_STATUS_SUCCESS; } -} // namespace Primary1Intensity +} // namespace CurrentHue -namespace Primary2X { +namespace CurrentSaturation { -EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, uint16_t & value) +EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, uint8_t & value) { attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType temp_storage; cache.get(endpoint, temp_storage); @@ -14328,19 +12075,19 @@ EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, uint16_t & return EMBER_ZCL_STATUS_SUCCESS; } -EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const uint16_t & value) +EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const uint8_t & value) { attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); cache.set(endpoint, storageValue); return EMBER_ZCL_STATUS_SUCCESS; } -} // namespace Primary2X +} // namespace CurrentSaturation -namespace Primary2Y { +namespace RemainingTime { EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, uint16_t & value) { @@ -14366,44 +12113,9 @@ EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const uint1 return EMBER_ZCL_STATUS_SUCCESS; } -} // namespace Primary2Y - -namespace Primary2Intensity { - -EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, chip::app::DataModel::Nullable & value) -{ - attribute_state_cache & cache = attribute_state_cache::get_instance(); - - using Traits = NumericAttributeTraits; - Traits::StorageType temp_storage; - - cache.get(endpoint, temp_storage); - auto tmp = Traits::StorageToWorking(temp_storage); - - value.SetNonNull(tmp); - return EMBER_ZCL_STATUS_SUCCESS; -} - -EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const chip::app::DataModel::Nullable & value) -{ - attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits; - Traits::StorageType storageValue; - if (value.HasValidValue()) - { - Traits::WorkingToStorage(value.Value(), storageValue); - } - else - { - return EMBER_ZCL_STATUS_FAILURE; - } - cache.set(endpoint, storageValue); - return EMBER_ZCL_STATUS_SUCCESS; -} - -} // namespace Primary2Intensity +} // namespace RemainingTime -namespace Primary3X { +namespace CurrentX { EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, uint16_t & value) { @@ -14429,9 +12141,9 @@ EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const uint1 return EMBER_ZCL_STATUS_SUCCESS; } -} // namespace Primary3X +} // namespace CurrentX -namespace Primary3Y { +namespace CurrentY { EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, uint16_t & value) { @@ -14457,11 +12169,11 @@ EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const uint1 return EMBER_ZCL_STATUS_SUCCESS; } -} // namespace Primary3Y +} // namespace CurrentY -namespace Primary3Intensity { +namespace DriftCompensation { -EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, chip::app::DataModel::Nullable & value) +EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, uint8_t & value) { attribute_state_cache & cache = attribute_state_cache::get_instance(); @@ -14471,36 +12183,29 @@ EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, chip::app:: cache.get(endpoint, temp_storage); auto tmp = Traits::StorageToWorking(temp_storage); - value.SetNonNull(tmp); + value = tmp; return EMBER_ZCL_STATUS_SUCCESS; } -EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const chip::app::DataModel::Nullable & value) +EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const uint8_t & value) { attribute_state_cache & cache = attribute_state_cache::get_instance(); using Traits = NumericAttributeTraits; Traits::StorageType storageValue; - if (value.HasValidValue()) - { - Traits::WorkingToStorage(value.Value(), storageValue); - } - else - { - return EMBER_ZCL_STATUS_FAILURE; - } + Traits::WorkingToStorage(value, storageValue); cache.set(endpoint, storageValue); return EMBER_ZCL_STATUS_SUCCESS; } -} // namespace Primary3Intensity +} // namespace DriftCompensation -namespace Primary4X { +namespace CompensationText { -EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, uint16_t & value) +EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, chip::CharSpan & value) { attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType temp_storage; cache.get(endpoint, temp_storage); @@ -14510,19 +12215,16 @@ EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, uint16_t & return EMBER_ZCL_STATUS_SUCCESS; } -EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const uint16_t & value) +EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const chip::CharSpan & value) { attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits; - Traits::StorageType storageValue; - Traits::WorkingToStorage(value, storageValue); - cache.set(endpoint, storageValue); + cache.set(endpoint, value); return EMBER_ZCL_STATUS_SUCCESS; } -} // namespace Primary4X +} // namespace CompensationText -namespace Primary4Y { +namespace ColorTemperatureMireds { EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, uint16_t & value) { @@ -14548,11 +12250,11 @@ EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const uint1 return EMBER_ZCL_STATUS_SUCCESS; } -} // namespace Primary4Y +} // namespace ColorTemperatureMireds -namespace Primary4Intensity { +namespace ColorMode { -EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, chip::app::DataModel::Nullable & value) +EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, uint8_t & value) { attribute_state_cache & cache = attribute_state_cache::get_instance(); @@ -14562,64 +12264,29 @@ EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, chip::app:: cache.get(endpoint, temp_storage); auto tmp = Traits::StorageToWorking(temp_storage); - value.SetNonNull(tmp); - return EMBER_ZCL_STATUS_SUCCESS; -} - -EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const chip::app::DataModel::Nullable & value) -{ - attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits; - Traits::StorageType storageValue; - if (value.HasValidValue()) - { - Traits::WorkingToStorage(value.Value(), storageValue); - } - else - { - return EMBER_ZCL_STATUS_FAILURE; - } - cache.set(endpoint, storageValue); - return EMBER_ZCL_STATUS_SUCCESS; -} - -} // namespace Primary4Intensity - -namespace Primary5X { - -EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, uint16_t & value) -{ - attribute_state_cache & cache = attribute_state_cache::get_instance(); - - using Traits = NumericAttributeTraits; - Traits::StorageType temp_storage; - - cache.get(endpoint, temp_storage); - auto tmp = Traits::StorageToWorking(temp_storage); - value = tmp; return EMBER_ZCL_STATUS_SUCCESS; } -EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const uint16_t & value) +EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const uint8_t & value) { attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); cache.set(endpoint, storageValue); return EMBER_ZCL_STATUS_SUCCESS; } -} // namespace Primary5X +} // namespace ColorMode -namespace Primary5Y { +namespace Options { -EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, uint16_t & value) +EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, uint8_t & value) { attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType temp_storage; cache.get(endpoint, temp_storage); @@ -14629,19 +12296,19 @@ EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, uint16_t & return EMBER_ZCL_STATUS_SUCCESS; } -EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const uint16_t & value) +EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const uint8_t & value) { attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); cache.set(endpoint, storageValue); return EMBER_ZCL_STATUS_SUCCESS; } -} // namespace Primary5Y +} // namespace Options -namespace Primary5Intensity { +namespace NumberOfPrimaries { EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, chip::app::DataModel::Nullable & value) { @@ -14674,9 +12341,9 @@ EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const chip: return EMBER_ZCL_STATUS_SUCCESS; } -} // namespace Primary5Intensity +} // namespace NumberOfPrimaries -namespace Primary6X { +namespace Primary1X { EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, uint16_t & value) { @@ -14702,9 +12369,9 @@ EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const uint1 return EMBER_ZCL_STATUS_SUCCESS; } -} // namespace Primary6X +} // namespace Primary1X -namespace Primary6Y { +namespace Primary1Y { EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, uint16_t & value) { @@ -14730,9 +12397,9 @@ EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const uint1 return EMBER_ZCL_STATUS_SUCCESS; } -} // namespace Primary6Y +} // namespace Primary1Y -namespace Primary6Intensity { +namespace Primary1Intensity { EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, chip::app::DataModel::Nullable & value) { @@ -14765,9 +12432,9 @@ EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const chip: return EMBER_ZCL_STATUS_SUCCESS; } -} // namespace Primary6Intensity +} // namespace Primary1Intensity -namespace WhitePointX { +namespace Primary2X { EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, uint16_t & value) { @@ -14793,9 +12460,9 @@ EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const uint1 return EMBER_ZCL_STATUS_SUCCESS; } -} // namespace WhitePointX +} // namespace Primary2X -namespace WhitePointY { +namespace Primary2Y { EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, uint16_t & value) { @@ -14821,9 +12488,44 @@ EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const uint1 return EMBER_ZCL_STATUS_SUCCESS; } -} // namespace WhitePointY +} // namespace Primary2Y -namespace ColorPointRX { +namespace Primary2Intensity { + +EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, chip::app::DataModel::Nullable & value) +{ + attribute_state_cache & cache = attribute_state_cache::get_instance(); + + using Traits = NumericAttributeTraits; + Traits::StorageType temp_storage; + + cache.get(endpoint, temp_storage); + auto tmp = Traits::StorageToWorking(temp_storage); + + value.SetNonNull(tmp); + return EMBER_ZCL_STATUS_SUCCESS; +} + +EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const chip::app::DataModel::Nullable & value) +{ + attribute_state_cache & cache = attribute_state_cache::get_instance(); + using Traits = NumericAttributeTraits; + Traits::StorageType storageValue; + if (value.HasValidValue()) + { + Traits::WorkingToStorage(value.Value(), storageValue); + } + else + { + return EMBER_ZCL_STATUS_FAILURE; + } + cache.set(endpoint, storageValue); + return EMBER_ZCL_STATUS_SUCCESS; +} + +} // namespace Primary2Intensity + +namespace Primary3X { EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, uint16_t & value) { @@ -14849,9 +12551,9 @@ EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const uint1 return EMBER_ZCL_STATUS_SUCCESS; } -} // namespace ColorPointRX +} // namespace Primary3X -namespace ColorPointRY { +namespace Primary3Y { EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, uint16_t & value) { @@ -14877,9 +12579,9 @@ EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const uint1 return EMBER_ZCL_STATUS_SUCCESS; } -} // namespace ColorPointRY +} // namespace Primary3Y -namespace ColorPointRIntensity { +namespace Primary3Intensity { EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, chip::app::DataModel::Nullable & value) { @@ -14912,9 +12614,9 @@ EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const chip: return EMBER_ZCL_STATUS_SUCCESS; } -} // namespace ColorPointRIntensity +} // namespace Primary3Intensity -namespace ColorPointGX { +namespace Primary4X { EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, uint16_t & value) { @@ -14940,9 +12642,9 @@ EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const uint1 return EMBER_ZCL_STATUS_SUCCESS; } -} // namespace ColorPointGX +} // namespace Primary4X -namespace ColorPointGY { +namespace Primary4Y { EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, uint16_t & value) { @@ -14968,9 +12670,9 @@ EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const uint1 return EMBER_ZCL_STATUS_SUCCESS; } -} // namespace ColorPointGY +} // namespace Primary4Y -namespace ColorPointGIntensity { +namespace Primary4Intensity { EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, chip::app::DataModel::Nullable & value) { @@ -15003,9 +12705,9 @@ EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const chip: return EMBER_ZCL_STATUS_SUCCESS; } -} // namespace ColorPointGIntensity +} // namespace Primary4Intensity -namespace ColorPointBX { +namespace Primary5X { EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, uint16_t & value) { @@ -15031,9 +12733,9 @@ EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const uint1 return EMBER_ZCL_STATUS_SUCCESS; } -} // namespace ColorPointBX +} // namespace Primary5X -namespace ColorPointBY { +namespace Primary5Y { EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, uint16_t & value) { @@ -15059,9 +12761,9 @@ EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const uint1 return EMBER_ZCL_STATUS_SUCCESS; } -} // namespace ColorPointBY +} // namespace Primary5Y -namespace ColorPointBIntensity { +namespace Primary5Intensity { EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, chip::app::DataModel::Nullable & value) { @@ -15094,9 +12796,9 @@ EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const chip: return EMBER_ZCL_STATUS_SUCCESS; } -} // namespace ColorPointBIntensity +} // namespace Primary5Intensity -namespace EnhancedCurrentHue { +namespace Primary6X { EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, uint16_t & value) { @@ -15122,43 +12824,15 @@ EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const uint1 return EMBER_ZCL_STATUS_SUCCESS; } -} // namespace EnhancedCurrentHue - -namespace EnhancedColorMode { - -EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, uint8_t & value) -{ - attribute_state_cache & cache = attribute_state_cache::get_instance(); - - using Traits = NumericAttributeTraits; - Traits::StorageType temp_storage; - - cache.get(endpoint, temp_storage); - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; -} - -EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const uint8_t & value) -{ - attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits; - Traits::StorageType storageValue; - Traits::WorkingToStorage(value, storageValue); - cache.set(endpoint, storageValue); - return EMBER_ZCL_STATUS_SUCCESS; -} - -} // namespace EnhancedColorMode +} // namespace Primary6X -namespace ColorLoopActive { +namespace Primary6Y { -EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, uint8_t & value) +EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, uint16_t & value) { attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType temp_storage; cache.get(endpoint, temp_storage); @@ -15168,21 +12842,21 @@ EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, uint8_t & v return EMBER_ZCL_STATUS_SUCCESS; } -EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const uint8_t & value) +EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const uint16_t & value) { attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); cache.set(endpoint, storageValue); return EMBER_ZCL_STATUS_SUCCESS; } -} // namespace ColorLoopActive +} // namespace Primary6Y -namespace ColorLoopDirection { +namespace Primary6Intensity { -EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, uint8_t & value) +EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, chip::app::DataModel::Nullable & value) { attribute_state_cache & cache = attribute_state_cache::get_instance(); @@ -15192,23 +12866,30 @@ EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, uint8_t & v cache.get(endpoint, temp_storage); auto tmp = Traits::StorageToWorking(temp_storage); - value = tmp; + value.SetNonNull(tmp); return EMBER_ZCL_STATUS_SUCCESS; } -EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const uint8_t & value) +EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const chip::app::DataModel::Nullable & value) { attribute_state_cache & cache = attribute_state_cache::get_instance(); using Traits = NumericAttributeTraits; Traits::StorageType storageValue; - Traits::WorkingToStorage(value, storageValue); + if (value.HasValidValue()) + { + Traits::WorkingToStorage(value.Value(), storageValue); + } + else + { + return EMBER_ZCL_STATUS_FAILURE; + } cache.set(endpoint, storageValue); return EMBER_ZCL_STATUS_SUCCESS; } -} // namespace ColorLoopDirection +} // namespace Primary6Intensity -namespace ColorLoopTime { +namespace WhitePointX { EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, uint16_t & value) { @@ -15234,9 +12915,9 @@ EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const uint1 return EMBER_ZCL_STATUS_SUCCESS; } -} // namespace ColorLoopTime +} // namespace WhitePointX -namespace ColorLoopStartEnhancedHue { +namespace WhitePointY { EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, uint16_t & value) { @@ -15262,9 +12943,9 @@ EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const uint1 return EMBER_ZCL_STATUS_SUCCESS; } -} // namespace ColorLoopStartEnhancedHue +} // namespace WhitePointY -namespace ColorLoopStoredEnhancedHue { +namespace ColorPointRX { EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, uint16_t & value) { @@ -15290,9 +12971,9 @@ EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const uint1 return EMBER_ZCL_STATUS_SUCCESS; } -} // namespace ColorLoopStoredEnhancedHue +} // namespace ColorPointRX -namespace ColorCapabilities { +namespace ColorPointRY { EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, uint16_t & value) { @@ -15318,37 +12999,44 @@ EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const uint1 return EMBER_ZCL_STATUS_SUCCESS; } -} // namespace ColorCapabilities +} // namespace ColorPointRY -namespace ColorTempPhysicalMinMireds { +namespace ColorPointRIntensity { -EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, uint16_t & value) +EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, chip::app::DataModel::Nullable & value) { attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType temp_storage; cache.get(endpoint, temp_storage); auto tmp = Traits::StorageToWorking(temp_storage); - value = tmp; + value.SetNonNull(tmp); return EMBER_ZCL_STATUS_SUCCESS; } -EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const uint16_t & value) +EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const chip::app::DataModel::Nullable & value) { attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType storageValue; - Traits::WorkingToStorage(value, storageValue); + if (value.HasValidValue()) + { + Traits::WorkingToStorage(value.Value(), storageValue); + } + else + { + return EMBER_ZCL_STATUS_FAILURE; + } cache.set(endpoint, storageValue); return EMBER_ZCL_STATUS_SUCCESS; } -} // namespace ColorTempPhysicalMinMireds +} // namespace ColorPointRIntensity -namespace ColorTempPhysicalMaxMireds { +namespace ColorPointGX { EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, uint16_t & value) { @@ -15374,9 +13062,9 @@ EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const uint1 return EMBER_ZCL_STATUS_SUCCESS; } -} // namespace ColorTempPhysicalMaxMireds +} // namespace ColorPointGX -namespace CoupleColorTempToLevelMinMireds { +namespace ColorPointGY { EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, uint16_t & value) { @@ -15402,15 +13090,15 @@ EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const uint1 return EMBER_ZCL_STATUS_SUCCESS; } -} // namespace CoupleColorTempToLevelMinMireds +} // namespace ColorPointGY -namespace StartUpColorTemperatureMireds { +namespace ColorPointGIntensity { -EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, chip::app::DataModel::Nullable & value) +EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, chip::app::DataModel::Nullable & value) { attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType temp_storage; cache.get(endpoint, temp_storage); @@ -15420,54 +13108,26 @@ EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, chip::app:: return EMBER_ZCL_STATUS_SUCCESS; } -EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const chip::app::DataModel::Nullable & value) -{ - attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits; - Traits::StorageType storageValue; - if (value.HasValidValue()) - { - Traits::WorkingToStorage(value.Value(), storageValue); - } - else - { - return EMBER_ZCL_STATUS_FAILURE; - } - cache.set(endpoint, storageValue); - return EMBER_ZCL_STATUS_SUCCESS; -} - -} // namespace StartUpColorTemperatureMireds - -namespace FeatureMap { - -EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, uint32_t & value) -{ - attribute_state_cache & cache = attribute_state_cache::get_instance(); - - using Traits = NumericAttributeTraits; - Traits::StorageType temp_storage; - - cache.get(endpoint, temp_storage); - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; -} - -EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const uint32_t & value) +EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const chip::app::DataModel::Nullable & value) { attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType storageValue; - Traits::WorkingToStorage(value, storageValue); + if (value.HasValidValue()) + { + Traits::WorkingToStorage(value.Value(), storageValue); + } + else + { + return EMBER_ZCL_STATUS_FAILURE; + } cache.set(endpoint, storageValue); return EMBER_ZCL_STATUS_SUCCESS; } -} // namespace FeatureMap +} // namespace ColorPointGIntensity -namespace ClusterRevision { +namespace ColorPointBX { EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, uint16_t & value) { @@ -15493,21 +13153,15 @@ EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const uint1 return EMBER_ZCL_STATUS_SUCCESS; } -} // namespace ClusterRevision - -} // namespace Attributes -} // namespace ColorControl - -namespace BallastConfiguration { -namespace Attributes { +} // namespace ColorPointBX -namespace PhysicalMinLevel { +namespace ColorPointBY { -EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, uint8_t & value) +EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, uint16_t & value) { attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType temp_storage; cache.get(endpoint, temp_storage); @@ -15517,21 +13171,21 @@ EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, uint8_t & v return EMBER_ZCL_STATUS_SUCCESS; } -EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const uint8_t & value) +EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const uint16_t & value) { attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); cache.set(endpoint, storageValue); return EMBER_ZCL_STATUS_SUCCESS; } -} // namespace PhysicalMinLevel +} // namespace ColorPointBY -namespace PhysicalMaxLevel { +namespace ColorPointBIntensity { -EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, uint8_t & value) +EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, chip::app::DataModel::Nullable & value) { attribute_state_cache & cache = attribute_state_cache::get_instance(); @@ -15541,29 +13195,36 @@ EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, uint8_t & v cache.get(endpoint, temp_storage); auto tmp = Traits::StorageToWorking(temp_storage); - value = tmp; + value.SetNonNull(tmp); return EMBER_ZCL_STATUS_SUCCESS; } -EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const uint8_t & value) +EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const chip::app::DataModel::Nullable & value) { attribute_state_cache & cache = attribute_state_cache::get_instance(); using Traits = NumericAttributeTraits; Traits::StorageType storageValue; - Traits::WorkingToStorage(value, storageValue); + if (value.HasValidValue()) + { + Traits::WorkingToStorage(value.Value(), storageValue); + } + else + { + return EMBER_ZCL_STATUS_FAILURE; + } cache.set(endpoint, storageValue); return EMBER_ZCL_STATUS_SUCCESS; } -} // namespace PhysicalMaxLevel +} // namespace ColorPointBIntensity -namespace BallastStatus { +namespace EnhancedCurrentHue { -EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, uint8_t & value) +EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, uint16_t & value) { attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType temp_storage; cache.get(endpoint, temp_storage); @@ -15573,19 +13234,19 @@ EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, uint8_t & v return EMBER_ZCL_STATUS_SUCCESS; } -EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const uint8_t & value) +EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const uint16_t & value) { attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); cache.set(endpoint, storageValue); return EMBER_ZCL_STATUS_SUCCESS; } -} // namespace BallastStatus +} // namespace EnhancedCurrentHue -namespace MinLevel { +namespace EnhancedColorMode { EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, uint8_t & value) { @@ -15611,9 +13272,9 @@ EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const uint8 return EMBER_ZCL_STATUS_SUCCESS; } -} // namespace MinLevel +} // namespace EnhancedColorMode -namespace MaxLevel { +namespace ColorLoopActive { EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, uint8_t & value) { @@ -15639,11 +13300,11 @@ EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const uint8 return EMBER_ZCL_STATUS_SUCCESS; } -} // namespace MaxLevel +} // namespace ColorLoopActive -namespace IntrinsicBalanceFactor { +namespace ColorLoopDirection { -EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, chip::app::DataModel::Nullable & value) +EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, uint8_t & value) { attribute_state_cache & cache = attribute_state_cache::get_instance(); @@ -15653,71 +13314,57 @@ EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, chip::app:: cache.get(endpoint, temp_storage); auto tmp = Traits::StorageToWorking(temp_storage); - value.SetNonNull(tmp); + value = tmp; return EMBER_ZCL_STATUS_SUCCESS; } -EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const chip::app::DataModel::Nullable & value) +EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const uint8_t & value) { attribute_state_cache & cache = attribute_state_cache::get_instance(); using Traits = NumericAttributeTraits; Traits::StorageType storageValue; - if (value.HasValidValue()) - { - Traits::WorkingToStorage(value.Value(), storageValue); - } - else - { - return EMBER_ZCL_STATUS_FAILURE; - } + Traits::WorkingToStorage(value, storageValue); cache.set(endpoint, storageValue); return EMBER_ZCL_STATUS_SUCCESS; } -} // namespace IntrinsicBalanceFactor +} // namespace ColorLoopDirection -namespace BallastFactorAdjustment { +namespace ColorLoopTime { -EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, chip::app::DataModel::Nullable & value) +EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, uint16_t & value) { attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType temp_storage; cache.get(endpoint, temp_storage); auto tmp = Traits::StorageToWorking(temp_storage); - value.SetNonNull(tmp); + value = tmp; return EMBER_ZCL_STATUS_SUCCESS; } -EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const chip::app::DataModel::Nullable & value) +EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const uint16_t & value) { attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType storageValue; - if (value.HasValidValue()) - { - Traits::WorkingToStorage(value.Value(), storageValue); - } - else - { - return EMBER_ZCL_STATUS_FAILURE; - } + Traits::WorkingToStorage(value, storageValue); cache.set(endpoint, storageValue); return EMBER_ZCL_STATUS_SUCCESS; } -} // namespace BallastFactorAdjustment +} // namespace ColorLoopTime -namespace LampQuantity { +namespace ColorLoopStartEnhancedHue { -EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, uint8_t & value) +EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, uint16_t & value) { attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType temp_storage; cache.get(endpoint, temp_storage); @@ -15727,25 +13374,25 @@ EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, uint8_t & v return EMBER_ZCL_STATUS_SUCCESS; } -EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const uint8_t & value) +EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const uint16_t & value) { attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); cache.set(endpoint, storageValue); return EMBER_ZCL_STATUS_SUCCESS; } -} // namespace LampQuantity +} // namespace ColorLoopStartEnhancedHue -namespace LampType { +namespace ColorLoopStoredEnhancedHue { -EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, chip::CharSpan & value) +EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, uint16_t & value) { attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType temp_storage; cache.get(endpoint, temp_storage); @@ -15755,22 +13402,25 @@ EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, chip::CharS return EMBER_ZCL_STATUS_SUCCESS; } -EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const chip::CharSpan & value) +EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const uint16_t & value) { attribute_state_cache & cache = attribute_state_cache::get_instance(); - cache.set(endpoint, value); + using Traits = NumericAttributeTraits; + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + cache.set(endpoint, storageValue); return EMBER_ZCL_STATUS_SUCCESS; } -} // namespace LampType +} // namespace ColorLoopStoredEnhancedHue -namespace LampManufacturer { +namespace ColorCapabilities { -EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, chip::CharSpan & value) +EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, uint16_t & value) { attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType temp_storage; cache.get(endpoint, temp_storage); @@ -15780,92 +13430,81 @@ EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, chip::CharS return EMBER_ZCL_STATUS_SUCCESS; } -EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const chip::CharSpan & value) +EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const uint16_t & value) { attribute_state_cache & cache = attribute_state_cache::get_instance(); - cache.set(endpoint, value); + using Traits = NumericAttributeTraits; + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + cache.set(endpoint, storageValue); return EMBER_ZCL_STATUS_SUCCESS; } -} // namespace LampManufacturer +} // namespace ColorCapabilities -namespace LampRatedHours { +namespace ColorTempPhysicalMinMireds { -EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, chip::app::DataModel::Nullable & value) +EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, uint16_t & value) { attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits>; + using Traits = NumericAttributeTraits; Traits::StorageType temp_storage; cache.get(endpoint, temp_storage); auto tmp = Traits::StorageToWorking(temp_storage); - value.SetNonNull(tmp); + value = tmp; return EMBER_ZCL_STATUS_SUCCESS; } -EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const chip::app::DataModel::Nullable & value) +EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const uint16_t & value) { attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits>; + using Traits = NumericAttributeTraits; Traits::StorageType storageValue; - if (value.HasValidValue()) - { - Traits::WorkingToStorage(value.Value(), storageValue); - } - else - { - return EMBER_ZCL_STATUS_FAILURE; - } + Traits::WorkingToStorage(value, storageValue); cache.set(endpoint, storageValue); return EMBER_ZCL_STATUS_SUCCESS; } -} // namespace LampRatedHours +} // namespace ColorTempPhysicalMinMireds -namespace LampBurnHours { +namespace ColorTempPhysicalMaxMireds { -EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, chip::app::DataModel::Nullable & value) +EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, uint16_t & value) { attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits>; + using Traits = NumericAttributeTraits; Traits::StorageType temp_storage; cache.get(endpoint, temp_storage); auto tmp = Traits::StorageToWorking(temp_storage); - value.SetNonNull(tmp); + value = tmp; return EMBER_ZCL_STATUS_SUCCESS; } -EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const chip::app::DataModel::Nullable & value) +EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const uint16_t & value) { attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits>; + using Traits = NumericAttributeTraits; Traits::StorageType storageValue; - if (value.HasValidValue()) - { - Traits::WorkingToStorage(value.Value(), storageValue); - } - else - { - return EMBER_ZCL_STATUS_FAILURE; - } + Traits::WorkingToStorage(value, storageValue); cache.set(endpoint, storageValue); return EMBER_ZCL_STATUS_SUCCESS; } -} // namespace LampBurnHours +} // namespace ColorTempPhysicalMaxMireds -namespace LampAlarmMode { +namespace CoupleColorTempToLevelMinMireds { -EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, uint8_t & value) +EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, uint16_t & value) { attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType temp_storage; cache.get(endpoint, temp_storage); @@ -15875,25 +13514,25 @@ EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, uint8_t & v return EMBER_ZCL_STATUS_SUCCESS; } -EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const uint8_t & value) +EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const uint16_t & value) { attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); cache.set(endpoint, storageValue); return EMBER_ZCL_STATUS_SUCCESS; } -} // namespace LampAlarmMode +} // namespace CoupleColorTempToLevelMinMireds -namespace LampBurnHoursTripPoint { +namespace StartUpColorTemperatureMireds { -EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, chip::app::DataModel::Nullable & value) +EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, chip::app::DataModel::Nullable & value) { attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits>; + using Traits = NumericAttributeTraits; Traits::StorageType temp_storage; cache.get(endpoint, temp_storage); @@ -15903,10 +13542,10 @@ EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, chip::app:: return EMBER_ZCL_STATUS_SUCCESS; } -EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const chip::app::DataModel::Nullable & value) +EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const chip::app::DataModel::Nullable & value) { attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits>; + using Traits = NumericAttributeTraits; Traits::StorageType storageValue; if (value.HasValidValue()) { @@ -15920,7 +13559,7 @@ EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const chip: return EMBER_ZCL_STATUS_SUCCESS; } -} // namespace LampBurnHoursTripPoint +} // namespace StartUpColorTemperatureMireds namespace FeatureMap { @@ -15979,7 +13618,7 @@ EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const uint1 } // namespace ClusterRevision } // namespace Attributes -} // namespace BallastConfiguration +} // namespace ColorControl namespace IlluminanceMeasurement { namespace Attributes { @@ -22435,67 +20074,5 @@ EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const uint1 } // namespace Attributes } // namespace ElectricalMeasurement -namespace FaultInjection { -namespace Attributes { - -namespace FeatureMap { - -EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, uint32_t & value) -{ - attribute_state_cache & cache = attribute_state_cache::get_instance(); - - using Traits = NumericAttributeTraits; - Traits::StorageType temp_storage; - - cache.get(endpoint, temp_storage); - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; -} - -EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const uint32_t & value) -{ - attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits; - Traits::StorageType storageValue; - Traits::WorkingToStorage(value, storageValue); - cache.set(endpoint, storageValue); - return EMBER_ZCL_STATUS_SUCCESS; -} - -} // namespace FeatureMap - -namespace ClusterRevision { - -EmberAfStatus Get(const chip::app::ConcreteAttributePath & endpoint, uint16_t & value) -{ - attribute_state_cache & cache = attribute_state_cache::get_instance(); - - using Traits = NumericAttributeTraits; - Traits::StorageType temp_storage; - - cache.get(endpoint, temp_storage); - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; -} - -EmberAfStatus Set(const chip::app::ConcreteAttributePath & endpoint, const uint16_t & value) -{ - attribute_state_cache & cache = attribute_state_cache::get_instance(); - using Traits = NumericAttributeTraits; - Traits::StorageType storageValue; - Traits::WorkingToStorage(value, storageValue); - cache.set(endpoint, storageValue); - return EMBER_ZCL_STATUS_SUCCESS; -} - -} // namespace ClusterRevision - -} // namespace Attributes -} // namespace FaultInjection - } // namespace matter_bridge } // namespace unify diff --git a/silabs_examples/unify-matter-bridge/linux/zap-handlers/gen/zcl_global_types.hpp b/silabs_examples/unify-matter-bridge/linux/zap-handlers/gen/zcl_global_types.hpp new file mode 100644 index 00000000000000..e53e2a90228f98 --- /dev/null +++ b/silabs_examples/unify-matter-bridge/linux/zap-handlers/gen/zcl_global_types.hpp @@ -0,0 +1,683 @@ +// This file is generated by ZCL Advanced Platform generator. Please don't edit manually. + +#ifndef __ZCL_GLOBAL_TYPES__ +#define __ZCL_GLOBAL_TYPES__ + +// ZCL enums +// Enum for ColorMode +typedef enum ZclEnumColorMode : uint8_t +{ + ZCL_COLOR_MODE_CURRENT_HUE_AND_CURRENT_SATURATION = 0, + ZCL_COLOR_MODE_CURRENT_X_AND_CURRENT_Y = 1, + ZCL_COLOR_MODE_COLOR_TEMPERATURE = 2, +} ZclEnumColorMode; +// Enum for EnhancedColorMode +typedef enum ZclEnumEnhancedColorMode : uint8_t +{ + ZCL_ENHANCED_COLOR_MODE_CURRENT_HUE_AND_CURRENT_SATURATION = 0, + ZCL_ENHANCED_COLOR_MODE_CURRENT_X_AND_CURRENT_Y = 1, + ZCL_ENHANCED_COLOR_MODE_COLOR_TEMPERATURE = 2, + ZCL_ENHANCED_COLOR_MODE_ENHANCED_CURRENT_HUE_AND_CURRENT_SATURATION = 3, +} ZclEnumEnhancedColorMode; +// Because Matter xml files sometimes has bitmaps defined as this handles creating bitmap defines for those. +// TODO: change matching on "LevelControlOptions" to match on if it is a BITMAPn type +#define ZCL_BITMAP_LEVEL_CONTROL_OPTIONS_EXECUTE_IF_OFF (1) +#define ZCL_BITMAP_LEVEL_CONTROL_OPTIONS_EXECUTE_IF_OFF_OFFSET (0) +#define ZCL_BITMAP_LEVEL_CONTROL_OPTIONS_COUPLE_COLOR_TEMP_TO_LEVEL (2) +#define ZCL_BITMAP_LEVEL_CONTROL_OPTIONS_COUPLE_COLOR_TEMP_TO_LEVEL_OFFSET (1) +// Enum for OccupancySensorType +typedef enum ZclEnumOccupancySensorType : uint8_t +{ + ZCL_OCCUPANCY_SENSOR_TYPE_PIR = 0, + ZCL_OCCUPANCY_SENSOR_TYPE_ULTRASONIC = 1, + ZCL_OCCUPANCY_SENSOR_TYPE_PIR_AND_ULTRASONIC = 2, + ZCL_OCCUPANCY_SENSOR_TYPE_PHYSICAL_CONTACT = 3, +} ZclEnumOccupancySensorType; + +// ZCL bitmaps +#define ZCL_BITMAP_ALARM_MASK_GENERAL_HW_FAULT (1) +#define ZCL_BITMAP_ALARM_MASK_GENERAL_HW_FAULT_OFFSET (0) +#define ZCL_BITMAP_ALARM_MASK_GENERAL_SW_FAULT (2) +#define ZCL_BITMAP_ALARM_MASK_GENERAL_SW_FAULT_OFFSET (1) +#define ZCL_BITMAP_APPLICATION_LAUNCHER_FEATURE_APPLICATION_PLATFORM (1) +#define ZCL_BITMAP_APPLICATION_LAUNCHER_FEATURE_APPLICATION_PLATFORM_OFFSET (0) +#define ZCL_BITMAP_AUDIO_OUTPUT_FEATURE_NAME_UPDATES (1) +#define ZCL_BITMAP_AUDIO_OUTPUT_FEATURE_NAME_UPDATES_OFFSET (0) +#define ZCL_BITMAP_BALLAST_STATUS_NON_OPERATIONAL (1) +#define ZCL_BITMAP_BALLAST_STATUS_NON_OPERATIONAL_OFFSET (0) +#define ZCL_BITMAP_BALLAST_STATUS_LAMP_NOT_IN_SOCKET (2) +#define ZCL_BITMAP_BALLAST_STATUS_LAMP_NOT_IN_SOCKET_OFFSET (1) +#define ZCL_BITMAP_BARRIER_CONTROL_CAPABILITIES_PARTIAL_BARRIER (1) +#define ZCL_BITMAP_BARRIER_CONTROL_CAPABILITIES_PARTIAL_BARRIER_OFFSET (0) +#define ZCL_BITMAP_BARRIER_CONTROL_SAFETY_STATUS_REMOTE_LOCKOUT (1) +#define ZCL_BITMAP_BARRIER_CONTROL_SAFETY_STATUS_REMOTE_LOCKOUT_OFFSET (0) +#define ZCL_BITMAP_BARRIER_CONTROL_SAFETY_STATUS_TEMPER_DETECTED (2) +#define ZCL_BITMAP_BARRIER_CONTROL_SAFETY_STATUS_TEMPER_DETECTED_OFFSET (1) +#define ZCL_BITMAP_BARRIER_CONTROL_SAFETY_STATUS_FAILED_COMMUNICATION (4) +#define ZCL_BITMAP_BARRIER_CONTROL_SAFETY_STATUS_FAILED_COMMUNICATION_OFFSET (2) +#define ZCL_BITMAP_BARRIER_CONTROL_SAFETY_STATUS_POSITION_FAILURE (8) +#define ZCL_BITMAP_BARRIER_CONTROL_SAFETY_STATUS_POSITION_FAILURE_OFFSET (3) +#define ZCL_BITMAP_BATTERY_ALARM_MASK_VOLTAGE_TOO_LOW (1) +#define ZCL_BITMAP_BATTERY_ALARM_MASK_VOLTAGE_TOO_LOW_OFFSET (0) +#define ZCL_BITMAP_BITMAP16_MASK_MAP_MASK_VAL1 (1) +#define ZCL_BITMAP_BITMAP16_MASK_MAP_MASK_VAL1_OFFSET (0) +#define ZCL_BITMAP_BITMAP16_MASK_MAP_MASK_VAL2 (2) +#define ZCL_BITMAP_BITMAP16_MASK_MAP_MASK_VAL2_OFFSET (1) +#define ZCL_BITMAP_BITMAP16_MASK_MAP_MASK_VAL3 (4) +#define ZCL_BITMAP_BITMAP16_MASK_MAP_MASK_VAL3_OFFSET (2) +#define ZCL_BITMAP_BITMAP16_MASK_MAP_MASK_VAL4 (16384) +#define ZCL_BITMAP_BITMAP16_MASK_MAP_MASK_VAL4_OFFSET (14) +#define ZCL_BITMAP_BITMAP32_MASK_MAP_MASK_VAL1 (1) +#define ZCL_BITMAP_BITMAP32_MASK_MAP_MASK_VAL1_OFFSET (0) +#define ZCL_BITMAP_BITMAP32_MASK_MAP_MASK_VAL2 (2) +#define ZCL_BITMAP_BITMAP32_MASK_MAP_MASK_VAL2_OFFSET (1) +#define ZCL_BITMAP_BITMAP32_MASK_MAP_MASK_VAL3 (4) +#define ZCL_BITMAP_BITMAP32_MASK_MAP_MASK_VAL3_OFFSET (2) +#define ZCL_BITMAP_BITMAP32_MASK_MAP_MASK_VAL4 (1073741824) +#define ZCL_BITMAP_BITMAP32_MASK_MAP_MASK_VAL4_OFFSET (30) +#define ZCL_BITMAP_BITMAP64_MASK_MAP_MASK_VAL1 (1) +#define ZCL_BITMAP_BITMAP64_MASK_MAP_MASK_VAL1_OFFSET (0) +#define ZCL_BITMAP_BITMAP64_MASK_MAP_MASK_VAL2 (2) +#define ZCL_BITMAP_BITMAP64_MASK_MAP_MASK_VAL2_OFFSET (1) +#define ZCL_BITMAP_BITMAP64_MASK_MAP_MASK_VAL3 (4) +#define ZCL_BITMAP_BITMAP64_MASK_MAP_MASK_VAL3_OFFSET (2) +#define ZCL_BITMAP_BITMAP64_MASK_MAP_MASK_VAL4 (4611686018427388000) +#define ZCL_BITMAP_BITMAP64_MASK_MAP_MASK_VAL4_OFFSET (62) +#define ZCL_BITMAP_BITMAP8_MASK_MAP_MASK_VAL1 (1) +#define ZCL_BITMAP_BITMAP8_MASK_MAP_MASK_VAL1_OFFSET (0) +#define ZCL_BITMAP_BITMAP8_MASK_MAP_MASK_VAL2 (2) +#define ZCL_BITMAP_BITMAP8_MASK_MAP_MASK_VAL2_OFFSET (1) +#define ZCL_BITMAP_BITMAP8_MASK_MAP_MASK_VAL3 (4) +#define ZCL_BITMAP_BITMAP8_MASK_MAP_MASK_VAL3_OFFSET (2) +#define ZCL_BITMAP_BITMAP8_MASK_MAP_MASK_VAL4 (64) +#define ZCL_BITMAP_BITMAP8_MASK_MAP_MASK_VAL4_OFFSET (6) +#define ZCL_BITMAP_CHANNEL_FEATURE_CHANNEL_LIST (1) +#define ZCL_BITMAP_CHANNEL_FEATURE_CHANNEL_LIST_OFFSET (0) +#define ZCL_BITMAP_CHANNEL_FEATURE_LINEUP_INFO (2) +#define ZCL_BITMAP_CHANNEL_FEATURE_LINEUP_INFO_OFFSET (1) +#define ZCL_BITMAP_COLOR_CAPABILITIES_HUE_SATURATION_SUPPORTED (1) +#define ZCL_BITMAP_COLOR_CAPABILITIES_HUE_SATURATION_SUPPORTED_OFFSET (0) +#define ZCL_BITMAP_COLOR_CAPABILITIES_ENHANCED_HUE_SUPPORTED (2) +#define ZCL_BITMAP_COLOR_CAPABILITIES_ENHANCED_HUE_SUPPORTED_OFFSET (1) +#define ZCL_BITMAP_COLOR_CAPABILITIES_COLOR_LOOP_SUPPORTED (4) +#define ZCL_BITMAP_COLOR_CAPABILITIES_COLOR_LOOP_SUPPORTED_OFFSET (2) +#define ZCL_BITMAP_COLOR_CAPABILITIES_XY_ATTRIBUTES_SUPPORTED (8) +#define ZCL_BITMAP_COLOR_CAPABILITIES_XY_ATTRIBUTES_SUPPORTED_OFFSET (3) +#define ZCL_BITMAP_COLOR_CAPABILITIES_COLOR_TEMPERATURE_SUPPORTED (16) +#define ZCL_BITMAP_COLOR_CAPABILITIES_COLOR_TEMPERATURE_SUPPORTED_OFFSET (4) +#define ZCL_BITMAP_COLOR_CONTROL_FEATURE_HUE_AND_SATURATION (1) +#define ZCL_BITMAP_COLOR_CONTROL_FEATURE_HUE_AND_SATURATION_OFFSET (0) +#define ZCL_BITMAP_COLOR_CONTROL_FEATURE_ENHANCED_HUE (2) +#define ZCL_BITMAP_COLOR_CONTROL_FEATURE_ENHANCED_HUE_OFFSET (1) +#define ZCL_BITMAP_COLOR_CONTROL_FEATURE_COLOR_LOOP (4) +#define ZCL_BITMAP_COLOR_CONTROL_FEATURE_COLOR_LOOP_OFFSET (2) +#define ZCL_BITMAP_COLOR_CONTROL_FEATURE_XY (8) +#define ZCL_BITMAP_COLOR_CONTROL_FEATURE_XY_OFFSET (3) +#define ZCL_BITMAP_COLOR_CONTROL_FEATURE_COLOR_TEMPERATURE (16) +#define ZCL_BITMAP_COLOR_CONTROL_FEATURE_COLOR_TEMPERATURE_OFFSET (4) +#define ZCL_BITMAP_COLOR_LOOP_UPDATE_FLAGS_UPDATE_ACTION (1) +#define ZCL_BITMAP_COLOR_LOOP_UPDATE_FLAGS_UPDATE_ACTION_OFFSET (0) +#define ZCL_BITMAP_COLOR_LOOP_UPDATE_FLAGS_UPDATE_DIRECTION (2) +#define ZCL_BITMAP_COLOR_LOOP_UPDATE_FLAGS_UPDATE_DIRECTION_OFFSET (1) +#define ZCL_BITMAP_COLOR_LOOP_UPDATE_FLAGS_UPDATE_TIME (4) +#define ZCL_BITMAP_COLOR_LOOP_UPDATE_FLAGS_UPDATE_TIME_OFFSET (2) +#define ZCL_BITMAP_COLOR_LOOP_UPDATE_FLAGS_UPDATE_START_HUE (8) +#define ZCL_BITMAP_COLOR_LOOP_UPDATE_FLAGS_UPDATE_START_HUE_OFFSET (3) +#define ZCL_BITMAP_COMMAND_BITS_INSTANT_ACTION (1) +#define ZCL_BITMAP_COMMAND_BITS_INSTANT_ACTION_OFFSET (0) +#define ZCL_BITMAP_COMMAND_BITS_INSTANT_ACTION_WITH_TRANSITION (2) +#define ZCL_BITMAP_COMMAND_BITS_INSTANT_ACTION_WITH_TRANSITION_OFFSET (1) +#define ZCL_BITMAP_COMMAND_BITS_START_ACTION (4) +#define ZCL_BITMAP_COMMAND_BITS_START_ACTION_OFFSET (2) +#define ZCL_BITMAP_COMMAND_BITS_START_ACTION_WITH_DURATION (8) +#define ZCL_BITMAP_COMMAND_BITS_START_ACTION_WITH_DURATION_OFFSET (3) +#define ZCL_BITMAP_COMMAND_BITS_STOP_ACTION (16) +#define ZCL_BITMAP_COMMAND_BITS_STOP_ACTION_OFFSET (4) +#define ZCL_BITMAP_COMMAND_BITS_PAUSE_ACTION (32) +#define ZCL_BITMAP_COMMAND_BITS_PAUSE_ACTION_OFFSET (5) +#define ZCL_BITMAP_COMMAND_BITS_PAUSE_ACTION_WITH_DURATION (64) +#define ZCL_BITMAP_COMMAND_BITS_PAUSE_ACTION_WITH_DURATION_OFFSET (6) +#define ZCL_BITMAP_COMMAND_BITS_RESUME_ACTION (128) +#define ZCL_BITMAP_COMMAND_BITS_RESUME_ACTION_OFFSET (7) +#define ZCL_BITMAP_COMMAND_BITS_ENABLE_ACTION (256) +#define ZCL_BITMAP_COMMAND_BITS_ENABLE_ACTION_OFFSET (8) +#define ZCL_BITMAP_COMMAND_BITS_ENABLE_ACTION_WITH_DURATION (512) +#define ZCL_BITMAP_COMMAND_BITS_ENABLE_ACTION_WITH_DURATION_OFFSET (9) +#define ZCL_BITMAP_COMMAND_BITS_DISABLE_ACTION (1024) +#define ZCL_BITMAP_COMMAND_BITS_DISABLE_ACTION_OFFSET (10) +#define ZCL_BITMAP_COMMAND_BITS_DISABLE_ACTION_WITH_DURATION (2048) +#define ZCL_BITMAP_COMMAND_BITS_DISABLE_ACTION_WITH_DURATION_OFFSET (11) +#define ZCL_BITMAP_CONFIG_STATUS_OPERATIONAL (1) +#define ZCL_BITMAP_CONFIG_STATUS_OPERATIONAL_OFFSET (0) +#define ZCL_BITMAP_CONFIG_STATUS_ONLINE_RESERVED (2) +#define ZCL_BITMAP_CONFIG_STATUS_ONLINE_RESERVED_OFFSET (1) +#define ZCL_BITMAP_CONFIG_STATUS_LIFT_MOVEMENT_REVERSED (4) +#define ZCL_BITMAP_CONFIG_STATUS_LIFT_MOVEMENT_REVERSED_OFFSET (2) +#define ZCL_BITMAP_CONFIG_STATUS_LIFT_POSITION_AWARE (8) +#define ZCL_BITMAP_CONFIG_STATUS_LIFT_POSITION_AWARE_OFFSET (3) +#define ZCL_BITMAP_CONFIG_STATUS_TILT_POSITION_AWARE (16) +#define ZCL_BITMAP_CONFIG_STATUS_TILT_POSITION_AWARE_OFFSET (4) +#define ZCL_BITMAP_CONFIG_STATUS_LIFT_ENCODER_CONTROLLED (32) +#define ZCL_BITMAP_CONFIG_STATUS_LIFT_ENCODER_CONTROLLED_OFFSET (5) +#define ZCL_BITMAP_CONFIG_STATUS_TILT_ENCODER_CONTROLLED (64) +#define ZCL_BITMAP_CONFIG_STATUS_TILT_ENCODER_CONTROLLED_OFFSET (6) +#define ZCL_BITMAP_CONTENT_LAUNCHER_FEATURE_CONTENT_SEARCH (1) +#define ZCL_BITMAP_CONTENT_LAUNCHER_FEATURE_CONTENT_SEARCH_OFFSET (0) +#define ZCL_BITMAP_CONTENT_LAUNCHER_FEATURE_URL_PLAYBACK (2) +#define ZCL_BITMAP_CONTENT_LAUNCHER_FEATURE_URL_PLAYBACK_OFFSET (1) +#define ZCL_BITMAP_DAY_OF_WEEK_SUNDAY (1) +#define ZCL_BITMAP_DAY_OF_WEEK_SUNDAY_OFFSET (0) +#define ZCL_BITMAP_DAY_OF_WEEK_MONDAY (2) +#define ZCL_BITMAP_DAY_OF_WEEK_MONDAY_OFFSET (1) +#define ZCL_BITMAP_DAY_OF_WEEK_TUESDAY (4) +#define ZCL_BITMAP_DAY_OF_WEEK_TUESDAY_OFFSET (2) +#define ZCL_BITMAP_DAY_OF_WEEK_WEDNESDAY (8) +#define ZCL_BITMAP_DAY_OF_WEEK_WEDNESDAY_OFFSET (3) +#define ZCL_BITMAP_DAY_OF_WEEK_THURSDAY (16) +#define ZCL_BITMAP_DAY_OF_WEEK_THURSDAY_OFFSET (4) +#define ZCL_BITMAP_DAY_OF_WEEK_FRIDAY (32) +#define ZCL_BITMAP_DAY_OF_WEEK_FRIDAY_OFFSET (5) +#define ZCL_BITMAP_DAY_OF_WEEK_SATURDAY (64) +#define ZCL_BITMAP_DAY_OF_WEEK_SATURDAY_OFFSET (6) +#define ZCL_BITMAP_DAY_OF_WEEK_AWAY_OR_VACATION (128) +#define ZCL_BITMAP_DAY_OF_WEEK_AWAY_OR_VACATION_OFFSET (7) +#define ZCL_BITMAP_DEVICE_TEMP_ALARM_MASK_TOO_LOW (1) +#define ZCL_BITMAP_DEVICE_TEMP_ALARM_MASK_TOO_LOW_OFFSET (0) +#define ZCL_BITMAP_DEVICE_TEMP_ALARM_MASK_TOO_HIGH (2) +#define ZCL_BITMAP_DEVICE_TEMP_ALARM_MASK_TOO_HIGH_OFFSET (1) +#define ZCL_BITMAP_DL_CREDENTIAL_RULE_MASK_SINGLE (1) +#define ZCL_BITMAP_DL_CREDENTIAL_RULE_MASK_SINGLE_OFFSET (0) +#define ZCL_BITMAP_DL_CREDENTIAL_RULE_MASK_DUAL (2) +#define ZCL_BITMAP_DL_CREDENTIAL_RULE_MASK_DUAL_OFFSET (1) +#define ZCL_BITMAP_DL_CREDENTIAL_RULE_MASK_TRI (4) +#define ZCL_BITMAP_DL_CREDENTIAL_RULE_MASK_TRI_OFFSET (2) +#define ZCL_BITMAP_DL_CREDENTIAL_RULES_SUPPORT_SINGLE (1) +#define ZCL_BITMAP_DL_CREDENTIAL_RULES_SUPPORT_SINGLE_OFFSET (0) +#define ZCL_BITMAP_DL_CREDENTIAL_RULES_SUPPORT_DUAL (2) +#define ZCL_BITMAP_DL_CREDENTIAL_RULES_SUPPORT_DUAL_OFFSET (1) +#define ZCL_BITMAP_DL_CREDENTIAL_RULES_SUPPORT_TRI (4) +#define ZCL_BITMAP_DL_CREDENTIAL_RULES_SUPPORT_TRI_OFFSET (2) +#define ZCL_BITMAP_DL_DAYS_MASK_MAP_SUNDAY (1) +#define ZCL_BITMAP_DL_DAYS_MASK_MAP_SUNDAY_OFFSET (0) +#define ZCL_BITMAP_DL_DAYS_MASK_MAP_MONDAY (2) +#define ZCL_BITMAP_DL_DAYS_MASK_MAP_MONDAY_OFFSET (1) +#define ZCL_BITMAP_DL_DAYS_MASK_MAP_TUESDAY (4) +#define ZCL_BITMAP_DL_DAYS_MASK_MAP_TUESDAY_OFFSET (2) +#define ZCL_BITMAP_DL_DAYS_MASK_MAP_WEDNESDAY (8) +#define ZCL_BITMAP_DL_DAYS_MASK_MAP_WEDNESDAY_OFFSET (3) +#define ZCL_BITMAP_DL_DAYS_MASK_MAP_THURSDAY (16) +#define ZCL_BITMAP_DL_DAYS_MASK_MAP_THURSDAY_OFFSET (4) +#define ZCL_BITMAP_DL_DAYS_MASK_MAP_FRIDAY (32) +#define ZCL_BITMAP_DL_DAYS_MASK_MAP_FRIDAY_OFFSET (5) +#define ZCL_BITMAP_DL_DAYS_MASK_MAP_SATURDAY (64) +#define ZCL_BITMAP_DL_DAYS_MASK_MAP_SATURDAY_OFFSET (6) +#define ZCL_BITMAP_DL_DEFAULT_CONFIGURATION_REGISTER_ENABLE_LOCAL_PROGRAMMING_ENABLED (1) +#define ZCL_BITMAP_DL_DEFAULT_CONFIGURATION_REGISTER_ENABLE_LOCAL_PROGRAMMING_ENABLED_OFFSET (0) +#define ZCL_BITMAP_DL_DEFAULT_CONFIGURATION_REGISTER_KEYPAD_INTERFACE_DEFAULT_ACCESS_ENABLED (2) +#define ZCL_BITMAP_DL_DEFAULT_CONFIGURATION_REGISTER_KEYPAD_INTERFACE_DEFAULT_ACCESS_ENABLED_OFFSET (1) +#define ZCL_BITMAP_DL_DEFAULT_CONFIGURATION_REGISTER_REMOTE_INTERFACE_DEFAULT_ACCESS_IS_ENABLED (4) +#define ZCL_BITMAP_DL_DEFAULT_CONFIGURATION_REGISTER_REMOTE_INTERFACE_DEFAULT_ACCESS_IS_ENABLED_OFFSET (2) +#define ZCL_BITMAP_DL_DEFAULT_CONFIGURATION_REGISTER_SOUND_ENABLED (32) +#define ZCL_BITMAP_DL_DEFAULT_CONFIGURATION_REGISTER_SOUND_ENABLED_OFFSET (5) +#define ZCL_BITMAP_DL_DEFAULT_CONFIGURATION_REGISTER_AUTO_RELOCK_TIME_SET (64) +#define ZCL_BITMAP_DL_DEFAULT_CONFIGURATION_REGISTER_AUTO_RELOCK_TIME_SET_OFFSET (6) +#define ZCL_BITMAP_DL_DEFAULT_CONFIGURATION_REGISTER_LED_SETTINGS_SET (128) +#define ZCL_BITMAP_DL_DEFAULT_CONFIGURATION_REGISTER_LED_SETTINGS_SET_OFFSET (7) +#define ZCL_BITMAP_DL_KEYPAD_OPERATION_EVENT_MASK_UNKNOWN (1) +#define ZCL_BITMAP_DL_KEYPAD_OPERATION_EVENT_MASK_UNKNOWN_OFFSET (0) +#define ZCL_BITMAP_DL_KEYPAD_OPERATION_EVENT_MASK_LOCK (2) +#define ZCL_BITMAP_DL_KEYPAD_OPERATION_EVENT_MASK_LOCK_OFFSET (1) +#define ZCL_BITMAP_DL_KEYPAD_OPERATION_EVENT_MASK_UNLOCK (4) +#define ZCL_BITMAP_DL_KEYPAD_OPERATION_EVENT_MASK_UNLOCK_OFFSET (2) +#define ZCL_BITMAP_DL_KEYPAD_OPERATION_EVENT_MASK_LOCK_INVALID_PIN (8) +#define ZCL_BITMAP_DL_KEYPAD_OPERATION_EVENT_MASK_LOCK_INVALID_PIN_OFFSET (3) +#define ZCL_BITMAP_DL_KEYPAD_OPERATION_EVENT_MASK_LOCK_INVALID_SCHEDULE (16) +#define ZCL_BITMAP_DL_KEYPAD_OPERATION_EVENT_MASK_LOCK_INVALID_SCHEDULE_OFFSET (4) +#define ZCL_BITMAP_DL_KEYPAD_OPERATION_EVENT_MASK_UNLOCK_INVALID_CODE (32) +#define ZCL_BITMAP_DL_KEYPAD_OPERATION_EVENT_MASK_UNLOCK_INVALID_CODE_OFFSET (5) +#define ZCL_BITMAP_DL_KEYPAD_OPERATION_EVENT_MASK_UNLOCK_INVALID_SCHEDULE (64) +#define ZCL_BITMAP_DL_KEYPAD_OPERATION_EVENT_MASK_UNLOCK_INVALID_SCHEDULE_OFFSET (6) +#define ZCL_BITMAP_DL_KEYPAD_OPERATION_EVENT_MASK_NON_ACCESS_USER_OP_EVENT (128) +#define ZCL_BITMAP_DL_KEYPAD_OPERATION_EVENT_MASK_NON_ACCESS_USER_OP_EVENT_OFFSET (7) +#define ZCL_BITMAP_DL_KEYPAD_PROGRAMMING_EVENT_MASK_UNKNOWN (1) +#define ZCL_BITMAP_DL_KEYPAD_PROGRAMMING_EVENT_MASK_UNKNOWN_OFFSET (0) +#define ZCL_BITMAP_DL_KEYPAD_PROGRAMMING_EVENT_MASK_PROGRAMMING_PIN_CHANGED (2) +#define ZCL_BITMAP_DL_KEYPAD_PROGRAMMING_EVENT_MASK_PROGRAMMING_PIN_CHANGED_OFFSET (1) +#define ZCL_BITMAP_DL_KEYPAD_PROGRAMMING_EVENT_MASK_PIN_ADDED (4) +#define ZCL_BITMAP_DL_KEYPAD_PROGRAMMING_EVENT_MASK_PIN_ADDED_OFFSET (2) +#define ZCL_BITMAP_DL_KEYPAD_PROGRAMMING_EVENT_MASK_PIN_CLEARED (8) +#define ZCL_BITMAP_DL_KEYPAD_PROGRAMMING_EVENT_MASK_PIN_CLEARED_OFFSET (3) +#define ZCL_BITMAP_DL_KEYPAD_PROGRAMMING_EVENT_MASK_PIN_CHANGED (16) +#define ZCL_BITMAP_DL_KEYPAD_PROGRAMMING_EVENT_MASK_PIN_CHANGED_OFFSET (4) +#define ZCL_BITMAP_DL_LOCAL_PROGRAMMING_FEATURES_ADD_USERS_CREDENTIALS_SCHEDULES_LOCALLY (1) +#define ZCL_BITMAP_DL_LOCAL_PROGRAMMING_FEATURES_ADD_USERS_CREDENTIALS_SCHEDULES_LOCALLY_OFFSET (0) +#define ZCL_BITMAP_DL_LOCAL_PROGRAMMING_FEATURES_MODIFY_USERS_CREDENTIALS_SCHEDULES_LOCALLY (2) +#define ZCL_BITMAP_DL_LOCAL_PROGRAMMING_FEATURES_MODIFY_USERS_CREDENTIALS_SCHEDULES_LOCALLY_OFFSET (1) +#define ZCL_BITMAP_DL_LOCAL_PROGRAMMING_FEATURES_CLEAR_USERS_CREDENTIALS_SCHEDULES_LOCALLY (4) +#define ZCL_BITMAP_DL_LOCAL_PROGRAMMING_FEATURES_CLEAR_USERS_CREDENTIALS_SCHEDULES_LOCALLY_OFFSET (2) +#define ZCL_BITMAP_DL_LOCAL_PROGRAMMING_FEATURES_ADJUST_LOCK_SETTINGS_LOCALLY (8) +#define ZCL_BITMAP_DL_LOCAL_PROGRAMMING_FEATURES_ADJUST_LOCK_SETTINGS_LOCALLY_OFFSET (3) +#define ZCL_BITMAP_DL_MANUAL_OPERATION_EVENT_MASK_UNKNOWN (1) +#define ZCL_BITMAP_DL_MANUAL_OPERATION_EVENT_MASK_UNKNOWN_OFFSET (0) +#define ZCL_BITMAP_DL_MANUAL_OPERATION_EVENT_MASK_THUMBTURN_LOCK (2) +#define ZCL_BITMAP_DL_MANUAL_OPERATION_EVENT_MASK_THUMBTURN_LOCK_OFFSET (1) +#define ZCL_BITMAP_DL_MANUAL_OPERATION_EVENT_MASK_THUMBTURN_UNLOCK (4) +#define ZCL_BITMAP_DL_MANUAL_OPERATION_EVENT_MASK_THUMBTURN_UNLOCK_OFFSET (2) +#define ZCL_BITMAP_DL_MANUAL_OPERATION_EVENT_MASK_ONE_TOUCH_LOCK (8) +#define ZCL_BITMAP_DL_MANUAL_OPERATION_EVENT_MASK_ONE_TOUCH_LOCK_OFFSET (3) +#define ZCL_BITMAP_DL_MANUAL_OPERATION_EVENT_MASK_KEY_LOCK (16) +#define ZCL_BITMAP_DL_MANUAL_OPERATION_EVENT_MASK_KEY_LOCK_OFFSET (4) +#define ZCL_BITMAP_DL_MANUAL_OPERATION_EVENT_MASK_KEY_UNLOCK (32) +#define ZCL_BITMAP_DL_MANUAL_OPERATION_EVENT_MASK_KEY_UNLOCK_OFFSET (5) +#define ZCL_BITMAP_DL_MANUAL_OPERATION_EVENT_MASK_AUTO_LOCK (64) +#define ZCL_BITMAP_DL_MANUAL_OPERATION_EVENT_MASK_AUTO_LOCK_OFFSET (6) +#define ZCL_BITMAP_DL_MANUAL_OPERATION_EVENT_MASK_SCHEDULE_LOCK (128) +#define ZCL_BITMAP_DL_MANUAL_OPERATION_EVENT_MASK_SCHEDULE_LOCK_OFFSET (7) +#define ZCL_BITMAP_DL_MANUAL_OPERATION_EVENT_MASK_SCHEDULE_UNLOCK (256) +#define ZCL_BITMAP_DL_MANUAL_OPERATION_EVENT_MASK_SCHEDULE_UNLOCK_OFFSET (8) +#define ZCL_BITMAP_DL_MANUAL_OPERATION_EVENT_MASK_MANUAL_LOCK (512) +#define ZCL_BITMAP_DL_MANUAL_OPERATION_EVENT_MASK_MANUAL_LOCK_OFFSET (9) +#define ZCL_BITMAP_DL_MANUAL_OPERATION_EVENT_MASK_MANUAL_UNLOCK (1024) +#define ZCL_BITMAP_DL_MANUAL_OPERATION_EVENT_MASK_MANUAL_UNLOCK_OFFSET (10) +#define ZCL_BITMAP_DL_RFID_OPERATION_EVENT_MASK_UNKNOWN (1) +#define ZCL_BITMAP_DL_RFID_OPERATION_EVENT_MASK_UNKNOWN_OFFSET (0) +#define ZCL_BITMAP_DL_RFID_OPERATION_EVENT_MASK_LOCK (2) +#define ZCL_BITMAP_DL_RFID_OPERATION_EVENT_MASK_LOCK_OFFSET (1) +#define ZCL_BITMAP_DL_RFID_OPERATION_EVENT_MASK_UNLOCK (4) +#define ZCL_BITMAP_DL_RFID_OPERATION_EVENT_MASK_UNLOCK_OFFSET (2) +#define ZCL_BITMAP_DL_RFID_OPERATION_EVENT_MASK_LOCK_INVALID_RFID (8) +#define ZCL_BITMAP_DL_RFID_OPERATION_EVENT_MASK_LOCK_INVALID_RFID_OFFSET (3) +#define ZCL_BITMAP_DL_RFID_OPERATION_EVENT_MASK_LOCK_INVALID_SCHEDULE (16) +#define ZCL_BITMAP_DL_RFID_OPERATION_EVENT_MASK_LOCK_INVALID_SCHEDULE_OFFSET (4) +#define ZCL_BITMAP_DL_RFID_OPERATION_EVENT_MASK_UNLOCK_INVALID_RFID (32) +#define ZCL_BITMAP_DL_RFID_OPERATION_EVENT_MASK_UNLOCK_INVALID_RFID_OFFSET (5) +#define ZCL_BITMAP_DL_RFID_OPERATION_EVENT_MASK_UNLOCK_INVALID_SCHEDULE (64) +#define ZCL_BITMAP_DL_RFID_OPERATION_EVENT_MASK_UNLOCK_INVALID_SCHEDULE_OFFSET (6) +#define ZCL_BITMAP_DL_RFID_PROGRAMMING_EVENT_MASK_UNKNOWN (1) +#define ZCL_BITMAP_DL_RFID_PROGRAMMING_EVENT_MASK_UNKNOWN_OFFSET (0) +#define ZCL_BITMAP_DL_RFID_PROGRAMMING_EVENT_MASK_RFID_CODE_ADDED (32) +#define ZCL_BITMAP_DL_RFID_PROGRAMMING_EVENT_MASK_RFID_CODE_ADDED_OFFSET (5) +#define ZCL_BITMAP_DL_RFID_PROGRAMMING_EVENT_MASK_RFID_CODE_CLEARED (64) +#define ZCL_BITMAP_DL_RFID_PROGRAMMING_EVENT_MASK_RFID_CODE_CLEARED_OFFSET (6) +#define ZCL_BITMAP_DL_REMOTE_OPERATION_EVENT_MASK_UNKNOWN (1) +#define ZCL_BITMAP_DL_REMOTE_OPERATION_EVENT_MASK_UNKNOWN_OFFSET (0) +#define ZCL_BITMAP_DL_REMOTE_OPERATION_EVENT_MASK_LOCK (2) +#define ZCL_BITMAP_DL_REMOTE_OPERATION_EVENT_MASK_LOCK_OFFSET (1) +#define ZCL_BITMAP_DL_REMOTE_OPERATION_EVENT_MASK_UNLOCK (4) +#define ZCL_BITMAP_DL_REMOTE_OPERATION_EVENT_MASK_UNLOCK_OFFSET (2) +#define ZCL_BITMAP_DL_REMOTE_OPERATION_EVENT_MASK_LOCK_INVALID_CODE (8) +#define ZCL_BITMAP_DL_REMOTE_OPERATION_EVENT_MASK_LOCK_INVALID_CODE_OFFSET (3) +#define ZCL_BITMAP_DL_REMOTE_OPERATION_EVENT_MASK_LOCK_INVALID_SCHEDULE (16) +#define ZCL_BITMAP_DL_REMOTE_OPERATION_EVENT_MASK_LOCK_INVALID_SCHEDULE_OFFSET (4) +#define ZCL_BITMAP_DL_REMOTE_OPERATION_EVENT_MASK_UNLOCK_INVALID_CODE (32) +#define ZCL_BITMAP_DL_REMOTE_OPERATION_EVENT_MASK_UNLOCK_INVALID_CODE_OFFSET (5) +#define ZCL_BITMAP_DL_REMOTE_OPERATION_EVENT_MASK_UNLOCK_INVALID_SCHEDULE (64) +#define ZCL_BITMAP_DL_REMOTE_OPERATION_EVENT_MASK_UNLOCK_INVALID_SCHEDULE_OFFSET (6) +#define ZCL_BITMAP_DL_REMOTE_PROGRAMMING_EVENT_MASK_UNKNOWN (1) +#define ZCL_BITMAP_DL_REMOTE_PROGRAMMING_EVENT_MASK_UNKNOWN_OFFSET (0) +#define ZCL_BITMAP_DL_REMOTE_PROGRAMMING_EVENT_MASK_PROGRAMMING_PIN_CHANGED (2) +#define ZCL_BITMAP_DL_REMOTE_PROGRAMMING_EVENT_MASK_PROGRAMMING_PIN_CHANGED_OFFSET (1) +#define ZCL_BITMAP_DL_REMOTE_PROGRAMMING_EVENT_MASK_PIN_ADDED (4) +#define ZCL_BITMAP_DL_REMOTE_PROGRAMMING_EVENT_MASK_PIN_ADDED_OFFSET (2) +#define ZCL_BITMAP_DL_REMOTE_PROGRAMMING_EVENT_MASK_PIN_CLEARED (8) +#define ZCL_BITMAP_DL_REMOTE_PROGRAMMING_EVENT_MASK_PIN_CLEARED_OFFSET (3) +#define ZCL_BITMAP_DL_REMOTE_PROGRAMMING_EVENT_MASK_PIN_CHANGED (16) +#define ZCL_BITMAP_DL_REMOTE_PROGRAMMING_EVENT_MASK_PIN_CHANGED_OFFSET (4) +#define ZCL_BITMAP_DL_REMOTE_PROGRAMMING_EVENT_MASK_RFID_CODE_ADDED (32) +#define ZCL_BITMAP_DL_REMOTE_PROGRAMMING_EVENT_MASK_RFID_CODE_ADDED_OFFSET (5) +#define ZCL_BITMAP_DL_REMOTE_PROGRAMMING_EVENT_MASK_RFID_CODE_CLEARED (64) +#define ZCL_BITMAP_DL_REMOTE_PROGRAMMING_EVENT_MASK_RFID_CODE_CLEARED_OFFSET (6) +#define ZCL_BITMAP_DL_SUPPORTED_OPERATING_MODES_NORMAL (1) +#define ZCL_BITMAP_DL_SUPPORTED_OPERATING_MODES_NORMAL_OFFSET (0) +#define ZCL_BITMAP_DL_SUPPORTED_OPERATING_MODES_VACATION (2) +#define ZCL_BITMAP_DL_SUPPORTED_OPERATING_MODES_VACATION_OFFSET (1) +#define ZCL_BITMAP_DL_SUPPORTED_OPERATING_MODES_PRIVACY (4) +#define ZCL_BITMAP_DL_SUPPORTED_OPERATING_MODES_PRIVACY_OFFSET (2) +#define ZCL_BITMAP_DL_SUPPORTED_OPERATING_MODES_NO_REMOTE_LOCK_UNLOCK (8) +#define ZCL_BITMAP_DL_SUPPORTED_OPERATING_MODES_NO_REMOTE_LOCK_UNLOCK_OFFSET (3) +#define ZCL_BITMAP_DL_SUPPORTED_OPERATING_MODES_PASSAGE (16) +#define ZCL_BITMAP_DL_SUPPORTED_OPERATING_MODES_PASSAGE_OFFSET (4) +#define ZCL_BITMAP_DOOR_LOCK_DAY_OF_WEEK_SUNDAY (1) +#define ZCL_BITMAP_DOOR_LOCK_DAY_OF_WEEK_SUNDAY_OFFSET (0) +#define ZCL_BITMAP_DOOR_LOCK_DAY_OF_WEEK_MONDAY (2) +#define ZCL_BITMAP_DOOR_LOCK_DAY_OF_WEEK_MONDAY_OFFSET (1) +#define ZCL_BITMAP_DOOR_LOCK_DAY_OF_WEEK_TUESDAY (4) +#define ZCL_BITMAP_DOOR_LOCK_DAY_OF_WEEK_TUESDAY_OFFSET (2) +#define ZCL_BITMAP_DOOR_LOCK_DAY_OF_WEEK_WEDNESDAY (8) +#define ZCL_BITMAP_DOOR_LOCK_DAY_OF_WEEK_WEDNESDAY_OFFSET (3) +#define ZCL_BITMAP_DOOR_LOCK_DAY_OF_WEEK_THURSDAY (16) +#define ZCL_BITMAP_DOOR_LOCK_DAY_OF_WEEK_THURSDAY_OFFSET (4) +#define ZCL_BITMAP_DOOR_LOCK_DAY_OF_WEEK_FRIDAY (32) +#define ZCL_BITMAP_DOOR_LOCK_DAY_OF_WEEK_FRIDAY_OFFSET (5) +#define ZCL_BITMAP_DOOR_LOCK_DAY_OF_WEEK_SATURDAY (64) +#define ZCL_BITMAP_DOOR_LOCK_DAY_OF_WEEK_SATURDAY_OFFSET (6) +#define ZCL_BITMAP_DOOR_LOCK_FEATURE_PIN_CREDENTIALS (1) +#define ZCL_BITMAP_DOOR_LOCK_FEATURE_PIN_CREDENTIALS_OFFSET (0) +#define ZCL_BITMAP_DOOR_LOCK_FEATURE_RFID_CREDENTIALS (2) +#define ZCL_BITMAP_DOOR_LOCK_FEATURE_RFID_CREDENTIALS_OFFSET (1) +#define ZCL_BITMAP_DOOR_LOCK_FEATURE_FINGER_CREDENTIALS (4) +#define ZCL_BITMAP_DOOR_LOCK_FEATURE_FINGER_CREDENTIALS_OFFSET (2) +#define ZCL_BITMAP_DOOR_LOCK_FEATURE_LOGGING (8) +#define ZCL_BITMAP_DOOR_LOCK_FEATURE_LOGGING_OFFSET (3) +#define ZCL_BITMAP_DOOR_LOCK_FEATURE_WEEK_DAY_SCHEDULES (16) +#define ZCL_BITMAP_DOOR_LOCK_FEATURE_WEEK_DAY_SCHEDULES_OFFSET (4) +#define ZCL_BITMAP_DOOR_LOCK_FEATURE_DOOR_POSITION_SENSOR (32) +#define ZCL_BITMAP_DOOR_LOCK_FEATURE_DOOR_POSITION_SENSOR_OFFSET (5) +#define ZCL_BITMAP_DOOR_LOCK_FEATURE_FACE_CREDENTIALS (64) +#define ZCL_BITMAP_DOOR_LOCK_FEATURE_FACE_CREDENTIALS_OFFSET (6) +#define ZCL_BITMAP_DOOR_LOCK_FEATURE_CREDENTIALS_OTA (128) +#define ZCL_BITMAP_DOOR_LOCK_FEATURE_CREDENTIALS_OTA_OFFSET (7) +#define ZCL_BITMAP_DOOR_LOCK_FEATURE_USERS_MANAGEMENT (256) +#define ZCL_BITMAP_DOOR_LOCK_FEATURE_USERS_MANAGEMENT_OFFSET (8) +#define ZCL_BITMAP_DOOR_LOCK_FEATURE_NOTIFICATIONS (512) +#define ZCL_BITMAP_DOOR_LOCK_FEATURE_NOTIFICATIONS_OFFSET (9) +#define ZCL_BITMAP_DOOR_LOCK_FEATURE_YEAR_DAY_SCHEDULES (1024) +#define ZCL_BITMAP_DOOR_LOCK_FEATURE_YEAR_DAY_SCHEDULES_OFFSET (10) +#define ZCL_BITMAP_DOOR_LOCK_FEATURE_HOLIDAY_SCHEDULES (2048) +#define ZCL_BITMAP_DOOR_LOCK_FEATURE_HOLIDAY_SCHEDULES_OFFSET (11) +#define ZCL_BITMAP_ENERGY_FORMATTING_NUMBER_OF_DIGITS_TO_THE_RIGHT_OF_THE_DECIMAL_POINT (7) +#define ZCL_BITMAP_ENERGY_FORMATTING_NUMBER_OF_DIGITS_TO_THE_RIGHT_OF_THE_DECIMAL_POINT_OFFSET (0) +#define ZCL_BITMAP_ENERGY_FORMATTING_NUMBER_OF_DIGITS_TO_THE_LEFT_OF_THE_DECIMAL_POINT (120) +#define ZCL_BITMAP_ENERGY_FORMATTING_NUMBER_OF_DIGITS_TO_THE_LEFT_OF_THE_DECIMAL_POINT_OFFSET (3) +#define ZCL_BITMAP_ENERGY_FORMATTING_SUPPRESS_LEADING_ZEROS (128) +#define ZCL_BITMAP_ENERGY_FORMATTING_SUPPRESS_LEADING_ZEROS_OFFSET (7) +#define ZCL_BITMAP_ETHERNET_NETWORK_DIAGNOSTICS_FEATURE_PACKET_COUNTS (1) +#define ZCL_BITMAP_ETHERNET_NETWORK_DIAGNOSTICS_FEATURE_PACKET_COUNTS_OFFSET (0) +#define ZCL_BITMAP_ETHERNET_NETWORK_DIAGNOSTICS_FEATURE_ERROR_COUNTS (2) +#define ZCL_BITMAP_ETHERNET_NETWORK_DIAGNOSTICS_FEATURE_ERROR_COUNTS_OFFSET (1) +#define ZCL_BITMAP_FAN_CONTROL_FEATURE_MULTI_SPEED (1) +#define ZCL_BITMAP_FAN_CONTROL_FEATURE_MULTI_SPEED_OFFSET (0) +#define ZCL_BITMAP_FAN_CONTROL_FEATURE_AUTO (2) +#define ZCL_BITMAP_FAN_CONTROL_FEATURE_AUTO_OFFSET (1) +#define ZCL_BITMAP_FAN_CONTROL_FEATURE_ROCKING (4) +#define ZCL_BITMAP_FAN_CONTROL_FEATURE_ROCKING_OFFSET (2) +#define ZCL_BITMAP_FAN_CONTROL_FEATURE_WIND (8) +#define ZCL_BITMAP_FAN_CONTROL_FEATURE_WIND_OFFSET (3) +#define ZCL_BITMAP_FEATURE_LIFT (1) +#define ZCL_BITMAP_FEATURE_LIFT_OFFSET (0) +#define ZCL_BITMAP_FEATURE_TILT (2) +#define ZCL_BITMAP_FEATURE_TILT_OFFSET (1) +#define ZCL_BITMAP_FEATURE_POSITION_AWARE_LIFT (4) +#define ZCL_BITMAP_FEATURE_POSITION_AWARE_LIFT_OFFSET (2) +#define ZCL_BITMAP_FEATURE_ABSOLUTE_POSITION (8) +#define ZCL_BITMAP_FEATURE_ABSOLUTE_POSITION_OFFSET (3) +#define ZCL_BITMAP_FEATURE_POSITION_AWARE_TILT (16) +#define ZCL_BITMAP_FEATURE_POSITION_AWARE_TILT_OFFSET (4) +#define ZCL_BITMAP_GROUP_CLUSTER_FEATURE_GROUP_NAMES (1) +#define ZCL_BITMAP_GROUP_CLUSTER_FEATURE_GROUP_NAMES_OFFSET (0) +#define ZCL_BITMAP_IAS_ZONE_STATUS_ALARM1 (1) +#define ZCL_BITMAP_IAS_ZONE_STATUS_ALARM1_OFFSET (0) +#define ZCL_BITMAP_IAS_ZONE_STATUS_ALARM2 (2) +#define ZCL_BITMAP_IAS_ZONE_STATUS_ALARM2_OFFSET (1) +#define ZCL_BITMAP_IAS_ZONE_STATUS_TAMPER (4) +#define ZCL_BITMAP_IAS_ZONE_STATUS_TAMPER_OFFSET (2) +#define ZCL_BITMAP_IAS_ZONE_STATUS_BATTERY (8) +#define ZCL_BITMAP_IAS_ZONE_STATUS_BATTERY_OFFSET (3) +#define ZCL_BITMAP_IAS_ZONE_STATUS_SUPERVISION_REPORTS (16) +#define ZCL_BITMAP_IAS_ZONE_STATUS_SUPERVISION_REPORTS_OFFSET (4) +#define ZCL_BITMAP_IAS_ZONE_STATUS_RESTORE_REPORTS (32) +#define ZCL_BITMAP_IAS_ZONE_STATUS_RESTORE_REPORTS_OFFSET (5) +#define ZCL_BITMAP_IAS_ZONE_STATUS_TROUBLE (64) +#define ZCL_BITMAP_IAS_ZONE_STATUS_TROUBLE_OFFSET (6) +#define ZCL_BITMAP_IAS_ZONE_STATUS_AC (128) +#define ZCL_BITMAP_IAS_ZONE_STATUS_AC_OFFSET (7) +#define ZCL_BITMAP_IAS_ZONE_STATUS_TEST (256) +#define ZCL_BITMAP_IAS_ZONE_STATUS_TEST_OFFSET (8) +#define ZCL_BITMAP_IAS_ZONE_STATUS_BATTERY_DEFECT (512) +#define ZCL_BITMAP_IAS_ZONE_STATUS_BATTERY_DEFECT_OFFSET (9) +#define ZCL_BITMAP_KEYPAD_INPUT_FEATURE_NAVIGATION_KEY_CODES (1) +#define ZCL_BITMAP_KEYPAD_INPUT_FEATURE_NAVIGATION_KEY_CODES_OFFSET (0) +#define ZCL_BITMAP_KEYPAD_INPUT_FEATURE_LOCATION_KEYS (2) +#define ZCL_BITMAP_KEYPAD_INPUT_FEATURE_LOCATION_KEYS_OFFSET (1) +#define ZCL_BITMAP_KEYPAD_INPUT_FEATURE_NUMBER_KEYS (4) +#define ZCL_BITMAP_KEYPAD_INPUT_FEATURE_NUMBER_KEYS_OFFSET (2) +#define ZCL_BITMAP_LAMP_ALARM_MODE_LAMP_BURN_HOURS (1) +#define ZCL_BITMAP_LAMP_ALARM_MODE_LAMP_BURN_HOURS_OFFSET (0) +#define ZCL_BITMAP_LEVEL_CONTROL_FEATURE_ON_OFF (1) +#define ZCL_BITMAP_LEVEL_CONTROL_FEATURE_ON_OFF_OFFSET (0) +#define ZCL_BITMAP_LEVEL_CONTROL_FEATURE_LIGHTING (2) +#define ZCL_BITMAP_LEVEL_CONTROL_FEATURE_LIGHTING_OFFSET (1) +#define ZCL_BITMAP_LEVEL_CONTROL_FEATURE_FREQUENCY (4) +#define ZCL_BITMAP_LEVEL_CONTROL_FEATURE_FREQUENCY_OFFSET (2) +#define ZCL_BITMAP_MAINS_ALARM_MASK_VOLTAGE_TOO_LOW (1) +#define ZCL_BITMAP_MAINS_ALARM_MASK_VOLTAGE_TOO_LOW_OFFSET (0) +#define ZCL_BITMAP_MAINS_ALARM_MASK_VOLTAGE_TOO_HIGH (2) +#define ZCL_BITMAP_MAINS_ALARM_MASK_VOLTAGE_TOO_HIGH_OFFSET (1) +#define ZCL_BITMAP_MAINS_ALARM_MASK_MAINS_POWER_SUPPLY_LOST (4) +#define ZCL_BITMAP_MAINS_ALARM_MASK_MAINS_POWER_SUPPLY_LOST_OFFSET (2) +#define ZCL_BITMAP_MEDIA_INPUT_FEATURE_NAME_UPDATES (1) +#define ZCL_BITMAP_MEDIA_INPUT_FEATURE_NAME_UPDATES_OFFSET (0) +#define ZCL_BITMAP_MEDIA_PLAYBACK_FEATURE_ADVANCED_SEEK (1) +#define ZCL_BITMAP_MEDIA_PLAYBACK_FEATURE_ADVANCED_SEEK_OFFSET (0) +#define ZCL_BITMAP_MEDIA_PLAYBACK_FEATURE_VARIABLE_SPEED (2) +#define ZCL_BITMAP_MEDIA_PLAYBACK_FEATURE_VARIABLE_SPEED_OFFSET (1) +#define ZCL_BITMAP_MODE_MOTOR_DIRECTION_REVERSED (1) +#define ZCL_BITMAP_MODE_MOTOR_DIRECTION_REVERSED_OFFSET (0) +#define ZCL_BITMAP_MODE_CALIBRATION_MODE (2) +#define ZCL_BITMAP_MODE_CALIBRATION_MODE_OFFSET (1) +#define ZCL_BITMAP_MODE_MAINTENANCE_MODE (4) +#define ZCL_BITMAP_MODE_MAINTENANCE_MODE_OFFSET (2) +#define ZCL_BITMAP_MODE_LED_FEEDBACK (8) +#define ZCL_BITMAP_MODE_LED_FEEDBACK_OFFSET (3) +#define ZCL_BITMAP_MODE_FOR_SEQUENCE_HEAT_SETPOINT_FIELD_PRESENT (1) +#define ZCL_BITMAP_MODE_FOR_SEQUENCE_HEAT_SETPOINT_FIELD_PRESENT_OFFSET (0) +#define ZCL_BITMAP_MODE_FOR_SEQUENCE_COOL_SETPOINT_FIELD_PRESENT (2) +#define ZCL_BITMAP_MODE_FOR_SEQUENCE_COOL_SETPOINT_FIELD_PRESENT_OFFSET (1) +#define ZCL_BITMAP_MODE_SELECT_FEATURE_DEPONOFF (1) +#define ZCL_BITMAP_MODE_SELECT_FEATURE_DEPONOFF_OFFSET (0) +#define ZCL_BITMAP_NETWORK_COMMISSIONING_FEATURE_WI_FI_NETWORK_INTERFACE (1) +#define ZCL_BITMAP_NETWORK_COMMISSIONING_FEATURE_WI_FI_NETWORK_INTERFACE_OFFSET (0) +#define ZCL_BITMAP_NETWORK_COMMISSIONING_FEATURE_THREAD_NETWORK_INTERFACE (2) +#define ZCL_BITMAP_NETWORK_COMMISSIONING_FEATURE_THREAD_NETWORK_INTERFACE_OFFSET (1) +#define ZCL_BITMAP_NETWORK_COMMISSIONING_FEATURE_ETHERNET_NETWORK_INTERFACE (4) +#define ZCL_BITMAP_NETWORK_COMMISSIONING_FEATURE_ETHERNET_NETWORK_INTERFACE_OFFSET (2) +#define ZCL_BITMAP_OCCUPANCY_OCCUPIED (1) +#define ZCL_BITMAP_OCCUPANCY_OCCUPIED_OFFSET (0) +#define ZCL_BITMAP_OCCUPANCY_SENSOR_TYPE_BITMAP_PIR (1) +#define ZCL_BITMAP_OCCUPANCY_SENSOR_TYPE_BITMAP_PIR_OFFSET (0) +#define ZCL_BITMAP_OCCUPANCY_SENSOR_TYPE_BITMAP_ULTRASONIC (2) +#define ZCL_BITMAP_OCCUPANCY_SENSOR_TYPE_BITMAP_ULTRASONIC_OFFSET (1) +#define ZCL_BITMAP_OCCUPANCY_SENSOR_TYPE_BITMAP_PHYSICAL_CONTACT (4) +#define ZCL_BITMAP_OCCUPANCY_SENSOR_TYPE_BITMAP_PHYSICAL_CONTACT_OFFSET (2) +#define ZCL_BITMAP_ON_OFF_CONTROL_ACCEPT_ONLY_WHEN_ON (1) +#define ZCL_BITMAP_ON_OFF_CONTROL_ACCEPT_ONLY_WHEN_ON_OFFSET (0) +#define ZCL_BITMAP_ON_OFF_FEATURE_LIGHTING (1) +#define ZCL_BITMAP_ON_OFF_FEATURE_LIGHTING_OFFSET (0) +#define ZCL_BITMAP_OPERATIONAL_STATUS_GLOBAL (3) +#define ZCL_BITMAP_OPERATIONAL_STATUS_GLOBAL_OFFSET (0) +#define ZCL_BITMAP_OPERATIONAL_STATUS_LIFT (12) +#define ZCL_BITMAP_OPERATIONAL_STATUS_LIFT_OFFSET (2) +#define ZCL_BITMAP_OPERATIONAL_STATUS_TILT (48) +#define ZCL_BITMAP_OPERATIONAL_STATUS_TILT_OFFSET (4) +#define ZCL_BITMAP_POWER_SOURCE_FEATURE_WIRED (1) +#define ZCL_BITMAP_POWER_SOURCE_FEATURE_WIRED_OFFSET (0) +#define ZCL_BITMAP_POWER_SOURCE_FEATURE_BATTERY (2) +#define ZCL_BITMAP_POWER_SOURCE_FEATURE_BATTERY_OFFSET (1) +#define ZCL_BITMAP_POWER_SOURCE_FEATURE_RECHARGEABLE (4) +#define ZCL_BITMAP_POWER_SOURCE_FEATURE_RECHARGEABLE_OFFSET (2) +#define ZCL_BITMAP_POWER_SOURCE_FEATURE_REPLACEABLE (8) +#define ZCL_BITMAP_POWER_SOURCE_FEATURE_REPLACEABLE_OFFSET (3) +#define ZCL_BITMAP_PRESSURE_FEATURE_EXT (1) +#define ZCL_BITMAP_PRESSURE_FEATURE_EXT_OFFSET (0) +#define ZCL_BITMAP_PUMP_STATUS_DEVICE_FAULT (1) +#define ZCL_BITMAP_PUMP_STATUS_DEVICE_FAULT_OFFSET (0) +#define ZCL_BITMAP_PUMP_STATUS_SUPPLYFAULT (2) +#define ZCL_BITMAP_PUMP_STATUS_SUPPLYFAULT_OFFSET (1) +#define ZCL_BITMAP_PUMP_STATUS_SPEED_LOW (4) +#define ZCL_BITMAP_PUMP_STATUS_SPEED_LOW_OFFSET (2) +#define ZCL_BITMAP_PUMP_STATUS_SPEED_HIGH (8) +#define ZCL_BITMAP_PUMP_STATUS_SPEED_HIGH_OFFSET (3) +#define ZCL_BITMAP_PUMP_STATUS_LOCAL_OVERRIDE (16) +#define ZCL_BITMAP_PUMP_STATUS_LOCAL_OVERRIDE_OFFSET (4) +#define ZCL_BITMAP_PUMP_STATUS_RUNNING (32) +#define ZCL_BITMAP_PUMP_STATUS_RUNNING_OFFSET (5) +#define ZCL_BITMAP_PUMP_STATUS_REMOTE_PRESSURE (64) +#define ZCL_BITMAP_PUMP_STATUS_REMOTE_PRESSURE_OFFSET (6) +#define ZCL_BITMAP_PUMP_STATUS_REMOTE_FLOW (128) +#define ZCL_BITMAP_PUMP_STATUS_REMOTE_FLOW_OFFSET (7) +#define ZCL_BITMAP_PUMP_STATUS_REMOTE_TEMPERATURE (256) +#define ZCL_BITMAP_PUMP_STATUS_REMOTE_TEMPERATURE_OFFSET (8) +#define ZCL_BITMAP_ROCK_SUPPORT_MASK_ROCK_LEFT_RIGHT (1) +#define ZCL_BITMAP_ROCK_SUPPORT_MASK_ROCK_LEFT_RIGHT_OFFSET (0) +#define ZCL_BITMAP_ROCK_SUPPORT_MASK_ROCK_UP_DOWN (2) +#define ZCL_BITMAP_ROCK_SUPPORT_MASK_ROCK_UP_DOWN_OFFSET (1) +#define ZCL_BITMAP_ROCK_SUPPORT_MASK_ROCK_ROUND (4) +#define ZCL_BITMAP_ROCK_SUPPORT_MASK_ROCK_ROUND_OFFSET (2) +#define ZCL_BITMAP_SAFETY_STATUS_REMOTE_LOCKOUT (1) +#define ZCL_BITMAP_SAFETY_STATUS_REMOTE_LOCKOUT_OFFSET (0) +#define ZCL_BITMAP_SAFETY_STATUS_TAMPER_DETECTION (2) +#define ZCL_BITMAP_SAFETY_STATUS_TAMPER_DETECTION_OFFSET (1) +#define ZCL_BITMAP_SAFETY_STATUS_FAILED_COMMUNICATION (4) +#define ZCL_BITMAP_SAFETY_STATUS_FAILED_COMMUNICATION_OFFSET (2) +#define ZCL_BITMAP_SAFETY_STATUS_POSITION_FAILURE (8) +#define ZCL_BITMAP_SAFETY_STATUS_POSITION_FAILURE_OFFSET (3) +#define ZCL_BITMAP_SAFETY_STATUS_THERMAL_PROTECTION (16) +#define ZCL_BITMAP_SAFETY_STATUS_THERMAL_PROTECTION_OFFSET (4) +#define ZCL_BITMAP_SAFETY_STATUS_OBSTACLE_DETECTED (32) +#define ZCL_BITMAP_SAFETY_STATUS_OBSTACLE_DETECTED_OFFSET (5) +#define ZCL_BITMAP_SAFETY_STATUS_POWER (64) +#define ZCL_BITMAP_SAFETY_STATUS_POWER_OFFSET (6) +#define ZCL_BITMAP_SAFETY_STATUS_STOP_INPUT (128) +#define ZCL_BITMAP_SAFETY_STATUS_STOP_INPUT_OFFSET (7) +#define ZCL_BITMAP_SAFETY_STATUS_MOTOR_JAMMED (256) +#define ZCL_BITMAP_SAFETY_STATUS_MOTOR_JAMMED_OFFSET (8) +#define ZCL_BITMAP_SAFETY_STATUS_HARDWARE_FAILURE (512) +#define ZCL_BITMAP_SAFETY_STATUS_HARDWARE_FAILURE_OFFSET (9) +#define ZCL_BITMAP_SAFETY_STATUS_MANUAL_OPERATION (1024) +#define ZCL_BITMAP_SAFETY_STATUS_MANUAL_OPERATION_OFFSET (10) +#define ZCL_BITMAP_SAFETY_STATUS_PROTECTION (2048) +#define ZCL_BITMAP_SAFETY_STATUS_PROTECTION_OFFSET (11) +#define ZCL_BITMAP_SCENE_FEATURES_SCENE_NAMES (1) +#define ZCL_BITMAP_SCENE_FEATURES_SCENE_NAMES_OFFSET (0) +#define ZCL_BITMAP_SCENES_COPY_MODE_COPY_ALL_SCENES (1) +#define ZCL_BITMAP_SCENES_COPY_MODE_COPY_ALL_SCENES_OFFSET (0) +#define ZCL_BITMAP_SHADE_CLOSURE_STATUS_OPERATIONAL (1) +#define ZCL_BITMAP_SHADE_CLOSURE_STATUS_OPERATIONAL_OFFSET (0) +#define ZCL_BITMAP_SHADE_CLOSURE_STATUS_ADJUSTING (2) +#define ZCL_BITMAP_SHADE_CLOSURE_STATUS_ADJUSTING_OFFSET (1) +#define ZCL_BITMAP_SHADE_CLOSURE_STATUS_OPENING (4) +#define ZCL_BITMAP_SHADE_CLOSURE_STATUS_OPENING_OFFSET (2) +#define ZCL_BITMAP_SHADE_CLOSURE_STATUS_MOTOR_OPENING (8) +#define ZCL_BITMAP_SHADE_CLOSURE_STATUS_MOTOR_OPENING_OFFSET (3) +#define ZCL_BITMAP_SIMPLE_BITMAP_VALUE_A (1) +#define ZCL_BITMAP_SIMPLE_BITMAP_VALUE_A_OFFSET (0) +#define ZCL_BITMAP_SIMPLE_BITMAP_VALUE_B (2) +#define ZCL_BITMAP_SIMPLE_BITMAP_VALUE_B_OFFSET (1) +#define ZCL_BITMAP_SIMPLE_BITMAP_VALUE_C (4) +#define ZCL_BITMAP_SIMPLE_BITMAP_VALUE_C_OFFSET (2) +#define ZCL_BITMAP_SOFTWARE_DIAGNOSTICS_FEATURE_WATER_MARKS (1) +#define ZCL_BITMAP_SOFTWARE_DIAGNOSTICS_FEATURE_WATER_MARKS_OFFSET (0) +#define ZCL_BITMAP_SQUAWK_INFO_MODE (240) +#define ZCL_BITMAP_SQUAWK_INFO_MODE_OFFSET (4) +#define ZCL_BITMAP_SQUAWK_INFO_STROBE (8) +#define ZCL_BITMAP_SQUAWK_INFO_STROBE_OFFSET (3) +#define ZCL_BITMAP_SQUAWK_INFO_LEVEL (3) +#define ZCL_BITMAP_SQUAWK_INFO_LEVEL_OFFSET (0) +#define ZCL_BITMAP_START_TIME_MINUTES (63) +#define ZCL_BITMAP_START_TIME_MINUTES_OFFSET (0) +#define ZCL_BITMAP_START_TIME_TIME_ENCODING (192) +#define ZCL_BITMAP_START_TIME_TIME_ENCODING_OFFSET (6) +#define ZCL_BITMAP_START_TIME_HOURS (65280) +#define ZCL_BITMAP_START_TIME_HOURS_OFFSET (8) +#define ZCL_BITMAP_SUPPORTED_STREAMING_PROTOCOL_DASH (1) +#define ZCL_BITMAP_SUPPORTED_STREAMING_PROTOCOL_DASH_OFFSET (0) +#define ZCL_BITMAP_SUPPORTED_STREAMING_PROTOCOL_HLS (2) +#define ZCL_BITMAP_SUPPORTED_STREAMING_PROTOCOL_HLS_OFFSET (1) +#define ZCL_BITMAP_SWITCH_FEATURE_LATCHING_SWITCH (1) +#define ZCL_BITMAP_SWITCH_FEATURE_LATCHING_SWITCH_OFFSET (0) +#define ZCL_BITMAP_SWITCH_FEATURE_MOMENTARY_SWITCH (2) +#define ZCL_BITMAP_SWITCH_FEATURE_MOMENTARY_SWITCH_OFFSET (1) +#define ZCL_BITMAP_SWITCH_FEATURE_MOMENTARY_SWITCH_RELEASE (4) +#define ZCL_BITMAP_SWITCH_FEATURE_MOMENTARY_SWITCH_RELEASE_OFFSET (2) +#define ZCL_BITMAP_SWITCH_FEATURE_MOMENTARY_SWITCH_LONG_PRESS (8) +#define ZCL_BITMAP_SWITCH_FEATURE_MOMENTARY_SWITCH_LONG_PRESS_OFFSET (3) +#define ZCL_BITMAP_SWITCH_FEATURE_MOMENTARY_SWITCH_MULTI_PRESS (16) +#define ZCL_BITMAP_SWITCH_FEATURE_MOMENTARY_SWITCH_MULTI_PRESS_OFFSET (4) +#define ZCL_BITMAP_THERMOSTAT_ALARM_MASK_INITIALIZATION_FAILURE (1) +#define ZCL_BITMAP_THERMOSTAT_ALARM_MASK_INITIALIZATION_FAILURE_OFFSET (0) +#define ZCL_BITMAP_THERMOSTAT_ALARM_MASK_HARDWARE_FAILURE (2) +#define ZCL_BITMAP_THERMOSTAT_ALARM_MASK_HARDWARE_FAILURE_OFFSET (1) +#define ZCL_BITMAP_THERMOSTAT_ALARM_MASK_SELFCALIBRATION_FAILURE (4) +#define ZCL_BITMAP_THERMOSTAT_ALARM_MASK_SELFCALIBRATION_FAILURE_OFFSET (2) +#define ZCL_BITMAP_THERMOSTAT_FEATURE_HEATING (1) +#define ZCL_BITMAP_THERMOSTAT_FEATURE_HEATING_OFFSET (0) +#define ZCL_BITMAP_THERMOSTAT_FEATURE_COOLING (2) +#define ZCL_BITMAP_THERMOSTAT_FEATURE_COOLING_OFFSET (1) +#define ZCL_BITMAP_THERMOSTAT_FEATURE_OCCUPANCY (4) +#define ZCL_BITMAP_THERMOSTAT_FEATURE_OCCUPANCY_OFFSET (2) +#define ZCL_BITMAP_THERMOSTAT_FEATURE_SCHEDULE (8) +#define ZCL_BITMAP_THERMOSTAT_FEATURE_SCHEDULE_OFFSET (3) +#define ZCL_BITMAP_THERMOSTAT_FEATURE_SETBACK (16) +#define ZCL_BITMAP_THERMOSTAT_FEATURE_SETBACK_OFFSET (4) +#define ZCL_BITMAP_THERMOSTAT_FEATURE_AUTOMODE (32) +#define ZCL_BITMAP_THERMOSTAT_FEATURE_AUTOMODE_OFFSET (5) +#define ZCL_BITMAP_THERMOSTAT_OCCUPANCY_OCCUPIED (1) +#define ZCL_BITMAP_THERMOSTAT_OCCUPANCY_OCCUPIED_OFFSET (0) +#define ZCL_BITMAP_THERMOSTAT_RUNNING_STATE_HEAT_STATE_ON (1) +#define ZCL_BITMAP_THERMOSTAT_RUNNING_STATE_HEAT_STATE_ON_OFFSET (0) +#define ZCL_BITMAP_THERMOSTAT_RUNNING_STATE_COOL_STATE_ON (2) +#define ZCL_BITMAP_THERMOSTAT_RUNNING_STATE_COOL_STATE_ON_OFFSET (1) +#define ZCL_BITMAP_THERMOSTAT_RUNNING_STATE_FAN_STATE_ON (4) +#define ZCL_BITMAP_THERMOSTAT_RUNNING_STATE_FAN_STATE_ON_OFFSET (2) +#define ZCL_BITMAP_THERMOSTAT_RUNNING_STATE_HEAT_SECOND_STAGE_STATE_ON (8) +#define ZCL_BITMAP_THERMOSTAT_RUNNING_STATE_HEAT_SECOND_STAGE_STATE_ON_OFFSET (3) +#define ZCL_BITMAP_THERMOSTAT_RUNNING_STATE_COOL_SECOND_STAGE_STATE_ON (16) +#define ZCL_BITMAP_THERMOSTAT_RUNNING_STATE_COOL_SECOND_STAGE_STATE_ON_OFFSET (4) +#define ZCL_BITMAP_THERMOSTAT_RUNNING_STATE_FAN_SECOND_STAGE_STATE_ON (32) +#define ZCL_BITMAP_THERMOSTAT_RUNNING_STATE_FAN_SECOND_STAGE_STATE_ON_OFFSET (5) +#define ZCL_BITMAP_THERMOSTAT_RUNNING_STATE_FAN_THIRD_STAGE_STATE_ON (64) +#define ZCL_BITMAP_THERMOSTAT_RUNNING_STATE_FAN_THIRD_STAGE_STATE_ON_OFFSET (6) +#define ZCL_BITMAP_THERMOSTAT_SENSING_LOCAL_TEMP_SENSED_REMOTELY (1) +#define ZCL_BITMAP_THERMOSTAT_SENSING_LOCAL_TEMP_SENSED_REMOTELY_OFFSET (0) +#define ZCL_BITMAP_THERMOSTAT_SENSING_OUTDOOR_TEMP_SENSED_REMOTELY (2) +#define ZCL_BITMAP_THERMOSTAT_SENSING_OUTDOOR_TEMP_SENSED_REMOTELY_OFFSET (1) +#define ZCL_BITMAP_THERMOSTAT_SENSING_OCCUPANCY_SENSED_REMOTELY (4) +#define ZCL_BITMAP_THERMOSTAT_SENSING_OCCUPANCY_SENSED_REMOTELY_OFFSET (2) +#define ZCL_BITMAP_THREAD_NETWORK_DIAGNOSTICS_FEATURE_PACKET_COUNTS (1) +#define ZCL_BITMAP_THREAD_NETWORK_DIAGNOSTICS_FEATURE_PACKET_COUNTS_OFFSET (0) +#define ZCL_BITMAP_THREAD_NETWORK_DIAGNOSTICS_FEATURE_ERROR_COUNTS (2) +#define ZCL_BITMAP_THREAD_NETWORK_DIAGNOSTICS_FEATURE_ERROR_COUNTS_OFFSET (1) +#define ZCL_BITMAP_THREAD_NETWORK_DIAGNOSTICS_FEATURE_MLE_COUNTS (4) +#define ZCL_BITMAP_THREAD_NETWORK_DIAGNOSTICS_FEATURE_MLE_COUNTS_OFFSET (2) +#define ZCL_BITMAP_THREAD_NETWORK_DIAGNOSTICS_FEATURE_MAC_COUNTS (8) +#define ZCL_BITMAP_THREAD_NETWORK_DIAGNOSTICS_FEATURE_MAC_COUNTS_OFFSET (3) +#define ZCL_BITMAP_TIME_STATUS_MASK_MASTER_CLOCK (1) +#define ZCL_BITMAP_TIME_STATUS_MASK_MASTER_CLOCK_OFFSET (0) +#define ZCL_BITMAP_TIME_STATUS_MASK_SYNCHRONIZED (2) +#define ZCL_BITMAP_TIME_STATUS_MASK_SYNCHRONIZED_OFFSET (1) +#define ZCL_BITMAP_TIME_STATUS_MASK_MASTER_ZONE_DST (4) +#define ZCL_BITMAP_TIME_STATUS_MASK_MASTER_ZONE_DST_OFFSET (2) +#define ZCL_BITMAP_TIME_STATUS_MASK_SUPERSEDING (8) +#define ZCL_BITMAP_TIME_STATUS_MASK_SUPERSEDING_OFFSET (3) +#define ZCL_BITMAP_UNIT_LOCALIZATION_FEATURE_TEMPERATURE_UNIT (1) +#define ZCL_BITMAP_UNIT_LOCALIZATION_FEATURE_TEMPERATURE_UNIT_OFFSET (0) +#define ZCL_BITMAP_WARNING_INFO_MODE (240) +#define ZCL_BITMAP_WARNING_INFO_MODE_OFFSET (4) +#define ZCL_BITMAP_WARNING_INFO_STROBE (12) +#define ZCL_BITMAP_WARNING_INFO_STROBE_OFFSET (2) +#define ZCL_BITMAP_WARNING_INFO_SIREN_LEVEL (3) +#define ZCL_BITMAP_WARNING_INFO_SIREN_LEVEL_OFFSET (0) +#define ZCL_BITMAP_WI_FI_NETWORK_DIAGNOSTICS_FEATURE_PACKET_COUNTS (1) +#define ZCL_BITMAP_WI_FI_NETWORK_DIAGNOSTICS_FEATURE_PACKET_COUNTS_OFFSET (0) +#define ZCL_BITMAP_WI_FI_NETWORK_DIAGNOSTICS_FEATURE_ERROR_COUNTS (2) +#define ZCL_BITMAP_WI_FI_NETWORK_DIAGNOSTICS_FEATURE_ERROR_COUNTS_OFFSET (1) +#define ZCL_BITMAP_WI_FI_SECURITY_UNENCRYPTED (1) +#define ZCL_BITMAP_WI_FI_SECURITY_UNENCRYPTED_OFFSET (0) +#define ZCL_BITMAP_WI_FI_SECURITY_WEP_PERSONAL (2) +#define ZCL_BITMAP_WI_FI_SECURITY_WEP_PERSONAL_OFFSET (1) +#define ZCL_BITMAP_WI_FI_SECURITY_WPA_PERSONAL (4) +#define ZCL_BITMAP_WI_FI_SECURITY_WPA_PERSONAL_OFFSET (2) +#define ZCL_BITMAP_WI_FI_SECURITY_WPA2_PERSONAL (8) +#define ZCL_BITMAP_WI_FI_SECURITY_WPA2_PERSONAL_OFFSET (3) +#define ZCL_BITMAP_WI_FI_SECURITY_WPA3_PERSONAL (16) +#define ZCL_BITMAP_WI_FI_SECURITY_WPA3_PERSONAL_OFFSET (4) +#define ZCL_BITMAP_WIND_SETTING_MASK_SLEEP_WIND (1) +#define ZCL_BITMAP_WIND_SETTING_MASK_SLEEP_WIND_OFFSET (0) +#define ZCL_BITMAP_WIND_SETTING_MASK_NATURAL_WIND (2) +#define ZCL_BITMAP_WIND_SETTING_MASK_NATURAL_WIND_OFFSET (1) +#define ZCL_BITMAP_WIND_SUPPORT_MASK_SLEEP_WIND (1) +#define ZCL_BITMAP_WIND_SUPPORT_MASK_SLEEP_WIND_OFFSET (0) +#define ZCL_BITMAP_WIND_SUPPORT_MASK_NATURAL_WIND (2) +#define ZCL_BITMAP_WIND_SUPPORT_MASK_NATURAL_WIND_OFFSET (1) + +#endif diff --git a/silabs_examples/unify-matter-bridge/linux/zap-handlers/run_zap.sh b/silabs_examples/unify-matter-bridge/linux/zap-handlers/run_zap.sh index e41203ff2ec83c..bc100eb569529b 100755 --- a/silabs_examples/unify-matter-bridge/linux/zap-handlers/run_zap.sh +++ b/silabs_examples/unify-matter-bridge/linux/zap-handlers/run_zap.sh @@ -1,4 +1,4 @@ - +#!/bin/bash pushd ../../../../ ./scripts/tools/zap/generate.py -t silabs_examples/unify-matter-bridge/linux/zap-handlers/bridge-templates.json \ diff --git a/silabs_examples/unify-matter-bridge/linux/zap-handlers/unify-helper.js b/silabs_examples/unify-matter-bridge/linux/zap-handlers/unify-helper.js index a132bbd972409a..0b9f65943c1938 100644 --- a/silabs_examples/unify-matter-bridge/linux/zap-handlers/unify-helper.js +++ b/silabs_examples/unify-matter-bridge/linux/zap-handlers/unify-helper.js @@ -32,17 +32,29 @@ function asUpperCamelCaseUnify(label, options) { } function supportedCluster(clusterName) { + clusterName = asUpperCamelCaseUnify(clusterName) switch (clusterName) { - case "Network Commissioning": return false + case "NetworkCommissioning": return false case "Groups": return false - case "Test Cluster": return false + case "TestCluster": return false case "Descriptor": return false case "Binding": return false - case "Access Control": return false - case "AdministratorCommissioning": false - case "Bridged Device Basic": false - case "Actions": false - case "Ethernet Network Diagnostics": false + case "AccessControl": return false + case "AdministratorCommissioning": return false + case "BridgedDeviceBasic": return false + case "Actions": return false + case "EthernetNetworkDiagnostics": return false + case "BallastConfiguration": return false + case "DeviceTemperatureConfiguration": return false + case "PumpConfigurationAndControl": return false + case "FaultInjection": return false + default: return true + } +} + +function supportedStruct(structName) { + switch (structName) { + case "LabelStruct": return false default: return true } } @@ -54,6 +66,43 @@ function matterClusterConversion(clusterName) { } } +function overrideEnumType(typeName) { + switch (typeName) { + // Occupancy + case "OccupancySensorType": return true + // ColorControl + case "ColorMode": return true + case "EnhancedColorMode": return true + default: return false + } +} + +function overrideBitmapType(typeName) { + switch (typeName) { + case "StartTime": return false + default: return true + } +} + +/** Because the Matter and UCL "dotdot" xml differ in bitmap element names, + * this function maps Matter to UCL names */ +function matterToUclBitmapElem(name) { + switch (name) { + // Occupancy + case "Occupied": return "SensedOccupancy" + case "Pir": return "PIR" + // ColorControl + case "XYAttributesSupported": return "XYSupported" + case "ColorTemperature": return "ColorTemperatureMireds" + default: return name + } +} + + exports.matterClusterConversion = matterClusterConversion exports.supportedCluster = supportedCluster -exports.asUpperCamelCaseUnify = asUpperCamelCaseUnify; \ No newline at end of file +exports.asUpperCamelCaseUnify = asUpperCamelCaseUnify +exports.supportedStruct = supportedStruct +exports.overrideEnumType = overrideEnumType +exports.overrideBitmapType = overrideBitmapType +exports.matterToUclBitmapElem = matterToUclBitmapElem \ No newline at end of file diff --git a/silabs_examples/unify-matter-bridge/linux/zap-handlers/zcl_global_types.hpp.zapt b/silabs_examples/unify-matter-bridge/linux/zap-handlers/zcl_global_types.hpp.zapt new file mode 100644 index 00000000000000..a18209dded9700 --- /dev/null +++ b/silabs_examples/unify-matter-bridge/linux/zap-handlers/zcl_global_types.hpp.zapt @@ -0,0 +1,35 @@ +{{zap_header}} + +#ifndef __ZCL_GLOBAL_TYPES__ +#define __ZCL_GLOBAL_TYPES__ + +// ZCL enums +{{#zcl_enums}} + {{#if (isStrEqual (asUpperCamelCase label) "LevelControlOptions")}} + // Because Matter xml files sometimes has bitmaps defined as this handles creating bitmap defines for those. + // TODO: change matching on "LevelControlOptions" to match on if it is a BITMAPn type + {{#zcl_enum_items}} +#define ZCL_BITMAP_{{asDelimitedMacro parent.label}}_{{asDelimitedMacro label}} ({{value}}) +#define ZCL_BITMAP_{{asDelimitedMacro parent.label}}_{{asDelimitedMacro label}}_OFFSET ({{asOffset value}}) + {{/zcl_enum_items}} + {{else}} + {{#if (overrideEnumType (asUpperCamelCase label))}} +// Enum for {{label}} +typedef enum ZclEnum{{asType label}} : {{asUnderlyingZclType name}} { + {{#zcl_enum_items}} +{{indent}}ZCL_{{asDelimitedMacro parent.label}}_{{asDelimitedMacro label}} = {{value}}, + {{/zcl_enum_items}} +} ZclEnum{{asType label}}; + {{/if}} + {{/if}} +{{/zcl_enums}} + +// ZCL bitmaps +{{#zcl_bitmaps}} + {{#zcl_bitmap_items}} +#define ZCL_BITMAP_{{asDelimitedMacro parent.label}}_{{asDelimitedMacro label}} ({{mask}}) +#define ZCL_BITMAP_{{asDelimitedMacro parent.label}}_{{asDelimitedMacro label}}_OFFSET ({{asOffset mask}}) + {{/zcl_bitmap_items}} +{{/zcl_bitmaps}} + +#endif diff --git a/silabs_examples/unify-matter-bridge/unify-matter-bridge-common/unify-matter-bridge.matter b/silabs_examples/unify-matter-bridge/unify-matter-bridge-common/unify-matter-bridge.matter index 88a75f3af55671..91aa326a253346 100644 --- a/silabs_examples/unify-matter-bridge/unify-matter-bridge-common/unify-matter-bridge.matter +++ b/silabs_examples/unify-matter-bridge/unify-matter-bridge-common/unify-matter-bridge.matter @@ -30,13 +30,24 @@ server cluster Identify = 3 { } attribute int16u identifyTime = 0; + readonly attribute enum8 identifyType = 1; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; request struct IdentifyRequest { INT16U identifyTime = 0; } + request struct TriggerEffectRequest { + IdentifyEffectIdentifier effectIdentifier = 0; + IdentifyEffectVariant effectVariant = 1; + } + command access(invoke: manage) Identify(IdentifyRequest): DefaultSuccess = 0; + command access(invoke: manage) TriggerEffect(TriggerEffectRequest): DefaultSuccess = 64; } server cluster Groups = 4 { @@ -346,22 +357,54 @@ server cluster LevelControl = 8 { } server cluster Descriptor = 29 { - struct DeviceType { + struct DeviceTypeStruct { devtype_id type = 0; int16u revision = 1; } - readonly attribute DeviceType deviceList[] = 0; + readonly attribute DeviceTypeStruct deviceTypeList[] = 0; readonly attribute CLUSTER_ID serverList[] = 1; readonly attribute CLUSTER_ID clientList[] = 2; readonly attribute ENDPOINT_NO partsList[] = 3; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; } client cluster Binding = 30 { + fabric_scoped struct TargetStruct { + optional node_id node = 1; + optional group_id group = 2; + optional endpoint_no endpoint = 3; + optional cluster_id cluster = 4; + fabric_idx fabricIndex = 254; + } + + attribute TargetStruct binding[] = 0; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; } server cluster Binding = 30 { + fabric_scoped struct TargetStruct { + optional node_id node = 1; + optional group_id group = 2; + optional endpoint_no endpoint = 3; + optional cluster_id cluster = 4; + fabric_idx fabricIndex = 254; + } + + attribute TargetStruct binding[] = 0; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; } client cluster AccessControl = 31 { @@ -385,11 +428,11 @@ client cluster AccessControl = 31 { kAdminister = 5; } - struct AccessControlEntry { - Privilege privilege = 1; - AuthMode authMode = 2; - nullable int64u subjects[] = 3; - nullable Target targets[] = 4; + fabric_scoped struct AccessControlEntry { + fabric_sensitive Privilege privilege = 1; + fabric_sensitive AuthMode authMode = 2; + nullable fabric_sensitive int64u subjects[] = 3; + nullable fabric_sensitive Target targets[] = 4; fabric_idx fabricIndex = 254; } @@ -399,12 +442,12 @@ client cluster AccessControl = 31 { nullable devtype_id deviceType = 2; } - struct ExtensionEntry { - octet_string<128> data = 1; + fabric_scoped struct ExtensionEntry { + fabric_sensitive octet_string<128> data = 1; fabric_idx fabricIndex = 254; } - info event access(read: administer) AccessControlEntryChanged = 0 { + fabric_sensitive info event access(read: administer) AccessControlEntryChanged = 0 { nullable node_id adminNodeID = 1; nullable INT16U adminPasscodeID = 2; ChangeTypeEnum changeType = 3; @@ -412,7 +455,7 @@ client cluster AccessControl = 31 { fabric_idx fabricIndex = 254; } - info event access(read: administer) AccessControlExtensionChanged = 1 { + fabric_sensitive info event access(read: administer) AccessControlExtensionChanged = 1 { nullable node_id adminNodeID = 1; nullable INT16U adminPasscodeID = 2; ChangeTypeEnum changeType = 3; @@ -425,7 +468,10 @@ client cluster AccessControl = 31 { readonly attribute int16u subjectsPerAccessControlEntry = 2; readonly attribute int16u targetsPerAccessControlEntry = 3; readonly attribute int16u accessControlEntriesPerFabric = 4; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; } @@ -450,11 +496,11 @@ server cluster AccessControl = 31 { kAdminister = 5; } - struct AccessControlEntry { - Privilege privilege = 1; - AuthMode authMode = 2; - nullable int64u subjects[] = 3; - nullable Target targets[] = 4; + fabric_scoped struct AccessControlEntry { + fabric_sensitive Privilege privilege = 1; + fabric_sensitive AuthMode authMode = 2; + nullable fabric_sensitive int64u subjects[] = 3; + nullable fabric_sensitive Target targets[] = 4; fabric_idx fabricIndex = 254; } @@ -464,12 +510,12 @@ server cluster AccessControl = 31 { nullable devtype_id deviceType = 2; } - struct ExtensionEntry { - octet_string<128> data = 1; + fabric_scoped struct ExtensionEntry { + fabric_sensitive octet_string<128> data = 1; fabric_idx fabricIndex = 254; } - info event access(read: administer) AccessControlEntryChanged = 0 { + fabric_sensitive info event access(read: administer) AccessControlEntryChanged = 0 { nullable node_id adminNodeID = 1; nullable INT16U adminPasscodeID = 2; ChangeTypeEnum changeType = 3; @@ -477,7 +523,7 @@ server cluster AccessControl = 31 { fabric_idx fabricIndex = 254; } - info event access(read: administer) AccessControlExtensionChanged = 1 { + fabric_sensitive info event access(read: administer) AccessControlExtensionChanged = 1 { nullable node_id adminNodeID = 1; nullable INT16U adminPasscodeID = 2; ChangeTypeEnum changeType = 3; @@ -490,7 +536,10 @@ server cluster AccessControl = 31 { readonly attribute int16u subjectsPerAccessControlEntry = 2; readonly attribute int16u targetsPerAccessControlEntry = 3; readonly attribute int16u accessControlEntriesPerFabric = 4; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; } @@ -535,11 +584,20 @@ server cluster Basic = 40 { readonly attribute boolean reachable = 17; readonly attribute char_string<32> uniqueID = 18; readonly attribute CapabilityMinimaStruct capabilityMinima = 19; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; } server cluster LocalizationConfiguration = 43 { + attribute char_string<35> activeLocale = 0; readonly attribute CHAR_STRING supportedLocales[] = 1; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; } @@ -567,6 +625,10 @@ server cluster TimeFormatLocalization = 44 { attribute HourFormat hourFormat = 0; attribute CalendarType activeCalendarType = 1; readonly attribute CalendarType supportedCalendarTypes[] = 2; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; } @@ -582,6 +644,9 @@ server cluster UnitLocalization = 45 { } attribute TempUnit temperatureUnit = 0; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute attrib_id attributeList[] = 65531; readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; } @@ -721,22 +786,22 @@ server cluster NetworkCommissioning = 49 { readonly attribute int16u clusterRevision = 65533; request struct ScanNetworksRequest { - optional nullable OCTET_STRING ssid = 0; + optional nullable OCTET_STRING<32> ssid = 0; optional INT64U breadcrumb = 1; } request struct RemoveNetworkRequest { - OCTET_STRING networkID = 0; + OCTET_STRING<32> networkID = 0; optional INT64U breadcrumb = 1; } request struct ConnectNetworkRequest { - OCTET_STRING networkID = 0; + OCTET_STRING<32> networkID = 0; optional INT64U breadcrumb = 1; } request struct ReorderNetworkRequest { - OCTET_STRING networkID = 0; + OCTET_STRING<32> networkID = 0; INT8U networkIndex = 1; optional INT64U breadcrumb = 2; } @@ -750,7 +815,7 @@ server cluster NetworkCommissioning = 49 { response struct NetworkConfigResponse = 5 { NetworkCommissioningStatus networkingStatus = 0; - optional CHAR_STRING debugText = 1; + optional CHAR_STRING<512> debugText = 1; optional INT8U networkIndex = 2; } @@ -786,11 +851,13 @@ server cluster DiagnosticLogs = 50 { kBdx = 1; } + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; request struct RetrieveLogsRequestRequest { LogsIntent intent = 0; LogsTransferProtocol requestedProtocol = 1; - OCTET_STRING transferFileDesignator = 2; + OCTET_STRING<32> transferFileDesignator = 2; } command RetrieveLogsRequest(RetrieveLogsRequestRequest): RetrieveLogsResponse = 0; @@ -942,6 +1009,14 @@ server cluster EthernetNetworkDiagnostics = 55 { } server cluster Switch = 59 { + bitmap SwitchFeature : BITMAP32 { + kLatchingSwitch = 0x1; + kMomentarySwitch = 0x2; + kMomentarySwitchRelease = 0x4; + kMomentarySwitchLongPress = 0x8; + kMomentarySwitchMultiPress = 0x10; + } + info event SwitchLatched = 0 { INT8U newPosition = 0; } @@ -995,6 +1070,7 @@ server cluster AdministratorCommissioning = 60 { readonly attribute CommissioningWindowStatus windowStatus = 0; readonly attribute nullable fabric_idx adminFabricIndex = 1; readonly attribute nullable int16u adminVendorId = 2; + readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; request struct OpenCommissioningWindowRequest { @@ -1028,13 +1104,13 @@ server cluster OperationalCredentials = 62 { kInvalidFabricIndex = 11; } - struct NOCStruct { - octet_string noc = 1; - nullable octet_string icac = 2; + fabric_scoped struct NOCStruct { + fabric_sensitive octet_string noc = 1; + nullable fabric_sensitive octet_string icac = 2; fabric_idx fabricIndex = 254; } - struct FabricDescriptor { + fabric_scoped struct FabricDescriptor { octet_string<65> rootPublicKey = 1; vendor_id vendorId = 2; fabric_id fabricId = 3; @@ -1049,6 +1125,7 @@ server cluster OperationalCredentials = 62 { readonly attribute int8u commissionedFabrics = 3; readonly attribute OCTET_STRING trustedRootCertificates[] = 4; readonly attribute int8u currentFabricIndex = 5; + readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; request struct AttestationRequestRequest { @@ -1078,7 +1155,7 @@ server cluster OperationalCredentials = 62 { } request struct UpdateFabricLabelRequest { - CHAR_STRING label = 0; + CHAR_STRING<32> label = 0; } request struct RemoveFabricRequest { @@ -1125,13 +1202,13 @@ server cluster GroupKeyManagement = 63 { kCacheAndSync = 1; } - struct GroupKeyMapStruct { + fabric_scoped struct GroupKeyMapStruct { group_id groupId = 1; int16u groupKeySetID = 2; fabric_idx fabricIndex = 254; } - struct GroupInfoMapStruct { + fabric_scoped struct GroupInfoMapStruct { group_id groupId = 1; endpoint_no endpoints[] = 2; optional char_string<16> groupName = 3; @@ -1190,16 +1267,18 @@ server cluster GroupKeyManagement = 63 { server cluster FixedLabel = 64 { readonly attribute LabelStruct labelList[] = 0; + readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; } server cluster UserLabel = 65 { attribute access(write: manage) LabelStruct labelList[] = 0; + readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; } endpoint 0 { - device type bridge = 14; + device type bridge = 22; binding cluster AccessControl; server cluster Identify { @@ -1209,10 +1288,14 @@ endpoint 0 { } server cluster Descriptor { - callback attribute deviceList; + callback attribute deviceTypeList; callback attribute serverList; callback attribute clientList; callback attribute partsList; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute attributeList; + ram attribute featureMap; callback attribute clusterRevision default = 1; } @@ -1225,7 +1308,10 @@ endpoint 0 { callback attribute subjectsPerAccessControlEntry default = 4; callback attribute targetsPerAccessControlEntry default = 3; callback attribute accessControlEntriesPerFabric default = 3; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; callback attribute attributeList; + ram attribute featureMap; ram attribute clusterRevision default = 1; } @@ -1250,11 +1336,20 @@ endpoint 0 { ram attribute reachable default = 1; callback attribute uniqueID; callback attribute capabilityMinima; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute attributeList; + ram attribute featureMap; ram attribute clusterRevision default = 1; } server cluster LocalizationConfiguration { - callback attribute supportedLocales default = en-US; + persist attribute activeLocale default = "en-US"; + callback attribute supportedLocales; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute attributeList; + ram attribute featureMap; ram attribute clusterRevision default = 1; } @@ -1262,11 +1357,18 @@ endpoint 0 { persist attribute hourFormat; persist attribute activeCalendarType; callback attribute supportedCalendarTypes; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute attributeList; + ram attribute featureMap; ram attribute clusterRevision default = 1; } server cluster UnitLocalization { persist attribute temperatureUnit; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute attributeList; ram attribute featureMap default = 0x1; ram attribute clusterRevision default = 1; } @@ -1295,6 +1397,8 @@ endpoint 0 { } server cluster DiagnosticLogs { + ram attribute featureMap; + ram attribute clusterRevision default = 1; } server cluster GeneralDiagnostics { @@ -1336,6 +1440,7 @@ endpoint 0 { callback attribute windowStatus; callback attribute adminFabricIndex default = 1; callback attribute adminVendorId; + ram attribute featureMap; ram attribute clusterRevision default = 1; } @@ -1346,6 +1451,7 @@ endpoint 0 { callback attribute commissionedFabrics; callback attribute trustedRootCertificates; callback attribute currentFabricIndex; + ram attribute featureMap; ram attribute clusterRevision default = 1; } @@ -1362,15 +1468,43 @@ endpoint 0 { server cluster FixedLabel { callback attribute labelList; + ram attribute featureMap; ram attribute clusterRevision default = 1; } server cluster UserLabel { callback attribute labelList; + ram attribute featureMap; ram attribute clusterRevision default = 1; } } endpoint 1 { + device type anonymousEndpointType = 14; + binding cluster Binding; + + server cluster Identify { + ram attribute identifyTime; + ram attribute identifyType; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute attributeList; + ram attribute featureMap; + ram attribute clusterRevision default = 2; + } + + server cluster Descriptor { + callback attribute deviceTypeList; + callback attribute serverList; + callback attribute clientList; + callback attribute partsList; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute attributeList; + ram attribute featureMap; + ram attribute clusterRevision default = 1; + } +} +endpoint 2 { device type dimmablelight = 257; binding cluster Binding; @@ -1418,7 +1552,7 @@ endpoint 1 { } server cluster Descriptor { - callback attribute deviceList; + callback attribute deviceTypeList; callback attribute serverList; callback attribute clientList; callback attribute partsList; diff --git a/silabs_examples/unify-matter-bridge/unify-matter-bridge-common/unify-matter-bridge.zap b/silabs_examples/unify-matter-bridge/unify-matter-bridge-common/unify-matter-bridge.zap index 35794fc119a06a..163d22c0ed253f 100644 --- a/silabs_examples/unify-matter-bridge/unify-matter-bridge-common/unify-matter-bridge.zap +++ b/silabs_examples/unify-matter-bridge/unify-matter-bridge-common/unify-matter-bridge.zap @@ -34,8 +34,8 @@ "endpointTypes": [ { "name": "MA-bridge", - "deviceTypeName": "MA-bridge", - "deviceTypeCode": 14, + "deviceTypeName": "MA-rootdevice", + "deviceTypeCode": 22, "deviceTypeProfileId": 259, "clusters": [ { @@ -85,8 +85,23 @@ "define": "DESCRIPTOR_CLUSTER", "side": "client", "enabled": 0, - "commands": [], "attributes": [ + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "client", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "ClusterRevision", "code": 65533, @@ -112,7 +127,6 @@ "define": "DESCRIPTOR_CLUSTER", "side": "server", "enabled": 1, - "commands": [], "attributes": [ { "name": "device list", @@ -178,6 +192,70 @@ "maxInterval": 65344, "reportableChange": 0 }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "ClusterRevision", "code": 65533, @@ -223,8 +301,23 @@ "define": "ACCESS_CONTROL_CLUSTER", "side": "client", "enabled": 1, - "commands": [], "attributes": [ + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "client", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "ClusterRevision", "code": 65533, @@ -250,7 +343,6 @@ "define": "ACCESS_CONTROL_CLUSTER", "side": "server", "enabled": 1, - "commands": [], "attributes": [ { "name": "ACL", @@ -332,6 +424,38 @@ "maxInterval": 65534, "reportableChange": 0 }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "AttributeList", "code": 65531, @@ -348,6 +472,22 @@ "maxInterval": 65534, "reportableChange": 0 }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "ClusterRevision", "code": 65533, @@ -373,8 +513,23 @@ "define": "BASIC_CLUSTER", "side": "client", "enabled": 0, - "commands": [], "attributes": [ + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "client", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 1, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "ClusterRevision", "code": 65533, @@ -400,7 +555,6 @@ "define": "BASIC_CLUSTER", "side": "server", "enabled": 1, - "commands": [], "attributes": [ { "name": "DataModelRevision", @@ -722,6 +876,70 @@ "maxInterval": 65534, "reportableChange": 0 }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "ClusterRevision", "code": 65533, @@ -747,29 +965,19 @@ "define": "LOCALIZATION_CONFIGURATION_CLUSTER", "side": "client", "enabled": 0, - "commands": [], - "attributes": [] - }, - { - "name": "Localization Configuration", - "code": 43, - "mfgCode": null, - "define": "LOCALIZATION_CONFIGURATION_CLUSTER", - "side": "server", - "enabled": 1, - "commands": [], + "attributes": [ { - "name": "SupportedLocales", - "code": 1, + "name": "FeatureMap", + "code": 65532, "mfgCode": null, - "side": "server", - "type": "array", + "side": "client", + "type": "bitmap32", "included": 1, - "storageOption": "External", + "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "en-US", + "defaultValue": "0", "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -779,7 +987,7 @@ "name": "ClusterRevision", "code": 65533, "mfgCode": null, - "side": "server", + "side": "client", "type": "int16u", "included": 1, "storageOption": "RAM", @@ -794,59 +1002,49 @@ ] }, { - "name": "Time Format Localization", - "code": 44, - "mfgCode": null, - "define": "TIME_FORMAT_LOCALIZATION_CLUSTER", - "side": "client", - "enabled": 0, - "commands": [], - "attributes": [] - }, - { - "name": "Time Format Localization", - "code": 44, + "name": "Localization Configuration", + "code": 43, "mfgCode": null, - "define": "TIME_FORMAT_LOCALIZATION_CLUSTER", + "define": "LOCALIZATION_CONFIGURATION_CLUSTER", "side": "server", "enabled": 1, "commands": [], "attributes": [ { - "name": "HourFormat", + "name": "ActiveLocale", "code": 0, "mfgCode": null, "side": "server", - "type": "HourFormat", + "type": "char_string", "included": 1, "storageOption": "NVM", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": "en-US", "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "ActiveCalendarType", + "name": "SupportedLocales", "code": 1, "mfgCode": null, "side": "server", - "type": "CalendarType", + "type": "array", "included": 1, - "storageOption": "NVM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": "", "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "SupportedCalendarTypes", - "code": 2, + "name": "GeneratedCommandList", + "code": 65528, "mfgCode": null, "side": "server", "type": "array", @@ -861,53 +1059,32 @@ "reportableChange": 0 }, { - "name": "ClusterRevision", - "code": 65533, + "name": "AcceptedCommandList", + "code": 65529, "mfgCode": null, "side": "server", - "type": "int16u", + "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "1", + "defaultValue": "", "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 - } - ] - }, - { - "name": "Unit Localization", - "code": 45, - "mfgCode": null, - "define": "UNIT_LOCALIZATION_CLUSTER", - "side": "client", - "enabled": 0, - "commands": [], - "attributes": [] - }, - { - "name": "Unit Localization", - "code": 45, - "mfgCode": null, - "define": "UNIT_LOCALIZATION_CLUSTER", - "side": "server", - "enabled": 1, - "commands": [], - "attributes": [ + }, { - "name": "TemperatureUnit", - "code": 0, + "name": "AttributeList", + "code": 65531, "mfgCode": null, "side": "server", - "type": "TempUnit", + "type": "array", "included": 1, - "storageOption": "NVM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": "", "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -923,7 +1100,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0x1", + "defaultValue": "0", "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -948,39 +1125,29 @@ ] }, { - "name": "General Commissioning", - "code": 48, + "name": "Time Format Localization", + "code": 44, "mfgCode": null, - "define": "GENERAL_COMMISSIONING_CLUSTER", + "define": "TIME_FORMAT_LOCALIZATION_CLUSTER", "side": "client", "enabled": 0, - "commands": [ - { - "name": "ArmFailSafe", - "code": 0, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 1 - }, + "attributes": [ { - "name": "SetRegulatoryConfig", - "code": 2, + "name": "FeatureMap", + "code": 65532, "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 0 + "side": "client", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 }, - { - "name": "CommissioningComplete", - "code": 4, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 1 - } - ], - "attributes": [ { "name": "ClusterRevision", "code": 65533, @@ -993,86 +1160,28 @@ "bounded": 0, "defaultValue": "1", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 } ] }, { - "name": "General Commissioning", - "code": 48, + "name": "Time Format Localization", + "code": 44, "mfgCode": null, - "define": "GENERAL_COMMISSIONING_CLUSTER", + "define": "TIME_FORMAT_LOCALIZATION_CLUSTER", "side": "server", "enabled": 1, - "commands": [ - { - "name": "ArmFailSafeResponse", - "code": 1, - "mfgCode": null, - "source": "server", - "incoming": 1, - "outgoing": 1 - }, - { - "name": "SetRegulatoryConfigResponse", - "code": 3, - "mfgCode": null, - "source": "server", - "incoming": 0, - "outgoing": 1 - }, - { - "name": "CommissioningCompleteResponse", - "code": 5, - "mfgCode": null, - "source": "server", - "incoming": 1, - "outgoing": 1 - } - ], "attributes": [ { - "name": "Breadcrumb", + "name": "HourFormat", "code": 0, "mfgCode": null, "side": "server", - "type": "int64u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x0000000000000000", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "BasicCommissioningInfo", - "code": 1, - "mfgCode": null, - "side": "server", - "type": "BasicCommissioningInfo", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "RegulatoryConfig", - "code": 2, - "mfgCode": null, - "side": "server", - "type": "RegulatoryLocationType", + "type": "HourFormat", "included": 1, - "storageOption": "External", + "storageOption": "NVM", "singleton": 0, "bounded": 0, "defaultValue": "0", @@ -1082,13 +1191,13 @@ "reportableChange": 0 }, { - "name": "LocationCapability", - "code": 3, + "name": "ActiveCalendarType", + "code": 1, "mfgCode": null, "side": "server", - "type": "RegulatoryLocationType", + "type": "CalendarType", "included": 1, - "storageOption": "External", + "storageOption": "NVM", "singleton": 0, "bounded": 0, "defaultValue": "0", @@ -1098,16 +1207,16 @@ "reportableChange": 0 }, { - "name": "SupportsConcurrentConnection", - "code": 4, + "name": "SupportedCalendarTypes", + "code": 2, "mfgCode": null, "side": "server", - "type": "boolean", + "type": "array", "included": 1, "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "1", + "defaultValue": "", "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -1119,7 +1228,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 0, + "included": 1, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -1135,7 +1244,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 0, + "included": 1, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -1151,7 +1260,7 @@ "mfgCode": null, "side": "server", "type": "array", - "included": 0, + "included": 1, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -1171,7 +1280,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "6", + "defaultValue": "0", "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -1189,70 +1298,210 @@ "bounded": 0, "defaultValue": "1", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 } ] }, { - "name": "Network Commissioning", - "code": 49, + "name": "Unit Localization", + "code": 45, "mfgCode": null, - "define": "NETWORK_COMMISSIONING_CLUSTER", + "define": "UNIT_LOCALIZATION_CLUSTER", "side": "client", "enabled": 0, - "commands": [ + "attributes": [ { - "name": "ScanNetworks", - "code": 0, + "name": "FeatureMap", + "code": 65532, "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 1 + "side": "client", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 }, { - "name": "AddOrUpdateWiFiNetwork", - "code": 2, + "name": "ClusterRevision", + "code": 65533, "mfgCode": null, - "source": "client", - "incoming": 0, - "outgoing": 0 + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Unit Localization", + "code": 45, + "mfgCode": null, + "define": "UNIT_LOCALIZATION_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "TemperatureUnit", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "TempUnit", + "included": 1, + "storageOption": "NVM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 }, { - "name": "AddOrUpdateThreadNetwork", - "code": 3, + "name": "GeneratedCommandList", + "code": 65528, "mfgCode": null, - "source": "client", - "incoming": 0, - "outgoing": 0 + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 }, { - "name": "RemoveNetwork", - "code": 4, + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "General Commissioning", + "code": 48, + "mfgCode": null, + "define": "GENERAL_COMMISSIONING_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "ArmFailSafe", + "code": 0, "mfgCode": null, "source": "client", "incoming": 1, - "outgoing": 0 + "outgoing": 1 }, { - "name": "ConnectNetwork", - "code": 6, + "name": "SetRegulatoryConfig", + "code": 2, "mfgCode": null, "source": "client", "incoming": 1, "outgoing": 0 }, { - "name": "ReorderNetwork", - "code": 8, + "name": "CommissioningComplete", + "code": 4, "mfgCode": null, "source": "client", "incoming": 1, - "outgoing": 0 + "outgoing": 1 } ], "attributes": [ + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "client", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "ClusterRevision", "code": 65533, @@ -1272,15 +1521,15 @@ ] }, { - "name": "Network Commissioning", - "code": 49, + "name": "General Commissioning", + "code": 48, "mfgCode": null, - "define": "NETWORK_COMMISSIONING_CLUSTER", + "define": "GENERAL_COMMISSIONING_CLUSTER", "side": "server", "enabled": 1, "commands": [ { - "name": "ScanNetworksResponse", + "name": "ArmFailSafeResponse", "code": 1, "mfgCode": null, "source": "server", @@ -1288,111 +1537,111 @@ "outgoing": 1 }, { - "name": "NetworkConfigResponse", - "code": 5, + "name": "SetRegulatoryConfigResponse", + "code": 3, "mfgCode": null, "source": "server", "incoming": 0, "outgoing": 1 }, { - "name": "ConnectNetworkResponse", - "code": 7, + "name": "CommissioningCompleteResponse", + "code": 5, "mfgCode": null, "source": "server", - "incoming": 0, + "incoming": 1, "outgoing": 1 } ], "attributes": [ { - "name": "MaxNetworks", + "name": "Breadcrumb", "code": 0, "mfgCode": null, "side": "server", - "type": "int8u", + "type": "int64u", "included": 1, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": "0x0000000000000000", "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, + "minInterval": 0, + "maxInterval": 65344, "reportableChange": 0 }, { - "name": "Networks", + "name": "BasicCommissioningInfo", "code": 1, "mfgCode": null, "side": "server", - "type": "array", + "type": "BasicCommissioningInfo", "included": 1, "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, + "minInterval": 0, + "maxInterval": 65344, "reportableChange": 0 }, { - "name": "ScanMaxTimeSeconds", + "name": "RegulatoryConfig", "code": 2, "mfgCode": null, "side": "server", - "type": "int8u", + "type": "RegulatoryLocationType", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": "0", "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "ConnectMaxTimeSeconds", + "name": "LocationCapability", "code": 3, "mfgCode": null, "side": "server", - "type": "int8u", + "type": "RegulatoryLocationType", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": "0", "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "InterfaceEnabled", + "name": "SupportsConcurrentConnection", "code": 4, "mfgCode": null, "side": "server", "type": "boolean", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": "1", "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "LastNetworkingStatus", - "code": 5, + "name": "GeneratedCommandList", + "code": 65528, "mfgCode": null, "side": "server", - "type": "NetworkCommissioningStatus", - "included": 1, - "storageOption": "RAM", + "type": "array", + "included": 0, + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -1402,13 +1651,13 @@ "reportableChange": 0 }, { - "name": "LastNetworkID", - "code": 6, + "name": "AcceptedCommandList", + "code": 65529, "mfgCode": null, "side": "server", - "type": "octet_string", - "included": 1, - "storageOption": "RAM", + "type": "array", + "included": 0, + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -1418,13 +1667,13 @@ "reportableChange": 0 }, { - "name": "LastConnectErrorValue", - "code": 7, + "name": "AttributeList", + "code": 65531, "mfgCode": null, "side": "server", - "type": "int32s", - "included": 1, - "storageOption": "RAM", + "type": "array", + "included": 0, + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -1434,56 +1683,8 @@ "reportableChange": 0 }, { - "name": "GeneratedCommandList", - "code": 65528, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 0, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "AcceptedCommandList", - "code": 65529, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 0, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "AttributeList", - "code": 65531, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 0, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "FeatureMap", - "code": 65532, + "name": "FeatureMap", + "code": 65532, "mfgCode": null, "side": "server", "type": "bitmap32", @@ -1491,7 +1692,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "4", + "defaultValue": "6", "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -1516,33 +1717,79 @@ ] }, { - "name": "Diagnostic Logs", - "code": 50, + "name": "Network Commissioning", + "code": 49, "mfgCode": null, - "define": "DIAGNOSTIC_LOGS_CLUSTER", - "side": "server", - "enabled": 1, + "define": "NETWORK_COMMISSIONING_CLUSTER", + "side": "client", + "enabled": 0, "commands": [ { - "name": "RetrieveLogsRequest", + "name": "ScanNetworks", "code": 0, "mfgCode": null, "source": "client", "incoming": 1, + "outgoing": 1 + }, + { + "name": "AddOrUpdateWiFiNetwork", + "code": 2, + "mfgCode": null, + "source": "client", + "incoming": 0, + "outgoing": 0 + }, + { + "name": "AddOrUpdateThreadNetwork", + "code": 3, + "mfgCode": null, + "source": "client", + "incoming": 0, + "outgoing": 0 + }, + { + "name": "RemoveNetwork", + "code": 4, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "ConnectNetwork", + "code": 6, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "ReorderNetwork", + "code": 8, + "mfgCode": null, + "source": "client", + "incoming": 1, "outgoing": 0 } ], - "attributes": [] - }, - { - "name": "General Diagnostics", - "code": 51, - "mfgCode": null, - "define": "GENERAL_DIAGNOSTICS_CLUSTER", - "side": "client", - "enabled": 0, - "commands": [], "attributes": [ + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "client", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "ClusterRevision", "code": 65533, @@ -1562,86 +1809,111 @@ ] }, { - "name": "General Diagnostics", - "code": 51, + "name": "Network Commissioning", + "code": 49, "mfgCode": null, - "define": "GENERAL_DIAGNOSTICS_CLUSTER", + "define": "NETWORK_COMMISSIONING_CLUSTER", "side": "server", "enabled": 1, - "commands": [], + "commands": [ + { + "name": "ScanNetworksResponse", + "code": 1, + "mfgCode": null, + "source": "server", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "NetworkConfigResponse", + "code": 5, + "mfgCode": null, + "source": "server", + "incoming": 0, + "outgoing": 1 + }, + { + "name": "ConnectNetworkResponse", + "code": 7, + "mfgCode": null, + "source": "server", + "incoming": 0, + "outgoing": 1 + } + ], "attributes": [ { - "name": "NetworkInterfaces", + "name": "MaxNetworks", "code": 0, "mfgCode": null, "side": "server", - "type": "array", + "type": "int8u", "included": 1, - "storageOption": "External", + "storageOption": "RAM", "singleton": 0, "bounded": 0, "defaultValue": "", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { - "name": "RebootCount", + "name": "Networks", "code": 1, "mfgCode": null, "side": "server", - "type": "int16u", + "type": "array", "included": 1, "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0x0000", + "defaultValue": "", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { - "name": "UpTime", + "name": "ScanMaxTimeSeconds", "code": 2, "mfgCode": null, "side": "server", - "type": "int64u", + "type": "int8u", "included": 1, - "storageOption": "External", + "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0x0000000000000000", + "defaultValue": "", "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "TotalOperationalHours", + "name": "ConnectMaxTimeSeconds", "code": 3, "mfgCode": null, "side": "server", - "type": "int32u", + "type": "int8u", "included": 1, - "storageOption": "External", + "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0x00000000", + "defaultValue": "", "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "BootReasons", + "name": "InterfaceEnabled", "code": 4, "mfgCode": null, "side": "server", - "type": "enum8", + "type": "boolean", "included": 1, - "storageOption": "External", + "storageOption": "RAM", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -1651,13 +1923,13 @@ "reportableChange": 0 }, { - "name": "ActiveHardwareFaults", + "name": "LastNetworkingStatus", "code": 5, "mfgCode": null, "side": "server", - "type": "array", + "type": "NetworkCommissioningStatus", "included": 1, - "storageOption": "External", + "storageOption": "RAM", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -1667,13 +1939,13 @@ "reportableChange": 0 }, { - "name": "ActiveRadioFaults", + "name": "LastNetworkID", "code": 6, "mfgCode": null, "side": "server", - "type": "array", + "type": "octet_string", "included": 1, - "storageOption": "External", + "storageOption": "RAM", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -1683,13 +1955,13 @@ "reportableChange": 0 }, { - "name": "ActiveNetworkFaults", + "name": "LastConnectErrorValue", "code": 7, "mfgCode": null, "side": "server", - "type": "array", + "type": "int32s", "included": 1, - "storageOption": "External", + "storageOption": "RAM", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -1699,75 +1971,28 @@ "reportableChange": 0 }, { - "name": "ClusterRevision", - "code": 65533, + "name": "GeneratedCommandList", + "code": 65528, "mfgCode": null, "side": "server", - "type": "int16u", - "included": 1, - "storageOption": "RAM", + "type": "array", + "included": 0, + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "1", + "defaultValue": "", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 - } - ] - }, - { - "name": "Software Diagnostics", - "code": 52, - "mfgCode": null, - "define": "SOFTWARE_DIAGNOSTICS_CLUSTER", - "side": "client", - "enabled": 0, - "commands": [ + }, { - "name": "ResetWatermarks", - "code": 0, - "mfgCode": null, - "source": "client", - "incoming": 0, - "outgoing": 1 - } - ], - "attributes": [ - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } - ] - }, - { - "name": "Software Diagnostics", - "code": 52, - "mfgCode": null, - "define": "SOFTWARE_DIAGNOSTICS_CLUSTER", - "side": "server", - "enabled": 1, - "commands": [], - "attributes": [ - { - "name": "ThreadMetrics", - "code": 0, + "name": "AcceptedCommandList", + "code": 65529, "mfgCode": null, "side": "server", "type": "array", - "included": 1, + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -1778,53 +2003,73 @@ "reportableChange": 0 }, { - "name": "CurrentHeapFree", - "code": 1, + "name": "AttributeList", + "code": 65531, "mfgCode": null, "side": "server", - "type": "int64u", - "included": 1, + "type": "array", + "included": 0, "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0x0000000000000000", + "defaultValue": "", "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "CurrentHeapUsed", - "code": 2, + "name": "FeatureMap", + "code": 65532, "mfgCode": null, "side": "server", - "type": "int64u", + "type": "bitmap32", "included": 1, - "storageOption": "External", + "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0x0000000000000000", + "defaultValue": "4", "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "CurrentHeapHighWatermark", - "code": 3, + "name": "ClusterRevision", + "code": 65533, "mfgCode": null, "side": "server", - "type": "int64u", + "type": "int16u", "included": 1, - "storageOption": "External", + "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0x0000000000000000", + "defaultValue": "1", "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 - }, + } + ] + }, + { + "name": "Diagnostic Logs", + "code": 50, + "mfgCode": null, + "define": "DIAGNOSTIC_LOGS_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [ + { + "name": "RetrieveLogsRequest", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + } + ], +"attributes": [ { "name": "FeatureMap", "code": 65532, @@ -1835,7 +2080,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "1", + "defaultValue": "0", "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -1853,82 +2098,83 @@ "bounded": 0, "defaultValue": "1", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 } ] }, { - "name": "Thread Network Diagnostics", - "code": 53, + "name": "General Diagnostics", + "code": 51, "mfgCode": null, - "define": "THREAD_NETWORK_DIAGNOSTICS_CLUSTER", + "define": "GENERAL_DIAGNOSTICS_CLUSTER", "side": "client", "enabled": 0, "commands": [], - "attributes": [] - }, - { - "name": "Thread Network Diagnostics", - "code": 53, - "mfgCode": null, - "define": "THREAD_NETWORK_DIAGNOSTICS_CLUSTER", - "side": "server", - "enabled": 0, - "commands": [], "attributes": [ - { - "name": "channel", - "code": 0, + { + "name": "FeatureMap", + "code": 65532, "mfgCode": null, - "side": "server", - "type": "int16u", + "side": "client", + "type": "bitmap32", "included": 1, - "storageOption": "External", + "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": "0", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { - "name": "RoutingRole", - "code": 1, + "name": "ClusterRevision", + "code": 65533, "mfgCode": null, - "side": "server", - "type": "RoutingRole", + "side": "client", + "type": "int16u", "included": 1, - "storageOption": "External", + "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": "1", "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 - }, + } + ] + }, + { + "name": "General Diagnostics", + "code": 51, + "mfgCode": null, + "define": "GENERAL_DIAGNOSTICS_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [], + "attributes": [ { - "name": "NetworkName", - "code": 2, + "name": "NetworkInterfaces", + "code": 0, "mfgCode": null, "side": "server", - "type": "char_string", + "type": "array", "included": 1, "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": "", "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 }, { - "name": "PanId", - "code": 3, + "name": "RebootCount", + "code": 1, "mfgCode": null, "side": "server", "type": "int16u", @@ -1943,8 +2189,8 @@ "reportableChange": 0 }, { - "name": "ExtendedPanId", - "code": 4, + "name": "UpTime", + "code": 2, "mfgCode": null, "side": "server", "type": "int64u", @@ -1954,45 +2200,45 @@ "bounded": 0, "defaultValue": "0x0000000000000000", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { - "name": "MeshLocalPrefix", - "code": 5, + "name": "TotalOperationalHours", + "code": 3, "mfgCode": null, "side": "server", - "type": "octet_string", + "type": "int32u", "included": 1, "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": "0x00000000", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { - "name": "OverrunCount", - "code": 6, + "name": "BootReasons", + "code": 4, "mfgCode": null, "side": "server", - "type": "int64u", + "type": "enum8", "included": 1, "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0x0000000000000000", + "defaultValue": "", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { - "name": "NeighborTableList", - "code": 7, + "name": "ActiveHardwareFaults", + "code": 5, "mfgCode": null, "side": "server", "type": "array", @@ -2002,13 +2248,13 @@ "bounded": 0, "defaultValue": "", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { - "name": "RouteTableList", - "code": 8, + "name": "ActiveRadioFaults", + "code": 6, "mfgCode": null, "side": "server", "type": "array", @@ -2018,173 +2264,209 @@ "bounded": 0, "defaultValue": "", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { - "name": "PartitionId", - "code": 9, + "name": "ActiveNetworkFaults", + "code": 7, "mfgCode": null, "side": "server", - "type": "int32u", + "type": "array", "included": 1, "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { - "name": "weighting", - "code": 10, + "name": "ClusterRevision", + "code": 65533, "mfgCode": null, "side": "server", - "type": "int8u", + "type": "int16u", "included": 1, - "storageOption": "External", + "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": "1", "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 - }, + } + ] + }, + { + "name": "Software Diagnostics", + "code": 52, + "mfgCode": null, + "define": "SOFTWARE_DIAGNOSTICS_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ { - "name": "DataVersion", - "code": 11, + "name": "ResetWatermarks", + "code": 0, "mfgCode": null, - "side": "server", - "type": "int8u", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "StableDataVersion", - "code": 12, + "source": "client", + "incoming": 0, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "ClusterRevision", + "code": 65533, "mfgCode": null, - "side": "server", - "type": "int8u", + "side": "client", + "type": "int16u", "included": 1, - "storageOption": "External", + "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": "1", "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 - }, + } + ] + }, + { + "name": "Software Diagnostics", + "code": 52, + "mfgCode": null, + "define": "SOFTWARE_DIAGNOSTICS_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [], + "attributes": [ { - "name": "LeaderRouterId", - "code": 13, + "name": "ThreadMetrics", + "code": 0, "mfgCode": null, "side": "server", - "type": "int8u", + "type": "array", "included": 1, "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { - "name": "DetachedRoleCount", - "code": 14, + "name": "CurrentHeapFree", + "code": 1, "mfgCode": null, "side": "server", - "type": "int16u", + "type": "int64u", "included": 1, "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0x0000", + "defaultValue": "0x0000000000000000", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { - "name": "ChildRoleCount", - "code": 15, + "name": "CurrentHeapUsed", + "code": 2, "mfgCode": null, "side": "server", - "type": "int16u", + "type": "int64u", "included": 1, "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0x0000", + "defaultValue": "0x0000000000000000", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { - "name": "RouterRoleCount", - "code": 16, + "name": "CurrentHeapHighWatermark", + "code": 3, "mfgCode": null, "side": "server", - "type": "int16u", + "type": "int64u", "included": 1, "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0x0000", + "defaultValue": "0x0000000000000000", "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 }, { - "name": "LeaderRoleCount", - "code": 17, + "name": "FeatureMap", + "code": 65532, "mfgCode": null, "side": "server", - "type": "int16u", + "type": "bitmap32", "included": 1, - "storageOption": "External", + "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0x0000", + "defaultValue": "1", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { - "name": "AttachAttemptCount", - "code": 18, + "name": "ClusterRevision", + "code": 65533, "mfgCode": null, "side": "server", "type": "int16u", "included": 1, - "storageOption": "External", + "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0x0000", + "defaultValue": "1", "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 - }, + } + ] + }, + { + "name": "Thread Network Diagnostics", + "code": 53, + "mfgCode": null, + "define": "THREAD_NETWORK_DIAGNOSTICS_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [], + "attributes": [] + }, + { + "name": "Thread Network Diagnostics", + "code": 53, + "mfgCode": null, + "define": "THREAD_NETWORK_DIAGNOSTICS_CLUSTER", + "side": "server", + "enabled": 0, + "commands": [], + "attributes": [ { - "name": "PartitionIdChangeCount", - "code": 19, + "name": "channel", + "code": 0, "mfgCode": null, "side": "server", "type": "int16u", @@ -2192,50 +2474,50 @@ "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0x0000", + "defaultValue": "", "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 }, { - "name": "BetterPartitionAttachAttemptCount", - "code": 20, + "name": "RoutingRole", + "code": 1, "mfgCode": null, "side": "server", - "type": "int16u", + "type": "RoutingRole", "included": 1, "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0x0000", + "defaultValue": "", "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 }, { - "name": "ParentChangeCount", - "code": 21, + "name": "NetworkName", + "code": 2, "mfgCode": null, "side": "server", - "type": "int16u", + "type": "char_string", "included": 1, "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0x0000", + "defaultValue": "0", "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 }, { - "name": "TxTotalCount", - "code": 22, + "name": "PanId", + "code": 3, "mfgCode": null, "side": "server", - "type": "int32u", + "type": "int16u", "included": 1, "storageOption": "External", "singleton": 0, @@ -2247,88 +2529,88 @@ "reportableChange": 0 }, { - "name": "TxUnicastCount", - "code": 23, + "name": "ExtendedPanId", + "code": 4, "mfgCode": null, "side": "server", - "type": "int32u", + "type": "int64u", "included": 1, "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0x0000", + "defaultValue": "0x0000000000000000", "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 }, { - "name": "TxBroadcastCount", - "code": 24, + "name": "MeshLocalPrefix", + "code": 5, "mfgCode": null, "side": "server", - "type": "int32u", + "type": "octet_string", "included": 1, "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0x0000", + "defaultValue": "", "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 }, { - "name": "TxAckRequestedCount", - "code": 25, + "name": "OverrunCount", + "code": 6, "mfgCode": null, "side": "server", - "type": "int32u", + "type": "int64u", "included": 1, "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0x0000", + "defaultValue": "0x0000000000000000", "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 }, { - "name": "TxAckedCount", - "code": 26, + "name": "NeighborTableList", + "code": 7, "mfgCode": null, "side": "server", - "type": "int32u", + "type": "array", "included": 1, "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0x0000", + "defaultValue": "", "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 }, { - "name": "TxNoAckRequestedCount", - "code": 27, + "name": "RouteTableList", + "code": 8, "mfgCode": null, "side": "server", - "type": "int32u", + "type": "array", "included": 1, "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0x0000", + "defaultValue": "", "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 }, { - "name": "TxDataCount", - "code": 28, + "name": "PartitionId", + "code": 9, "mfgCode": null, "side": "server", "type": "int32u", @@ -2336,82 +2618,82 @@ "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0x0000", + "defaultValue": "", "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 }, { - "name": "TxDataPollCount", - "code": 29, + "name": "weighting", + "code": 10, "mfgCode": null, "side": "server", - "type": "int32u", + "type": "int8u", "included": 1, "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0x0000", + "defaultValue": "", "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 }, { - "name": "TxBeaconCount", - "code": 30, + "name": "DataVersion", + "code": 11, "mfgCode": null, "side": "server", - "type": "int32u", + "type": "int8u", "included": 1, "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0x0000", + "defaultValue": "", "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 }, { - "name": "TxBeaconRequestCount", - "code": 31, + "name": "StableDataVersion", + "code": 12, "mfgCode": null, "side": "server", - "type": "int32u", + "type": "int8u", "included": 1, "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0x0000", + "defaultValue": "", "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 }, { - "name": "TxOtherCount", - "code": 32, + "name": "LeaderRouterId", + "code": 13, "mfgCode": null, "side": "server", - "type": "int32u", + "type": "int8u", "included": 1, "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0x0000", + "defaultValue": "", "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 }, { - "name": "TxRetryCount", - "code": 33, + "name": "DetachedRoleCount", + "code": 14, "mfgCode": null, "side": "server", - "type": "int32u", + "type": "int16u", "included": 1, "storageOption": "External", "singleton": 0, @@ -2423,11 +2705,11 @@ "reportableChange": 0 }, { - "name": "TxDirectMaxRetryExpiryCount", - "code": 34, + "name": "ChildRoleCount", + "code": 15, "mfgCode": null, "side": "server", - "type": "int32u", + "type": "int16u", "included": 1, "storageOption": "External", "singleton": 0, @@ -2439,11 +2721,11 @@ "reportableChange": 0 }, { - "name": "TxIndirectMaxRetryExpiryCount", - "code": 35, + "name": "RouterRoleCount", + "code": 16, "mfgCode": null, "side": "server", - "type": "int32u", + "type": "int16u", "included": 1, "storageOption": "External", "singleton": 0, @@ -2455,11 +2737,11 @@ "reportableChange": 0 }, { - "name": "TxErrCcaCount", - "code": 36, + "name": "LeaderRoleCount", + "code": 17, "mfgCode": null, "side": "server", - "type": "int32u", + "type": "int16u", "included": 1, "storageOption": "External", "singleton": 0, @@ -2471,11 +2753,11 @@ "reportableChange": 0 }, { - "name": "TxErrAbortCount", - "code": 37, + "name": "AttachAttemptCount", + "code": 18, "mfgCode": null, "side": "server", - "type": "int32u", + "type": "int16u", "included": 1, "storageOption": "External", "singleton": 0, @@ -2487,11 +2769,11 @@ "reportableChange": 0 }, { - "name": "TxErrBusyChannelCount", - "code": 38, + "name": "PartitionIdChangeCount", + "code": 19, "mfgCode": null, "side": "server", - "type": "int32u", + "type": "int16u", "included": 1, "storageOption": "External", "singleton": 0, @@ -2503,11 +2785,11 @@ "reportableChange": 0 }, { - "name": "RxTotalCount", - "code": 39, + "name": "BetterPartitionAttachAttemptCount", + "code": 20, "mfgCode": null, "side": "server", - "type": "int32u", + "type": "int16u", "included": 1, "storageOption": "External", "singleton": 0, @@ -2519,11 +2801,11 @@ "reportableChange": 0 }, { - "name": "RxUnicastCount", - "code": 40, + "name": "ParentChangeCount", + "code": 21, "mfgCode": null, "side": "server", - "type": "int32u", + "type": "int16u", "included": 1, "storageOption": "External", "singleton": 0, @@ -2535,8 +2817,8 @@ "reportableChange": 0 }, { - "name": "RxBroadcastCount", - "code": 41, + "name": "TxTotalCount", + "code": 22, "mfgCode": null, "side": "server", "type": "int32u", @@ -2551,8 +2833,8 @@ "reportableChange": 0 }, { - "name": "RxDataCount", - "code": 42, + "name": "TxUnicastCount", + "code": 23, "mfgCode": null, "side": "server", "type": "int32u", @@ -2567,8 +2849,8 @@ "reportableChange": 0 }, { - "name": "RxDataPollCount", - "code": 43, + "name": "TxBroadcastCount", + "code": 24, "mfgCode": null, "side": "server", "type": "int32u", @@ -2583,8 +2865,8 @@ "reportableChange": 0 }, { - "name": "RxBeaconCount", - "code": 44, + "name": "TxAckRequestedCount", + "code": 25, "mfgCode": null, "side": "server", "type": "int32u", @@ -2599,8 +2881,8 @@ "reportableChange": 0 }, { - "name": "RxBeaconRequestCount", - "code": 45, + "name": "TxAckedCount", + "code": 26, "mfgCode": null, "side": "server", "type": "int32u", @@ -2615,8 +2897,8 @@ "reportableChange": 0 }, { - "name": "RxOtherCount", - "code": 46, + "name": "TxNoAckRequestedCount", + "code": 27, "mfgCode": null, "side": "server", "type": "int32u", @@ -2631,8 +2913,8 @@ "reportableChange": 0 }, { - "name": "RxAddressFilteredCount", - "code": 47, + "name": "TxDataCount", + "code": 28, "mfgCode": null, "side": "server", "type": "int32u", @@ -2647,8 +2929,8 @@ "reportableChange": 0 }, { - "name": "RxDestAddrFilteredCount", - "code": 48, + "name": "TxDataPollCount", + "code": 29, "mfgCode": null, "side": "server", "type": "int32u", @@ -2663,8 +2945,8 @@ "reportableChange": 0 }, { - "name": "RxDuplicatedCount", - "code": 49, + "name": "TxBeaconCount", + "code": 30, "mfgCode": null, "side": "server", "type": "int32u", @@ -2679,8 +2961,8 @@ "reportableChange": 0 }, { - "name": "RxErrNoFrameCount", - "code": 50, + "name": "TxBeaconRequestCount", + "code": 31, "mfgCode": null, "side": "server", "type": "int32u", @@ -2695,8 +2977,8 @@ "reportableChange": 0 }, { - "name": "RxErrUnknownNeighborCount", - "code": 51, + "name": "TxOtherCount", + "code": 32, "mfgCode": null, "side": "server", "type": "int32u", @@ -2711,8 +2993,8 @@ "reportableChange": 0 }, { - "name": "RxErrInvalidSrcAddrCount", - "code": 52, + "name": "TxRetryCount", + "code": 33, "mfgCode": null, "side": "server", "type": "int32u", @@ -2727,8 +3009,8 @@ "reportableChange": 0 }, { - "name": "RxErrSecCount", - "code": 53, + "name": "TxDirectMaxRetryExpiryCount", + "code": 34, "mfgCode": null, "side": "server", "type": "int32u", @@ -2743,8 +3025,8 @@ "reportableChange": 0 }, { - "name": "RxErrFcsCount", - "code": 54, + "name": "TxIndirectMaxRetryExpiryCount", + "code": 35, "mfgCode": null, "side": "server", "type": "int32u", @@ -2759,8 +3041,8 @@ "reportableChange": 0 }, { - "name": "RxErrOtherCount", - "code": 55, + "name": "TxErrCcaCount", + "code": 36, "mfgCode": null, "side": "server", "type": "int32u", @@ -2775,40 +3057,40 @@ "reportableChange": 0 }, { - "name": "ActiveTimestamp", - "code": 56, + "name": "TxErrAbortCount", + "code": 37, "mfgCode": null, "side": "server", - "type": "int64u", + "type": "int32u", "included": 1, "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0x0000000000000000", + "defaultValue": "0x0000", "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, + "minInterval": 0, + "maxInterval": 65344, "reportableChange": 0 }, { - "name": "PendingTimestamp", - "code": 57, + "name": "TxErrBusyChannelCount", + "code": 38, "mfgCode": null, "side": "server", - "type": "int64u", + "type": "int32u", "included": 1, "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0x0000000000000000", + "defaultValue": "0x0000", "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, + "minInterval": 0, + "maxInterval": 65344, "reportableChange": 0 }, { - "name": "delay", - "code": 58, + "name": "RxTotalCount", + "code": 39, "mfgCode": null, "side": "server", "type": "int32u", @@ -2818,32 +3100,32 @@ "bounded": 0, "defaultValue": "0x0000", "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, + "minInterval": 0, + "maxInterval": 65344, "reportableChange": 0 }, { - "name": "SecurityPolicy", - "code": 59, + "name": "RxUnicastCount", + "code": 40, "mfgCode": null, "side": "server", - "type": "SecurityPolicy", + "type": "int32u", "included": 1, "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": "0x0000", "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 }, { - "name": "ChannelMask", - "code": 60, + "name": "RxBroadcastCount", + "code": 41, "mfgCode": null, "side": "server", - "type": "octet_string", + "type": "int32u", "included": 1, "storageOption": "External", "singleton": 0, @@ -2855,161 +3137,139 @@ "reportableChange": 0 }, { - "name": "OperationalDatasetComponents", - "code": 61, + "name": "RxDataCount", + "code": 42, "mfgCode": null, "side": "server", - "type": "OperationalDatasetComponents", + "type": "int32u", "included": 1, "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": "0x0000", "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 }, { - "name": "ActiveNetworkFaultsList", - "code": 62, + "name": "RxDataPollCount", + "code": 43, "mfgCode": null, "side": "server", - "type": "array", + "type": "int32u", "included": 1, "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": "0x0000", "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 }, { - "name": "FeatureMap", - "code": 65532, + "name": "RxBeaconCount", + "code": 44, "mfgCode": null, "side": "server", - "type": "bitmap32", + "type": "int32u", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "15", + "defaultValue": "0x0000", "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, + "minInterval": 0, + "maxInterval": 65344, "reportableChange": 0 }, { - "name": "ClusterRevision", - "code": 65533, + "name": "RxBeaconRequestCount", + "code": 45, "mfgCode": null, "side": "server", - "type": "int16u", + "type": "int32u", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "1", + "defaultValue": "0x0000", "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 - } - ] - }, - { - "name": "WiFi Network Diagnostics", - "code": 54, - "mfgCode": null, - "define": "WIFI_NETWORK_DIAGNOSTICS_CLUSTER", - "side": "client", - "enabled": 0, - "commands": [], - "attributes": [ + }, { - "name": "ClusterRevision", - "code": 65533, + "name": "RxOtherCount", + "code": 46, "mfgCode": null, - "side": "client", - "type": "int16u", + "side": "server", + "type": "int32u", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "1", + "defaultValue": "0x0000", "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 - } - ] - }, - { - "name": "WiFi Network Diagnostics", - "code": 54, - "mfgCode": null, - "define": "WIFI_NETWORK_DIAGNOSTICS_CLUSTER", - "side": "server", - "enabled": 0, - "commands": [], - "attributes": [ + }, { - "name": "bssid", - "code": 0, + "name": "RxAddressFilteredCount", + "code": 47, "mfgCode": null, "side": "server", - "type": "octet_string", + "type": "int32u", "included": 1, "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": "0x0000", "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 }, { - "name": "SecurityType", - "code": 1, + "name": "RxDestAddrFilteredCount", + "code": 48, "mfgCode": null, "side": "server", - "type": "SecurityType", + "type": "int32u", "included": 1, "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": "0x0000", "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 }, { - "name": "WiFiVersion", - "code": 2, + "name": "RxDuplicatedCount", + "code": 49, "mfgCode": null, "side": "server", - "type": "WiFiVersionType", + "type": "int32u", "included": 1, "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": "0x0000", "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 }, { - "name": "ChannelNumber", - "code": 3, + "name": "RxErrNoFrameCount", + "code": 50, "mfgCode": null, "side": "server", - "type": "int16u", + "type": "int32u", "included": 1, "storageOption": "External", "singleton": 0, @@ -3021,24 +3281,24 @@ "reportableChange": 0 }, { - "name": "Rssi", - "code": 4, + "name": "RxErrUnknownNeighborCount", + "code": 51, "mfgCode": null, "side": "server", - "type": "int8s", + "type": "int32u", "included": 1, "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0x00", + "defaultValue": "0x0000", "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 }, { - "name": "BeaconLostCount", - "code": 5, + "name": "RxErrInvalidSrcAddrCount", + "code": 52, "mfgCode": null, "side": "server", "type": "int32u", @@ -3046,15 +3306,15 @@ "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0x00000000", + "defaultValue": "0x0000", "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, + "minInterval": 0, + "maxInterval": 65344, "reportableChange": 0 }, { - "name": "BeaconRxCount", - "code": 6, + "name": "RxErrSecCount", + "code": 53, "mfgCode": null, "side": "server", "type": "int32u", @@ -3062,15 +3322,15 @@ "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0x00000000", + "defaultValue": "0x0000", "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, + "minInterval": 0, + "maxInterval": 65344, "reportableChange": 0 }, { - "name": "PacketMulticastRxCount", - "code": 7, + "name": "RxErrFcsCount", + "code": 54, "mfgCode": null, "side": "server", "type": "int32u", @@ -3078,15 +3338,15 @@ "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0x00000000", + "defaultValue": "0x0000", "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, + "minInterval": 0, + "maxInterval": 65344, "reportableChange": 0 }, { - "name": "PacketMulticastTxCount", - "code": 8, + "name": "RxErrOtherCount", + "code": 55, "mfgCode": null, "side": "server", "type": "int32u", @@ -3094,31 +3354,47 @@ "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0x00000000", + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ActiveTimestamp", + "code": 56, + "mfgCode": null, + "side": "server", + "type": "int64u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000000000000000", "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "PacketUnicastRxCount", - "code": 9, + "name": "PendingTimestamp", + "code": 57, "mfgCode": null, "side": "server", - "type": "int32u", + "type": "int64u", "included": 1, "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0x00000000", + "defaultValue": "0x0000000000000000", "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "PacketUnicastTxCount", - "code": 10, + "name": "delay", + "code": 58, "mfgCode": null, "side": "server", "type": "int32u", @@ -3126,42 +3402,74 @@ "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0x00000000", + "defaultValue": "0x0000", "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "CurrentMaxRate", - "code": 11, + "name": "SecurityPolicy", + "code": 59, "mfgCode": null, "side": "server", - "type": "int64u", + "type": "SecurityPolicy", "included": 1, "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0x0000000000000000", + "defaultValue": "", "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, + "minInterval": 0, + "maxInterval": 65344, "reportableChange": 0 }, { - "name": "OverrunCount", - "code": 12, + "name": "ChannelMask", + "code": 60, "mfgCode": null, "side": "server", - "type": "int64u", + "type": "octet_string", "included": 1, "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0x0000000000000000", + "defaultValue": "0x0000", "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "OperationalDatasetComponents", + "code": 61, + "mfgCode": null, + "side": "server", + "type": "OperationalDatasetComponents", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ActiveNetworkFaultsList", + "code": 62, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, "reportableChange": 0 }, { @@ -3174,7 +3482,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "3", + "defaultValue": "15", "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -3199,22 +3507,13 @@ ] }, { - "name": "Ethernet Network Diagnostics", - "code": 55, + "name": "WiFi Network Diagnostics", + "code": 54, "mfgCode": null, - "define": "ETHERNET_NETWORK_DIAGNOSTICS_CLUSTER", + "define": "WIFI_NETWORK_DIAGNOSTICS_CLUSTER", "side": "client", "enabled": 0, - "commands": [ - { - "name": "ResetCounts", - "code": 0, - "mfgCode": null, - "source": "client", - "incoming": 0, - "outgoing": 1 - } - ], + "commands": [], "attributes": [ { "name": "ClusterRevision", @@ -3235,296 +3534,233 @@ ] }, { - "name": "Ethernet Network Diagnostics", - "code": 55, + "name": "WiFi Network Diagnostics", + "code": 54, "mfgCode": null, - "define": "ETHERNET_NETWORK_DIAGNOSTICS_CLUSTER", + "define": "WIFI_NETWORK_DIAGNOSTICS_CLUSTER", "side": "server", - "enabled": 1, + "enabled": 0, "commands": [], "attributes": [ { - "name": "PHYRate", + "name": "bssid", "code": 0, "mfgCode": null, "side": "server", - "type": "PHYRateType", + "type": "octet_string", "included": 1, "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, + "minInterval": 0, + "maxInterval": 65344, "reportableChange": 0 }, { - "name": "FullDuplex", + "name": "SecurityType", "code": 1, "mfgCode": null, "side": "server", - "type": "boolean", + "type": "SecurityType", "included": 1, "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0x00", + "defaultValue": "", "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, + "minInterval": 0, + "maxInterval": 65344, "reportableChange": 0 }, { - "name": "PacketRxCount", + "name": "WiFiVersion", "code": 2, "mfgCode": null, "side": "server", - "type": "int64u", + "type": "WiFiVersionType", "included": 1, "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0x0000000000000000", + "defaultValue": "", "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 }, { - "name": "PacketTxCount", + "name": "ChannelNumber", "code": 3, "mfgCode": null, "side": "server", - "type": "int64u", + "type": "int16u", "included": 1, "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0x0000000000000000", + "defaultValue": "0x0000", "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 }, { - "name": "TxErrCount", + "name": "Rssi", "code": 4, "mfgCode": null, "side": "server", - "type": "int64u", + "type": "int8s", "included": 1, "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0x0000000000000000", + "defaultValue": "0x00", "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 }, { - "name": "CollisionCount", + "name": "BeaconLostCount", "code": 5, "mfgCode": null, "side": "server", - "type": "int64u", + "type": "int32u", "included": 1, "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0x0000000000000000", + "defaultValue": "0x00000000", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { - "name": "OverrunCount", + "name": "BeaconRxCount", "code": 6, "mfgCode": null, "side": "server", - "type": "int64u", + "type": "int32u", "included": 1, "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0x0000000000000000", + "defaultValue": "0x00000000", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { - "name": "CarrierDetect", + "name": "PacketMulticastRxCount", "code": 7, "mfgCode": null, "side": "server", - "type": "boolean", + "type": "int32u", "included": 1, "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0x00", + "defaultValue": "0x00000000", "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "TimeSinceReset", + "name": "PacketMulticastTxCount", "code": 8, "mfgCode": null, "side": "server", - "type": "int64u", + "type": "int32u", "included": 1, "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0x0000000000000000", + "defaultValue": "0x00000000", "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "FeatureMap", - "code": 65532, + "name": "PacketUnicastRxCount", + "code": 9, "mfgCode": null, "side": "server", - "type": "bitmap32", + "type": "int32u", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "3", + "defaultValue": "0x00000000", "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "ClusterRevision", - "code": 65533, + "name": "PacketUnicastTxCount", + "code": 10, "mfgCode": null, "side": "server", - "type": "int16u", + "type": "int32u", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "1", + "defaultValue": "0x00000000", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 - } - ] - }, - { - "name": "AdministratorCommissioning", - "code": 60, - "mfgCode": null, - "define": "ADMINISTRATOR_COMMISSIONING_CLUSTER", - "side": "client", - "enabled": 0, - "commands": [ + }, { - "name": "OpenCommissioningWindow", - "code": 0, + "name": "CurrentMaxRate", + "code": 11, "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 1 + "side": "server", + "type": "int64u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000000000000000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 }, { - "name": "OpenBasicCommissioningWindow", - "code": 1, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 1 - }, - { - "name": "RevokeCommissioning", - "code": 2, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 1 - } - ], - "attributes": [ - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } - ] - }, - { - "name": "AdministratorCommissioning", - "code": 60, - "mfgCode": null, - "define": "ADMINISTRATOR_COMMISSIONING_CLUSTER", - "side": "server", - "enabled": 1, - "commands": [], - "attributes": [ - { - "name": "WindowStatus", - "code": 0, - "mfgCode": null, - "side": "server", - "type": "int8u", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "AdminFabricIndex", - "code": 1, + "name": "OverrunCount", + "code": 12, "mfgCode": null, "side": "server", - "type": "fabric_idx", + "type": "int64u", "included": 1, "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "1", + "defaultValue": "0x0000000000000000", "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "AdminVendorId", - "code": 2, + "name": "FeatureMap", + "code": 65532, "mfgCode": null, "side": "server", - "type": "int16u", + "type": "bitmap32", "included": 1, - "storageOption": "External", + "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": "3", "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -3549,75 +3785,19 @@ ] }, { - "name": "Operational Credentials", - "code": 62, + "name": "Ethernet Network Diagnostics", + "code": 55, "mfgCode": null, - "define": "OPERATIONAL_CREDENTIALS_CLUSTER", + "define": "ETHERNET_NETWORK_DIAGNOSTICS_CLUSTER", "side": "client", "enabled": 0, "commands": [ { - "name": "AttestationRequest", + "name": "ResetCounts", "code": 0, "mfgCode": null, "source": "client", - "incoming": 1, - "outgoing": 1 - }, - { - "name": "CertificateChainRequest", - "code": 2, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 1 - }, - { - "name": "CSRRequest", - "code": 4, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 1 - }, - { - "name": "AddNOC", - "code": 6, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 1 - }, - { - "name": "UpdateNOC", - "code": 7, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 0 - }, - { - "name": "UpdateFabricLabel", - "code": 9, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 1 - }, - { - "name": "RemoveFabric", - "code": 10, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 1 - }, - { - "name": "AddTrustedRootCertificate", - "code": 11, - "mfgCode": null, - "source": "client", - "incoming": 1, + "incoming": 0, "outgoing": 1 } ], @@ -3641,53 +3821,20 @@ ] }, { - "name": "Operational Credentials", - "code": 62, + "name": "Ethernet Network Diagnostics", + "code": 55, "mfgCode": null, - "define": "OPERATIONAL_CREDENTIALS_CLUSTER", + "define": "ETHERNET_NETWORK_DIAGNOSTICS_CLUSTER", "side": "server", "enabled": 1, - "commands": [ - { - "name": "AttestationResponse", - "code": 1, - "mfgCode": null, - "source": "server", - "incoming": 1, - "outgoing": 1 - }, - { - "name": "CertificateChainResponse", - "code": 3, - "mfgCode": null, - "source": "server", - "incoming": 1, - "outgoing": 1 - }, - { - "name": "CSRResponse", - "code": 5, - "mfgCode": null, - "source": "server", - "incoming": 1, - "outgoing": 1 - }, - { - "name": "NOCResponse", - "code": 8, - "mfgCode": null, - "source": "server", - "incoming": 1, - "outgoing": 1 - } - ], + "commands": [], "attributes": [ { - "name": "NOCs", + "name": "PHYRate", "code": 0, "mfgCode": null, "side": "server", - "type": "array", + "type": "PHYRateType", "included": 1, "storageOption": "External", "singleton": 0, @@ -3699,175 +3846,1299 @@ "reportableChange": 0 }, { - "name": "Fabrics", + "name": "FullDuplex", "code": 1, "mfgCode": null, "side": "server", - "type": "array", + "type": "boolean", "included": 1, "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": "0x00", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { - "name": "SupportedFabrics", + "name": "PacketRxCount", "code": 2, "mfgCode": null, "side": "server", - "type": "int8u", + "type": "int64u", "included": 1, "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": "0x0000000000000000", "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 }, { - "name": "CommissionedFabrics", + "name": "PacketTxCount", "code": 3, "mfgCode": null, "side": "server", - "type": "int8u", + "type": "int64u", "included": 1, "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": "0x0000000000000000", "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 }, { - "name": "TrustedRootCertificates", + "name": "TxErrCount", "code": 4, "mfgCode": null, "side": "server", - "type": "array", + "type": "int64u", "included": 1, "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": "0x0000000000000000", "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 }, { - "name": "CurrentFabricIndex", + "name": "CollisionCount", "code": 5, "mfgCode": null, "side": "server", - "type": "fabric_idx", + "type": "int64u", "included": 1, "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": "0x0000000000000000", "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, + "minInterval": 0, + "maxInterval": 65344, "reportableChange": 0 }, { - "name": "ClusterRevision", - "code": 65533, + "name": "OverrunCount", + "code": 6, "mfgCode": null, "side": "server", - "type": "int16u", + "type": "int64u", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "1", + "defaultValue": "0x0000000000000000", "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 - } - ] - }, - { - "name": "Group Key Management", - "code": 63, - "mfgCode": null, - "define": "GROUP_KEY_MANAGEMENT_CLUSTER", - "side": "client", - "enabled": 0, - "commands": [ - { - "name": "KeySetWrite", - "code": 0, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 0 }, { - "name": "KeySetRead", - "code": 1, + "name": "CarrierDetect", + "code": 7, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "TimeSinceReset", + "code": 8, + "mfgCode": null, + "side": "server", + "type": "int64u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000000000000000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "3", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "AdministratorCommissioning", + "code": 60, + "mfgCode": null, + "define": "ADMINISTRATOR_COMMISSIONING_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "OpenCommissioningWindow", + "code": 0, "mfgCode": null, "source": "client", "incoming": 1, - "outgoing": 0 + "outgoing": 1 }, { - "name": "KeySetRemove", - "code": 3, + "name": "OpenBasicCommissioningWindow", + "code": 1, "mfgCode": null, "source": "client", "incoming": 1, - "outgoing": 0 + "outgoing": 1 }, { - "name": "KeySetReadAllIndices", - "code": 4, + "name": "RevokeCommissioning", + "code": 2, "mfgCode": null, "source": "client", "incoming": 1, - "outgoing": 0 + "outgoing": 1 } ], - "attributes": [] + "attributes": [ + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "client", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] }, { - "name": "Group Key Management", - "code": 63, + "name": "AdministratorCommissioning", + "code": 60, "mfgCode": null, - "define": "GROUP_KEY_MANAGEMENT_CLUSTER", + "define": "ADMINISTRATOR_COMMISSIONING_CLUSTER", "side": "server", "enabled": 1, + "commands": [], + "attributes": [ + { + "name": "WindowStatus", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AdminFabricIndex", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "fabric_idx", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AdminVendorId", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Operational Credentials", + "code": 62, + "mfgCode": null, + "define": "OPERATIONAL_CREDENTIALS_CLUSTER", + "side": "client", + "enabled": 0, "commands": [ { - "name": "KeySetReadResponse", + "name": "AttestationRequest", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "CertificateChainRequest", "code": 2, "mfgCode": null, - "source": "server", - "incoming": 0, + "source": "client", + "incoming": 1, "outgoing": 1 }, { - "name": "KeySetReadAllIndicesResponse", - "code": 5, + "name": "CSRRequest", + "code": 4, "mfgCode": null, - "source": "server", - "incoming": 0, + "source": "client", + "incoming": 1, "outgoing": 1 - } - ], - "attributes": [ + }, { - "name": "GroupKeyMap", - "code": 0, + "name": "AddNOC", + "code": 6, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "UpdateNOC", + "code": 7, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "UpdateFabricLabel", + "code": 9, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "RemoveFabric", + "code": 10, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "AddTrustedRootCertificate", + "code": 11, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "client", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Operational Credentials", + "code": 62, + "mfgCode": null, + "define": "OPERATIONAL_CREDENTIALS_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [ + { + "name": "AttestationResponse", + "code": 1, + "mfgCode": null, + "source": "server", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "CertificateChainResponse", + "code": 3, + "mfgCode": null, + "source": "server", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "CSRResponse", + "code": 5, + "mfgCode": null, + "source": "server", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "NOCResponse", + "code": 8, + "mfgCode": null, + "source": "server", + "incoming": 1, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "NOCs", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Fabrics", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "SupportedFabrics", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "CommissionedFabrics", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "TrustedRootCertificates", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "CurrentFabricIndex", + "code": 5, + "mfgCode": null, + "side": "server", + "type": "fabric_idx", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Group Key Management", + "code": 63, + "mfgCode": null, + "define": "GROUP_KEY_MANAGEMENT_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "KeySetWrite", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "KeySetRead", + "code": 1, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "KeySetRemove", + "code": 3, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "KeySetReadAllIndices", + "code": 4, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + } + ], + "attributes": [ + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "client", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Group Key Management", + "code": 63, + "mfgCode": null, + "define": "GROUP_KEY_MANAGEMENT_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [ + { + "name": "KeySetReadResponse", + "code": 2, + "mfgCode": null, + "source": "server", + "incoming": 0, + "outgoing": 1 + }, + { + "name": "KeySetReadAllIndicesResponse", + "code": 5, + "mfgCode": null, + "source": "server", + "incoming": 0, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "GroupKeyMap", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GroupTable", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MaxGroupsPerFabric", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MaxGroupKeysPerFabric", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Fixed Label", + "code": 64, + "mfgCode": null, + "define": "FIXED_LABEL_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [], + "attributes": [] + }, + { + "name": "Fixed Label", + "code": 64, + "mfgCode": null, + "define": "FIXED_LABEL_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [], + "attributes": [ + { + "name": "label list", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "User Label", + "code": 65, + "mfgCode": null, + "define": "USER_LABEL_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [], + "attributes": [] + }, + { + "name": "User Label", + "code": 65, + "mfgCode": null, + "define": "USER_LABEL_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [], + "attributes": [ + { + "name": "label list", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + } + ] + }, + { + "name": "Anonymous Endpoint Type", + "deviceTypeName": "MA-aggregator", + "deviceTypeCode": 14, + "deviceTypeProfileId": 259, + "clusters": [ + { + "name": "Identify", + "code": 3, + "mfgCode": null, + "define": "IDENTIFY_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "Identify", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "TriggerEffect", + "code": 64, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + } + ], + "attributes": [ + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "client", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "2", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Identify", + "code": 3, + "mfgCode": null, + "define": "IDENTIFY_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "identify time", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "identify type", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "enum8", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "2", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Descriptor", + "code": 29, + "mfgCode": null, + "define": "DESCRIPTOR_CLUSTER", + "side": "client", + "enabled": 0, + "attributes": [ + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "client", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Descriptor", + "code": 29, + "mfgCode": null, + "define": "DESCRIPTOR_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "DeviceTypeList", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ServerList", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClientList", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "PartsList", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, "mfgCode": null, "side": "server", "type": "array", @@ -3882,8 +5153,8 @@ "reportableChange": 0 }, { - "name": "GroupTable", - "code": 1, + "name": "AcceptedCommandList", + "code": 65529, "mfgCode": null, "side": "server", "type": "array", @@ -3898,11 +5169,11 @@ "reportableChange": 0 }, { - "name": "MaxGroupsPerFabric", - "code": 2, + "name": "AttributeList", + "code": 65531, "mfgCode": null, "side": "server", - "type": "int16u", + "type": "array", "included": 1, "storageOption": "External", "singleton": 0, @@ -3914,12 +5185,96 @@ "reportableChange": 0 }, { - "name": "MaxGroupKeysPerFabric", - "code": 3, + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, "mfgCode": null, "side": "server", "type": "int16u", "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Binding", + "code": 30, + "mfgCode": null, + "define": "BINDING_CLUSTER", + "side": "client", + "enabled": 1, + "attributes": [ + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "client", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Binding", + "code": 30, + "mfgCode": null, + "define": "BINDING_CLUSTER", + "side": "server", + "enabled": 0, + "attributes": [ + { + "name": "Binding", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, "storageOption": "External", "singleton": 0, "bounded": 0, @@ -3983,7 +5338,7 @@ "mfgCode": null, "side": "server", "type": "bitmap32", - "included": 0, + "included": 1, "storageOption": "RAM", "singleton": 0, "bounded": 0, @@ -4012,35 +5367,34 @@ ] }, { - "name": "Fixed Label", - "code": 64, + "name": "Actions", + "code": 37, "mfgCode": null, - "define": "FIXED_LABEL_CLUSTER", + "define": "ACTIONS_CLUSTER", "side": "client", "enabled": 0, - "commands": [], - "attributes": [] - }, - { - "name": "Fixed Label", - "code": 64, - "mfgCode": null, - "define": "FIXED_LABEL_CLUSTER", - "side": "server", - "enabled": 1, - "commands": [], - "attributes": [ + "commands": [ { - "name": "label list", + "name": "InstantAction", "code": 0, "mfgCode": null, - "side": "server", - "type": "array", + "source": "client", + "incoming": 1, + "outgoing": 0 + } + ], + "attributes": [ + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "client", + "type": "bitmap32", "included": 1, - "storageOption": "External", + "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": "0", "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -4050,7 +5404,7 @@ "name": "ClusterRevision", "code": 65533, "mfgCode": null, - "side": "server", + "side": "client", "type": "int16u", "included": 1, "storageOption": "RAM", @@ -4065,26 +5419,15 @@ ] }, { - "name": "User Label", - "code": 65, - "mfgCode": null, - "define": "USER_LABEL_CLUSTER", - "side": "client", - "enabled": 0, - "commands": [], - "attributes": [] - }, - { - "name": "User Label", - "code": 65, + "name": "Actions", + "code": 37, "mfgCode": null, - "define": "USER_LABEL_CLUSTER", + "define": "ACTIONS_CLUSTER", "side": "server", - "enabled": 1, - "commands": [], + "enabled": 0, "attributes": [ { - "name": "label list", + "name": "ActionList", "code": 0, "mfgCode": null, "side": "server", @@ -4099,6 +5442,102 @@ "maxInterval": 65534, "reportableChange": 0 }, + { + "name": "EndpointLists", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "SetupURL", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "long_char_string", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "https://example.com", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "ClusterRevision", "code": 65533, @@ -5761,15 +7200,24 @@ "endpointId": 0, "networkId": 0, "endpointVersion": 1, - "deviceIdentifier": 14 + "deviceIdentifier": 22 }, { - "endpointTypeName": "MA-dimmablelight", + "endpointTypeName": "Anonymous Endpoint Type", "endpointTypeIndex": 1, "profileId": 259, "endpointId": 1, "networkId": 0, "endpointVersion": 1, + "deviceIdentifier": 14 + }, + { + "endpointTypeName": "MA-dimmablelight", + "endpointTypeIndex": 2, + "profileId": 259, + "endpointId": 2, + "networkId": 0, + "endpointVersion": 1, "deviceIdentifier": 257 } ], diff --git a/zzz_generated/unify-matter-bridge/zap-generated/CHIPClientCallbacks.h b/zzz_generated/unify-matter-bridge/zap-generated/CHIPClientCallbacks.h index 8c19024e86dfdc..70ca3e88c274a6 100644 --- a/zzz_generated/unify-matter-bridge/zap-generated/CHIPClientCallbacks.h +++ b/zzz_generated/unify-matter-bridge/zap-generated/CHIPClientCallbacks.h @@ -30,6 +30,15 @@ #include // List specific responses +typedef void (*BindingBindingListAttributeCallback)( + void * context, + const chip::app::DataModel::DecodableList & data); +typedef void (*BindingGeneratedCommandListListAttributeCallback)(void * context, + const chip::app::DataModel::DecodableList & data); +typedef void (*BindingAcceptedCommandListListAttributeCallback)(void * context, + const chip::app::DataModel::DecodableList & data); +typedef void (*BindingAttributeListListAttributeCallback)(void * context, + const chip::app::DataModel::DecodableList & data); typedef void (*AccessControlAclListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & @@ -37,5 +46,9 @@ typedef void (*AccessControlAclListAttributeCallback)( typedef void (*AccessControlExtensionListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); +typedef void (*AccessControlGeneratedCommandListListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); +typedef void (*AccessControlAcceptedCommandListListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); typedef void (*AccessControlAttributeListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); diff --git a/zzz_generated/unify-matter-bridge/zap-generated/IMClusterCommandHandler.cpp b/zzz_generated/unify-matter-bridge/zap-generated/IMClusterCommandHandler.cpp index 7d5c98cdc61fa8..d7107c6caa6148 100644 --- a/zzz_generated/unify-matter-bridge/zap-generated/IMClusterCommandHandler.cpp +++ b/zzz_generated/unify-matter-bridge/zap-generated/IMClusterCommandHandler.cpp @@ -356,6 +356,15 @@ void DispatchServerCommand(CommandHandler * apCommandObj, const ConcreteCommandP } break; } + case Commands::TriggerEffect::Id: { + Commands::TriggerEffect::DecodableType commandData; + TLVError = DataModel::Decode(aDataTlv, commandData); + if (TLVError == CHIP_NO_ERROR) + { + wasHandled = emberAfIdentifyClusterTriggerEffectCallback(apCommandObj, aCommandPath, commandData); + } + break; + } default: { // Unrecognized command ID, error status will apply. apCommandObj->AddStatus(aCommandPath, Protocols::InteractionModel::Status::UnsupportedCommand); diff --git a/zzz_generated/unify-matter-bridge/zap-generated/access.h b/zzz_generated/unify-matter-bridge/zap-generated/access.h index d83c0d03fdd189..fd3f5456c615ba 100644 --- a/zzz_generated/unify-matter-bridge/zap-generated/access.h +++ b/zzz_generated/unify-matter-bridge/zap-generated/access.h @@ -145,6 +145,7 @@ // Parallel array data (*cluster*, command, privilege) for invoke command #define GENERATED_ACCESS_INVOKE_COMMAND__CLUSTER { \ 3, /* Cluster: Identify, Command: Identify, Privilege: manage */ \ + 3, /* Cluster: Identify, Command: TriggerEffect, Privilege: manage */ \ 4, /* Cluster: Groups, Command: AddGroup, Privilege: manage */ \ 4, /* Cluster: Groups, Command: RemoveGroup, Privilege: manage */ \ 4, /* Cluster: Groups, Command: RemoveAllGroups, Privilege: manage */ \ @@ -180,6 +181,7 @@ // Parallel array data (cluster, *command*, privilege) for invoke command #define GENERATED_ACCESS_INVOKE_COMMAND__COMMAND { \ 0, /* Cluster: Identify, Command: Identify, Privilege: manage */ \ + 64, /* Cluster: Identify, Command: TriggerEffect, Privilege: manage */ \ 0, /* Cluster: Groups, Command: AddGroup, Privilege: manage */ \ 3, /* Cluster: Groups, Command: RemoveGroup, Privilege: manage */ \ 4, /* Cluster: Groups, Command: RemoveAllGroups, Privilege: manage */ \ @@ -215,6 +217,7 @@ // Parallel array data (cluster, command, *privilege*) for invoke command #define GENERATED_ACCESS_INVOKE_COMMAND__PRIVILEGE { \ kMatterAccessPrivilegeManage, /* Cluster: Identify, Command: Identify, Privilege: manage */ \ + kMatterAccessPrivilegeManage, /* Cluster: Identify, Command: TriggerEffect, Privilege: manage */ \ kMatterAccessPrivilegeManage, /* Cluster: Groups, Command: AddGroup, Privilege: manage */ \ kMatterAccessPrivilegeManage, /* Cluster: Groups, Command: RemoveGroup, Privilege: manage */ \ kMatterAccessPrivilegeManage, /* Cluster: Groups, Command: RemoveAllGroups, Privilege: manage */ \ diff --git a/zzz_generated/unify-matter-bridge/zap-generated/endpoint_config.h b/zzz_generated/unify-matter-bridge/zap-generated/endpoint_config.h index 562619f52f2380..d730cc2ae78dd9 100644 --- a/zzz_generated/unify-matter-bridge/zap-generated/endpoint_config.h +++ b/zzz_generated/unify-matter-bridge/zap-generated/endpoint_config.h @@ -29,25 +29,35 @@ #define GENERATED_DEFAULTS \ { \ \ - /* Endpoint: 0, Cluster: General Commissioning (server), big-endian */ \ + /* Endpoint: 0, Cluster: Localization Configuration (server), big-endian */ \ \ - /* 0 - Breadcrumb, */ \ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + /* 0 - ActiveLocale, */ \ + 5, 'e', 'n', '-', 'U', 'S', \ + \ + /* Endpoint: 0, Cluster: General Commissioning (server), big-endian */ \ + \ + /* 6 - Breadcrumb, */ \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ } #else // !BIGENDIAN_CPU #define GENERATED_DEFAULTS \ { \ \ - /* Endpoint: 0, Cluster: General Commissioning (server), little-endian */ \ + /* Endpoint: 0, Cluster: Localization Configuration (server), little-endian */ \ + \ + /* 0 - ActiveLocale, */ \ + 5, 'e', 'n', '-', 'U', 'S', \ + \ + /* Endpoint: 0, Cluster: General Commissioning (server), little-endian */ \ \ - /* 0 - Breadcrumb, */ \ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + /* 6 - Breadcrumb, */ \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ } #endif // BIGENDIAN_CPU -#define GENERATED_DEFAULTS_COUNT (1) +#define GENERATED_DEFAULTS_COUNT (2) #define ZAP_TYPE(type) ZCL_##type##_ATTRIBUTE_TYPE #define ZAP_LONG_DEFAULTS_INDEX(index) \ @@ -78,20 +88,24 @@ /* Endpoint: 0, Cluster: Unit Localization (server) */ \ { (uint16_t) 0x0, (uint16_t) 0x0, (uint16_t) 0x2 }, /* TemperatureUnit */ \ \ - /* Endpoint: 1, Cluster: Level Control (server) */ { (uint16_t) 0x0, (uint16_t) 0x0, (uint16_t) 0x3 } /* Options */ \ + /* Endpoint: 2, Cluster: Level Control (server) */ \ + { \ + (uint16_t) 0x0, (uint16_t) 0x0, (uint16_t) 0x3 \ + } /* Options */ \ } #define ZAP_ATTRIBUTE_MASK(mask) ATTRIBUTE_MASK_##mask // This is an array of EmberAfAttributeMetadata structures. -#define GENERATED_ATTRIBUTE_COUNT 144 +#define GENERATED_ATTRIBUTE_COUNT 166 #define GENERATED_ATTRIBUTES \ { \ \ /* Endpoint: 0, Cluster: Descriptor (server) */ \ - { 0x00000000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* device list */ \ - { 0x00000001, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* server list */ \ - { 0x00000002, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* client list */ \ - { 0x00000003, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* parts list */ \ + { 0x00000000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* DeviceTypeList */ \ + { 0x00000001, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* ServerList */ \ + { 0x00000002, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* ClientList */ \ + { 0x00000003, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* PartsList */ \ + { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_SIMPLE_DEFAULT(0) }, /* FeatureMap */ \ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: Access Control (server) */ \ @@ -104,8 +118,9 @@ { 0x00000003, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ ZAP_EMPTY_DEFAULT() }, /* TargetsPerAccessControlEntry */ \ { 0x00000004, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ - ZAP_EMPTY_DEFAULT() }, /* AccessControlEntriesPerFabric */ \ - { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ + ZAP_EMPTY_DEFAULT() }, /* AccessControlEntriesPerFabric */ \ + { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_SIMPLE_DEFAULT(0) }, /* FeatureMap */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: Basic (server) */ \ { 0x00000000, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) | ZAP_ATTRIBUTE_MASK(SINGLETON), \ @@ -149,10 +164,14 @@ { 0x00000012, ZAP_TYPE(CHAR_STRING), 33, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) | ZAP_ATTRIBUTE_MASK(SINGLETON), \ ZAP_EMPTY_DEFAULT() }, /* UniqueID */ \ { 0x00000013, ZAP_TYPE(STRUCT), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* CapabilityMinima */ \ + { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_SIMPLE_DEFAULT(0) }, /* FeatureMap */ \ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: Localization Configuration (server) */ \ + { 0x00000000, ZAP_TYPE(CHAR_STRING), 36, ZAP_ATTRIBUTE_MASK(TOKENIZE) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + ZAP_LONG_DEFAULTS_INDEX(0) }, /* ActiveLocale */ \ { 0x00000001, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* SupportedLocales */ \ + { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_SIMPLE_DEFAULT(0) }, /* FeatureMap */ \ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: Time Format Localization (server) */ \ @@ -162,8 +181,9 @@ { 0x00000001, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(TOKENIZE) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ ZAP_SIMPLE_DEFAULT(0) }, /* ActiveCalendarType */ \ { 0x00000002, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ - ZAP_EMPTY_DEFAULT() }, /* SupportedCalendarTypes */ \ - { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ + ZAP_EMPTY_DEFAULT() }, /* SupportedCalendarTypes */ \ + { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_SIMPLE_DEFAULT(0) }, /* FeatureMap */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: Unit Localization (server) */ \ { 0x00000000, ZAP_TYPE(ENUM8), 1, \ @@ -173,7 +193,7 @@ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: General Commissioning (server) */ \ - { 0x00000000, ZAP_TYPE(INT64U), 8, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(0) }, /* Breadcrumb */ \ + { 0x00000000, ZAP_TYPE(INT64U), 8, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(6) }, /* Breadcrumb */ \ { 0x00000001, ZAP_TYPE(STRUCT), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ ZAP_EMPTY_DEFAULT() }, /* BasicCommissioningInfo */ \ { 0x00000002, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* RegulatoryConfig */ \ @@ -196,6 +216,10 @@ { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_SIMPLE_DEFAULT(4) }, /* FeatureMap */ \ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ \ + /* Endpoint: 0, Cluster: Diagnostic Logs (server) */ \ + { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_SIMPLE_DEFAULT(0) }, /* FeatureMap */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ + \ /* Endpoint: 0, Cluster: General Diagnostics (server) */ \ { 0x00000000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* NetworkInterfaces */ \ { 0x00000001, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* RebootCount */ \ @@ -240,8 +264,9 @@ { 0x00000001, ZAP_TYPE(FABRIC_IDX), 1, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ ZAP_EMPTY_DEFAULT() }, /* AdminFabricIndex */ \ { 0x00000002, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ - ZAP_EMPTY_DEFAULT() }, /* AdminVendorId */ \ - { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ + ZAP_EMPTY_DEFAULT() }, /* AdminVendorId */ \ + { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_SIMPLE_DEFAULT(0) }, /* FeatureMap */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: Operational Credentials (server) */ \ { 0x00000000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* NOCs */ \ @@ -252,8 +277,9 @@ { 0x00000004, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ ZAP_EMPTY_DEFAULT() }, /* TrustedRootCertificates */ \ { 0x00000005, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ - ZAP_EMPTY_DEFAULT() }, /* CurrentFabricIndex */ \ - { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ + ZAP_EMPTY_DEFAULT() }, /* CurrentFabricIndex */ \ + { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_SIMPLE_DEFAULT(0) }, /* FeatureMap */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: Group Key Management (server) */ \ { 0x00000000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ @@ -267,22 +293,38 @@ \ /* Endpoint: 0, Cluster: Fixed Label (server) */ \ { 0x00000000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* label list */ \ + { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_SIMPLE_DEFAULT(0) }, /* FeatureMap */ \ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: User Label (server) */ \ { 0x00000000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_EMPTY_DEFAULT() }, /* label list */ \ - { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ + ZAP_EMPTY_DEFAULT() }, /* label list */ \ + { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_SIMPLE_DEFAULT(0) }, /* FeatureMap */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Identify (server) */ \ + { 0x00000000, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0x0) }, /* identify time */ \ + { 0x00000001, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0x0) }, /* identify type */ \ + { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_SIMPLE_DEFAULT(0) }, /* FeatureMap */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(2) }, /* ClusterRevision */ \ + \ + /* Endpoint: 1, Cluster: Descriptor (server) */ \ + { 0x00000000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* DeviceTypeList */ \ + { 0x00000001, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* ServerList */ \ + { 0x00000002, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* ClientList */ \ + { 0x00000003, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* PartsList */ \ + { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_SIMPLE_DEFAULT(0) }, /* FeatureMap */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ + \ + /* Endpoint: 2, Cluster: Identify (server) */ \ { 0x00000000, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0x0000) }, /* identify time */ \ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(4) }, /* ClusterRevision */ \ \ - /* Endpoint: 1, Cluster: Groups (server) */ \ + /* Endpoint: 2, Cluster: Groups (server) */ \ { 0x00000000, ZAP_TYPE(BITMAP8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* name support */ \ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(4) }, /* ClusterRevision */ \ \ - /* Endpoint: 1, Cluster: Scenes (server) */ \ + /* Endpoint: 2, Cluster: Scenes (server) */ \ { 0x00000000, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* SceneCount */ \ { 0x00000001, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* CurrentScene */ \ { 0x00000002, ZAP_TYPE(GROUP_ID), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* CurrentGroup */ \ @@ -290,11 +332,11 @@ { 0x00000004, ZAP_TYPE(BITMAP8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* NameSupport */ \ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(4) }, /* ClusterRevision */ \ \ - /* Endpoint: 1, Cluster: On/Off (server) */ \ + /* Endpoint: 2, Cluster: On/Off (server) */ \ { 0x00000000, ZAP_TYPE(BOOLEAN), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* OnOff */ \ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(4) }, /* ClusterRevision */ \ \ - /* Endpoint: 1, Cluster: Level Control (server) */ \ + /* Endpoint: 2, Cluster: Level Control (server) */ \ { 0x00000000, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(TOKENIZE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ ZAP_SIMPLE_DEFAULT(0x00) }, /* CurrentLevel */ \ { 0x00000001, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* RemainingTime */ \ @@ -321,21 +363,21 @@ { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_SIMPLE_DEFAULT(3) }, /* FeatureMap */ \ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(5) }, /* ClusterRevision */ \ \ - /* Endpoint: 1, Cluster: Descriptor (server) */ \ - { 0x00000000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* device list */ \ - { 0x00000001, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* server list */ \ - { 0x00000002, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* client list */ \ - { 0x00000003, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* parts list */ \ + /* Endpoint: 2, Cluster: Descriptor (server) */ \ + { 0x00000000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* DeviceTypeList */ \ + { 0x00000001, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* ServerList */ \ + { 0x00000002, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* ClientList */ \ + { 0x00000003, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* PartsList */ \ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* ClusterRevision */ \ \ - /* Endpoint: 1, Cluster: Switch (server) */ \ + /* Endpoint: 2, Cluster: Switch (server) */ \ { 0x00000000, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(2) }, /* number of positions */ \ { 0x00000001, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(1) }, /* current position */ \ { 0x00000002, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(2) }, /* multi press max */ \ { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_SIMPLE_DEFAULT(0) }, /* FeatureMap */ \ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ \ - /* Endpoint: 1, Cluster: Fixed Label (server) */ \ + /* Endpoint: 2, Cluster: Fixed Label (server) */ \ { 0x00000000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* label list */ \ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ } @@ -444,9 +486,14 @@ /* Endpoint: 1, Cluster: Identify (server) */\ /* AcceptedCommandList (index=47) */ \ 0x00000000 /* Identify */, \ + 0x00000040 /* TriggerEffect */, \ + chip::kInvalidCommandId /* end of list */, \ + /* Endpoint: 2, Cluster: Identify (server) */\ + /* AcceptedCommandList (index=50) */ \ + 0x00000000 /* Identify */, \ chip::kInvalidCommandId /* end of list */, \ - /* Endpoint: 1, Cluster: Groups (server) */\ - /* AcceptedCommandList (index=49) */ \ + /* Endpoint: 2, Cluster: Groups (server) */\ + /* AcceptedCommandList (index=52) */ \ 0x00000000 /* AddGroup */, \ 0x00000001 /* ViewGroup */, \ 0x00000002 /* GetGroupMembership */, \ @@ -454,14 +501,14 @@ 0x00000004 /* RemoveAllGroups */, \ 0x00000005 /* AddGroupIfIdentifying */, \ chip::kInvalidCommandId /* end of list */, \ - /* GeneratedCommandList (index=56)*/ \ + /* GeneratedCommandList (index=59)*/ \ 0x00000000 /* AddGroupResponse */, \ 0x00000001 /* ViewGroupResponse */, \ 0x00000002 /* GetGroupMembershipResponse */, \ 0x00000003 /* RemoveGroupResponse */, \ chip::kInvalidCommandId /* end of list */, \ - /* Endpoint: 1, Cluster: Scenes (server) */\ - /* AcceptedCommandList (index=61) */ \ + /* Endpoint: 2, Cluster: Scenes (server) */\ + /* AcceptedCommandList (index=64) */ \ 0x00000000 /* AddScene */, \ 0x00000001 /* ViewScene */, \ 0x00000002 /* RemoveScene */, \ @@ -470,7 +517,7 @@ 0x00000005 /* RecallScene */, \ 0x00000006 /* GetSceneMembership */, \ chip::kInvalidCommandId /* end of list */, \ - /* GeneratedCommandList (index=69)*/ \ + /* GeneratedCommandList (index=72)*/ \ 0x00000000 /* AddSceneResponse */, \ 0x00000001 /* ViewSceneResponse */, \ 0x00000002 /* RemoveSceneResponse */, \ @@ -478,14 +525,14 @@ 0x00000004 /* StoreSceneResponse */, \ 0x00000006 /* GetSceneMembershipResponse */, \ chip::kInvalidCommandId /* end of list */, \ - /* Endpoint: 1, Cluster: On/Off (server) */\ - /* AcceptedCommandList (index=76) */ \ + /* Endpoint: 2, Cluster: On/Off (server) */\ + /* AcceptedCommandList (index=79) */ \ 0x00000000 /* Off */, \ 0x00000001 /* On */, \ 0x00000002 /* Toggle */, \ chip::kInvalidCommandId /* end of list */, \ - /* Endpoint: 1, Cluster: Level Control (server) */\ - /* AcceptedCommandList (index=80) */ \ + /* Endpoint: 2, Cluster: Level Control (server) */\ + /* AcceptedCommandList (index=83) */ \ 0x00000000 /* MoveToLevel */, \ 0x00000001 /* Move */, \ 0x00000002 /* Step */, \ @@ -500,7 +547,7 @@ // clang-format on #define ZAP_CLUSTER_MASK(mask) CLUSTER_MASK_##mask -#define GENERATED_CLUSTER_COUNT 30 +#define GENERATED_CLUSTER_COUNT 33 // clang-format off #define GENERATED_CLUSTERS { \ @@ -530,8 +577,8 @@ /* Endpoint: 0, Cluster: Descriptor (server) */ \ .clusterId = 0x0000001D, \ .attributes = ZAP_ATTRIBUTE_INDEX(0), \ - .attributeCount = 5, \ - .clusterSize = 0, \ + .attributeCount = 6, \ + .clusterSize = 4, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ .acceptedCommandList = nullptr ,\ @@ -540,7 +587,7 @@ { \ /* Endpoint: 0, Cluster: Binding (server) */ \ .clusterId = 0x0000001E, \ - .attributes = ZAP_ATTRIBUTE_INDEX(5), \ + .attributes = ZAP_ATTRIBUTE_INDEX(6), \ .attributeCount = 0, \ .clusterSize = 0, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -551,7 +598,7 @@ { \ /* Endpoint: 0, Cluster: Access Control (client) */ \ .clusterId = 0x0000001F, \ - .attributes = ZAP_ATTRIBUTE_INDEX(5), \ + .attributes = ZAP_ATTRIBUTE_INDEX(6), \ .attributeCount = 0, \ .clusterSize = 0, \ .mask = ZAP_CLUSTER_MASK(CLIENT), \ @@ -562,9 +609,9 @@ { \ /* Endpoint: 0, Cluster: Access Control (server) */ \ .clusterId = 0x0000001F, \ - .attributes = ZAP_ATTRIBUTE_INDEX(5), \ - .attributeCount = 6, \ - .clusterSize = 2, \ + .attributes = ZAP_ATTRIBUTE_INDEX(6), \ + .attributeCount = 7, \ + .clusterSize = 6, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ .acceptedCommandList = nullptr ,\ @@ -573,9 +620,9 @@ { \ /* Endpoint: 0, Cluster: Basic (server) */ \ .clusterId = 0x00000028, \ - .attributes = ZAP_ATTRIBUTE_INDEX(11), \ - .attributeCount = 21, \ - .clusterSize = 37, \ + .attributes = ZAP_ATTRIBUTE_INDEX(13), \ + .attributeCount = 22, \ + .clusterSize = 41, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ .functions = chipFuncArrayBasicServer, \ .acceptedCommandList = nullptr ,\ @@ -584,9 +631,9 @@ { \ /* Endpoint: 0, Cluster: Localization Configuration (server) */ \ .clusterId = 0x0000002B, \ - .attributes = ZAP_ATTRIBUTE_INDEX(32), \ - .attributeCount = 2, \ - .clusterSize = 2, \ + .attributes = ZAP_ATTRIBUTE_INDEX(35), \ + .attributeCount = 4, \ + .clusterSize = 42, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION) | ZAP_CLUSTER_MASK(PRE_ATTRIBUTE_CHANGED_FUNCTION), \ .functions = chipFuncArrayLocalizationConfigurationServer, \ .acceptedCommandList = nullptr ,\ @@ -595,9 +642,9 @@ { \ /* Endpoint: 0, Cluster: Time Format Localization (server) */ \ .clusterId = 0x0000002C, \ - .attributes = ZAP_ATTRIBUTE_INDEX(34), \ - .attributeCount = 4, \ - .clusterSize = 4, \ + .attributes = ZAP_ATTRIBUTE_INDEX(39), \ + .attributeCount = 5, \ + .clusterSize = 8, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION) | ZAP_CLUSTER_MASK(PRE_ATTRIBUTE_CHANGED_FUNCTION), \ .functions = chipFuncArrayTimeFormatLocalizationServer, \ .acceptedCommandList = nullptr ,\ @@ -606,7 +653,7 @@ { \ /* Endpoint: 0, Cluster: Unit Localization (server) */ \ .clusterId = 0x0000002D, \ - .attributes = ZAP_ATTRIBUTE_INDEX(38), \ + .attributes = ZAP_ATTRIBUTE_INDEX(44), \ .attributeCount = 3, \ .clusterSize = 7, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -617,7 +664,7 @@ { \ /* Endpoint: 0, Cluster: General Commissioning (server) */ \ .clusterId = 0x00000030, \ - .attributes = ZAP_ATTRIBUTE_INDEX(41), \ + .attributes = ZAP_ATTRIBUTE_INDEX(47), \ .attributeCount = 7, \ .clusterSize = 14, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -628,7 +675,7 @@ { \ /* Endpoint: 0, Cluster: Network Commissioning (server) */ \ .clusterId = 0x00000031, \ - .attributes = ZAP_ATTRIBUTE_INDEX(48), \ + .attributes = ZAP_ATTRIBUTE_INDEX(54), \ .attributeCount = 10, \ .clusterSize = 48, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -639,9 +686,9 @@ { \ /* Endpoint: 0, Cluster: Diagnostic Logs (server) */ \ .clusterId = 0x00000032, \ - .attributes = ZAP_ATTRIBUTE_INDEX(58), \ - .attributeCount = 0, \ - .clusterSize = 0, \ + .attributes = ZAP_ATTRIBUTE_INDEX(64), \ + .attributeCount = 2, \ + .clusterSize = 6, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 17 ) ,\ @@ -650,7 +697,7 @@ { \ /* Endpoint: 0, Cluster: General Diagnostics (server) */ \ .clusterId = 0x00000033, \ - .attributes = ZAP_ATTRIBUTE_INDEX(58), \ + .attributes = ZAP_ATTRIBUTE_INDEX(66), \ .attributeCount = 9, \ .clusterSize = 2, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -661,7 +708,7 @@ { \ /* Endpoint: 0, Cluster: Software Diagnostics (server) */ \ .clusterId = 0x00000034, \ - .attributes = ZAP_ATTRIBUTE_INDEX(67), \ + .attributes = ZAP_ATTRIBUTE_INDEX(75), \ .attributeCount = 6, \ .clusterSize = 6, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -672,7 +719,7 @@ { \ /* Endpoint: 0, Cluster: Ethernet Network Diagnostics (server) */ \ .clusterId = 0x00000037, \ - .attributes = ZAP_ATTRIBUTE_INDEX(73), \ + .attributes = ZAP_ATTRIBUTE_INDEX(81), \ .attributeCount = 11, \ .clusterSize = 6, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -683,9 +730,9 @@ { \ /* Endpoint: 0, Cluster: AdministratorCommissioning (server) */ \ .clusterId = 0x0000003C, \ - .attributes = ZAP_ATTRIBUTE_INDEX(84), \ - .attributeCount = 4, \ - .clusterSize = 2, \ + .attributes = ZAP_ATTRIBUTE_INDEX(92), \ + .attributeCount = 5, \ + .clusterSize = 6, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 21 ) ,\ @@ -694,9 +741,9 @@ { \ /* Endpoint: 0, Cluster: Operational Credentials (server) */ \ .clusterId = 0x0000003E, \ - .attributes = ZAP_ATTRIBUTE_INDEX(88), \ - .attributeCount = 7, \ - .clusterSize = 2, \ + .attributes = ZAP_ATTRIBUTE_INDEX(97), \ + .attributeCount = 8, \ + .clusterSize = 6, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 25 ) ,\ @@ -705,7 +752,7 @@ { \ /* Endpoint: 0, Cluster: Group Key Management (server) */ \ .clusterId = 0x0000003F, \ - .attributes = ZAP_ATTRIBUTE_INDEX(95), \ + .attributes = ZAP_ATTRIBUTE_INDEX(105), \ .attributeCount = 5, \ .clusterSize = 2, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -716,9 +763,9 @@ { \ /* Endpoint: 0, Cluster: Fixed Label (server) */ \ .clusterId = 0x00000040, \ - .attributes = ZAP_ATTRIBUTE_INDEX(100), \ - .attributeCount = 2, \ - .clusterSize = 2, \ + .attributes = ZAP_ATTRIBUTE_INDEX(110), \ + .attributeCount = 3, \ + .clusterSize = 6, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ .acceptedCommandList = nullptr ,\ @@ -727,9 +774,9 @@ { \ /* Endpoint: 0, Cluster: User Label (server) */ \ .clusterId = 0x00000041, \ - .attributes = ZAP_ATTRIBUTE_INDEX(102), \ - .attributeCount = 2, \ - .clusterSize = 2, \ + .attributes = ZAP_ATTRIBUTE_INDEX(113), \ + .attributeCount = 3, \ + .clusterSize = 6, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ .acceptedCommandList = nullptr ,\ @@ -738,62 +785,95 @@ { \ /* Endpoint: 1, Cluster: Identify (server) */ \ .clusterId = 0x00000003, \ - .attributes = ZAP_ATTRIBUTE_INDEX(104), \ + .attributes = ZAP_ATTRIBUTE_INDEX(116), \ + .attributeCount = 4, \ + .clusterSize = 9, \ + .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION) | ZAP_CLUSTER_MASK(ATTRIBUTE_CHANGED_FUNCTION), \ + .functions = chipFuncArrayIdentifyServer, \ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 47 ) ,\ + .generatedCommandList = nullptr ,\ + },\ + { \ + /* Endpoint: 1, Cluster: Descriptor (server) */ \ + .clusterId = 0x0000001D, \ + .attributes = ZAP_ATTRIBUTE_INDEX(120), \ + .attributeCount = 6, \ + .clusterSize = 6, \ + .mask = ZAP_CLUSTER_MASK(SERVER), \ + .functions = NULL, \ + .acceptedCommandList = nullptr ,\ + .generatedCommandList = nullptr ,\ + },\ + { \ + /* Endpoint: 1, Cluster: Binding (client) */ \ + .clusterId = 0x0000001E, \ + .attributes = ZAP_ATTRIBUTE_INDEX(126), \ + .attributeCount = 0, \ + .clusterSize = 0, \ + .mask = ZAP_CLUSTER_MASK(CLIENT), \ + .functions = NULL, \ + .acceptedCommandList = nullptr ,\ + .generatedCommandList = nullptr ,\ + },\ + { \ + /* Endpoint: 2, Cluster: Identify (server) */ \ + .clusterId = 0x00000003, \ + .attributes = ZAP_ATTRIBUTE_INDEX(126), \ .attributeCount = 2, \ .clusterSize = 4, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION) | ZAP_CLUSTER_MASK(ATTRIBUTE_CHANGED_FUNCTION), \ .functions = chipFuncArrayIdentifyServer, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 47 ) ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 50 ) ,\ .generatedCommandList = nullptr ,\ },\ { \ - /* Endpoint: 1, Cluster: Groups (server) */ \ + /* Endpoint: 2, Cluster: Groups (server) */ \ .clusterId = 0x00000004, \ - .attributes = ZAP_ATTRIBUTE_INDEX(106), \ + .attributes = ZAP_ATTRIBUTE_INDEX(128), \ .attributeCount = 2, \ .clusterSize = 3, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ .functions = chipFuncArrayGroupsServer, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 49 ) ,\ - .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 56 ) ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 52 ) ,\ + .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 59 ) ,\ },\ { \ - /* Endpoint: 1, Cluster: Scenes (server) */ \ + /* Endpoint: 2, Cluster: Scenes (server) */ \ .clusterId = 0x00000005, \ - .attributes = ZAP_ATTRIBUTE_INDEX(108), \ + .attributes = ZAP_ATTRIBUTE_INDEX(130), \ .attributeCount = 6, \ .clusterSize = 8, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ .functions = chipFuncArrayScenesServer, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 61 ) ,\ - .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 69 ) ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 64 ) ,\ + .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 72 ) ,\ },\ { \ - /* Endpoint: 1, Cluster: On/Off (server) */ \ + /* Endpoint: 2, Cluster: On/Off (server) */ \ .clusterId = 0x00000006, \ - .attributes = ZAP_ATTRIBUTE_INDEX(114), \ + .attributes = ZAP_ATTRIBUTE_INDEX(136), \ .attributeCount = 2, \ .clusterSize = 3, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ .functions = chipFuncArrayOnOffServer, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 76 ) ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 79 ) ,\ .generatedCommandList = nullptr ,\ },\ { \ - /* Endpoint: 1, Cluster: Level Control (server) */ \ + /* Endpoint: 2, Cluster: Level Control (server) */ \ .clusterId = 0x00000008, \ - .attributes = ZAP_ATTRIBUTE_INDEX(116), \ + .attributes = ZAP_ATTRIBUTE_INDEX(138), \ .attributeCount = 16, \ .clusterSize = 27, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ .functions = chipFuncArrayLevelControlServer, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 80 ) ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 83 ) ,\ .generatedCommandList = nullptr ,\ },\ { \ - /* Endpoint: 1, Cluster: Descriptor (server) */ \ + /* Endpoint: 2, Cluster: Descriptor (server) */ \ .clusterId = 0x0000001D, \ - .attributes = ZAP_ATTRIBUTE_INDEX(132), \ + .attributes = ZAP_ATTRIBUTE_INDEX(154), \ .attributeCount = 5, \ .clusterSize = 0, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -802,9 +882,9 @@ .generatedCommandList = nullptr ,\ },\ { \ - /* Endpoint: 1, Cluster: Binding (client) */ \ + /* Endpoint: 2, Cluster: Binding (client) */ \ .clusterId = 0x0000001E, \ - .attributes = ZAP_ATTRIBUTE_INDEX(137), \ + .attributes = ZAP_ATTRIBUTE_INDEX(159), \ .attributeCount = 0, \ .clusterSize = 0, \ .mask = ZAP_CLUSTER_MASK(CLIENT), \ @@ -813,9 +893,9 @@ .generatedCommandList = nullptr ,\ },\ { \ - /* Endpoint: 1, Cluster: Switch (server) */ \ + /* Endpoint: 2, Cluster: Switch (server) */ \ .clusterId = 0x0000003B, \ - .attributes = ZAP_ATTRIBUTE_INDEX(137), \ + .attributes = ZAP_ATTRIBUTE_INDEX(159), \ .attributeCount = 5, \ .clusterSize = 9, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -824,9 +904,9 @@ .generatedCommandList = nullptr ,\ },\ { \ - /* Endpoint: 1, Cluster: Fixed Label (server) */ \ + /* Endpoint: 2, Cluster: Fixed Label (server) */ \ .clusterId = 0x00000040, \ - .attributes = ZAP_ATTRIBUTE_INDEX(142), \ + .attributes = ZAP_ATTRIBUTE_INDEX(164), \ .attributeCount = 2, \ .clusterSize = 2, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -840,12 +920,12 @@ #define ZAP_CLUSTER_INDEX(index) (&generatedClusters[index]) -#define ZAP_FIXED_ENDPOINT_DATA_VERSION_COUNT 28 +#define ZAP_FIXED_ENDPOINT_DATA_VERSION_COUNT 30 // This is an array of EmberAfEndpointType structures. #define GENERATED_ENDPOINT_TYPES \ { \ - { ZAP_CLUSTER_INDEX(0), 21, 138 }, { ZAP_CLUSTER_INDEX(21), 9, 56 }, \ + { ZAP_CLUSTER_INDEX(0), 21, 216 }, { ZAP_CLUSTER_INDEX(21), 3, 15 }, { ZAP_CLUSTER_INDEX(24), 9, 56 }, \ } // Largest attribute size is needed for various buffers @@ -857,50 +937,53 @@ static_assert(ATTRIBUTE_LARGEST <= CHIP_CONFIG_MAX_ATTRIBUTE_STORE_ELEMENT_SIZE, #define ATTRIBUTE_SINGLETONS_SIZE (37) // Total size of attribute storage -#define ATTRIBUTE_MAX_SIZE (194) +#define ATTRIBUTE_MAX_SIZE (287) // Number of fixed endpoints -#define FIXED_ENDPOINT_COUNT (2) +#define FIXED_ENDPOINT_COUNT (3) // Array of endpoints that are supported, the data inside // the array is the endpoint number. #define FIXED_ENDPOINT_ARRAY \ { \ - 0x0000, 0x0001 \ + 0x0000, 0x0001, 0x0002 \ } // Array of profile ids #define FIXED_PROFILE_IDS \ { \ - 0x0103, 0x0103 \ + 0x0103, 0x0103, 0x0103 \ } // Array of device types #define FIXED_DEVICE_TYPES \ { \ - { 0x000E, 1 }, { 0x0101, 1 } \ + { 0x0016, 1 }, { 0x000E, 1 }, \ + { \ + 0x0101, 1 \ + } \ } // Array of device type offsets #define FIXED_DEVICE_TYPE_OFFSETS \ { \ - 0, 1 \ + 0, 1, 2 \ } // Array of device type lengths #define FIXED_DEVICE_TYPE_LENGTHS \ { \ - 1, 1 \ + 1, 1, 1 \ } // Array of endpoint types supported on each endpoint #define FIXED_ENDPOINT_TYPES \ { \ - 0, 1 \ + 0, 1, 2 \ } // Array of networks supported on each endpoint #define FIXED_NETWORKS \ { \ - 0, 0 \ + 0, 0, 0 \ } diff --git a/zzz_generated/unify-matter-bridge/zap-generated/gen_config.h b/zzz_generated/unify-matter-bridge/zap-generated/gen_config.h index f98196cb04a938..d365a915705135 100644 --- a/zzz_generated/unify-matter-bridge/zap-generated/gen_config.h +++ b/zzz_generated/unify-matter-bridge/zap-generated/gen_config.h @@ -29,13 +29,13 @@ #define EMBER_APS_UNICAST_MESSAGE_COUNT 10 /**** Cluster endpoint counts ****/ -#define EMBER_AF_IDENTIFY_CLUSTER_SERVER_ENDPOINT_COUNT (2) +#define EMBER_AF_IDENTIFY_CLUSTER_SERVER_ENDPOINT_COUNT (3) #define EMBER_AF_GROUPS_CLUSTER_SERVER_ENDPOINT_COUNT (2) #define EMBER_AF_SCENES_CLUSTER_SERVER_ENDPOINT_COUNT (1) #define EMBER_AF_ON_OFF_CLUSTER_SERVER_ENDPOINT_COUNT (1) #define EMBER_AF_LEVEL_CONTROL_CLUSTER_SERVER_ENDPOINT_COUNT (1) -#define EMBER_AF_DESCRIPTOR_CLUSTER_SERVER_ENDPOINT_COUNT (2) -#define EMBER_AF_BINDING_CLUSTER_CLIENT_ENDPOINT_COUNT (1) +#define EMBER_AF_DESCRIPTOR_CLUSTER_SERVER_ENDPOINT_COUNT (3) +#define EMBER_AF_BINDING_CLUSTER_CLIENT_ENDPOINT_COUNT (2) #define EMBER_AF_BINDING_CLUSTER_SERVER_ENDPOINT_COUNT (1) #define EMBER_AF_ACCESS_CONTROL_CLUSTER_CLIENT_ENDPOINT_COUNT (1) #define EMBER_AF_ACCESS_CONTROL_CLUSTER_SERVER_ENDPOINT_COUNT (1)