From b305ffe5eba6e4246fd2bc71baec048b4d621bbc Mon Sep 17 00:00:00 2001 From: Milind Dumbare Date: Thu, 19 Jan 2023 12:07:30 +0000 Subject: [PATCH] Pull request #483: Cli command to publish Unify Matter Bridge QR Code on MQTT Merge in WMN_TOOLS/matter from cli_qr to silabs Squashed commit of the following: commit c2ad672b85c3f7e00c4f0b5ba09e3529eee1aabe Author: Milind Dumbare Date: Tue Jan 10 09:01:19 2023 +0100 Correct the Attribute reading for endpoint 1 and 0 commit 7ef48ec0040712ea4a67450530fb793858279b4f Author: Milind Dumbare Date: Mon Jan 9 13:52:49 2023 +0100 Cli command to publish Unify Matter Bridge QR Code on MQTT --- .../linux/src/matter_bridge_cli.cpp | 13 + .../linux/src/matter_bridge_cli.hpp | 2 + .../linux/src/matter_bridge_main.cpp | 1 + .../src/matter_bridge_qrcode_publisher.cpp | 9 +- .../attribute_translator.cpp | 16086 +++++----- .../attribute_translator.hpp | 888 +- .../attribute_type_size.cpp | 2924 +- .../attribute_type_size.hpp | 6 +- .../chip_types_from_json.hpp | 1627 +- .../chip_types_to_json.hpp | 1245 +- .../cluster_revision_table.hpp | 301 +- .../command_translator.cpp | 4147 +-- .../command_translator.hpp | 1034 +- .../device-type-mapper/matter_id_model.inc | 4930 +-- .../data_model_translator/unify_accessors.cpp | 26026 ++++++++-------- .../data_model_translator/unify_accessors.hpp | 9567 +++--- .../zcl_global_types.hpp | 163 + .../zap-generated/CHIPClientCallbacks.h | 34 +- .../zap-generated/CHIPClusters.h | 30 +- .../zap-generated/IMClusterCommandHandler.cpp | 1062 +- .../zap-generated/endpoint_config.h | 595 +- .../zap-generated/gen_config.h | 23 + .../attribute_translator.cpp.zapt | 7 + .../unify-matter-bridge.matter | 2 +- .../unify-matter-bridge.zap | 4 +- 25 files changed, 36623 insertions(+), 34103 deletions(-) diff --git a/silabs_examples/unify-matter-bridge/linux/src/matter_bridge_cli.cpp b/silabs_examples/unify-matter-bridge/linux/src/matter_bridge_cli.cpp index 14ccad076683f8..ce5aa9286c89dd 100644 --- a/silabs_examples/unify-matter-bridge/linux/src/matter_bridge_cli.cpp +++ b/silabs_examples/unify-matter-bridge/linux/src/matter_bridge_cli.cpp @@ -19,12 +19,14 @@ #include "app/server/Server.h" #include "group_command_translator.hpp" #include "matter_node_state_monitor.hpp" +#include "matter_bridge_qrcode_publisher.hpp" #include using namespace chip; using namespace unify::matter_bridge; static matter_node_state_monitor * node_state_monitor = NULL; static group_translator * group_mapping_instance = NULL; +static QRCodePublisher * qr_code_publisher = NULL; #define LOG_TAG "matter_bridge_cli" @@ -43,12 +45,22 @@ static sl_status_t close_commission_cli_func(const handle_args_t & arg) return SL_STATUS_OK; } +void set_qr_code_publisher(QRCodePublisher & p) +{ + qr_code_publisher = &p; +} void set_mapping_display_instance(matter_node_state_monitor & n, group_translator & m) { node_state_monitor = &n; group_mapping_instance = &m; } +static sl_status_t qr_code_publish_cli_func(const handle_args_t & arg) +{ + qr_code_publisher->publish(); + return SL_STATUS_OK; +} + static sl_status_t epmap_cli_func(const handle_args_t & arg) { sl_log_debug(LOG_TAG, "epmap_cli_func"); @@ -73,6 +85,7 @@ command_map_t unify_cli_commands = { { "commission", { "Open commissioning window", commission_cli_func } }, { "closecommission", { "Close the commissioning window", close_commission_cli_func } }, { "epmap", { "Show endpoint map", epmap_cli_func } }, + { "qr_code_publish", { "Publish Unify Matter Bridge QR code", qr_code_publish_cli_func} }, { "groups_map", { "Show Matter vs Unify groups map", groups_map_cli_func } }, }; diff --git a/silabs_examples/unify-matter-bridge/linux/src/matter_bridge_cli.hpp b/silabs_examples/unify-matter-bridge/linux/src/matter_bridge_cli.hpp index ccb8d43bbf2eaf..fbb84447541021 100644 --- a/silabs_examples/unify-matter-bridge/linux/src/matter_bridge_cli.hpp +++ b/silabs_examples/unify-matter-bridge/linux/src/matter_bridge_cli.hpp @@ -15,6 +15,7 @@ #include "matter.h" #include "matter_node_state_monitor.hpp" #include "sl_status.h" +#include "matter_bridge_qrcode_publisher.hpp" using namespace unify::matter_bridge; /** @@ -30,3 +31,4 @@ sl_status_t matter_bridge_cli_init(); * --> The group_translator instance is for group mapping display */ void set_mapping_display_instance(matter_node_state_monitor & n, group_translator & m); +void set_qr_code_publisher(QRCodePublisher & p); diff --git a/silabs_examples/unify-matter-bridge/linux/src/matter_bridge_main.cpp b/silabs_examples/unify-matter-bridge/linux/src/matter_bridge_main.cpp index 7b9374cdbdd295..5a7d7c5bfecb83 100644 --- a/silabs_examples/unify-matter-bridge/linux/src/matter_bridge_main.cpp +++ b/silabs_examples/unify-matter-bridge/linux/src/matter_bridge_main.cpp @@ -170,6 +170,7 @@ int main(int argc, char * argv[]) TemperatureMeasurementAttributeAccess temperature_measurement_attribute_access(node_state_monitor, unify_mqtt_handler); QRCodePublisher qr_code_publisher(unify_mqtt_handler); + set_qr_code_publisher(qr_code_publisher); matter_running = true; auto handle = run_unify(); diff --git a/silabs_examples/unify-matter-bridge/linux/src/matter_bridge_qrcode_publisher.cpp b/silabs_examples/unify-matter-bridge/linux/src/matter_bridge_qrcode_publisher.cpp index 2b49806d31ab21..4eefcc7ead8c04 100644 --- a/silabs_examples/unify-matter-bridge/linux/src/matter_bridge_qrcode_publisher.cpp +++ b/silabs_examples/unify-matter-bridge/linux/src/matter_bridge_qrcode_publisher.cpp @@ -19,6 +19,10 @@ #include "app/server/OnboardingCodesUtil.h" #include "setup_payload/QRCodeSetupPayloadGenerator.h" #include "Options.h" +#include "sl_log.h" + +constexpr const char * LOG_TAG = "unify_matter_bridge_qr_code_publisher"; + namespace unify::matter_bridge { @@ -28,6 +32,7 @@ QRCodePublisher::QRCodePublisher(UnifyMqtt& unify_mqtt ) : m_unify_mqtt(unify_mq void QRCodePublisher::device_event(const chip::DeviceLayer::ChipDeviceEvent * event, intptr_t ptr) { + sl_log_debug(LOG_TAG, "device_event:%u", (unsigned int)event->Type); switch(event->Type) { case chip::DeviceLayer::DeviceEventType::kDnssdPlatformInitialized: if(chip::Server::GetInstance().GetCommissioningWindowManager().IsCommissioningWindowOpen()) { @@ -45,6 +50,7 @@ void QRCodePublisher::device_event(const chip::DeviceLayer::ChipDeviceEvent * ev } void QRCodePublisher::publish() { + sl_log_debug(LOG_TAG, "Publishing QR Code"); auto qrCode_str = qrcode(); if(!qrCode_str.empty()) { m_unify_mqtt.Publish( @@ -56,6 +62,7 @@ void QRCodePublisher::publish() { } void QRCodePublisher::unretain() { + sl_log_debug(LOG_TAG, "Unretaining QR Code"); auto qrCode_str = qrcode(); if(!qrCode_str.empty()) { m_unify_mqtt.Publish("ucl/SmartStart/CommissionableDevice/"+qrCode_str,"",false); @@ -72,4 +79,4 @@ std::string QRCodePublisher::qrcode() { return ""; } } -} \ No newline at end of file +} diff --git a/silabs_examples/unify-matter-bridge/linux/zap-generated/data_model_translator/attribute_translator.cpp b/silabs_examples/unify-matter-bridge/linux/zap-generated/data_model_translator/attribute_translator.cpp index 9786179caf3a51..9160d906bf8e21 100644 --- a/silabs_examples/unify-matter-bridge/linux/zap-generated/data_model_translator/attribute_translator.cpp +++ b/silabs_examples/unify-matter-bridge/linux/zap-generated/data_model_translator/attribute_translator.cpp @@ -13,20 +13,20 @@ #define CHIP_USE_ENUM_CLASS_FOR_IM_ENUM -#include "matter.h" #include -#include #include +#include #include +#include "matter.h" +#include #include "attribute_translator.hpp" -#include "cluster_emulator.hpp" #include "matter_device_translator.hpp" -#include +#include "cluster_emulator.hpp" -#include "app-common/zap-generated/attributes/Accessors.h" -#include "sl_log.h" #include "uic_mqtt.h" +#include "sl_log.h" +#include "app-common/zap-generated/attributes/Accessors.h" #define LOG_TAG "attribute_translator" using namespace chip; @@ -34,8694 +34,9888 @@ using namespace chip::app; using namespace chip::app::Clusters; using namespace unify::matter_bridge; -#include "chip_types_from_json.hpp" #include "chip_types_to_json.hpp" +#include "chip_types_from_json.hpp" #include "unify_accessors.hpp" CHIP_ERROR -IdentifyAttributeAccess::Read(const ConcreteReadAttributePath& aPath, AttributeValueEncoder& aEncoder) +IdentifyAttributeAccess::Read(const ConcreteReadAttributePath &aPath, + AttributeValueEncoder &aEncoder) { - namespace MN = chip::app::Clusters::Identify::Attributes; - namespace UN = unify::matter_bridge::Identify::Attributes; - if (aPath.mClusterId != Clusters::Identify::Id) { - return CHIP_ERROR_INVALID_ARGUMENT; - } - - ConcreteAttributePath atr_path = ConcreteAttributePath(aPath.mEndpointId, aPath.mClusterId, aPath.mAttributeId); - - if (m_node_state_monitor.emulator().is_attribute_emulated(aPath)) { - return m_node_state_monitor.emulator().read_attribute(aPath, aEncoder); - } - - try { - switch (aPath.mAttributeId) { - case MN::IdentifyTime::Id: { // type is int16u - MN::IdentifyTime::TypeInfo::Type value; - UN::IdentifyTime::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::IdentifyType::Id: { // type is enum8 - MN::IdentifyType::TypeInfo::Type value; - UN::IdentifyType::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::FeatureMap::Id: { // type is bitmap32 - MN::FeatureMap::TypeInfo::Type value; - UN::FeatureMap::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::ClusterRevision::Id: { // type is int16u - MN::ClusterRevision::TypeInfo::Type value; - UN::ClusterRevision::Get(atr_path, value); - return aEncoder.Encode(value); - } - } - } catch (const std::out_of_range& e) { - sl_log_info(LOG_TAG, - "The request attribute Path for endpoint [%i] is not found in the attribute state " - "container: %s\n", - atr_path.mEndpointId, e.what()); - return CHIP_ERROR_NO_MESSAGE_HANDLER; - } + namespace MN = chip::app::Clusters::Identify::Attributes; + namespace UN = unify::matter_bridge::Identify::Attributes; + if (aPath.mClusterId != Clusters::Identify::Id) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + // Do not handle Read for non-unify endpoints + auto unify_node = m_node_state_monitor.bridged_endpoint(aPath.mEndpointId); + + if (!unify_node) { return CHIP_NO_ERROR; -} - -CHIP_ERROR IdentifyAttributeAccess::Write(const ConcreteDataAttributePath& aPath, AttributeValueDecoder& aDecoder) -{ - using namespace chip::app::Clusters::Identify; - - if (aPath.mClusterId != Clusters::Identify::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; - if (m_node_state_monitor.emulator().is_attribute_emulated(aPath)) { - return m_node_state_monitor.emulator().write_attribute(aPath, aDecoder); - } + ConcreteAttributePath atr_path = ConcreteAttributePath(aPath.mEndpointId, + aPath.mClusterId, + aPath.mAttributeId); + + if( m_node_state_monitor.emulator().is_attribute_emulated(aPath) ) { + return m_node_state_monitor.emulator().read_attribute(aPath,aEncoder); + } + + try { switch (aPath.mAttributeId) { - case Attributes::IdentifyTime::Id: { + case MN::IdentifyTime::Id: { // type is int16u + MN::IdentifyTime::TypeInfo::Type value; + UN::IdentifyTime::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::IdentifyType::Id: { // type is enum8 + MN::IdentifyType::TypeInfo::Type value; + UN::IdentifyType::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::FeatureMap::Id: { // type is bitmap32 + MN::FeatureMap::TypeInfo::Type value; + UN::FeatureMap::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::ClusterRevision::Id: { // type is int16u + MN::ClusterRevision::TypeInfo::Type value; + UN::ClusterRevision::Get(atr_path, value); + return aEncoder.Encode(value); + } + } + } catch (const std::out_of_range &e) { + sl_log_info( + LOG_TAG, + "The request attribute Path for endpoint [%i] is not found in the attribute state " + "container: %s\n", atr_path.mEndpointId, e.what()); + return CHIP_ERROR_NO_MESSAGE_HANDLER; + } + return CHIP_NO_ERROR; +} - Attributes::IdentifyTime::TypeInfo::DecodableType value; - aDecoder.Decode(value); - jsn["value"] = to_json(value); - attribute_name = "IdentifyTime"; - break; - } - // identify type is not supported by UCL - // GeneratedCommandList is not supported by UCL - // AcceptedCommandList is not supported by UCL - // AttributeList is not supported by UCL - // FeatureMap is not supported by UCL - // ClusterRevision is not supported by UCL - } +CHIP_ERROR IdentifyAttributeAccess::Write(const ConcreteDataAttributePath &aPath, + AttributeValueDecoder &aDecoder) +{ + using namespace chip::app::Clusters::Identify; - 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) + "/Identify/Attributes/" + attribute_name + "/Desired"; - payload_str = jsn.dump(); - m_unify_mqtt.Publish(topic, payload_str, true); - return CHIP_NO_ERROR; - } + if (aPath.mClusterId != Clusters::Identify::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; + + if( m_node_state_monitor.emulator().is_attribute_emulated(aPath) ) { + return m_node_state_monitor.emulator().write_attribute(aPath,aDecoder); + } + + switch (aPath.mAttributeId) { + case Attributes::IdentifyTime::Id: { + + Attributes::IdentifyTime::TypeInfo::DecodableType value; + aDecoder.Decode(value); + jsn["value"] = to_json(value); + attribute_name = "IdentifyTime"; + break; + } + // identify type is not supported by UCL + // GeneratedCommandList is not supported by UCL + // AcceptedCommandList is not supported by UCL + // AttributeList is not supported by UCL + // FeatureMap is not supported by UCL + // ClusterRevision is not supported by UCL + } + + 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) + + "/Identify/Attributes/" + attribute_name + "/Desired"; + payload_str = jsn.dump(); + m_unify_mqtt.Publish(topic, + payload_str, + true); + return CHIP_NO_ERROR; + } + + return CHIP_ERROR_NO_MESSAGE_HANDLER; } -void IdentifyAttributeAccess::reported_updated(const bridged_endpoint* ep, const std::string& cluster, - const std::string& attribute, const nlohmann::json& unify_value) +void IdentifyAttributeAccess::reported_updated(const bridged_endpoint *ep, + const std::string &cluster, + const std::string &attribute, + const nlohmann::json &unify_value) { - namespace MN = chip::app::Clusters::Identify::Attributes; - namespace UN = unify::matter_bridge::Identify::Attributes; + namespace MN = chip::app::Clusters::Identify::Attributes; + namespace UN = unify::matter_bridge::Identify::Attributes; - auto cluster_id = device_translator::instance().get_cluster_id(cluster); + auto cluster_id = device_translator::instance().get_cluster_id(cluster); - if (!cluster_id.has_value() || (cluster_id.value() != Clusters::Identify::Id)) { - return; - } + if (!cluster_id.has_value() || (cluster_id.value() != Clusters::Identify::Id)) { + return; + } - // get attribute id - auto attribute_id = device_translator::instance().get_attribute_id(cluster, attribute); + // get attribute id + auto attribute_id + = device_translator::instance().get_attribute_id(cluster, attribute); - if (!attribute_id.has_value()) { - return; - } + if (!attribute_id.has_value()) { + return; + } - chip::EndpointId node_matter_endpoint = ep->matter_endpoint; - ConcreteAttributePath attrpath = ConcreteAttributePath(node_matter_endpoint, Clusters::Identify::Id, attribute_id.value()); - switch (attribute_id.value()) { + 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 case MN::IdentifyTime::Id: { - using T = MN::IdentifyTime::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) { - sl_log_debug(LOG_TAG, "IdentifyTime attribute value is %s", unify_value.dump().c_str()); - UN::IdentifyTime::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::Identify::Id, MN::IdentifyTime::Id); - } - break; - } - } + using T = MN::IdentifyTime::TypeInfo::Type; + std::optional value = from_json(unify_value); + + if( value.has_value()) { + sl_log_debug(LOG_TAG,"IdentifyTime attribute value is %s",unify_value.dump().c_str()); + UN::IdentifyTime::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback( + node_matter_endpoint, + Clusters::Identify::Id, + MN::IdentifyTime::Id); + } + break; + } + } } CHIP_ERROR -GroupsAttributeAccess::Read(const ConcreteReadAttributePath& aPath, AttributeValueEncoder& aEncoder) +GroupsAttributeAccess::Read(const ConcreteReadAttributePath &aPath, + AttributeValueEncoder &aEncoder) { - namespace MN = chip::app::Clusters::Groups::Attributes; - namespace UN = unify::matter_bridge::Groups::Attributes; - if (aPath.mClusterId != Clusters::Groups::Id) { - return CHIP_ERROR_INVALID_ARGUMENT; - } + namespace MN = chip::app::Clusters::Groups::Attributes; + namespace UN = unify::matter_bridge::Groups::Attributes; + if (aPath.mClusterId != Clusters::Groups::Id) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + // Do not handle Read for non-unify endpoints + auto unify_node = m_node_state_monitor.bridged_endpoint(aPath.mEndpointId); + + if (!unify_node) { + return CHIP_NO_ERROR; + } - ConcreteAttributePath atr_path = ConcreteAttributePath(aPath.mEndpointId, aPath.mClusterId, aPath.mAttributeId); - if (m_node_state_monitor.emulator().is_attribute_emulated(aPath)) { - return m_node_state_monitor.emulator().read_attribute(aPath, aEncoder); - } + ConcreteAttributePath atr_path = ConcreteAttributePath(aPath.mEndpointId, + aPath.mClusterId, + aPath.mAttributeId); - try { - switch (aPath.mAttributeId) { - case MN::NameSupport::Id: { // type is bitmap8 - MN::NameSupport::TypeInfo::Type value; - UN::NameSupport::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::FeatureMap::Id: { // type is bitmap32 - MN::FeatureMap::TypeInfo::Type value; - UN::FeatureMap::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::ClusterRevision::Id: { // type is int16u - MN::ClusterRevision::TypeInfo::Type value; - UN::ClusterRevision::Get(atr_path, value); - return aEncoder.Encode(value); - } - } - } catch (const std::out_of_range& e) { - sl_log_info(LOG_TAG, - "The request attribute Path for endpoint [%i] is not found in the attribute state " - "container: %s\n", - atr_path.mEndpointId, e.what()); - return CHIP_ERROR_NO_MESSAGE_HANDLER; - } - return CHIP_NO_ERROR; + + if( m_node_state_monitor.emulator().is_attribute_emulated(aPath) ) { + return m_node_state_monitor.emulator().read_attribute(aPath,aEncoder); + } + + try { + switch (aPath.mAttributeId) { + case MN::NameSupport::Id: { // type is bitmap8 + MN::NameSupport::TypeInfo::Type value; + UN::NameSupport::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::FeatureMap::Id: { // type is bitmap32 + MN::FeatureMap::TypeInfo::Type value; + UN::FeatureMap::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::ClusterRevision::Id: { // type is int16u + MN::ClusterRevision::TypeInfo::Type value; + UN::ClusterRevision::Get(atr_path, value); + return aEncoder.Encode(value); + } + } + } catch (const std::out_of_range &e) { + sl_log_info( + LOG_TAG, + "The request attribute Path for endpoint [%i] is not found in the attribute state " + "container: %s\n", atr_path.mEndpointId, e.what()); + return CHIP_ERROR_NO_MESSAGE_HANDLER; + } + return CHIP_NO_ERROR; } -CHIP_ERROR GroupsAttributeAccess::Write(const ConcreteDataAttributePath& aPath, AttributeValueDecoder& aDecoder) +CHIP_ERROR GroupsAttributeAccess::Write(const ConcreteDataAttributePath &aPath, + AttributeValueDecoder &aDecoder) { - using namespace chip::app::Clusters::Groups; - - if (aPath.mClusterId != Clusters::Groups::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; - - if (m_node_state_monitor.emulator().is_attribute_emulated(aPath)) { - return m_node_state_monitor.emulator().write_attribute(aPath, aDecoder); - } - - switch (aPath.mAttributeId) { - // NameSupport is not supported by UCL - // GeneratedCommandList is not supported by UCL - // AcceptedCommandList is not supported by UCL - // AttributeList is not supported by UCL - // FeatureMap is not supported by UCL - // ClusterRevision is not supported by UCL - } + using namespace chip::app::Clusters::Groups; - 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) + "/Groups/Attributes/" + attribute_name + "/Desired"; - payload_str = jsn.dump(); - m_unify_mqtt.Publish(topic, payload_str, true); - return CHIP_NO_ERROR; - } + if (aPath.mClusterId != Clusters::Groups::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; + + if( m_node_state_monitor.emulator().is_attribute_emulated(aPath) ) { + return m_node_state_monitor.emulator().write_attribute(aPath,aDecoder); + } + + switch (aPath.mAttributeId) { + // NameSupport is not supported by UCL + // GeneratedCommandList is not supported by UCL + // AcceptedCommandList is not supported by UCL + // AttributeList is not supported by UCL + // FeatureMap is not supported by UCL + // ClusterRevision is not supported by UCL + } + + 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) + + "/Groups/Attributes/" + attribute_name + "/Desired"; + payload_str = jsn.dump(); + m_unify_mqtt.Publish(topic, + payload_str, + true); + return CHIP_NO_ERROR; + } + + return CHIP_ERROR_NO_MESSAGE_HANDLER; } -void GroupsAttributeAccess::reported_updated(const bridged_endpoint* ep, const std::string& cluster, - const std::string& attribute, const nlohmann::json& unify_value) +void GroupsAttributeAccess::reported_updated(const bridged_endpoint *ep, + const std::string &cluster, + const std::string &attribute, + const nlohmann::json &unify_value) { - namespace MN = chip::app::Clusters::Groups::Attributes; - namespace UN = unify::matter_bridge::Groups::Attributes; + namespace MN = chip::app::Clusters::Groups::Attributes; + namespace UN = unify::matter_bridge::Groups::Attributes; - auto cluster_id = device_translator::instance().get_cluster_id(cluster); + auto cluster_id = device_translator::instance().get_cluster_id(cluster); - if (!cluster_id.has_value() || (cluster_id.value() != Clusters::Groups::Id)) { - return; - } + if (!cluster_id.has_value() || (cluster_id.value() != Clusters::Groups::Id)) { + return; + } - // get attribute id - auto attribute_id = device_translator::instance().get_attribute_id(cluster, attribute); + // get attribute id + auto attribute_id + = device_translator::instance().get_attribute_id(cluster, attribute); - if (!attribute_id.has_value()) { - return; - } + if (!attribute_id.has_value()) { + return; + } - chip::EndpointId node_matter_endpoint = ep->matter_endpoint; - ConcreteAttributePath attrpath = ConcreteAttributePath(node_matter_endpoint, Clusters::Groups::Id, attribute_id.value()); - switch (attribute_id.value()) { + chip::EndpointId node_matter_endpoint = ep->matter_endpoint; + ConcreteAttributePath attrpath = ConcreteAttributePath(node_matter_endpoint, + Clusters::Groups::Id, + attribute_id.value()); + switch (attribute_id.value()) { // type is bitmap8 case MN::NameSupport::Id: { - using T = MN::NameSupport::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) { - sl_log_debug(LOG_TAG, "NameSupport attribute value is %s", unify_value.dump().c_str()); - UN::NameSupport::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::Groups::Id, MN::NameSupport::Id); - } - break; - } - } + using T = MN::NameSupport::TypeInfo::Type; + std::optional value = from_json(unify_value); + + if( value.has_value()) { + sl_log_debug(LOG_TAG,"NameSupport attribute value is %s",unify_value.dump().c_str()); + UN::NameSupport::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback( + node_matter_endpoint, + Clusters::Groups::Id, + MN::NameSupport::Id); + } + break; + } + } } CHIP_ERROR -ScenesAttributeAccess::Read(const ConcreteReadAttributePath& aPath, AttributeValueEncoder& aEncoder) +ScenesAttributeAccess::Read(const ConcreteReadAttributePath &aPath, + AttributeValueEncoder &aEncoder) { - namespace MN = chip::app::Clusters::Scenes::Attributes; - namespace UN = unify::matter_bridge::Scenes::Attributes; - if (aPath.mClusterId != Clusters::Scenes::Id) { - return CHIP_ERROR_INVALID_ARGUMENT; - } + namespace MN = chip::app::Clusters::Scenes::Attributes; + namespace UN = unify::matter_bridge::Scenes::Attributes; + if (aPath.mClusterId != Clusters::Scenes::Id) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + // Do not handle Read for non-unify endpoints + auto unify_node = m_node_state_monitor.bridged_endpoint(aPath.mEndpointId); + + if (!unify_node) { + return CHIP_NO_ERROR; + } - ConcreteAttributePath atr_path = ConcreteAttributePath(aPath.mEndpointId, aPath.mClusterId, aPath.mAttributeId); - if (m_node_state_monitor.emulator().is_attribute_emulated(aPath)) { - return m_node_state_monitor.emulator().read_attribute(aPath, aEncoder); - } + ConcreteAttributePath atr_path = 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(atr_path, value); - return aEncoder.Encode(value); - } - case MN::CurrentScene::Id: { // type is int8u - MN::CurrentScene::TypeInfo::Type value; - UN::CurrentScene::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::CurrentGroup::Id: { // type is group_id - MN::CurrentGroup::TypeInfo::Type value; - UN::CurrentGroup::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::SceneValid::Id: { // type is boolean - MN::SceneValid::TypeInfo::Type value; - UN::SceneValid::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::NameSupport::Id: { // type is bitmap8 - MN::NameSupport::TypeInfo::Type value; - UN::NameSupport::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::LastConfiguredBy::Id: { // type is node_id - MN::LastConfiguredBy::TypeInfo::Type value; - UN::LastConfiguredBy::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::FeatureMap::Id: { // type is bitmap32 - MN::FeatureMap::TypeInfo::Type value; - UN::FeatureMap::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::ClusterRevision::Id: { // type is int16u - MN::ClusterRevision::TypeInfo::Type value; - UN::ClusterRevision::Get(atr_path, value); - return aEncoder.Encode(value); - } - } - } catch (const std::out_of_range& e) { - sl_log_info(LOG_TAG, - "The request attribute Path for endpoint [%i] is not found in the attribute state " - "container: %s\n", - atr_path.mEndpointId, e.what()); - return CHIP_ERROR_NO_MESSAGE_HANDLER; - } - return CHIP_NO_ERROR; + + if( m_node_state_monitor.emulator().is_attribute_emulated(aPath) ) { + return m_node_state_monitor.emulator().read_attribute(aPath,aEncoder); + } + + try { + switch (aPath.mAttributeId) { + case MN::SceneCount::Id: { // type is int8u + MN::SceneCount::TypeInfo::Type value; + UN::SceneCount::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::CurrentScene::Id: { // type is int8u + MN::CurrentScene::TypeInfo::Type value; + UN::CurrentScene::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::CurrentGroup::Id: { // type is group_id + MN::CurrentGroup::TypeInfo::Type value; + UN::CurrentGroup::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::SceneValid::Id: { // type is boolean + MN::SceneValid::TypeInfo::Type value; + UN::SceneValid::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::NameSupport::Id: { // type is bitmap8 + MN::NameSupport::TypeInfo::Type value; + UN::NameSupport::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::LastConfiguredBy::Id: { // type is node_id + MN::LastConfiguredBy::TypeInfo::Type value; + UN::LastConfiguredBy::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::FeatureMap::Id: { // type is bitmap32 + MN::FeatureMap::TypeInfo::Type value; + UN::FeatureMap::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::ClusterRevision::Id: { // type is int16u + MN::ClusterRevision::TypeInfo::Type value; + UN::ClusterRevision::Get(atr_path, value); + return aEncoder.Encode(value); + } + } + } catch (const std::out_of_range &e) { + sl_log_info( + LOG_TAG, + "The request attribute Path for endpoint [%i] is not found in the attribute state " + "container: %s\n", atr_path.mEndpointId, e.what()); + return CHIP_ERROR_NO_MESSAGE_HANDLER; + } + return CHIP_NO_ERROR; } -CHIP_ERROR ScenesAttributeAccess::Write(const ConcreteDataAttributePath& aPath, AttributeValueDecoder& aDecoder) +CHIP_ERROR ScenesAttributeAccess::Write(const ConcreteDataAttributePath &aPath, + AttributeValueDecoder &aDecoder) { - using namespace chip::app::Clusters::Scenes; - - if (aPath.mClusterId != Clusters::Scenes::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; - - if (m_node_state_monitor.emulator().is_attribute_emulated(aPath)) { - return m_node_state_monitor.emulator().write_attribute(aPath, aDecoder); - } + using namespace chip::app::Clusters::Scenes; - switch (aPath.mAttributeId) { - // SceneCount is not supported by UCL - // CurrentScene is not supported by UCL - // CurrentGroup is not supported by UCL - // SceneValid is not supported by UCL - // NameSupport is not supported by UCL - // LastConfiguredBy is not supported by UCL - // GeneratedCommandList is not supported by UCL - // AcceptedCommandList is not supported by UCL - // AttributeList is not supported by UCL - // FeatureMap is not supported by UCL - // ClusterRevision is not supported by UCL - } - - 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) + "/Scenes/Attributes/" + attribute_name + "/Desired"; - payload_str = jsn.dump(); - m_unify_mqtt.Publish(topic, payload_str, true); - return CHIP_NO_ERROR; - } + if (aPath.mClusterId != Clusters::Scenes::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; + + if( m_node_state_monitor.emulator().is_attribute_emulated(aPath) ) { + return m_node_state_monitor.emulator().write_attribute(aPath,aDecoder); + } + + switch (aPath.mAttributeId) { + // SceneCount is not supported by UCL + // CurrentScene is not supported by UCL + // CurrentGroup is not supported by UCL + // SceneValid is not supported by UCL + // NameSupport is not supported by UCL + // LastConfiguredBy is not supported by UCL + // GeneratedCommandList is not supported by UCL + // AcceptedCommandList is not supported by UCL + // AttributeList is not supported by UCL + // FeatureMap is not supported by UCL + // ClusterRevision is not supported by UCL + } + + 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) + + "/Scenes/Attributes/" + attribute_name + "/Desired"; + payload_str = jsn.dump(); + m_unify_mqtt.Publish(topic, + payload_str, + true); + return CHIP_NO_ERROR; + } + + return CHIP_ERROR_NO_MESSAGE_HANDLER; } -void ScenesAttributeAccess::reported_updated(const bridged_endpoint* ep, const std::string& cluster, - const std::string& attribute, const nlohmann::json& unify_value) +void ScenesAttributeAccess::reported_updated(const bridged_endpoint *ep, + const std::string &cluster, + const std::string &attribute, + const nlohmann::json &unify_value) { - namespace MN = chip::app::Clusters::Scenes::Attributes; - namespace UN = unify::matter_bridge::Scenes::Attributes; + namespace MN = chip::app::Clusters::Scenes::Attributes; + namespace UN = unify::matter_bridge::Scenes::Attributes; - auto cluster_id = device_translator::instance().get_cluster_id(cluster); + auto cluster_id = device_translator::instance().get_cluster_id(cluster); - if (!cluster_id.has_value() || (cluster_id.value() != Clusters::Scenes::Id)) { - return; - } + if (!cluster_id.has_value() || (cluster_id.value() != Clusters::Scenes::Id)) { + return; + } - // get attribute id - auto attribute_id = device_translator::instance().get_attribute_id(cluster, attribute); + // get attribute id + auto attribute_id + = device_translator::instance().get_attribute_id(cluster, attribute); - if (!attribute_id.has_value()) { - return; - } + if (!attribute_id.has_value()) { + return; + } - chip::EndpointId node_matter_endpoint = ep->matter_endpoint; - ConcreteAttributePath attrpath = ConcreteAttributePath(node_matter_endpoint, Clusters::Scenes::Id, attribute_id.value()); - switch (attribute_id.value()) { + 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 case MN::SceneCount::Id: { - using T = MN::SceneCount::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) { - sl_log_debug(LOG_TAG, "SceneCount attribute value is %s", unify_value.dump().c_str()); - UN::SceneCount::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::Scenes::Id, MN::SceneCount::Id); - } - break; + using T = MN::SceneCount::TypeInfo::Type; + std::optional value = from_json(unify_value); + + if( value.has_value()) { + sl_log_debug(LOG_TAG,"SceneCount attribute value is %s",unify_value.dump().c_str()); + UN::SceneCount::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback( + node_matter_endpoint, + Clusters::Scenes::Id, + MN::SceneCount::Id); + } + break; } // type is int8u case MN::CurrentScene::Id: { - using T = MN::CurrentScene::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) { - sl_log_debug(LOG_TAG, "CurrentScene attribute value is %s", unify_value.dump().c_str()); - UN::CurrentScene::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::Scenes::Id, MN::CurrentScene::Id); - } - break; + using T = MN::CurrentScene::TypeInfo::Type; + std::optional value = from_json(unify_value); + + if( value.has_value()) { + sl_log_debug(LOG_TAG,"CurrentScene attribute value is %s",unify_value.dump().c_str()); + UN::CurrentScene::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback( + node_matter_endpoint, + Clusters::Scenes::Id, + MN::CurrentScene::Id); + } + break; } // type is group_id case MN::CurrentGroup::Id: { - using T = MN::CurrentGroup::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) { - sl_log_debug(LOG_TAG, "CurrentGroup attribute value is %s", unify_value.dump().c_str()); - UN::CurrentGroup::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::Scenes::Id, MN::CurrentGroup::Id); - } - break; + using T = MN::CurrentGroup::TypeInfo::Type; + std::optional value = from_json(unify_value); + + if( value.has_value()) { + sl_log_debug(LOG_TAG,"CurrentGroup attribute value is %s",unify_value.dump().c_str()); + UN::CurrentGroup::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback( + node_matter_endpoint, + Clusters::Scenes::Id, + MN::CurrentGroup::Id); + } + break; } // type is boolean case MN::SceneValid::Id: { - using T = MN::SceneValid::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) { - sl_log_debug(LOG_TAG, "SceneValid attribute value is %s", unify_value.dump().c_str()); - UN::SceneValid::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::Scenes::Id, MN::SceneValid::Id); - } - break; + using T = MN::SceneValid::TypeInfo::Type; + std::optional value = from_json(unify_value); + + if( value.has_value()) { + sl_log_debug(LOG_TAG,"SceneValid attribute value is %s",unify_value.dump().c_str()); + UN::SceneValid::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback( + node_matter_endpoint, + Clusters::Scenes::Id, + MN::SceneValid::Id); + } + break; } // type is bitmap8 case MN::NameSupport::Id: { - using T = MN::NameSupport::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) { - sl_log_debug(LOG_TAG, "NameSupport attribute value is %s", unify_value.dump().c_str()); - UN::NameSupport::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::Scenes::Id, MN::NameSupport::Id); - } - break; + using T = MN::NameSupport::TypeInfo::Type; + std::optional value = from_json(unify_value); + + if( value.has_value()) { + sl_log_debug(LOG_TAG,"NameSupport attribute value is %s",unify_value.dump().c_str()); + UN::NameSupport::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback( + node_matter_endpoint, + Clusters::Scenes::Id, + MN::NameSupport::Id); + } + break; } // type is node_id case MN::LastConfiguredBy::Id: { - using T = MN::LastConfiguredBy::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) { - sl_log_debug(LOG_TAG, "LastConfiguredBy attribute value is %s", unify_value.dump().c_str()); - UN::LastConfiguredBy::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::Scenes::Id, MN::LastConfiguredBy::Id); - } - break; - } - } + using T = MN::LastConfiguredBy::TypeInfo::Type; + std::optional value = from_json(unify_value); + + if( value.has_value()) { + sl_log_debug(LOG_TAG,"LastConfiguredBy attribute value is %s",unify_value.dump().c_str()); + UN::LastConfiguredBy::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback( + node_matter_endpoint, + Clusters::Scenes::Id, + MN::LastConfiguredBy::Id); + } + break; + } + } } CHIP_ERROR -OnOffAttributeAccess::Read(const ConcreteReadAttributePath& aPath, AttributeValueEncoder& aEncoder) +OnOffAttributeAccess::Read(const ConcreteReadAttributePath &aPath, + AttributeValueEncoder &aEncoder) { - namespace MN = chip::app::Clusters::OnOff::Attributes; - namespace UN = unify::matter_bridge::OnOff::Attributes; - if (aPath.mClusterId != Clusters::OnOff::Id) { - return CHIP_ERROR_INVALID_ARGUMENT; - } - - ConcreteAttributePath atr_path = ConcreteAttributePath(aPath.mEndpointId, aPath.mClusterId, aPath.mAttributeId); - - if (m_node_state_monitor.emulator().is_attribute_emulated(aPath)) { - return m_node_state_monitor.emulator().read_attribute(aPath, aEncoder); - } - - try { - switch (aPath.mAttributeId) { - case MN::OnOff::Id: { // type is boolean - MN::OnOff::TypeInfo::Type value; - UN::OnOff::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::GlobalSceneControl::Id: { // type is boolean - MN::GlobalSceneControl::TypeInfo::Type value; - UN::GlobalSceneControl::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::OnTime::Id: { // type is int16u - MN::OnTime::TypeInfo::Type value; - UN::OnTime::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::OffWaitTime::Id: { // type is int16u - MN::OffWaitTime::TypeInfo::Type value; - UN::OffWaitTime::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::StartUpOnOff::Id: { // type is OnOffStartUpOnOff - MN::StartUpOnOff::TypeInfo::Type value; - UN::StartUpOnOff::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::FeatureMap::Id: { // type is bitmap32 - MN::FeatureMap::TypeInfo::Type value; - UN::FeatureMap::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::ClusterRevision::Id: { // type is int16u - MN::ClusterRevision::TypeInfo::Type value; - UN::ClusterRevision::Get(atr_path, value); - return aEncoder.Encode(value); - } - } - } catch (const std::out_of_range& e) { - sl_log_info(LOG_TAG, - "The request attribute Path for endpoint [%i] is not found in the attribute state " - "container: %s\n", - atr_path.mEndpointId, e.what()); - return CHIP_ERROR_NO_MESSAGE_HANDLER; - } + namespace MN = chip::app::Clusters::OnOff::Attributes; + namespace UN = unify::matter_bridge::OnOff::Attributes; + if (aPath.mClusterId != Clusters::OnOff::Id) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + // Do not handle Read for non-unify endpoints + auto unify_node = m_node_state_monitor.bridged_endpoint(aPath.mEndpointId); + + if (!unify_node) { return CHIP_NO_ERROR; -} - -CHIP_ERROR OnOffAttributeAccess::Write(const ConcreteDataAttributePath& aPath, AttributeValueDecoder& aDecoder) -{ - using namespace chip::app::Clusters::OnOff; - - if (aPath.mClusterId != Clusters::OnOff::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; - if (m_node_state_monitor.emulator().is_attribute_emulated(aPath)) { - return m_node_state_monitor.emulator().write_attribute(aPath, aDecoder); - } + ConcreteAttributePath atr_path = ConcreteAttributePath(aPath.mEndpointId, + aPath.mClusterId, + aPath.mAttributeId); + + if( m_node_state_monitor.emulator().is_attribute_emulated(aPath) ) { + return m_node_state_monitor.emulator().read_attribute(aPath,aEncoder); + } + + try { switch (aPath.mAttributeId) { - // OnOff is not supported by UCL - // GlobalSceneControl is not supported by UCL - case Attributes::OnTime::Id: { - - Attributes::OnTime::TypeInfo::DecodableType value; - aDecoder.Decode(value); - jsn["value"] = to_json(value); - attribute_name = "OnTime"; - break; - } - case Attributes::OffWaitTime::Id: { - - Attributes::OffWaitTime::TypeInfo::DecodableType value; - aDecoder.Decode(value); - jsn["value"] = to_json(value); - attribute_name = "OffWaitTime"; - break; - } - case Attributes::StartUpOnOff::Id: { + case MN::OnOff::Id: { // type is boolean + MN::OnOff::TypeInfo::Type value; + UN::OnOff::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::GlobalSceneControl::Id: { // type is boolean + MN::GlobalSceneControl::TypeInfo::Type value; + UN::GlobalSceneControl::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::OnTime::Id: { // type is int16u + MN::OnTime::TypeInfo::Type value; + UN::OnTime::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::OffWaitTime::Id: { // type is int16u + MN::OffWaitTime::TypeInfo::Type value; + UN::OffWaitTime::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::StartUpOnOff::Id: { // type is OnOffStartUpOnOff + MN::StartUpOnOff::TypeInfo::Type value; + UN::StartUpOnOff::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::FeatureMap::Id: { // type is bitmap32 + MN::FeatureMap::TypeInfo::Type value; + UN::FeatureMap::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::ClusterRevision::Id: { // type is int16u + MN::ClusterRevision::TypeInfo::Type value; + UN::ClusterRevision::Get(atr_path, value); + return aEncoder.Encode(value); + } + } + } catch (const std::out_of_range &e) { + sl_log_info( + LOG_TAG, + "The request attribute Path for endpoint [%i] is not found in the attribute state " + "container: %s\n", atr_path.mEndpointId, e.what()); + return CHIP_ERROR_NO_MESSAGE_HANDLER; + } + return CHIP_NO_ERROR; +} - Attributes::StartUpOnOff::TypeInfo::DecodableType value; - aDecoder.Decode(value); - jsn["value"] = to_json(value); - attribute_name = "StartUpOnOff"; - break; - } - // GeneratedCommandList is not supported by UCL - // AcceptedCommandList is not supported by UCL - // AttributeList is not supported by UCL - // FeatureMap is not supported by UCL - // ClusterRevision is not supported by UCL - } +CHIP_ERROR OnOffAttributeAccess::Write(const ConcreteDataAttributePath &aPath, + AttributeValueDecoder &aDecoder) +{ + using namespace chip::app::Clusters::OnOff; - 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) + "/OnOff/Attributes/" + attribute_name + "/Desired"; - payload_str = jsn.dump(); - m_unify_mqtt.Publish(topic, payload_str, true); - return CHIP_NO_ERROR; - } + if (aPath.mClusterId != Clusters::OnOff::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; + + if( m_node_state_monitor.emulator().is_attribute_emulated(aPath) ) { + return m_node_state_monitor.emulator().write_attribute(aPath,aDecoder); + } + + switch (aPath.mAttributeId) { + // OnOff is not supported by UCL + // GlobalSceneControl is not supported by UCL + case Attributes::OnTime::Id: { + + Attributes::OnTime::TypeInfo::DecodableType value; + aDecoder.Decode(value); + jsn["value"] = to_json(value); + attribute_name = "OnTime"; + break; + } + case Attributes::OffWaitTime::Id: { + + Attributes::OffWaitTime::TypeInfo::DecodableType value; + aDecoder.Decode(value); + jsn["value"] = to_json(value); + attribute_name = "OffWaitTime"; + break; + } + case Attributes::StartUpOnOff::Id: { + + Attributes::StartUpOnOff::TypeInfo::DecodableType value; + aDecoder.Decode(value); + jsn["value"] = to_json(value); + attribute_name = "StartUpOnOff"; + break; + } + // GeneratedCommandList is not supported by UCL + // AcceptedCommandList is not supported by UCL + // AttributeList is not supported by UCL + // FeatureMap is not supported by UCL + // ClusterRevision is not supported by UCL + } + + 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) + + "/OnOff/Attributes/" + attribute_name + "/Desired"; + payload_str = jsn.dump(); + m_unify_mqtt.Publish(topic, + payload_str, + true); + return CHIP_NO_ERROR; + } + + return CHIP_ERROR_NO_MESSAGE_HANDLER; } -void OnOffAttributeAccess::reported_updated(const bridged_endpoint* ep, const std::string& cluster, const std::string& attribute, - const nlohmann::json& unify_value) +void OnOffAttributeAccess::reported_updated(const bridged_endpoint *ep, + const std::string &cluster, + const std::string &attribute, + const nlohmann::json &unify_value) { - namespace MN = chip::app::Clusters::OnOff::Attributes; - namespace UN = unify::matter_bridge::OnOff::Attributes; + namespace MN = chip::app::Clusters::OnOff::Attributes; + namespace UN = unify::matter_bridge::OnOff::Attributes; - auto cluster_id = device_translator::instance().get_cluster_id(cluster); + auto cluster_id = device_translator::instance().get_cluster_id(cluster); - if (!cluster_id.has_value() || (cluster_id.value() != Clusters::OnOff::Id)) { - return; - } + if (!cluster_id.has_value() || (cluster_id.value() != Clusters::OnOff::Id)) { + return; + } - // get attribute id - auto attribute_id = device_translator::instance().get_attribute_id(cluster, attribute); + // get attribute id + auto attribute_id + = device_translator::instance().get_attribute_id(cluster, attribute); - if (!attribute_id.has_value()) { - return; - } + if (!attribute_id.has_value()) { + return; + } - chip::EndpointId node_matter_endpoint = ep->matter_endpoint; - ConcreteAttributePath attrpath = ConcreteAttributePath(node_matter_endpoint, Clusters::OnOff::Id, attribute_id.value()); - switch (attribute_id.value()) { + 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 case MN::OnOff::Id: { - using T = MN::OnOff::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) { - sl_log_debug(LOG_TAG, "OnOff attribute value is %s", unify_value.dump().c_str()); - UN::OnOff::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::OnOff::Id, MN::OnOff::Id); - } - break; + using T = MN::OnOff::TypeInfo::Type; + std::optional value = from_json(unify_value); + + if( value.has_value()) { + sl_log_debug(LOG_TAG,"OnOff attribute value is %s",unify_value.dump().c_str()); + UN::OnOff::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback( + node_matter_endpoint, + Clusters::OnOff::Id, + MN::OnOff::Id); + } + break; } // type is boolean case MN::GlobalSceneControl::Id: { - using T = MN::GlobalSceneControl::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) { - sl_log_debug(LOG_TAG, "GlobalSceneControl attribute value is %s", unify_value.dump().c_str()); - UN::GlobalSceneControl::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::OnOff::Id, MN::GlobalSceneControl::Id); - } - break; + using T = MN::GlobalSceneControl::TypeInfo::Type; + std::optional value = from_json(unify_value); + + if( value.has_value()) { + sl_log_debug(LOG_TAG,"GlobalSceneControl attribute value is %s",unify_value.dump().c_str()); + UN::GlobalSceneControl::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback( + node_matter_endpoint, + Clusters::OnOff::Id, + MN::GlobalSceneControl::Id); + } + break; } // type is int16u case MN::OnTime::Id: { - using T = MN::OnTime::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) { - sl_log_debug(LOG_TAG, "OnTime attribute value is %s", unify_value.dump().c_str()); - UN::OnTime::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::OnOff::Id, MN::OnTime::Id); - } - break; + using T = MN::OnTime::TypeInfo::Type; + std::optional value = from_json(unify_value); + + if( value.has_value()) { + sl_log_debug(LOG_TAG,"OnTime attribute value is %s",unify_value.dump().c_str()); + UN::OnTime::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback( + node_matter_endpoint, + Clusters::OnOff::Id, + MN::OnTime::Id); + } + break; } // type is int16u case MN::OffWaitTime::Id: { - using T = MN::OffWaitTime::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) { - sl_log_debug(LOG_TAG, "OffWaitTime attribute value is %s", unify_value.dump().c_str()); - UN::OffWaitTime::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::OnOff::Id, MN::OffWaitTime::Id); - } - break; + using T = MN::OffWaitTime::TypeInfo::Type; + std::optional value = from_json(unify_value); + + if( value.has_value()) { + sl_log_debug(LOG_TAG,"OffWaitTime attribute value is %s",unify_value.dump().c_str()); + UN::OffWaitTime::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback( + node_matter_endpoint, + Clusters::OnOff::Id, + MN::OffWaitTime::Id); + } + break; } // type is OnOffStartUpOnOff case MN::StartUpOnOff::Id: { - using T = MN::StartUpOnOff::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) { - sl_log_debug(LOG_TAG, "StartUpOnOff attribute value is %s", unify_value.dump().c_str()); - UN::StartUpOnOff::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::OnOff::Id, MN::StartUpOnOff::Id); - } - break; - } - } + using T = MN::StartUpOnOff::TypeInfo::Type; + std::optional value = from_json(unify_value); + + if( value.has_value()) { + sl_log_debug(LOG_TAG,"StartUpOnOff attribute value is %s",unify_value.dump().c_str()); + UN::StartUpOnOff::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback( + node_matter_endpoint, + Clusters::OnOff::Id, + MN::StartUpOnOff::Id); + } + break; + } + } } CHIP_ERROR -LevelControlAttributeAccess::Read(const ConcreteReadAttributePath& aPath, AttributeValueEncoder& aEncoder) +LevelControlAttributeAccess::Read(const ConcreteReadAttributePath &aPath, + AttributeValueEncoder &aEncoder) { - namespace MN = chip::app::Clusters::LevelControl::Attributes; - namespace UN = unify::matter_bridge::LevelControl::Attributes; - if (aPath.mClusterId != Clusters::LevelControl::Id) { - return CHIP_ERROR_INVALID_ARGUMENT; - } + namespace MN = chip::app::Clusters::LevelControl::Attributes; + namespace UN = unify::matter_bridge::LevelControl::Attributes; + if (aPath.mClusterId != Clusters::LevelControl::Id) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + // Do not handle Read for non-unify endpoints + auto unify_node = m_node_state_monitor.bridged_endpoint(aPath.mEndpointId); + + if (!unify_node) { + return CHIP_NO_ERROR; + } - ConcreteAttributePath atr_path = ConcreteAttributePath(aPath.mEndpointId, aPath.mClusterId, aPath.mAttributeId); - if (m_node_state_monitor.emulator().is_attribute_emulated(aPath)) { - return m_node_state_monitor.emulator().read_attribute(aPath, aEncoder); - } + ConcreteAttributePath atr_path = 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(atr_path, value); - return aEncoder.Encode(value); - } - case MN::RemainingTime::Id: { // type is int16u - MN::RemainingTime::TypeInfo::Type value; - UN::RemainingTime::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::MinLevel::Id: { // type is int8u - MN::MinLevel::TypeInfo::Type value; - UN::MinLevel::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::MaxLevel::Id: { // type is int8u - MN::MaxLevel::TypeInfo::Type value; - UN::MaxLevel::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::CurrentFrequency::Id: { // type is int16u - MN::CurrentFrequency::TypeInfo::Type value; - UN::CurrentFrequency::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::MinFrequency::Id: { // type is int16u - MN::MinFrequency::TypeInfo::Type value; - UN::MinFrequency::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::MaxFrequency::Id: { // type is int16u - MN::MaxFrequency::TypeInfo::Type value; - UN::MaxFrequency::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::Options::Id: { // type is LevelControlOptions - MN::Options::TypeInfo::Type value; - UN::Options::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::OnOffTransitionTime::Id: { // type is int16u - MN::OnOffTransitionTime::TypeInfo::Type value; - UN::OnOffTransitionTime::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::OnLevel::Id: { // type is int8u - MN::OnLevel::TypeInfo::Type value; - UN::OnLevel::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::OnTransitionTime::Id: { // type is int16u - MN::OnTransitionTime::TypeInfo::Type value; - UN::OnTransitionTime::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::OffTransitionTime::Id: { // type is int16u - MN::OffTransitionTime::TypeInfo::Type value; - UN::OffTransitionTime::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::DefaultMoveRate::Id: { // type is int8u - MN::DefaultMoveRate::TypeInfo::Type value; - UN::DefaultMoveRate::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::StartUpCurrentLevel::Id: { // type is int8u - MN::StartUpCurrentLevel::TypeInfo::Type value; - UN::StartUpCurrentLevel::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::FeatureMap::Id: { // type is bitmap32 - MN::FeatureMap::TypeInfo::Type value; - UN::FeatureMap::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::ClusterRevision::Id: { // type is int16u - MN::ClusterRevision::TypeInfo::Type value; - UN::ClusterRevision::Get(atr_path, value); - return aEncoder.Encode(value); - } - } - } catch (const std::out_of_range& e) { - sl_log_info(LOG_TAG, - "The request attribute Path for endpoint [%i] is not found in the attribute state " - "container: %s\n", - atr_path.mEndpointId, e.what()); - return CHIP_ERROR_NO_MESSAGE_HANDLER; - } - return CHIP_NO_ERROR; + + if( m_node_state_monitor.emulator().is_attribute_emulated(aPath) ) { + return m_node_state_monitor.emulator().read_attribute(aPath,aEncoder); + } + + try { + switch (aPath.mAttributeId) { + case MN::CurrentLevel::Id: { // type is int8u + MN::CurrentLevel::TypeInfo::Type value; + UN::CurrentLevel::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::RemainingTime::Id: { // type is int16u + MN::RemainingTime::TypeInfo::Type value; + UN::RemainingTime::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::MinLevel::Id: { // type is int8u + MN::MinLevel::TypeInfo::Type value; + UN::MinLevel::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::MaxLevel::Id: { // type is int8u + MN::MaxLevel::TypeInfo::Type value; + UN::MaxLevel::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::CurrentFrequency::Id: { // type is int16u + MN::CurrentFrequency::TypeInfo::Type value; + UN::CurrentFrequency::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::MinFrequency::Id: { // type is int16u + MN::MinFrequency::TypeInfo::Type value; + UN::MinFrequency::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::MaxFrequency::Id: { // type is int16u + MN::MaxFrequency::TypeInfo::Type value; + UN::MaxFrequency::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::Options::Id: { // type is LevelControlOptions + MN::Options::TypeInfo::Type value; + UN::Options::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::OnOffTransitionTime::Id: { // type is int16u + MN::OnOffTransitionTime::TypeInfo::Type value; + UN::OnOffTransitionTime::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::OnLevel::Id: { // type is int8u + MN::OnLevel::TypeInfo::Type value; + UN::OnLevel::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::OnTransitionTime::Id: { // type is int16u + MN::OnTransitionTime::TypeInfo::Type value; + UN::OnTransitionTime::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::OffTransitionTime::Id: { // type is int16u + MN::OffTransitionTime::TypeInfo::Type value; + UN::OffTransitionTime::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::DefaultMoveRate::Id: { // type is int8u + MN::DefaultMoveRate::TypeInfo::Type value; + UN::DefaultMoveRate::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::StartUpCurrentLevel::Id: { // type is int8u + MN::StartUpCurrentLevel::TypeInfo::Type value; + UN::StartUpCurrentLevel::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::FeatureMap::Id: { // type is bitmap32 + MN::FeatureMap::TypeInfo::Type value; + UN::FeatureMap::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::ClusterRevision::Id: { // type is int16u + MN::ClusterRevision::TypeInfo::Type value; + UN::ClusterRevision::Get(atr_path, value); + return aEncoder.Encode(value); + } + } + } catch (const std::out_of_range &e) { + sl_log_info( + LOG_TAG, + "The request attribute Path for endpoint [%i] is not found in the attribute state " + "container: %s\n", atr_path.mEndpointId, e.what()); + return CHIP_ERROR_NO_MESSAGE_HANDLER; + } + return CHIP_NO_ERROR; } -CHIP_ERROR LevelControlAttributeAccess::Write(const ConcreteDataAttributePath& aPath, AttributeValueDecoder& aDecoder) +CHIP_ERROR LevelControlAttributeAccess::Write(const ConcreteDataAttributePath &aPath, + AttributeValueDecoder &aDecoder) { - using namespace chip::app::Clusters::LevelControl; - - if (aPath.mClusterId != Clusters::LevelControl::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; + using namespace chip::app::Clusters::LevelControl; - if (m_node_state_monitor.emulator().is_attribute_emulated(aPath)) { - return m_node_state_monitor.emulator().write_attribute(aPath, aDecoder); - } - - switch (aPath.mAttributeId) { - // CurrentLevel is not supported by UCL - // RemainingTime is not supported by UCL - // MinLevel is not supported by UCL - // MaxLevel is not supported by UCL - // CurrentFrequency is not supported by UCL - // MinFrequency is not supported by UCL - // MaxFrequency is not supported by UCL - case Attributes::Options::Id: { - - Attributes::Options::TypeInfo::DecodableType value; - aDecoder.Decode(value); - jsn["value"] = to_json(value); - attribute_name = "Options"; - break; - } - case Attributes::OnOffTransitionTime::Id: { - - Attributes::OnOffTransitionTime::TypeInfo::DecodableType value; - aDecoder.Decode(value); - jsn["value"] = to_json(value); - attribute_name = "OnOffTransitionTime"; - break; - } - case Attributes::OnLevel::Id: { - - Attributes::OnLevel::TypeInfo::DecodableType value; - aDecoder.Decode(value); - jsn["value"] = to_json(value); - attribute_name = "OnLevel"; - break; - } - case Attributes::OnTransitionTime::Id: { - - Attributes::OnTransitionTime::TypeInfo::DecodableType value; - aDecoder.Decode(value); - jsn["value"] = to_json(value); - attribute_name = "OnTransitionTime"; - break; - } - case Attributes::OffTransitionTime::Id: { - - Attributes::OffTransitionTime::TypeInfo::DecodableType value; - aDecoder.Decode(value); - jsn["value"] = to_json(value); - attribute_name = "OffTransitionTime"; - break; - } - case Attributes::DefaultMoveRate::Id: { - - Attributes::DefaultMoveRate::TypeInfo::DecodableType value; - aDecoder.Decode(value); - jsn["value"] = to_json(value); - attribute_name = "DefaultMoveRate"; - break; - } - case Attributes::StartUpCurrentLevel::Id: { - - Attributes::StartUpCurrentLevel::TypeInfo::DecodableType value; - aDecoder.Decode(value); - jsn["value"] = to_json(value); - attribute_name = "StartUpCurrentLevel"; - break; - } - // GeneratedCommandList is not supported by UCL - // AcceptedCommandList is not supported by UCL - // AttributeList is not supported by UCL - // FeatureMap is not supported by UCL - // ClusterRevision is not supported by UCL - } - - 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) + "/Level/Attributes/" + attribute_name + "/Desired"; - payload_str = jsn.dump(); - m_unify_mqtt.Publish(topic, payload_str, true); - return CHIP_NO_ERROR; - } + if (aPath.mClusterId != Clusters::LevelControl::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; + + if( m_node_state_monitor.emulator().is_attribute_emulated(aPath) ) { + return m_node_state_monitor.emulator().write_attribute(aPath,aDecoder); + } + + switch (aPath.mAttributeId) { + // CurrentLevel is not supported by UCL + // RemainingTime is not supported by UCL + // MinLevel is not supported by UCL + // MaxLevel is not supported by UCL + // CurrentFrequency is not supported by UCL + // MinFrequency is not supported by UCL + // MaxFrequency is not supported by UCL + case Attributes::Options::Id: { + + Attributes::Options::TypeInfo::DecodableType value; + aDecoder.Decode(value); + jsn["value"] = to_json(value); + attribute_name = "Options"; + break; + } + case Attributes::OnOffTransitionTime::Id: { + + Attributes::OnOffTransitionTime::TypeInfo::DecodableType value; + aDecoder.Decode(value); + jsn["value"] = to_json(value); + attribute_name = "OnOffTransitionTime"; + break; + } + case Attributes::OnLevel::Id: { + + Attributes::OnLevel::TypeInfo::DecodableType value; + aDecoder.Decode(value); + jsn["value"] = to_json(value); + attribute_name = "OnLevel"; + break; + } + case Attributes::OnTransitionTime::Id: { + + Attributes::OnTransitionTime::TypeInfo::DecodableType value; + aDecoder.Decode(value); + jsn["value"] = to_json(value); + attribute_name = "OnTransitionTime"; + break; + } + case Attributes::OffTransitionTime::Id: { + + Attributes::OffTransitionTime::TypeInfo::DecodableType value; + aDecoder.Decode(value); + jsn["value"] = to_json(value); + attribute_name = "OffTransitionTime"; + break; + } + case Attributes::DefaultMoveRate::Id: { + + Attributes::DefaultMoveRate::TypeInfo::DecodableType value; + aDecoder.Decode(value); + jsn["value"] = to_json(value); + attribute_name = "DefaultMoveRate"; + break; + } + case Attributes::StartUpCurrentLevel::Id: { + + Attributes::StartUpCurrentLevel::TypeInfo::DecodableType value; + aDecoder.Decode(value); + jsn["value"] = to_json(value); + attribute_name = "StartUpCurrentLevel"; + break; + } + // GeneratedCommandList is not supported by UCL + // AcceptedCommandList is not supported by UCL + // AttributeList is not supported by UCL + // FeatureMap is not supported by UCL + // ClusterRevision is not supported by UCL + } + + 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) + + "/Level/Attributes/" + attribute_name + "/Desired"; + payload_str = jsn.dump(); + m_unify_mqtt.Publish(topic, + payload_str, + true); + return CHIP_NO_ERROR; + } + + return CHIP_ERROR_NO_MESSAGE_HANDLER; } -void LevelControlAttributeAccess::reported_updated(const bridged_endpoint* ep, const std::string& cluster, - const std::string& attribute, const nlohmann::json& unify_value) +void LevelControlAttributeAccess::reported_updated(const bridged_endpoint *ep, + const std::string &cluster, + const std::string &attribute, + const nlohmann::json &unify_value) { - namespace MN = chip::app::Clusters::LevelControl::Attributes; - namespace UN = unify::matter_bridge::LevelControl::Attributes; + namespace MN = chip::app::Clusters::LevelControl::Attributes; + namespace UN = unify::matter_bridge::LevelControl::Attributes; - auto cluster_id = device_translator::instance().get_cluster_id(cluster); + auto cluster_id = device_translator::instance().get_cluster_id(cluster); - if (!cluster_id.has_value() || (cluster_id.value() != Clusters::LevelControl::Id)) { - return; - } + if (!cluster_id.has_value() || (cluster_id.value() != Clusters::LevelControl::Id)) { + return; + } - // get attribute id - auto attribute_id = device_translator::instance().get_attribute_id(cluster, attribute); + // get attribute id + auto attribute_id + = device_translator::instance().get_attribute_id(cluster, attribute); - if (!attribute_id.has_value()) { - return; - } + if (!attribute_id.has_value()) { + return; + } - chip::EndpointId node_matter_endpoint = ep->matter_endpoint; - ConcreteAttributePath attrpath = ConcreteAttributePath(node_matter_endpoint, Clusters::LevelControl::Id, attribute_id.value()); - switch (attribute_id.value()) { + 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 case MN::CurrentLevel::Id: { - using T = MN::CurrentLevel::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) { - sl_log_debug(LOG_TAG, "CurrentLevel attribute value is %s", unify_value.dump().c_str()); - UN::CurrentLevel::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::LevelControl::Id, MN::CurrentLevel::Id); - } - break; + using T = MN::CurrentLevel::TypeInfo::Type; + std::optional value = from_json(unify_value); + + if( value.has_value()) { + sl_log_debug(LOG_TAG,"CurrentLevel attribute value is %s",unify_value.dump().c_str()); + UN::CurrentLevel::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback( + node_matter_endpoint, + Clusters::LevelControl::Id, + MN::CurrentLevel::Id); + } + break; } // type is int16u case MN::RemainingTime::Id: { - using T = MN::RemainingTime::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) { - sl_log_debug(LOG_TAG, "RemainingTime attribute value is %s", unify_value.dump().c_str()); - UN::RemainingTime::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::LevelControl::Id, MN::RemainingTime::Id); - } - break; + using T = MN::RemainingTime::TypeInfo::Type; + std::optional value = from_json(unify_value); + + if( value.has_value()) { + sl_log_debug(LOG_TAG,"RemainingTime attribute value is %s",unify_value.dump().c_str()); + UN::RemainingTime::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback( + node_matter_endpoint, + Clusters::LevelControl::Id, + MN::RemainingTime::Id); + } + break; } // type is int8u case MN::MinLevel::Id: { - using T = MN::MinLevel::TypeInfo::Type; - 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::LevelControl::Id, MN::MinLevel::Id); - } - break; + using T = MN::MinLevel::TypeInfo::Type; + 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::LevelControl::Id, + MN::MinLevel::Id); + } + break; } // type is int8u case MN::MaxLevel::Id: { - using T = MN::MaxLevel::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::LevelControl::Id, MN::MaxLevel::Id); - } - break; + using T = MN::MaxLevel::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::LevelControl::Id, + MN::MaxLevel::Id); + } + break; } // type is int16u case MN::CurrentFrequency::Id: { - using T = MN::CurrentFrequency::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) { - sl_log_debug(LOG_TAG, "CurrentFrequency attribute value is %s", unify_value.dump().c_str()); - UN::CurrentFrequency::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::LevelControl::Id, MN::CurrentFrequency::Id); - } - break; + using T = MN::CurrentFrequency::TypeInfo::Type; + std::optional value = from_json(unify_value); + + if( value.has_value()) { + sl_log_debug(LOG_TAG,"CurrentFrequency attribute value is %s",unify_value.dump().c_str()); + UN::CurrentFrequency::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback( + node_matter_endpoint, + Clusters::LevelControl::Id, + MN::CurrentFrequency::Id); + } + break; } // type is int16u case MN::MinFrequency::Id: { - using T = MN::MinFrequency::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) { - sl_log_debug(LOG_TAG, "MinFrequency attribute value is %s", unify_value.dump().c_str()); - UN::MinFrequency::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::LevelControl::Id, MN::MinFrequency::Id); - } - break; + using T = MN::MinFrequency::TypeInfo::Type; + std::optional value = from_json(unify_value); + + if( value.has_value()) { + sl_log_debug(LOG_TAG,"MinFrequency attribute value is %s",unify_value.dump().c_str()); + UN::MinFrequency::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback( + node_matter_endpoint, + Clusters::LevelControl::Id, + MN::MinFrequency::Id); + } + break; } // type is int16u case MN::MaxFrequency::Id: { - using T = MN::MaxFrequency::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) { - sl_log_debug(LOG_TAG, "MaxFrequency attribute value is %s", unify_value.dump().c_str()); - UN::MaxFrequency::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::LevelControl::Id, MN::MaxFrequency::Id); - } - break; + using T = MN::MaxFrequency::TypeInfo::Type; + std::optional value = from_json(unify_value); + + if( value.has_value()) { + sl_log_debug(LOG_TAG,"MaxFrequency attribute value is %s",unify_value.dump().c_str()); + UN::MaxFrequency::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback( + node_matter_endpoint, + Clusters::LevelControl::Id, + MN::MaxFrequency::Id); + } + break; } // type is LevelControlOptions case MN::Options::Id: { - using T = MN::Options::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) { - sl_log_debug(LOG_TAG, "Options attribute value is %s", unify_value.dump().c_str()); - UN::Options::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::LevelControl::Id, MN::Options::Id); - } - break; + using T = MN::Options::TypeInfo::Type; + std::optional value = from_json(unify_value); + + if( value.has_value()) { + sl_log_debug(LOG_TAG,"Options attribute value is %s",unify_value.dump().c_str()); + UN::Options::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback( + node_matter_endpoint, + Clusters::LevelControl::Id, + MN::Options::Id); + } + break; } // type is int16u case MN::OnOffTransitionTime::Id: { - using T = MN::OnOffTransitionTime::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) { - sl_log_debug(LOG_TAG, "OnOffTransitionTime attribute value is %s", unify_value.dump().c_str()); - UN::OnOffTransitionTime::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::LevelControl::Id, MN::OnOffTransitionTime::Id); - } - break; + using T = MN::OnOffTransitionTime::TypeInfo::Type; + std::optional value = from_json(unify_value); + + if( value.has_value()) { + sl_log_debug(LOG_TAG,"OnOffTransitionTime attribute value is %s",unify_value.dump().c_str()); + UN::OnOffTransitionTime::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback( + node_matter_endpoint, + Clusters::LevelControl::Id, + MN::OnOffTransitionTime::Id); + } + break; } // type is int8u case MN::OnLevel::Id: { - using T = MN::OnLevel::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) { - sl_log_debug(LOG_TAG, "OnLevel attribute value is %s", unify_value.dump().c_str()); - UN::OnLevel::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::LevelControl::Id, MN::OnLevel::Id); - } - break; + using T = MN::OnLevel::TypeInfo::Type; + std::optional value = from_json(unify_value); + + if( value.has_value()) { + sl_log_debug(LOG_TAG,"OnLevel attribute value is %s",unify_value.dump().c_str()); + UN::OnLevel::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback( + node_matter_endpoint, + Clusters::LevelControl::Id, + MN::OnLevel::Id); + } + break; } // type is int16u case MN::OnTransitionTime::Id: { - using T = MN::OnTransitionTime::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) { - sl_log_debug(LOG_TAG, "OnTransitionTime attribute value is %s", unify_value.dump().c_str()); - UN::OnTransitionTime::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::LevelControl::Id, MN::OnTransitionTime::Id); - } - break; + using T = MN::OnTransitionTime::TypeInfo::Type; + std::optional value = from_json(unify_value); + + if( value.has_value()) { + sl_log_debug(LOG_TAG,"OnTransitionTime attribute value is %s",unify_value.dump().c_str()); + UN::OnTransitionTime::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback( + node_matter_endpoint, + Clusters::LevelControl::Id, + MN::OnTransitionTime::Id); + } + break; } // type is int16u case MN::OffTransitionTime::Id: { - using T = MN::OffTransitionTime::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) { - sl_log_debug(LOG_TAG, "OffTransitionTime attribute value is %s", unify_value.dump().c_str()); - UN::OffTransitionTime::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::LevelControl::Id, MN::OffTransitionTime::Id); - } - break; + using T = MN::OffTransitionTime::TypeInfo::Type; + std::optional value = from_json(unify_value); + + if( value.has_value()) { + sl_log_debug(LOG_TAG,"OffTransitionTime attribute value is %s",unify_value.dump().c_str()); + UN::OffTransitionTime::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback( + node_matter_endpoint, + Clusters::LevelControl::Id, + MN::OffTransitionTime::Id); + } + break; } // type is int8u case MN::DefaultMoveRate::Id: { - using T = MN::DefaultMoveRate::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) { - sl_log_debug(LOG_TAG, "DefaultMoveRate attribute value is %s", unify_value.dump().c_str()); - UN::DefaultMoveRate::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::LevelControl::Id, MN::DefaultMoveRate::Id); - } - break; + using T = MN::DefaultMoveRate::TypeInfo::Type; + std::optional value = from_json(unify_value); + + if( value.has_value()) { + sl_log_debug(LOG_TAG,"DefaultMoveRate attribute value is %s",unify_value.dump().c_str()); + UN::DefaultMoveRate::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback( + node_matter_endpoint, + Clusters::LevelControl::Id, + MN::DefaultMoveRate::Id); + } + break; } // type is int8u case MN::StartUpCurrentLevel::Id: { - using T = MN::StartUpCurrentLevel::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) { - sl_log_debug(LOG_TAG, "StartUpCurrentLevel attribute value is %s", unify_value.dump().c_str()); - UN::StartUpCurrentLevel::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::LevelControl::Id, MN::StartUpCurrentLevel::Id); - } - break; - } - } + using T = MN::StartUpCurrentLevel::TypeInfo::Type; + std::optional value = from_json(unify_value); + + if( value.has_value()) { + sl_log_debug(LOG_TAG,"StartUpCurrentLevel attribute value is %s",unify_value.dump().c_str()); + UN::StartUpCurrentLevel::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback( + node_matter_endpoint, + Clusters::LevelControl::Id, + MN::StartUpCurrentLevel::Id); + } + break; + } + } } CHIP_ERROR -DoorLockAttributeAccess::Read(const ConcreteReadAttributePath& aPath, AttributeValueEncoder& aEncoder) +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; - } + 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; + } + // Do not handle Read for non-unify endpoints + auto unify_node = m_node_state_monitor.bridged_endpoint(aPath.mEndpointId); + + if (!unify_node) { + return CHIP_NO_ERROR; + } - ConcreteAttributePath atr_path = ConcreteAttributePath(aPath.mEndpointId, aPath.mClusterId, aPath.mAttributeId); - if (m_node_state_monitor.emulator().is_attribute_emulated(aPath)) { - return m_node_state_monitor.emulator().read_attribute(aPath, aEncoder); - } + ConcreteAttributePath atr_path = 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(atr_path, value); - return aEncoder.Encode(value); - } - case MN::LockType::Id: { // type is DlLockType - MN::LockType::TypeInfo::Type value; - UN::LockType::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::ActuatorEnabled::Id: { // type is boolean - MN::ActuatorEnabled::TypeInfo::Type value; - UN::ActuatorEnabled::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::DoorState::Id: { // type is DlDoorState - MN::DoorState::TypeInfo::Type value; - UN::DoorState::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::DoorOpenEvents::Id: { // type is int32u - MN::DoorOpenEvents::TypeInfo::Type value; - UN::DoorOpenEvents::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::DoorClosedEvents::Id: { // type is int32u - MN::DoorClosedEvents::TypeInfo::Type value; - UN::DoorClosedEvents::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::OpenPeriod::Id: { // type is int16u - MN::OpenPeriod::TypeInfo::Type value; - UN::OpenPeriod::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::NumberOfTotalUsersSupported::Id: { // type is int16u - MN::NumberOfTotalUsersSupported::TypeInfo::Type value; - UN::NumberOfTotalUsersSupported::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::NumberOfPINUsersSupported::Id: { // type is int16u - MN::NumberOfPINUsersSupported::TypeInfo::Type value; - UN::NumberOfPINUsersSupported::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::NumberOfRFIDUsersSupported::Id: { // type is int16u - MN::NumberOfRFIDUsersSupported::TypeInfo::Type value; - UN::NumberOfRFIDUsersSupported::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::NumberOfWeekDaySchedulesSupportedPerUser::Id: { // type is int8u - MN::NumberOfWeekDaySchedulesSupportedPerUser::TypeInfo::Type value; - UN::NumberOfWeekDaySchedulesSupportedPerUser::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::NumberOfYearDaySchedulesSupportedPerUser::Id: { // type is int8u - MN::NumberOfYearDaySchedulesSupportedPerUser::TypeInfo::Type value; - UN::NumberOfYearDaySchedulesSupportedPerUser::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::NumberOfHolidaySchedulesSupported::Id: { // type is int8u - MN::NumberOfHolidaySchedulesSupported::TypeInfo::Type value; - UN::NumberOfHolidaySchedulesSupported::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::MaxPINCodeLength::Id: { // type is int8u - MN::MaxPINCodeLength::TypeInfo::Type value; - UN::MaxPINCodeLength::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::MinPINCodeLength::Id: { // type is int8u - MN::MinPINCodeLength::TypeInfo::Type value; - UN::MinPINCodeLength::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::MaxRFIDCodeLength::Id: { // type is int8u - MN::MaxRFIDCodeLength::TypeInfo::Type value; - UN::MaxRFIDCodeLength::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::MinRFIDCodeLength::Id: { // type is int8u - MN::MinRFIDCodeLength::TypeInfo::Type value; - UN::MinRFIDCodeLength::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::CredentialRulesSupport::Id: { // type is DlCredentialRuleMask - MN::CredentialRulesSupport::TypeInfo::Type value; - UN::CredentialRulesSupport::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::NumberOfCredentialsSupportedPerUser::Id: { // type is int8u - MN::NumberOfCredentialsSupportedPerUser::TypeInfo::Type value; - UN::NumberOfCredentialsSupportedPerUser::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::Language::Id: { // type is char_string - MN::Language::TypeInfo::Type value; - UN::Language::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::LEDSettings::Id: { // type is int8u - MN::LEDSettings::TypeInfo::Type value; - UN::LEDSettings::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::AutoRelockTime::Id: { // type is int32u - MN::AutoRelockTime::TypeInfo::Type value; - UN::AutoRelockTime::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::SoundVolume::Id: { // type is int8u - MN::SoundVolume::TypeInfo::Type value; - UN::SoundVolume::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::OperatingMode::Id: { // type is DlOperatingMode - MN::OperatingMode::TypeInfo::Type value; - UN::OperatingMode::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::SupportedOperatingModes::Id: { // type is DlSupportedOperatingModes - MN::SupportedOperatingModes::TypeInfo::Type value; - UN::SupportedOperatingModes::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::DefaultConfigurationRegister::Id: { // type is DlDefaultConfigurationRegister - MN::DefaultConfigurationRegister::TypeInfo::Type value; - UN::DefaultConfigurationRegister::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::EnableLocalProgramming::Id: { // type is boolean - MN::EnableLocalProgramming::TypeInfo::Type value; - UN::EnableLocalProgramming::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::EnableOneTouchLocking::Id: { // type is boolean - MN::EnableOneTouchLocking::TypeInfo::Type value; - UN::EnableOneTouchLocking::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::EnableInsideStatusLED::Id: { // type is boolean - MN::EnableInsideStatusLED::TypeInfo::Type value; - UN::EnableInsideStatusLED::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::EnablePrivacyModeButton::Id: { // type is boolean - MN::EnablePrivacyModeButton::TypeInfo::Type value; - UN::EnablePrivacyModeButton::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::LocalProgrammingFeatures::Id: { // type is DlLocalProgrammingFeatures - MN::LocalProgrammingFeatures::TypeInfo::Type value; - UN::LocalProgrammingFeatures::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::WrongCodeEntryLimit::Id: { // type is int8u - MN::WrongCodeEntryLimit::TypeInfo::Type value; - UN::WrongCodeEntryLimit::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::UserCodeTemporaryDisableTime::Id: { // type is int8u - MN::UserCodeTemporaryDisableTime::TypeInfo::Type value; - UN::UserCodeTemporaryDisableTime::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::SendPINOverTheAir::Id: { // type is boolean - MN::SendPINOverTheAir::TypeInfo::Type value; - UN::SendPINOverTheAir::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::RequirePINforRemoteOperation::Id: { // type is boolean - MN::RequirePINforRemoteOperation::TypeInfo::Type value; - UN::RequirePINforRemoteOperation::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::ExpiringUserTimeout::Id: { // type is int16u - MN::ExpiringUserTimeout::TypeInfo::Type value; - UN::ExpiringUserTimeout::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::FeatureMap::Id: { // type is bitmap32 - MN::FeatureMap::TypeInfo::Type value; - UN::FeatureMap::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::ClusterRevision::Id: { // type is int16u - MN::ClusterRevision::TypeInfo::Type value; - UN::ClusterRevision::Get(atr_path, value); - return aEncoder.Encode(value); - } - } - } catch (const std::out_of_range& e) { - sl_log_info(LOG_TAG, - "The request attribute Path for endpoint [%i] is not found in the attribute state " - "container: %s\n", - atr_path.mEndpointId, e.what()); - return CHIP_ERROR_NO_MESSAGE_HANDLER; - } - return CHIP_NO_ERROR; + + if( m_node_state_monitor.emulator().is_attribute_emulated(aPath) ) { + return m_node_state_monitor.emulator().read_attribute(aPath,aEncoder); + } + + try { + switch (aPath.mAttributeId) { + case MN::LockState::Id: { // type is DlLockState + MN::LockState::TypeInfo::Type value; + UN::LockState::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::LockType::Id: { // type is DlLockType + MN::LockType::TypeInfo::Type value; + UN::LockType::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::ActuatorEnabled::Id: { // type is boolean + MN::ActuatorEnabled::TypeInfo::Type value; + UN::ActuatorEnabled::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::DoorState::Id: { // type is DlDoorState + MN::DoorState::TypeInfo::Type value; + UN::DoorState::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::DoorOpenEvents::Id: { // type is int32u + MN::DoorOpenEvents::TypeInfo::Type value; + UN::DoorOpenEvents::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::DoorClosedEvents::Id: { // type is int32u + MN::DoorClosedEvents::TypeInfo::Type value; + UN::DoorClosedEvents::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::OpenPeriod::Id: { // type is int16u + MN::OpenPeriod::TypeInfo::Type value; + UN::OpenPeriod::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::NumberOfTotalUsersSupported::Id: { // type is int16u + MN::NumberOfTotalUsersSupported::TypeInfo::Type value; + UN::NumberOfTotalUsersSupported::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::NumberOfPINUsersSupported::Id: { // type is int16u + MN::NumberOfPINUsersSupported::TypeInfo::Type value; + UN::NumberOfPINUsersSupported::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::NumberOfRFIDUsersSupported::Id: { // type is int16u + MN::NumberOfRFIDUsersSupported::TypeInfo::Type value; + UN::NumberOfRFIDUsersSupported::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::NumberOfWeekDaySchedulesSupportedPerUser::Id: { // type is int8u + MN::NumberOfWeekDaySchedulesSupportedPerUser::TypeInfo::Type value; + UN::NumberOfWeekDaySchedulesSupportedPerUser::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::NumberOfYearDaySchedulesSupportedPerUser::Id: { // type is int8u + MN::NumberOfYearDaySchedulesSupportedPerUser::TypeInfo::Type value; + UN::NumberOfYearDaySchedulesSupportedPerUser::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::NumberOfHolidaySchedulesSupported::Id: { // type is int8u + MN::NumberOfHolidaySchedulesSupported::TypeInfo::Type value; + UN::NumberOfHolidaySchedulesSupported::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::MaxPINCodeLength::Id: { // type is int8u + MN::MaxPINCodeLength::TypeInfo::Type value; + UN::MaxPINCodeLength::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::MinPINCodeLength::Id: { // type is int8u + MN::MinPINCodeLength::TypeInfo::Type value; + UN::MinPINCodeLength::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::MaxRFIDCodeLength::Id: { // type is int8u + MN::MaxRFIDCodeLength::TypeInfo::Type value; + UN::MaxRFIDCodeLength::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::MinRFIDCodeLength::Id: { // type is int8u + MN::MinRFIDCodeLength::TypeInfo::Type value; + UN::MinRFIDCodeLength::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::CredentialRulesSupport::Id: { // type is DlCredentialRuleMask + MN::CredentialRulesSupport::TypeInfo::Type value; + UN::CredentialRulesSupport::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::NumberOfCredentialsSupportedPerUser::Id: { // type is int8u + MN::NumberOfCredentialsSupportedPerUser::TypeInfo::Type value; + UN::NumberOfCredentialsSupportedPerUser::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::Language::Id: { // type is char_string + MN::Language::TypeInfo::Type value; + UN::Language::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::LEDSettings::Id: { // type is int8u + MN::LEDSettings::TypeInfo::Type value; + UN::LEDSettings::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::AutoRelockTime::Id: { // type is int32u + MN::AutoRelockTime::TypeInfo::Type value; + UN::AutoRelockTime::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::SoundVolume::Id: { // type is int8u + MN::SoundVolume::TypeInfo::Type value; + UN::SoundVolume::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::OperatingMode::Id: { // type is DlOperatingMode + MN::OperatingMode::TypeInfo::Type value; + UN::OperatingMode::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::SupportedOperatingModes::Id: { // type is DlSupportedOperatingModes + MN::SupportedOperatingModes::TypeInfo::Type value; + UN::SupportedOperatingModes::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::DefaultConfigurationRegister::Id: { // type is DlDefaultConfigurationRegister + MN::DefaultConfigurationRegister::TypeInfo::Type value; + UN::DefaultConfigurationRegister::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::EnableLocalProgramming::Id: { // type is boolean + MN::EnableLocalProgramming::TypeInfo::Type value; + UN::EnableLocalProgramming::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::EnableOneTouchLocking::Id: { // type is boolean + MN::EnableOneTouchLocking::TypeInfo::Type value; + UN::EnableOneTouchLocking::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::EnableInsideStatusLED::Id: { // type is boolean + MN::EnableInsideStatusLED::TypeInfo::Type value; + UN::EnableInsideStatusLED::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::EnablePrivacyModeButton::Id: { // type is boolean + MN::EnablePrivacyModeButton::TypeInfo::Type value; + UN::EnablePrivacyModeButton::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::LocalProgrammingFeatures::Id: { // type is DlLocalProgrammingFeatures + MN::LocalProgrammingFeatures::TypeInfo::Type value; + UN::LocalProgrammingFeatures::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::WrongCodeEntryLimit::Id: { // type is int8u + MN::WrongCodeEntryLimit::TypeInfo::Type value; + UN::WrongCodeEntryLimit::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::UserCodeTemporaryDisableTime::Id: { // type is int8u + MN::UserCodeTemporaryDisableTime::TypeInfo::Type value; + UN::UserCodeTemporaryDisableTime::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::SendPINOverTheAir::Id: { // type is boolean + MN::SendPINOverTheAir::TypeInfo::Type value; + UN::SendPINOverTheAir::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::RequirePINforRemoteOperation::Id: { // type is boolean + MN::RequirePINforRemoteOperation::TypeInfo::Type value; + UN::RequirePINforRemoteOperation::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::ExpiringUserTimeout::Id: { // type is int16u + MN::ExpiringUserTimeout::TypeInfo::Type value; + UN::ExpiringUserTimeout::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::FeatureMap::Id: { // type is bitmap32 + MN::FeatureMap::TypeInfo::Type value; + UN::FeatureMap::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::ClusterRevision::Id: { // type is int16u + MN::ClusterRevision::TypeInfo::Type value; + UN::ClusterRevision::Get(atr_path, value); + return aEncoder.Encode(value); + } + } + } catch (const std::out_of_range &e) { + sl_log_info( + LOG_TAG, + "The request attribute Path for endpoint [%i] is not found in the attribute state " + "container: %s\n", atr_path.mEndpointId, e.what()); + return CHIP_ERROR_NO_MESSAGE_HANDLER; + } + return CHIP_NO_ERROR; } -CHIP_ERROR DoorLockAttributeAccess::Write(const ConcreteDataAttributePath& aPath, AttributeValueDecoder& aDecoder) +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; + using namespace chip::app::Clusters::DoorLock; - if (m_node_state_monitor.emulator().is_attribute_emulated(aPath)) { - return m_node_state_monitor.emulator().write_attribute(aPath, aDecoder); - } - - switch (aPath.mAttributeId) { - // LockState is not supported by UCL - // LockType is not supported by UCL - // ActuatorEnabled is not supported by UCL - // DoorState is not supported by UCL - case Attributes::DoorOpenEvents::Id: { - - Attributes::DoorOpenEvents::TypeInfo::DecodableType value; - aDecoder.Decode(value); - jsn["value"] = to_json(value); - attribute_name = "DoorOpenEvents"; - break; - } - case Attributes::DoorClosedEvents::Id: { - - Attributes::DoorClosedEvents::TypeInfo::DecodableType value; - aDecoder.Decode(value); - jsn["value"] = to_json(value); - attribute_name = "DoorClosedEvents"; - break; - } - case Attributes::OpenPeriod::Id: { - - Attributes::OpenPeriod::TypeInfo::DecodableType value; - aDecoder.Decode(value); - jsn["value"] = to_json(value); - attribute_name = "OpenPeriod"; - break; - } - // NumberOfTotalUsersSupported is not supported by UCL - // NumberOfPINUsersSupported is not supported by UCL - // NumberOfRFIDUsersSupported is not supported by UCL - // NumberOfWeekDaySchedulesSupportedPerUser is not supported by UCL - // NumberOfYearDaySchedulesSupportedPerUser is not supported by UCL - // NumberOfHolidaySchedulesSupported is not supported by UCL - // MaxPINCodeLength is not supported by UCL - // MinPINCodeLength is not supported by UCL - // MaxRFIDCodeLength is not supported by UCL - // MinRFIDCodeLength is not supported by UCL - // CredentialRulesSupport is not supported by UCL - // NumberOfCredentialsSupportedPerUser is not supported by UCL - case Attributes::Language::Id: { - - Attributes::Language::TypeInfo::DecodableType value; - aDecoder.Decode(value); - jsn["value"] = to_json(value); - attribute_name = "Language"; - break; - } - case Attributes::LEDSettings::Id: { - - Attributes::LEDSettings::TypeInfo::DecodableType value; - aDecoder.Decode(value); - jsn["value"] = to_json(value); - attribute_name = "LEDSettings"; - break; - } - case Attributes::AutoRelockTime::Id: { - - Attributes::AutoRelockTime::TypeInfo::DecodableType value; - aDecoder.Decode(value); - jsn["value"] = to_json(value); - attribute_name = "AutoRelockTime"; - break; - } - case Attributes::SoundVolume::Id: { - - Attributes::SoundVolume::TypeInfo::DecodableType value; - aDecoder.Decode(value); - jsn["value"] = to_json(value); - attribute_name = "SoundVolume"; - break; - } - case Attributes::OperatingMode::Id: { - - Attributes::OperatingMode::TypeInfo::DecodableType value; - aDecoder.Decode(value); - jsn["value"] = to_json(value); - attribute_name = "OperatingMode"; - break; - } - // SupportedOperatingModes is not supported by UCL - // DefaultConfigurationRegister is not supported by UCL - case Attributes::EnableLocalProgramming::Id: { - - Attributes::EnableLocalProgramming::TypeInfo::DecodableType value; - aDecoder.Decode(value); - jsn["value"] = to_json(value); - attribute_name = "EnableLocalProgramming"; - break; - } - case Attributes::EnableOneTouchLocking::Id: { - - Attributes::EnableOneTouchLocking::TypeInfo::DecodableType value; - aDecoder.Decode(value); - jsn["value"] = to_json(value); - attribute_name = "EnableOneTouchLocking"; - break; - } - case Attributes::EnableInsideStatusLED::Id: { - - Attributes::EnableInsideStatusLED::TypeInfo::DecodableType value; - aDecoder.Decode(value); - jsn["value"] = to_json(value); - attribute_name = "EnableInsideStatusLED"; - break; - } - case Attributes::EnablePrivacyModeButton::Id: { - - Attributes::EnablePrivacyModeButton::TypeInfo::DecodableType value; - aDecoder.Decode(value); - jsn["value"] = to_json(value); - attribute_name = "EnablePrivacyModeButton"; - break; - } - case Attributes::WrongCodeEntryLimit::Id: { - - Attributes::WrongCodeEntryLimit::TypeInfo::DecodableType value; - aDecoder.Decode(value); - jsn["value"] = to_json(value); - attribute_name = "WrongCodeEntryLimit"; - break; - } - case Attributes::UserCodeTemporaryDisableTime::Id: { - - Attributes::UserCodeTemporaryDisableTime::TypeInfo::DecodableType value; - aDecoder.Decode(value); - jsn["value"] = to_json(value); - attribute_name = "UserCodeTemporaryDisableTime"; - break; - } - case Attributes::SendPINOverTheAir::Id: { - - Attributes::SendPINOverTheAir::TypeInfo::DecodableType value; - aDecoder.Decode(value); - jsn["value"] = to_json(value); - attribute_name = "SendPINOverTheAir"; - break; - } - case Attributes::RequirePINforRemoteOperation::Id: { - - Attributes::RequirePINforRemoteOperation::TypeInfo::DecodableType value; - aDecoder.Decode(value); - jsn["value"] = to_json(value); - attribute_name = "RequirePINforRFOperation"; - break; - } - // GeneratedCommandList is not supported by UCL - // AcceptedCommandList is not supported by UCL - // AttributeList is not supported by UCL - // FeatureMap is not supported by UCL - // ClusterRevision is not supported by UCL - } - - 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(); - m_unify_mqtt.Publish(topic, payload_str, true); - return CHIP_NO_ERROR; - } + 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; + + if( m_node_state_monitor.emulator().is_attribute_emulated(aPath) ) { + return m_node_state_monitor.emulator().write_attribute(aPath,aDecoder); + } + + switch (aPath.mAttributeId) { + // LockState is not supported by UCL + // LockType is not supported by UCL + // ActuatorEnabled is not supported by UCL + // DoorState is not supported by UCL + case Attributes::DoorOpenEvents::Id: { + + Attributes::DoorOpenEvents::TypeInfo::DecodableType value; + aDecoder.Decode(value); + jsn["value"] = to_json(value); + attribute_name = "DoorOpenEvents"; + break; + } + case Attributes::DoorClosedEvents::Id: { + + Attributes::DoorClosedEvents::TypeInfo::DecodableType value; + aDecoder.Decode(value); + jsn["value"] = to_json(value); + attribute_name = "DoorClosedEvents"; + break; + } + case Attributes::OpenPeriod::Id: { + + Attributes::OpenPeriod::TypeInfo::DecodableType value; + aDecoder.Decode(value); + jsn["value"] = to_json(value); + attribute_name = "OpenPeriod"; + break; + } + // NumberOfTotalUsersSupported is not supported by UCL + // NumberOfPINUsersSupported is not supported by UCL + // NumberOfRFIDUsersSupported is not supported by UCL + // NumberOfWeekDaySchedulesSupportedPerUser is not supported by UCL + // NumberOfYearDaySchedulesSupportedPerUser is not supported by UCL + // NumberOfHolidaySchedulesSupported is not supported by UCL + // MaxPINCodeLength is not supported by UCL + // MinPINCodeLength is not supported by UCL + // MaxRFIDCodeLength is not supported by UCL + // MinRFIDCodeLength is not supported by UCL + // CredentialRulesSupport is not supported by UCL + // NumberOfCredentialsSupportedPerUser is not supported by UCL + case Attributes::Language::Id: { + + Attributes::Language::TypeInfo::DecodableType value; + aDecoder.Decode(value); + jsn["value"] = to_json(value); + attribute_name = "Language"; + break; + } + case Attributes::LEDSettings::Id: { + + Attributes::LEDSettings::TypeInfo::DecodableType value; + aDecoder.Decode(value); + jsn["value"] = to_json(value); + attribute_name = "LEDSettings"; + break; + } + case Attributes::AutoRelockTime::Id: { + + Attributes::AutoRelockTime::TypeInfo::DecodableType value; + aDecoder.Decode(value); + jsn["value"] = to_json(value); + attribute_name = "AutoRelockTime"; + break; + } + case Attributes::SoundVolume::Id: { + + Attributes::SoundVolume::TypeInfo::DecodableType value; + aDecoder.Decode(value); + jsn["value"] = to_json(value); + attribute_name = "SoundVolume"; + break; + } + case Attributes::OperatingMode::Id: { + + Attributes::OperatingMode::TypeInfo::DecodableType value; + aDecoder.Decode(value); + jsn["value"] = to_json(value); + attribute_name = "OperatingMode"; + break; + } + // SupportedOperatingModes is not supported by UCL + // DefaultConfigurationRegister is not supported by UCL + case Attributes::EnableLocalProgramming::Id: { + + Attributes::EnableLocalProgramming::TypeInfo::DecodableType value; + aDecoder.Decode(value); + jsn["value"] = to_json(value); + attribute_name = "EnableLocalProgramming"; + break; + } + case Attributes::EnableOneTouchLocking::Id: { + + Attributes::EnableOneTouchLocking::TypeInfo::DecodableType value; + aDecoder.Decode(value); + jsn["value"] = to_json(value); + attribute_name = "EnableOneTouchLocking"; + break; + } + case Attributes::EnableInsideStatusLED::Id: { + + Attributes::EnableInsideStatusLED::TypeInfo::DecodableType value; + aDecoder.Decode(value); + jsn["value"] = to_json(value); + attribute_name = "EnableInsideStatusLED"; + break; + } + case Attributes::EnablePrivacyModeButton::Id: { + + Attributes::EnablePrivacyModeButton::TypeInfo::DecodableType value; + aDecoder.Decode(value); + jsn["value"] = to_json(value); + attribute_name = "EnablePrivacyModeButton"; + break; + } + case Attributes::WrongCodeEntryLimit::Id: { + + Attributes::WrongCodeEntryLimit::TypeInfo::DecodableType value; + aDecoder.Decode(value); + jsn["value"] = to_json(value); + attribute_name = "WrongCodeEntryLimit"; + break; + } + case Attributes::UserCodeTemporaryDisableTime::Id: { + + Attributes::UserCodeTemporaryDisableTime::TypeInfo::DecodableType value; + aDecoder.Decode(value); + jsn["value"] = to_json(value); + attribute_name = "UserCodeTemporaryDisableTime"; + break; + } + case Attributes::SendPINOverTheAir::Id: { + + Attributes::SendPINOverTheAir::TypeInfo::DecodableType value; + aDecoder.Decode(value); + jsn["value"] = to_json(value); + attribute_name = "SendPINOverTheAir"; + break; + } + case Attributes::RequirePINforRemoteOperation::Id: { + + Attributes::RequirePINforRemoteOperation::TypeInfo::DecodableType value; + aDecoder.Decode(value); + jsn["value"] = to_json(value); + attribute_name = "RequirePINforRFOperation"; + break; + } + // GeneratedCommandList is not supported by UCL + // AcceptedCommandList is not supported by UCL + // AttributeList is not supported by UCL + // FeatureMap is not supported by UCL + // ClusterRevision is not supported by UCL + } + + 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(); + m_unify_mqtt.Publish(topic, + payload_str, + true); + return CHIP_NO_ERROR; + } + + return CHIP_ERROR_NO_MESSAGE_HANDLER; } -void DoorLockAttributeAccess::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::DoorLock::Attributes; - namespace UN = unify::matter_bridge::DoorLock::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); + auto cluster_id = device_translator::instance().get_cluster_id(cluster); - if (!cluster_id.has_value() || (cluster_id.value() != Clusters::DoorLock::Id)) { - return; - } + 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); + // get attribute id + auto attribute_id + = device_translator::instance().get_attribute_id(cluster, attribute); - if (!attribute_id.has_value()) { - return; - } + 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()) { + 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); - } - break; + 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); + } + 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); - } - break; + 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); + } + 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); - } - break; + 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); + } + 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); - } - break; + 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); + } + 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); - } - break; + 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); + } + 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); - } - break; + 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); + } + 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); - } - break; + 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); + } + 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); - } - break; + 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); + } + 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); - } - break; + 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); + } + 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); - } - break; + 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); + } + 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); - } - break; + 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); + } + 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); - } - break; + 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); + } + 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); - } - break; + 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); + } + 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); - } - break; + 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); + } + 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); - } - break; + 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); + } + 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); - } - break; + 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); + } + 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); - } - break; + 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); + } + 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); - } - break; + 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); + } + 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); - } - break; + 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); + } + 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); - } - break; + 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); + } + 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); - } - break; + 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); + } + 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); - } - break; + 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); + } + 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); - } - break; + 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); + } + 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); - } - break; + 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); + } + 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); - } - break; + 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); + } + 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); - } - break; + 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); + } + 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); - } - break; + 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); + } + 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); - } - break; + 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); + } + 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); - } - break; + 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); + } + 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); - } - break; + 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); + } + 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); - } - break; + 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); + } + 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); - } - break; - } - } + 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); + } + break; + } + } } CHIP_ERROR -BarrierControlAttributeAccess::Read(const ConcreteReadAttributePath& aPath, AttributeValueEncoder& aEncoder) +BarrierControlAttributeAccess::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) { - return CHIP_ERROR_INVALID_ARGUMENT; - } - - ConcreteAttributePath atr_path = ConcreteAttributePath(aPath.mEndpointId, aPath.mClusterId, aPath.mAttributeId); - - if (m_node_state_monitor.emulator().is_attribute_emulated(aPath)) { - return m_node_state_monitor.emulator().read_attribute(aPath, aEncoder); - } - - try { - switch (aPath.mAttributeId) { - case MN::BarrierMovingState::Id: { // type is enum8 - MN::BarrierMovingState::TypeInfo::Type value; - UN::BarrierMovingState::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::BarrierSafetyStatus::Id: { // type is bitmap16 - MN::BarrierSafetyStatus::TypeInfo::Type value; - UN::BarrierSafetyStatus::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::BarrierCapabilities::Id: { // type is bitmap8 - MN::BarrierCapabilities::TypeInfo::Type value; - UN::BarrierCapabilities::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::BarrierOpenEvents::Id: { // type is int16u - MN::BarrierOpenEvents::TypeInfo::Type value; - UN::BarrierOpenEvents::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::BarrierCloseEvents::Id: { // type is int16u - MN::BarrierCloseEvents::TypeInfo::Type value; - UN::BarrierCloseEvents::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::BarrierCommandOpenEvents::Id: { // type is int16u - MN::BarrierCommandOpenEvents::TypeInfo::Type value; - UN::BarrierCommandOpenEvents::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::BarrierCommandCloseEvents::Id: { // type is int16u - MN::BarrierCommandCloseEvents::TypeInfo::Type value; - UN::BarrierCommandCloseEvents::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::BarrierOpenPeriod::Id: { // type is int16u - MN::BarrierOpenPeriod::TypeInfo::Type value; - UN::BarrierOpenPeriod::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::BarrierClosePeriod::Id: { // type is int16u - MN::BarrierClosePeriod::TypeInfo::Type value; - UN::BarrierClosePeriod::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::BarrierPosition::Id: { // type is int8u - MN::BarrierPosition::TypeInfo::Type value; - UN::BarrierPosition::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::FeatureMap::Id: { // type is bitmap32 - MN::FeatureMap::TypeInfo::Type value; - UN::FeatureMap::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::ClusterRevision::Id: { // type is int16u - MN::ClusterRevision::TypeInfo::Type value; - UN::ClusterRevision::Get(atr_path, value); - return aEncoder.Encode(value); - } - } - } catch (const std::out_of_range& e) { - sl_log_info(LOG_TAG, - "The request attribute Path for endpoint [%i] is not found in the attribute state " - "container: %s\n", - atr_path.mEndpointId, e.what()); - return CHIP_ERROR_NO_MESSAGE_HANDLER; - } + 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; + } + // Do not handle Read for non-unify endpoints + auto unify_node = m_node_state_monitor.bridged_endpoint(aPath.mEndpointId); + + if (!unify_node) { return CHIP_NO_ERROR; -} - -CHIP_ERROR BarrierControlAttributeAccess::Write(const ConcreteDataAttributePath& aPath, AttributeValueDecoder& aDecoder) -{ - using namespace chip::app::Clusters::BarrierControl; - - if (aPath.mClusterId != Clusters::BarrierControl::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; - if (m_node_state_monitor.emulator().is_attribute_emulated(aPath)) { - return m_node_state_monitor.emulator().write_attribute(aPath, aDecoder); - } + ConcreteAttributePath atr_path = ConcreteAttributePath(aPath.mEndpointId, + aPath.mClusterId, + aPath.mAttributeId); + + if( m_node_state_monitor.emulator().is_attribute_emulated(aPath) ) { + return m_node_state_monitor.emulator().read_attribute(aPath,aEncoder); + } + + try { switch (aPath.mAttributeId) { - // barrier moving state is not supported by UCL - // barrier safety status is not supported by UCL - // barrier capabilities is not supported by UCL - case Attributes::BarrierOpenEvents::Id: { - - Attributes::BarrierOpenEvents::TypeInfo::DecodableType value; - aDecoder.Decode(value); - jsn["value"] = to_json(value); - attribute_name = "OpenEvents"; - break; - } - case Attributes::BarrierCloseEvents::Id: { - - Attributes::BarrierCloseEvents::TypeInfo::DecodableType value; - aDecoder.Decode(value); - jsn["value"] = to_json(value); - attribute_name = "CloseEvents"; - break; - } - case Attributes::BarrierCommandOpenEvents::Id: { - - Attributes::BarrierCommandOpenEvents::TypeInfo::DecodableType value; - aDecoder.Decode(value); - jsn["value"] = to_json(value); - attribute_name = "CommandOpenEvents"; - break; - } - case Attributes::BarrierCommandCloseEvents::Id: { - - Attributes::BarrierCommandCloseEvents::TypeInfo::DecodableType value; - aDecoder.Decode(value); - jsn["value"] = to_json(value); - attribute_name = "CommandCloseEvents"; - break; - } - case Attributes::BarrierOpenPeriod::Id: { - - Attributes::BarrierOpenPeriod::TypeInfo::DecodableType value; - aDecoder.Decode(value); - jsn["value"] = to_json(value); - attribute_name = "OpenPeriod"; - break; - } - case Attributes::BarrierClosePeriod::Id: { + case MN::BarrierMovingState::Id: { // type is enum8 + MN::BarrierMovingState::TypeInfo::Type value; + UN::BarrierMovingState::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::BarrierSafetyStatus::Id: { // type is bitmap16 + MN::BarrierSafetyStatus::TypeInfo::Type value; + UN::BarrierSafetyStatus::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::BarrierCapabilities::Id: { // type is bitmap8 + MN::BarrierCapabilities::TypeInfo::Type value; + UN::BarrierCapabilities::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::BarrierOpenEvents::Id: { // type is int16u + MN::BarrierOpenEvents::TypeInfo::Type value; + UN::BarrierOpenEvents::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::BarrierCloseEvents::Id: { // type is int16u + MN::BarrierCloseEvents::TypeInfo::Type value; + UN::BarrierCloseEvents::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::BarrierCommandOpenEvents::Id: { // type is int16u + MN::BarrierCommandOpenEvents::TypeInfo::Type value; + UN::BarrierCommandOpenEvents::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::BarrierCommandCloseEvents::Id: { // type is int16u + MN::BarrierCommandCloseEvents::TypeInfo::Type value; + UN::BarrierCommandCloseEvents::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::BarrierOpenPeriod::Id: { // type is int16u + MN::BarrierOpenPeriod::TypeInfo::Type value; + UN::BarrierOpenPeriod::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::BarrierClosePeriod::Id: { // type is int16u + MN::BarrierClosePeriod::TypeInfo::Type value; + UN::BarrierClosePeriod::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::BarrierPosition::Id: { // type is int8u + MN::BarrierPosition::TypeInfo::Type value; + UN::BarrierPosition::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::FeatureMap::Id: { // type is bitmap32 + MN::FeatureMap::TypeInfo::Type value; + UN::FeatureMap::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::ClusterRevision::Id: { // type is int16u + MN::ClusterRevision::TypeInfo::Type value; + UN::ClusterRevision::Get(atr_path, value); + return aEncoder.Encode(value); + } + } + } catch (const std::out_of_range &e) { + sl_log_info( + LOG_TAG, + "The request attribute Path for endpoint [%i] is not found in the attribute state " + "container: %s\n", atr_path.mEndpointId, e.what()); + return CHIP_ERROR_NO_MESSAGE_HANDLER; + } + return CHIP_NO_ERROR; +} - Attributes::BarrierClosePeriod::TypeInfo::DecodableType value; - aDecoder.Decode(value); - jsn["value"] = to_json(value); - attribute_name = "ClosePeriod"; - break; - } - // barrier position is not supported by UCL - // GeneratedCommandList is not supported by UCL - // AcceptedCommandList is not supported by UCL - // AttributeList is not supported by UCL - // FeatureMap is not supported by UCL - // ClusterRevision is not supported by UCL - } +CHIP_ERROR BarrierControlAttributeAccess::Write(const ConcreteDataAttributePath &aPath, + AttributeValueDecoder &aDecoder) +{ + using namespace chip::app::Clusters::BarrierControl; - 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"; - payload_str = jsn.dump(); - m_unify_mqtt.Publish(topic, payload_str, true); - return CHIP_NO_ERROR; - } + if (aPath.mClusterId != Clusters::BarrierControl::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; + + if( m_node_state_monitor.emulator().is_attribute_emulated(aPath) ) { + return m_node_state_monitor.emulator().write_attribute(aPath,aDecoder); + } + + switch (aPath.mAttributeId) { + // barrier moving state is not supported by UCL + // barrier safety status is not supported by UCL + // barrier capabilities is not supported by UCL + case Attributes::BarrierOpenEvents::Id: { + + Attributes::BarrierOpenEvents::TypeInfo::DecodableType value; + aDecoder.Decode(value); + jsn["value"] = to_json(value); + attribute_name = "OpenEvents"; + break; + } + case Attributes::BarrierCloseEvents::Id: { + + Attributes::BarrierCloseEvents::TypeInfo::DecodableType value; + aDecoder.Decode(value); + jsn["value"] = to_json(value); + attribute_name = "CloseEvents"; + break; + } + case Attributes::BarrierCommandOpenEvents::Id: { + + Attributes::BarrierCommandOpenEvents::TypeInfo::DecodableType value; + aDecoder.Decode(value); + jsn["value"] = to_json(value); + attribute_name = "CommandOpenEvents"; + break; + } + case Attributes::BarrierCommandCloseEvents::Id: { + + Attributes::BarrierCommandCloseEvents::TypeInfo::DecodableType value; + aDecoder.Decode(value); + jsn["value"] = to_json(value); + attribute_name = "CommandCloseEvents"; + break; + } + case Attributes::BarrierOpenPeriod::Id: { + + Attributes::BarrierOpenPeriod::TypeInfo::DecodableType value; + aDecoder.Decode(value); + jsn["value"] = to_json(value); + attribute_name = "OpenPeriod"; + break; + } + case Attributes::BarrierClosePeriod::Id: { + + Attributes::BarrierClosePeriod::TypeInfo::DecodableType value; + aDecoder.Decode(value); + jsn["value"] = to_json(value); + attribute_name = "ClosePeriod"; + break; + } + // barrier position is not supported by UCL + // GeneratedCommandList is not supported by UCL + // AcceptedCommandList is not supported by UCL + // AttributeList is not supported by UCL + // FeatureMap is not supported by UCL + // ClusterRevision is not supported by UCL + } + + 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"; + payload_str = jsn.dump(); + m_unify_mqtt.Publish(topic, + payload_str, + true); + return CHIP_NO_ERROR; + } + + return CHIP_ERROR_NO_MESSAGE_HANDLER; } -void BarrierControlAttributeAccess::reported_updated(const bridged_endpoint* ep, const std::string& cluster, - const std::string& attribute, const nlohmann::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; + namespace MN = chip::app::Clusters::BarrierControl::Attributes; + namespace UN = unify::matter_bridge::BarrierControl::Attributes; - auto cluster_id = device_translator::instance().get_cluster_id(cluster); + auto cluster_id = device_translator::instance().get_cluster_id(cluster); - if (!cluster_id.has_value() || (cluster_id.value() != Clusters::BarrierControl::Id)) { - return; - } + if (!cluster_id.has_value() || (cluster_id.value() != Clusters::BarrierControl::Id)) { + return; + } - // get attribute id - auto attribute_id = device_translator::instance().get_attribute_id(cluster, attribute); + // get attribute id + auto attribute_id + = device_translator::instance().get_attribute_id(cluster, attribute); - if (!attribute_id.has_value()) { - return; - } + if (!attribute_id.has_value()) { + return; + } - chip::EndpointId node_matter_endpoint = ep->matter_endpoint; - ConcreteAttributePath attrpath = ConcreteAttributePath(node_matter_endpoint, Clusters::BarrierControl::Id, attribute_id.value()); - switch (attribute_id.value()) { + 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, "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); - } - break; + using T = MN::BarrierMovingState::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); + } + break; } // 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, "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); - } - break; + using T = MN::BarrierSafetyStatus::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); + } + break; } // 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, "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); - } - break; + using T = MN::BarrierCapabilities::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); + } + break; } // 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, "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); - } - break; + using T = MN::BarrierOpenEvents::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); + } + break; } // type is int16u 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, "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); - } - break; + using T = MN::BarrierCloseEvents::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); + } + break; } // 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, "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); - } - break; + using T = MN::BarrierCommandOpenEvents::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); + } + break; } // 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, "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); - } - break; + using T = MN::BarrierCommandCloseEvents::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); + } + break; } // 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, "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); - } - break; + using T = MN::BarrierOpenPeriod::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); + } + break; } // 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, "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); - } - break; + using T = MN::BarrierClosePeriod::TypeInfo::Type; + std::optional value = from_json(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); + } + break; } // 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, "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); - } - break; - } - } + using T = MN::BarrierPosition::TypeInfo::Type; + std::optional value = from_json(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); + } + break; + } + } } CHIP_ERROR -ThermostatAttributeAccess::Read(const ConcreteReadAttributePath& aPath, AttributeValueEncoder& aEncoder) +ThermostatAttributeAccess::Read(const ConcreteReadAttributePath &aPath, + AttributeValueEncoder &aEncoder) { - namespace MN = chip::app::Clusters::Thermostat::Attributes; - namespace UN = unify::matter_bridge::Thermostat::Attributes; - if (aPath.mClusterId != Clusters::Thermostat::Id) { - return CHIP_ERROR_INVALID_ARGUMENT; - } + namespace MN = chip::app::Clusters::Thermostat::Attributes; + namespace UN = unify::matter_bridge::Thermostat::Attributes; + if (aPath.mClusterId != Clusters::Thermostat::Id) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + // Do not handle Read for non-unify endpoints + auto unify_node = m_node_state_monitor.bridged_endpoint(aPath.mEndpointId); + + if (!unify_node) { + return CHIP_NO_ERROR; + } - ConcreteAttributePath atr_path = ConcreteAttributePath(aPath.mEndpointId, aPath.mClusterId, aPath.mAttributeId); - if (m_node_state_monitor.emulator().is_attribute_emulated(aPath)) { - return m_node_state_monitor.emulator().read_attribute(aPath, aEncoder); - } + ConcreteAttributePath atr_path = 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(atr_path, value); - return aEncoder.Encode(value); - } - case MN::OutdoorTemperature::Id: { // type is int16s - MN::OutdoorTemperature::TypeInfo::Type value; - UN::OutdoorTemperature::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::Occupancy::Id: { // type is bitmap8 - MN::Occupancy::TypeInfo::Type value; - UN::Occupancy::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::AbsMinHeatSetpointLimit::Id: { // type is int16s - MN::AbsMinHeatSetpointLimit::TypeInfo::Type value; - UN::AbsMinHeatSetpointLimit::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::AbsMaxHeatSetpointLimit::Id: { // type is int16s - MN::AbsMaxHeatSetpointLimit::TypeInfo::Type value; - UN::AbsMaxHeatSetpointLimit::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::AbsMinCoolSetpointLimit::Id: { // type is int16s - MN::AbsMinCoolSetpointLimit::TypeInfo::Type value; - UN::AbsMinCoolSetpointLimit::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::AbsMaxCoolSetpointLimit::Id: { // type is int16s - MN::AbsMaxCoolSetpointLimit::TypeInfo::Type value; - UN::AbsMaxCoolSetpointLimit::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::PICoolingDemand::Id: { // type is int8u - MN::PICoolingDemand::TypeInfo::Type value; - UN::PICoolingDemand::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::PIHeatingDemand::Id: { // type is int8u - MN::PIHeatingDemand::TypeInfo::Type value; - UN::PIHeatingDemand::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::HVACSystemTypeConfiguration::Id: { // type is bitmap8 - MN::HVACSystemTypeConfiguration::TypeInfo::Type value; - UN::HVACSystemTypeConfiguration::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::LocalTemperatureCalibration::Id: { // type is int8s - MN::LocalTemperatureCalibration::TypeInfo::Type value; - UN::LocalTemperatureCalibration::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::OccupiedCoolingSetpoint::Id: { // type is int16s - MN::OccupiedCoolingSetpoint::TypeInfo::Type value; - UN::OccupiedCoolingSetpoint::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::OccupiedHeatingSetpoint::Id: { // type is int16s - MN::OccupiedHeatingSetpoint::TypeInfo::Type value; - UN::OccupiedHeatingSetpoint::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::UnoccupiedCoolingSetpoint::Id: { // type is int16s - MN::UnoccupiedCoolingSetpoint::TypeInfo::Type value; - UN::UnoccupiedCoolingSetpoint::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::UnoccupiedHeatingSetpoint::Id: { // type is int16s - MN::UnoccupiedHeatingSetpoint::TypeInfo::Type value; - UN::UnoccupiedHeatingSetpoint::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::MinHeatSetpointLimit::Id: { // type is int16s - MN::MinHeatSetpointLimit::TypeInfo::Type value; - UN::MinHeatSetpointLimit::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::MaxHeatSetpointLimit::Id: { // type is int16s - MN::MaxHeatSetpointLimit::TypeInfo::Type value; - UN::MaxHeatSetpointLimit::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::MinCoolSetpointLimit::Id: { // type is int16s - MN::MinCoolSetpointLimit::TypeInfo::Type value; - UN::MinCoolSetpointLimit::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::MaxCoolSetpointLimit::Id: { // type is int16s - MN::MaxCoolSetpointLimit::TypeInfo::Type value; - UN::MaxCoolSetpointLimit::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::MinSetpointDeadBand::Id: { // type is int8s - MN::MinSetpointDeadBand::TypeInfo::Type value; - UN::MinSetpointDeadBand::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::RemoteSensing::Id: { // type is bitmap8 - MN::RemoteSensing::TypeInfo::Type value; - UN::RemoteSensing::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::ControlSequenceOfOperation::Id: { // type is ThermostatControlSequence - MN::ControlSequenceOfOperation::TypeInfo::Type value; - UN::ControlSequenceOfOperation::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::SystemMode::Id: { // type is enum8 - MN::SystemMode::TypeInfo::Type value; - UN::SystemMode::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::ThermostatRunningMode::Id: { // type is enum8 - MN::ThermostatRunningMode::TypeInfo::Type value; - UN::ThermostatRunningMode::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::StartOfWeek::Id: { // type is enum8 - MN::StartOfWeek::TypeInfo::Type value; - UN::StartOfWeek::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::NumberOfWeeklyTransitions::Id: { // type is int8u - MN::NumberOfWeeklyTransitions::TypeInfo::Type value; - UN::NumberOfWeeklyTransitions::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::NumberOfDailyTransitions::Id: { // type is int8u - MN::NumberOfDailyTransitions::TypeInfo::Type value; - UN::NumberOfDailyTransitions::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::TemperatureSetpointHold::Id: { // type is enum8 - MN::TemperatureSetpointHold::TypeInfo::Type value; - UN::TemperatureSetpointHold::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::TemperatureSetpointHoldDuration::Id: { // type is int16u - MN::TemperatureSetpointHoldDuration::TypeInfo::Type value; - UN::TemperatureSetpointHoldDuration::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::ThermostatProgrammingOperationMode::Id: { // type is bitmap8 - MN::ThermostatProgrammingOperationMode::TypeInfo::Type value; - UN::ThermostatProgrammingOperationMode::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::ThermostatRunningState::Id: { // type is bitmap16 - MN::ThermostatRunningState::TypeInfo::Type value; - UN::ThermostatRunningState::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::SetpointChangeSource::Id: { // type is enum8 - MN::SetpointChangeSource::TypeInfo::Type value; - UN::SetpointChangeSource::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::SetpointChangeAmount::Id: { // type is int16s - MN::SetpointChangeAmount::TypeInfo::Type value; - UN::SetpointChangeAmount::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::SetpointChangeSourceTimestamp::Id: { // type is utc - MN::SetpointChangeSourceTimestamp::TypeInfo::Type value; - UN::SetpointChangeSourceTimestamp::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::OccupiedSetback::Id: { // type is int8u - MN::OccupiedSetback::TypeInfo::Type value; - UN::OccupiedSetback::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::OccupiedSetbackMin::Id: { // type is int8u - MN::OccupiedSetbackMin::TypeInfo::Type value; - UN::OccupiedSetbackMin::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::OccupiedSetbackMax::Id: { // type is int8u - MN::OccupiedSetbackMax::TypeInfo::Type value; - UN::OccupiedSetbackMax::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::UnoccupiedSetback::Id: { // type is int8u - MN::UnoccupiedSetback::TypeInfo::Type value; - UN::UnoccupiedSetback::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::UnoccupiedSetbackMin::Id: { // type is int8u - MN::UnoccupiedSetbackMin::TypeInfo::Type value; - UN::UnoccupiedSetbackMin::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::UnoccupiedSetbackMax::Id: { // type is int8u - MN::UnoccupiedSetbackMax::TypeInfo::Type value; - UN::UnoccupiedSetbackMax::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::EmergencyHeatDelta::Id: { // type is int8u - MN::EmergencyHeatDelta::TypeInfo::Type value; - UN::EmergencyHeatDelta::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::ACType::Id: { // type is enum8 - MN::ACType::TypeInfo::Type value; - UN::ACType::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::ACCapacity::Id: { // type is int16u - MN::ACCapacity::TypeInfo::Type value; - UN::ACCapacity::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::ACRefrigerantType::Id: { // type is enum8 - MN::ACRefrigerantType::TypeInfo::Type value; - UN::ACRefrigerantType::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::ACCompressorType::Id: { // type is enum8 - MN::ACCompressorType::TypeInfo::Type value; - UN::ACCompressorType::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::ACErrorCode::Id: { // type is bitmap32 - MN::ACErrorCode::TypeInfo::Type value; - UN::ACErrorCode::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::ACLouverPosition::Id: { // type is enum8 - MN::ACLouverPosition::TypeInfo::Type value; - UN::ACLouverPosition::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::ACCoilTemperature::Id: { // type is int16s - MN::ACCoilTemperature::TypeInfo::Type value; - UN::ACCoilTemperature::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::ACCapacityformat::Id: { // type is enum8 - MN::ACCapacityformat::TypeInfo::Type value; - UN::ACCapacityformat::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::FeatureMap::Id: { // type is bitmap32 - MN::FeatureMap::TypeInfo::Type value; - UN::FeatureMap::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::ClusterRevision::Id: { // type is int16u - MN::ClusterRevision::TypeInfo::Type value; - UN::ClusterRevision::Get(atr_path, value); - return aEncoder.Encode(value); - } - } - } catch (const std::out_of_range& e) { - sl_log_info(LOG_TAG, - "The request attribute Path for endpoint [%i] is not found in the attribute state " - "container: %s\n", - atr_path.mEndpointId, e.what()); - return CHIP_ERROR_NO_MESSAGE_HANDLER; - } - return CHIP_NO_ERROR; + + if( m_node_state_monitor.emulator().is_attribute_emulated(aPath) ) { + return m_node_state_monitor.emulator().read_attribute(aPath,aEncoder); + } + + try { + switch (aPath.mAttributeId) { + case MN::LocalTemperature::Id: { // type is int16s + MN::LocalTemperature::TypeInfo::Type value; + UN::LocalTemperature::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::OutdoorTemperature::Id: { // type is int16s + MN::OutdoorTemperature::TypeInfo::Type value; + UN::OutdoorTemperature::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::Occupancy::Id: { // type is bitmap8 + MN::Occupancy::TypeInfo::Type value; + UN::Occupancy::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::AbsMinHeatSetpointLimit::Id: { // type is int16s + MN::AbsMinHeatSetpointLimit::TypeInfo::Type value; + UN::AbsMinHeatSetpointLimit::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::AbsMaxHeatSetpointLimit::Id: { // type is int16s + MN::AbsMaxHeatSetpointLimit::TypeInfo::Type value; + UN::AbsMaxHeatSetpointLimit::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::AbsMinCoolSetpointLimit::Id: { // type is int16s + MN::AbsMinCoolSetpointLimit::TypeInfo::Type value; + UN::AbsMinCoolSetpointLimit::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::AbsMaxCoolSetpointLimit::Id: { // type is int16s + MN::AbsMaxCoolSetpointLimit::TypeInfo::Type value; + UN::AbsMaxCoolSetpointLimit::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::PICoolingDemand::Id: { // type is int8u + MN::PICoolingDemand::TypeInfo::Type value; + UN::PICoolingDemand::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::PIHeatingDemand::Id: { // type is int8u + MN::PIHeatingDemand::TypeInfo::Type value; + UN::PIHeatingDemand::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::HVACSystemTypeConfiguration::Id: { // type is bitmap8 + MN::HVACSystemTypeConfiguration::TypeInfo::Type value; + UN::HVACSystemTypeConfiguration::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::LocalTemperatureCalibration::Id: { // type is int8s + MN::LocalTemperatureCalibration::TypeInfo::Type value; + UN::LocalTemperatureCalibration::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::OccupiedCoolingSetpoint::Id: { // type is int16s + MN::OccupiedCoolingSetpoint::TypeInfo::Type value; + UN::OccupiedCoolingSetpoint::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::OccupiedHeatingSetpoint::Id: { // type is int16s + MN::OccupiedHeatingSetpoint::TypeInfo::Type value; + UN::OccupiedHeatingSetpoint::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::UnoccupiedCoolingSetpoint::Id: { // type is int16s + MN::UnoccupiedCoolingSetpoint::TypeInfo::Type value; + UN::UnoccupiedCoolingSetpoint::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::UnoccupiedHeatingSetpoint::Id: { // type is int16s + MN::UnoccupiedHeatingSetpoint::TypeInfo::Type value; + UN::UnoccupiedHeatingSetpoint::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::MinHeatSetpointLimit::Id: { // type is int16s + MN::MinHeatSetpointLimit::TypeInfo::Type value; + UN::MinHeatSetpointLimit::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::MaxHeatSetpointLimit::Id: { // type is int16s + MN::MaxHeatSetpointLimit::TypeInfo::Type value; + UN::MaxHeatSetpointLimit::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::MinCoolSetpointLimit::Id: { // type is int16s + MN::MinCoolSetpointLimit::TypeInfo::Type value; + UN::MinCoolSetpointLimit::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::MaxCoolSetpointLimit::Id: { // type is int16s + MN::MaxCoolSetpointLimit::TypeInfo::Type value; + UN::MaxCoolSetpointLimit::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::MinSetpointDeadBand::Id: { // type is int8s + MN::MinSetpointDeadBand::TypeInfo::Type value; + UN::MinSetpointDeadBand::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::RemoteSensing::Id: { // type is bitmap8 + MN::RemoteSensing::TypeInfo::Type value; + UN::RemoteSensing::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::ControlSequenceOfOperation::Id: { // type is ThermostatControlSequence + MN::ControlSequenceOfOperation::TypeInfo::Type value; + UN::ControlSequenceOfOperation::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::SystemMode::Id: { // type is enum8 + MN::SystemMode::TypeInfo::Type value; + UN::SystemMode::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::ThermostatRunningMode::Id: { // type is enum8 + MN::ThermostatRunningMode::TypeInfo::Type value; + UN::ThermostatRunningMode::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::StartOfWeek::Id: { // type is enum8 + MN::StartOfWeek::TypeInfo::Type value; + UN::StartOfWeek::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::NumberOfWeeklyTransitions::Id: { // type is int8u + MN::NumberOfWeeklyTransitions::TypeInfo::Type value; + UN::NumberOfWeeklyTransitions::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::NumberOfDailyTransitions::Id: { // type is int8u + MN::NumberOfDailyTransitions::TypeInfo::Type value; + UN::NumberOfDailyTransitions::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::TemperatureSetpointHold::Id: { // type is enum8 + MN::TemperatureSetpointHold::TypeInfo::Type value; + UN::TemperatureSetpointHold::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::TemperatureSetpointHoldDuration::Id: { // type is int16u + MN::TemperatureSetpointHoldDuration::TypeInfo::Type value; + UN::TemperatureSetpointHoldDuration::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::ThermostatProgrammingOperationMode::Id: { // type is bitmap8 + MN::ThermostatProgrammingOperationMode::TypeInfo::Type value; + UN::ThermostatProgrammingOperationMode::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::ThermostatRunningState::Id: { // type is bitmap16 + MN::ThermostatRunningState::TypeInfo::Type value; + UN::ThermostatRunningState::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::SetpointChangeSource::Id: { // type is enum8 + MN::SetpointChangeSource::TypeInfo::Type value; + UN::SetpointChangeSource::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::SetpointChangeAmount::Id: { // type is int16s + MN::SetpointChangeAmount::TypeInfo::Type value; + UN::SetpointChangeAmount::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::SetpointChangeSourceTimestamp::Id: { // type is utc + MN::SetpointChangeSourceTimestamp::TypeInfo::Type value; + UN::SetpointChangeSourceTimestamp::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::OccupiedSetback::Id: { // type is int8u + MN::OccupiedSetback::TypeInfo::Type value; + UN::OccupiedSetback::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::OccupiedSetbackMin::Id: { // type is int8u + MN::OccupiedSetbackMin::TypeInfo::Type value; + UN::OccupiedSetbackMin::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::OccupiedSetbackMax::Id: { // type is int8u + MN::OccupiedSetbackMax::TypeInfo::Type value; + UN::OccupiedSetbackMax::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::UnoccupiedSetback::Id: { // type is int8u + MN::UnoccupiedSetback::TypeInfo::Type value; + UN::UnoccupiedSetback::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::UnoccupiedSetbackMin::Id: { // type is int8u + MN::UnoccupiedSetbackMin::TypeInfo::Type value; + UN::UnoccupiedSetbackMin::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::UnoccupiedSetbackMax::Id: { // type is int8u + MN::UnoccupiedSetbackMax::TypeInfo::Type value; + UN::UnoccupiedSetbackMax::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::EmergencyHeatDelta::Id: { // type is int8u + MN::EmergencyHeatDelta::TypeInfo::Type value; + UN::EmergencyHeatDelta::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::ACType::Id: { // type is enum8 + MN::ACType::TypeInfo::Type value; + UN::ACType::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::ACCapacity::Id: { // type is int16u + MN::ACCapacity::TypeInfo::Type value; + UN::ACCapacity::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::ACRefrigerantType::Id: { // type is enum8 + MN::ACRefrigerantType::TypeInfo::Type value; + UN::ACRefrigerantType::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::ACCompressorType::Id: { // type is enum8 + MN::ACCompressorType::TypeInfo::Type value; + UN::ACCompressorType::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::ACErrorCode::Id: { // type is bitmap32 + MN::ACErrorCode::TypeInfo::Type value; + UN::ACErrorCode::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::ACLouverPosition::Id: { // type is enum8 + MN::ACLouverPosition::TypeInfo::Type value; + UN::ACLouverPosition::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::ACCoilTemperature::Id: { // type is int16s + MN::ACCoilTemperature::TypeInfo::Type value; + UN::ACCoilTemperature::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::ACCapacityformat::Id: { // type is enum8 + MN::ACCapacityformat::TypeInfo::Type value; + UN::ACCapacityformat::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::FeatureMap::Id: { // type is bitmap32 + MN::FeatureMap::TypeInfo::Type value; + UN::FeatureMap::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::ClusterRevision::Id: { // type is int16u + MN::ClusterRevision::TypeInfo::Type value; + UN::ClusterRevision::Get(atr_path, value); + return aEncoder.Encode(value); + } + } + } catch (const std::out_of_range &e) { + sl_log_info( + LOG_TAG, + "The request attribute Path for endpoint [%i] is not found in the attribute state " + "container: %s\n", atr_path.mEndpointId, e.what()); + return CHIP_ERROR_NO_MESSAGE_HANDLER; + } + return CHIP_NO_ERROR; } -CHIP_ERROR ThermostatAttributeAccess::Write(const ConcreteDataAttributePath& aPath, AttributeValueDecoder& aDecoder) +CHIP_ERROR ThermostatAttributeAccess::Write(const ConcreteDataAttributePath &aPath, + AttributeValueDecoder &aDecoder) { - using namespace chip::app::Clusters::Thermostat; - - if (aPath.mClusterId != Clusters::Thermostat::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; - - if (m_node_state_monitor.emulator().is_attribute_emulated(aPath)) { - return m_node_state_monitor.emulator().write_attribute(aPath, aDecoder); - } + using namespace chip::app::Clusters::Thermostat; - switch (aPath.mAttributeId) { - // LocalTemperature is not supported by UCL - // OutdoorTemperature is not supported by UCL - // Occupancy is not supported by UCL - // AbsMinHeatSetpointLimit is not supported by UCL - // AbsMaxHeatSetpointLimit is not supported by UCL - // AbsMinCoolSetpointLimit is not supported by UCL - // AbsMaxCoolSetpointLimit is not supported by UCL - // PICoolingDemand is not supported by UCL - // PIHeatingDemand is not supported by UCL - case Attributes::HVACSystemTypeConfiguration::Id: { - - Attributes::HVACSystemTypeConfiguration::TypeInfo::DecodableType value; - aDecoder.Decode(value); - jsn["value"] = to_json(value); - attribute_name = "HVACSystemTypeConfiguration"; - break; - } - case Attributes::LocalTemperatureCalibration::Id: { - - Attributes::LocalTemperatureCalibration::TypeInfo::DecodableType value; - aDecoder.Decode(value); - jsn["value"] = to_json(value); - attribute_name = "LocalTemperatureCalibration"; - break; - } - case Attributes::OccupiedCoolingSetpoint::Id: { - - Attributes::OccupiedCoolingSetpoint::TypeInfo::DecodableType value; - aDecoder.Decode(value); - jsn["value"] = to_json(value); - attribute_name = "OccupiedCoolingSetpoint"; - break; - } - case Attributes::OccupiedHeatingSetpoint::Id: { - - Attributes::OccupiedHeatingSetpoint::TypeInfo::DecodableType value; - aDecoder.Decode(value); - jsn["value"] = to_json(value); - attribute_name = "OccupiedHeatingSetpoint"; - break; - } - case Attributes::UnoccupiedCoolingSetpoint::Id: { - - Attributes::UnoccupiedCoolingSetpoint::TypeInfo::DecodableType value; - aDecoder.Decode(value); - jsn["value"] = to_json(value); - attribute_name = "UnoccupiedCoolingSetpoint"; - break; - } - case Attributes::UnoccupiedHeatingSetpoint::Id: { - - Attributes::UnoccupiedHeatingSetpoint::TypeInfo::DecodableType value; - aDecoder.Decode(value); - jsn["value"] = to_json(value); - attribute_name = "UnoccupiedHeatingSetpoint"; - break; - } - case Attributes::MinHeatSetpointLimit::Id: { - - Attributes::MinHeatSetpointLimit::TypeInfo::DecodableType value; - aDecoder.Decode(value); - jsn["value"] = to_json(value); - attribute_name = "MinHeatSetpointLimit"; - break; - } - case Attributes::MaxHeatSetpointLimit::Id: { - - Attributes::MaxHeatSetpointLimit::TypeInfo::DecodableType value; - aDecoder.Decode(value); - jsn["value"] = to_json(value); - attribute_name = "MaxHeatSetpointLimit"; - break; - } - case Attributes::MinCoolSetpointLimit::Id: { - - Attributes::MinCoolSetpointLimit::TypeInfo::DecodableType value; - aDecoder.Decode(value); - jsn["value"] = to_json(value); - attribute_name = "MinCoolSetpointLimit"; - break; - } - case Attributes::MaxCoolSetpointLimit::Id: { - - Attributes::MaxCoolSetpointLimit::TypeInfo::DecodableType value; - aDecoder.Decode(value); - jsn["value"] = to_json(value); - attribute_name = "MaxCoolSetpointLimit"; - break; - } - case Attributes::MinSetpointDeadBand::Id: { - - Attributes::MinSetpointDeadBand::TypeInfo::DecodableType value; - aDecoder.Decode(value); - jsn["value"] = to_json(value); - attribute_name = "MinSetpointDeadBand"; - break; - } - case Attributes::RemoteSensing::Id: { - - Attributes::RemoteSensing::TypeInfo::DecodableType value; - aDecoder.Decode(value); - jsn["value"] = to_json(value); - attribute_name = "RemoteSensing"; - break; - } - case Attributes::ControlSequenceOfOperation::Id: { - - Attributes::ControlSequenceOfOperation::TypeInfo::DecodableType value; - aDecoder.Decode(value); - jsn["value"] = to_json(value); - attribute_name = "ControlSequenceOfOperation"; - break; - } - case Attributes::SystemMode::Id: { - - Attributes::SystemMode::TypeInfo::DecodableType value; - aDecoder.Decode(value); - jsn["value"] = to_json(value); - attribute_name = "SystemMode"; - break; - } - // ThermostatRunningMode is not supported by UCL - // StartOfWeek is not supported by UCL - // NumberOfWeeklyTransitions is not supported by UCL - // NumberOfDailyTransitions is not supported by UCL - case Attributes::TemperatureSetpointHold::Id: { - - Attributes::TemperatureSetpointHold::TypeInfo::DecodableType value; - aDecoder.Decode(value); - jsn["value"] = to_json(value); - attribute_name = "TemperatureSetpointHold"; - break; - } - case Attributes::TemperatureSetpointHoldDuration::Id: { - - Attributes::TemperatureSetpointHoldDuration::TypeInfo::DecodableType value; - aDecoder.Decode(value); - jsn["value"] = to_json(value); - attribute_name = "TemperatureSetpointHoldDuration"; - break; - } - case Attributes::ThermostatProgrammingOperationMode::Id: { - - Attributes::ThermostatProgrammingOperationMode::TypeInfo::DecodableType value; - aDecoder.Decode(value); - jsn["value"] = to_json(value); - attribute_name = "ThermostatProgrammingOperationMode"; - break; - } - // ThermostatRunningState is not supported by UCL - // SetpointChangeSource is not supported by UCL - // SetpointChangeAmount is not supported by UCL - // SetpointChangeSourceTimestamp is not supported by UCL - case Attributes::OccupiedSetback::Id: { - - Attributes::OccupiedSetback::TypeInfo::DecodableType value; - aDecoder.Decode(value); - jsn["value"] = to_json(value); - attribute_name = "OccupiedSetback"; - break; - } - // OccupiedSetbackMin is not supported by UCL - // OccupiedSetbackMax is not supported by UCL - case Attributes::UnoccupiedSetback::Id: { - - Attributes::UnoccupiedSetback::TypeInfo::DecodableType value; - aDecoder.Decode(value); - jsn["value"] = to_json(value); - attribute_name = "UnoccupiedSetback"; - break; - } - // UnoccupiedSetbackMin is not supported by UCL - // UnoccupiedSetbackMax is not supported by UCL - case Attributes::EmergencyHeatDelta::Id: { - - Attributes::EmergencyHeatDelta::TypeInfo::DecodableType value; - aDecoder.Decode(value); - jsn["value"] = to_json(value); - attribute_name = "EmergencyHeatDelta"; - break; - } - case Attributes::ACType::Id: { - - Attributes::ACType::TypeInfo::DecodableType value; - aDecoder.Decode(value); - jsn["value"] = to_json(value); - attribute_name = "ACType"; - break; - } - case Attributes::ACCapacity::Id: { - - Attributes::ACCapacity::TypeInfo::DecodableType value; - aDecoder.Decode(value); - jsn["value"] = to_json(value); - attribute_name = "ACCapacity"; - break; - } - case Attributes::ACRefrigerantType::Id: { - - Attributes::ACRefrigerantType::TypeInfo::DecodableType value; - aDecoder.Decode(value); - jsn["value"] = to_json(value); - attribute_name = "ACRefrigerantType"; - break; - } - case Attributes::ACCompressorType::Id: { - - Attributes::ACCompressorType::TypeInfo::DecodableType value; - aDecoder.Decode(value); - jsn["value"] = to_json(value); - attribute_name = "ACCompressorType"; - break; - } - case Attributes::ACErrorCode::Id: { - - Attributes::ACErrorCode::TypeInfo::DecodableType value; - aDecoder.Decode(value); - jsn["value"] = to_json(value); - attribute_name = "ACErrorCode"; - break; - } - case Attributes::ACLouverPosition::Id: { - - Attributes::ACLouverPosition::TypeInfo::DecodableType value; - aDecoder.Decode(value); - jsn["value"] = to_json(value); - attribute_name = "ACLouverPosition"; - break; - } - // ACCoilTemperature is not supported by UCL - case Attributes::ACCapacityformat::Id: { - - Attributes::ACCapacityformat::TypeInfo::DecodableType value; - aDecoder.Decode(value); - jsn["value"] = to_json(value); - attribute_name = "ACCapacityFormat"; - break; - } - // GeneratedCommandList is not supported by UCL - // AcceptedCommandList is not supported by UCL - // AttributeList is not supported by UCL - // FeatureMap is not supported by UCL - // ClusterRevision is not supported by UCL - } - - 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) + "/Thermostat/Attributes/" + attribute_name + "/Desired"; - payload_str = jsn.dump(); - m_unify_mqtt.Publish(topic, payload_str, true); - return CHIP_NO_ERROR; - } + if (aPath.mClusterId != Clusters::Thermostat::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; + + if( m_node_state_monitor.emulator().is_attribute_emulated(aPath) ) { + return m_node_state_monitor.emulator().write_attribute(aPath,aDecoder); + } + + switch (aPath.mAttributeId) { + // LocalTemperature is not supported by UCL + // OutdoorTemperature is not supported by UCL + // Occupancy is not supported by UCL + // AbsMinHeatSetpointLimit is not supported by UCL + // AbsMaxHeatSetpointLimit is not supported by UCL + // AbsMinCoolSetpointLimit is not supported by UCL + // AbsMaxCoolSetpointLimit is not supported by UCL + // PICoolingDemand is not supported by UCL + // PIHeatingDemand is not supported by UCL + case Attributes::HVACSystemTypeConfiguration::Id: { + + Attributes::HVACSystemTypeConfiguration::TypeInfo::DecodableType value; + aDecoder.Decode(value); + jsn["value"] = to_json(value); + attribute_name = "HVACSystemTypeConfiguration"; + break; + } + case Attributes::LocalTemperatureCalibration::Id: { + + Attributes::LocalTemperatureCalibration::TypeInfo::DecodableType value; + aDecoder.Decode(value); + jsn["value"] = to_json(value); + attribute_name = "LocalTemperatureCalibration"; + break; + } + case Attributes::OccupiedCoolingSetpoint::Id: { + + Attributes::OccupiedCoolingSetpoint::TypeInfo::DecodableType value; + aDecoder.Decode(value); + jsn["value"] = to_json(value); + attribute_name = "OccupiedCoolingSetpoint"; + break; + } + case Attributes::OccupiedHeatingSetpoint::Id: { + + Attributes::OccupiedHeatingSetpoint::TypeInfo::DecodableType value; + aDecoder.Decode(value); + jsn["value"] = to_json(value); + attribute_name = "OccupiedHeatingSetpoint"; + break; + } + case Attributes::UnoccupiedCoolingSetpoint::Id: { + + Attributes::UnoccupiedCoolingSetpoint::TypeInfo::DecodableType value; + aDecoder.Decode(value); + jsn["value"] = to_json(value); + attribute_name = "UnoccupiedCoolingSetpoint"; + break; + } + case Attributes::UnoccupiedHeatingSetpoint::Id: { + + Attributes::UnoccupiedHeatingSetpoint::TypeInfo::DecodableType value; + aDecoder.Decode(value); + jsn["value"] = to_json(value); + attribute_name = "UnoccupiedHeatingSetpoint"; + break; + } + case Attributes::MinHeatSetpointLimit::Id: { + + Attributes::MinHeatSetpointLimit::TypeInfo::DecodableType value; + aDecoder.Decode(value); + jsn["value"] = to_json(value); + attribute_name = "MinHeatSetpointLimit"; + break; + } + case Attributes::MaxHeatSetpointLimit::Id: { + + Attributes::MaxHeatSetpointLimit::TypeInfo::DecodableType value; + aDecoder.Decode(value); + jsn["value"] = to_json(value); + attribute_name = "MaxHeatSetpointLimit"; + break; + } + case Attributes::MinCoolSetpointLimit::Id: { + + Attributes::MinCoolSetpointLimit::TypeInfo::DecodableType value; + aDecoder.Decode(value); + jsn["value"] = to_json(value); + attribute_name = "MinCoolSetpointLimit"; + break; + } + case Attributes::MaxCoolSetpointLimit::Id: { + + Attributes::MaxCoolSetpointLimit::TypeInfo::DecodableType value; + aDecoder.Decode(value); + jsn["value"] = to_json(value); + attribute_name = "MaxCoolSetpointLimit"; + break; + } + case Attributes::MinSetpointDeadBand::Id: { + + Attributes::MinSetpointDeadBand::TypeInfo::DecodableType value; + aDecoder.Decode(value); + jsn["value"] = to_json(value); + attribute_name = "MinSetpointDeadBand"; + break; + } + case Attributes::RemoteSensing::Id: { + + Attributes::RemoteSensing::TypeInfo::DecodableType value; + aDecoder.Decode(value); + jsn["value"] = to_json(value); + attribute_name = "RemoteSensing"; + break; + } + case Attributes::ControlSequenceOfOperation::Id: { + + Attributes::ControlSequenceOfOperation::TypeInfo::DecodableType value; + aDecoder.Decode(value); + jsn["value"] = to_json(value); + attribute_name = "ControlSequenceOfOperation"; + break; + } + case Attributes::SystemMode::Id: { + + Attributes::SystemMode::TypeInfo::DecodableType value; + aDecoder.Decode(value); + jsn["value"] = to_json(value); + attribute_name = "SystemMode"; + break; + } + // ThermostatRunningMode is not supported by UCL + // StartOfWeek is not supported by UCL + // NumberOfWeeklyTransitions is not supported by UCL + // NumberOfDailyTransitions is not supported by UCL + case Attributes::TemperatureSetpointHold::Id: { + + Attributes::TemperatureSetpointHold::TypeInfo::DecodableType value; + aDecoder.Decode(value); + jsn["value"] = to_json(value); + attribute_name = "TemperatureSetpointHold"; + break; + } + case Attributes::TemperatureSetpointHoldDuration::Id: { + + Attributes::TemperatureSetpointHoldDuration::TypeInfo::DecodableType value; + aDecoder.Decode(value); + jsn["value"] = to_json(value); + attribute_name = "TemperatureSetpointHoldDuration"; + break; + } + case Attributes::ThermostatProgrammingOperationMode::Id: { + + Attributes::ThermostatProgrammingOperationMode::TypeInfo::DecodableType value; + aDecoder.Decode(value); + jsn["value"] = to_json(value); + attribute_name = "ThermostatProgrammingOperationMode"; + break; + } + // ThermostatRunningState is not supported by UCL + // SetpointChangeSource is not supported by UCL + // SetpointChangeAmount is not supported by UCL + // SetpointChangeSourceTimestamp is not supported by UCL + case Attributes::OccupiedSetback::Id: { + + Attributes::OccupiedSetback::TypeInfo::DecodableType value; + aDecoder.Decode(value); + jsn["value"] = to_json(value); + attribute_name = "OccupiedSetback"; + break; + } + // OccupiedSetbackMin is not supported by UCL + // OccupiedSetbackMax is not supported by UCL + case Attributes::UnoccupiedSetback::Id: { + + Attributes::UnoccupiedSetback::TypeInfo::DecodableType value; + aDecoder.Decode(value); + jsn["value"] = to_json(value); + attribute_name = "UnoccupiedSetback"; + break; + } + // UnoccupiedSetbackMin is not supported by UCL + // UnoccupiedSetbackMax is not supported by UCL + case Attributes::EmergencyHeatDelta::Id: { + + Attributes::EmergencyHeatDelta::TypeInfo::DecodableType value; + aDecoder.Decode(value); + jsn["value"] = to_json(value); + attribute_name = "EmergencyHeatDelta"; + break; + } + case Attributes::ACType::Id: { + + Attributes::ACType::TypeInfo::DecodableType value; + aDecoder.Decode(value); + jsn["value"] = to_json(value); + attribute_name = "ACType"; + break; + } + case Attributes::ACCapacity::Id: { + + Attributes::ACCapacity::TypeInfo::DecodableType value; + aDecoder.Decode(value); + jsn["value"] = to_json(value); + attribute_name = "ACCapacity"; + break; + } + case Attributes::ACRefrigerantType::Id: { + + Attributes::ACRefrigerantType::TypeInfo::DecodableType value; + aDecoder.Decode(value); + jsn["value"] = to_json(value); + attribute_name = "ACRefrigerantType"; + break; + } + case Attributes::ACCompressorType::Id: { + + Attributes::ACCompressorType::TypeInfo::DecodableType value; + aDecoder.Decode(value); + jsn["value"] = to_json(value); + attribute_name = "ACCompressorType"; + break; + } + case Attributes::ACErrorCode::Id: { + + Attributes::ACErrorCode::TypeInfo::DecodableType value; + aDecoder.Decode(value); + jsn["value"] = to_json(value); + attribute_name = "ACErrorCode"; + break; + } + case Attributes::ACLouverPosition::Id: { + + Attributes::ACLouverPosition::TypeInfo::DecodableType value; + aDecoder.Decode(value); + jsn["value"] = to_json(value); + attribute_name = "ACLouverPosition"; + break; + } + // ACCoilTemperature is not supported by UCL + case Attributes::ACCapacityformat::Id: { + + Attributes::ACCapacityformat::TypeInfo::DecodableType value; + aDecoder.Decode(value); + jsn["value"] = to_json(value); + attribute_name = "ACCapacityFormat"; + break; + } + // GeneratedCommandList is not supported by UCL + // AcceptedCommandList is not supported by UCL + // AttributeList is not supported by UCL + // FeatureMap is not supported by UCL + // ClusterRevision is not supported by UCL + } + + 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) + + "/Thermostat/Attributes/" + attribute_name + "/Desired"; + payload_str = jsn.dump(); + m_unify_mqtt.Publish(topic, + payload_str, + true); + return CHIP_NO_ERROR; + } + + return CHIP_ERROR_NO_MESSAGE_HANDLER; } -void ThermostatAttributeAccess::reported_updated(const bridged_endpoint* ep, const std::string& cluster, - const std::string& attribute, const nlohmann::json& unify_value) +void ThermostatAttributeAccess::reported_updated(const bridged_endpoint *ep, + const std::string &cluster, + const std::string &attribute, + const nlohmann::json &unify_value) { - namespace MN = chip::app::Clusters::Thermostat::Attributes; - namespace UN = unify::matter_bridge::Thermostat::Attributes; + namespace MN = chip::app::Clusters::Thermostat::Attributes; + namespace UN = unify::matter_bridge::Thermostat::Attributes; - auto cluster_id = device_translator::instance().get_cluster_id(cluster); + auto cluster_id = device_translator::instance().get_cluster_id(cluster); - if (!cluster_id.has_value() || (cluster_id.value() != Clusters::Thermostat::Id)) { - return; - } + if (!cluster_id.has_value() || (cluster_id.value() != Clusters::Thermostat::Id)) { + return; + } - // get attribute id - auto attribute_id = device_translator::instance().get_attribute_id(cluster, attribute); + // get attribute id + auto attribute_id + = device_translator::instance().get_attribute_id(cluster, attribute); - if (!attribute_id.has_value()) { - return; - } + if (!attribute_id.has_value()) { + return; + } - chip::EndpointId node_matter_endpoint = ep->matter_endpoint; - ConcreteAttributePath attrpath = ConcreteAttributePath(node_matter_endpoint, Clusters::Thermostat::Id, attribute_id.value()); - switch (attribute_id.value()) { + 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 case MN::LocalTemperature::Id: { - using T = MN::LocalTemperature::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) { - sl_log_debug(LOG_TAG, "LocalTemperature attribute value is %s", unify_value.dump().c_str()); - UN::LocalTemperature::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::Thermostat::Id, MN::LocalTemperature::Id); - } - break; + using T = MN::LocalTemperature::TypeInfo::Type; + std::optional value = from_json(unify_value); + + if( value.has_value()) { + sl_log_debug(LOG_TAG,"LocalTemperature attribute value is %s",unify_value.dump().c_str()); + UN::LocalTemperature::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback( + node_matter_endpoint, + Clusters::Thermostat::Id, + MN::LocalTemperature::Id); + } + break; } // type is int16s case MN::OutdoorTemperature::Id: { - using T = MN::OutdoorTemperature::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) { - sl_log_debug(LOG_TAG, "OutdoorTemperature attribute value is %s", unify_value.dump().c_str()); - UN::OutdoorTemperature::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::Thermostat::Id, MN::OutdoorTemperature::Id); - } - break; + using T = MN::OutdoorTemperature::TypeInfo::Type; + std::optional value = from_json(unify_value); + + if( value.has_value()) { + sl_log_debug(LOG_TAG,"OutdoorTemperature attribute value is %s",unify_value.dump().c_str()); + UN::OutdoorTemperature::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback( + node_matter_endpoint, + Clusters::Thermostat::Id, + MN::OutdoorTemperature::Id); + } + break; } // type is bitmap8 case MN::Occupancy::Id: { - using T = MN::Occupancy::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) { - sl_log_debug(LOG_TAG, "Occupancy attribute value is %s", unify_value.dump().c_str()); - UN::Occupancy::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::Thermostat::Id, MN::Occupancy::Id); - } - break; + using T = MN::Occupancy::TypeInfo::Type; + std::optional value = from_json(unify_value); + + if( value.has_value()) { + sl_log_debug(LOG_TAG,"Occupancy attribute value is %s",unify_value.dump().c_str()); + UN::Occupancy::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback( + node_matter_endpoint, + Clusters::Thermostat::Id, + MN::Occupancy::Id); + } + break; } // type is int16s case MN::AbsMinHeatSetpointLimit::Id: { - using T = MN::AbsMinHeatSetpointLimit::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) { - sl_log_debug(LOG_TAG, "AbsMinHeatSetpointLimit attribute value is %s", unify_value.dump().c_str()); - UN::AbsMinHeatSetpointLimit::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::Thermostat::Id, MN::AbsMinHeatSetpointLimit::Id); - } - break; + using T = MN::AbsMinHeatSetpointLimit::TypeInfo::Type; + std::optional value = from_json(unify_value); + + if( value.has_value()) { + sl_log_debug(LOG_TAG,"AbsMinHeatSetpointLimit attribute value is %s",unify_value.dump().c_str()); + UN::AbsMinHeatSetpointLimit::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback( + node_matter_endpoint, + Clusters::Thermostat::Id, + MN::AbsMinHeatSetpointLimit::Id); + } + break; } // type is int16s case MN::AbsMaxHeatSetpointLimit::Id: { - using T = MN::AbsMaxHeatSetpointLimit::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) { - sl_log_debug(LOG_TAG, "AbsMaxHeatSetpointLimit attribute value is %s", unify_value.dump().c_str()); - UN::AbsMaxHeatSetpointLimit::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::Thermostat::Id, MN::AbsMaxHeatSetpointLimit::Id); - } - break; + using T = MN::AbsMaxHeatSetpointLimit::TypeInfo::Type; + std::optional value = from_json(unify_value); + + if( value.has_value()) { + sl_log_debug(LOG_TAG,"AbsMaxHeatSetpointLimit attribute value is %s",unify_value.dump().c_str()); + UN::AbsMaxHeatSetpointLimit::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback( + node_matter_endpoint, + Clusters::Thermostat::Id, + MN::AbsMaxHeatSetpointLimit::Id); + } + break; } // type is int16s case MN::AbsMinCoolSetpointLimit::Id: { - using T = MN::AbsMinCoolSetpointLimit::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) { - sl_log_debug(LOG_TAG, "AbsMinCoolSetpointLimit attribute value is %s", unify_value.dump().c_str()); - UN::AbsMinCoolSetpointLimit::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::Thermostat::Id, MN::AbsMinCoolSetpointLimit::Id); - } - break; + using T = MN::AbsMinCoolSetpointLimit::TypeInfo::Type; + std::optional value = from_json(unify_value); + + if( value.has_value()) { + sl_log_debug(LOG_TAG,"AbsMinCoolSetpointLimit attribute value is %s",unify_value.dump().c_str()); + UN::AbsMinCoolSetpointLimit::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback( + node_matter_endpoint, + Clusters::Thermostat::Id, + MN::AbsMinCoolSetpointLimit::Id); + } + break; } // type is int16s case MN::AbsMaxCoolSetpointLimit::Id: { - using T = MN::AbsMaxCoolSetpointLimit::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) { - sl_log_debug(LOG_TAG, "AbsMaxCoolSetpointLimit attribute value is %s", unify_value.dump().c_str()); - UN::AbsMaxCoolSetpointLimit::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::Thermostat::Id, MN::AbsMaxCoolSetpointLimit::Id); - } - break; + using T = MN::AbsMaxCoolSetpointLimit::TypeInfo::Type; + std::optional value = from_json(unify_value); + + if( value.has_value()) { + sl_log_debug(LOG_TAG,"AbsMaxCoolSetpointLimit attribute value is %s",unify_value.dump().c_str()); + UN::AbsMaxCoolSetpointLimit::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback( + node_matter_endpoint, + Clusters::Thermostat::Id, + MN::AbsMaxCoolSetpointLimit::Id); + } + break; } // type is int8u case MN::PICoolingDemand::Id: { - using T = MN::PICoolingDemand::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) { - sl_log_debug(LOG_TAG, "PICoolingDemand attribute value is %s", unify_value.dump().c_str()); - UN::PICoolingDemand::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::Thermostat::Id, MN::PICoolingDemand::Id); - } - break; + using T = MN::PICoolingDemand::TypeInfo::Type; + std::optional value = from_json(unify_value); + + if( value.has_value()) { + sl_log_debug(LOG_TAG,"PICoolingDemand attribute value is %s",unify_value.dump().c_str()); + UN::PICoolingDemand::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback( + node_matter_endpoint, + Clusters::Thermostat::Id, + MN::PICoolingDemand::Id); + } + break; } // type is int8u case MN::PIHeatingDemand::Id: { - using T = MN::PIHeatingDemand::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) { - sl_log_debug(LOG_TAG, "PIHeatingDemand attribute value is %s", unify_value.dump().c_str()); - UN::PIHeatingDemand::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::Thermostat::Id, MN::PIHeatingDemand::Id); - } - break; + using T = MN::PIHeatingDemand::TypeInfo::Type; + std::optional value = from_json(unify_value); + + if( value.has_value()) { + sl_log_debug(LOG_TAG,"PIHeatingDemand attribute value is %s",unify_value.dump().c_str()); + UN::PIHeatingDemand::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback( + node_matter_endpoint, + Clusters::Thermostat::Id, + MN::PIHeatingDemand::Id); + } + break; } // type is bitmap8 case MN::HVACSystemTypeConfiguration::Id: { - using T = MN::HVACSystemTypeConfiguration::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) { - sl_log_debug(LOG_TAG, "HVACSystemTypeConfiguration attribute value is %s", unify_value.dump().c_str()); - UN::HVACSystemTypeConfiguration::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::Thermostat::Id, - MN::HVACSystemTypeConfiguration::Id); - } - break; + using T = MN::HVACSystemTypeConfiguration::TypeInfo::Type; + std::optional value = from_json(unify_value); + + if( value.has_value()) { + sl_log_debug(LOG_TAG,"HVACSystemTypeConfiguration attribute value is %s",unify_value.dump().c_str()); + UN::HVACSystemTypeConfiguration::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback( + node_matter_endpoint, + Clusters::Thermostat::Id, + MN::HVACSystemTypeConfiguration::Id); + } + break; } // type is int8s case MN::LocalTemperatureCalibration::Id: { - using T = MN::LocalTemperatureCalibration::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) { - sl_log_debug(LOG_TAG, "LocalTemperatureCalibration attribute value is %s", unify_value.dump().c_str()); - UN::LocalTemperatureCalibration::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::Thermostat::Id, - MN::LocalTemperatureCalibration::Id); - } - break; + using T = MN::LocalTemperatureCalibration::TypeInfo::Type; + std::optional value = from_json(unify_value); + + if( value.has_value()) { + sl_log_debug(LOG_TAG,"LocalTemperatureCalibration attribute value is %s",unify_value.dump().c_str()); + UN::LocalTemperatureCalibration::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback( + node_matter_endpoint, + Clusters::Thermostat::Id, + MN::LocalTemperatureCalibration::Id); + } + break; } // type is int16s case MN::OccupiedCoolingSetpoint::Id: { - using T = MN::OccupiedCoolingSetpoint::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) { - sl_log_debug(LOG_TAG, "OccupiedCoolingSetpoint attribute value is %s", unify_value.dump().c_str()); - UN::OccupiedCoolingSetpoint::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::Thermostat::Id, MN::OccupiedCoolingSetpoint::Id); - } - break; + using T = MN::OccupiedCoolingSetpoint::TypeInfo::Type; + std::optional value = from_json(unify_value); + + if( value.has_value()) { + sl_log_debug(LOG_TAG,"OccupiedCoolingSetpoint attribute value is %s",unify_value.dump().c_str()); + UN::OccupiedCoolingSetpoint::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback( + node_matter_endpoint, + Clusters::Thermostat::Id, + MN::OccupiedCoolingSetpoint::Id); + } + break; } // type is int16s case MN::OccupiedHeatingSetpoint::Id: { - using T = MN::OccupiedHeatingSetpoint::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) { - sl_log_debug(LOG_TAG, "OccupiedHeatingSetpoint attribute value is %s", unify_value.dump().c_str()); - UN::OccupiedHeatingSetpoint::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::Thermostat::Id, MN::OccupiedHeatingSetpoint::Id); - } - break; + using T = MN::OccupiedHeatingSetpoint::TypeInfo::Type; + std::optional value = from_json(unify_value); + + if( value.has_value()) { + sl_log_debug(LOG_TAG,"OccupiedHeatingSetpoint attribute value is %s",unify_value.dump().c_str()); + UN::OccupiedHeatingSetpoint::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback( + node_matter_endpoint, + Clusters::Thermostat::Id, + MN::OccupiedHeatingSetpoint::Id); + } + break; } // type is int16s case MN::UnoccupiedCoolingSetpoint::Id: { - using T = MN::UnoccupiedCoolingSetpoint::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) { - sl_log_debug(LOG_TAG, "UnoccupiedCoolingSetpoint attribute value is %s", unify_value.dump().c_str()); - UN::UnoccupiedCoolingSetpoint::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::Thermostat::Id, - MN::UnoccupiedCoolingSetpoint::Id); - } - break; + using T = MN::UnoccupiedCoolingSetpoint::TypeInfo::Type; + std::optional value = from_json(unify_value); + + if( value.has_value()) { + sl_log_debug(LOG_TAG,"UnoccupiedCoolingSetpoint attribute value is %s",unify_value.dump().c_str()); + UN::UnoccupiedCoolingSetpoint::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback( + node_matter_endpoint, + Clusters::Thermostat::Id, + MN::UnoccupiedCoolingSetpoint::Id); + } + break; } // type is int16s case MN::UnoccupiedHeatingSetpoint::Id: { - using T = MN::UnoccupiedHeatingSetpoint::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) { - sl_log_debug(LOG_TAG, "UnoccupiedHeatingSetpoint attribute value is %s", unify_value.dump().c_str()); - UN::UnoccupiedHeatingSetpoint::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::Thermostat::Id, - MN::UnoccupiedHeatingSetpoint::Id); - } - break; + using T = MN::UnoccupiedHeatingSetpoint::TypeInfo::Type; + std::optional value = from_json(unify_value); + + if( value.has_value()) { + sl_log_debug(LOG_TAG,"UnoccupiedHeatingSetpoint attribute value is %s",unify_value.dump().c_str()); + UN::UnoccupiedHeatingSetpoint::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback( + node_matter_endpoint, + Clusters::Thermostat::Id, + MN::UnoccupiedHeatingSetpoint::Id); + } + break; } // type is int16s case MN::MinHeatSetpointLimit::Id: { - using T = MN::MinHeatSetpointLimit::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) { - sl_log_debug(LOG_TAG, "MinHeatSetpointLimit attribute value is %s", unify_value.dump().c_str()); - UN::MinHeatSetpointLimit::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::Thermostat::Id, MN::MinHeatSetpointLimit::Id); - } - break; + using T = MN::MinHeatSetpointLimit::TypeInfo::Type; + std::optional value = from_json(unify_value); + + if( value.has_value()) { + sl_log_debug(LOG_TAG,"MinHeatSetpointLimit attribute value is %s",unify_value.dump().c_str()); + UN::MinHeatSetpointLimit::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback( + node_matter_endpoint, + Clusters::Thermostat::Id, + MN::MinHeatSetpointLimit::Id); + } + break; } // type is int16s case MN::MaxHeatSetpointLimit::Id: { - using T = MN::MaxHeatSetpointLimit::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) { - sl_log_debug(LOG_TAG, "MaxHeatSetpointLimit attribute value is %s", unify_value.dump().c_str()); - UN::MaxHeatSetpointLimit::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::Thermostat::Id, MN::MaxHeatSetpointLimit::Id); - } - break; + using T = MN::MaxHeatSetpointLimit::TypeInfo::Type; + std::optional value = from_json(unify_value); + + if( value.has_value()) { + sl_log_debug(LOG_TAG,"MaxHeatSetpointLimit attribute value is %s",unify_value.dump().c_str()); + UN::MaxHeatSetpointLimit::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback( + node_matter_endpoint, + Clusters::Thermostat::Id, + MN::MaxHeatSetpointLimit::Id); + } + break; } // type is int16s case MN::MinCoolSetpointLimit::Id: { - using T = MN::MinCoolSetpointLimit::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) { - sl_log_debug(LOG_TAG, "MinCoolSetpointLimit attribute value is %s", unify_value.dump().c_str()); - UN::MinCoolSetpointLimit::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::Thermostat::Id, MN::MinCoolSetpointLimit::Id); - } - break; + using T = MN::MinCoolSetpointLimit::TypeInfo::Type; + std::optional value = from_json(unify_value); + + if( value.has_value()) { + sl_log_debug(LOG_TAG,"MinCoolSetpointLimit attribute value is %s",unify_value.dump().c_str()); + UN::MinCoolSetpointLimit::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback( + node_matter_endpoint, + Clusters::Thermostat::Id, + MN::MinCoolSetpointLimit::Id); + } + break; } // type is int16s case MN::MaxCoolSetpointLimit::Id: { - using T = MN::MaxCoolSetpointLimit::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) { - sl_log_debug(LOG_TAG, "MaxCoolSetpointLimit attribute value is %s", unify_value.dump().c_str()); - UN::MaxCoolSetpointLimit::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::Thermostat::Id, MN::MaxCoolSetpointLimit::Id); - } - break; + using T = MN::MaxCoolSetpointLimit::TypeInfo::Type; + std::optional value = from_json(unify_value); + + if( value.has_value()) { + sl_log_debug(LOG_TAG,"MaxCoolSetpointLimit attribute value is %s",unify_value.dump().c_str()); + UN::MaxCoolSetpointLimit::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback( + node_matter_endpoint, + Clusters::Thermostat::Id, + MN::MaxCoolSetpointLimit::Id); + } + break; } // type is int8s case MN::MinSetpointDeadBand::Id: { - using T = MN::MinSetpointDeadBand::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) { - sl_log_debug(LOG_TAG, "MinSetpointDeadBand attribute value is %s", unify_value.dump().c_str()); - UN::MinSetpointDeadBand::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::Thermostat::Id, MN::MinSetpointDeadBand::Id); - } - break; + using T = MN::MinSetpointDeadBand::TypeInfo::Type; + std::optional value = from_json(unify_value); + + if( value.has_value()) { + sl_log_debug(LOG_TAG,"MinSetpointDeadBand attribute value is %s",unify_value.dump().c_str()); + UN::MinSetpointDeadBand::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback( + node_matter_endpoint, + Clusters::Thermostat::Id, + MN::MinSetpointDeadBand::Id); + } + break; } // type is bitmap8 case MN::RemoteSensing::Id: { - using T = MN::RemoteSensing::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) { - sl_log_debug(LOG_TAG, "RemoteSensing attribute value is %s", unify_value.dump().c_str()); - UN::RemoteSensing::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::Thermostat::Id, MN::RemoteSensing::Id); - } - break; + using T = MN::RemoteSensing::TypeInfo::Type; + std::optional value = from_json(unify_value); + + if( value.has_value()) { + sl_log_debug(LOG_TAG,"RemoteSensing attribute value is %s",unify_value.dump().c_str()); + UN::RemoteSensing::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback( + node_matter_endpoint, + Clusters::Thermostat::Id, + MN::RemoteSensing::Id); + } + break; } // type is ThermostatControlSequence case MN::ControlSequenceOfOperation::Id: { - using T = MN::ControlSequenceOfOperation::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) { - sl_log_debug(LOG_TAG, "ControlSequenceOfOperation attribute value is %s", unify_value.dump().c_str()); - UN::ControlSequenceOfOperation::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::Thermostat::Id, - MN::ControlSequenceOfOperation::Id); - } - break; + using T = MN::ControlSequenceOfOperation::TypeInfo::Type; + std::optional value = from_json(unify_value); + + if( value.has_value()) { + sl_log_debug(LOG_TAG,"ControlSequenceOfOperation attribute value is %s",unify_value.dump().c_str()); + UN::ControlSequenceOfOperation::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback( + node_matter_endpoint, + Clusters::Thermostat::Id, + MN::ControlSequenceOfOperation::Id); + } + break; } // type is enum8 case MN::SystemMode::Id: { - using T = MN::SystemMode::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) { - sl_log_debug(LOG_TAG, "SystemMode attribute value is %s", unify_value.dump().c_str()); - UN::SystemMode::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::Thermostat::Id, MN::SystemMode::Id); - } - break; + using T = MN::SystemMode::TypeInfo::Type; + std::optional value = from_json(unify_value); + + if( value.has_value()) { + sl_log_debug(LOG_TAG,"SystemMode attribute value is %s",unify_value.dump().c_str()); + UN::SystemMode::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback( + node_matter_endpoint, + Clusters::Thermostat::Id, + MN::SystemMode::Id); + } + break; } // type is enum8 case MN::ThermostatRunningMode::Id: { - using T = MN::ThermostatRunningMode::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) { - sl_log_debug(LOG_TAG, "ThermostatRunningMode attribute value is %s", unify_value.dump().c_str()); - UN::ThermostatRunningMode::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::Thermostat::Id, MN::ThermostatRunningMode::Id); - } - break; + using T = MN::ThermostatRunningMode::TypeInfo::Type; + std::optional value = from_json(unify_value); + + if( value.has_value()) { + sl_log_debug(LOG_TAG,"ThermostatRunningMode attribute value is %s",unify_value.dump().c_str()); + UN::ThermostatRunningMode::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback( + node_matter_endpoint, + Clusters::Thermostat::Id, + MN::ThermostatRunningMode::Id); + } + break; } // type is enum8 case MN::StartOfWeek::Id: { - using T = MN::StartOfWeek::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) { - sl_log_debug(LOG_TAG, "StartOfWeek attribute value is %s", unify_value.dump().c_str()); - UN::StartOfWeek::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::Thermostat::Id, MN::StartOfWeek::Id); - } - break; + using T = MN::StartOfWeek::TypeInfo::Type; + std::optional value = from_json(unify_value); + + if( value.has_value()) { + sl_log_debug(LOG_TAG,"StartOfWeek attribute value is %s",unify_value.dump().c_str()); + UN::StartOfWeek::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback( + node_matter_endpoint, + Clusters::Thermostat::Id, + MN::StartOfWeek::Id); + } + break; } // type is int8u case MN::NumberOfWeeklyTransitions::Id: { - using T = MN::NumberOfWeeklyTransitions::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) { - sl_log_debug(LOG_TAG, "NumberOfWeeklyTransitions attribute value is %s", unify_value.dump().c_str()); - UN::NumberOfWeeklyTransitions::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::Thermostat::Id, - MN::NumberOfWeeklyTransitions::Id); - } - break; + using T = MN::NumberOfWeeklyTransitions::TypeInfo::Type; + std::optional value = from_json(unify_value); + + if( value.has_value()) { + sl_log_debug(LOG_TAG,"NumberOfWeeklyTransitions attribute value is %s",unify_value.dump().c_str()); + UN::NumberOfWeeklyTransitions::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback( + node_matter_endpoint, + Clusters::Thermostat::Id, + MN::NumberOfWeeklyTransitions::Id); + } + break; } // type is int8u case MN::NumberOfDailyTransitions::Id: { - using T = MN::NumberOfDailyTransitions::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) { - sl_log_debug(LOG_TAG, "NumberOfDailyTransitions attribute value is %s", unify_value.dump().c_str()); - UN::NumberOfDailyTransitions::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::Thermostat::Id, - MN::NumberOfDailyTransitions::Id); - } - break; + using T = MN::NumberOfDailyTransitions::TypeInfo::Type; + std::optional value = from_json(unify_value); + + if( value.has_value()) { + sl_log_debug(LOG_TAG,"NumberOfDailyTransitions attribute value is %s",unify_value.dump().c_str()); + UN::NumberOfDailyTransitions::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback( + node_matter_endpoint, + Clusters::Thermostat::Id, + MN::NumberOfDailyTransitions::Id); + } + break; } // type is enum8 case MN::TemperatureSetpointHold::Id: { - using T = MN::TemperatureSetpointHold::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) { - sl_log_debug(LOG_TAG, "TemperatureSetpointHold attribute value is %s", unify_value.dump().c_str()); - UN::TemperatureSetpointHold::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::Thermostat::Id, MN::TemperatureSetpointHold::Id); - } - break; + using T = MN::TemperatureSetpointHold::TypeInfo::Type; + std::optional value = from_json(unify_value); + + if( value.has_value()) { + sl_log_debug(LOG_TAG,"TemperatureSetpointHold attribute value is %s",unify_value.dump().c_str()); + UN::TemperatureSetpointHold::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback( + node_matter_endpoint, + Clusters::Thermostat::Id, + MN::TemperatureSetpointHold::Id); + } + break; } // type is int16u case MN::TemperatureSetpointHoldDuration::Id: { - using T = MN::TemperatureSetpointHoldDuration::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) { - sl_log_debug(LOG_TAG, "TemperatureSetpointHoldDuration attribute value is %s", unify_value.dump().c_str()); - UN::TemperatureSetpointHoldDuration::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::Thermostat::Id, - MN::TemperatureSetpointHoldDuration::Id); - } - break; + using T = MN::TemperatureSetpointHoldDuration::TypeInfo::Type; + std::optional value = from_json(unify_value); + + if( value.has_value()) { + sl_log_debug(LOG_TAG,"TemperatureSetpointHoldDuration attribute value is %s",unify_value.dump().c_str()); + UN::TemperatureSetpointHoldDuration::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback( + node_matter_endpoint, + Clusters::Thermostat::Id, + MN::TemperatureSetpointHoldDuration::Id); + } + break; } // type is bitmap8 case MN::ThermostatProgrammingOperationMode::Id: { - using T = MN::ThermostatProgrammingOperationMode::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) { - sl_log_debug(LOG_TAG, "ThermostatProgrammingOperationMode attribute value is %s", unify_value.dump().c_str()); - UN::ThermostatProgrammingOperationMode::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::Thermostat::Id, - MN::ThermostatProgrammingOperationMode::Id); - } - break; + using T = MN::ThermostatProgrammingOperationMode::TypeInfo::Type; + std::optional value = from_json(unify_value); + + if( value.has_value()) { + sl_log_debug(LOG_TAG,"ThermostatProgrammingOperationMode attribute value is %s",unify_value.dump().c_str()); + UN::ThermostatProgrammingOperationMode::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback( + node_matter_endpoint, + Clusters::Thermostat::Id, + MN::ThermostatProgrammingOperationMode::Id); + } + break; } // type is bitmap16 case MN::ThermostatRunningState::Id: { - using T = MN::ThermostatRunningState::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) { - sl_log_debug(LOG_TAG, "ThermostatRunningState attribute value is %s", unify_value.dump().c_str()); - UN::ThermostatRunningState::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::Thermostat::Id, MN::ThermostatRunningState::Id); - } - break; + using T = MN::ThermostatRunningState::TypeInfo::Type; + std::optional value = from_json(unify_value); + + if( value.has_value()) { + sl_log_debug(LOG_TAG,"ThermostatRunningState attribute value is %s",unify_value.dump().c_str()); + UN::ThermostatRunningState::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback( + node_matter_endpoint, + Clusters::Thermostat::Id, + MN::ThermostatRunningState::Id); + } + break; } // type is enum8 case MN::SetpointChangeSource::Id: { - using T = MN::SetpointChangeSource::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) { - sl_log_debug(LOG_TAG, "SetpointChangeSource attribute value is %s", unify_value.dump().c_str()); - UN::SetpointChangeSource::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::Thermostat::Id, MN::SetpointChangeSource::Id); - } - break; + using T = MN::SetpointChangeSource::TypeInfo::Type; + std::optional value = from_json(unify_value); + + if( value.has_value()) { + sl_log_debug(LOG_TAG,"SetpointChangeSource attribute value is %s",unify_value.dump().c_str()); + UN::SetpointChangeSource::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback( + node_matter_endpoint, + Clusters::Thermostat::Id, + MN::SetpointChangeSource::Id); + } + break; } // type is int16s case MN::SetpointChangeAmount::Id: { - using T = MN::SetpointChangeAmount::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) { - sl_log_debug(LOG_TAG, "SetpointChangeAmount attribute value is %s", unify_value.dump().c_str()); - UN::SetpointChangeAmount::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::Thermostat::Id, MN::SetpointChangeAmount::Id); - } - break; + using T = MN::SetpointChangeAmount::TypeInfo::Type; + std::optional value = from_json(unify_value); + + if( value.has_value()) { + sl_log_debug(LOG_TAG,"SetpointChangeAmount attribute value is %s",unify_value.dump().c_str()); + UN::SetpointChangeAmount::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback( + node_matter_endpoint, + Clusters::Thermostat::Id, + MN::SetpointChangeAmount::Id); + } + break; } // type is utc case MN::SetpointChangeSourceTimestamp::Id: { - using T = MN::SetpointChangeSourceTimestamp::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) { - sl_log_debug(LOG_TAG, "SetpointChangeSourceTimestamp attribute value is %s", unify_value.dump().c_str()); - UN::SetpointChangeSourceTimestamp::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::Thermostat::Id, - MN::SetpointChangeSourceTimestamp::Id); - } - break; + using T = MN::SetpointChangeSourceTimestamp::TypeInfo::Type; + std::optional value = from_json(unify_value); + + if( value.has_value()) { + sl_log_debug(LOG_TAG,"SetpointChangeSourceTimestamp attribute value is %s",unify_value.dump().c_str()); + UN::SetpointChangeSourceTimestamp::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback( + node_matter_endpoint, + Clusters::Thermostat::Id, + MN::SetpointChangeSourceTimestamp::Id); + } + break; } // type is int8u case MN::OccupiedSetback::Id: { - using T = MN::OccupiedSetback::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) { - sl_log_debug(LOG_TAG, "OccupiedSetback attribute value is %s", unify_value.dump().c_str()); - UN::OccupiedSetback::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::Thermostat::Id, MN::OccupiedSetback::Id); - } - break; + using T = MN::OccupiedSetback::TypeInfo::Type; + std::optional value = from_json(unify_value); + + if( value.has_value()) { + sl_log_debug(LOG_TAG,"OccupiedSetback attribute value is %s",unify_value.dump().c_str()); + UN::OccupiedSetback::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback( + node_matter_endpoint, + Clusters::Thermostat::Id, + MN::OccupiedSetback::Id); + } + break; } // type is int8u case MN::OccupiedSetbackMin::Id: { - using T = MN::OccupiedSetbackMin::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) { - sl_log_debug(LOG_TAG, "OccupiedSetbackMin attribute value is %s", unify_value.dump().c_str()); - UN::OccupiedSetbackMin::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::Thermostat::Id, MN::OccupiedSetbackMin::Id); - } - break; + using T = MN::OccupiedSetbackMin::TypeInfo::Type; + std::optional value = from_json(unify_value); + + if( value.has_value()) { + sl_log_debug(LOG_TAG,"OccupiedSetbackMin attribute value is %s",unify_value.dump().c_str()); + UN::OccupiedSetbackMin::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback( + node_matter_endpoint, + Clusters::Thermostat::Id, + MN::OccupiedSetbackMin::Id); + } + break; } // type is int8u case MN::OccupiedSetbackMax::Id: { - using T = MN::OccupiedSetbackMax::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) { - sl_log_debug(LOG_TAG, "OccupiedSetbackMax attribute value is %s", unify_value.dump().c_str()); - UN::OccupiedSetbackMax::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::Thermostat::Id, MN::OccupiedSetbackMax::Id); - } - break; + using T = MN::OccupiedSetbackMax::TypeInfo::Type; + std::optional value = from_json(unify_value); + + if( value.has_value()) { + sl_log_debug(LOG_TAG,"OccupiedSetbackMax attribute value is %s",unify_value.dump().c_str()); + UN::OccupiedSetbackMax::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback( + node_matter_endpoint, + Clusters::Thermostat::Id, + MN::OccupiedSetbackMax::Id); + } + break; } // type is int8u case MN::UnoccupiedSetback::Id: { - using T = MN::UnoccupiedSetback::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) { - sl_log_debug(LOG_TAG, "UnoccupiedSetback attribute value is %s", unify_value.dump().c_str()); - UN::UnoccupiedSetback::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::Thermostat::Id, MN::UnoccupiedSetback::Id); - } - break; + using T = MN::UnoccupiedSetback::TypeInfo::Type; + std::optional value = from_json(unify_value); + + if( value.has_value()) { + sl_log_debug(LOG_TAG,"UnoccupiedSetback attribute value is %s",unify_value.dump().c_str()); + UN::UnoccupiedSetback::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback( + node_matter_endpoint, + Clusters::Thermostat::Id, + MN::UnoccupiedSetback::Id); + } + break; } // type is int8u case MN::UnoccupiedSetbackMin::Id: { - using T = MN::UnoccupiedSetbackMin::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) { - sl_log_debug(LOG_TAG, "UnoccupiedSetbackMin attribute value is %s", unify_value.dump().c_str()); - UN::UnoccupiedSetbackMin::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::Thermostat::Id, MN::UnoccupiedSetbackMin::Id); - } - break; + using T = MN::UnoccupiedSetbackMin::TypeInfo::Type; + std::optional value = from_json(unify_value); + + if( value.has_value()) { + sl_log_debug(LOG_TAG,"UnoccupiedSetbackMin attribute value is %s",unify_value.dump().c_str()); + UN::UnoccupiedSetbackMin::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback( + node_matter_endpoint, + Clusters::Thermostat::Id, + MN::UnoccupiedSetbackMin::Id); + } + break; } // type is int8u case MN::UnoccupiedSetbackMax::Id: { - using T = MN::UnoccupiedSetbackMax::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) { - sl_log_debug(LOG_TAG, "UnoccupiedSetbackMax attribute value is %s", unify_value.dump().c_str()); - UN::UnoccupiedSetbackMax::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::Thermostat::Id, MN::UnoccupiedSetbackMax::Id); - } - break; + using T = MN::UnoccupiedSetbackMax::TypeInfo::Type; + std::optional value = from_json(unify_value); + + if( value.has_value()) { + sl_log_debug(LOG_TAG,"UnoccupiedSetbackMax attribute value is %s",unify_value.dump().c_str()); + UN::UnoccupiedSetbackMax::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback( + node_matter_endpoint, + Clusters::Thermostat::Id, + MN::UnoccupiedSetbackMax::Id); + } + break; } // type is int8u case MN::EmergencyHeatDelta::Id: { - using T = MN::EmergencyHeatDelta::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) { - sl_log_debug(LOG_TAG, "EmergencyHeatDelta attribute value is %s", unify_value.dump().c_str()); - UN::EmergencyHeatDelta::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::Thermostat::Id, MN::EmergencyHeatDelta::Id); - } - break; + using T = MN::EmergencyHeatDelta::TypeInfo::Type; + std::optional value = from_json(unify_value); + + if( value.has_value()) { + sl_log_debug(LOG_TAG,"EmergencyHeatDelta attribute value is %s",unify_value.dump().c_str()); + UN::EmergencyHeatDelta::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback( + node_matter_endpoint, + Clusters::Thermostat::Id, + MN::EmergencyHeatDelta::Id); + } + break; } // type is enum8 case MN::ACType::Id: { - using T = MN::ACType::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) { - sl_log_debug(LOG_TAG, "ACType attribute value is %s", unify_value.dump().c_str()); - UN::ACType::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::Thermostat::Id, MN::ACType::Id); - } - break; + using T = MN::ACType::TypeInfo::Type; + std::optional value = from_json(unify_value); + + if( value.has_value()) { + sl_log_debug(LOG_TAG,"ACType attribute value is %s",unify_value.dump().c_str()); + UN::ACType::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback( + node_matter_endpoint, + Clusters::Thermostat::Id, + MN::ACType::Id); + } + break; } // type is int16u case MN::ACCapacity::Id: { - using T = MN::ACCapacity::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) { - sl_log_debug(LOG_TAG, "ACCapacity attribute value is %s", unify_value.dump().c_str()); - UN::ACCapacity::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::Thermostat::Id, MN::ACCapacity::Id); - } - break; + using T = MN::ACCapacity::TypeInfo::Type; + std::optional value = from_json(unify_value); + + if( value.has_value()) { + sl_log_debug(LOG_TAG,"ACCapacity attribute value is %s",unify_value.dump().c_str()); + UN::ACCapacity::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback( + node_matter_endpoint, + Clusters::Thermostat::Id, + MN::ACCapacity::Id); + } + break; } // type is enum8 case MN::ACRefrigerantType::Id: { - using T = MN::ACRefrigerantType::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) { - sl_log_debug(LOG_TAG, "ACRefrigerantType attribute value is %s", unify_value.dump().c_str()); - UN::ACRefrigerantType::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::Thermostat::Id, MN::ACRefrigerantType::Id); - } - break; + using T = MN::ACRefrigerantType::TypeInfo::Type; + std::optional value = from_json(unify_value); + + if( value.has_value()) { + sl_log_debug(LOG_TAG,"ACRefrigerantType attribute value is %s",unify_value.dump().c_str()); + UN::ACRefrigerantType::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback( + node_matter_endpoint, + Clusters::Thermostat::Id, + MN::ACRefrigerantType::Id); + } + break; } // type is enum8 case MN::ACCompressorType::Id: { - using T = MN::ACCompressorType::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) { - sl_log_debug(LOG_TAG, "ACCompressorType attribute value is %s", unify_value.dump().c_str()); - UN::ACCompressorType::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::Thermostat::Id, MN::ACCompressorType::Id); - } - break; + using T = MN::ACCompressorType::TypeInfo::Type; + std::optional value = from_json(unify_value); + + if( value.has_value()) { + sl_log_debug(LOG_TAG,"ACCompressorType attribute value is %s",unify_value.dump().c_str()); + UN::ACCompressorType::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback( + node_matter_endpoint, + Clusters::Thermostat::Id, + MN::ACCompressorType::Id); + } + break; } // type is bitmap32 case MN::ACErrorCode::Id: { - using T = MN::ACErrorCode::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) { - sl_log_debug(LOG_TAG, "ACErrorCode attribute value is %s", unify_value.dump().c_str()); - UN::ACErrorCode::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::Thermostat::Id, MN::ACErrorCode::Id); - } - break; + using T = MN::ACErrorCode::TypeInfo::Type; + std::optional value = from_json(unify_value); + + if( value.has_value()) { + sl_log_debug(LOG_TAG,"ACErrorCode attribute value is %s",unify_value.dump().c_str()); + UN::ACErrorCode::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback( + node_matter_endpoint, + Clusters::Thermostat::Id, + MN::ACErrorCode::Id); + } + break; } // type is enum8 case MN::ACLouverPosition::Id: { - using T = MN::ACLouverPosition::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) { - sl_log_debug(LOG_TAG, "ACLouverPosition attribute value is %s", unify_value.dump().c_str()); - UN::ACLouverPosition::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::Thermostat::Id, MN::ACLouverPosition::Id); - } - break; + using T = MN::ACLouverPosition::TypeInfo::Type; + std::optional value = from_json(unify_value); + + if( value.has_value()) { + sl_log_debug(LOG_TAG,"ACLouverPosition attribute value is %s",unify_value.dump().c_str()); + UN::ACLouverPosition::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback( + node_matter_endpoint, + Clusters::Thermostat::Id, + MN::ACLouverPosition::Id); + } + break; } // type is int16s case MN::ACCoilTemperature::Id: { - using T = MN::ACCoilTemperature::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) { - sl_log_debug(LOG_TAG, "ACCoilTemperature attribute value is %s", unify_value.dump().c_str()); - UN::ACCoilTemperature::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::Thermostat::Id, MN::ACCoilTemperature::Id); - } - break; + using T = MN::ACCoilTemperature::TypeInfo::Type; + std::optional value = from_json(unify_value); + + if( value.has_value()) { + sl_log_debug(LOG_TAG,"ACCoilTemperature attribute value is %s",unify_value.dump().c_str()); + UN::ACCoilTemperature::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback( + node_matter_endpoint, + Clusters::Thermostat::Id, + MN::ACCoilTemperature::Id); + } + break; } // type is enum8 case MN::ACCapacityformat::Id: { - using T = MN::ACCapacityformat::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) { - sl_log_debug(LOG_TAG, "ACCapacityformat attribute value is %s", unify_value.dump().c_str()); - UN::ACCapacityformat::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::Thermostat::Id, MN::ACCapacityformat::Id); - } - break; - } - } + using T = MN::ACCapacityformat::TypeInfo::Type; + std::optional value = from_json(unify_value); + + if( value.has_value()) { + sl_log_debug(LOG_TAG,"ACCapacityformat attribute value is %s",unify_value.dump().c_str()); + UN::ACCapacityformat::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback( + node_matter_endpoint, + Clusters::Thermostat::Id, + MN::ACCapacityformat::Id); + } + break; + } + } } CHIP_ERROR -FanControlAttributeAccess::Read(const ConcreteReadAttributePath& aPath, AttributeValueEncoder& aEncoder) +FanControlAttributeAccess::Read(const ConcreteReadAttributePath &aPath, + AttributeValueEncoder &aEncoder) { - namespace MN = chip::app::Clusters::FanControl::Attributes; - namespace UN = unify::matter_bridge::FanControl::Attributes; - if (aPath.mClusterId != Clusters::FanControl::Id) { - return CHIP_ERROR_INVALID_ARGUMENT; - } + namespace MN = chip::app::Clusters::FanControl::Attributes; + namespace UN = unify::matter_bridge::FanControl::Attributes; + if (aPath.mClusterId != Clusters::FanControl::Id) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + // Do not handle Read for non-unify endpoints + auto unify_node = m_node_state_monitor.bridged_endpoint(aPath.mEndpointId); + + if (!unify_node) { + return CHIP_NO_ERROR; + } - ConcreteAttributePath atr_path = ConcreteAttributePath(aPath.mEndpointId, aPath.mClusterId, aPath.mAttributeId); - if (m_node_state_monitor.emulator().is_attribute_emulated(aPath)) { - return m_node_state_monitor.emulator().read_attribute(aPath, aEncoder); - } + ConcreteAttributePath atr_path = 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(atr_path, value); - return aEncoder.Encode(value); - } - case MN::FanModeSequence::Id: { // type is FanModeSequenceType - MN::FanModeSequence::TypeInfo::Type value; - UN::FanModeSequence::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::PercentSetting::Id: { // type is int8u - MN::PercentSetting::TypeInfo::Type value; - UN::PercentSetting::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::PercentCurrent::Id: { // type is int8u - MN::PercentCurrent::TypeInfo::Type value; - UN::PercentCurrent::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::SpeedMax::Id: { // type is int8u - MN::SpeedMax::TypeInfo::Type value; - UN::SpeedMax::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::SpeedSetting::Id: { // type is int8u - MN::SpeedSetting::TypeInfo::Type value; - UN::SpeedSetting::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::SpeedCurrent::Id: { // type is int8u - MN::SpeedCurrent::TypeInfo::Type value; - UN::SpeedCurrent::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::RockSupport::Id: { // type is bitmap8 - MN::RockSupport::TypeInfo::Type value; - UN::RockSupport::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::RockSetting::Id: { // type is bitmap8 - MN::RockSetting::TypeInfo::Type value; - UN::RockSetting::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::WindSupport::Id: { // type is bitmap8 - MN::WindSupport::TypeInfo::Type value; - UN::WindSupport::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::WindSetting::Id: { // type is bitmap8 - MN::WindSetting::TypeInfo::Type value; - UN::WindSetting::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::FeatureMap::Id: { // type is bitmap32 - MN::FeatureMap::TypeInfo::Type value; - UN::FeatureMap::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::ClusterRevision::Id: { // type is int16u - MN::ClusterRevision::TypeInfo::Type value; - UN::ClusterRevision::Get(atr_path, value); - return aEncoder.Encode(value); - } - } - } catch (const std::out_of_range& e) { - sl_log_info(LOG_TAG, - "The request attribute Path for endpoint [%i] is not found in the attribute state " - "container: %s\n", - atr_path.mEndpointId, e.what()); - return CHIP_ERROR_NO_MESSAGE_HANDLER; - } - return CHIP_NO_ERROR; + + if( m_node_state_monitor.emulator().is_attribute_emulated(aPath) ) { + return m_node_state_monitor.emulator().read_attribute(aPath,aEncoder); + } + + try { + switch (aPath.mAttributeId) { + case MN::FanMode::Id: { // type is FanModeType + MN::FanMode::TypeInfo::Type value; + UN::FanMode::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::FanModeSequence::Id: { // type is FanModeSequenceType + MN::FanModeSequence::TypeInfo::Type value; + UN::FanModeSequence::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::PercentSetting::Id: { // type is int8u + MN::PercentSetting::TypeInfo::Type value; + UN::PercentSetting::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::PercentCurrent::Id: { // type is int8u + MN::PercentCurrent::TypeInfo::Type value; + UN::PercentCurrent::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::SpeedMax::Id: { // type is int8u + MN::SpeedMax::TypeInfo::Type value; + UN::SpeedMax::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::SpeedSetting::Id: { // type is int8u + MN::SpeedSetting::TypeInfo::Type value; + UN::SpeedSetting::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::SpeedCurrent::Id: { // type is int8u + MN::SpeedCurrent::TypeInfo::Type value; + UN::SpeedCurrent::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::RockSupport::Id: { // type is bitmap8 + MN::RockSupport::TypeInfo::Type value; + UN::RockSupport::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::RockSetting::Id: { // type is bitmap8 + MN::RockSetting::TypeInfo::Type value; + UN::RockSetting::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::WindSupport::Id: { // type is bitmap8 + MN::WindSupport::TypeInfo::Type value; + UN::WindSupport::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::WindSetting::Id: { // type is bitmap8 + MN::WindSetting::TypeInfo::Type value; + UN::WindSetting::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::FeatureMap::Id: { // type is bitmap32 + MN::FeatureMap::TypeInfo::Type value; + UN::FeatureMap::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::ClusterRevision::Id: { // type is int16u + MN::ClusterRevision::TypeInfo::Type value; + UN::ClusterRevision::Get(atr_path, value); + return aEncoder.Encode(value); + } + } + } catch (const std::out_of_range &e) { + sl_log_info( + LOG_TAG, + "The request attribute Path for endpoint [%i] is not found in the attribute state " + "container: %s\n", atr_path.mEndpointId, e.what()); + return CHIP_ERROR_NO_MESSAGE_HANDLER; + } + return CHIP_NO_ERROR; } -CHIP_ERROR FanControlAttributeAccess::Write(const ConcreteDataAttributePath& aPath, AttributeValueDecoder& aDecoder) +CHIP_ERROR FanControlAttributeAccess::Write(const ConcreteDataAttributePath &aPath, + AttributeValueDecoder &aDecoder) { - using namespace chip::app::Clusters::FanControl; - - if (aPath.mClusterId != Clusters::FanControl::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; - - if (m_node_state_monitor.emulator().is_attribute_emulated(aPath)) { - return m_node_state_monitor.emulator().write_attribute(aPath, aDecoder); - } + using namespace chip::app::Clusters::FanControl; - switch (aPath.mAttributeId) { - case Attributes::FanMode::Id: { - - Attributes::FanMode::TypeInfo::DecodableType value; - aDecoder.Decode(value); - jsn["value"] = to_json(value); - attribute_name = "FanMode"; - break; - } - case Attributes::FanModeSequence::Id: { - - Attributes::FanModeSequence::TypeInfo::DecodableType value; - aDecoder.Decode(value); - jsn["value"] = to_json(value); - attribute_name = "FanModeSequence"; - break; - } - // percent current is not supported by UCL - // speed max is not supported by UCL - // speed current is not supported by UCL - // rock support is not supported by UCL - // wind support is not supported by UCL - // GeneratedCommandList is not supported by UCL - // AcceptedCommandList is not supported by UCL - // AttributeList is not supported by UCL - // FeatureMap is not supported by UCL - // ClusterRevision is not supported by UCL - } - - 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) + "/FanControl/Attributes/" + attribute_name + "/Desired"; - payload_str = jsn.dump(); - m_unify_mqtt.Publish(topic, payload_str, true); - return CHIP_NO_ERROR; - } + if (aPath.mClusterId != Clusters::FanControl::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; + + if( m_node_state_monitor.emulator().is_attribute_emulated(aPath) ) { + return m_node_state_monitor.emulator().write_attribute(aPath,aDecoder); + } + + switch (aPath.mAttributeId) { + case Attributes::FanMode::Id: { + + Attributes::FanMode::TypeInfo::DecodableType value; + aDecoder.Decode(value); + jsn["value"] = to_json(value); + attribute_name = "FanMode"; + break; + } + case Attributes::FanModeSequence::Id: { + + Attributes::FanModeSequence::TypeInfo::DecodableType value; + aDecoder.Decode(value); + jsn["value"] = to_json(value); + attribute_name = "FanModeSequence"; + break; + } + // percent current is not supported by UCL + // speed max is not supported by UCL + // speed current is not supported by UCL + // rock support is not supported by UCL + // wind support is not supported by UCL + // GeneratedCommandList is not supported by UCL + // AcceptedCommandList is not supported by UCL + // AttributeList is not supported by UCL + // FeatureMap is not supported by UCL + // ClusterRevision is not supported by UCL + } + + 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) + + "/FanControl/Attributes/" + attribute_name + "/Desired"; + payload_str = jsn.dump(); + m_unify_mqtt.Publish(topic, + payload_str, + true); + return CHIP_NO_ERROR; + } + + return CHIP_ERROR_NO_MESSAGE_HANDLER; } -void FanControlAttributeAccess::reported_updated(const bridged_endpoint* ep, const std::string& cluster, - const std::string& attribute, const nlohmann::json& unify_value) +void FanControlAttributeAccess::reported_updated(const bridged_endpoint *ep, + const std::string &cluster, + const std::string &attribute, + const nlohmann::json &unify_value) { - namespace MN = chip::app::Clusters::FanControl::Attributes; - namespace UN = unify::matter_bridge::FanControl::Attributes; + namespace MN = chip::app::Clusters::FanControl::Attributes; + namespace UN = unify::matter_bridge::FanControl::Attributes; - auto cluster_id = device_translator::instance().get_cluster_id(cluster); + auto cluster_id = device_translator::instance().get_cluster_id(cluster); - if (!cluster_id.has_value() || (cluster_id.value() != Clusters::FanControl::Id)) { - return; - } + if (!cluster_id.has_value() || (cluster_id.value() != Clusters::FanControl::Id)) { + return; + } - // get attribute id - auto attribute_id = device_translator::instance().get_attribute_id(cluster, attribute); + // get attribute id + auto attribute_id + = device_translator::instance().get_attribute_id(cluster, attribute); - if (!attribute_id.has_value()) { - return; - } + if (!attribute_id.has_value()) { + return; + } - chip::EndpointId node_matter_endpoint = ep->matter_endpoint; - ConcreteAttributePath attrpath = ConcreteAttributePath(node_matter_endpoint, Clusters::FanControl::Id, attribute_id.value()); - switch (attribute_id.value()) { + 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 case MN::FanMode::Id: { - using T = MN::FanMode::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) { - sl_log_debug(LOG_TAG, "FanMode attribute value is %s", unify_value.dump().c_str()); - UN::FanMode::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::FanControl::Id, MN::FanMode::Id); - } - break; + using T = MN::FanMode::TypeInfo::Type; + std::optional value = from_json(unify_value); + + if( value.has_value()) { + sl_log_debug(LOG_TAG,"FanMode attribute value is %s",unify_value.dump().c_str()); + UN::FanMode::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback( + node_matter_endpoint, + Clusters::FanControl::Id, + MN::FanMode::Id); + } + break; } // type is FanModeSequenceType case MN::FanModeSequence::Id: { - using T = MN::FanModeSequence::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) { - sl_log_debug(LOG_TAG, "FanModeSequence attribute value is %s", unify_value.dump().c_str()); - UN::FanModeSequence::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::FanControl::Id, MN::FanModeSequence::Id); - } - break; - } - } + using T = MN::FanModeSequence::TypeInfo::Type; + std::optional value = from_json(unify_value); + + if( value.has_value()) { + sl_log_debug(LOG_TAG,"FanModeSequence attribute value is %s",unify_value.dump().c_str()); + UN::FanModeSequence::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback( + node_matter_endpoint, + Clusters::FanControl::Id, + MN::FanModeSequence::Id); + } + break; + } + } } CHIP_ERROR -ThermostatUserInterfaceConfigurationAttributeAccess::Read(const ConcreteReadAttributePath& aPath, AttributeValueEncoder& aEncoder) +ThermostatUserInterfaceConfigurationAttributeAccess::Read(const ConcreteReadAttributePath &aPath, + AttributeValueEncoder &aEncoder) { - namespace MN = chip::app::Clusters::ThermostatUserInterfaceConfiguration::Attributes; - namespace UN = unify::matter_bridge::ThermostatUserInterfaceConfiguration::Attributes; - if (aPath.mClusterId != Clusters::ThermostatUserInterfaceConfiguration::Id) { - return CHIP_ERROR_INVALID_ARGUMENT; - } - - ConcreteAttributePath atr_path = ConcreteAttributePath(aPath.mEndpointId, aPath.mClusterId, aPath.mAttributeId); - - if (m_node_state_monitor.emulator().is_attribute_emulated(aPath)) { - return m_node_state_monitor.emulator().read_attribute(aPath, aEncoder); - } - - try { - switch (aPath.mAttributeId) { - case MN::TemperatureDisplayMode::Id: { // type is enum8 - MN::TemperatureDisplayMode::TypeInfo::Type value; - UN::TemperatureDisplayMode::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::KeypadLockout::Id: { // type is enum8 - MN::KeypadLockout::TypeInfo::Type value; - UN::KeypadLockout::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::ScheduleProgrammingVisibility::Id: { // type is enum8 - MN::ScheduleProgrammingVisibility::TypeInfo::Type value; - UN::ScheduleProgrammingVisibility::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::FeatureMap::Id: { // type is bitmap32 - MN::FeatureMap::TypeInfo::Type value; - UN::FeatureMap::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::ClusterRevision::Id: { // type is int16u - MN::ClusterRevision::TypeInfo::Type value; - UN::ClusterRevision::Get(atr_path, value); - return aEncoder.Encode(value); - } - } - } catch (const std::out_of_range& e) { - sl_log_info(LOG_TAG, - "The request attribute Path for endpoint [%i] is not found in the attribute state " - "container: %s\n", - atr_path.mEndpointId, e.what()); - return CHIP_ERROR_NO_MESSAGE_HANDLER; - } + namespace MN = chip::app::Clusters::ThermostatUserInterfaceConfiguration::Attributes; + namespace UN = unify::matter_bridge::ThermostatUserInterfaceConfiguration::Attributes; + if (aPath.mClusterId != Clusters::ThermostatUserInterfaceConfiguration::Id) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + // Do not handle Read for non-unify endpoints + auto unify_node = m_node_state_monitor.bridged_endpoint(aPath.mEndpointId); + + if (!unify_node) { return CHIP_NO_ERROR; -} - -CHIP_ERROR ThermostatUserInterfaceConfigurationAttributeAccess::Write(const ConcreteDataAttributePath& aPath, - AttributeValueDecoder& aDecoder) -{ - using namespace chip::app::Clusters::ThermostatUserInterfaceConfiguration; - - if (aPath.mClusterId != Clusters::ThermostatUserInterfaceConfiguration::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; - if (m_node_state_monitor.emulator().is_attribute_emulated(aPath)) { - return m_node_state_monitor.emulator().write_attribute(aPath, aDecoder); - } + ConcreteAttributePath atr_path = ConcreteAttributePath(aPath.mEndpointId, + aPath.mClusterId, + aPath.mAttributeId); + + if( m_node_state_monitor.emulator().is_attribute_emulated(aPath) ) { + return m_node_state_monitor.emulator().read_attribute(aPath,aEncoder); + } + + try { switch (aPath.mAttributeId) { - case Attributes::TemperatureDisplayMode::Id: { - - Attributes::TemperatureDisplayMode::TypeInfo::DecodableType value; - aDecoder.Decode(value); - jsn["value"] = to_json(value); - attribute_name = "TemperatureDisplayMode"; - break; - } - case Attributes::KeypadLockout::Id: { - - Attributes::KeypadLockout::TypeInfo::DecodableType value; - aDecoder.Decode(value); - jsn["value"] = to_json(value); - attribute_name = "KeypadLockout"; - break; - } - case Attributes::ScheduleProgrammingVisibility::Id: { + case MN::TemperatureDisplayMode::Id: { // type is enum8 + MN::TemperatureDisplayMode::TypeInfo::Type value; + UN::TemperatureDisplayMode::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::KeypadLockout::Id: { // type is enum8 + MN::KeypadLockout::TypeInfo::Type value; + UN::KeypadLockout::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::ScheduleProgrammingVisibility::Id: { // type is enum8 + MN::ScheduleProgrammingVisibility::TypeInfo::Type value; + UN::ScheduleProgrammingVisibility::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::FeatureMap::Id: { // type is bitmap32 + MN::FeatureMap::TypeInfo::Type value; + UN::FeatureMap::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::ClusterRevision::Id: { // type is int16u + MN::ClusterRevision::TypeInfo::Type value; + UN::ClusterRevision::Get(atr_path, value); + return aEncoder.Encode(value); + } + } + } catch (const std::out_of_range &e) { + sl_log_info( + LOG_TAG, + "The request attribute Path for endpoint [%i] is not found in the attribute state " + "container: %s\n", atr_path.mEndpointId, e.what()); + return CHIP_ERROR_NO_MESSAGE_HANDLER; + } + return CHIP_NO_ERROR; +} - Attributes::ScheduleProgrammingVisibility::TypeInfo::DecodableType value; - aDecoder.Decode(value); - jsn["value"] = to_json(value); - attribute_name = "ScheduleProgrammingVisibility"; - break; - } - // GeneratedCommandList is not supported by UCL - // AcceptedCommandList is not supported by UCL - // AttributeList is not supported by UCL - // FeatureMap is not supported by UCL - // ClusterRevision is not supported by UCL - } +CHIP_ERROR ThermostatUserInterfaceConfigurationAttributeAccess::Write(const ConcreteDataAttributePath &aPath, + AttributeValueDecoder &aDecoder) +{ + using namespace chip::app::Clusters::ThermostatUserInterfaceConfiguration; - 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) + "/ThermostatUserInterfaceConfiguration/Attributes/" + attribute_name + "/Desired"; - payload_str = jsn.dump(); - m_unify_mqtt.Publish(topic, payload_str, true); - return CHIP_NO_ERROR; - } + if (aPath.mClusterId != Clusters::ThermostatUserInterfaceConfiguration::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; + + if( m_node_state_monitor.emulator().is_attribute_emulated(aPath) ) { + return m_node_state_monitor.emulator().write_attribute(aPath,aDecoder); + } + + switch (aPath.mAttributeId) { + case Attributes::TemperatureDisplayMode::Id: { + + Attributes::TemperatureDisplayMode::TypeInfo::DecodableType value; + aDecoder.Decode(value); + jsn["value"] = to_json(value); + attribute_name = "TemperatureDisplayMode"; + break; + } + case Attributes::KeypadLockout::Id: { + + Attributes::KeypadLockout::TypeInfo::DecodableType value; + aDecoder.Decode(value); + jsn["value"] = to_json(value); + attribute_name = "KeypadLockout"; + break; + } + case Attributes::ScheduleProgrammingVisibility::Id: { + + Attributes::ScheduleProgrammingVisibility::TypeInfo::DecodableType value; + aDecoder.Decode(value); + jsn["value"] = to_json(value); + attribute_name = "ScheduleProgrammingVisibility"; + break; + } + // GeneratedCommandList is not supported by UCL + // AcceptedCommandList is not supported by UCL + // AttributeList is not supported by UCL + // FeatureMap is not supported by UCL + // ClusterRevision is not supported by UCL + } + + 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) + + "/ThermostatUserInterfaceConfiguration/Attributes/" + attribute_name + "/Desired"; + payload_str = jsn.dump(); + m_unify_mqtt.Publish(topic, + payload_str, + true); + return CHIP_NO_ERROR; + } + + return CHIP_ERROR_NO_MESSAGE_HANDLER; } -void ThermostatUserInterfaceConfigurationAttributeAccess::reported_updated(const bridged_endpoint* ep, const std::string& cluster, - const std::string& attribute, - const nlohmann::json& unify_value) +void ThermostatUserInterfaceConfigurationAttributeAccess::reported_updated(const bridged_endpoint *ep, + const std::string &cluster, + const std::string &attribute, + const nlohmann::json &unify_value) { - namespace MN = chip::app::Clusters::ThermostatUserInterfaceConfiguration::Attributes; - namespace UN = unify::matter_bridge::ThermostatUserInterfaceConfiguration::Attributes; + namespace MN = chip::app::Clusters::ThermostatUserInterfaceConfiguration::Attributes; + namespace UN = unify::matter_bridge::ThermostatUserInterfaceConfiguration::Attributes; - auto cluster_id = device_translator::instance().get_cluster_id(cluster); + auto cluster_id = device_translator::instance().get_cluster_id(cluster); - if (!cluster_id.has_value() || (cluster_id.value() != Clusters::ThermostatUserInterfaceConfiguration::Id)) { - return; - } + if (!cluster_id.has_value() || (cluster_id.value() != Clusters::ThermostatUserInterfaceConfiguration::Id)) { + return; + } - // get attribute id - auto attribute_id = device_translator::instance().get_attribute_id(cluster, attribute); + // get attribute id + auto attribute_id + = device_translator::instance().get_attribute_id(cluster, attribute); - if (!attribute_id.has_value()) { - return; - } + if (!attribute_id.has_value()) { + return; + } - chip::EndpointId node_matter_endpoint = ep->matter_endpoint; - ConcreteAttributePath attrpath = ConcreteAttributePath(node_matter_endpoint, Clusters::ThermostatUserInterfaceConfiguration::Id, attribute_id.value()); - switch (attribute_id.value()) { + 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 case MN::TemperatureDisplayMode::Id: { - using T = MN::TemperatureDisplayMode::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) { - sl_log_debug(LOG_TAG, "TemperatureDisplayMode attribute value is %s", unify_value.dump().c_str()); - UN::TemperatureDisplayMode::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::ThermostatUserInterfaceConfiguration::Id, - MN::TemperatureDisplayMode::Id); - } - break; + using T = MN::TemperatureDisplayMode::TypeInfo::Type; + std::optional value = from_json(unify_value); + + if( value.has_value()) { + sl_log_debug(LOG_TAG,"TemperatureDisplayMode attribute value is %s",unify_value.dump().c_str()); + UN::TemperatureDisplayMode::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback( + node_matter_endpoint, + Clusters::ThermostatUserInterfaceConfiguration::Id, + MN::TemperatureDisplayMode::Id); + } + break; } // type is enum8 case MN::KeypadLockout::Id: { - using T = MN::KeypadLockout::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) { - sl_log_debug(LOG_TAG, "KeypadLockout attribute value is %s", unify_value.dump().c_str()); - UN::KeypadLockout::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::ThermostatUserInterfaceConfiguration::Id, - MN::KeypadLockout::Id); - } - break; + using T = MN::KeypadLockout::TypeInfo::Type; + std::optional value = from_json(unify_value); + + if( value.has_value()) { + sl_log_debug(LOG_TAG,"KeypadLockout attribute value is %s",unify_value.dump().c_str()); + UN::KeypadLockout::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback( + node_matter_endpoint, + Clusters::ThermostatUserInterfaceConfiguration::Id, + MN::KeypadLockout::Id); + } + break; } // type is enum8 case MN::ScheduleProgrammingVisibility::Id: { - using T = MN::ScheduleProgrammingVisibility::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) { - sl_log_debug(LOG_TAG, "ScheduleProgrammingVisibility attribute value is %s", unify_value.dump().c_str()); - UN::ScheduleProgrammingVisibility::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::ThermostatUserInterfaceConfiguration::Id, - MN::ScheduleProgrammingVisibility::Id); - } - break; - } - } + using T = MN::ScheduleProgrammingVisibility::TypeInfo::Type; + std::optional value = from_json(unify_value); + + if( value.has_value()) { + sl_log_debug(LOG_TAG,"ScheduleProgrammingVisibility attribute value is %s",unify_value.dump().c_str()); + UN::ScheduleProgrammingVisibility::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback( + node_matter_endpoint, + Clusters::ThermostatUserInterfaceConfiguration::Id, + MN::ScheduleProgrammingVisibility::Id); + } + break; + } + } } CHIP_ERROR -ColorControlAttributeAccess::Read(const ConcreteReadAttributePath& aPath, AttributeValueEncoder& aEncoder) +ColorControlAttributeAccess::Read(const ConcreteReadAttributePath &aPath, + AttributeValueEncoder &aEncoder) { - namespace MN = chip::app::Clusters::ColorControl::Attributes; - namespace UN = unify::matter_bridge::ColorControl::Attributes; - if (aPath.mClusterId != Clusters::ColorControl::Id) { - return CHIP_ERROR_INVALID_ARGUMENT; - } + namespace MN = chip::app::Clusters::ColorControl::Attributes; + namespace UN = unify::matter_bridge::ColorControl::Attributes; + if (aPath.mClusterId != Clusters::ColorControl::Id) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + // Do not handle Read for non-unify endpoints + auto unify_node = m_node_state_monitor.bridged_endpoint(aPath.mEndpointId); + + if (!unify_node) { + return CHIP_NO_ERROR; + } - ConcreteAttributePath atr_path = ConcreteAttributePath(aPath.mEndpointId, aPath.mClusterId, aPath.mAttributeId); - if (m_node_state_monitor.emulator().is_attribute_emulated(aPath)) { - return m_node_state_monitor.emulator().read_attribute(aPath, aEncoder); - } + ConcreteAttributePath atr_path = 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(atr_path, value); - return aEncoder.Encode(value); - } - case MN::CurrentSaturation::Id: { // type is int8u - MN::CurrentSaturation::TypeInfo::Type value; - UN::CurrentSaturation::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::RemainingTime::Id: { // type is int16u - MN::RemainingTime::TypeInfo::Type value; - UN::RemainingTime::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::CurrentX::Id: { // type is int16u - MN::CurrentX::TypeInfo::Type value; - UN::CurrentX::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::CurrentY::Id: { // type is int16u - MN::CurrentY::TypeInfo::Type value; - UN::CurrentY::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::DriftCompensation::Id: { // type is enum8 - MN::DriftCompensation::TypeInfo::Type value; - UN::DriftCompensation::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::CompensationText::Id: { // type is char_string - MN::CompensationText::TypeInfo::Type value; - UN::CompensationText::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::ColorTemperatureMireds::Id: { // type is int16u - MN::ColorTemperatureMireds::TypeInfo::Type value; - UN::ColorTemperatureMireds::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::ColorMode::Id: { // type is enum8 - MN::ColorMode::TypeInfo::Type value; - UN::ColorMode::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::Options::Id: { // type is bitmap8 - MN::Options::TypeInfo::Type value; - UN::Options::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::NumberOfPrimaries::Id: { // type is int8u - MN::NumberOfPrimaries::TypeInfo::Type value; - UN::NumberOfPrimaries::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::Primary1X::Id: { // type is int16u - MN::Primary1X::TypeInfo::Type value; - UN::Primary1X::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::Primary1Y::Id: { // type is int16u - MN::Primary1Y::TypeInfo::Type value; - UN::Primary1Y::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::Primary1Intensity::Id: { // type is int8u - MN::Primary1Intensity::TypeInfo::Type value; - UN::Primary1Intensity::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::Primary2X::Id: { // type is int16u - MN::Primary2X::TypeInfo::Type value; - UN::Primary2X::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::Primary2Y::Id: { // type is int16u - MN::Primary2Y::TypeInfo::Type value; - UN::Primary2Y::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::Primary2Intensity::Id: { // type is int8u - MN::Primary2Intensity::TypeInfo::Type value; - UN::Primary2Intensity::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::Primary3X::Id: { // type is int16u - MN::Primary3X::TypeInfo::Type value; - UN::Primary3X::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::Primary3Y::Id: { // type is int16u - MN::Primary3Y::TypeInfo::Type value; - UN::Primary3Y::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::Primary3Intensity::Id: { // type is int8u - MN::Primary3Intensity::TypeInfo::Type value; - UN::Primary3Intensity::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::Primary4X::Id: { // type is int16u - MN::Primary4X::TypeInfo::Type value; - UN::Primary4X::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::Primary4Y::Id: { // type is int16u - MN::Primary4Y::TypeInfo::Type value; - UN::Primary4Y::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::Primary4Intensity::Id: { // type is int8u - MN::Primary4Intensity::TypeInfo::Type value; - UN::Primary4Intensity::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::Primary5X::Id: { // type is int16u - MN::Primary5X::TypeInfo::Type value; - UN::Primary5X::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::Primary5Y::Id: { // type is int16u - MN::Primary5Y::TypeInfo::Type value; - UN::Primary5Y::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::Primary5Intensity::Id: { // type is int8u - MN::Primary5Intensity::TypeInfo::Type value; - UN::Primary5Intensity::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::Primary6X::Id: { // type is int16u - MN::Primary6X::TypeInfo::Type value; - UN::Primary6X::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::Primary6Y::Id: { // type is int16u - MN::Primary6Y::TypeInfo::Type value; - UN::Primary6Y::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::Primary6Intensity::Id: { // type is int8u - MN::Primary6Intensity::TypeInfo::Type value; - UN::Primary6Intensity::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::WhitePointX::Id: { // type is int16u - MN::WhitePointX::TypeInfo::Type value; - UN::WhitePointX::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::WhitePointY::Id: { // type is int16u - MN::WhitePointY::TypeInfo::Type value; - UN::WhitePointY::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::ColorPointRX::Id: { // type is int16u - MN::ColorPointRX::TypeInfo::Type value; - UN::ColorPointRX::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::ColorPointRY::Id: { // type is int16u - MN::ColorPointRY::TypeInfo::Type value; - UN::ColorPointRY::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::ColorPointRIntensity::Id: { // type is int8u - MN::ColorPointRIntensity::TypeInfo::Type value; - UN::ColorPointRIntensity::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::ColorPointGX::Id: { // type is int16u - MN::ColorPointGX::TypeInfo::Type value; - UN::ColorPointGX::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::ColorPointGY::Id: { // type is int16u - MN::ColorPointGY::TypeInfo::Type value; - UN::ColorPointGY::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::ColorPointGIntensity::Id: { // type is int8u - MN::ColorPointGIntensity::TypeInfo::Type value; - UN::ColorPointGIntensity::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::ColorPointBX::Id: { // type is int16u - MN::ColorPointBX::TypeInfo::Type value; - UN::ColorPointBX::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::ColorPointBY::Id: { // type is int16u - MN::ColorPointBY::TypeInfo::Type value; - UN::ColorPointBY::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::ColorPointBIntensity::Id: { // type is int8u - MN::ColorPointBIntensity::TypeInfo::Type value; - UN::ColorPointBIntensity::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::EnhancedCurrentHue::Id: { // type is int16u - MN::EnhancedCurrentHue::TypeInfo::Type value; - UN::EnhancedCurrentHue::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::EnhancedColorMode::Id: { // type is enum8 - MN::EnhancedColorMode::TypeInfo::Type value; - UN::EnhancedColorMode::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::ColorLoopActive::Id: { // type is int8u - MN::ColorLoopActive::TypeInfo::Type value; - UN::ColorLoopActive::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::ColorLoopDirection::Id: { // type is int8u - MN::ColorLoopDirection::TypeInfo::Type value; - UN::ColorLoopDirection::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::ColorLoopTime::Id: { // type is int16u - MN::ColorLoopTime::TypeInfo::Type value; - UN::ColorLoopTime::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::ColorLoopStartEnhancedHue::Id: { // type is int16u - MN::ColorLoopStartEnhancedHue::TypeInfo::Type value; - UN::ColorLoopStartEnhancedHue::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::ColorLoopStoredEnhancedHue::Id: { // type is int16u - MN::ColorLoopStoredEnhancedHue::TypeInfo::Type value; - UN::ColorLoopStoredEnhancedHue::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::ColorCapabilities::Id: { // type is bitmap16 - MN::ColorCapabilities::TypeInfo::Type value; - UN::ColorCapabilities::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::ColorTempPhysicalMinMireds::Id: { // type is int16u - MN::ColorTempPhysicalMinMireds::TypeInfo::Type value; - UN::ColorTempPhysicalMinMireds::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::ColorTempPhysicalMaxMireds::Id: { // type is int16u - MN::ColorTempPhysicalMaxMireds::TypeInfo::Type value; - UN::ColorTempPhysicalMaxMireds::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::CoupleColorTempToLevelMinMireds::Id: { // type is int16u - MN::CoupleColorTempToLevelMinMireds::TypeInfo::Type value; - UN::CoupleColorTempToLevelMinMireds::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::StartUpColorTemperatureMireds::Id: { // type is int16u - MN::StartUpColorTemperatureMireds::TypeInfo::Type value; - UN::StartUpColorTemperatureMireds::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::FeatureMap::Id: { // type is bitmap32 - MN::FeatureMap::TypeInfo::Type value; - UN::FeatureMap::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::ClusterRevision::Id: { // type is int16u - MN::ClusterRevision::TypeInfo::Type value; - UN::ClusterRevision::Get(atr_path, value); - return aEncoder.Encode(value); - } - } - } catch (const std::out_of_range& e) { - sl_log_info(LOG_TAG, - "The request attribute Path for endpoint [%i] is not found in the attribute state " - "container: %s\n", - atr_path.mEndpointId, e.what()); - return CHIP_ERROR_NO_MESSAGE_HANDLER; - } - return CHIP_NO_ERROR; + + if( m_node_state_monitor.emulator().is_attribute_emulated(aPath) ) { + return m_node_state_monitor.emulator().read_attribute(aPath,aEncoder); + } + + try { + switch (aPath.mAttributeId) { + case MN::CurrentHue::Id: { // type is int8u + MN::CurrentHue::TypeInfo::Type value; + UN::CurrentHue::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::CurrentSaturation::Id: { // type is int8u + MN::CurrentSaturation::TypeInfo::Type value; + UN::CurrentSaturation::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::RemainingTime::Id: { // type is int16u + MN::RemainingTime::TypeInfo::Type value; + UN::RemainingTime::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::CurrentX::Id: { // type is int16u + MN::CurrentX::TypeInfo::Type value; + UN::CurrentX::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::CurrentY::Id: { // type is int16u + MN::CurrentY::TypeInfo::Type value; + UN::CurrentY::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::DriftCompensation::Id: { // type is enum8 + MN::DriftCompensation::TypeInfo::Type value; + UN::DriftCompensation::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::CompensationText::Id: { // type is char_string + MN::CompensationText::TypeInfo::Type value; + UN::CompensationText::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::ColorTemperatureMireds::Id: { // type is int16u + MN::ColorTemperatureMireds::TypeInfo::Type value; + UN::ColorTemperatureMireds::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::ColorMode::Id: { // type is enum8 + MN::ColorMode::TypeInfo::Type value; + UN::ColorMode::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::Options::Id: { // type is bitmap8 + MN::Options::TypeInfo::Type value; + UN::Options::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::NumberOfPrimaries::Id: { // type is int8u + MN::NumberOfPrimaries::TypeInfo::Type value; + UN::NumberOfPrimaries::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::Primary1X::Id: { // type is int16u + MN::Primary1X::TypeInfo::Type value; + UN::Primary1X::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::Primary1Y::Id: { // type is int16u + MN::Primary1Y::TypeInfo::Type value; + UN::Primary1Y::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::Primary1Intensity::Id: { // type is int8u + MN::Primary1Intensity::TypeInfo::Type value; + UN::Primary1Intensity::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::Primary2X::Id: { // type is int16u + MN::Primary2X::TypeInfo::Type value; + UN::Primary2X::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::Primary2Y::Id: { // type is int16u + MN::Primary2Y::TypeInfo::Type value; + UN::Primary2Y::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::Primary2Intensity::Id: { // type is int8u + MN::Primary2Intensity::TypeInfo::Type value; + UN::Primary2Intensity::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::Primary3X::Id: { // type is int16u + MN::Primary3X::TypeInfo::Type value; + UN::Primary3X::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::Primary3Y::Id: { // type is int16u + MN::Primary3Y::TypeInfo::Type value; + UN::Primary3Y::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::Primary3Intensity::Id: { // type is int8u + MN::Primary3Intensity::TypeInfo::Type value; + UN::Primary3Intensity::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::Primary4X::Id: { // type is int16u + MN::Primary4X::TypeInfo::Type value; + UN::Primary4X::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::Primary4Y::Id: { // type is int16u + MN::Primary4Y::TypeInfo::Type value; + UN::Primary4Y::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::Primary4Intensity::Id: { // type is int8u + MN::Primary4Intensity::TypeInfo::Type value; + UN::Primary4Intensity::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::Primary5X::Id: { // type is int16u + MN::Primary5X::TypeInfo::Type value; + UN::Primary5X::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::Primary5Y::Id: { // type is int16u + MN::Primary5Y::TypeInfo::Type value; + UN::Primary5Y::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::Primary5Intensity::Id: { // type is int8u + MN::Primary5Intensity::TypeInfo::Type value; + UN::Primary5Intensity::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::Primary6X::Id: { // type is int16u + MN::Primary6X::TypeInfo::Type value; + UN::Primary6X::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::Primary6Y::Id: { // type is int16u + MN::Primary6Y::TypeInfo::Type value; + UN::Primary6Y::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::Primary6Intensity::Id: { // type is int8u + MN::Primary6Intensity::TypeInfo::Type value; + UN::Primary6Intensity::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::WhitePointX::Id: { // type is int16u + MN::WhitePointX::TypeInfo::Type value; + UN::WhitePointX::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::WhitePointY::Id: { // type is int16u + MN::WhitePointY::TypeInfo::Type value; + UN::WhitePointY::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::ColorPointRX::Id: { // type is int16u + MN::ColorPointRX::TypeInfo::Type value; + UN::ColorPointRX::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::ColorPointRY::Id: { // type is int16u + MN::ColorPointRY::TypeInfo::Type value; + UN::ColorPointRY::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::ColorPointRIntensity::Id: { // type is int8u + MN::ColorPointRIntensity::TypeInfo::Type value; + UN::ColorPointRIntensity::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::ColorPointGX::Id: { // type is int16u + MN::ColorPointGX::TypeInfo::Type value; + UN::ColorPointGX::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::ColorPointGY::Id: { // type is int16u + MN::ColorPointGY::TypeInfo::Type value; + UN::ColorPointGY::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::ColorPointGIntensity::Id: { // type is int8u + MN::ColorPointGIntensity::TypeInfo::Type value; + UN::ColorPointGIntensity::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::ColorPointBX::Id: { // type is int16u + MN::ColorPointBX::TypeInfo::Type value; + UN::ColorPointBX::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::ColorPointBY::Id: { // type is int16u + MN::ColorPointBY::TypeInfo::Type value; + UN::ColorPointBY::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::ColorPointBIntensity::Id: { // type is int8u + MN::ColorPointBIntensity::TypeInfo::Type value; + UN::ColorPointBIntensity::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::EnhancedCurrentHue::Id: { // type is int16u + MN::EnhancedCurrentHue::TypeInfo::Type value; + UN::EnhancedCurrentHue::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::EnhancedColorMode::Id: { // type is enum8 + MN::EnhancedColorMode::TypeInfo::Type value; + UN::EnhancedColorMode::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::ColorLoopActive::Id: { // type is int8u + MN::ColorLoopActive::TypeInfo::Type value; + UN::ColorLoopActive::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::ColorLoopDirection::Id: { // type is int8u + MN::ColorLoopDirection::TypeInfo::Type value; + UN::ColorLoopDirection::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::ColorLoopTime::Id: { // type is int16u + MN::ColorLoopTime::TypeInfo::Type value; + UN::ColorLoopTime::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::ColorLoopStartEnhancedHue::Id: { // type is int16u + MN::ColorLoopStartEnhancedHue::TypeInfo::Type value; + UN::ColorLoopStartEnhancedHue::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::ColorLoopStoredEnhancedHue::Id: { // type is int16u + MN::ColorLoopStoredEnhancedHue::TypeInfo::Type value; + UN::ColorLoopStoredEnhancedHue::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::ColorCapabilities::Id: { // type is bitmap16 + MN::ColorCapabilities::TypeInfo::Type value; + UN::ColorCapabilities::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::ColorTempPhysicalMinMireds::Id: { // type is int16u + MN::ColorTempPhysicalMinMireds::TypeInfo::Type value; + UN::ColorTempPhysicalMinMireds::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::ColorTempPhysicalMaxMireds::Id: { // type is int16u + MN::ColorTempPhysicalMaxMireds::TypeInfo::Type value; + UN::ColorTempPhysicalMaxMireds::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::CoupleColorTempToLevelMinMireds::Id: { // type is int16u + MN::CoupleColorTempToLevelMinMireds::TypeInfo::Type value; + UN::CoupleColorTempToLevelMinMireds::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::StartUpColorTemperatureMireds::Id: { // type is int16u + MN::StartUpColorTemperatureMireds::TypeInfo::Type value; + UN::StartUpColorTemperatureMireds::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::FeatureMap::Id: { // type is bitmap32 + MN::FeatureMap::TypeInfo::Type value; + UN::FeatureMap::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::ClusterRevision::Id: { // type is int16u + MN::ClusterRevision::TypeInfo::Type value; + UN::ClusterRevision::Get(atr_path, value); + return aEncoder.Encode(value); + } + } + } catch (const std::out_of_range &e) { + sl_log_info( + LOG_TAG, + "The request attribute Path for endpoint [%i] is not found in the attribute state " + "container: %s\n", atr_path.mEndpointId, e.what()); + return CHIP_ERROR_NO_MESSAGE_HANDLER; + } + return CHIP_NO_ERROR; } -CHIP_ERROR ColorControlAttributeAccess::Write(const ConcreteDataAttributePath& aPath, AttributeValueDecoder& aDecoder) +CHIP_ERROR ColorControlAttributeAccess::Write(const ConcreteDataAttributePath &aPath, + AttributeValueDecoder &aDecoder) { - using namespace chip::app::Clusters::ColorControl; - - if (aPath.mClusterId != Clusters::ColorControl::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; + using namespace chip::app::Clusters::ColorControl; - if (m_node_state_monitor.emulator().is_attribute_emulated(aPath)) { - return m_node_state_monitor.emulator().write_attribute(aPath, aDecoder); - } - - switch (aPath.mAttributeId) { - // CurrentHue is not supported by UCL - // CurrentSaturation is not supported by UCL - // RemainingTime is not supported by UCL - // CurrentX is not supported by UCL - // CurrentY is not supported by UCL - // DriftCompensation is not supported by UCL - // CompensationText is not supported by UCL - // ColorTemperatureMireds is not supported by UCL - // ColorMode is not supported by UCL - case Attributes::Options::Id: { - - Attributes::Options::TypeInfo::DecodableType value; - aDecoder.Decode(value); - jsn["value"] = to_json(value); - attribute_name = "Options"; - break; - } - // NumberOfPrimaries is not supported by UCL - // Primary1X is not supported by UCL - // Primary1Y is not supported by UCL - // Primary1Intensity is not supported by UCL - // Primary2X is not supported by UCL - // Primary2Y is not supported by UCL - // Primary2Intensity is not supported by UCL - // Primary3X is not supported by UCL - // Primary3Y is not supported by UCL - // Primary3Intensity is not supported by UCL - // Primary4X is not supported by UCL - // Primary4Y is not supported by UCL - // Primary4Intensity is not supported by UCL - // Primary5X is not supported by UCL - // Primary5Y is not supported by UCL - // Primary5Intensity is not supported by UCL - // Primary6X is not supported by UCL - // Primary6Y is not supported by UCL - // Primary6Intensity is not supported by UCL - case Attributes::WhitePointX::Id: { - - Attributes::WhitePointX::TypeInfo::DecodableType value; - aDecoder.Decode(value); - jsn["value"] = to_json(value); - attribute_name = "WhitePointX"; - break; - } - case Attributes::WhitePointY::Id: { - - Attributes::WhitePointY::TypeInfo::DecodableType value; - aDecoder.Decode(value); - jsn["value"] = to_json(value); - attribute_name = "WhitePointY"; - break; - } - case Attributes::ColorPointRX::Id: { - - Attributes::ColorPointRX::TypeInfo::DecodableType value; - aDecoder.Decode(value); - jsn["value"] = to_json(value); - attribute_name = "ColorPointRX"; - break; - } - case Attributes::ColorPointRY::Id: { - - Attributes::ColorPointRY::TypeInfo::DecodableType value; - aDecoder.Decode(value); - jsn["value"] = to_json(value); - attribute_name = "ColorPointRY"; - break; - } - case Attributes::ColorPointRIntensity::Id: { - - Attributes::ColorPointRIntensity::TypeInfo::DecodableType value; - aDecoder.Decode(value); - jsn["value"] = to_json(value); - attribute_name = "ColorPointRIntensity"; - break; - } - case Attributes::ColorPointGX::Id: { - - Attributes::ColorPointGX::TypeInfo::DecodableType value; - aDecoder.Decode(value); - jsn["value"] = to_json(value); - attribute_name = "ColorPointGX"; - break; - } - case Attributes::ColorPointGY::Id: { - - Attributes::ColorPointGY::TypeInfo::DecodableType value; - aDecoder.Decode(value); - jsn["value"] = to_json(value); - attribute_name = "ColorPointGY"; - break; - } - case Attributes::ColorPointGIntensity::Id: { - - Attributes::ColorPointGIntensity::TypeInfo::DecodableType value; - aDecoder.Decode(value); - jsn["value"] = to_json(value); - attribute_name = "ColorPointGIntensity"; - break; - } - case Attributes::ColorPointBX::Id: { - - Attributes::ColorPointBX::TypeInfo::DecodableType value; - aDecoder.Decode(value); - jsn["value"] = to_json(value); - attribute_name = "ColorPointBX"; - break; - } - case Attributes::ColorPointBY::Id: { - - Attributes::ColorPointBY::TypeInfo::DecodableType value; - aDecoder.Decode(value); - jsn["value"] = to_json(value); - attribute_name = "ColorPointBY"; - break; - } - case Attributes::ColorPointBIntensity::Id: { - - Attributes::ColorPointBIntensity::TypeInfo::DecodableType value; - aDecoder.Decode(value); - jsn["value"] = to_json(value); - attribute_name = "ColorPointBIntensity"; - break; - } - // EnhancedCurrentHue is not supported by UCL - // EnhancedColorMode is not supported by UCL - // ColorLoopActive is not supported by UCL - // ColorLoopDirection is not supported by UCL - // ColorLoopTime is not supported by UCL - // ColorLoopStartEnhancedHue is not supported by UCL - // ColorLoopStoredEnhancedHue is not supported by UCL - // ColorCapabilities is not supported by UCL - // ColorTempPhysicalMinMireds is not supported by UCL - // ColorTempPhysicalMaxMireds is not supported by UCL - // CoupleColorTempToLevelMinMireds is not supported by UCL - case Attributes::StartUpColorTemperatureMireds::Id: { - - Attributes::StartUpColorTemperatureMireds::TypeInfo::DecodableType value; - aDecoder.Decode(value); - jsn["value"] = to_json(value); - attribute_name = "StartUpColorTemperatureMireds"; - break; - } - // GeneratedCommandList is not supported by UCL - // AcceptedCommandList is not supported by UCL - // AttributeList is not supported by UCL - // FeatureMap is not supported by UCL - // ClusterRevision is not supported by UCL - } - - 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) + "/ColorControl/Attributes/" + attribute_name + "/Desired"; - payload_str = jsn.dump(); - m_unify_mqtt.Publish(topic, payload_str, true); - return CHIP_NO_ERROR; - } + if (aPath.mClusterId != Clusters::ColorControl::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; + + if( m_node_state_monitor.emulator().is_attribute_emulated(aPath) ) { + return m_node_state_monitor.emulator().write_attribute(aPath,aDecoder); + } + + switch (aPath.mAttributeId) { + // CurrentHue is not supported by UCL + // CurrentSaturation is not supported by UCL + // RemainingTime is not supported by UCL + // CurrentX is not supported by UCL + // CurrentY is not supported by UCL + // DriftCompensation is not supported by UCL + // CompensationText is not supported by UCL + // ColorTemperatureMireds is not supported by UCL + // ColorMode is not supported by UCL + case Attributes::Options::Id: { + + Attributes::Options::TypeInfo::DecodableType value; + aDecoder.Decode(value); + jsn["value"] = to_json(value); + attribute_name = "Options"; + break; + } + // NumberOfPrimaries is not supported by UCL + // Primary1X is not supported by UCL + // Primary1Y is not supported by UCL + // Primary1Intensity is not supported by UCL + // Primary2X is not supported by UCL + // Primary2Y is not supported by UCL + // Primary2Intensity is not supported by UCL + // Primary3X is not supported by UCL + // Primary3Y is not supported by UCL + // Primary3Intensity is not supported by UCL + // Primary4X is not supported by UCL + // Primary4Y is not supported by UCL + // Primary4Intensity is not supported by UCL + // Primary5X is not supported by UCL + // Primary5Y is not supported by UCL + // Primary5Intensity is not supported by UCL + // Primary6X is not supported by UCL + // Primary6Y is not supported by UCL + // Primary6Intensity is not supported by UCL + case Attributes::WhitePointX::Id: { + + Attributes::WhitePointX::TypeInfo::DecodableType value; + aDecoder.Decode(value); + jsn["value"] = to_json(value); + attribute_name = "WhitePointX"; + break; + } + case Attributes::WhitePointY::Id: { + + Attributes::WhitePointY::TypeInfo::DecodableType value; + aDecoder.Decode(value); + jsn["value"] = to_json(value); + attribute_name = "WhitePointY"; + break; + } + case Attributes::ColorPointRX::Id: { + + Attributes::ColorPointRX::TypeInfo::DecodableType value; + aDecoder.Decode(value); + jsn["value"] = to_json(value); + attribute_name = "ColorPointRX"; + break; + } + case Attributes::ColorPointRY::Id: { + + Attributes::ColorPointRY::TypeInfo::DecodableType value; + aDecoder.Decode(value); + jsn["value"] = to_json(value); + attribute_name = "ColorPointRY"; + break; + } + case Attributes::ColorPointRIntensity::Id: { + + Attributes::ColorPointRIntensity::TypeInfo::DecodableType value; + aDecoder.Decode(value); + jsn["value"] = to_json(value); + attribute_name = "ColorPointRIntensity"; + break; + } + case Attributes::ColorPointGX::Id: { + + Attributes::ColorPointGX::TypeInfo::DecodableType value; + aDecoder.Decode(value); + jsn["value"] = to_json(value); + attribute_name = "ColorPointGX"; + break; + } + case Attributes::ColorPointGY::Id: { + + Attributes::ColorPointGY::TypeInfo::DecodableType value; + aDecoder.Decode(value); + jsn["value"] = to_json(value); + attribute_name = "ColorPointGY"; + break; + } + case Attributes::ColorPointGIntensity::Id: { + + Attributes::ColorPointGIntensity::TypeInfo::DecodableType value; + aDecoder.Decode(value); + jsn["value"] = to_json(value); + attribute_name = "ColorPointGIntensity"; + break; + } + case Attributes::ColorPointBX::Id: { + + Attributes::ColorPointBX::TypeInfo::DecodableType value; + aDecoder.Decode(value); + jsn["value"] = to_json(value); + attribute_name = "ColorPointBX"; + break; + } + case Attributes::ColorPointBY::Id: { + + Attributes::ColorPointBY::TypeInfo::DecodableType value; + aDecoder.Decode(value); + jsn["value"] = to_json(value); + attribute_name = "ColorPointBY"; + break; + } + case Attributes::ColorPointBIntensity::Id: { + + Attributes::ColorPointBIntensity::TypeInfo::DecodableType value; + aDecoder.Decode(value); + jsn["value"] = to_json(value); + attribute_name = "ColorPointBIntensity"; + break; + } + // EnhancedCurrentHue is not supported by UCL + // EnhancedColorMode is not supported by UCL + // ColorLoopActive is not supported by UCL + // ColorLoopDirection is not supported by UCL + // ColorLoopTime is not supported by UCL + // ColorLoopStartEnhancedHue is not supported by UCL + // ColorLoopStoredEnhancedHue is not supported by UCL + // ColorCapabilities is not supported by UCL + // ColorTempPhysicalMinMireds is not supported by UCL + // ColorTempPhysicalMaxMireds is not supported by UCL + // CoupleColorTempToLevelMinMireds is not supported by UCL + case Attributes::StartUpColorTemperatureMireds::Id: { + + Attributes::StartUpColorTemperatureMireds::TypeInfo::DecodableType value; + aDecoder.Decode(value); + jsn["value"] = to_json(value); + attribute_name = "StartUpColorTemperatureMireds"; + break; + } + // GeneratedCommandList is not supported by UCL + // AcceptedCommandList is not supported by UCL + // AttributeList is not supported by UCL + // FeatureMap is not supported by UCL + // ClusterRevision is not supported by UCL + } + + 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) + + "/ColorControl/Attributes/" + attribute_name + "/Desired"; + payload_str = jsn.dump(); + m_unify_mqtt.Publish(topic, + payload_str, + true); + return CHIP_NO_ERROR; + } + + return CHIP_ERROR_NO_MESSAGE_HANDLER; } -void ColorControlAttributeAccess::reported_updated(const bridged_endpoint* ep, const std::string& cluster, - const std::string& attribute, const nlohmann::json& unify_value) +void ColorControlAttributeAccess::reported_updated(const bridged_endpoint *ep, + const std::string &cluster, + const std::string &attribute, + const nlohmann::json &unify_value) { - namespace MN = chip::app::Clusters::ColorControl::Attributes; - namespace UN = unify::matter_bridge::ColorControl::Attributes; + namespace MN = chip::app::Clusters::ColorControl::Attributes; + namespace UN = unify::matter_bridge::ColorControl::Attributes; - auto cluster_id = device_translator::instance().get_cluster_id(cluster); + auto cluster_id = device_translator::instance().get_cluster_id(cluster); - if (!cluster_id.has_value() || (cluster_id.value() != Clusters::ColorControl::Id)) { - return; - } + if (!cluster_id.has_value() || (cluster_id.value() != Clusters::ColorControl::Id)) { + return; + } - // get attribute id - auto attribute_id = device_translator::instance().get_attribute_id(cluster, attribute); + // get attribute id + auto attribute_id + = device_translator::instance().get_attribute_id(cluster, attribute); - if (!attribute_id.has_value()) { - return; - } + if (!attribute_id.has_value()) { + return; + } - chip::EndpointId node_matter_endpoint = ep->matter_endpoint; - ConcreteAttributePath attrpath = ConcreteAttributePath(node_matter_endpoint, Clusters::ColorControl::Id, attribute_id.value()); - switch (attribute_id.value()) { + 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 case MN::CurrentHue::Id: { - using T = MN::CurrentHue::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) { - sl_log_debug(LOG_TAG, "CurrentHue attribute value is %s", unify_value.dump().c_str()); - UN::CurrentHue::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::ColorControl::Id, MN::CurrentHue::Id); - } - break; + using T = MN::CurrentHue::TypeInfo::Type; + std::optional value = from_json(unify_value); + + if( value.has_value()) { + sl_log_debug(LOG_TAG,"CurrentHue attribute value is %s",unify_value.dump().c_str()); + UN::CurrentHue::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback( + node_matter_endpoint, + Clusters::ColorControl::Id, + MN::CurrentHue::Id); + } + break; } // type is int8u case MN::CurrentSaturation::Id: { - using T = MN::CurrentSaturation::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) { - sl_log_debug(LOG_TAG, "CurrentSaturation attribute value is %s", unify_value.dump().c_str()); - UN::CurrentSaturation::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::ColorControl::Id, MN::CurrentSaturation::Id); - } - break; + using T = MN::CurrentSaturation::TypeInfo::Type; + std::optional value = from_json(unify_value); + + if( value.has_value()) { + sl_log_debug(LOG_TAG,"CurrentSaturation attribute value is %s",unify_value.dump().c_str()); + UN::CurrentSaturation::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback( + node_matter_endpoint, + Clusters::ColorControl::Id, + MN::CurrentSaturation::Id); + } + break; } // type is int16u case MN::RemainingTime::Id: { - using T = MN::RemainingTime::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) { - sl_log_debug(LOG_TAG, "RemainingTime attribute value is %s", unify_value.dump().c_str()); - UN::RemainingTime::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::ColorControl::Id, MN::RemainingTime::Id); - } - break; + using T = MN::RemainingTime::TypeInfo::Type; + std::optional value = from_json(unify_value); + + if( value.has_value()) { + sl_log_debug(LOG_TAG,"RemainingTime attribute value is %s",unify_value.dump().c_str()); + UN::RemainingTime::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback( + node_matter_endpoint, + Clusters::ColorControl::Id, + MN::RemainingTime::Id); + } + break; } // type is int16u case MN::CurrentX::Id: { - using T = MN::CurrentX::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) { - sl_log_debug(LOG_TAG, "CurrentX attribute value is %s", unify_value.dump().c_str()); - UN::CurrentX::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::ColorControl::Id, MN::CurrentX::Id); - } - break; + using T = MN::CurrentX::TypeInfo::Type; + std::optional value = from_json(unify_value); + + if( value.has_value()) { + sl_log_debug(LOG_TAG,"CurrentX attribute value is %s",unify_value.dump().c_str()); + UN::CurrentX::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback( + node_matter_endpoint, + Clusters::ColorControl::Id, + MN::CurrentX::Id); + } + break; } // type is int16u case MN::CurrentY::Id: { - using T = MN::CurrentY::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) { - sl_log_debug(LOG_TAG, "CurrentY attribute value is %s", unify_value.dump().c_str()); - UN::CurrentY::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::ColorControl::Id, MN::CurrentY::Id); - } - break; + using T = MN::CurrentY::TypeInfo::Type; + std::optional value = from_json(unify_value); + + if( value.has_value()) { + sl_log_debug(LOG_TAG,"CurrentY attribute value is %s",unify_value.dump().c_str()); + UN::CurrentY::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback( + node_matter_endpoint, + Clusters::ColorControl::Id, + MN::CurrentY::Id); + } + break; } // type is enum8 case MN::DriftCompensation::Id: { - using T = MN::DriftCompensation::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) { - sl_log_debug(LOG_TAG, "DriftCompensation attribute value is %s", unify_value.dump().c_str()); - UN::DriftCompensation::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::ColorControl::Id, MN::DriftCompensation::Id); - } - break; + using T = MN::DriftCompensation::TypeInfo::Type; + std::optional value = from_json(unify_value); + + if( value.has_value()) { + sl_log_debug(LOG_TAG,"DriftCompensation attribute value is %s",unify_value.dump().c_str()); + UN::DriftCompensation::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback( + node_matter_endpoint, + Clusters::ColorControl::Id, + MN::DriftCompensation::Id); + } + break; } // type is char_string case MN::CompensationText::Id: { - using T = MN::CompensationText::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) { - sl_log_debug(LOG_TAG, "CompensationText attribute value is %s", unify_value.dump().c_str()); - UN::CompensationText::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::ColorControl::Id, MN::CompensationText::Id); - } - break; + using T = MN::CompensationText::TypeInfo::Type; + std::optional value = from_json(unify_value); + + if( value.has_value()) { + sl_log_debug(LOG_TAG,"CompensationText attribute value is %s",unify_value.dump().c_str()); + UN::CompensationText::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback( + node_matter_endpoint, + Clusters::ColorControl::Id, + MN::CompensationText::Id); + } + break; } // type is int16u case MN::ColorTemperatureMireds::Id: { - using T = MN::ColorTemperatureMireds::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) { - sl_log_debug(LOG_TAG, "ColorTemperatureMireds attribute value is %s", unify_value.dump().c_str()); - UN::ColorTemperatureMireds::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::ColorControl::Id, - MN::ColorTemperatureMireds::Id); - } - break; + using T = MN::ColorTemperatureMireds::TypeInfo::Type; + std::optional value = from_json(unify_value); + + if( value.has_value()) { + sl_log_debug(LOG_TAG,"ColorTemperatureMireds attribute value is %s",unify_value.dump().c_str()); + UN::ColorTemperatureMireds::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback( + node_matter_endpoint, + Clusters::ColorControl::Id, + MN::ColorTemperatureMireds::Id); + } + break; } // type is enum8 case MN::ColorMode::Id: { - using T = MN::ColorMode::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) { - sl_log_debug(LOG_TAG, "ColorMode attribute value is %s", unify_value.dump().c_str()); - UN::ColorMode::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::ColorControl::Id, MN::ColorMode::Id); - } - break; + using T = MN::ColorMode::TypeInfo::Type; + std::optional value = from_json(unify_value); + + if( value.has_value()) { + sl_log_debug(LOG_TAG,"ColorMode attribute value is %s",unify_value.dump().c_str()); + UN::ColorMode::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback( + node_matter_endpoint, + Clusters::ColorControl::Id, + MN::ColorMode::Id); + } + break; } // type is bitmap8 case MN::Options::Id: { - using T = MN::Options::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) { - sl_log_debug(LOG_TAG, "Options attribute value is %s", unify_value.dump().c_str()); - UN::Options::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::ColorControl::Id, MN::Options::Id); - } - break; + using T = MN::Options::TypeInfo::Type; + std::optional value = from_json(unify_value); + + if( value.has_value()) { + sl_log_debug(LOG_TAG,"Options attribute value is %s",unify_value.dump().c_str()); + UN::Options::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback( + node_matter_endpoint, + Clusters::ColorControl::Id, + MN::Options::Id); + } + break; } // type is int8u case MN::NumberOfPrimaries::Id: { - using T = MN::NumberOfPrimaries::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) { - sl_log_debug(LOG_TAG, "NumberOfPrimaries attribute value is %s", unify_value.dump().c_str()); - UN::NumberOfPrimaries::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::ColorControl::Id, MN::NumberOfPrimaries::Id); - } - break; + using T = MN::NumberOfPrimaries::TypeInfo::Type; + std::optional value = from_json(unify_value); + + if( value.has_value()) { + sl_log_debug(LOG_TAG,"NumberOfPrimaries attribute value is %s",unify_value.dump().c_str()); + UN::NumberOfPrimaries::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback( + node_matter_endpoint, + Clusters::ColorControl::Id, + MN::NumberOfPrimaries::Id); + } + break; } // type is int16u case MN::Primary1X::Id: { - using T = MN::Primary1X::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) { - sl_log_debug(LOG_TAG, "Primary1X attribute value is %s", unify_value.dump().c_str()); - UN::Primary1X::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::ColorControl::Id, MN::Primary1X::Id); - } - break; + using T = MN::Primary1X::TypeInfo::Type; + std::optional value = from_json(unify_value); + + if( value.has_value()) { + sl_log_debug(LOG_TAG,"Primary1X attribute value is %s",unify_value.dump().c_str()); + UN::Primary1X::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback( + node_matter_endpoint, + Clusters::ColorControl::Id, + MN::Primary1X::Id); + } + break; } // type is int16u case MN::Primary1Y::Id: { - using T = MN::Primary1Y::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) { - sl_log_debug(LOG_TAG, "Primary1Y attribute value is %s", unify_value.dump().c_str()); - UN::Primary1Y::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::ColorControl::Id, MN::Primary1Y::Id); - } - break; + using T = MN::Primary1Y::TypeInfo::Type; + std::optional value = from_json(unify_value); + + if( value.has_value()) { + sl_log_debug(LOG_TAG,"Primary1Y attribute value is %s",unify_value.dump().c_str()); + UN::Primary1Y::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback( + node_matter_endpoint, + Clusters::ColorControl::Id, + MN::Primary1Y::Id); + } + break; } // type is int8u case MN::Primary1Intensity::Id: { - using T = MN::Primary1Intensity::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) { - sl_log_debug(LOG_TAG, "Primary1Intensity attribute value is %s", unify_value.dump().c_str()); - UN::Primary1Intensity::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::ColorControl::Id, MN::Primary1Intensity::Id); - } - break; + using T = MN::Primary1Intensity::TypeInfo::Type; + std::optional value = from_json(unify_value); + + if( value.has_value()) { + sl_log_debug(LOG_TAG,"Primary1Intensity attribute value is %s",unify_value.dump().c_str()); + UN::Primary1Intensity::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback( + node_matter_endpoint, + Clusters::ColorControl::Id, + MN::Primary1Intensity::Id); + } + break; } // type is int16u case MN::Primary2X::Id: { - using T = MN::Primary2X::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) { - sl_log_debug(LOG_TAG, "Primary2X attribute value is %s", unify_value.dump().c_str()); - UN::Primary2X::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::ColorControl::Id, MN::Primary2X::Id); - } - break; + using T = MN::Primary2X::TypeInfo::Type; + std::optional value = from_json(unify_value); + + if( value.has_value()) { + sl_log_debug(LOG_TAG,"Primary2X attribute value is %s",unify_value.dump().c_str()); + UN::Primary2X::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback( + node_matter_endpoint, + Clusters::ColorControl::Id, + MN::Primary2X::Id); + } + break; } // type is int16u case MN::Primary2Y::Id: { - using T = MN::Primary2Y::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) { - sl_log_debug(LOG_TAG, "Primary2Y attribute value is %s", unify_value.dump().c_str()); - UN::Primary2Y::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::ColorControl::Id, MN::Primary2Y::Id); - } - break; + using T = MN::Primary2Y::TypeInfo::Type; + std::optional value = from_json(unify_value); + + if( value.has_value()) { + sl_log_debug(LOG_TAG,"Primary2Y attribute value is %s",unify_value.dump().c_str()); + UN::Primary2Y::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback( + node_matter_endpoint, + Clusters::ColorControl::Id, + MN::Primary2Y::Id); + } + break; } // type is int8u case MN::Primary2Intensity::Id: { - using T = MN::Primary2Intensity::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) { - sl_log_debug(LOG_TAG, "Primary2Intensity attribute value is %s", unify_value.dump().c_str()); - UN::Primary2Intensity::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::ColorControl::Id, MN::Primary2Intensity::Id); - } - break; + using T = MN::Primary2Intensity::TypeInfo::Type; + std::optional value = from_json(unify_value); + + if( value.has_value()) { + sl_log_debug(LOG_TAG,"Primary2Intensity attribute value is %s",unify_value.dump().c_str()); + UN::Primary2Intensity::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback( + node_matter_endpoint, + Clusters::ColorControl::Id, + MN::Primary2Intensity::Id); + } + break; } // type is int16u case MN::Primary3X::Id: { - using T = MN::Primary3X::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) { - sl_log_debug(LOG_TAG, "Primary3X attribute value is %s", unify_value.dump().c_str()); - UN::Primary3X::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::ColorControl::Id, MN::Primary3X::Id); - } - break; + using T = MN::Primary3X::TypeInfo::Type; + std::optional value = from_json(unify_value); + + if( value.has_value()) { + sl_log_debug(LOG_TAG,"Primary3X attribute value is %s",unify_value.dump().c_str()); + UN::Primary3X::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback( + node_matter_endpoint, + Clusters::ColorControl::Id, + MN::Primary3X::Id); + } + break; } // type is int16u case MN::Primary3Y::Id: { - using T = MN::Primary3Y::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) { - sl_log_debug(LOG_TAG, "Primary3Y attribute value is %s", unify_value.dump().c_str()); - UN::Primary3Y::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::ColorControl::Id, MN::Primary3Y::Id); - } - break; + using T = MN::Primary3Y::TypeInfo::Type; + std::optional value = from_json(unify_value); + + if( value.has_value()) { + sl_log_debug(LOG_TAG,"Primary3Y attribute value is %s",unify_value.dump().c_str()); + UN::Primary3Y::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback( + node_matter_endpoint, + Clusters::ColorControl::Id, + MN::Primary3Y::Id); + } + break; } // type is int8u case MN::Primary3Intensity::Id: { - using T = MN::Primary3Intensity::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) { - sl_log_debug(LOG_TAG, "Primary3Intensity attribute value is %s", unify_value.dump().c_str()); - UN::Primary3Intensity::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::ColorControl::Id, MN::Primary3Intensity::Id); - } - break; + using T = MN::Primary3Intensity::TypeInfo::Type; + std::optional value = from_json(unify_value); + + if( value.has_value()) { + sl_log_debug(LOG_TAG,"Primary3Intensity attribute value is %s",unify_value.dump().c_str()); + UN::Primary3Intensity::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback( + node_matter_endpoint, + Clusters::ColorControl::Id, + MN::Primary3Intensity::Id); + } + break; } // type is int16u case MN::Primary4X::Id: { - using T = MN::Primary4X::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) { - sl_log_debug(LOG_TAG, "Primary4X attribute value is %s", unify_value.dump().c_str()); - UN::Primary4X::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::ColorControl::Id, MN::Primary4X::Id); - } - break; + using T = MN::Primary4X::TypeInfo::Type; + std::optional value = from_json(unify_value); + + if( value.has_value()) { + sl_log_debug(LOG_TAG,"Primary4X attribute value is %s",unify_value.dump().c_str()); + UN::Primary4X::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback( + node_matter_endpoint, + Clusters::ColorControl::Id, + MN::Primary4X::Id); + } + break; } // type is int16u case MN::Primary4Y::Id: { - using T = MN::Primary4Y::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) { - sl_log_debug(LOG_TAG, "Primary4Y attribute value is %s", unify_value.dump().c_str()); - UN::Primary4Y::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::ColorControl::Id, MN::Primary4Y::Id); - } - break; + using T = MN::Primary4Y::TypeInfo::Type; + std::optional value = from_json(unify_value); + + if( value.has_value()) { + sl_log_debug(LOG_TAG,"Primary4Y attribute value is %s",unify_value.dump().c_str()); + UN::Primary4Y::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback( + node_matter_endpoint, + Clusters::ColorControl::Id, + MN::Primary4Y::Id); + } + break; } // type is int8u case MN::Primary4Intensity::Id: { - using T = MN::Primary4Intensity::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) { - sl_log_debug(LOG_TAG, "Primary4Intensity attribute value is %s", unify_value.dump().c_str()); - UN::Primary4Intensity::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::ColorControl::Id, MN::Primary4Intensity::Id); - } - break; + using T = MN::Primary4Intensity::TypeInfo::Type; + std::optional value = from_json(unify_value); + + if( value.has_value()) { + sl_log_debug(LOG_TAG,"Primary4Intensity attribute value is %s",unify_value.dump().c_str()); + UN::Primary4Intensity::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback( + node_matter_endpoint, + Clusters::ColorControl::Id, + MN::Primary4Intensity::Id); + } + break; } // type is int16u case MN::Primary5X::Id: { - using T = MN::Primary5X::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) { - sl_log_debug(LOG_TAG, "Primary5X attribute value is %s", unify_value.dump().c_str()); - UN::Primary5X::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::ColorControl::Id, MN::Primary5X::Id); - } - break; + using T = MN::Primary5X::TypeInfo::Type; + std::optional value = from_json(unify_value); + + if( value.has_value()) { + sl_log_debug(LOG_TAG,"Primary5X attribute value is %s",unify_value.dump().c_str()); + UN::Primary5X::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback( + node_matter_endpoint, + Clusters::ColorControl::Id, + MN::Primary5X::Id); + } + break; } // type is int16u case MN::Primary5Y::Id: { - using T = MN::Primary5Y::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) { - sl_log_debug(LOG_TAG, "Primary5Y attribute value is %s", unify_value.dump().c_str()); - UN::Primary5Y::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::ColorControl::Id, MN::Primary5Y::Id); - } - break; + using T = MN::Primary5Y::TypeInfo::Type; + std::optional value = from_json(unify_value); + + if( value.has_value()) { + sl_log_debug(LOG_TAG,"Primary5Y attribute value is %s",unify_value.dump().c_str()); + UN::Primary5Y::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback( + node_matter_endpoint, + Clusters::ColorControl::Id, + MN::Primary5Y::Id); + } + break; } // type is int8u case MN::Primary5Intensity::Id: { - using T = MN::Primary5Intensity::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) { - sl_log_debug(LOG_TAG, "Primary5Intensity attribute value is %s", unify_value.dump().c_str()); - UN::Primary5Intensity::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::ColorControl::Id, MN::Primary5Intensity::Id); - } - break; + using T = MN::Primary5Intensity::TypeInfo::Type; + std::optional value = from_json(unify_value); + + if( value.has_value()) { + sl_log_debug(LOG_TAG,"Primary5Intensity attribute value is %s",unify_value.dump().c_str()); + UN::Primary5Intensity::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback( + node_matter_endpoint, + Clusters::ColorControl::Id, + MN::Primary5Intensity::Id); + } + break; } // type is int16u case MN::Primary6X::Id: { - using T = MN::Primary6X::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) { - sl_log_debug(LOG_TAG, "Primary6X attribute value is %s", unify_value.dump().c_str()); - UN::Primary6X::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::ColorControl::Id, MN::Primary6X::Id); - } - break; + using T = MN::Primary6X::TypeInfo::Type; + std::optional value = from_json(unify_value); + + if( value.has_value()) { + sl_log_debug(LOG_TAG,"Primary6X attribute value is %s",unify_value.dump().c_str()); + UN::Primary6X::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback( + node_matter_endpoint, + Clusters::ColorControl::Id, + MN::Primary6X::Id); + } + break; } // type is int16u case MN::Primary6Y::Id: { - using T = MN::Primary6Y::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) { - sl_log_debug(LOG_TAG, "Primary6Y attribute value is %s", unify_value.dump().c_str()); - UN::Primary6Y::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::ColorControl::Id, MN::Primary6Y::Id); - } - break; + using T = MN::Primary6Y::TypeInfo::Type; + std::optional value = from_json(unify_value); + + if( value.has_value()) { + sl_log_debug(LOG_TAG,"Primary6Y attribute value is %s",unify_value.dump().c_str()); + UN::Primary6Y::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback( + node_matter_endpoint, + Clusters::ColorControl::Id, + MN::Primary6Y::Id); + } + break; } // type is int8u case MN::Primary6Intensity::Id: { - using T = MN::Primary6Intensity::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) { - sl_log_debug(LOG_TAG, "Primary6Intensity attribute value is %s", unify_value.dump().c_str()); - UN::Primary6Intensity::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::ColorControl::Id, MN::Primary6Intensity::Id); - } - break; + using T = MN::Primary6Intensity::TypeInfo::Type; + std::optional value = from_json(unify_value); + + if( value.has_value()) { + sl_log_debug(LOG_TAG,"Primary6Intensity attribute value is %s",unify_value.dump().c_str()); + UN::Primary6Intensity::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback( + node_matter_endpoint, + Clusters::ColorControl::Id, + MN::Primary6Intensity::Id); + } + break; } // type is int16u case MN::WhitePointX::Id: { - using T = MN::WhitePointX::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) { - sl_log_debug(LOG_TAG, "WhitePointX attribute value is %s", unify_value.dump().c_str()); - UN::WhitePointX::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::ColorControl::Id, MN::WhitePointX::Id); - } - break; + using T = MN::WhitePointX::TypeInfo::Type; + std::optional value = from_json(unify_value); + + if( value.has_value()) { + sl_log_debug(LOG_TAG,"WhitePointX attribute value is %s",unify_value.dump().c_str()); + UN::WhitePointX::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback( + node_matter_endpoint, + Clusters::ColorControl::Id, + MN::WhitePointX::Id); + } + break; } // type is int16u case MN::WhitePointY::Id: { - using T = MN::WhitePointY::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) { - sl_log_debug(LOG_TAG, "WhitePointY attribute value is %s", unify_value.dump().c_str()); - UN::WhitePointY::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::ColorControl::Id, MN::WhitePointY::Id); - } - break; + using T = MN::WhitePointY::TypeInfo::Type; + std::optional value = from_json(unify_value); + + if( value.has_value()) { + sl_log_debug(LOG_TAG,"WhitePointY attribute value is %s",unify_value.dump().c_str()); + UN::WhitePointY::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback( + node_matter_endpoint, + Clusters::ColorControl::Id, + MN::WhitePointY::Id); + } + break; } // type is int16u case MN::ColorPointRX::Id: { - using T = MN::ColorPointRX::TypeInfo::Type; - std::optional value = from_json(unify_value); - - 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); - } - break; + using T = MN::ColorPointRX::TypeInfo::Type; + std::optional value = from_json(unify_value); + + 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); + } + 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); - } - break; + 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); + } + 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); - } - break; + 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); + } + 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); - } - break; + 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); + } + 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); - } - break; + 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); + } + 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); - } - break; + 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); + } + 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); - } - break; + 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); + } + 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); - } - break; + 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); + } + 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); - } - break; + 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); + } + 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); - } - break; + 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); + } + 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); - } - break; + 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); + } + 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); - } - break; + 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); + } + 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); - } - break; + 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); + } + 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); - } - break; + 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); + } + 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); - } - break; + 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); + } + 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); - } - break; + 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); + } + 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); - } - break; + 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); + } + break; } // 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, "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); - } - break; + using T = MN::ColorTempPhysicalMinMireds::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); + } + break; } // 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, "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); - } - break; + using T = MN::ColorTempPhysicalMaxMireds::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); + } + break; } // 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, "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); - } - break; + using T = MN::CoupleColorTempToLevelMinMireds::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); + } + break; } // 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, "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); - } - break; - } - } + using T = MN::StartUpColorTemperatureMireds::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); + } + break; + } + } } CHIP_ERROR -IlluminanceMeasurementAttributeAccess::Read(const ConcreteReadAttributePath& aPath, AttributeValueEncoder& aEncoder) +IlluminanceMeasurementAttributeAccess::Read(const ConcreteReadAttributePath &aPath, + AttributeValueEncoder &aEncoder) { - namespace MN = chip::app::Clusters::IlluminanceMeasurement::Attributes; - namespace UN = unify::matter_bridge::IlluminanceMeasurement::Attributes; - if (aPath.mClusterId != Clusters::IlluminanceMeasurement::Id) { - return CHIP_ERROR_INVALID_ARGUMENT; - } + namespace MN = chip::app::Clusters::IlluminanceMeasurement::Attributes; + namespace UN = unify::matter_bridge::IlluminanceMeasurement::Attributes; + if (aPath.mClusterId != Clusters::IlluminanceMeasurement::Id) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + // Do not handle Read for non-unify endpoints + auto unify_node = m_node_state_monitor.bridged_endpoint(aPath.mEndpointId); + + if (!unify_node) { + return CHIP_NO_ERROR; + } - ConcreteAttributePath atr_path = ConcreteAttributePath(aPath.mEndpointId, aPath.mClusterId, aPath.mAttributeId); - if (m_node_state_monitor.emulator().is_attribute_emulated(aPath)) { - return m_node_state_monitor.emulator().read_attribute(aPath, aEncoder); - } + ConcreteAttributePath atr_path = 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(atr_path, value); - return aEncoder.Encode(value); - } - case MN::MinMeasuredValue::Id: { // type is int16u - MN::MinMeasuredValue::TypeInfo::Type value; - UN::MinMeasuredValue::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::MaxMeasuredValue::Id: { // type is int16u - MN::MaxMeasuredValue::TypeInfo::Type value; - UN::MaxMeasuredValue::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::Tolerance::Id: { // type is int16u - MN::Tolerance::TypeInfo::Type value; - UN::Tolerance::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::LightSensorType::Id: { // type is enum8 - MN::LightSensorType::TypeInfo::Type value; - UN::LightSensorType::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::FeatureMap::Id: { // type is bitmap32 - MN::FeatureMap::TypeInfo::Type value; - UN::FeatureMap::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::ClusterRevision::Id: { // type is int16u - MN::ClusterRevision::TypeInfo::Type value; - UN::ClusterRevision::Get(atr_path, value); - return aEncoder.Encode(value); - } - } - } catch (const std::out_of_range& e) { - sl_log_info(LOG_TAG, - "The request attribute Path for endpoint [%i] is not found in the attribute state " - "container: %s\n", - atr_path.mEndpointId, e.what()); - return CHIP_ERROR_NO_MESSAGE_HANDLER; - } - return CHIP_NO_ERROR; + + if( m_node_state_monitor.emulator().is_attribute_emulated(aPath) ) { + return m_node_state_monitor.emulator().read_attribute(aPath,aEncoder); + } + + try { + switch (aPath.mAttributeId) { + case MN::MeasuredValue::Id: { // type is int16u + MN::MeasuredValue::TypeInfo::Type value; + UN::MeasuredValue::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::MinMeasuredValue::Id: { // type is int16u + MN::MinMeasuredValue::TypeInfo::Type value; + UN::MinMeasuredValue::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::MaxMeasuredValue::Id: { // type is int16u + MN::MaxMeasuredValue::TypeInfo::Type value; + UN::MaxMeasuredValue::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::Tolerance::Id: { // type is int16u + MN::Tolerance::TypeInfo::Type value; + UN::Tolerance::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::LightSensorType::Id: { // type is enum8 + MN::LightSensorType::TypeInfo::Type value; + UN::LightSensorType::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::FeatureMap::Id: { // type is bitmap32 + MN::FeatureMap::TypeInfo::Type value; + UN::FeatureMap::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::ClusterRevision::Id: { // type is int16u + MN::ClusterRevision::TypeInfo::Type value; + UN::ClusterRevision::Get(atr_path, value); + return aEncoder.Encode(value); + } + } + } catch (const std::out_of_range &e) { + sl_log_info( + LOG_TAG, + "The request attribute Path for endpoint [%i] is not found in the attribute state " + "container: %s\n", atr_path.mEndpointId, e.what()); + return CHIP_ERROR_NO_MESSAGE_HANDLER; + } + return CHIP_NO_ERROR; } -CHIP_ERROR IlluminanceMeasurementAttributeAccess::Write(const ConcreteDataAttributePath& aPath, AttributeValueDecoder& aDecoder) +CHIP_ERROR IlluminanceMeasurementAttributeAccess::Write(const ConcreteDataAttributePath &aPath, + AttributeValueDecoder &aDecoder) { - using namespace chip::app::Clusters::IlluminanceMeasurement; - - if (aPath.mClusterId != Clusters::IlluminanceMeasurement::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; - - if (m_node_state_monitor.emulator().is_attribute_emulated(aPath)) { - return m_node_state_monitor.emulator().write_attribute(aPath, aDecoder); - } + using namespace chip::app::Clusters::IlluminanceMeasurement; - switch (aPath.mAttributeId) { - // MeasuredValue is not supported by UCL - // MinMeasuredValue is not supported by UCL - // MaxMeasuredValue is not supported by UCL - // Tolerance is not supported by UCL - // LightSensorType is not supported by UCL - // GeneratedCommandList is not supported by UCL - // AcceptedCommandList is not supported by UCL - // AttributeList is not supported by UCL - // FeatureMap is not supported by UCL - // ClusterRevision is not supported by UCL - } - - 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) + "/IlluminanceMeasurement/Attributes/" + attribute_name + "/Desired"; - payload_str = jsn.dump(); - m_unify_mqtt.Publish(topic, payload_str, true); - return CHIP_NO_ERROR; - } + if (aPath.mClusterId != Clusters::IlluminanceMeasurement::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; + + if( m_node_state_monitor.emulator().is_attribute_emulated(aPath) ) { + return m_node_state_monitor.emulator().write_attribute(aPath,aDecoder); + } + + switch (aPath.mAttributeId) { + // MeasuredValue is not supported by UCL + // MinMeasuredValue is not supported by UCL + // MaxMeasuredValue is not supported by UCL + // Tolerance is not supported by UCL + // LightSensorType is not supported by UCL + // GeneratedCommandList is not supported by UCL + // AcceptedCommandList is not supported by UCL + // AttributeList is not supported by UCL + // FeatureMap is not supported by UCL + // ClusterRevision is not supported by UCL + } + + 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) + + "/IlluminanceMeasurement/Attributes/" + attribute_name + "/Desired"; + payload_str = jsn.dump(); + m_unify_mqtt.Publish(topic, + payload_str, + true); + return CHIP_NO_ERROR; + } + + return CHIP_ERROR_NO_MESSAGE_HANDLER; } -void IlluminanceMeasurementAttributeAccess::reported_updated(const bridged_endpoint* ep, const std::string& cluster, - const std::string& attribute, const nlohmann::json& unify_value) +void IlluminanceMeasurementAttributeAccess::reported_updated(const bridged_endpoint *ep, + const std::string &cluster, + const std::string &attribute, + const nlohmann::json &unify_value) { - namespace MN = chip::app::Clusters::IlluminanceMeasurement::Attributes; - namespace UN = unify::matter_bridge::IlluminanceMeasurement::Attributes; + namespace MN = chip::app::Clusters::IlluminanceMeasurement::Attributes; + namespace UN = unify::matter_bridge::IlluminanceMeasurement::Attributes; - auto cluster_id = device_translator::instance().get_cluster_id(cluster); + auto cluster_id = device_translator::instance().get_cluster_id(cluster); - if (!cluster_id.has_value() || (cluster_id.value() != Clusters::IlluminanceMeasurement::Id)) { - return; - } + if (!cluster_id.has_value() || (cluster_id.value() != Clusters::IlluminanceMeasurement::Id)) { + return; + } - // get attribute id - auto attribute_id = device_translator::instance().get_attribute_id(cluster, attribute); + // get attribute id + auto attribute_id + = device_translator::instance().get_attribute_id(cluster, attribute); - if (!attribute_id.has_value()) { - return; - } + if (!attribute_id.has_value()) { + return; + } - chip::EndpointId node_matter_endpoint = ep->matter_endpoint; - ConcreteAttributePath attrpath = ConcreteAttributePath(node_matter_endpoint, Clusters::IlluminanceMeasurement::Id, attribute_id.value()); - switch (attribute_id.value()) { + 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 case MN::MeasuredValue::Id: { - using T = MN::MeasuredValue::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) { - sl_log_debug(LOG_TAG, "MeasuredValue attribute value is %s", unify_value.dump().c_str()); - UN::MeasuredValue::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::IlluminanceMeasurement::Id, - MN::MeasuredValue::Id); - } - break; + using T = MN::MeasuredValue::TypeInfo::Type; + std::optional value = from_json(unify_value); + + if( value.has_value()) { + sl_log_debug(LOG_TAG,"MeasuredValue attribute value is %s",unify_value.dump().c_str()); + UN::MeasuredValue::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback( + node_matter_endpoint, + Clusters::IlluminanceMeasurement::Id, + MN::MeasuredValue::Id); + } + break; } // type is int16u case MN::MinMeasuredValue::Id: { - using T = MN::MinMeasuredValue::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) { - sl_log_debug(LOG_TAG, "MinMeasuredValue attribute value is %s", unify_value.dump().c_str()); - UN::MinMeasuredValue::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::IlluminanceMeasurement::Id, - MN::MinMeasuredValue::Id); - } - break; + using T = MN::MinMeasuredValue::TypeInfo::Type; + std::optional value = from_json(unify_value); + + if( value.has_value()) { + sl_log_debug(LOG_TAG,"MinMeasuredValue attribute value is %s",unify_value.dump().c_str()); + UN::MinMeasuredValue::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback( + node_matter_endpoint, + Clusters::IlluminanceMeasurement::Id, + MN::MinMeasuredValue::Id); + } + break; } // type is int16u case MN::MaxMeasuredValue::Id: { - using T = MN::MaxMeasuredValue::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) { - sl_log_debug(LOG_TAG, "MaxMeasuredValue attribute value is %s", unify_value.dump().c_str()); - UN::MaxMeasuredValue::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::IlluminanceMeasurement::Id, - MN::MaxMeasuredValue::Id); - } - break; + using T = MN::MaxMeasuredValue::TypeInfo::Type; + std::optional value = from_json(unify_value); + + if( value.has_value()) { + sl_log_debug(LOG_TAG,"MaxMeasuredValue attribute value is %s",unify_value.dump().c_str()); + UN::MaxMeasuredValue::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback( + node_matter_endpoint, + Clusters::IlluminanceMeasurement::Id, + MN::MaxMeasuredValue::Id); + } + break; } // type is int16u case MN::Tolerance::Id: { - using T = MN::Tolerance::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) { - sl_log_debug(LOG_TAG, "Tolerance attribute value is %s", unify_value.dump().c_str()); - UN::Tolerance::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::IlluminanceMeasurement::Id, MN::Tolerance::Id); - } - break; + using T = MN::Tolerance::TypeInfo::Type; + std::optional value = from_json(unify_value); + + if( value.has_value()) { + sl_log_debug(LOG_TAG,"Tolerance attribute value is %s",unify_value.dump().c_str()); + UN::Tolerance::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback( + node_matter_endpoint, + Clusters::IlluminanceMeasurement::Id, + MN::Tolerance::Id); + } + break; } // type is enum8 case MN::LightSensorType::Id: { - using T = MN::LightSensorType::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) { - sl_log_debug(LOG_TAG, "LightSensorType attribute value is %s", unify_value.dump().c_str()); - UN::LightSensorType::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::IlluminanceMeasurement::Id, - MN::LightSensorType::Id); - } - break; - } - } + using T = MN::LightSensorType::TypeInfo::Type; + std::optional value = from_json(unify_value); + + if( value.has_value()) { + sl_log_debug(LOG_TAG,"LightSensorType attribute value is %s",unify_value.dump().c_str()); + UN::LightSensorType::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback( + node_matter_endpoint, + Clusters::IlluminanceMeasurement::Id, + MN::LightSensorType::Id); + } + break; + } + } } CHIP_ERROR -TemperatureMeasurementAttributeAccess::Read(const ConcreteReadAttributePath& aPath, AttributeValueEncoder& aEncoder) +TemperatureMeasurementAttributeAccess::Read(const ConcreteReadAttributePath &aPath, + AttributeValueEncoder &aEncoder) { - namespace MN = chip::app::Clusters::TemperatureMeasurement::Attributes; - namespace UN = unify::matter_bridge::TemperatureMeasurement::Attributes; - if (aPath.mClusterId != Clusters::TemperatureMeasurement::Id) { - return CHIP_ERROR_INVALID_ARGUMENT; - } + namespace MN = chip::app::Clusters::TemperatureMeasurement::Attributes; + namespace UN = unify::matter_bridge::TemperatureMeasurement::Attributes; + if (aPath.mClusterId != Clusters::TemperatureMeasurement::Id) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + // Do not handle Read for non-unify endpoints + auto unify_node = m_node_state_monitor.bridged_endpoint(aPath.mEndpointId); + + if (!unify_node) { + return CHIP_NO_ERROR; + } - ConcreteAttributePath atr_path = ConcreteAttributePath(aPath.mEndpointId, aPath.mClusterId, aPath.mAttributeId); - if (m_node_state_monitor.emulator().is_attribute_emulated(aPath)) { - return m_node_state_monitor.emulator().read_attribute(aPath, aEncoder); - } + ConcreteAttributePath atr_path = 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(atr_path, value); - return aEncoder.Encode(value); - } - case MN::MinMeasuredValue::Id: { // type is int16s - MN::MinMeasuredValue::TypeInfo::Type value; - UN::MinMeasuredValue::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::MaxMeasuredValue::Id: { // type is int16s - MN::MaxMeasuredValue::TypeInfo::Type value; - UN::MaxMeasuredValue::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::Tolerance::Id: { // type is int16u - MN::Tolerance::TypeInfo::Type value; - UN::Tolerance::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::FeatureMap::Id: { // type is bitmap32 - MN::FeatureMap::TypeInfo::Type value; - UN::FeatureMap::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::ClusterRevision::Id: { // type is int16u - MN::ClusterRevision::TypeInfo::Type value; - UN::ClusterRevision::Get(atr_path, value); - return aEncoder.Encode(value); - } - } - } catch (const std::out_of_range& e) { - sl_log_info(LOG_TAG, - "The request attribute Path for endpoint [%i] is not found in the attribute state " - "container: %s\n", - atr_path.mEndpointId, e.what()); - return CHIP_ERROR_NO_MESSAGE_HANDLER; - } - return CHIP_NO_ERROR; + + if( m_node_state_monitor.emulator().is_attribute_emulated(aPath) ) { + return m_node_state_monitor.emulator().read_attribute(aPath,aEncoder); + } + + try { + switch (aPath.mAttributeId) { + case MN::MeasuredValue::Id: { // type is int16s + MN::MeasuredValue::TypeInfo::Type value; + UN::MeasuredValue::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::MinMeasuredValue::Id: { // type is int16s + MN::MinMeasuredValue::TypeInfo::Type value; + UN::MinMeasuredValue::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::MaxMeasuredValue::Id: { // type is int16s + MN::MaxMeasuredValue::TypeInfo::Type value; + UN::MaxMeasuredValue::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::Tolerance::Id: { // type is int16u + MN::Tolerance::TypeInfo::Type value; + UN::Tolerance::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::FeatureMap::Id: { // type is bitmap32 + MN::FeatureMap::TypeInfo::Type value; + UN::FeatureMap::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::ClusterRevision::Id: { // type is int16u + MN::ClusterRevision::TypeInfo::Type value; + UN::ClusterRevision::Get(atr_path, value); + return aEncoder.Encode(value); + } + } + } catch (const std::out_of_range &e) { + sl_log_info( + LOG_TAG, + "The request attribute Path for endpoint [%i] is not found in the attribute state " + "container: %s\n", atr_path.mEndpointId, e.what()); + return CHIP_ERROR_NO_MESSAGE_HANDLER; + } + return CHIP_NO_ERROR; } -CHIP_ERROR TemperatureMeasurementAttributeAccess::Write(const ConcreteDataAttributePath& aPath, AttributeValueDecoder& aDecoder) +CHIP_ERROR TemperatureMeasurementAttributeAccess::Write(const ConcreteDataAttributePath &aPath, + AttributeValueDecoder &aDecoder) { - using namespace chip::app::Clusters::TemperatureMeasurement; - - if (aPath.mClusterId != Clusters::TemperatureMeasurement::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; + using namespace chip::app::Clusters::TemperatureMeasurement; - if (m_node_state_monitor.emulator().is_attribute_emulated(aPath)) { - return m_node_state_monitor.emulator().write_attribute(aPath, aDecoder); - } - - switch (aPath.mAttributeId) { - // MeasuredValue is not supported by UCL - // MinMeasuredValue is not supported by UCL - // MaxMeasuredValue is not supported by UCL - // Tolerance is not supported by UCL - // GeneratedCommandList is not supported by UCL - // AcceptedCommandList is not supported by UCL - // AttributeList is not supported by UCL - // FeatureMap is not supported by UCL - // ClusterRevision is not supported by UCL - } - - 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) + "/TemperatureMeasurement/Attributes/" + attribute_name + "/Desired"; - payload_str = jsn.dump(); - m_unify_mqtt.Publish(topic, payload_str, true); - return CHIP_NO_ERROR; - } + if (aPath.mClusterId != Clusters::TemperatureMeasurement::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; + + if( m_node_state_monitor.emulator().is_attribute_emulated(aPath) ) { + return m_node_state_monitor.emulator().write_attribute(aPath,aDecoder); + } + + switch (aPath.mAttributeId) { + // MeasuredValue is not supported by UCL + // MinMeasuredValue is not supported by UCL + // MaxMeasuredValue is not supported by UCL + // Tolerance is not supported by UCL + // GeneratedCommandList is not supported by UCL + // AcceptedCommandList is not supported by UCL + // AttributeList is not supported by UCL + // FeatureMap is not supported by UCL + // ClusterRevision is not supported by UCL + } + + 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) + + "/TemperatureMeasurement/Attributes/" + attribute_name + "/Desired"; + payload_str = jsn.dump(); + m_unify_mqtt.Publish(topic, + payload_str, + true); + return CHIP_NO_ERROR; + } + + return CHIP_ERROR_NO_MESSAGE_HANDLER; } -void TemperatureMeasurementAttributeAccess::reported_updated(const bridged_endpoint* ep, const std::string& cluster, - const std::string& attribute, const nlohmann::json& unify_value) +void TemperatureMeasurementAttributeAccess::reported_updated(const bridged_endpoint *ep, + const std::string &cluster, + const std::string &attribute, + const nlohmann::json &unify_value) { - namespace MN = chip::app::Clusters::TemperatureMeasurement::Attributes; - namespace UN = unify::matter_bridge::TemperatureMeasurement::Attributes; + namespace MN = chip::app::Clusters::TemperatureMeasurement::Attributes; + namespace UN = unify::matter_bridge::TemperatureMeasurement::Attributes; - auto cluster_id = device_translator::instance().get_cluster_id(cluster); + auto cluster_id = device_translator::instance().get_cluster_id(cluster); - if (!cluster_id.has_value() || (cluster_id.value() != Clusters::TemperatureMeasurement::Id)) { - return; - } + if (!cluster_id.has_value() || (cluster_id.value() != Clusters::TemperatureMeasurement::Id)) { + return; + } - // get attribute id - auto attribute_id = device_translator::instance().get_attribute_id(cluster, attribute); + // get attribute id + auto attribute_id + = device_translator::instance().get_attribute_id(cluster, attribute); - if (!attribute_id.has_value()) { - return; - } + if (!attribute_id.has_value()) { + return; + } - chip::EndpointId node_matter_endpoint = ep->matter_endpoint; - ConcreteAttributePath attrpath = ConcreteAttributePath(node_matter_endpoint, Clusters::TemperatureMeasurement::Id, attribute_id.value()); - switch (attribute_id.value()) { + 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 case MN::MeasuredValue::Id: { - using T = MN::MeasuredValue::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) { - sl_log_debug(LOG_TAG, "MeasuredValue attribute value is %s", unify_value.dump().c_str()); - UN::MeasuredValue::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::TemperatureMeasurement::Id, - MN::MeasuredValue::Id); - } - break; + using T = MN::MeasuredValue::TypeInfo::Type; + std::optional value = from_json(unify_value); + + if( value.has_value()) { + sl_log_debug(LOG_TAG,"MeasuredValue attribute value is %s",unify_value.dump().c_str()); + UN::MeasuredValue::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback( + node_matter_endpoint, + Clusters::TemperatureMeasurement::Id, + MN::MeasuredValue::Id); + } + break; } // type is int16s case MN::MinMeasuredValue::Id: { - using T = MN::MinMeasuredValue::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) { - sl_log_debug(LOG_TAG, "MinMeasuredValue attribute value is %s", unify_value.dump().c_str()); - UN::MinMeasuredValue::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::TemperatureMeasurement::Id, - MN::MinMeasuredValue::Id); - } - break; + using T = MN::MinMeasuredValue::TypeInfo::Type; + std::optional value = from_json(unify_value); + + if( value.has_value()) { + sl_log_debug(LOG_TAG,"MinMeasuredValue attribute value is %s",unify_value.dump().c_str()); + UN::MinMeasuredValue::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback( + node_matter_endpoint, + Clusters::TemperatureMeasurement::Id, + MN::MinMeasuredValue::Id); + } + break; } // type is int16s case MN::MaxMeasuredValue::Id: { - using T = MN::MaxMeasuredValue::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) { - sl_log_debug(LOG_TAG, "MaxMeasuredValue attribute value is %s", unify_value.dump().c_str()); - UN::MaxMeasuredValue::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::TemperatureMeasurement::Id, - MN::MaxMeasuredValue::Id); - } - break; + using T = MN::MaxMeasuredValue::TypeInfo::Type; + std::optional value = from_json(unify_value); + + if( value.has_value()) { + sl_log_debug(LOG_TAG,"MaxMeasuredValue attribute value is %s",unify_value.dump().c_str()); + UN::MaxMeasuredValue::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback( + node_matter_endpoint, + Clusters::TemperatureMeasurement::Id, + MN::MaxMeasuredValue::Id); + } + break; } // type is int16u case MN::Tolerance::Id: { - using T = MN::Tolerance::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) { - sl_log_debug(LOG_TAG, "Tolerance attribute value is %s", unify_value.dump().c_str()); - UN::Tolerance::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::TemperatureMeasurement::Id, MN::Tolerance::Id); - } - break; - } - } + using T = MN::Tolerance::TypeInfo::Type; + std::optional value = from_json(unify_value); + + if( value.has_value()) { + sl_log_debug(LOG_TAG,"Tolerance attribute value is %s",unify_value.dump().c_str()); + UN::Tolerance::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback( + node_matter_endpoint, + Clusters::TemperatureMeasurement::Id, + MN::Tolerance::Id); + } + break; + } + } } CHIP_ERROR -PressureMeasurementAttributeAccess::Read(const ConcreteReadAttributePath& aPath, AttributeValueEncoder& aEncoder) +PressureMeasurementAttributeAccess::Read(const ConcreteReadAttributePath &aPath, + AttributeValueEncoder &aEncoder) { - namespace MN = chip::app::Clusters::PressureMeasurement::Attributes; - namespace UN = unify::matter_bridge::PressureMeasurement::Attributes; - if (aPath.mClusterId != Clusters::PressureMeasurement::Id) { - return CHIP_ERROR_INVALID_ARGUMENT; - } + namespace MN = chip::app::Clusters::PressureMeasurement::Attributes; + namespace UN = unify::matter_bridge::PressureMeasurement::Attributes; + if (aPath.mClusterId != Clusters::PressureMeasurement::Id) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + // Do not handle Read for non-unify endpoints + auto unify_node = m_node_state_monitor.bridged_endpoint(aPath.mEndpointId); + + if (!unify_node) { + return CHIP_NO_ERROR; + } - ConcreteAttributePath atr_path = ConcreteAttributePath(aPath.mEndpointId, aPath.mClusterId, aPath.mAttributeId); - if (m_node_state_monitor.emulator().is_attribute_emulated(aPath)) { - return m_node_state_monitor.emulator().read_attribute(aPath, aEncoder); - } + ConcreteAttributePath atr_path = 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(atr_path, value); - return aEncoder.Encode(value); - } - case MN::MinMeasuredValue::Id: { // type is int16s - MN::MinMeasuredValue::TypeInfo::Type value; - UN::MinMeasuredValue::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::MaxMeasuredValue::Id: { // type is int16s - MN::MaxMeasuredValue::TypeInfo::Type value; - UN::MaxMeasuredValue::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::Tolerance::Id: { // type is int16u - MN::Tolerance::TypeInfo::Type value; - UN::Tolerance::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::ScaledValue::Id: { // type is int16s - MN::ScaledValue::TypeInfo::Type value; - UN::ScaledValue::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::MinScaledValue::Id: { // type is int16s - MN::MinScaledValue::TypeInfo::Type value; - UN::MinScaledValue::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::MaxScaledValue::Id: { // type is int16s - MN::MaxScaledValue::TypeInfo::Type value; - UN::MaxScaledValue::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::ScaledTolerance::Id: { // type is int16u - MN::ScaledTolerance::TypeInfo::Type value; - UN::ScaledTolerance::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::Scale::Id: { // type is int8s - MN::Scale::TypeInfo::Type value; - UN::Scale::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::FeatureMap::Id: { // type is bitmap32 - MN::FeatureMap::TypeInfo::Type value; - UN::FeatureMap::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::ClusterRevision::Id: { // type is int16u - MN::ClusterRevision::TypeInfo::Type value; - UN::ClusterRevision::Get(atr_path, value); - return aEncoder.Encode(value); - } - } - } catch (const std::out_of_range& e) { - sl_log_info(LOG_TAG, - "The request attribute Path for endpoint [%i] is not found in the attribute state " - "container: %s\n", - atr_path.mEndpointId, e.what()); - return CHIP_ERROR_NO_MESSAGE_HANDLER; - } - return CHIP_NO_ERROR; + + if( m_node_state_monitor.emulator().is_attribute_emulated(aPath) ) { + return m_node_state_monitor.emulator().read_attribute(aPath,aEncoder); + } + + try { + switch (aPath.mAttributeId) { + case MN::MeasuredValue::Id: { // type is int16s + MN::MeasuredValue::TypeInfo::Type value; + UN::MeasuredValue::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::MinMeasuredValue::Id: { // type is int16s + MN::MinMeasuredValue::TypeInfo::Type value; + UN::MinMeasuredValue::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::MaxMeasuredValue::Id: { // type is int16s + MN::MaxMeasuredValue::TypeInfo::Type value; + UN::MaxMeasuredValue::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::Tolerance::Id: { // type is int16u + MN::Tolerance::TypeInfo::Type value; + UN::Tolerance::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::ScaledValue::Id: { // type is int16s + MN::ScaledValue::TypeInfo::Type value; + UN::ScaledValue::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::MinScaledValue::Id: { // type is int16s + MN::MinScaledValue::TypeInfo::Type value; + UN::MinScaledValue::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::MaxScaledValue::Id: { // type is int16s + MN::MaxScaledValue::TypeInfo::Type value; + UN::MaxScaledValue::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::ScaledTolerance::Id: { // type is int16u + MN::ScaledTolerance::TypeInfo::Type value; + UN::ScaledTolerance::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::Scale::Id: { // type is int8s + MN::Scale::TypeInfo::Type value; + UN::Scale::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::FeatureMap::Id: { // type is bitmap32 + MN::FeatureMap::TypeInfo::Type value; + UN::FeatureMap::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::ClusterRevision::Id: { // type is int16u + MN::ClusterRevision::TypeInfo::Type value; + UN::ClusterRevision::Get(atr_path, value); + return aEncoder.Encode(value); + } + } + } catch (const std::out_of_range &e) { + sl_log_info( + LOG_TAG, + "The request attribute Path for endpoint [%i] is not found in the attribute state " + "container: %s\n", atr_path.mEndpointId, e.what()); + return CHIP_ERROR_NO_MESSAGE_HANDLER; + } + return CHIP_NO_ERROR; } -CHIP_ERROR PressureMeasurementAttributeAccess::Write(const ConcreteDataAttributePath& aPath, AttributeValueDecoder& aDecoder) +CHIP_ERROR PressureMeasurementAttributeAccess::Write(const ConcreteDataAttributePath &aPath, + AttributeValueDecoder &aDecoder) { - using namespace chip::app::Clusters::PressureMeasurement; - - if (aPath.mClusterId != Clusters::PressureMeasurement::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; + using namespace chip::app::Clusters::PressureMeasurement; - if (m_node_state_monitor.emulator().is_attribute_emulated(aPath)) { - return m_node_state_monitor.emulator().write_attribute(aPath, aDecoder); - } - - switch (aPath.mAttributeId) { - // MeasuredValue is not supported by UCL - // MinMeasuredValue is not supported by UCL - // MaxMeasuredValue is not supported by UCL - // Tolerance is not supported by UCL - // ScaledValue is not supported by UCL - // MinScaledValue is not supported by UCL - // MaxScaledValue is not supported by UCL - // ScaledTolerance is not supported by UCL - // Scale is not supported by UCL - // GeneratedCommandList is not supported by UCL - // AcceptedCommandList is not supported by UCL - // AttributeList is not supported by UCL - // FeatureMap is not supported by UCL - // ClusterRevision is not supported by UCL - } - - 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) + "/PressureMeasurement/Attributes/" + attribute_name + "/Desired"; - payload_str = jsn.dump(); - m_unify_mqtt.Publish(topic, payload_str, true); - return CHIP_NO_ERROR; - } + if (aPath.mClusterId != Clusters::PressureMeasurement::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; + + if( m_node_state_monitor.emulator().is_attribute_emulated(aPath) ) { + return m_node_state_monitor.emulator().write_attribute(aPath,aDecoder); + } + + switch (aPath.mAttributeId) { + // MeasuredValue is not supported by UCL + // MinMeasuredValue is not supported by UCL + // MaxMeasuredValue is not supported by UCL + // Tolerance is not supported by UCL + // ScaledValue is not supported by UCL + // MinScaledValue is not supported by UCL + // MaxScaledValue is not supported by UCL + // ScaledTolerance is not supported by UCL + // Scale is not supported by UCL + // GeneratedCommandList is not supported by UCL + // AcceptedCommandList is not supported by UCL + // AttributeList is not supported by UCL + // FeatureMap is not supported by UCL + // ClusterRevision is not supported by UCL + } + + 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) + + "/PressureMeasurement/Attributes/" + attribute_name + "/Desired"; + payload_str = jsn.dump(); + m_unify_mqtt.Publish(topic, + payload_str, + true); + return CHIP_NO_ERROR; + } + + return CHIP_ERROR_NO_MESSAGE_HANDLER; } -void PressureMeasurementAttributeAccess::reported_updated(const bridged_endpoint* ep, const std::string& cluster, - const std::string& attribute, const nlohmann::json& unify_value) +void PressureMeasurementAttributeAccess::reported_updated(const bridged_endpoint *ep, + const std::string &cluster, + const std::string &attribute, + const nlohmann::json &unify_value) { - namespace MN = chip::app::Clusters::PressureMeasurement::Attributes; - namespace UN = unify::matter_bridge::PressureMeasurement::Attributes; + namespace MN = chip::app::Clusters::PressureMeasurement::Attributes; + namespace UN = unify::matter_bridge::PressureMeasurement::Attributes; - auto cluster_id = device_translator::instance().get_cluster_id(cluster); + auto cluster_id = device_translator::instance().get_cluster_id(cluster); - if (!cluster_id.has_value() || (cluster_id.value() != Clusters::PressureMeasurement::Id)) { - return; - } + if (!cluster_id.has_value() || (cluster_id.value() != Clusters::PressureMeasurement::Id)) { + return; + } - // get attribute id - auto attribute_id = device_translator::instance().get_attribute_id(cluster, attribute); + // get attribute id + auto attribute_id + = device_translator::instance().get_attribute_id(cluster, attribute); - if (!attribute_id.has_value()) { - return; - } + if (!attribute_id.has_value()) { + return; + } - chip::EndpointId node_matter_endpoint = ep->matter_endpoint; - ConcreteAttributePath attrpath = ConcreteAttributePath(node_matter_endpoint, Clusters::PressureMeasurement::Id, attribute_id.value()); - switch (attribute_id.value()) { + 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 case MN::MeasuredValue::Id: { - using T = MN::MeasuredValue::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) { - sl_log_debug(LOG_TAG, "MeasuredValue attribute value is %s", unify_value.dump().c_str()); - UN::MeasuredValue::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::PressureMeasurement::Id, MN::MeasuredValue::Id); - } - break; + using T = MN::MeasuredValue::TypeInfo::Type; + std::optional value = from_json(unify_value); + + if( value.has_value()) { + sl_log_debug(LOG_TAG,"MeasuredValue attribute value is %s",unify_value.dump().c_str()); + UN::MeasuredValue::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback( + node_matter_endpoint, + Clusters::PressureMeasurement::Id, + MN::MeasuredValue::Id); + } + break; } // type is int16s case MN::MinMeasuredValue::Id: { - using T = MN::MinMeasuredValue::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) { - sl_log_debug(LOG_TAG, "MinMeasuredValue attribute value is %s", unify_value.dump().c_str()); - UN::MinMeasuredValue::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::PressureMeasurement::Id, - MN::MinMeasuredValue::Id); - } - break; + using T = MN::MinMeasuredValue::TypeInfo::Type; + std::optional value = from_json(unify_value); + + if( value.has_value()) { + sl_log_debug(LOG_TAG,"MinMeasuredValue attribute value is %s",unify_value.dump().c_str()); + UN::MinMeasuredValue::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback( + node_matter_endpoint, + Clusters::PressureMeasurement::Id, + MN::MinMeasuredValue::Id); + } + break; } // type is int16s case MN::MaxMeasuredValue::Id: { - using T = MN::MaxMeasuredValue::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) { - sl_log_debug(LOG_TAG, "MaxMeasuredValue attribute value is %s", unify_value.dump().c_str()); - UN::MaxMeasuredValue::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::PressureMeasurement::Id, - MN::MaxMeasuredValue::Id); - } - break; + using T = MN::MaxMeasuredValue::TypeInfo::Type; + std::optional value = from_json(unify_value); + + if( value.has_value()) { + sl_log_debug(LOG_TAG,"MaxMeasuredValue attribute value is %s",unify_value.dump().c_str()); + UN::MaxMeasuredValue::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback( + node_matter_endpoint, + Clusters::PressureMeasurement::Id, + MN::MaxMeasuredValue::Id); + } + break; } // type is int16u case MN::Tolerance::Id: { - using T = MN::Tolerance::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) { - sl_log_debug(LOG_TAG, "Tolerance attribute value is %s", unify_value.dump().c_str()); - UN::Tolerance::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::PressureMeasurement::Id, MN::Tolerance::Id); - } - break; + using T = MN::Tolerance::TypeInfo::Type; + std::optional value = from_json(unify_value); + + if( value.has_value()) { + sl_log_debug(LOG_TAG,"Tolerance attribute value is %s",unify_value.dump().c_str()); + UN::Tolerance::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback( + node_matter_endpoint, + Clusters::PressureMeasurement::Id, + MN::Tolerance::Id); + } + break; } // type is int16s case MN::ScaledValue::Id: { - using T = MN::ScaledValue::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) { - sl_log_debug(LOG_TAG, "ScaledValue attribute value is %s", unify_value.dump().c_str()); - UN::ScaledValue::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::PressureMeasurement::Id, MN::ScaledValue::Id); - } - break; + using T = MN::ScaledValue::TypeInfo::Type; + std::optional value = from_json(unify_value); + + if( value.has_value()) { + sl_log_debug(LOG_TAG,"ScaledValue attribute value is %s",unify_value.dump().c_str()); + UN::ScaledValue::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback( + node_matter_endpoint, + Clusters::PressureMeasurement::Id, + MN::ScaledValue::Id); + } + break; } // type is int16s - case MN::MinScaledValue::Id: { - using T = MN::MinScaledValue::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) { - sl_log_debug(LOG_TAG, "MinScaledValue attribute value is %s", unify_value.dump().c_str()); - UN::MinScaledValue::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::PressureMeasurement::Id, MN::MinScaledValue::Id); - } - break; - } - // type is int16s - case MN::MaxScaledValue::Id: { - using T = MN::MaxScaledValue::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) { - sl_log_debug(LOG_TAG, "MaxScaledValue attribute value is %s", unify_value.dump().c_str()); - UN::MaxScaledValue::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::PressureMeasurement::Id, MN::MaxScaledValue::Id); - } - break; - } - // type is int16u - case MN::ScaledTolerance::Id: { - using T = MN::ScaledTolerance::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) { - sl_log_debug(LOG_TAG, "ScaledTolerance attribute value is %s", unify_value.dump().c_str()); - UN::ScaledTolerance::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::PressureMeasurement::Id, - MN::ScaledTolerance::Id); - } - break; - } - // type is int8s - case MN::Scale::Id: { - using T = MN::Scale::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) { - sl_log_debug(LOG_TAG, "Scale attribute value is %s", unify_value.dump().c_str()); - UN::Scale::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::PressureMeasurement::Id, MN::Scale::Id); - } - break; - } - } -} - -CHIP_ERROR -RelativeHumidityMeasurementAttributeAccess::Read(const ConcreteReadAttributePath& aPath, AttributeValueEncoder& aEncoder) -{ - namespace MN = chip::app::Clusters::RelativeHumidityMeasurement::Attributes; - namespace UN = unify::matter_bridge::RelativeHumidityMeasurement::Attributes; - if (aPath.mClusterId != Clusters::RelativeHumidityMeasurement::Id) { - return CHIP_ERROR_INVALID_ARGUMENT; - } - - ConcreteAttributePath atr_path = ConcreteAttributePath(aPath.mEndpointId, aPath.mClusterId, aPath.mAttributeId); - - if (m_node_state_monitor.emulator().is_attribute_emulated(aPath)) { - return m_node_state_monitor.emulator().read_attribute(aPath, aEncoder); - } - - try { - switch (aPath.mAttributeId) { - case MN::MeasuredValue::Id: { // type is int16u - MN::MeasuredValue::TypeInfo::Type value; - UN::MeasuredValue::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::MinMeasuredValue::Id: { // type is int16u - MN::MinMeasuredValue::TypeInfo::Type value; - UN::MinMeasuredValue::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::MaxMeasuredValue::Id: { // type is int16u - MN::MaxMeasuredValue::TypeInfo::Type value; - UN::MaxMeasuredValue::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::Tolerance::Id: { // type is int16u - MN::Tolerance::TypeInfo::Type value; - UN::Tolerance::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::FeatureMap::Id: { // type is bitmap32 - MN::FeatureMap::TypeInfo::Type value; - UN::FeatureMap::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::ClusterRevision::Id: { // type is int16u - MN::ClusterRevision::TypeInfo::Type value; - UN::ClusterRevision::Get(atr_path, value); - return aEncoder.Encode(value); - } - } - } catch (const std::out_of_range& e) { - sl_log_info(LOG_TAG, - "The request attribute Path for endpoint [%i] is not found in the attribute state " - "container: %s\n", - atr_path.mEndpointId, e.what()); - return CHIP_ERROR_NO_MESSAGE_HANDLER; - } - return CHIP_NO_ERROR; -} - -CHIP_ERROR RelativeHumidityMeasurementAttributeAccess::Write(const ConcreteDataAttributePath& aPath, - AttributeValueDecoder& aDecoder) -{ - using namespace chip::app::Clusters::RelativeHumidityMeasurement; - - if (aPath.mClusterId != Clusters::RelativeHumidityMeasurement::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; - - if (m_node_state_monitor.emulator().is_attribute_emulated(aPath)) { - return m_node_state_monitor.emulator().write_attribute(aPath, aDecoder); - } - - switch (aPath.mAttributeId) { - // measured value is not supported by UCL - // min measured value is not supported by UCL - // max measured value is not supported by UCL - // tolerance is not supported by UCL - // GeneratedCommandList is not supported by UCL - // AcceptedCommandList is not supported by UCL - // AttributeList is not supported by UCL - // FeatureMap is not supported by UCL - // ClusterRevision is not supported by UCL - } - - 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) + "/RelativityHumidity/Attributes/" + attribute_name + "/Desired"; - payload_str = jsn.dump(); - m_unify_mqtt.Publish(topic, payload_str, true); - return CHIP_NO_ERROR; - } - - return CHIP_ERROR_NO_MESSAGE_HANDLER; -} - -void RelativeHumidityMeasurementAttributeAccess::reported_updated(const bridged_endpoint* ep, const std::string& cluster, - const std::string& attribute, const nlohmann::json& unify_value) -{ - namespace MN = chip::app::Clusters::RelativeHumidityMeasurement::Attributes; - namespace UN = unify::matter_bridge::RelativeHumidityMeasurement::Attributes; - - auto cluster_id = device_translator::instance().get_cluster_id(cluster); - - if (!cluster_id.has_value() || (cluster_id.value() != Clusters::RelativeHumidityMeasurement::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::RelativeHumidityMeasurement::Id, attribute_id.value()); - switch (attribute_id.value()) { - // type is int16u - case MN::MeasuredValue::Id: { - using T = MN::MeasuredValue::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) { - sl_log_debug(LOG_TAG, "MeasuredValue attribute value is %s", unify_value.dump().c_str()); - UN::MeasuredValue::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::RelativeHumidityMeasurement::Id, - MN::MeasuredValue::Id); - } - break; - } - // type is int16u - case MN::MinMeasuredValue::Id: { - using T = MN::MinMeasuredValue::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) { - sl_log_debug(LOG_TAG, "MinMeasuredValue attribute value is %s", unify_value.dump().c_str()); - UN::MinMeasuredValue::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::RelativeHumidityMeasurement::Id, - MN::MinMeasuredValue::Id); - } - break; - } - // type is int16u - case MN::MaxMeasuredValue::Id: { - using T = MN::MaxMeasuredValue::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) { - sl_log_debug(LOG_TAG, "MaxMeasuredValue attribute value is %s", unify_value.dump().c_str()); - UN::MaxMeasuredValue::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::RelativeHumidityMeasurement::Id, - MN::MaxMeasuredValue::Id); - } - break; - } - // type is int16u - case MN::Tolerance::Id: { - using T = MN::Tolerance::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) { - sl_log_debug(LOG_TAG, "Tolerance attribute value is %s", unify_value.dump().c_str()); - UN::Tolerance::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::RelativeHumidityMeasurement::Id, - MN::Tolerance::Id); - } - break; - } - } -} - -CHIP_ERROR -OccupancySensingAttributeAccess::Read(const ConcreteReadAttributePath& aPath, AttributeValueEncoder& aEncoder) -{ - namespace MN = chip::app::Clusters::OccupancySensing::Attributes; - namespace UN = unify::matter_bridge::OccupancySensing::Attributes; - if (aPath.mClusterId != Clusters::OccupancySensing::Id) { - return CHIP_ERROR_INVALID_ARGUMENT; - } - - ConcreteAttributePath atr_path = ConcreteAttributePath(aPath.mEndpointId, aPath.mClusterId, aPath.mAttributeId); - - if (m_node_state_monitor.emulator().is_attribute_emulated(aPath)) { - return m_node_state_monitor.emulator().read_attribute(aPath, aEncoder); - } - - try { - switch (aPath.mAttributeId) { - case MN::Occupancy::Id: { // type is bitmap8 - MN::Occupancy::TypeInfo::Type value; - UN::Occupancy::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::OccupancySensorType::Id: { // type is enum8 - MN::OccupancySensorType::TypeInfo::Type value; - UN::OccupancySensorType::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::OccupancySensorTypeBitmap::Id: { // type is bitmap8 - MN::OccupancySensorTypeBitmap::TypeInfo::Type value; - UN::OccupancySensorTypeBitmap::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::PirOccupiedToUnoccupiedDelay::Id: { // type is int16u - MN::PirOccupiedToUnoccupiedDelay::TypeInfo::Type value; - UN::PirOccupiedToUnoccupiedDelay::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::PirUnoccupiedToOccupiedDelay::Id: { // type is int16u - MN::PirUnoccupiedToOccupiedDelay::TypeInfo::Type value; - UN::PirUnoccupiedToOccupiedDelay::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::PirUnoccupiedToOccupiedThreshold::Id: { // type is int8u - MN::PirUnoccupiedToOccupiedThreshold::TypeInfo::Type value; - UN::PirUnoccupiedToOccupiedThreshold::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::UltrasonicOccupiedToUnoccupiedDelay::Id: { // type is int16u - MN::UltrasonicOccupiedToUnoccupiedDelay::TypeInfo::Type value; - UN::UltrasonicOccupiedToUnoccupiedDelay::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::UltrasonicUnoccupiedToOccupiedDelay::Id: { // type is int16u - MN::UltrasonicUnoccupiedToOccupiedDelay::TypeInfo::Type value; - UN::UltrasonicUnoccupiedToOccupiedDelay::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::UltrasonicUnoccupiedToOccupiedThreshold::Id: { // type is int8u - MN::UltrasonicUnoccupiedToOccupiedThreshold::TypeInfo::Type value; - UN::UltrasonicUnoccupiedToOccupiedThreshold::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::PhysicalContactOccupiedToUnoccupiedDelay::Id: { // type is int16u - MN::PhysicalContactOccupiedToUnoccupiedDelay::TypeInfo::Type value; - UN::PhysicalContactOccupiedToUnoccupiedDelay::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::PhysicalContactUnoccupiedToOccupiedDelay::Id: { // type is int16u - MN::PhysicalContactUnoccupiedToOccupiedDelay::TypeInfo::Type value; - UN::PhysicalContactUnoccupiedToOccupiedDelay::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::PhysicalContactUnoccupiedToOccupiedThreshold::Id: { // type is int8u - MN::PhysicalContactUnoccupiedToOccupiedThreshold::TypeInfo::Type value; - UN::PhysicalContactUnoccupiedToOccupiedThreshold::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::FeatureMap::Id: { // type is bitmap32 - MN::FeatureMap::TypeInfo::Type value; - UN::FeatureMap::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::ClusterRevision::Id: { // type is int16u - MN::ClusterRevision::TypeInfo::Type value; - UN::ClusterRevision::Get(atr_path, value); - return aEncoder.Encode(value); - } - } - } catch (const std::out_of_range& e) { - sl_log_info(LOG_TAG, - "The request attribute Path for endpoint [%i] is not found in the attribute state " - "container: %s\n", - atr_path.mEndpointId, e.what()); - return CHIP_ERROR_NO_MESSAGE_HANDLER; - } - return CHIP_NO_ERROR; -} - -CHIP_ERROR OccupancySensingAttributeAccess::Write(const ConcreteDataAttributePath& aPath, AttributeValueDecoder& aDecoder) -{ - using namespace chip::app::Clusters::OccupancySensing; - - if (aPath.mClusterId != Clusters::OccupancySensing::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; - - if (m_node_state_monitor.emulator().is_attribute_emulated(aPath)) { - return m_node_state_monitor.emulator().write_attribute(aPath, aDecoder); - } - - switch (aPath.mAttributeId) { - // occupancy is not supported by UCL - // occupancy sensor type is not supported by UCL - // occupancy sensor type bitmap is not supported by UCL - case Attributes::PirOccupiedToUnoccupiedDelay::Id: { - - Attributes::PirOccupiedToUnoccupiedDelay::TypeInfo::DecodableType value; - aDecoder.Decode(value); - jsn["value"] = to_json(value); - attribute_name = "PIROccupiedToUnoccupiedDelay"; - break; - } - case Attributes::PirUnoccupiedToOccupiedDelay::Id: { - - Attributes::PirUnoccupiedToOccupiedDelay::TypeInfo::DecodableType value; - aDecoder.Decode(value); - jsn["value"] = to_json(value); - attribute_name = "PIRUnoccupiedToOccupiedDelay"; - break; - } - case Attributes::PirUnoccupiedToOccupiedThreshold::Id: { - - Attributes::PirUnoccupiedToOccupiedThreshold::TypeInfo::DecodableType value; - aDecoder.Decode(value); - jsn["value"] = to_json(value); - attribute_name = "PIRUnoccupiedToOccupiedThreshold"; - break; - } - case Attributes::UltrasonicOccupiedToUnoccupiedDelay::Id: { - - Attributes::UltrasonicOccupiedToUnoccupiedDelay::TypeInfo::DecodableType value; - aDecoder.Decode(value); - jsn["value"] = to_json(value); - attribute_name = "UltrasonicOccupiedToUnoccupiedDelay"; - break; - } - case Attributes::UltrasonicUnoccupiedToOccupiedDelay::Id: { - - Attributes::UltrasonicUnoccupiedToOccupiedDelay::TypeInfo::DecodableType value; - aDecoder.Decode(value); - jsn["value"] = to_json(value); - attribute_name = "UltrasonicUnoccupiedToOccupiedDelay"; - break; - } - case Attributes::UltrasonicUnoccupiedToOccupiedThreshold::Id: { - - Attributes::UltrasonicUnoccupiedToOccupiedThreshold::TypeInfo::DecodableType value; - aDecoder.Decode(value); - jsn["value"] = to_json(value); - attribute_name = "UltrasonicUnoccupiedToOccupiedThreshold"; - break; - } - case Attributes::PhysicalContactOccupiedToUnoccupiedDelay::Id: { - - Attributes::PhysicalContactOccupiedToUnoccupiedDelay::TypeInfo::DecodableType value; - aDecoder.Decode(value); - jsn["value"] = to_json(value); - attribute_name = "PhysicalContactOccupiedToUnoccupiedDelay"; - break; - } - case Attributes::PhysicalContactUnoccupiedToOccupiedDelay::Id: { - - Attributes::PhysicalContactUnoccupiedToOccupiedDelay::TypeInfo::DecodableType value; - aDecoder.Decode(value); - jsn["value"] = to_json(value); - attribute_name = "PhysicalContactUnoccupiedToOccupiedDelay"; - break; - } - case Attributes::PhysicalContactUnoccupiedToOccupiedThreshold::Id: { - - Attributes::PhysicalContactUnoccupiedToOccupiedThreshold::TypeInfo::DecodableType value; - aDecoder.Decode(value); - jsn["value"] = to_json(value); - attribute_name = "PhysicalContactUnoccupiedToOccupiedThreshold"; - break; - } - // GeneratedCommandList is not supported by UCL - // AcceptedCommandList is not supported by UCL - // AttributeList is not supported by UCL - // FeatureMap is not supported by UCL - // ClusterRevision is not supported by UCL - } - - 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) + "/OccupancySensing/Attributes/" + attribute_name + "/Desired"; - payload_str = jsn.dump(); - m_unify_mqtt.Publish(topic, payload_str, true); - return CHIP_NO_ERROR; - } - - return CHIP_ERROR_NO_MESSAGE_HANDLER; -} - -void OccupancySensingAttributeAccess::reported_updated(const bridged_endpoint* ep, const std::string& cluster, - const std::string& attribute, const nlohmann::json& unify_value) -{ - namespace MN = chip::app::Clusters::OccupancySensing::Attributes; - namespace UN = unify::matter_bridge::OccupancySensing::Attributes; - - auto cluster_id = device_translator::instance().get_cluster_id(cluster); - - if (!cluster_id.has_value() || (cluster_id.value() != Clusters::OccupancySensing::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::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); - - if (value.has_value()) { - sl_log_debug(LOG_TAG, "Occupancy attribute value is %s", unify_value.dump().c_str()); - UN::Occupancy::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::OccupancySensing::Id, MN::Occupancy::Id); - } - break; - } - // type is enum8 - case MN::OccupancySensorType::Id: { - using T = MN::OccupancySensorType::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) { - sl_log_debug(LOG_TAG, "OccupancySensorType attribute value is %s", unify_value.dump().c_str()); - UN::OccupancySensorType::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::OccupancySensing::Id, - MN::OccupancySensorType::Id); - } - break; - } - // type is bitmap8 - case MN::OccupancySensorTypeBitmap::Id: { - using T = MN::OccupancySensorTypeBitmap::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) { - sl_log_debug(LOG_TAG, "OccupancySensorTypeBitmap attribute value is %s", unify_value.dump().c_str()); - UN::OccupancySensorTypeBitmap::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::OccupancySensing::Id, - MN::OccupancySensorTypeBitmap::Id); - } - break; - } - // type is int16u - case MN::PirOccupiedToUnoccupiedDelay::Id: { - using T = MN::PirOccupiedToUnoccupiedDelay::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) { - sl_log_debug(LOG_TAG, "PirOccupiedToUnoccupiedDelay attribute value is %s", unify_value.dump().c_str()); - UN::PirOccupiedToUnoccupiedDelay::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::OccupancySensing::Id, - MN::PirOccupiedToUnoccupiedDelay::Id); - } - break; - } - // type is int16u - case MN::PirUnoccupiedToOccupiedDelay::Id: { - using T = MN::PirUnoccupiedToOccupiedDelay::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) { - sl_log_debug(LOG_TAG, "PirUnoccupiedToOccupiedDelay attribute value is %s", unify_value.dump().c_str()); - UN::PirUnoccupiedToOccupiedDelay::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::OccupancySensing::Id, - MN::PirUnoccupiedToOccupiedDelay::Id); - } - break; - } - // type is int8u - case MN::PirUnoccupiedToOccupiedThreshold::Id: { - using T = MN::PirUnoccupiedToOccupiedThreshold::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) { - sl_log_debug(LOG_TAG, "PirUnoccupiedToOccupiedThreshold attribute value is %s", unify_value.dump().c_str()); - UN::PirUnoccupiedToOccupiedThreshold::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::OccupancySensing::Id, - MN::PirUnoccupiedToOccupiedThreshold::Id); - } - break; - } - // type is int16u - case MN::UltrasonicOccupiedToUnoccupiedDelay::Id: { - using T = MN::UltrasonicOccupiedToUnoccupiedDelay::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) { - sl_log_debug(LOG_TAG, "UltrasonicOccupiedToUnoccupiedDelay attribute value is %s", unify_value.dump().c_str()); - UN::UltrasonicOccupiedToUnoccupiedDelay::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::OccupancySensing::Id, - MN::UltrasonicOccupiedToUnoccupiedDelay::Id); - } - break; - } - // type is int16u - case MN::UltrasonicUnoccupiedToOccupiedDelay::Id: { - using T = MN::UltrasonicUnoccupiedToOccupiedDelay::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) { - sl_log_debug(LOG_TAG, "UltrasonicUnoccupiedToOccupiedDelay attribute value is %s", unify_value.dump().c_str()); - UN::UltrasonicUnoccupiedToOccupiedDelay::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::OccupancySensing::Id, - MN::UltrasonicUnoccupiedToOccupiedDelay::Id); - } - break; - } - // type is int8u - case MN::UltrasonicUnoccupiedToOccupiedThreshold::Id: { - using T = MN::UltrasonicUnoccupiedToOccupiedThreshold::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) { - sl_log_debug(LOG_TAG, "UltrasonicUnoccupiedToOccupiedThreshold attribute value is %s", unify_value.dump().c_str()); - UN::UltrasonicUnoccupiedToOccupiedThreshold::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::OccupancySensing::Id, - MN::UltrasonicUnoccupiedToOccupiedThreshold::Id); - } - break; - } - // type is int16u - case MN::PhysicalContactOccupiedToUnoccupiedDelay::Id: { - using T = MN::PhysicalContactOccupiedToUnoccupiedDelay::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) { - sl_log_debug(LOG_TAG, "PhysicalContactOccupiedToUnoccupiedDelay attribute value is %s", unify_value.dump().c_str()); - UN::PhysicalContactOccupiedToUnoccupiedDelay::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::OccupancySensing::Id, - MN::PhysicalContactOccupiedToUnoccupiedDelay::Id); - } - break; - } - // type is int16u - case MN::PhysicalContactUnoccupiedToOccupiedDelay::Id: { - using T = MN::PhysicalContactUnoccupiedToOccupiedDelay::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) { - sl_log_debug(LOG_TAG, "PhysicalContactUnoccupiedToOccupiedDelay attribute value is %s", unify_value.dump().c_str()); - UN::PhysicalContactUnoccupiedToOccupiedDelay::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::OccupancySensing::Id, - MN::PhysicalContactUnoccupiedToOccupiedDelay::Id); - } - break; - } - // type is int8u - case MN::PhysicalContactUnoccupiedToOccupiedThreshold::Id: { - using T = MN::PhysicalContactUnoccupiedToOccupiedThreshold::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) { - sl_log_debug(LOG_TAG, "PhysicalContactUnoccupiedToOccupiedThreshold attribute value is %s", unify_value.dump().c_str()); - UN::PhysicalContactUnoccupiedToOccupiedThreshold::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::OccupancySensing::Id, - MN::PhysicalContactUnoccupiedToOccupiedThreshold::Id); - } - break; - } - } -} - -CHIP_ERROR -ElectricalMeasurementAttributeAccess::Read(const ConcreteReadAttributePath& aPath, AttributeValueEncoder& aEncoder) -{ - namespace MN = chip::app::Clusters::ElectricalMeasurement::Attributes; - namespace UN = unify::matter_bridge::ElectricalMeasurement::Attributes; - if (aPath.mClusterId != Clusters::ElectricalMeasurement::Id) { - return CHIP_ERROR_INVALID_ARGUMENT; - } - - ConcreteAttributePath atr_path = ConcreteAttributePath(aPath.mEndpointId, aPath.mClusterId, aPath.mAttributeId); - - if (m_node_state_monitor.emulator().is_attribute_emulated(aPath)) { - return m_node_state_monitor.emulator().read_attribute(aPath, aEncoder); - } - - try { - switch (aPath.mAttributeId) { - case MN::MeasurementType::Id: { // type is bitmap32 - MN::MeasurementType::TypeInfo::Type value; - UN::MeasurementType::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::DcVoltage::Id: { // type is int16s - MN::DcVoltage::TypeInfo::Type value; - UN::DcVoltage::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::DcVoltageMin::Id: { // type is int16s - MN::DcVoltageMin::TypeInfo::Type value; - UN::DcVoltageMin::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::DcVoltageMax::Id: { // type is int16s - MN::DcVoltageMax::TypeInfo::Type value; - UN::DcVoltageMax::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::DcCurrent::Id: { // type is int16s - MN::DcCurrent::TypeInfo::Type value; - UN::DcCurrent::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::DcCurrentMin::Id: { // type is int16s - MN::DcCurrentMin::TypeInfo::Type value; - UN::DcCurrentMin::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::DcCurrentMax::Id: { // type is int16s - MN::DcCurrentMax::TypeInfo::Type value; - UN::DcCurrentMax::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::DcPower::Id: { // type is int16s - MN::DcPower::TypeInfo::Type value; - UN::DcPower::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::DcPowerMin::Id: { // type is int16s - MN::DcPowerMin::TypeInfo::Type value; - UN::DcPowerMin::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::DcPowerMax::Id: { // type is int16s - MN::DcPowerMax::TypeInfo::Type value; - UN::DcPowerMax::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::DcVoltageMultiplier::Id: { // type is int16u - MN::DcVoltageMultiplier::TypeInfo::Type value; - UN::DcVoltageMultiplier::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::DcVoltageDivisor::Id: { // type is int16u - MN::DcVoltageDivisor::TypeInfo::Type value; - UN::DcVoltageDivisor::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::DcCurrentMultiplier::Id: { // type is int16u - MN::DcCurrentMultiplier::TypeInfo::Type value; - UN::DcCurrentMultiplier::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::DcCurrentDivisor::Id: { // type is int16u - MN::DcCurrentDivisor::TypeInfo::Type value; - UN::DcCurrentDivisor::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::DcPowerMultiplier::Id: { // type is int16u - MN::DcPowerMultiplier::TypeInfo::Type value; - UN::DcPowerMultiplier::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::DcPowerDivisor::Id: { // type is int16u - MN::DcPowerDivisor::TypeInfo::Type value; - UN::DcPowerDivisor::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::AcFrequency::Id: { // type is int16u - MN::AcFrequency::TypeInfo::Type value; - UN::AcFrequency::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::AcFrequencyMin::Id: { // type is int16u - MN::AcFrequencyMin::TypeInfo::Type value; - UN::AcFrequencyMin::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::AcFrequencyMax::Id: { // type is int16u - MN::AcFrequencyMax::TypeInfo::Type value; - UN::AcFrequencyMax::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::NeutralCurrent::Id: { // type is int16u - MN::NeutralCurrent::TypeInfo::Type value; - UN::NeutralCurrent::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::TotalActivePower::Id: { // type is int32s - MN::TotalActivePower::TypeInfo::Type value; - UN::TotalActivePower::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::TotalReactivePower::Id: { // type is int32s - MN::TotalReactivePower::TypeInfo::Type value; - UN::TotalReactivePower::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::TotalApparentPower::Id: { // type is int32u - MN::TotalApparentPower::TypeInfo::Type value; - UN::TotalApparentPower::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::Measured1stHarmonicCurrent::Id: { // type is int16s - MN::Measured1stHarmonicCurrent::TypeInfo::Type value; - UN::Measured1stHarmonicCurrent::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::Measured3rdHarmonicCurrent::Id: { // type is int16s - MN::Measured3rdHarmonicCurrent::TypeInfo::Type value; - UN::Measured3rdHarmonicCurrent::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::Measured5thHarmonicCurrent::Id: { // type is int16s - MN::Measured5thHarmonicCurrent::TypeInfo::Type value; - UN::Measured5thHarmonicCurrent::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::Measured7thHarmonicCurrent::Id: { // type is int16s - MN::Measured7thHarmonicCurrent::TypeInfo::Type value; - UN::Measured7thHarmonicCurrent::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::Measured9thHarmonicCurrent::Id: { // type is int16s - MN::Measured9thHarmonicCurrent::TypeInfo::Type value; - UN::Measured9thHarmonicCurrent::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::Measured11thHarmonicCurrent::Id: { // type is int16s - MN::Measured11thHarmonicCurrent::TypeInfo::Type value; - UN::Measured11thHarmonicCurrent::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::MeasuredPhase1stHarmonicCurrent::Id: { // type is int16s - MN::MeasuredPhase1stHarmonicCurrent::TypeInfo::Type value; - UN::MeasuredPhase1stHarmonicCurrent::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::MeasuredPhase3rdHarmonicCurrent::Id: { // type is int16s - MN::MeasuredPhase3rdHarmonicCurrent::TypeInfo::Type value; - UN::MeasuredPhase3rdHarmonicCurrent::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::MeasuredPhase5thHarmonicCurrent::Id: { // type is int16s - MN::MeasuredPhase5thHarmonicCurrent::TypeInfo::Type value; - UN::MeasuredPhase5thHarmonicCurrent::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::MeasuredPhase7thHarmonicCurrent::Id: { // type is int16s - MN::MeasuredPhase7thHarmonicCurrent::TypeInfo::Type value; - UN::MeasuredPhase7thHarmonicCurrent::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::MeasuredPhase9thHarmonicCurrent::Id: { // type is int16s - MN::MeasuredPhase9thHarmonicCurrent::TypeInfo::Type value; - UN::MeasuredPhase9thHarmonicCurrent::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::MeasuredPhase11thHarmonicCurrent::Id: { // type is int16s - MN::MeasuredPhase11thHarmonicCurrent::TypeInfo::Type value; - UN::MeasuredPhase11thHarmonicCurrent::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::AcFrequencyMultiplier::Id: { // type is int16u - MN::AcFrequencyMultiplier::TypeInfo::Type value; - UN::AcFrequencyMultiplier::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::AcFrequencyDivisor::Id: { // type is int16u - MN::AcFrequencyDivisor::TypeInfo::Type value; - UN::AcFrequencyDivisor::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::PowerMultiplier::Id: { // type is int32u - MN::PowerMultiplier::TypeInfo::Type value; - UN::PowerMultiplier::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::PowerDivisor::Id: { // type is int32u - MN::PowerDivisor::TypeInfo::Type value; - UN::PowerDivisor::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::HarmonicCurrentMultiplier::Id: { // type is int8s - MN::HarmonicCurrentMultiplier::TypeInfo::Type value; - UN::HarmonicCurrentMultiplier::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::PhaseHarmonicCurrentMultiplier::Id: { // type is int8s - MN::PhaseHarmonicCurrentMultiplier::TypeInfo::Type value; - UN::PhaseHarmonicCurrentMultiplier::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::InstantaneousVoltage::Id: { // type is int16s - MN::InstantaneousVoltage::TypeInfo::Type value; - UN::InstantaneousVoltage::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::InstantaneousLineCurrent::Id: { // type is int16u - MN::InstantaneousLineCurrent::TypeInfo::Type value; - UN::InstantaneousLineCurrent::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::InstantaneousActiveCurrent::Id: { // type is int16s - MN::InstantaneousActiveCurrent::TypeInfo::Type value; - UN::InstantaneousActiveCurrent::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::InstantaneousReactiveCurrent::Id: { // type is int16s - MN::InstantaneousReactiveCurrent::TypeInfo::Type value; - UN::InstantaneousReactiveCurrent::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::InstantaneousPower::Id: { // type is int16s - MN::InstantaneousPower::TypeInfo::Type value; - UN::InstantaneousPower::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::RmsVoltage::Id: { // type is int16u - MN::RmsVoltage::TypeInfo::Type value; - UN::RmsVoltage::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::RmsVoltageMin::Id: { // type is int16u - MN::RmsVoltageMin::TypeInfo::Type value; - UN::RmsVoltageMin::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::RmsVoltageMax::Id: { // type is int16u - MN::RmsVoltageMax::TypeInfo::Type value; - UN::RmsVoltageMax::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::RmsCurrent::Id: { // type is int16u - MN::RmsCurrent::TypeInfo::Type value; - UN::RmsCurrent::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::RmsCurrentMin::Id: { // type is int16u - MN::RmsCurrentMin::TypeInfo::Type value; - UN::RmsCurrentMin::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::RmsCurrentMax::Id: { // type is int16u - MN::RmsCurrentMax::TypeInfo::Type value; - UN::RmsCurrentMax::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::ActivePower::Id: { // type is int16s - MN::ActivePower::TypeInfo::Type value; - UN::ActivePower::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::ActivePowerMin::Id: { // type is int16s - MN::ActivePowerMin::TypeInfo::Type value; - UN::ActivePowerMin::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::ActivePowerMax::Id: { // type is int16s - MN::ActivePowerMax::TypeInfo::Type value; - UN::ActivePowerMax::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::ReactivePower::Id: { // type is int16s - MN::ReactivePower::TypeInfo::Type value; - UN::ReactivePower::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::ApparentPower::Id: { // type is int16u - MN::ApparentPower::TypeInfo::Type value; - UN::ApparentPower::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::PowerFactor::Id: { // type is int8s - MN::PowerFactor::TypeInfo::Type value; - UN::PowerFactor::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::AverageRmsVoltageMeasurementPeriod::Id: { // type is int16u - MN::AverageRmsVoltageMeasurementPeriod::TypeInfo::Type value; - UN::AverageRmsVoltageMeasurementPeriod::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::AverageRmsUnderVoltageCounter::Id: { // type is int16u - MN::AverageRmsUnderVoltageCounter::TypeInfo::Type value; - UN::AverageRmsUnderVoltageCounter::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::RmsExtremeOverVoltagePeriod::Id: { // type is int16u - MN::RmsExtremeOverVoltagePeriod::TypeInfo::Type value; - UN::RmsExtremeOverVoltagePeriod::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::RmsExtremeUnderVoltagePeriod::Id: { // type is int16u - MN::RmsExtremeUnderVoltagePeriod::TypeInfo::Type value; - UN::RmsExtremeUnderVoltagePeriod::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::RmsVoltageSagPeriod::Id: { // type is int16u - MN::RmsVoltageSagPeriod::TypeInfo::Type value; - UN::RmsVoltageSagPeriod::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::RmsVoltageSwellPeriod::Id: { // type is int16u - MN::RmsVoltageSwellPeriod::TypeInfo::Type value; - UN::RmsVoltageSwellPeriod::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::AcVoltageMultiplier::Id: { // type is int16u - MN::AcVoltageMultiplier::TypeInfo::Type value; - UN::AcVoltageMultiplier::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::AcVoltageDivisor::Id: { // type is int16u - MN::AcVoltageDivisor::TypeInfo::Type value; - UN::AcVoltageDivisor::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::AcCurrentMultiplier::Id: { // type is int16u - MN::AcCurrentMultiplier::TypeInfo::Type value; - UN::AcCurrentMultiplier::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::AcCurrentDivisor::Id: { // type is int16u - MN::AcCurrentDivisor::TypeInfo::Type value; - UN::AcCurrentDivisor::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::AcPowerMultiplier::Id: { // type is int16u - MN::AcPowerMultiplier::TypeInfo::Type value; - UN::AcPowerMultiplier::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::AcPowerDivisor::Id: { // type is int16u - MN::AcPowerDivisor::TypeInfo::Type value; - UN::AcPowerDivisor::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::OverloadAlarmsMask::Id: { // type is bitmap8 - MN::OverloadAlarmsMask::TypeInfo::Type value; - UN::OverloadAlarmsMask::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::VoltageOverload::Id: { // type is int16s - MN::VoltageOverload::TypeInfo::Type value; - UN::VoltageOverload::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::CurrentOverload::Id: { // type is int16s - MN::CurrentOverload::TypeInfo::Type value; - UN::CurrentOverload::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::AcOverloadAlarmsMask::Id: { // type is bitmap16 - MN::AcOverloadAlarmsMask::TypeInfo::Type value; - UN::AcOverloadAlarmsMask::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::AcVoltageOverload::Id: { // type is int16s - MN::AcVoltageOverload::TypeInfo::Type value; - UN::AcVoltageOverload::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::AcCurrentOverload::Id: { // type is int16s - MN::AcCurrentOverload::TypeInfo::Type value; - UN::AcCurrentOverload::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::AcActivePowerOverload::Id: { // type is int16s - MN::AcActivePowerOverload::TypeInfo::Type value; - UN::AcActivePowerOverload::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::AcReactivePowerOverload::Id: { // type is int16s - MN::AcReactivePowerOverload::TypeInfo::Type value; - UN::AcReactivePowerOverload::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::AverageRmsOverVoltage::Id: { // type is int16s - MN::AverageRmsOverVoltage::TypeInfo::Type value; - UN::AverageRmsOverVoltage::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::AverageRmsUnderVoltage::Id: { // type is int16s - MN::AverageRmsUnderVoltage::TypeInfo::Type value; - UN::AverageRmsUnderVoltage::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::RmsExtremeOverVoltage::Id: { // type is int16s - MN::RmsExtremeOverVoltage::TypeInfo::Type value; - UN::RmsExtremeOverVoltage::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::RmsExtremeUnderVoltage::Id: { // type is int16s - MN::RmsExtremeUnderVoltage::TypeInfo::Type value; - UN::RmsExtremeUnderVoltage::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::RmsVoltageSag::Id: { // type is int16s - MN::RmsVoltageSag::TypeInfo::Type value; - UN::RmsVoltageSag::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::RmsVoltageSwell::Id: { // type is int16s - MN::RmsVoltageSwell::TypeInfo::Type value; - UN::RmsVoltageSwell::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::LineCurrentPhaseB::Id: { // type is int16u - MN::LineCurrentPhaseB::TypeInfo::Type value; - UN::LineCurrentPhaseB::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::ActiveCurrentPhaseB::Id: { // type is int16s - MN::ActiveCurrentPhaseB::TypeInfo::Type value; - UN::ActiveCurrentPhaseB::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::ReactiveCurrentPhaseB::Id: { // type is int16s - MN::ReactiveCurrentPhaseB::TypeInfo::Type value; - UN::ReactiveCurrentPhaseB::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::RmsVoltagePhaseB::Id: { // type is int16u - MN::RmsVoltagePhaseB::TypeInfo::Type value; - UN::RmsVoltagePhaseB::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::RmsVoltageMinPhaseB::Id: { // type is int16u - MN::RmsVoltageMinPhaseB::TypeInfo::Type value; - UN::RmsVoltageMinPhaseB::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::RmsVoltageMaxPhaseB::Id: { // type is int16u - MN::RmsVoltageMaxPhaseB::TypeInfo::Type value; - UN::RmsVoltageMaxPhaseB::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::RmsCurrentPhaseB::Id: { // type is int16u - MN::RmsCurrentPhaseB::TypeInfo::Type value; - UN::RmsCurrentPhaseB::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::RmsCurrentMinPhaseB::Id: { // type is int16u - MN::RmsCurrentMinPhaseB::TypeInfo::Type value; - UN::RmsCurrentMinPhaseB::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::RmsCurrentMaxPhaseB::Id: { // type is int16u - MN::RmsCurrentMaxPhaseB::TypeInfo::Type value; - UN::RmsCurrentMaxPhaseB::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::ActivePowerPhaseB::Id: { // type is int16s - MN::ActivePowerPhaseB::TypeInfo::Type value; - UN::ActivePowerPhaseB::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::ActivePowerMinPhaseB::Id: { // type is int16s - MN::ActivePowerMinPhaseB::TypeInfo::Type value; - UN::ActivePowerMinPhaseB::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::ActivePowerMaxPhaseB::Id: { // type is int16s - MN::ActivePowerMaxPhaseB::TypeInfo::Type value; - UN::ActivePowerMaxPhaseB::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::ReactivePowerPhaseB::Id: { // type is int16s - MN::ReactivePowerPhaseB::TypeInfo::Type value; - UN::ReactivePowerPhaseB::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::ApparentPowerPhaseB::Id: { // type is int16u - MN::ApparentPowerPhaseB::TypeInfo::Type value; - UN::ApparentPowerPhaseB::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::PowerFactorPhaseB::Id: { // type is int8s - MN::PowerFactorPhaseB::TypeInfo::Type value; - UN::PowerFactorPhaseB::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::AverageRmsVoltageMeasurementPeriodPhaseB::Id: { // type is int16u - MN::AverageRmsVoltageMeasurementPeriodPhaseB::TypeInfo::Type value; - UN::AverageRmsVoltageMeasurementPeriodPhaseB::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::AverageRmsOverVoltageCounterPhaseB::Id: { // type is int16u - MN::AverageRmsOverVoltageCounterPhaseB::TypeInfo::Type value; - UN::AverageRmsOverVoltageCounterPhaseB::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::AverageRmsUnderVoltageCounterPhaseB::Id: { // type is int16u - MN::AverageRmsUnderVoltageCounterPhaseB::TypeInfo::Type value; - UN::AverageRmsUnderVoltageCounterPhaseB::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::RmsExtremeOverVoltagePeriodPhaseB::Id: { // type is int16u - MN::RmsExtremeOverVoltagePeriodPhaseB::TypeInfo::Type value; - UN::RmsExtremeOverVoltagePeriodPhaseB::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::RmsExtremeUnderVoltagePeriodPhaseB::Id: { // type is int16u - MN::RmsExtremeUnderVoltagePeriodPhaseB::TypeInfo::Type value; - UN::RmsExtremeUnderVoltagePeriodPhaseB::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::RmsVoltageSagPeriodPhaseB::Id: { // type is int16u - MN::RmsVoltageSagPeriodPhaseB::TypeInfo::Type value; - UN::RmsVoltageSagPeriodPhaseB::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::RmsVoltageSwellPeriodPhaseB::Id: { // type is int16u - MN::RmsVoltageSwellPeriodPhaseB::TypeInfo::Type value; - UN::RmsVoltageSwellPeriodPhaseB::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::LineCurrentPhaseC::Id: { // type is int16u - MN::LineCurrentPhaseC::TypeInfo::Type value; - UN::LineCurrentPhaseC::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::ActiveCurrentPhaseC::Id: { // type is int16s - MN::ActiveCurrentPhaseC::TypeInfo::Type value; - UN::ActiveCurrentPhaseC::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::ReactiveCurrentPhaseC::Id: { // type is int16s - MN::ReactiveCurrentPhaseC::TypeInfo::Type value; - UN::ReactiveCurrentPhaseC::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::RmsVoltagePhaseC::Id: { // type is int16u - MN::RmsVoltagePhaseC::TypeInfo::Type value; - UN::RmsVoltagePhaseC::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::RmsVoltageMinPhaseC::Id: { // type is int16u - MN::RmsVoltageMinPhaseC::TypeInfo::Type value; - UN::RmsVoltageMinPhaseC::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::RmsVoltageMaxPhaseC::Id: { // type is int16u - MN::RmsVoltageMaxPhaseC::TypeInfo::Type value; - UN::RmsVoltageMaxPhaseC::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::RmsCurrentPhaseC::Id: { // type is int16u - MN::RmsCurrentPhaseC::TypeInfo::Type value; - UN::RmsCurrentPhaseC::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::RmsCurrentMinPhaseC::Id: { // type is int16u - MN::RmsCurrentMinPhaseC::TypeInfo::Type value; - UN::RmsCurrentMinPhaseC::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::RmsCurrentMaxPhaseC::Id: { // type is int16u - MN::RmsCurrentMaxPhaseC::TypeInfo::Type value; - UN::RmsCurrentMaxPhaseC::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::ActivePowerPhaseC::Id: { // type is int16s - MN::ActivePowerPhaseC::TypeInfo::Type value; - UN::ActivePowerPhaseC::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::ActivePowerMinPhaseC::Id: { // type is int16s - MN::ActivePowerMinPhaseC::TypeInfo::Type value; - UN::ActivePowerMinPhaseC::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::ActivePowerMaxPhaseC::Id: { // type is int16s - MN::ActivePowerMaxPhaseC::TypeInfo::Type value; - UN::ActivePowerMaxPhaseC::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::ReactivePowerPhaseC::Id: { // type is int16s - MN::ReactivePowerPhaseC::TypeInfo::Type value; - UN::ReactivePowerPhaseC::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::ApparentPowerPhaseC::Id: { // type is int16u - MN::ApparentPowerPhaseC::TypeInfo::Type value; - UN::ApparentPowerPhaseC::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::PowerFactorPhaseC::Id: { // type is int8s - MN::PowerFactorPhaseC::TypeInfo::Type value; - UN::PowerFactorPhaseC::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::AverageRmsVoltageMeasurementPeriodPhaseC::Id: { // type is int16u - MN::AverageRmsVoltageMeasurementPeriodPhaseC::TypeInfo::Type value; - UN::AverageRmsVoltageMeasurementPeriodPhaseC::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::AverageRmsOverVoltageCounterPhaseC::Id: { // type is int16u - MN::AverageRmsOverVoltageCounterPhaseC::TypeInfo::Type value; - UN::AverageRmsOverVoltageCounterPhaseC::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::AverageRmsUnderVoltageCounterPhaseC::Id: { // type is int16u - MN::AverageRmsUnderVoltageCounterPhaseC::TypeInfo::Type value; - UN::AverageRmsUnderVoltageCounterPhaseC::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::RmsExtremeOverVoltagePeriodPhaseC::Id: { // type is int16u - MN::RmsExtremeOverVoltagePeriodPhaseC::TypeInfo::Type value; - UN::RmsExtremeOverVoltagePeriodPhaseC::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::RmsExtremeUnderVoltagePeriodPhaseC::Id: { // type is int16u - MN::RmsExtremeUnderVoltagePeriodPhaseC::TypeInfo::Type value; - UN::RmsExtremeUnderVoltagePeriodPhaseC::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::RmsVoltageSagPeriodPhaseC::Id: { // type is int16u - MN::RmsVoltageSagPeriodPhaseC::TypeInfo::Type value; - UN::RmsVoltageSagPeriodPhaseC::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::RmsVoltageSwellPeriodPhaseC::Id: { // type is int16u - MN::RmsVoltageSwellPeriodPhaseC::TypeInfo::Type value; - UN::RmsVoltageSwellPeriodPhaseC::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::FeatureMap::Id: { // type is bitmap32 - MN::FeatureMap::TypeInfo::Type value; - UN::FeatureMap::Get(atr_path, value); - return aEncoder.Encode(value); - } - case MN::ClusterRevision::Id: { // type is int16u - MN::ClusterRevision::TypeInfo::Type value; - UN::ClusterRevision::Get(atr_path, value); - return aEncoder.Encode(value); - } - } - } catch (const std::out_of_range& e) { - sl_log_info(LOG_TAG, - "The request attribute Path for endpoint [%i] is not found in the attribute state " - "container: %s\n", - atr_path.mEndpointId, e.what()); - return CHIP_ERROR_NO_MESSAGE_HANDLER; + case MN::MinScaledValue::Id: { + using T = MN::MinScaledValue::TypeInfo::Type; + std::optional value = from_json(unify_value); + + if( value.has_value()) { + sl_log_debug(LOG_TAG,"MinScaledValue attribute value is %s",unify_value.dump().c_str()); + UN::MinScaledValue::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback( + node_matter_endpoint, + Clusters::PressureMeasurement::Id, + MN::MinScaledValue::Id); + } + break; + } + // type is int16s + case MN::MaxScaledValue::Id: { + using T = MN::MaxScaledValue::TypeInfo::Type; + std::optional value = from_json(unify_value); + + if( value.has_value()) { + sl_log_debug(LOG_TAG,"MaxScaledValue attribute value is %s",unify_value.dump().c_str()); + UN::MaxScaledValue::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback( + node_matter_endpoint, + Clusters::PressureMeasurement::Id, + MN::MaxScaledValue::Id); + } + break; } + // type is int16u + case MN::ScaledTolerance::Id: { + using T = MN::ScaledTolerance::TypeInfo::Type; + std::optional value = from_json(unify_value); + + if( value.has_value()) { + sl_log_debug(LOG_TAG,"ScaledTolerance attribute value is %s",unify_value.dump().c_str()); + UN::ScaledTolerance::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback( + node_matter_endpoint, + Clusters::PressureMeasurement::Id, + MN::ScaledTolerance::Id); + } + break; + } + // type is int8s + case MN::Scale::Id: { + using T = MN::Scale::TypeInfo::Type; + std::optional value = from_json(unify_value); + + if( value.has_value()) { + sl_log_debug(LOG_TAG,"Scale attribute value is %s",unify_value.dump().c_str()); + UN::Scale::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback( + node_matter_endpoint, + Clusters::PressureMeasurement::Id, + MN::Scale::Id); + } + break; + } + } +} + +CHIP_ERROR +RelativeHumidityMeasurementAttributeAccess::Read(const ConcreteReadAttributePath &aPath, + AttributeValueEncoder &aEncoder) +{ + namespace MN = chip::app::Clusters::RelativeHumidityMeasurement::Attributes; + namespace UN = unify::matter_bridge::RelativeHumidityMeasurement::Attributes; + if (aPath.mClusterId != Clusters::RelativeHumidityMeasurement::Id) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + // Do not handle Read for non-unify endpoints + auto unify_node = m_node_state_monitor.bridged_endpoint(aPath.mEndpointId); + + if (!unify_node) { + return CHIP_NO_ERROR; + } + + + ConcreteAttributePath atr_path = ConcreteAttributePath(aPath.mEndpointId, + aPath.mClusterId, + aPath.mAttributeId); + + + if( m_node_state_monitor.emulator().is_attribute_emulated(aPath) ) { + return m_node_state_monitor.emulator().read_attribute(aPath,aEncoder); + } + + try { + switch (aPath.mAttributeId) { + case MN::MeasuredValue::Id: { // type is int16u + MN::MeasuredValue::TypeInfo::Type value; + UN::MeasuredValue::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::MinMeasuredValue::Id: { // type is int16u + MN::MinMeasuredValue::TypeInfo::Type value; + UN::MinMeasuredValue::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::MaxMeasuredValue::Id: { // type is int16u + MN::MaxMeasuredValue::TypeInfo::Type value; + UN::MaxMeasuredValue::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::Tolerance::Id: { // type is int16u + MN::Tolerance::TypeInfo::Type value; + UN::Tolerance::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::FeatureMap::Id: { // type is bitmap32 + MN::FeatureMap::TypeInfo::Type value; + UN::FeatureMap::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::ClusterRevision::Id: { // type is int16u + MN::ClusterRevision::TypeInfo::Type value; + UN::ClusterRevision::Get(atr_path, value); + return aEncoder.Encode(value); + } + } + } catch (const std::out_of_range &e) { + sl_log_info( + LOG_TAG, + "The request attribute Path for endpoint [%i] is not found in the attribute state " + "container: %s\n", atr_path.mEndpointId, e.what()); + return CHIP_ERROR_NO_MESSAGE_HANDLER; + } + return CHIP_NO_ERROR; +} + +CHIP_ERROR RelativeHumidityMeasurementAttributeAccess::Write(const ConcreteDataAttributePath &aPath, + AttributeValueDecoder &aDecoder) +{ + using namespace chip::app::Clusters::RelativeHumidityMeasurement; + + if (aPath.mClusterId != Clusters::RelativeHumidityMeasurement::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; + + if( m_node_state_monitor.emulator().is_attribute_emulated(aPath) ) { + return m_node_state_monitor.emulator().write_attribute(aPath,aDecoder); + } + + switch (aPath.mAttributeId) { + // measured value is not supported by UCL + // min measured value is not supported by UCL + // max measured value is not supported by UCL + // tolerance is not supported by UCL + // GeneratedCommandList is not supported by UCL + // AcceptedCommandList is not supported by UCL + // AttributeList is not supported by UCL + // FeatureMap is not supported by UCL + // ClusterRevision is not supported by UCL + } + + 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) + + "/RelativityHumidity/Attributes/" + attribute_name + "/Desired"; + payload_str = jsn.dump(); + m_unify_mqtt.Publish(topic, + payload_str, + true); return CHIP_NO_ERROR; + } + + return CHIP_ERROR_NO_MESSAGE_HANDLER; } -CHIP_ERROR ElectricalMeasurementAttributeAccess::Write(const ConcreteDataAttributePath& aPath, AttributeValueDecoder& aDecoder) +void RelativeHumidityMeasurementAttributeAccess::reported_updated(const bridged_endpoint *ep, + const std::string &cluster, + const std::string &attribute, + const nlohmann::json &unify_value) { - using namespace chip::app::Clusters::ElectricalMeasurement; + namespace MN = chip::app::Clusters::RelativeHumidityMeasurement::Attributes; + namespace UN = unify::matter_bridge::RelativeHumidityMeasurement::Attributes; - if (aPath.mClusterId != Clusters::ElectricalMeasurement::Id) { - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto unify_node = m_node_state_monitor.bridged_endpoint(aPath.mEndpointId); + auto cluster_id = device_translator::instance().get_cluster_id(cluster); - if (!unify_node) { - return CHIP_ERROR_NO_MESSAGE_HANDLER; - } + if (!cluster_id.has_value() || (cluster_id.value() != Clusters::RelativeHumidityMeasurement::Id)) { + return; + } + + // get attribute id + auto attribute_id + = device_translator::instance().get_attribute_id(cluster, attribute); - std::string attribute_name; - nlohmann::json jsn; + if (!attribute_id.has_value()) { + return; + } - if (m_node_state_monitor.emulator().is_attribute_emulated(aPath)) { - return m_node_state_monitor.emulator().write_attribute(aPath, aDecoder); + 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 + case MN::MeasuredValue::Id: { + using T = MN::MeasuredValue::TypeInfo::Type; + std::optional value = from_json(unify_value); + + if( value.has_value()) { + sl_log_debug(LOG_TAG,"MeasuredValue attribute value is %s",unify_value.dump().c_str()); + UN::MeasuredValue::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback( + node_matter_endpoint, + Clusters::RelativeHumidityMeasurement::Id, + MN::MeasuredValue::Id); + } + break; + } + // type is int16u + case MN::MinMeasuredValue::Id: { + using T = MN::MinMeasuredValue::TypeInfo::Type; + std::optional value = from_json(unify_value); + + if( value.has_value()) { + sl_log_debug(LOG_TAG,"MinMeasuredValue attribute value is %s",unify_value.dump().c_str()); + UN::MinMeasuredValue::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback( + node_matter_endpoint, + Clusters::RelativeHumidityMeasurement::Id, + MN::MinMeasuredValue::Id); + } + break; + } + // type is int16u + case MN::MaxMeasuredValue::Id: { + using T = MN::MaxMeasuredValue::TypeInfo::Type; + std::optional value = from_json(unify_value); + + if( value.has_value()) { + sl_log_debug(LOG_TAG,"MaxMeasuredValue attribute value is %s",unify_value.dump().c_str()); + UN::MaxMeasuredValue::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback( + node_matter_endpoint, + Clusters::RelativeHumidityMeasurement::Id, + MN::MaxMeasuredValue::Id); + } + break; } + // type is int16u + case MN::Tolerance::Id: { + using T = MN::Tolerance::TypeInfo::Type; + std::optional value = from_json(unify_value); + + if( value.has_value()) { + sl_log_debug(LOG_TAG,"Tolerance attribute value is %s",unify_value.dump().c_str()); + UN::Tolerance::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback( + node_matter_endpoint, + Clusters::RelativeHumidityMeasurement::Id, + MN::Tolerance::Id); + } + break; + } + } +} + +CHIP_ERROR +OccupancySensingAttributeAccess::Read(const ConcreteReadAttributePath &aPath, + AttributeValueEncoder &aEncoder) +{ + namespace MN = chip::app::Clusters::OccupancySensing::Attributes; + namespace UN = unify::matter_bridge::OccupancySensing::Attributes; + if (aPath.mClusterId != Clusters::OccupancySensing::Id) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + // Do not handle Read for non-unify endpoints + auto unify_node = m_node_state_monitor.bridged_endpoint(aPath.mEndpointId); + + if (!unify_node) { + return CHIP_NO_ERROR; + } + + ConcreteAttributePath atr_path = ConcreteAttributePath(aPath.mEndpointId, + aPath.mClusterId, + aPath.mAttributeId); + + + if( m_node_state_monitor.emulator().is_attribute_emulated(aPath) ) { + return m_node_state_monitor.emulator().read_attribute(aPath,aEncoder); + } + + try { switch (aPath.mAttributeId) { - // measurement type is not supported by UCL - // dc voltage is not supported by UCL - // dc voltage min is not supported by UCL - // dc voltage max is not supported by UCL - // dc current is not supported by UCL - // dc current min is not supported by UCL - // dc current max is not supported by UCL - // dc power is not supported by UCL - // dc power min is not supported by UCL - // dc power max is not supported by UCL - // dc voltage multiplier is not supported by UCL - // dc voltage divisor is not supported by UCL - // dc current multiplier is not supported by UCL - // dc current divisor is not supported by UCL - // dc power multiplier is not supported by UCL - // dc power divisor is not supported by UCL - // ac frequency is not supported by UCL - // ac frequency min is not supported by UCL - // ac frequency max is not supported by UCL - // neutral current is not supported by UCL - // total active power is not supported by UCL - // total reactive power is not supported by UCL - // total apparent power is not supported by UCL - // measured 1st harmonic current is not supported by UCL - // measured 3rd harmonic current is not supported by UCL - // measured 5th harmonic current is not supported by UCL - // measured 7th harmonic current is not supported by UCL - // measured 9th harmonic current is not supported by UCL - // measured 11th harmonic current is not supported by UCL - // measured phase 1st harmonic current is not supported by UCL - // measured phase 3rd harmonic current is not supported by UCL - // measured phase 5th harmonic current is not supported by UCL - // measured phase 7th harmonic current is not supported by UCL - // measured phase 9th harmonic current is not supported by UCL - // measured phase 11th harmonic current is not supported by UCL - // ac frequency multiplier is not supported by UCL - // ac frequency divisor is not supported by UCL - // power multiplier is not supported by UCL - // power divisor is not supported by UCL - // harmonic current multiplier is not supported by UCL - // phase harmonic current multiplier is not supported by UCL - // instantaneous voltage is not supported by UCL - // instantaneous line current is not supported by UCL - // instantaneous active current is not supported by UCL - // instantaneous reactive current is not supported by UCL - // instantaneous power is not supported by UCL - // rms voltage is not supported by UCL - // rms voltage min is not supported by UCL - // rms voltage max is not supported by UCL - // rms current is not supported by UCL - // rms current min is not supported by UCL - // rms current max is not supported by UCL - // active power is not supported by UCL - // active power min is not supported by UCL - // active power max is not supported by UCL - // reactive power is not supported by UCL - // apparent power is not supported by UCL - // power factor is not supported by UCL - case Attributes::AverageRmsVoltageMeasurementPeriod::Id: { - - Attributes::AverageRmsVoltageMeasurementPeriod::TypeInfo::DecodableType value; - aDecoder.Decode(value); - jsn["value"] = to_json(value); - attribute_name = "AverageRMSVoltageMeasurementPeriod"; - break; - } - case Attributes::AverageRmsUnderVoltageCounter::Id: { - - Attributes::AverageRmsUnderVoltageCounter::TypeInfo::DecodableType value; - aDecoder.Decode(value); - jsn["value"] = to_json(value); - attribute_name = "AverageRMSUnderVoltageCounter"; - break; - } - case Attributes::RmsExtremeOverVoltagePeriod::Id: { - - Attributes::RmsExtremeOverVoltagePeriod::TypeInfo::DecodableType value; - aDecoder.Decode(value); - jsn["value"] = to_json(value); - attribute_name = "RMSExtremeOverVoltagePeriod"; - break; - } - case Attributes::RmsExtremeUnderVoltagePeriod::Id: { - - Attributes::RmsExtremeUnderVoltagePeriod::TypeInfo::DecodableType value; - aDecoder.Decode(value); - jsn["value"] = to_json(value); - attribute_name = "RMSExtremeUnderVoltagePeriod"; - break; - } - case Attributes::RmsVoltageSagPeriod::Id: { - - Attributes::RmsVoltageSagPeriod::TypeInfo::DecodableType value; - aDecoder.Decode(value); - jsn["value"] = to_json(value); - attribute_name = "RMSVoltageSagPeriod"; - break; - } - case Attributes::RmsVoltageSwellPeriod::Id: { - - Attributes::RmsVoltageSwellPeriod::TypeInfo::DecodableType value; - aDecoder.Decode(value); - jsn["value"] = to_json(value); - attribute_name = "RMSVoltageSwellPeriod"; - break; - } - // ac voltage multiplier is not supported by UCL - // ac voltage divisor is not supported by UCL - // ac current multiplier is not supported by UCL - // ac current divisor is not supported by UCL - // ac power multiplier is not supported by UCL - // ac power divisor is not supported by UCL - case Attributes::OverloadAlarmsMask::Id: { - - Attributes::OverloadAlarmsMask::TypeInfo::DecodableType value; - aDecoder.Decode(value); - jsn["value"] = to_json(value); - attribute_name = "DCOverloadAlarmsMask"; - break; - } - // voltage overload is not supported by UCL - // current overload is not supported by UCL - case Attributes::AcOverloadAlarmsMask::Id: { - - Attributes::AcOverloadAlarmsMask::TypeInfo::DecodableType value; - aDecoder.Decode(value); - jsn["value"] = to_json(value); - attribute_name = "ACAlarmsMask"; - break; - } - // ac voltage overload is not supported by UCL - // ac current overload is not supported by UCL - // ac active power overload is not supported by UCL - // ac reactive power overload is not supported by UCL - // average rms over voltage is not supported by UCL - // average rms under voltage is not supported by UCL - // rms extreme over voltage is not supported by UCL - // rms extreme under voltage is not supported by UCL - // rms voltage sag is not supported by UCL - // rms voltage swell is not supported by UCL - // line current phase b is not supported by UCL - // active current phase b is not supported by UCL - // reactive current phase b is not supported by UCL - // rms voltage phase b is not supported by UCL - // rms voltage min phase b is not supported by UCL - // rms voltage max phase b is not supported by UCL - // rms current phase b is not supported by UCL - // rms current min phase b is not supported by UCL - // rms current max phase b is not supported by UCL - // active power phase b is not supported by UCL - // active power min phase b is not supported by UCL - // active power max phase b is not supported by UCL - // reactive power phase b is not supported by UCL - // apparent power phase b is not supported by UCL - // power factor phase b is not supported by UCL - // average rms voltage measurement period phase b is not supported by UCL - // average rms over voltage counter phase b is not supported by UCL - // average rms under voltage counter phase b is not supported by UCL - // rms extreme over voltage period phase b is not supported by UCL - // rms extreme under voltage period phase b is not supported by UCL - // rms voltage sag period phase b is not supported by UCL - // rms voltage swell period phase b is not supported by UCL - // line current phase c is not supported by UCL - // active current phase c is not supported by UCL - // reactive current phase c is not supported by UCL - // rms voltage phase c is not supported by UCL - // rms voltage min phase c is not supported by UCL - // rms voltage max phase c is not supported by UCL - // rms current phase c is not supported by UCL - // rms current min phase c is not supported by UCL - // rms current max phase c is not supported by UCL - // active power phase c is not supported by UCL - // active power min phase c is not supported by UCL - // active power max phase c is not supported by UCL - // reactive power phase c is not supported by UCL - // apparent power phase c is not supported by UCL - // power factor phase c is not supported by UCL - // average rms voltage measurement period phase c is not supported by UCL - // average rms over voltage counter phase c is not supported by UCL - // average rms under voltage counter phase c is not supported by UCL - // rms extreme over voltage period phase c is not supported by UCL - // rms extreme under voltage period phase c is not supported by UCL - // rms voltage sag period phase c is not supported by UCL - // rms voltage swell period phase c is not supported by UCL - // GeneratedCommandList is not supported by UCL - // AcceptedCommandList is not supported by UCL - // AttributeList is not supported by UCL - // FeatureMap is not supported by UCL - // ClusterRevision is not supported by UCL - } - - 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) + "/ElectricalMeasurement/Attributes/" + attribute_name + "/Desired"; - payload_str = jsn.dump(); - m_unify_mqtt.Publish(topic, payload_str, true); - return CHIP_NO_ERROR; - } + case MN::Occupancy::Id: { // type is bitmap8 + MN::Occupancy::TypeInfo::Type value; + UN::Occupancy::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::OccupancySensorType::Id: { // type is enum8 + MN::OccupancySensorType::TypeInfo::Type value; + UN::OccupancySensorType::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::OccupancySensorTypeBitmap::Id: { // type is bitmap8 + MN::OccupancySensorTypeBitmap::TypeInfo::Type value; + UN::OccupancySensorTypeBitmap::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::PirOccupiedToUnoccupiedDelay::Id: { // type is int16u + MN::PirOccupiedToUnoccupiedDelay::TypeInfo::Type value; + UN::PirOccupiedToUnoccupiedDelay::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::PirUnoccupiedToOccupiedDelay::Id: { // type is int16u + MN::PirUnoccupiedToOccupiedDelay::TypeInfo::Type value; + UN::PirUnoccupiedToOccupiedDelay::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::PirUnoccupiedToOccupiedThreshold::Id: { // type is int8u + MN::PirUnoccupiedToOccupiedThreshold::TypeInfo::Type value; + UN::PirUnoccupiedToOccupiedThreshold::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::UltrasonicOccupiedToUnoccupiedDelay::Id: { // type is int16u + MN::UltrasonicOccupiedToUnoccupiedDelay::TypeInfo::Type value; + UN::UltrasonicOccupiedToUnoccupiedDelay::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::UltrasonicUnoccupiedToOccupiedDelay::Id: { // type is int16u + MN::UltrasonicUnoccupiedToOccupiedDelay::TypeInfo::Type value; + UN::UltrasonicUnoccupiedToOccupiedDelay::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::UltrasonicUnoccupiedToOccupiedThreshold::Id: { // type is int8u + MN::UltrasonicUnoccupiedToOccupiedThreshold::TypeInfo::Type value; + UN::UltrasonicUnoccupiedToOccupiedThreshold::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::PhysicalContactOccupiedToUnoccupiedDelay::Id: { // type is int16u + MN::PhysicalContactOccupiedToUnoccupiedDelay::TypeInfo::Type value; + UN::PhysicalContactOccupiedToUnoccupiedDelay::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::PhysicalContactUnoccupiedToOccupiedDelay::Id: { // type is int16u + MN::PhysicalContactUnoccupiedToOccupiedDelay::TypeInfo::Type value; + UN::PhysicalContactUnoccupiedToOccupiedDelay::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::PhysicalContactUnoccupiedToOccupiedThreshold::Id: { // type is int8u + MN::PhysicalContactUnoccupiedToOccupiedThreshold::TypeInfo::Type value; + UN::PhysicalContactUnoccupiedToOccupiedThreshold::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::FeatureMap::Id: { // type is bitmap32 + MN::FeatureMap::TypeInfo::Type value; + UN::FeatureMap::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::ClusterRevision::Id: { // type is int16u + MN::ClusterRevision::TypeInfo::Type value; + UN::ClusterRevision::Get(atr_path, value); + return aEncoder.Encode(value); + } + } + } catch (const std::out_of_range &e) { + sl_log_info( + LOG_TAG, + "The request attribute Path for endpoint [%i] is not found in the attribute state " + "container: %s\n", atr_path.mEndpointId, e.what()); + return CHIP_ERROR_NO_MESSAGE_HANDLER; + } + return CHIP_NO_ERROR; +} + +CHIP_ERROR OccupancySensingAttributeAccess::Write(const ConcreteDataAttributePath &aPath, + AttributeValueDecoder &aDecoder) +{ + using namespace chip::app::Clusters::OccupancySensing; + + if (aPath.mClusterId != Clusters::OccupancySensing::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; + + if( m_node_state_monitor.emulator().is_attribute_emulated(aPath) ) { + return m_node_state_monitor.emulator().write_attribute(aPath,aDecoder); + } + + switch (aPath.mAttributeId) { + // occupancy is not supported by UCL + // occupancy sensor type is not supported by UCL + // occupancy sensor type bitmap is not supported by UCL + case Attributes::PirOccupiedToUnoccupiedDelay::Id: { + + Attributes::PirOccupiedToUnoccupiedDelay::TypeInfo::DecodableType value; + aDecoder.Decode(value); + jsn["value"] = to_json(value); + attribute_name = "PIROccupiedToUnoccupiedDelay"; + break; + } + case Attributes::PirUnoccupiedToOccupiedDelay::Id: { + + Attributes::PirUnoccupiedToOccupiedDelay::TypeInfo::DecodableType value; + aDecoder.Decode(value); + jsn["value"] = to_json(value); + attribute_name = "PIRUnoccupiedToOccupiedDelay"; + break; + } + case Attributes::PirUnoccupiedToOccupiedThreshold::Id: { + + Attributes::PirUnoccupiedToOccupiedThreshold::TypeInfo::DecodableType value; + aDecoder.Decode(value); + jsn["value"] = to_json(value); + attribute_name = "PIRUnoccupiedToOccupiedThreshold"; + break; + } + case Attributes::UltrasonicOccupiedToUnoccupiedDelay::Id: { + + Attributes::UltrasonicOccupiedToUnoccupiedDelay::TypeInfo::DecodableType value; + aDecoder.Decode(value); + jsn["value"] = to_json(value); + attribute_name = "UltrasonicOccupiedToUnoccupiedDelay"; + break; + } + case Attributes::UltrasonicUnoccupiedToOccupiedDelay::Id: { + + Attributes::UltrasonicUnoccupiedToOccupiedDelay::TypeInfo::DecodableType value; + aDecoder.Decode(value); + jsn["value"] = to_json(value); + attribute_name = "UltrasonicUnoccupiedToOccupiedDelay"; + break; + } + case Attributes::UltrasonicUnoccupiedToOccupiedThreshold::Id: { + + Attributes::UltrasonicUnoccupiedToOccupiedThreshold::TypeInfo::DecodableType value; + aDecoder.Decode(value); + jsn["value"] = to_json(value); + attribute_name = "UltrasonicUnoccupiedToOccupiedThreshold"; + break; + } + case Attributes::PhysicalContactOccupiedToUnoccupiedDelay::Id: { + + Attributes::PhysicalContactOccupiedToUnoccupiedDelay::TypeInfo::DecodableType value; + aDecoder.Decode(value); + jsn["value"] = to_json(value); + attribute_name = "PhysicalContactOccupiedToUnoccupiedDelay"; + break; + } + case Attributes::PhysicalContactUnoccupiedToOccupiedDelay::Id: { + + Attributes::PhysicalContactUnoccupiedToOccupiedDelay::TypeInfo::DecodableType value; + aDecoder.Decode(value); + jsn["value"] = to_json(value); + attribute_name = "PhysicalContactUnoccupiedToOccupiedDelay"; + break; + } + case Attributes::PhysicalContactUnoccupiedToOccupiedThreshold::Id: { + + Attributes::PhysicalContactUnoccupiedToOccupiedThreshold::TypeInfo::DecodableType value; + aDecoder.Decode(value); + jsn["value"] = to_json(value); + attribute_name = "PhysicalContactUnoccupiedToOccupiedThreshold"; + break; + } + // GeneratedCommandList is not supported by UCL + // AcceptedCommandList is not supported by UCL + // AttributeList is not supported by UCL + // FeatureMap is not supported by UCL + // ClusterRevision is not supported by UCL + } + + 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) + + "/OccupancySensing/Attributes/" + attribute_name + "/Desired"; + payload_str = jsn.dump(); + m_unify_mqtt.Publish(topic, + payload_str, + true); + return CHIP_NO_ERROR; + } + + return CHIP_ERROR_NO_MESSAGE_HANDLER; } -void ElectricalMeasurementAttributeAccess::reported_updated(const bridged_endpoint* ep, const std::string& cluster, - const std::string& attribute, const nlohmann::json& unify_value) +void OccupancySensingAttributeAccess::reported_updated(const bridged_endpoint *ep, + const std::string &cluster, + const std::string &attribute, + const nlohmann::json &unify_value) { - namespace MN = chip::app::Clusters::ElectricalMeasurement::Attributes; - namespace UN = unify::matter_bridge::ElectricalMeasurement::Attributes; + namespace MN = chip::app::Clusters::OccupancySensing::Attributes; + namespace UN = unify::matter_bridge::OccupancySensing::Attributes; - auto cluster_id = device_translator::instance().get_cluster_id(cluster); + auto cluster_id = device_translator::instance().get_cluster_id(cluster); - if (!cluster_id.has_value() || (cluster_id.value() != Clusters::ElectricalMeasurement::Id)) { - return; - } + if (!cluster_id.has_value() || (cluster_id.value() != Clusters::OccupancySensing::Id)) { + return; + } + + // get attribute id + auto attribute_id + = device_translator::instance().get_attribute_id(cluster, attribute); - // get attribute id - auto attribute_id = device_translator::instance().get_attribute_id(cluster, attribute); + if (!attribute_id.has_value()) { + return; + } - if (!attribute_id.has_value()) { - return; + 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); + + if( value.has_value()) { + sl_log_debug(LOG_TAG,"Occupancy attribute value is %s",unify_value.dump().c_str()); + UN::Occupancy::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback( + node_matter_endpoint, + Clusters::OccupancySensing::Id, + MN::Occupancy::Id); + } + break; + } + // type is enum8 + case MN::OccupancySensorType::Id: { + using T = MN::OccupancySensorType::TypeInfo::Type; + std::optional value = from_json(unify_value); + + if( value.has_value()) { + sl_log_debug(LOG_TAG,"OccupancySensorType attribute value is %s",unify_value.dump().c_str()); + UN::OccupancySensorType::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback( + node_matter_endpoint, + Clusters::OccupancySensing::Id, + MN::OccupancySensorType::Id); + } + break; + } + // type is bitmap8 + case MN::OccupancySensorTypeBitmap::Id: { + using T = MN::OccupancySensorTypeBitmap::TypeInfo::Type; + std::optional value = from_json(unify_value); + + if( value.has_value()) { + sl_log_debug(LOG_TAG,"OccupancySensorTypeBitmap attribute value is %s",unify_value.dump().c_str()); + UN::OccupancySensorTypeBitmap::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback( + node_matter_endpoint, + Clusters::OccupancySensing::Id, + MN::OccupancySensorTypeBitmap::Id); + } + break; + } + // type is int16u + case MN::PirOccupiedToUnoccupiedDelay::Id: { + using T = MN::PirOccupiedToUnoccupiedDelay::TypeInfo::Type; + std::optional value = from_json(unify_value); + + if( value.has_value()) { + sl_log_debug(LOG_TAG,"PirOccupiedToUnoccupiedDelay attribute value is %s",unify_value.dump().c_str()); + UN::PirOccupiedToUnoccupiedDelay::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback( + node_matter_endpoint, + Clusters::OccupancySensing::Id, + MN::PirOccupiedToUnoccupiedDelay::Id); + } + break; + } + // type is int16u + case MN::PirUnoccupiedToOccupiedDelay::Id: { + using T = MN::PirUnoccupiedToOccupiedDelay::TypeInfo::Type; + std::optional value = from_json(unify_value); + + if( value.has_value()) { + sl_log_debug(LOG_TAG,"PirUnoccupiedToOccupiedDelay attribute value is %s",unify_value.dump().c_str()); + UN::PirUnoccupiedToOccupiedDelay::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback( + node_matter_endpoint, + Clusters::OccupancySensing::Id, + MN::PirUnoccupiedToOccupiedDelay::Id); + } + break; + } + // type is int8u + case MN::PirUnoccupiedToOccupiedThreshold::Id: { + using T = MN::PirUnoccupiedToOccupiedThreshold::TypeInfo::Type; + std::optional value = from_json(unify_value); + + if( value.has_value()) { + sl_log_debug(LOG_TAG,"PirUnoccupiedToOccupiedThreshold attribute value is %s",unify_value.dump().c_str()); + UN::PirUnoccupiedToOccupiedThreshold::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback( + node_matter_endpoint, + Clusters::OccupancySensing::Id, + MN::PirUnoccupiedToOccupiedThreshold::Id); + } + break; + } + // type is int16u + case MN::UltrasonicOccupiedToUnoccupiedDelay::Id: { + using T = MN::UltrasonicOccupiedToUnoccupiedDelay::TypeInfo::Type; + std::optional value = from_json(unify_value); + + if( value.has_value()) { + sl_log_debug(LOG_TAG,"UltrasonicOccupiedToUnoccupiedDelay attribute value is %s",unify_value.dump().c_str()); + UN::UltrasonicOccupiedToUnoccupiedDelay::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback( + node_matter_endpoint, + Clusters::OccupancySensing::Id, + MN::UltrasonicOccupiedToUnoccupiedDelay::Id); + } + break; + } + // type is int16u + case MN::UltrasonicUnoccupiedToOccupiedDelay::Id: { + using T = MN::UltrasonicUnoccupiedToOccupiedDelay::TypeInfo::Type; + std::optional value = from_json(unify_value); + + if( value.has_value()) { + sl_log_debug(LOG_TAG,"UltrasonicUnoccupiedToOccupiedDelay attribute value is %s",unify_value.dump().c_str()); + UN::UltrasonicUnoccupiedToOccupiedDelay::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback( + node_matter_endpoint, + Clusters::OccupancySensing::Id, + MN::UltrasonicUnoccupiedToOccupiedDelay::Id); + } + break; + } + // type is int8u + case MN::UltrasonicUnoccupiedToOccupiedThreshold::Id: { + using T = MN::UltrasonicUnoccupiedToOccupiedThreshold::TypeInfo::Type; + std::optional value = from_json(unify_value); + + if( value.has_value()) { + sl_log_debug(LOG_TAG,"UltrasonicUnoccupiedToOccupiedThreshold attribute value is %s",unify_value.dump().c_str()); + UN::UltrasonicUnoccupiedToOccupiedThreshold::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback( + node_matter_endpoint, + Clusters::OccupancySensing::Id, + MN::UltrasonicUnoccupiedToOccupiedThreshold::Id); + } + break; } + // type is int16u + case MN::PhysicalContactOccupiedToUnoccupiedDelay::Id: { + using T = MN::PhysicalContactOccupiedToUnoccupiedDelay::TypeInfo::Type; + std::optional value = from_json(unify_value); + + if( value.has_value()) { + sl_log_debug(LOG_TAG,"PhysicalContactOccupiedToUnoccupiedDelay attribute value is %s",unify_value.dump().c_str()); + UN::PhysicalContactOccupiedToUnoccupiedDelay::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback( + node_matter_endpoint, + Clusters::OccupancySensing::Id, + MN::PhysicalContactOccupiedToUnoccupiedDelay::Id); + } + break; + } + // type is int16u + case MN::PhysicalContactUnoccupiedToOccupiedDelay::Id: { + using T = MN::PhysicalContactUnoccupiedToOccupiedDelay::TypeInfo::Type; + std::optional value = from_json(unify_value); + + if( value.has_value()) { + sl_log_debug(LOG_TAG,"PhysicalContactUnoccupiedToOccupiedDelay attribute value is %s",unify_value.dump().c_str()); + UN::PhysicalContactUnoccupiedToOccupiedDelay::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback( + node_matter_endpoint, + Clusters::OccupancySensing::Id, + MN::PhysicalContactUnoccupiedToOccupiedDelay::Id); + } + break; + } + // type is int8u + case MN::PhysicalContactUnoccupiedToOccupiedThreshold::Id: { + using T = MN::PhysicalContactUnoccupiedToOccupiedThreshold::TypeInfo::Type; + std::optional value = from_json(unify_value); + + if( value.has_value()) { + sl_log_debug(LOG_TAG,"PhysicalContactUnoccupiedToOccupiedThreshold attribute value is %s",unify_value.dump().c_str()); + UN::PhysicalContactUnoccupiedToOccupiedThreshold::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback( + node_matter_endpoint, + Clusters::OccupancySensing::Id, + MN::PhysicalContactUnoccupiedToOccupiedThreshold::Id); + } + break; + } + } +} + +CHIP_ERROR +ElectricalMeasurementAttributeAccess::Read(const ConcreteReadAttributePath &aPath, + AttributeValueEncoder &aEncoder) +{ + namespace MN = chip::app::Clusters::ElectricalMeasurement::Attributes; + namespace UN = unify::matter_bridge::ElectricalMeasurement::Attributes; + if (aPath.mClusterId != Clusters::ElectricalMeasurement::Id) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + // Do not handle Read for non-unify endpoints + auto unify_node = m_node_state_monitor.bridged_endpoint(aPath.mEndpointId); + + if (!unify_node) { + return CHIP_NO_ERROR; + } + + + ConcreteAttributePath atr_path = ConcreteAttributePath(aPath.mEndpointId, + aPath.mClusterId, + aPath.mAttributeId); + + + if( m_node_state_monitor.emulator().is_attribute_emulated(aPath) ) { + return m_node_state_monitor.emulator().read_attribute(aPath,aEncoder); + } + + try { + switch (aPath.mAttributeId) { + case MN::MeasurementType::Id: { // type is bitmap32 + MN::MeasurementType::TypeInfo::Type value; + UN::MeasurementType::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::DcVoltage::Id: { // type is int16s + MN::DcVoltage::TypeInfo::Type value; + UN::DcVoltage::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::DcVoltageMin::Id: { // type is int16s + MN::DcVoltageMin::TypeInfo::Type value; + UN::DcVoltageMin::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::DcVoltageMax::Id: { // type is int16s + MN::DcVoltageMax::TypeInfo::Type value; + UN::DcVoltageMax::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::DcCurrent::Id: { // type is int16s + MN::DcCurrent::TypeInfo::Type value; + UN::DcCurrent::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::DcCurrentMin::Id: { // type is int16s + MN::DcCurrentMin::TypeInfo::Type value; + UN::DcCurrentMin::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::DcCurrentMax::Id: { // type is int16s + MN::DcCurrentMax::TypeInfo::Type value; + UN::DcCurrentMax::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::DcPower::Id: { // type is int16s + MN::DcPower::TypeInfo::Type value; + UN::DcPower::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::DcPowerMin::Id: { // type is int16s + MN::DcPowerMin::TypeInfo::Type value; + UN::DcPowerMin::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::DcPowerMax::Id: { // type is int16s + MN::DcPowerMax::TypeInfo::Type value; + UN::DcPowerMax::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::DcVoltageMultiplier::Id: { // type is int16u + MN::DcVoltageMultiplier::TypeInfo::Type value; + UN::DcVoltageMultiplier::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::DcVoltageDivisor::Id: { // type is int16u + MN::DcVoltageDivisor::TypeInfo::Type value; + UN::DcVoltageDivisor::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::DcCurrentMultiplier::Id: { // type is int16u + MN::DcCurrentMultiplier::TypeInfo::Type value; + UN::DcCurrentMultiplier::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::DcCurrentDivisor::Id: { // type is int16u + MN::DcCurrentDivisor::TypeInfo::Type value; + UN::DcCurrentDivisor::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::DcPowerMultiplier::Id: { // type is int16u + MN::DcPowerMultiplier::TypeInfo::Type value; + UN::DcPowerMultiplier::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::DcPowerDivisor::Id: { // type is int16u + MN::DcPowerDivisor::TypeInfo::Type value; + UN::DcPowerDivisor::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::AcFrequency::Id: { // type is int16u + MN::AcFrequency::TypeInfo::Type value; + UN::AcFrequency::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::AcFrequencyMin::Id: { // type is int16u + MN::AcFrequencyMin::TypeInfo::Type value; + UN::AcFrequencyMin::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::AcFrequencyMax::Id: { // type is int16u + MN::AcFrequencyMax::TypeInfo::Type value; + UN::AcFrequencyMax::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::NeutralCurrent::Id: { // type is int16u + MN::NeutralCurrent::TypeInfo::Type value; + UN::NeutralCurrent::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::TotalActivePower::Id: { // type is int32s + MN::TotalActivePower::TypeInfo::Type value; + UN::TotalActivePower::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::TotalReactivePower::Id: { // type is int32s + MN::TotalReactivePower::TypeInfo::Type value; + UN::TotalReactivePower::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::TotalApparentPower::Id: { // type is int32u + MN::TotalApparentPower::TypeInfo::Type value; + UN::TotalApparentPower::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::Measured1stHarmonicCurrent::Id: { // type is int16s + MN::Measured1stHarmonicCurrent::TypeInfo::Type value; + UN::Measured1stHarmonicCurrent::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::Measured3rdHarmonicCurrent::Id: { // type is int16s + MN::Measured3rdHarmonicCurrent::TypeInfo::Type value; + UN::Measured3rdHarmonicCurrent::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::Measured5thHarmonicCurrent::Id: { // type is int16s + MN::Measured5thHarmonicCurrent::TypeInfo::Type value; + UN::Measured5thHarmonicCurrent::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::Measured7thHarmonicCurrent::Id: { // type is int16s + MN::Measured7thHarmonicCurrent::TypeInfo::Type value; + UN::Measured7thHarmonicCurrent::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::Measured9thHarmonicCurrent::Id: { // type is int16s + MN::Measured9thHarmonicCurrent::TypeInfo::Type value; + UN::Measured9thHarmonicCurrent::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::Measured11thHarmonicCurrent::Id: { // type is int16s + MN::Measured11thHarmonicCurrent::TypeInfo::Type value; + UN::Measured11thHarmonicCurrent::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::MeasuredPhase1stHarmonicCurrent::Id: { // type is int16s + MN::MeasuredPhase1stHarmonicCurrent::TypeInfo::Type value; + UN::MeasuredPhase1stHarmonicCurrent::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::MeasuredPhase3rdHarmonicCurrent::Id: { // type is int16s + MN::MeasuredPhase3rdHarmonicCurrent::TypeInfo::Type value; + UN::MeasuredPhase3rdHarmonicCurrent::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::MeasuredPhase5thHarmonicCurrent::Id: { // type is int16s + MN::MeasuredPhase5thHarmonicCurrent::TypeInfo::Type value; + UN::MeasuredPhase5thHarmonicCurrent::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::MeasuredPhase7thHarmonicCurrent::Id: { // type is int16s + MN::MeasuredPhase7thHarmonicCurrent::TypeInfo::Type value; + UN::MeasuredPhase7thHarmonicCurrent::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::MeasuredPhase9thHarmonicCurrent::Id: { // type is int16s + MN::MeasuredPhase9thHarmonicCurrent::TypeInfo::Type value; + UN::MeasuredPhase9thHarmonicCurrent::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::MeasuredPhase11thHarmonicCurrent::Id: { // type is int16s + MN::MeasuredPhase11thHarmonicCurrent::TypeInfo::Type value; + UN::MeasuredPhase11thHarmonicCurrent::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::AcFrequencyMultiplier::Id: { // type is int16u + MN::AcFrequencyMultiplier::TypeInfo::Type value; + UN::AcFrequencyMultiplier::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::AcFrequencyDivisor::Id: { // type is int16u + MN::AcFrequencyDivisor::TypeInfo::Type value; + UN::AcFrequencyDivisor::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::PowerMultiplier::Id: { // type is int32u + MN::PowerMultiplier::TypeInfo::Type value; + UN::PowerMultiplier::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::PowerDivisor::Id: { // type is int32u + MN::PowerDivisor::TypeInfo::Type value; + UN::PowerDivisor::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::HarmonicCurrentMultiplier::Id: { // type is int8s + MN::HarmonicCurrentMultiplier::TypeInfo::Type value; + UN::HarmonicCurrentMultiplier::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::PhaseHarmonicCurrentMultiplier::Id: { // type is int8s + MN::PhaseHarmonicCurrentMultiplier::TypeInfo::Type value; + UN::PhaseHarmonicCurrentMultiplier::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::InstantaneousVoltage::Id: { // type is int16s + MN::InstantaneousVoltage::TypeInfo::Type value; + UN::InstantaneousVoltage::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::InstantaneousLineCurrent::Id: { // type is int16u + MN::InstantaneousLineCurrent::TypeInfo::Type value; + UN::InstantaneousLineCurrent::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::InstantaneousActiveCurrent::Id: { // type is int16s + MN::InstantaneousActiveCurrent::TypeInfo::Type value; + UN::InstantaneousActiveCurrent::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::InstantaneousReactiveCurrent::Id: { // type is int16s + MN::InstantaneousReactiveCurrent::TypeInfo::Type value; + UN::InstantaneousReactiveCurrent::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::InstantaneousPower::Id: { // type is int16s + MN::InstantaneousPower::TypeInfo::Type value; + UN::InstantaneousPower::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::RmsVoltage::Id: { // type is int16u + MN::RmsVoltage::TypeInfo::Type value; + UN::RmsVoltage::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::RmsVoltageMin::Id: { // type is int16u + MN::RmsVoltageMin::TypeInfo::Type value; + UN::RmsVoltageMin::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::RmsVoltageMax::Id: { // type is int16u + MN::RmsVoltageMax::TypeInfo::Type value; + UN::RmsVoltageMax::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::RmsCurrent::Id: { // type is int16u + MN::RmsCurrent::TypeInfo::Type value; + UN::RmsCurrent::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::RmsCurrentMin::Id: { // type is int16u + MN::RmsCurrentMin::TypeInfo::Type value; + UN::RmsCurrentMin::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::RmsCurrentMax::Id: { // type is int16u + MN::RmsCurrentMax::TypeInfo::Type value; + UN::RmsCurrentMax::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::ActivePower::Id: { // type is int16s + MN::ActivePower::TypeInfo::Type value; + UN::ActivePower::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::ActivePowerMin::Id: { // type is int16s + MN::ActivePowerMin::TypeInfo::Type value; + UN::ActivePowerMin::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::ActivePowerMax::Id: { // type is int16s + MN::ActivePowerMax::TypeInfo::Type value; + UN::ActivePowerMax::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::ReactivePower::Id: { // type is int16s + MN::ReactivePower::TypeInfo::Type value; + UN::ReactivePower::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::ApparentPower::Id: { // type is int16u + MN::ApparentPower::TypeInfo::Type value; + UN::ApparentPower::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::PowerFactor::Id: { // type is int8s + MN::PowerFactor::TypeInfo::Type value; + UN::PowerFactor::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::AverageRmsVoltageMeasurementPeriod::Id: { // type is int16u + MN::AverageRmsVoltageMeasurementPeriod::TypeInfo::Type value; + UN::AverageRmsVoltageMeasurementPeriod::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::AverageRmsUnderVoltageCounter::Id: { // type is int16u + MN::AverageRmsUnderVoltageCounter::TypeInfo::Type value; + UN::AverageRmsUnderVoltageCounter::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::RmsExtremeOverVoltagePeriod::Id: { // type is int16u + MN::RmsExtremeOverVoltagePeriod::TypeInfo::Type value; + UN::RmsExtremeOverVoltagePeriod::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::RmsExtremeUnderVoltagePeriod::Id: { // type is int16u + MN::RmsExtremeUnderVoltagePeriod::TypeInfo::Type value; + UN::RmsExtremeUnderVoltagePeriod::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::RmsVoltageSagPeriod::Id: { // type is int16u + MN::RmsVoltageSagPeriod::TypeInfo::Type value; + UN::RmsVoltageSagPeriod::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::RmsVoltageSwellPeriod::Id: { // type is int16u + MN::RmsVoltageSwellPeriod::TypeInfo::Type value; + UN::RmsVoltageSwellPeriod::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::AcVoltageMultiplier::Id: { // type is int16u + MN::AcVoltageMultiplier::TypeInfo::Type value; + UN::AcVoltageMultiplier::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::AcVoltageDivisor::Id: { // type is int16u + MN::AcVoltageDivisor::TypeInfo::Type value; + UN::AcVoltageDivisor::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::AcCurrentMultiplier::Id: { // type is int16u + MN::AcCurrentMultiplier::TypeInfo::Type value; + UN::AcCurrentMultiplier::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::AcCurrentDivisor::Id: { // type is int16u + MN::AcCurrentDivisor::TypeInfo::Type value; + UN::AcCurrentDivisor::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::AcPowerMultiplier::Id: { // type is int16u + MN::AcPowerMultiplier::TypeInfo::Type value; + UN::AcPowerMultiplier::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::AcPowerDivisor::Id: { // type is int16u + MN::AcPowerDivisor::TypeInfo::Type value; + UN::AcPowerDivisor::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::OverloadAlarmsMask::Id: { // type is bitmap8 + MN::OverloadAlarmsMask::TypeInfo::Type value; + UN::OverloadAlarmsMask::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::VoltageOverload::Id: { // type is int16s + MN::VoltageOverload::TypeInfo::Type value; + UN::VoltageOverload::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::CurrentOverload::Id: { // type is int16s + MN::CurrentOverload::TypeInfo::Type value; + UN::CurrentOverload::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::AcOverloadAlarmsMask::Id: { // type is bitmap16 + MN::AcOverloadAlarmsMask::TypeInfo::Type value; + UN::AcOverloadAlarmsMask::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::AcVoltageOverload::Id: { // type is int16s + MN::AcVoltageOverload::TypeInfo::Type value; + UN::AcVoltageOverload::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::AcCurrentOverload::Id: { // type is int16s + MN::AcCurrentOverload::TypeInfo::Type value; + UN::AcCurrentOverload::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::AcActivePowerOverload::Id: { // type is int16s + MN::AcActivePowerOverload::TypeInfo::Type value; + UN::AcActivePowerOverload::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::AcReactivePowerOverload::Id: { // type is int16s + MN::AcReactivePowerOverload::TypeInfo::Type value; + UN::AcReactivePowerOverload::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::AverageRmsOverVoltage::Id: { // type is int16s + MN::AverageRmsOverVoltage::TypeInfo::Type value; + UN::AverageRmsOverVoltage::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::AverageRmsUnderVoltage::Id: { // type is int16s + MN::AverageRmsUnderVoltage::TypeInfo::Type value; + UN::AverageRmsUnderVoltage::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::RmsExtremeOverVoltage::Id: { // type is int16s + MN::RmsExtremeOverVoltage::TypeInfo::Type value; + UN::RmsExtremeOverVoltage::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::RmsExtremeUnderVoltage::Id: { // type is int16s + MN::RmsExtremeUnderVoltage::TypeInfo::Type value; + UN::RmsExtremeUnderVoltage::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::RmsVoltageSag::Id: { // type is int16s + MN::RmsVoltageSag::TypeInfo::Type value; + UN::RmsVoltageSag::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::RmsVoltageSwell::Id: { // type is int16s + MN::RmsVoltageSwell::TypeInfo::Type value; + UN::RmsVoltageSwell::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::LineCurrentPhaseB::Id: { // type is int16u + MN::LineCurrentPhaseB::TypeInfo::Type value; + UN::LineCurrentPhaseB::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::ActiveCurrentPhaseB::Id: { // type is int16s + MN::ActiveCurrentPhaseB::TypeInfo::Type value; + UN::ActiveCurrentPhaseB::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::ReactiveCurrentPhaseB::Id: { // type is int16s + MN::ReactiveCurrentPhaseB::TypeInfo::Type value; + UN::ReactiveCurrentPhaseB::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::RmsVoltagePhaseB::Id: { // type is int16u + MN::RmsVoltagePhaseB::TypeInfo::Type value; + UN::RmsVoltagePhaseB::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::RmsVoltageMinPhaseB::Id: { // type is int16u + MN::RmsVoltageMinPhaseB::TypeInfo::Type value; + UN::RmsVoltageMinPhaseB::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::RmsVoltageMaxPhaseB::Id: { // type is int16u + MN::RmsVoltageMaxPhaseB::TypeInfo::Type value; + UN::RmsVoltageMaxPhaseB::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::RmsCurrentPhaseB::Id: { // type is int16u + MN::RmsCurrentPhaseB::TypeInfo::Type value; + UN::RmsCurrentPhaseB::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::RmsCurrentMinPhaseB::Id: { // type is int16u + MN::RmsCurrentMinPhaseB::TypeInfo::Type value; + UN::RmsCurrentMinPhaseB::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::RmsCurrentMaxPhaseB::Id: { // type is int16u + MN::RmsCurrentMaxPhaseB::TypeInfo::Type value; + UN::RmsCurrentMaxPhaseB::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::ActivePowerPhaseB::Id: { // type is int16s + MN::ActivePowerPhaseB::TypeInfo::Type value; + UN::ActivePowerPhaseB::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::ActivePowerMinPhaseB::Id: { // type is int16s + MN::ActivePowerMinPhaseB::TypeInfo::Type value; + UN::ActivePowerMinPhaseB::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::ActivePowerMaxPhaseB::Id: { // type is int16s + MN::ActivePowerMaxPhaseB::TypeInfo::Type value; + UN::ActivePowerMaxPhaseB::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::ReactivePowerPhaseB::Id: { // type is int16s + MN::ReactivePowerPhaseB::TypeInfo::Type value; + UN::ReactivePowerPhaseB::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::ApparentPowerPhaseB::Id: { // type is int16u + MN::ApparentPowerPhaseB::TypeInfo::Type value; + UN::ApparentPowerPhaseB::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::PowerFactorPhaseB::Id: { // type is int8s + MN::PowerFactorPhaseB::TypeInfo::Type value; + UN::PowerFactorPhaseB::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::AverageRmsVoltageMeasurementPeriodPhaseB::Id: { // type is int16u + MN::AverageRmsVoltageMeasurementPeriodPhaseB::TypeInfo::Type value; + UN::AverageRmsVoltageMeasurementPeriodPhaseB::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::AverageRmsOverVoltageCounterPhaseB::Id: { // type is int16u + MN::AverageRmsOverVoltageCounterPhaseB::TypeInfo::Type value; + UN::AverageRmsOverVoltageCounterPhaseB::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::AverageRmsUnderVoltageCounterPhaseB::Id: { // type is int16u + MN::AverageRmsUnderVoltageCounterPhaseB::TypeInfo::Type value; + UN::AverageRmsUnderVoltageCounterPhaseB::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::RmsExtremeOverVoltagePeriodPhaseB::Id: { // type is int16u + MN::RmsExtremeOverVoltagePeriodPhaseB::TypeInfo::Type value; + UN::RmsExtremeOverVoltagePeriodPhaseB::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::RmsExtremeUnderVoltagePeriodPhaseB::Id: { // type is int16u + MN::RmsExtremeUnderVoltagePeriodPhaseB::TypeInfo::Type value; + UN::RmsExtremeUnderVoltagePeriodPhaseB::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::RmsVoltageSagPeriodPhaseB::Id: { // type is int16u + MN::RmsVoltageSagPeriodPhaseB::TypeInfo::Type value; + UN::RmsVoltageSagPeriodPhaseB::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::RmsVoltageSwellPeriodPhaseB::Id: { // type is int16u + MN::RmsVoltageSwellPeriodPhaseB::TypeInfo::Type value; + UN::RmsVoltageSwellPeriodPhaseB::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::LineCurrentPhaseC::Id: { // type is int16u + MN::LineCurrentPhaseC::TypeInfo::Type value; + UN::LineCurrentPhaseC::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::ActiveCurrentPhaseC::Id: { // type is int16s + MN::ActiveCurrentPhaseC::TypeInfo::Type value; + UN::ActiveCurrentPhaseC::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::ReactiveCurrentPhaseC::Id: { // type is int16s + MN::ReactiveCurrentPhaseC::TypeInfo::Type value; + UN::ReactiveCurrentPhaseC::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::RmsVoltagePhaseC::Id: { // type is int16u + MN::RmsVoltagePhaseC::TypeInfo::Type value; + UN::RmsVoltagePhaseC::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::RmsVoltageMinPhaseC::Id: { // type is int16u + MN::RmsVoltageMinPhaseC::TypeInfo::Type value; + UN::RmsVoltageMinPhaseC::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::RmsVoltageMaxPhaseC::Id: { // type is int16u + MN::RmsVoltageMaxPhaseC::TypeInfo::Type value; + UN::RmsVoltageMaxPhaseC::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::RmsCurrentPhaseC::Id: { // type is int16u + MN::RmsCurrentPhaseC::TypeInfo::Type value; + UN::RmsCurrentPhaseC::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::RmsCurrentMinPhaseC::Id: { // type is int16u + MN::RmsCurrentMinPhaseC::TypeInfo::Type value; + UN::RmsCurrentMinPhaseC::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::RmsCurrentMaxPhaseC::Id: { // type is int16u + MN::RmsCurrentMaxPhaseC::TypeInfo::Type value; + UN::RmsCurrentMaxPhaseC::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::ActivePowerPhaseC::Id: { // type is int16s + MN::ActivePowerPhaseC::TypeInfo::Type value; + UN::ActivePowerPhaseC::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::ActivePowerMinPhaseC::Id: { // type is int16s + MN::ActivePowerMinPhaseC::TypeInfo::Type value; + UN::ActivePowerMinPhaseC::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::ActivePowerMaxPhaseC::Id: { // type is int16s + MN::ActivePowerMaxPhaseC::TypeInfo::Type value; + UN::ActivePowerMaxPhaseC::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::ReactivePowerPhaseC::Id: { // type is int16s + MN::ReactivePowerPhaseC::TypeInfo::Type value; + UN::ReactivePowerPhaseC::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::ApparentPowerPhaseC::Id: { // type is int16u + MN::ApparentPowerPhaseC::TypeInfo::Type value; + UN::ApparentPowerPhaseC::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::PowerFactorPhaseC::Id: { // type is int8s + MN::PowerFactorPhaseC::TypeInfo::Type value; + UN::PowerFactorPhaseC::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::AverageRmsVoltageMeasurementPeriodPhaseC::Id: { // type is int16u + MN::AverageRmsVoltageMeasurementPeriodPhaseC::TypeInfo::Type value; + UN::AverageRmsVoltageMeasurementPeriodPhaseC::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::AverageRmsOverVoltageCounterPhaseC::Id: { // type is int16u + MN::AverageRmsOverVoltageCounterPhaseC::TypeInfo::Type value; + UN::AverageRmsOverVoltageCounterPhaseC::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::AverageRmsUnderVoltageCounterPhaseC::Id: { // type is int16u + MN::AverageRmsUnderVoltageCounterPhaseC::TypeInfo::Type value; + UN::AverageRmsUnderVoltageCounterPhaseC::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::RmsExtremeOverVoltagePeriodPhaseC::Id: { // type is int16u + MN::RmsExtremeOverVoltagePeriodPhaseC::TypeInfo::Type value; + UN::RmsExtremeOverVoltagePeriodPhaseC::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::RmsExtremeUnderVoltagePeriodPhaseC::Id: { // type is int16u + MN::RmsExtremeUnderVoltagePeriodPhaseC::TypeInfo::Type value; + UN::RmsExtremeUnderVoltagePeriodPhaseC::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::RmsVoltageSagPeriodPhaseC::Id: { // type is int16u + MN::RmsVoltageSagPeriodPhaseC::TypeInfo::Type value; + UN::RmsVoltageSagPeriodPhaseC::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::RmsVoltageSwellPeriodPhaseC::Id: { // type is int16u + MN::RmsVoltageSwellPeriodPhaseC::TypeInfo::Type value; + UN::RmsVoltageSwellPeriodPhaseC::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::FeatureMap::Id: { // type is bitmap32 + MN::FeatureMap::TypeInfo::Type value; + UN::FeatureMap::Get(atr_path, value); + return aEncoder.Encode(value); + } + case MN::ClusterRevision::Id: { // type is int16u + MN::ClusterRevision::TypeInfo::Type value; + UN::ClusterRevision::Get(atr_path, value); + return aEncoder.Encode(value); + } + } + } catch (const std::out_of_range &e) { + sl_log_info( + LOG_TAG, + "The request attribute Path for endpoint [%i] is not found in the attribute state " + "container: %s\n", atr_path.mEndpointId, e.what()); + return CHIP_ERROR_NO_MESSAGE_HANDLER; + } + return CHIP_NO_ERROR; +} + +CHIP_ERROR ElectricalMeasurementAttributeAccess::Write(const ConcreteDataAttributePath &aPath, + AttributeValueDecoder &aDecoder) +{ + using namespace chip::app::Clusters::ElectricalMeasurement; + + if (aPath.mClusterId != Clusters::ElectricalMeasurement::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; + + if( m_node_state_monitor.emulator().is_attribute_emulated(aPath) ) { + return m_node_state_monitor.emulator().write_attribute(aPath,aDecoder); + } + + switch (aPath.mAttributeId) { + // measurement type is not supported by UCL + // dc voltage is not supported by UCL + // dc voltage min is not supported by UCL + // dc voltage max is not supported by UCL + // dc current is not supported by UCL + // dc current min is not supported by UCL + // dc current max is not supported by UCL + // dc power is not supported by UCL + // dc power min is not supported by UCL + // dc power max is not supported by UCL + // dc voltage multiplier is not supported by UCL + // dc voltage divisor is not supported by UCL + // dc current multiplier is not supported by UCL + // dc current divisor is not supported by UCL + // dc power multiplier is not supported by UCL + // dc power divisor is not supported by UCL + // ac frequency is not supported by UCL + // ac frequency min is not supported by UCL + // ac frequency max is not supported by UCL + // neutral current is not supported by UCL + // total active power is not supported by UCL + // total reactive power is not supported by UCL + // total apparent power is not supported by UCL + // measured 1st harmonic current is not supported by UCL + // measured 3rd harmonic current is not supported by UCL + // measured 5th harmonic current is not supported by UCL + // measured 7th harmonic current is not supported by UCL + // measured 9th harmonic current is not supported by UCL + // measured 11th harmonic current is not supported by UCL + // measured phase 1st harmonic current is not supported by UCL + // measured phase 3rd harmonic current is not supported by UCL + // measured phase 5th harmonic current is not supported by UCL + // measured phase 7th harmonic current is not supported by UCL + // measured phase 9th harmonic current is not supported by UCL + // measured phase 11th harmonic current is not supported by UCL + // ac frequency multiplier is not supported by UCL + // ac frequency divisor is not supported by UCL + // power multiplier is not supported by UCL + // power divisor is not supported by UCL + // harmonic current multiplier is not supported by UCL + // phase harmonic current multiplier is not supported by UCL + // instantaneous voltage is not supported by UCL + // instantaneous line current is not supported by UCL + // instantaneous active current is not supported by UCL + // instantaneous reactive current is not supported by UCL + // instantaneous power is not supported by UCL + // rms voltage is not supported by UCL + // rms voltage min is not supported by UCL + // rms voltage max is not supported by UCL + // rms current is not supported by UCL + // rms current min is not supported by UCL + // rms current max is not supported by UCL + // active power is not supported by UCL + // active power min is not supported by UCL + // active power max is not supported by UCL + // reactive power is not supported by UCL + // apparent power is not supported by UCL + // power factor is not supported by UCL + case Attributes::AverageRmsVoltageMeasurementPeriod::Id: { + + Attributes::AverageRmsVoltageMeasurementPeriod::TypeInfo::DecodableType value; + aDecoder.Decode(value); + jsn["value"] = to_json(value); + attribute_name = "AverageRMSVoltageMeasurementPeriod"; + break; + } + case Attributes::AverageRmsUnderVoltageCounter::Id: { + + Attributes::AverageRmsUnderVoltageCounter::TypeInfo::DecodableType value; + aDecoder.Decode(value); + jsn["value"] = to_json(value); + attribute_name = "AverageRMSUnderVoltageCounter"; + break; + } + case Attributes::RmsExtremeOverVoltagePeriod::Id: { + + Attributes::RmsExtremeOverVoltagePeriod::TypeInfo::DecodableType value; + aDecoder.Decode(value); + jsn["value"] = to_json(value); + attribute_name = "RMSExtremeOverVoltagePeriod"; + break; + } + case Attributes::RmsExtremeUnderVoltagePeriod::Id: { + + Attributes::RmsExtremeUnderVoltagePeriod::TypeInfo::DecodableType value; + aDecoder.Decode(value); + jsn["value"] = to_json(value); + attribute_name = "RMSExtremeUnderVoltagePeriod"; + break; + } + case Attributes::RmsVoltageSagPeriod::Id: { + + Attributes::RmsVoltageSagPeriod::TypeInfo::DecodableType value; + aDecoder.Decode(value); + jsn["value"] = to_json(value); + attribute_name = "RMSVoltageSagPeriod"; + break; + } + case Attributes::RmsVoltageSwellPeriod::Id: { + + Attributes::RmsVoltageSwellPeriod::TypeInfo::DecodableType value; + aDecoder.Decode(value); + jsn["value"] = to_json(value); + attribute_name = "RMSVoltageSwellPeriod"; + break; + } + // ac voltage multiplier is not supported by UCL + // ac voltage divisor is not supported by UCL + // ac current multiplier is not supported by UCL + // ac current divisor is not supported by UCL + // ac power multiplier is not supported by UCL + // ac power divisor is not supported by UCL + case Attributes::OverloadAlarmsMask::Id: { + + Attributes::OverloadAlarmsMask::TypeInfo::DecodableType value; + aDecoder.Decode(value); + jsn["value"] = to_json(value); + attribute_name = "DCOverloadAlarmsMask"; + break; + } + // voltage overload is not supported by UCL + // current overload is not supported by UCL + case Attributes::AcOverloadAlarmsMask::Id: { + + Attributes::AcOverloadAlarmsMask::TypeInfo::DecodableType value; + aDecoder.Decode(value); + jsn["value"] = to_json(value); + attribute_name = "ACAlarmsMask"; + break; + } + // ac voltage overload is not supported by UCL + // ac current overload is not supported by UCL + // ac active power overload is not supported by UCL + // ac reactive power overload is not supported by UCL + // average rms over voltage is not supported by UCL + // average rms under voltage is not supported by UCL + // rms extreme over voltage is not supported by UCL + // rms extreme under voltage is not supported by UCL + // rms voltage sag is not supported by UCL + // rms voltage swell is not supported by UCL + // line current phase b is not supported by UCL + // active current phase b is not supported by UCL + // reactive current phase b is not supported by UCL + // rms voltage phase b is not supported by UCL + // rms voltage min phase b is not supported by UCL + // rms voltage max phase b is not supported by UCL + // rms current phase b is not supported by UCL + // rms current min phase b is not supported by UCL + // rms current max phase b is not supported by UCL + // active power phase b is not supported by UCL + // active power min phase b is not supported by UCL + // active power max phase b is not supported by UCL + // reactive power phase b is not supported by UCL + // apparent power phase b is not supported by UCL + // power factor phase b is not supported by UCL + // average rms voltage measurement period phase b is not supported by UCL + // average rms over voltage counter phase b is not supported by UCL + // average rms under voltage counter phase b is not supported by UCL + // rms extreme over voltage period phase b is not supported by UCL + // rms extreme under voltage period phase b is not supported by UCL + // rms voltage sag period phase b is not supported by UCL + // rms voltage swell period phase b is not supported by UCL + // line current phase c is not supported by UCL + // active current phase c is not supported by UCL + // reactive current phase c is not supported by UCL + // rms voltage phase c is not supported by UCL + // rms voltage min phase c is not supported by UCL + // rms voltage max phase c is not supported by UCL + // rms current phase c is not supported by UCL + // rms current min phase c is not supported by UCL + // rms current max phase c is not supported by UCL + // active power phase c is not supported by UCL + // active power min phase c is not supported by UCL + // active power max phase c is not supported by UCL + // reactive power phase c is not supported by UCL + // apparent power phase c is not supported by UCL + // power factor phase c is not supported by UCL + // average rms voltage measurement period phase c is not supported by UCL + // average rms over voltage counter phase c is not supported by UCL + // average rms under voltage counter phase c is not supported by UCL + // rms extreme over voltage period phase c is not supported by UCL + // rms extreme under voltage period phase c is not supported by UCL + // rms voltage sag period phase c is not supported by UCL + // rms voltage swell period phase c is not supported by UCL + // GeneratedCommandList is not supported by UCL + // AcceptedCommandList is not supported by UCL + // AttributeList is not supported by UCL + // FeatureMap is not supported by UCL + // ClusterRevision is not supported by UCL + } + + 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) + + "/ElectricalMeasurement/Attributes/" + attribute_name + "/Desired"; + payload_str = jsn.dump(); + m_unify_mqtt.Publish(topic, + payload_str, + true); + return CHIP_NO_ERROR; + } + + return CHIP_ERROR_NO_MESSAGE_HANDLER; +} + +void ElectricalMeasurementAttributeAccess::reported_updated(const bridged_endpoint *ep, + const std::string &cluster, + const std::string &attribute, + const nlohmann::json &unify_value) +{ + namespace MN = chip::app::Clusters::ElectricalMeasurement::Attributes; + namespace UN = unify::matter_bridge::ElectricalMeasurement::Attributes; + + auto cluster_id = device_translator::instance().get_cluster_id(cluster); + + if (!cluster_id.has_value() || (cluster_id.value() != Clusters::ElectricalMeasurement::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::ElectricalMeasurement::Id, attribute_id.value()); - switch (attribute_id.value()) { + 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 case MN::MeasurementType::Id: { - using T = MN::MeasurementType::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) { - sl_log_debug(LOG_TAG, "MeasurementType attribute value is %s", unify_value.dump().c_str()); - UN::MeasurementType::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::ElectricalMeasurement::Id, - MN::MeasurementType::Id); - } - break; + using T = MN::MeasurementType::TypeInfo::Type; + std::optional value = from_json(unify_value); + + if( value.has_value()) { + sl_log_debug(LOG_TAG,"MeasurementType attribute value is %s",unify_value.dump().c_str()); + UN::MeasurementType::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback( + node_matter_endpoint, + Clusters::ElectricalMeasurement::Id, + MN::MeasurementType::Id); + } + break; } // type is int16s case MN::DcVoltage::Id: { - using T = MN::DcVoltage::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) { - sl_log_debug(LOG_TAG, "DcVoltage attribute value is %s", unify_value.dump().c_str()); - UN::DcVoltage::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::ElectricalMeasurement::Id, MN::DcVoltage::Id); - } - break; + using T = MN::DcVoltage::TypeInfo::Type; + std::optional value = from_json(unify_value); + + if( value.has_value()) { + sl_log_debug(LOG_TAG,"DcVoltage attribute value is %s",unify_value.dump().c_str()); + UN::DcVoltage::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback( + node_matter_endpoint, + Clusters::ElectricalMeasurement::Id, + MN::DcVoltage::Id); + } + break; } // type is int16s case MN::DcVoltageMin::Id: { - using T = MN::DcVoltageMin::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) { - sl_log_debug(LOG_TAG, "DcVoltageMin attribute value is %s", unify_value.dump().c_str()); - UN::DcVoltageMin::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::ElectricalMeasurement::Id, MN::DcVoltageMin::Id); - } - break; + using T = MN::DcVoltageMin::TypeInfo::Type; + std::optional value = from_json(unify_value); + + if( value.has_value()) { + sl_log_debug(LOG_TAG,"DcVoltageMin attribute value is %s",unify_value.dump().c_str()); + UN::DcVoltageMin::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback( + node_matter_endpoint, + Clusters::ElectricalMeasurement::Id, + MN::DcVoltageMin::Id); + } + break; } // type is int16s case MN::DcVoltageMax::Id: { - using T = MN::DcVoltageMax::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) { - sl_log_debug(LOG_TAG, "DcVoltageMax attribute value is %s", unify_value.dump().c_str()); - UN::DcVoltageMax::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::ElectricalMeasurement::Id, MN::DcVoltageMax::Id); - } - break; + using T = MN::DcVoltageMax::TypeInfo::Type; + std::optional value = from_json(unify_value); + + if( value.has_value()) { + sl_log_debug(LOG_TAG,"DcVoltageMax attribute value is %s",unify_value.dump().c_str()); + UN::DcVoltageMax::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback( + node_matter_endpoint, + Clusters::ElectricalMeasurement::Id, + MN::DcVoltageMax::Id); + } + break; } // type is int16s case MN::DcCurrent::Id: { - using T = MN::DcCurrent::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) { - sl_log_debug(LOG_TAG, "DcCurrent attribute value is %s", unify_value.dump().c_str()); - UN::DcCurrent::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::ElectricalMeasurement::Id, MN::DcCurrent::Id); - } - break; + using T = MN::DcCurrent::TypeInfo::Type; + std::optional value = from_json(unify_value); + + if( value.has_value()) { + sl_log_debug(LOG_TAG,"DcCurrent attribute value is %s",unify_value.dump().c_str()); + UN::DcCurrent::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback( + node_matter_endpoint, + Clusters::ElectricalMeasurement::Id, + MN::DcCurrent::Id); + } + break; } // type is int16s case MN::DcCurrentMin::Id: { - using T = MN::DcCurrentMin::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) { - sl_log_debug(LOG_TAG, "DcCurrentMin attribute value is %s", unify_value.dump().c_str()); - UN::DcCurrentMin::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::ElectricalMeasurement::Id, MN::DcCurrentMin::Id); - } - break; + using T = MN::DcCurrentMin::TypeInfo::Type; + std::optional value = from_json(unify_value); + + if( value.has_value()) { + sl_log_debug(LOG_TAG,"DcCurrentMin attribute value is %s",unify_value.dump().c_str()); + UN::DcCurrentMin::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback( + node_matter_endpoint, + Clusters::ElectricalMeasurement::Id, + MN::DcCurrentMin::Id); + } + break; } // type is int16s case MN::DcCurrentMax::Id: { - using T = MN::DcCurrentMax::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) { - sl_log_debug(LOG_TAG, "DcCurrentMax attribute value is %s", unify_value.dump().c_str()); - UN::DcCurrentMax::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::ElectricalMeasurement::Id, MN::DcCurrentMax::Id); - } - break; + using T = MN::DcCurrentMax::TypeInfo::Type; + std::optional value = from_json(unify_value); + + if( value.has_value()) { + sl_log_debug(LOG_TAG,"DcCurrentMax attribute value is %s",unify_value.dump().c_str()); + UN::DcCurrentMax::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback( + node_matter_endpoint, + Clusters::ElectricalMeasurement::Id, + MN::DcCurrentMax::Id); + } + break; } // type is int16s case MN::DcPower::Id: { - using T = MN::DcPower::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) { - sl_log_debug(LOG_TAG, "DcPower attribute value is %s", unify_value.dump().c_str()); - UN::DcPower::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::ElectricalMeasurement::Id, MN::DcPower::Id); - } - break; + using T = MN::DcPower::TypeInfo::Type; + std::optional value = from_json(unify_value); + + if( value.has_value()) { + sl_log_debug(LOG_TAG,"DcPower attribute value is %s",unify_value.dump().c_str()); + UN::DcPower::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback( + node_matter_endpoint, + Clusters::ElectricalMeasurement::Id, + MN::DcPower::Id); + } + break; } // type is int16s case MN::DcPowerMin::Id: { - using T = MN::DcPowerMin::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) { - sl_log_debug(LOG_TAG, "DcPowerMin attribute value is %s", unify_value.dump().c_str()); - UN::DcPowerMin::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::ElectricalMeasurement::Id, MN::DcPowerMin::Id); - } - break; + using T = MN::DcPowerMin::TypeInfo::Type; + std::optional value = from_json(unify_value); + + if( value.has_value()) { + sl_log_debug(LOG_TAG,"DcPowerMin attribute value is %s",unify_value.dump().c_str()); + UN::DcPowerMin::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback( + node_matter_endpoint, + Clusters::ElectricalMeasurement::Id, + MN::DcPowerMin::Id); + } + break; } // type is int16s case MN::DcPowerMax::Id: { - using T = MN::DcPowerMax::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) { - sl_log_debug(LOG_TAG, "DcPowerMax attribute value is %s", unify_value.dump().c_str()); - UN::DcPowerMax::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::ElectricalMeasurement::Id, MN::DcPowerMax::Id); - } - break; + using T = MN::DcPowerMax::TypeInfo::Type; + std::optional value = from_json(unify_value); + + if( value.has_value()) { + sl_log_debug(LOG_TAG,"DcPowerMax attribute value is %s",unify_value.dump().c_str()); + UN::DcPowerMax::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback( + node_matter_endpoint, + Clusters::ElectricalMeasurement::Id, + MN::DcPowerMax::Id); + } + break; } // type is int16u case MN::DcVoltageMultiplier::Id: { - using T = MN::DcVoltageMultiplier::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) { - sl_log_debug(LOG_TAG, "DcVoltageMultiplier attribute value is %s", unify_value.dump().c_str()); - UN::DcVoltageMultiplier::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::ElectricalMeasurement::Id, - MN::DcVoltageMultiplier::Id); - } - break; + using T = MN::DcVoltageMultiplier::TypeInfo::Type; + std::optional value = from_json(unify_value); + + if( value.has_value()) { + sl_log_debug(LOG_TAG,"DcVoltageMultiplier attribute value is %s",unify_value.dump().c_str()); + UN::DcVoltageMultiplier::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback( + node_matter_endpoint, + Clusters::ElectricalMeasurement::Id, + MN::DcVoltageMultiplier::Id); + } + break; } // type is int16u case MN::DcVoltageDivisor::Id: { - using T = MN::DcVoltageDivisor::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) { - sl_log_debug(LOG_TAG, "DcVoltageDivisor attribute value is %s", unify_value.dump().c_str()); - UN::DcVoltageDivisor::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::ElectricalMeasurement::Id, - MN::DcVoltageDivisor::Id); - } - break; + using T = MN::DcVoltageDivisor::TypeInfo::Type; + std::optional value = from_json(unify_value); + + if( value.has_value()) { + sl_log_debug(LOG_TAG,"DcVoltageDivisor attribute value is %s",unify_value.dump().c_str()); + UN::DcVoltageDivisor::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback( + node_matter_endpoint, + Clusters::ElectricalMeasurement::Id, + MN::DcVoltageDivisor::Id); + } + break; } // type is int16u case MN::DcCurrentMultiplier::Id: { - using T = MN::DcCurrentMultiplier::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) { - sl_log_debug(LOG_TAG, "DcCurrentMultiplier attribute value is %s", unify_value.dump().c_str()); - UN::DcCurrentMultiplier::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::ElectricalMeasurement::Id, - MN::DcCurrentMultiplier::Id); - } - break; + using T = MN::DcCurrentMultiplier::TypeInfo::Type; + std::optional value = from_json(unify_value); + + if( value.has_value()) { + sl_log_debug(LOG_TAG,"DcCurrentMultiplier attribute value is %s",unify_value.dump().c_str()); + UN::DcCurrentMultiplier::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback( + node_matter_endpoint, + Clusters::ElectricalMeasurement::Id, + MN::DcCurrentMultiplier::Id); + } + break; } // type is int16u case MN::DcCurrentDivisor::Id: { - using T = MN::DcCurrentDivisor::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) { - sl_log_debug(LOG_TAG, "DcCurrentDivisor attribute value is %s", unify_value.dump().c_str()); - UN::DcCurrentDivisor::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::ElectricalMeasurement::Id, - MN::DcCurrentDivisor::Id); - } - break; + using T = MN::DcCurrentDivisor::TypeInfo::Type; + std::optional value = from_json(unify_value); + + if( value.has_value()) { + sl_log_debug(LOG_TAG,"DcCurrentDivisor attribute value is %s",unify_value.dump().c_str()); + UN::DcCurrentDivisor::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback( + node_matter_endpoint, + Clusters::ElectricalMeasurement::Id, + MN::DcCurrentDivisor::Id); + } + break; } // type is int16u case MN::DcPowerMultiplier::Id: { - using T = MN::DcPowerMultiplier::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) { - sl_log_debug(LOG_TAG, "DcPowerMultiplier attribute value is %s", unify_value.dump().c_str()); - UN::DcPowerMultiplier::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::ElectricalMeasurement::Id, - MN::DcPowerMultiplier::Id); - } - break; + using T = MN::DcPowerMultiplier::TypeInfo::Type; + std::optional value = from_json(unify_value); + + if( value.has_value()) { + sl_log_debug(LOG_TAG,"DcPowerMultiplier attribute value is %s",unify_value.dump().c_str()); + UN::DcPowerMultiplier::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback( + node_matter_endpoint, + Clusters::ElectricalMeasurement::Id, + MN::DcPowerMultiplier::Id); + } + break; } // type is int16u case MN::DcPowerDivisor::Id: { - using T = MN::DcPowerDivisor::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) { - sl_log_debug(LOG_TAG, "DcPowerDivisor attribute value is %s", unify_value.dump().c_str()); - UN::DcPowerDivisor::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::ElectricalMeasurement::Id, - MN::DcPowerDivisor::Id); - } - break; + using T = MN::DcPowerDivisor::TypeInfo::Type; + std::optional value = from_json(unify_value); + + if( value.has_value()) { + sl_log_debug(LOG_TAG,"DcPowerDivisor attribute value is %s",unify_value.dump().c_str()); + UN::DcPowerDivisor::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback( + node_matter_endpoint, + Clusters::ElectricalMeasurement::Id, + MN::DcPowerDivisor::Id); + } + break; } // type is int16u case MN::AcFrequency::Id: { - using T = MN::AcFrequency::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) { - sl_log_debug(LOG_TAG, "AcFrequency attribute value is %s", unify_value.dump().c_str()); - UN::AcFrequency::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::ElectricalMeasurement::Id, MN::AcFrequency::Id); - } - break; + using T = MN::AcFrequency::TypeInfo::Type; + std::optional value = from_json(unify_value); + + if( value.has_value()) { + sl_log_debug(LOG_TAG,"AcFrequency attribute value is %s",unify_value.dump().c_str()); + UN::AcFrequency::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback( + node_matter_endpoint, + Clusters::ElectricalMeasurement::Id, + MN::AcFrequency::Id); + } + break; } // type is int16u case MN::AcFrequencyMin::Id: { - using T = MN::AcFrequencyMin::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) { - sl_log_debug(LOG_TAG, "AcFrequencyMin attribute value is %s", unify_value.dump().c_str()); - UN::AcFrequencyMin::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::ElectricalMeasurement::Id, - MN::AcFrequencyMin::Id); - } - break; + using T = MN::AcFrequencyMin::TypeInfo::Type; + std::optional value = from_json(unify_value); + + if( value.has_value()) { + sl_log_debug(LOG_TAG,"AcFrequencyMin attribute value is %s",unify_value.dump().c_str()); + UN::AcFrequencyMin::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback( + node_matter_endpoint, + Clusters::ElectricalMeasurement::Id, + MN::AcFrequencyMin::Id); + } + break; } // type is int16u case MN::AcFrequencyMax::Id: { - using T = MN::AcFrequencyMax::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) { - sl_log_debug(LOG_TAG, "AcFrequencyMax attribute value is %s", unify_value.dump().c_str()); - UN::AcFrequencyMax::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::ElectricalMeasurement::Id, - MN::AcFrequencyMax::Id); - } - break; + using T = MN::AcFrequencyMax::TypeInfo::Type; + std::optional value = from_json(unify_value); + + if( value.has_value()) { + sl_log_debug(LOG_TAG,"AcFrequencyMax attribute value is %s",unify_value.dump().c_str()); + UN::AcFrequencyMax::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback( + node_matter_endpoint, + Clusters::ElectricalMeasurement::Id, + MN::AcFrequencyMax::Id); + } + break; } // type is int16u case MN::NeutralCurrent::Id: { - using T = MN::NeutralCurrent::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) { - sl_log_debug(LOG_TAG, "NeutralCurrent attribute value is %s", unify_value.dump().c_str()); - UN::NeutralCurrent::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::ElectricalMeasurement::Id, - MN::NeutralCurrent::Id); - } - break; + using T = MN::NeutralCurrent::TypeInfo::Type; + std::optional value = from_json(unify_value); + + if( value.has_value()) { + sl_log_debug(LOG_TAG,"NeutralCurrent attribute value is %s",unify_value.dump().c_str()); + UN::NeutralCurrent::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback( + node_matter_endpoint, + Clusters::ElectricalMeasurement::Id, + MN::NeutralCurrent::Id); + } + break; } // type is int32s case MN::TotalActivePower::Id: { - using T = MN::TotalActivePower::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) { - sl_log_debug(LOG_TAG, "TotalActivePower attribute value is %s", unify_value.dump().c_str()); - UN::TotalActivePower::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::ElectricalMeasurement::Id, - MN::TotalActivePower::Id); - } - break; + using T = MN::TotalActivePower::TypeInfo::Type; + std::optional value = from_json(unify_value); + + if( value.has_value()) { + sl_log_debug(LOG_TAG,"TotalActivePower attribute value is %s",unify_value.dump().c_str()); + UN::TotalActivePower::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback( + node_matter_endpoint, + Clusters::ElectricalMeasurement::Id, + MN::TotalActivePower::Id); + } + break; } // type is int32s case MN::TotalReactivePower::Id: { - using T = MN::TotalReactivePower::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) { - sl_log_debug(LOG_TAG, "TotalReactivePower attribute value is %s", unify_value.dump().c_str()); - UN::TotalReactivePower::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::ElectricalMeasurement::Id, - MN::TotalReactivePower::Id); - } - break; + using T = MN::TotalReactivePower::TypeInfo::Type; + std::optional value = from_json(unify_value); + + if( value.has_value()) { + sl_log_debug(LOG_TAG,"TotalReactivePower attribute value is %s",unify_value.dump().c_str()); + UN::TotalReactivePower::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback( + node_matter_endpoint, + Clusters::ElectricalMeasurement::Id, + MN::TotalReactivePower::Id); + } + break; } // type is int32u case MN::TotalApparentPower::Id: { - using T = MN::TotalApparentPower::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) { - sl_log_debug(LOG_TAG, "TotalApparentPower attribute value is %s", unify_value.dump().c_str()); - UN::TotalApparentPower::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::ElectricalMeasurement::Id, - MN::TotalApparentPower::Id); - } - break; + using T = MN::TotalApparentPower::TypeInfo::Type; + std::optional value = from_json(unify_value); + + if( value.has_value()) { + sl_log_debug(LOG_TAG,"TotalApparentPower attribute value is %s",unify_value.dump().c_str()); + UN::TotalApparentPower::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback( + node_matter_endpoint, + Clusters::ElectricalMeasurement::Id, + MN::TotalApparentPower::Id); + } + break; } // type is int16s case MN::Measured1stHarmonicCurrent::Id: { - using T = MN::Measured1stHarmonicCurrent::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) { - sl_log_debug(LOG_TAG, "Measured1stHarmonicCurrent attribute value is %s", unify_value.dump().c_str()); - UN::Measured1stHarmonicCurrent::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::ElectricalMeasurement::Id, - MN::Measured1stHarmonicCurrent::Id); - } - break; + using T = MN::Measured1stHarmonicCurrent::TypeInfo::Type; + std::optional value = from_json(unify_value); + + if( value.has_value()) { + sl_log_debug(LOG_TAG,"Measured1stHarmonicCurrent attribute value is %s",unify_value.dump().c_str()); + UN::Measured1stHarmonicCurrent::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback( + node_matter_endpoint, + Clusters::ElectricalMeasurement::Id, + MN::Measured1stHarmonicCurrent::Id); + } + break; } // type is int16s case MN::Measured3rdHarmonicCurrent::Id: { - using T = MN::Measured3rdHarmonicCurrent::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) { - sl_log_debug(LOG_TAG, "Measured3rdHarmonicCurrent attribute value is %s", unify_value.dump().c_str()); - UN::Measured3rdHarmonicCurrent::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::ElectricalMeasurement::Id, - MN::Measured3rdHarmonicCurrent::Id); - } - break; + using T = MN::Measured3rdHarmonicCurrent::TypeInfo::Type; + std::optional value = from_json(unify_value); + + if( value.has_value()) { + sl_log_debug(LOG_TAG,"Measured3rdHarmonicCurrent attribute value is %s",unify_value.dump().c_str()); + UN::Measured3rdHarmonicCurrent::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback( + node_matter_endpoint, + Clusters::ElectricalMeasurement::Id, + MN::Measured3rdHarmonicCurrent::Id); + } + break; } // type is int16s case MN::Measured5thHarmonicCurrent::Id: { - using T = MN::Measured5thHarmonicCurrent::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) { - sl_log_debug(LOG_TAG, "Measured5thHarmonicCurrent attribute value is %s", unify_value.dump().c_str()); - UN::Measured5thHarmonicCurrent::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::ElectricalMeasurement::Id, - MN::Measured5thHarmonicCurrent::Id); - } - break; + using T = MN::Measured5thHarmonicCurrent::TypeInfo::Type; + std::optional value = from_json(unify_value); + + if( value.has_value()) { + sl_log_debug(LOG_TAG,"Measured5thHarmonicCurrent attribute value is %s",unify_value.dump().c_str()); + UN::Measured5thHarmonicCurrent::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback( + node_matter_endpoint, + Clusters::ElectricalMeasurement::Id, + MN::Measured5thHarmonicCurrent::Id); + } + break; } // type is int16s case MN::Measured7thHarmonicCurrent::Id: { - using T = MN::Measured7thHarmonicCurrent::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) { - sl_log_debug(LOG_TAG, "Measured7thHarmonicCurrent attribute value is %s", unify_value.dump().c_str()); - UN::Measured7thHarmonicCurrent::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::ElectricalMeasurement::Id, - MN::Measured7thHarmonicCurrent::Id); - } - break; + using T = MN::Measured7thHarmonicCurrent::TypeInfo::Type; + std::optional value = from_json(unify_value); + + if( value.has_value()) { + sl_log_debug(LOG_TAG,"Measured7thHarmonicCurrent attribute value is %s",unify_value.dump().c_str()); + UN::Measured7thHarmonicCurrent::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback( + node_matter_endpoint, + Clusters::ElectricalMeasurement::Id, + MN::Measured7thHarmonicCurrent::Id); + } + break; } // type is int16s case MN::Measured9thHarmonicCurrent::Id: { - using T = MN::Measured9thHarmonicCurrent::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) { - sl_log_debug(LOG_TAG, "Measured9thHarmonicCurrent attribute value is %s", unify_value.dump().c_str()); - UN::Measured9thHarmonicCurrent::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::ElectricalMeasurement::Id, - MN::Measured9thHarmonicCurrent::Id); - } - break; + using T = MN::Measured9thHarmonicCurrent::TypeInfo::Type; + std::optional value = from_json(unify_value); + + if( value.has_value()) { + sl_log_debug(LOG_TAG,"Measured9thHarmonicCurrent attribute value is %s",unify_value.dump().c_str()); + UN::Measured9thHarmonicCurrent::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback( + node_matter_endpoint, + Clusters::ElectricalMeasurement::Id, + MN::Measured9thHarmonicCurrent::Id); + } + break; } // type is int16s case MN::Measured11thHarmonicCurrent::Id: { - using T = MN::Measured11thHarmonicCurrent::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) { - sl_log_debug(LOG_TAG, "Measured11thHarmonicCurrent attribute value is %s", unify_value.dump().c_str()); - UN::Measured11thHarmonicCurrent::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::ElectricalMeasurement::Id, - MN::Measured11thHarmonicCurrent::Id); - } - break; + using T = MN::Measured11thHarmonicCurrent::TypeInfo::Type; + std::optional value = from_json(unify_value); + + if( value.has_value()) { + sl_log_debug(LOG_TAG,"Measured11thHarmonicCurrent attribute value is %s",unify_value.dump().c_str()); + UN::Measured11thHarmonicCurrent::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback( + node_matter_endpoint, + Clusters::ElectricalMeasurement::Id, + MN::Measured11thHarmonicCurrent::Id); + } + break; } // type is int16s case MN::MeasuredPhase1stHarmonicCurrent::Id: { - using T = MN::MeasuredPhase1stHarmonicCurrent::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) { - sl_log_debug(LOG_TAG, "MeasuredPhase1stHarmonicCurrent attribute value is %s", unify_value.dump().c_str()); - UN::MeasuredPhase1stHarmonicCurrent::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::ElectricalMeasurement::Id, - MN::MeasuredPhase1stHarmonicCurrent::Id); - } - break; + using T = MN::MeasuredPhase1stHarmonicCurrent::TypeInfo::Type; + std::optional value = from_json(unify_value); + + if( value.has_value()) { + sl_log_debug(LOG_TAG,"MeasuredPhase1stHarmonicCurrent attribute value is %s",unify_value.dump().c_str()); + UN::MeasuredPhase1stHarmonicCurrent::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback( + node_matter_endpoint, + Clusters::ElectricalMeasurement::Id, + MN::MeasuredPhase1stHarmonicCurrent::Id); + } + break; } // type is int16s case MN::MeasuredPhase3rdHarmonicCurrent::Id: { - using T = MN::MeasuredPhase3rdHarmonicCurrent::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) { - sl_log_debug(LOG_TAG, "MeasuredPhase3rdHarmonicCurrent attribute value is %s", unify_value.dump().c_str()); - UN::MeasuredPhase3rdHarmonicCurrent::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::ElectricalMeasurement::Id, - MN::MeasuredPhase3rdHarmonicCurrent::Id); - } - break; + using T = MN::MeasuredPhase3rdHarmonicCurrent::TypeInfo::Type; + std::optional value = from_json(unify_value); + + if( value.has_value()) { + sl_log_debug(LOG_TAG,"MeasuredPhase3rdHarmonicCurrent attribute value is %s",unify_value.dump().c_str()); + UN::MeasuredPhase3rdHarmonicCurrent::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback( + node_matter_endpoint, + Clusters::ElectricalMeasurement::Id, + MN::MeasuredPhase3rdHarmonicCurrent::Id); + } + break; } // type is int16s case MN::MeasuredPhase5thHarmonicCurrent::Id: { - using T = MN::MeasuredPhase5thHarmonicCurrent::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) { - sl_log_debug(LOG_TAG, "MeasuredPhase5thHarmonicCurrent attribute value is %s", unify_value.dump().c_str()); - UN::MeasuredPhase5thHarmonicCurrent::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::ElectricalMeasurement::Id, - MN::MeasuredPhase5thHarmonicCurrent::Id); - } - break; + using T = MN::MeasuredPhase5thHarmonicCurrent::TypeInfo::Type; + std::optional value = from_json(unify_value); + + if( value.has_value()) { + sl_log_debug(LOG_TAG,"MeasuredPhase5thHarmonicCurrent attribute value is %s",unify_value.dump().c_str()); + UN::MeasuredPhase5thHarmonicCurrent::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback( + node_matter_endpoint, + Clusters::ElectricalMeasurement::Id, + MN::MeasuredPhase5thHarmonicCurrent::Id); + } + break; } // type is int16s case MN::MeasuredPhase7thHarmonicCurrent::Id: { - using T = MN::MeasuredPhase7thHarmonicCurrent::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) { - sl_log_debug(LOG_TAG, "MeasuredPhase7thHarmonicCurrent attribute value is %s", unify_value.dump().c_str()); - UN::MeasuredPhase7thHarmonicCurrent::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::ElectricalMeasurement::Id, - MN::MeasuredPhase7thHarmonicCurrent::Id); - } - break; + using T = MN::MeasuredPhase7thHarmonicCurrent::TypeInfo::Type; + std::optional value = from_json(unify_value); + + if( value.has_value()) { + sl_log_debug(LOG_TAG,"MeasuredPhase7thHarmonicCurrent attribute value is %s",unify_value.dump().c_str()); + UN::MeasuredPhase7thHarmonicCurrent::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback( + node_matter_endpoint, + Clusters::ElectricalMeasurement::Id, + MN::MeasuredPhase7thHarmonicCurrent::Id); + } + break; } // type is int16s case MN::MeasuredPhase9thHarmonicCurrent::Id: { - using T = MN::MeasuredPhase9thHarmonicCurrent::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) { - sl_log_debug(LOG_TAG, "MeasuredPhase9thHarmonicCurrent attribute value is %s", unify_value.dump().c_str()); - UN::MeasuredPhase9thHarmonicCurrent::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::ElectricalMeasurement::Id, - MN::MeasuredPhase9thHarmonicCurrent::Id); - } - break; + using T = MN::MeasuredPhase9thHarmonicCurrent::TypeInfo::Type; + std::optional value = from_json(unify_value); + + if( value.has_value()) { + sl_log_debug(LOG_TAG,"MeasuredPhase9thHarmonicCurrent attribute value is %s",unify_value.dump().c_str()); + UN::MeasuredPhase9thHarmonicCurrent::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback( + node_matter_endpoint, + Clusters::ElectricalMeasurement::Id, + MN::MeasuredPhase9thHarmonicCurrent::Id); + } + break; } // type is int16s case MN::MeasuredPhase11thHarmonicCurrent::Id: { - using T = MN::MeasuredPhase11thHarmonicCurrent::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) { - sl_log_debug(LOG_TAG, "MeasuredPhase11thHarmonicCurrent attribute value is %s", unify_value.dump().c_str()); - UN::MeasuredPhase11thHarmonicCurrent::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::ElectricalMeasurement::Id, - MN::MeasuredPhase11thHarmonicCurrent::Id); - } - break; + using T = MN::MeasuredPhase11thHarmonicCurrent::TypeInfo::Type; + std::optional value = from_json(unify_value); + + if( value.has_value()) { + sl_log_debug(LOG_TAG,"MeasuredPhase11thHarmonicCurrent attribute value is %s",unify_value.dump().c_str()); + UN::MeasuredPhase11thHarmonicCurrent::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback( + node_matter_endpoint, + Clusters::ElectricalMeasurement::Id, + MN::MeasuredPhase11thHarmonicCurrent::Id); + } + break; } // type is int16u case MN::AcFrequencyMultiplier::Id: { - using T = MN::AcFrequencyMultiplier::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) { - sl_log_debug(LOG_TAG, "AcFrequencyMultiplier attribute value is %s", unify_value.dump().c_str()); - UN::AcFrequencyMultiplier::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::ElectricalMeasurement::Id, - MN::AcFrequencyMultiplier::Id); - } - break; + using T = MN::AcFrequencyMultiplier::TypeInfo::Type; + std::optional value = from_json(unify_value); + + if( value.has_value()) { + sl_log_debug(LOG_TAG,"AcFrequencyMultiplier attribute value is %s",unify_value.dump().c_str()); + UN::AcFrequencyMultiplier::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback( + node_matter_endpoint, + Clusters::ElectricalMeasurement::Id, + MN::AcFrequencyMultiplier::Id); + } + break; } // type is int16u case MN::AcFrequencyDivisor::Id: { - using T = MN::AcFrequencyDivisor::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) { - sl_log_debug(LOG_TAG, "AcFrequencyDivisor attribute value is %s", unify_value.dump().c_str()); - UN::AcFrequencyDivisor::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::ElectricalMeasurement::Id, - MN::AcFrequencyDivisor::Id); - } - break; + using T = MN::AcFrequencyDivisor::TypeInfo::Type; + std::optional value = from_json(unify_value); + + if( value.has_value()) { + sl_log_debug(LOG_TAG,"AcFrequencyDivisor attribute value is %s",unify_value.dump().c_str()); + UN::AcFrequencyDivisor::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback( + node_matter_endpoint, + Clusters::ElectricalMeasurement::Id, + MN::AcFrequencyDivisor::Id); + } + break; } // type is int32u case MN::PowerMultiplier::Id: { - using T = MN::PowerMultiplier::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) { - sl_log_debug(LOG_TAG, "PowerMultiplier attribute value is %s", unify_value.dump().c_str()); - UN::PowerMultiplier::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::ElectricalMeasurement::Id, - MN::PowerMultiplier::Id); - } - break; + using T = MN::PowerMultiplier::TypeInfo::Type; + std::optional value = from_json(unify_value); + + if( value.has_value()) { + sl_log_debug(LOG_TAG,"PowerMultiplier attribute value is %s",unify_value.dump().c_str()); + UN::PowerMultiplier::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback( + node_matter_endpoint, + Clusters::ElectricalMeasurement::Id, + MN::PowerMultiplier::Id); + } + break; } // type is int32u case MN::PowerDivisor::Id: { - using T = MN::PowerDivisor::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) { - sl_log_debug(LOG_TAG, "PowerDivisor attribute value is %s", unify_value.dump().c_str()); - UN::PowerDivisor::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::ElectricalMeasurement::Id, MN::PowerDivisor::Id); - } - break; + using T = MN::PowerDivisor::TypeInfo::Type; + std::optional value = from_json(unify_value); + + if( value.has_value()) { + sl_log_debug(LOG_TAG,"PowerDivisor attribute value is %s",unify_value.dump().c_str()); + UN::PowerDivisor::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback( + node_matter_endpoint, + Clusters::ElectricalMeasurement::Id, + MN::PowerDivisor::Id); + } + break; } // type is int8s case MN::HarmonicCurrentMultiplier::Id: { - using T = MN::HarmonicCurrentMultiplier::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) { - sl_log_debug(LOG_TAG, "HarmonicCurrentMultiplier attribute value is %s", unify_value.dump().c_str()); - UN::HarmonicCurrentMultiplier::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::ElectricalMeasurement::Id, - MN::HarmonicCurrentMultiplier::Id); - } - break; + using T = MN::HarmonicCurrentMultiplier::TypeInfo::Type; + std::optional value = from_json(unify_value); + + if( value.has_value()) { + sl_log_debug(LOG_TAG,"HarmonicCurrentMultiplier attribute value is %s",unify_value.dump().c_str()); + UN::HarmonicCurrentMultiplier::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback( + node_matter_endpoint, + Clusters::ElectricalMeasurement::Id, + MN::HarmonicCurrentMultiplier::Id); + } + break; } // type is int8s case MN::PhaseHarmonicCurrentMultiplier::Id: { - using T = MN::PhaseHarmonicCurrentMultiplier::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) { - sl_log_debug(LOG_TAG, "PhaseHarmonicCurrentMultiplier attribute value is %s", unify_value.dump().c_str()); - UN::PhaseHarmonicCurrentMultiplier::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::ElectricalMeasurement::Id, - MN::PhaseHarmonicCurrentMultiplier::Id); - } - break; + using T = MN::PhaseHarmonicCurrentMultiplier::TypeInfo::Type; + std::optional value = from_json(unify_value); + + if( value.has_value()) { + sl_log_debug(LOG_TAG,"PhaseHarmonicCurrentMultiplier attribute value is %s",unify_value.dump().c_str()); + UN::PhaseHarmonicCurrentMultiplier::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback( + node_matter_endpoint, + Clusters::ElectricalMeasurement::Id, + MN::PhaseHarmonicCurrentMultiplier::Id); + } + break; } // type is int16u case MN::InstantaneousLineCurrent::Id: { - using T = MN::InstantaneousLineCurrent::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) { - sl_log_debug(LOG_TAG, "InstantaneousLineCurrent attribute value is %s", unify_value.dump().c_str()); - UN::InstantaneousLineCurrent::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::ElectricalMeasurement::Id, - MN::InstantaneousLineCurrent::Id); - } - break; + using T = MN::InstantaneousLineCurrent::TypeInfo::Type; + std::optional value = from_json(unify_value); + + if( value.has_value()) { + sl_log_debug(LOG_TAG,"InstantaneousLineCurrent attribute value is %s",unify_value.dump().c_str()); + UN::InstantaneousLineCurrent::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback( + node_matter_endpoint, + Clusters::ElectricalMeasurement::Id, + MN::InstantaneousLineCurrent::Id); + } + break; } // type is int16s case MN::InstantaneousActiveCurrent::Id: { - using T = MN::InstantaneousActiveCurrent::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) { - sl_log_debug(LOG_TAG, "InstantaneousActiveCurrent attribute value is %s", unify_value.dump().c_str()); - UN::InstantaneousActiveCurrent::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::ElectricalMeasurement::Id, - MN::InstantaneousActiveCurrent::Id); - } - break; + using T = MN::InstantaneousActiveCurrent::TypeInfo::Type; + std::optional value = from_json(unify_value); + + if( value.has_value()) { + sl_log_debug(LOG_TAG,"InstantaneousActiveCurrent attribute value is %s",unify_value.dump().c_str()); + UN::InstantaneousActiveCurrent::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback( + node_matter_endpoint, + Clusters::ElectricalMeasurement::Id, + MN::InstantaneousActiveCurrent::Id); + } + break; } // type is int16s case MN::InstantaneousReactiveCurrent::Id: { - using T = MN::InstantaneousReactiveCurrent::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) { - sl_log_debug(LOG_TAG, "InstantaneousReactiveCurrent attribute value is %s", unify_value.dump().c_str()); - UN::InstantaneousReactiveCurrent::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::ElectricalMeasurement::Id, - MN::InstantaneousReactiveCurrent::Id); - } - break; + using T = MN::InstantaneousReactiveCurrent::TypeInfo::Type; + std::optional value = from_json(unify_value); + + if( value.has_value()) { + sl_log_debug(LOG_TAG,"InstantaneousReactiveCurrent attribute value is %s",unify_value.dump().c_str()); + UN::InstantaneousReactiveCurrent::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback( + node_matter_endpoint, + Clusters::ElectricalMeasurement::Id, + MN::InstantaneousReactiveCurrent::Id); + } + break; } // type is int16u case MN::RmsVoltage::Id: { - using T = MN::RmsVoltage::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) { - sl_log_debug(LOG_TAG, "RmsVoltage attribute value is %s", unify_value.dump().c_str()); - UN::RmsVoltage::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::ElectricalMeasurement::Id, MN::RmsVoltage::Id); - } - break; + using T = MN::RmsVoltage::TypeInfo::Type; + std::optional value = from_json(unify_value); + + if( value.has_value()) { + sl_log_debug(LOG_TAG,"RmsVoltage attribute value is %s",unify_value.dump().c_str()); + UN::RmsVoltage::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback( + node_matter_endpoint, + Clusters::ElectricalMeasurement::Id, + MN::RmsVoltage::Id); + } + break; } // type is int16u case MN::RmsVoltageMin::Id: { - using T = MN::RmsVoltageMin::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) { - sl_log_debug(LOG_TAG, "RmsVoltageMin attribute value is %s", unify_value.dump().c_str()); - UN::RmsVoltageMin::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::ElectricalMeasurement::Id, - MN::RmsVoltageMin::Id); - } - break; + using T = MN::RmsVoltageMin::TypeInfo::Type; + std::optional value = from_json(unify_value); + + if( value.has_value()) { + sl_log_debug(LOG_TAG,"RmsVoltageMin attribute value is %s",unify_value.dump().c_str()); + UN::RmsVoltageMin::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback( + node_matter_endpoint, + Clusters::ElectricalMeasurement::Id, + MN::RmsVoltageMin::Id); + } + break; } // type is int16u case MN::RmsVoltageMax::Id: { - using T = MN::RmsVoltageMax::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) { - sl_log_debug(LOG_TAG, "RmsVoltageMax attribute value is %s", unify_value.dump().c_str()); - UN::RmsVoltageMax::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::ElectricalMeasurement::Id, - MN::RmsVoltageMax::Id); - } - break; + using T = MN::RmsVoltageMax::TypeInfo::Type; + std::optional value = from_json(unify_value); + + if( value.has_value()) { + sl_log_debug(LOG_TAG,"RmsVoltageMax attribute value is %s",unify_value.dump().c_str()); + UN::RmsVoltageMax::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback( + node_matter_endpoint, + Clusters::ElectricalMeasurement::Id, + MN::RmsVoltageMax::Id); + } + break; } // type is int16u case MN::RmsCurrent::Id: { - using T = MN::RmsCurrent::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) { - sl_log_debug(LOG_TAG, "RmsCurrent attribute value is %s", unify_value.dump().c_str()); - UN::RmsCurrent::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::ElectricalMeasurement::Id, MN::RmsCurrent::Id); - } - break; + using T = MN::RmsCurrent::TypeInfo::Type; + std::optional value = from_json(unify_value); + + if( value.has_value()) { + sl_log_debug(LOG_TAG,"RmsCurrent attribute value is %s",unify_value.dump().c_str()); + UN::RmsCurrent::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback( + node_matter_endpoint, + Clusters::ElectricalMeasurement::Id, + MN::RmsCurrent::Id); + } + break; } // type is int16u case MN::RmsCurrentMin::Id: { - using T = MN::RmsCurrentMin::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) { - sl_log_debug(LOG_TAG, "RmsCurrentMin attribute value is %s", unify_value.dump().c_str()); - UN::RmsCurrentMin::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::ElectricalMeasurement::Id, - MN::RmsCurrentMin::Id); - } - break; + using T = MN::RmsCurrentMin::TypeInfo::Type; + std::optional value = from_json(unify_value); + + if( value.has_value()) { + sl_log_debug(LOG_TAG,"RmsCurrentMin attribute value is %s",unify_value.dump().c_str()); + UN::RmsCurrentMin::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback( + node_matter_endpoint, + Clusters::ElectricalMeasurement::Id, + MN::RmsCurrentMin::Id); + } + break; } // type is int16u case MN::RmsCurrentMax::Id: { - using T = MN::RmsCurrentMax::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) { - sl_log_debug(LOG_TAG, "RmsCurrentMax attribute value is %s", unify_value.dump().c_str()); - UN::RmsCurrentMax::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::ElectricalMeasurement::Id, - MN::RmsCurrentMax::Id); - } - break; + using T = MN::RmsCurrentMax::TypeInfo::Type; + std::optional value = from_json(unify_value); + + if( value.has_value()) { + sl_log_debug(LOG_TAG,"RmsCurrentMax attribute value is %s",unify_value.dump().c_str()); + UN::RmsCurrentMax::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback( + node_matter_endpoint, + Clusters::ElectricalMeasurement::Id, + MN::RmsCurrentMax::Id); + } + break; } // type is int16s case MN::ActivePower::Id: { - using T = MN::ActivePower::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) { - sl_log_debug(LOG_TAG, "ActivePower attribute value is %s", unify_value.dump().c_str()); - UN::ActivePower::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::ElectricalMeasurement::Id, MN::ActivePower::Id); - } - break; + using T = MN::ActivePower::TypeInfo::Type; + std::optional value = from_json(unify_value); + + if( value.has_value()) { + sl_log_debug(LOG_TAG,"ActivePower attribute value is %s",unify_value.dump().c_str()); + UN::ActivePower::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback( + node_matter_endpoint, + Clusters::ElectricalMeasurement::Id, + MN::ActivePower::Id); + } + break; } // type is int16s case MN::ActivePowerMin::Id: { - using T = MN::ActivePowerMin::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) { - sl_log_debug(LOG_TAG, "ActivePowerMin attribute value is %s", unify_value.dump().c_str()); - UN::ActivePowerMin::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::ElectricalMeasurement::Id, - MN::ActivePowerMin::Id); - } - break; + using T = MN::ActivePowerMin::TypeInfo::Type; + std::optional value = from_json(unify_value); + + if( value.has_value()) { + sl_log_debug(LOG_TAG,"ActivePowerMin attribute value is %s",unify_value.dump().c_str()); + UN::ActivePowerMin::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback( + node_matter_endpoint, + Clusters::ElectricalMeasurement::Id, + MN::ActivePowerMin::Id); + } + break; } // type is int16s case MN::ActivePowerMax::Id: { - using T = MN::ActivePowerMax::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) { - sl_log_debug(LOG_TAG, "ActivePowerMax attribute value is %s", unify_value.dump().c_str()); - UN::ActivePowerMax::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::ElectricalMeasurement::Id, - MN::ActivePowerMax::Id); - } - break; + using T = MN::ActivePowerMax::TypeInfo::Type; + std::optional value = from_json(unify_value); + + if( value.has_value()) { + sl_log_debug(LOG_TAG,"ActivePowerMax attribute value is %s",unify_value.dump().c_str()); + UN::ActivePowerMax::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback( + node_matter_endpoint, + Clusters::ElectricalMeasurement::Id, + MN::ActivePowerMax::Id); + } + break; } // type is int16s case MN::ReactivePower::Id: { - using T = MN::ReactivePower::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) { - sl_log_debug(LOG_TAG, "ReactivePower attribute value is %s", unify_value.dump().c_str()); - UN::ReactivePower::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::ElectricalMeasurement::Id, - MN::ReactivePower::Id); - } - break; + using T = MN::ReactivePower::TypeInfo::Type; + std::optional value = from_json(unify_value); + + if( value.has_value()) { + sl_log_debug(LOG_TAG,"ReactivePower attribute value is %s",unify_value.dump().c_str()); + UN::ReactivePower::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback( + node_matter_endpoint, + Clusters::ElectricalMeasurement::Id, + MN::ReactivePower::Id); + } + break; } // type is int16u case MN::ApparentPower::Id: { - using T = MN::ApparentPower::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) { - sl_log_debug(LOG_TAG, "ApparentPower attribute value is %s", unify_value.dump().c_str()); - UN::ApparentPower::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::ElectricalMeasurement::Id, - MN::ApparentPower::Id); - } - break; + using T = MN::ApparentPower::TypeInfo::Type; + std::optional value = from_json(unify_value); + + if( value.has_value()) { + sl_log_debug(LOG_TAG,"ApparentPower attribute value is %s",unify_value.dump().c_str()); + UN::ApparentPower::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback( + node_matter_endpoint, + Clusters::ElectricalMeasurement::Id, + MN::ApparentPower::Id); + } + break; } // type is int8s case MN::PowerFactor::Id: { - using T = MN::PowerFactor::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) { - sl_log_debug(LOG_TAG, "PowerFactor attribute value is %s", unify_value.dump().c_str()); - UN::PowerFactor::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::ElectricalMeasurement::Id, MN::PowerFactor::Id); - } - break; + using T = MN::PowerFactor::TypeInfo::Type; + std::optional value = from_json(unify_value); + + if( value.has_value()) { + sl_log_debug(LOG_TAG,"PowerFactor attribute value is %s",unify_value.dump().c_str()); + UN::PowerFactor::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback( + node_matter_endpoint, + Clusters::ElectricalMeasurement::Id, + MN::PowerFactor::Id); + } + break; } // type is int16u case MN::AverageRmsVoltageMeasurementPeriod::Id: { - using T = MN::AverageRmsVoltageMeasurementPeriod::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) { - sl_log_debug(LOG_TAG, "AverageRmsVoltageMeasurementPeriod attribute value is %s", unify_value.dump().c_str()); - UN::AverageRmsVoltageMeasurementPeriod::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::ElectricalMeasurement::Id, - MN::AverageRmsVoltageMeasurementPeriod::Id); - } - break; + using T = MN::AverageRmsVoltageMeasurementPeriod::TypeInfo::Type; + std::optional value = from_json(unify_value); + + if( value.has_value()) { + sl_log_debug(LOG_TAG,"AverageRmsVoltageMeasurementPeriod attribute value is %s",unify_value.dump().c_str()); + UN::AverageRmsVoltageMeasurementPeriod::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback( + node_matter_endpoint, + Clusters::ElectricalMeasurement::Id, + MN::AverageRmsVoltageMeasurementPeriod::Id); + } + break; } // type is int16u case MN::AverageRmsUnderVoltageCounter::Id: { - using T = MN::AverageRmsUnderVoltageCounter::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) { - sl_log_debug(LOG_TAG, "AverageRmsUnderVoltageCounter attribute value is %s", unify_value.dump().c_str()); - UN::AverageRmsUnderVoltageCounter::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::ElectricalMeasurement::Id, - MN::AverageRmsUnderVoltageCounter::Id); - } - break; + using T = MN::AverageRmsUnderVoltageCounter::TypeInfo::Type; + std::optional value = from_json(unify_value); + + if( value.has_value()) { + sl_log_debug(LOG_TAG,"AverageRmsUnderVoltageCounter attribute value is %s",unify_value.dump().c_str()); + UN::AverageRmsUnderVoltageCounter::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback( + node_matter_endpoint, + Clusters::ElectricalMeasurement::Id, + MN::AverageRmsUnderVoltageCounter::Id); + } + break; } // type is int16u case MN::RmsExtremeOverVoltagePeriod::Id: { - using T = MN::RmsExtremeOverVoltagePeriod::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) { - sl_log_debug(LOG_TAG, "RmsExtremeOverVoltagePeriod attribute value is %s", unify_value.dump().c_str()); - UN::RmsExtremeOverVoltagePeriod::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::ElectricalMeasurement::Id, - MN::RmsExtremeOverVoltagePeriod::Id); - } - break; + using T = MN::RmsExtremeOverVoltagePeriod::TypeInfo::Type; + std::optional value = from_json(unify_value); + + if( value.has_value()) { + sl_log_debug(LOG_TAG,"RmsExtremeOverVoltagePeriod attribute value is %s",unify_value.dump().c_str()); + UN::RmsExtremeOverVoltagePeriod::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback( + node_matter_endpoint, + Clusters::ElectricalMeasurement::Id, + MN::RmsExtremeOverVoltagePeriod::Id); + } + break; } // type is int16u case MN::RmsExtremeUnderVoltagePeriod::Id: { - using T = MN::RmsExtremeUnderVoltagePeriod::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) { - sl_log_debug(LOG_TAG, "RmsExtremeUnderVoltagePeriod attribute value is %s", unify_value.dump().c_str()); - UN::RmsExtremeUnderVoltagePeriod::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::ElectricalMeasurement::Id, - MN::RmsExtremeUnderVoltagePeriod::Id); - } - break; + using T = MN::RmsExtremeUnderVoltagePeriod::TypeInfo::Type; + std::optional value = from_json(unify_value); + + if( value.has_value()) { + sl_log_debug(LOG_TAG,"RmsExtremeUnderVoltagePeriod attribute value is %s",unify_value.dump().c_str()); + UN::RmsExtremeUnderVoltagePeriod::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback( + node_matter_endpoint, + Clusters::ElectricalMeasurement::Id, + MN::RmsExtremeUnderVoltagePeriod::Id); + } + break; } // type is int16u case MN::RmsVoltageSagPeriod::Id: { - using T = MN::RmsVoltageSagPeriod::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) { - sl_log_debug(LOG_TAG, "RmsVoltageSagPeriod attribute value is %s", unify_value.dump().c_str()); - UN::RmsVoltageSagPeriod::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::ElectricalMeasurement::Id, - MN::RmsVoltageSagPeriod::Id); - } - break; + using T = MN::RmsVoltageSagPeriod::TypeInfo::Type; + std::optional value = from_json(unify_value); + + if( value.has_value()) { + sl_log_debug(LOG_TAG,"RmsVoltageSagPeriod attribute value is %s",unify_value.dump().c_str()); + UN::RmsVoltageSagPeriod::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback( + node_matter_endpoint, + Clusters::ElectricalMeasurement::Id, + MN::RmsVoltageSagPeriod::Id); + } + break; } // type is int16u case MN::RmsVoltageSwellPeriod::Id: { - using T = MN::RmsVoltageSwellPeriod::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) { - sl_log_debug(LOG_TAG, "RmsVoltageSwellPeriod attribute value is %s", unify_value.dump().c_str()); - UN::RmsVoltageSwellPeriod::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::ElectricalMeasurement::Id, - MN::RmsVoltageSwellPeriod::Id); - } - break; + using T = MN::RmsVoltageSwellPeriod::TypeInfo::Type; + std::optional value = from_json(unify_value); + + if( value.has_value()) { + sl_log_debug(LOG_TAG,"RmsVoltageSwellPeriod attribute value is %s",unify_value.dump().c_str()); + UN::RmsVoltageSwellPeriod::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback( + node_matter_endpoint, + Clusters::ElectricalMeasurement::Id, + MN::RmsVoltageSwellPeriod::Id); + } + break; } // type is int16u case MN::AcVoltageMultiplier::Id: { - using T = MN::AcVoltageMultiplier::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) { - sl_log_debug(LOG_TAG, "AcVoltageMultiplier attribute value is %s", unify_value.dump().c_str()); - UN::AcVoltageMultiplier::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::ElectricalMeasurement::Id, - MN::AcVoltageMultiplier::Id); - } - break; + using T = MN::AcVoltageMultiplier::TypeInfo::Type; + std::optional value = from_json(unify_value); + + if( value.has_value()) { + sl_log_debug(LOG_TAG,"AcVoltageMultiplier attribute value is %s",unify_value.dump().c_str()); + UN::AcVoltageMultiplier::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback( + node_matter_endpoint, + Clusters::ElectricalMeasurement::Id, + MN::AcVoltageMultiplier::Id); + } + break; } // type is int16u case MN::AcVoltageDivisor::Id: { - using T = MN::AcVoltageDivisor::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) { - sl_log_debug(LOG_TAG, "AcVoltageDivisor attribute value is %s", unify_value.dump().c_str()); - UN::AcVoltageDivisor::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::ElectricalMeasurement::Id, - MN::AcVoltageDivisor::Id); - } - break; + using T = MN::AcVoltageDivisor::TypeInfo::Type; + std::optional value = from_json(unify_value); + + if( value.has_value()) { + sl_log_debug(LOG_TAG,"AcVoltageDivisor attribute value is %s",unify_value.dump().c_str()); + UN::AcVoltageDivisor::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback( + node_matter_endpoint, + Clusters::ElectricalMeasurement::Id, + MN::AcVoltageDivisor::Id); + } + break; } // type is int16u case MN::AcCurrentMultiplier::Id: { - using T = MN::AcCurrentMultiplier::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) { - sl_log_debug(LOG_TAG, "AcCurrentMultiplier attribute value is %s", unify_value.dump().c_str()); - UN::AcCurrentMultiplier::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::ElectricalMeasurement::Id, - MN::AcCurrentMultiplier::Id); - } - break; + using T = MN::AcCurrentMultiplier::TypeInfo::Type; + std::optional value = from_json(unify_value); + + if( value.has_value()) { + sl_log_debug(LOG_TAG,"AcCurrentMultiplier attribute value is %s",unify_value.dump().c_str()); + UN::AcCurrentMultiplier::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback( + node_matter_endpoint, + Clusters::ElectricalMeasurement::Id, + MN::AcCurrentMultiplier::Id); + } + break; } // type is int16u case MN::AcCurrentDivisor::Id: { - using T = MN::AcCurrentDivisor::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) { - sl_log_debug(LOG_TAG, "AcCurrentDivisor attribute value is %s", unify_value.dump().c_str()); - UN::AcCurrentDivisor::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::ElectricalMeasurement::Id, - MN::AcCurrentDivisor::Id); - } - break; + using T = MN::AcCurrentDivisor::TypeInfo::Type; + std::optional value = from_json(unify_value); + + if( value.has_value()) { + sl_log_debug(LOG_TAG,"AcCurrentDivisor attribute value is %s",unify_value.dump().c_str()); + UN::AcCurrentDivisor::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback( + node_matter_endpoint, + Clusters::ElectricalMeasurement::Id, + MN::AcCurrentDivisor::Id); + } + break; } // type is int16u case MN::AcPowerMultiplier::Id: { - using T = MN::AcPowerMultiplier::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) { - sl_log_debug(LOG_TAG, "AcPowerMultiplier attribute value is %s", unify_value.dump().c_str()); - UN::AcPowerMultiplier::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::ElectricalMeasurement::Id, - MN::AcPowerMultiplier::Id); - } - break; + using T = MN::AcPowerMultiplier::TypeInfo::Type; + std::optional value = from_json(unify_value); + + if( value.has_value()) { + sl_log_debug(LOG_TAG,"AcPowerMultiplier attribute value is %s",unify_value.dump().c_str()); + UN::AcPowerMultiplier::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback( + node_matter_endpoint, + Clusters::ElectricalMeasurement::Id, + MN::AcPowerMultiplier::Id); + } + break; } // type is int16u case MN::AcPowerDivisor::Id: { - using T = MN::AcPowerDivisor::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) { - sl_log_debug(LOG_TAG, "AcPowerDivisor attribute value is %s", unify_value.dump().c_str()); - UN::AcPowerDivisor::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::ElectricalMeasurement::Id, - MN::AcPowerDivisor::Id); - } - break; + using T = MN::AcPowerDivisor::TypeInfo::Type; + std::optional value = from_json(unify_value); + + if( value.has_value()) { + sl_log_debug(LOG_TAG,"AcPowerDivisor attribute value is %s",unify_value.dump().c_str()); + UN::AcPowerDivisor::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback( + node_matter_endpoint, + Clusters::ElectricalMeasurement::Id, + MN::AcPowerDivisor::Id); + } + break; } // type is bitmap8 case MN::OverloadAlarmsMask::Id: { - using T = MN::OverloadAlarmsMask::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) { - sl_log_debug(LOG_TAG, "OverloadAlarmsMask attribute value is %s", unify_value.dump().c_str()); - UN::OverloadAlarmsMask::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::ElectricalMeasurement::Id, - MN::OverloadAlarmsMask::Id); - } - break; + using T = MN::OverloadAlarmsMask::TypeInfo::Type; + std::optional value = from_json(unify_value); + + if( value.has_value()) { + sl_log_debug(LOG_TAG,"OverloadAlarmsMask attribute value is %s",unify_value.dump().c_str()); + UN::OverloadAlarmsMask::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback( + node_matter_endpoint, + Clusters::ElectricalMeasurement::Id, + MN::OverloadAlarmsMask::Id); + } + break; } // type is int16s case MN::VoltageOverload::Id: { - using T = MN::VoltageOverload::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) { - sl_log_debug(LOG_TAG, "VoltageOverload attribute value is %s", unify_value.dump().c_str()); - UN::VoltageOverload::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::ElectricalMeasurement::Id, - MN::VoltageOverload::Id); - } - break; + using T = MN::VoltageOverload::TypeInfo::Type; + std::optional value = from_json(unify_value); + + if( value.has_value()) { + sl_log_debug(LOG_TAG,"VoltageOverload attribute value is %s",unify_value.dump().c_str()); + UN::VoltageOverload::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback( + node_matter_endpoint, + Clusters::ElectricalMeasurement::Id, + MN::VoltageOverload::Id); + } + break; } // type is int16s case MN::CurrentOverload::Id: { - using T = MN::CurrentOverload::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) { - sl_log_debug(LOG_TAG, "CurrentOverload attribute value is %s", unify_value.dump().c_str()); - UN::CurrentOverload::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::ElectricalMeasurement::Id, - MN::CurrentOverload::Id); - } - break; + using T = MN::CurrentOverload::TypeInfo::Type; + std::optional value = from_json(unify_value); + + if( value.has_value()) { + sl_log_debug(LOG_TAG,"CurrentOverload attribute value is %s",unify_value.dump().c_str()); + UN::CurrentOverload::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback( + node_matter_endpoint, + Clusters::ElectricalMeasurement::Id, + MN::CurrentOverload::Id); + } + break; } // type is bitmap16 case MN::AcOverloadAlarmsMask::Id: { - using T = MN::AcOverloadAlarmsMask::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) { - sl_log_debug(LOG_TAG, "AcOverloadAlarmsMask attribute value is %s", unify_value.dump().c_str()); - UN::AcOverloadAlarmsMask::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::ElectricalMeasurement::Id, - MN::AcOverloadAlarmsMask::Id); - } - break; + using T = MN::AcOverloadAlarmsMask::TypeInfo::Type; + std::optional value = from_json(unify_value); + + if( value.has_value()) { + sl_log_debug(LOG_TAG,"AcOverloadAlarmsMask attribute value is %s",unify_value.dump().c_str()); + UN::AcOverloadAlarmsMask::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback( + node_matter_endpoint, + Clusters::ElectricalMeasurement::Id, + MN::AcOverloadAlarmsMask::Id); + } + break; } // type is int16s case MN::AcVoltageOverload::Id: { - using T = MN::AcVoltageOverload::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) { - sl_log_debug(LOG_TAG, "AcVoltageOverload attribute value is %s", unify_value.dump().c_str()); - UN::AcVoltageOverload::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::ElectricalMeasurement::Id, - MN::AcVoltageOverload::Id); - } - break; + using T = MN::AcVoltageOverload::TypeInfo::Type; + std::optional value = from_json(unify_value); + + if( value.has_value()) { + sl_log_debug(LOG_TAG,"AcVoltageOverload attribute value is %s",unify_value.dump().c_str()); + UN::AcVoltageOverload::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback( + node_matter_endpoint, + Clusters::ElectricalMeasurement::Id, + MN::AcVoltageOverload::Id); + } + break; } // type is int16s case MN::AcCurrentOverload::Id: { - using T = MN::AcCurrentOverload::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) { - sl_log_debug(LOG_TAG, "AcCurrentOverload attribute value is %s", unify_value.dump().c_str()); - UN::AcCurrentOverload::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::ElectricalMeasurement::Id, - MN::AcCurrentOverload::Id); - } - break; + using T = MN::AcCurrentOverload::TypeInfo::Type; + std::optional value = from_json(unify_value); + + if( value.has_value()) { + sl_log_debug(LOG_TAG,"AcCurrentOverload attribute value is %s",unify_value.dump().c_str()); + UN::AcCurrentOverload::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback( + node_matter_endpoint, + Clusters::ElectricalMeasurement::Id, + MN::AcCurrentOverload::Id); + } + break; } // type is int16s case MN::AcActivePowerOverload::Id: { - using T = MN::AcActivePowerOverload::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) { - sl_log_debug(LOG_TAG, "AcActivePowerOverload attribute value is %s", unify_value.dump().c_str()); - UN::AcActivePowerOverload::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::ElectricalMeasurement::Id, - MN::AcActivePowerOverload::Id); - } - break; + using T = MN::AcActivePowerOverload::TypeInfo::Type; + std::optional value = from_json(unify_value); + + if( value.has_value()) { + sl_log_debug(LOG_TAG,"AcActivePowerOverload attribute value is %s",unify_value.dump().c_str()); + UN::AcActivePowerOverload::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback( + node_matter_endpoint, + Clusters::ElectricalMeasurement::Id, + MN::AcActivePowerOverload::Id); + } + break; } // type is int16s case MN::AcReactivePowerOverload::Id: { - using T = MN::AcReactivePowerOverload::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) { - sl_log_debug(LOG_TAG, "AcReactivePowerOverload attribute value is %s", unify_value.dump().c_str()); - UN::AcReactivePowerOverload::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::ElectricalMeasurement::Id, - MN::AcReactivePowerOverload::Id); - } - break; + using T = MN::AcReactivePowerOverload::TypeInfo::Type; + std::optional value = from_json(unify_value); + + if( value.has_value()) { + sl_log_debug(LOG_TAG,"AcReactivePowerOverload attribute value is %s",unify_value.dump().c_str()); + UN::AcReactivePowerOverload::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback( + node_matter_endpoint, + Clusters::ElectricalMeasurement::Id, + MN::AcReactivePowerOverload::Id); + } + break; } // type is int16s case MN::AverageRmsOverVoltage::Id: { - using T = MN::AverageRmsOverVoltage::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) { - sl_log_debug(LOG_TAG, "AverageRmsOverVoltage attribute value is %s", unify_value.dump().c_str()); - UN::AverageRmsOverVoltage::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::ElectricalMeasurement::Id, - MN::AverageRmsOverVoltage::Id); - } - break; + using T = MN::AverageRmsOverVoltage::TypeInfo::Type; + std::optional value = from_json(unify_value); + + if( value.has_value()) { + sl_log_debug(LOG_TAG,"AverageRmsOverVoltage attribute value is %s",unify_value.dump().c_str()); + UN::AverageRmsOverVoltage::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback( + node_matter_endpoint, + Clusters::ElectricalMeasurement::Id, + MN::AverageRmsOverVoltage::Id); + } + break; } // type is int16s case MN::AverageRmsUnderVoltage::Id: { - using T = MN::AverageRmsUnderVoltage::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) { - sl_log_debug(LOG_TAG, "AverageRmsUnderVoltage attribute value is %s", unify_value.dump().c_str()); - UN::AverageRmsUnderVoltage::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::ElectricalMeasurement::Id, - MN::AverageRmsUnderVoltage::Id); - } - break; + using T = MN::AverageRmsUnderVoltage::TypeInfo::Type; + std::optional value = from_json(unify_value); + + if( value.has_value()) { + sl_log_debug(LOG_TAG,"AverageRmsUnderVoltage attribute value is %s",unify_value.dump().c_str()); + UN::AverageRmsUnderVoltage::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback( + node_matter_endpoint, + Clusters::ElectricalMeasurement::Id, + MN::AverageRmsUnderVoltage::Id); + } + break; } // type is int16s case MN::RmsExtremeOverVoltage::Id: { - using T = MN::RmsExtremeOverVoltage::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) { - sl_log_debug(LOG_TAG, "RmsExtremeOverVoltage attribute value is %s", unify_value.dump().c_str()); - UN::RmsExtremeOverVoltage::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::ElectricalMeasurement::Id, - MN::RmsExtremeOverVoltage::Id); - } - break; + using T = MN::RmsExtremeOverVoltage::TypeInfo::Type; + std::optional value = from_json(unify_value); + + if( value.has_value()) { + sl_log_debug(LOG_TAG,"RmsExtremeOverVoltage attribute value is %s",unify_value.dump().c_str()); + UN::RmsExtremeOverVoltage::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback( + node_matter_endpoint, + Clusters::ElectricalMeasurement::Id, + MN::RmsExtremeOverVoltage::Id); + } + break; } // type is int16s case MN::RmsExtremeUnderVoltage::Id: { - using T = MN::RmsExtremeUnderVoltage::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) { - sl_log_debug(LOG_TAG, "RmsExtremeUnderVoltage attribute value is %s", unify_value.dump().c_str()); - UN::RmsExtremeUnderVoltage::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::ElectricalMeasurement::Id, - MN::RmsExtremeUnderVoltage::Id); - } - break; + using T = MN::RmsExtremeUnderVoltage::TypeInfo::Type; + std::optional value = from_json(unify_value); + + if( value.has_value()) { + sl_log_debug(LOG_TAG,"RmsExtremeUnderVoltage attribute value is %s",unify_value.dump().c_str()); + UN::RmsExtremeUnderVoltage::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback( + node_matter_endpoint, + Clusters::ElectricalMeasurement::Id, + MN::RmsExtremeUnderVoltage::Id); + } + break; } // type is int16s case MN::RmsVoltageSag::Id: { - using T = MN::RmsVoltageSag::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) { - sl_log_debug(LOG_TAG, "RmsVoltageSag attribute value is %s", unify_value.dump().c_str()); - UN::RmsVoltageSag::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::ElectricalMeasurement::Id, - MN::RmsVoltageSag::Id); - } - break; + using T = MN::RmsVoltageSag::TypeInfo::Type; + std::optional value = from_json(unify_value); + + if( value.has_value()) { + sl_log_debug(LOG_TAG,"RmsVoltageSag attribute value is %s",unify_value.dump().c_str()); + UN::RmsVoltageSag::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback( + node_matter_endpoint, + Clusters::ElectricalMeasurement::Id, + MN::RmsVoltageSag::Id); + } + break; } // type is int16s case MN::RmsVoltageSwell::Id: { - using T = MN::RmsVoltageSwell::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) { - sl_log_debug(LOG_TAG, "RmsVoltageSwell attribute value is %s", unify_value.dump().c_str()); - UN::RmsVoltageSwell::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::ElectricalMeasurement::Id, - MN::RmsVoltageSwell::Id); - } - break; + using T = MN::RmsVoltageSwell::TypeInfo::Type; + std::optional value = from_json(unify_value); + + if( value.has_value()) { + sl_log_debug(LOG_TAG,"RmsVoltageSwell attribute value is %s",unify_value.dump().c_str()); + UN::RmsVoltageSwell::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback( + node_matter_endpoint, + Clusters::ElectricalMeasurement::Id, + MN::RmsVoltageSwell::Id); + } + break; } // type is int16u case MN::LineCurrentPhaseB::Id: { - using T = MN::LineCurrentPhaseB::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) { - sl_log_debug(LOG_TAG, "LineCurrentPhaseB attribute value is %s", unify_value.dump().c_str()); - UN::LineCurrentPhaseB::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::ElectricalMeasurement::Id, - MN::LineCurrentPhaseB::Id); - } - break; + using T = MN::LineCurrentPhaseB::TypeInfo::Type; + std::optional value = from_json(unify_value); + + if( value.has_value()) { + sl_log_debug(LOG_TAG,"LineCurrentPhaseB attribute value is %s",unify_value.dump().c_str()); + UN::LineCurrentPhaseB::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback( + node_matter_endpoint, + Clusters::ElectricalMeasurement::Id, + MN::LineCurrentPhaseB::Id); + } + break; } // type is int16s case MN::ActiveCurrentPhaseB::Id: { - using T = MN::ActiveCurrentPhaseB::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) { - sl_log_debug(LOG_TAG, "ActiveCurrentPhaseB attribute value is %s", unify_value.dump().c_str()); - UN::ActiveCurrentPhaseB::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::ElectricalMeasurement::Id, - MN::ActiveCurrentPhaseB::Id); - } - break; + using T = MN::ActiveCurrentPhaseB::TypeInfo::Type; + std::optional value = from_json(unify_value); + + if( value.has_value()) { + sl_log_debug(LOG_TAG,"ActiveCurrentPhaseB attribute value is %s",unify_value.dump().c_str()); + UN::ActiveCurrentPhaseB::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback( + node_matter_endpoint, + Clusters::ElectricalMeasurement::Id, + MN::ActiveCurrentPhaseB::Id); + } + break; } // type is int16s case MN::ReactiveCurrentPhaseB::Id: { - using T = MN::ReactiveCurrentPhaseB::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) { - sl_log_debug(LOG_TAG, "ReactiveCurrentPhaseB attribute value is %s", unify_value.dump().c_str()); - UN::ReactiveCurrentPhaseB::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::ElectricalMeasurement::Id, - MN::ReactiveCurrentPhaseB::Id); - } - break; + using T = MN::ReactiveCurrentPhaseB::TypeInfo::Type; + std::optional value = from_json(unify_value); + + if( value.has_value()) { + sl_log_debug(LOG_TAG,"ReactiveCurrentPhaseB attribute value is %s",unify_value.dump().c_str()); + UN::ReactiveCurrentPhaseB::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback( + node_matter_endpoint, + Clusters::ElectricalMeasurement::Id, + MN::ReactiveCurrentPhaseB::Id); + } + break; } // type is int16u case MN::RmsVoltagePhaseB::Id: { - using T = MN::RmsVoltagePhaseB::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) { - sl_log_debug(LOG_TAG, "RmsVoltagePhaseB attribute value is %s", unify_value.dump().c_str()); - UN::RmsVoltagePhaseB::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::ElectricalMeasurement::Id, - MN::RmsVoltagePhaseB::Id); - } - break; + using T = MN::RmsVoltagePhaseB::TypeInfo::Type; + std::optional value = from_json(unify_value); + + if( value.has_value()) { + sl_log_debug(LOG_TAG,"RmsVoltagePhaseB attribute value is %s",unify_value.dump().c_str()); + UN::RmsVoltagePhaseB::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback( + node_matter_endpoint, + Clusters::ElectricalMeasurement::Id, + MN::RmsVoltagePhaseB::Id); + } + break; } // type is int16u case MN::RmsVoltageMinPhaseB::Id: { - using T = MN::RmsVoltageMinPhaseB::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) { - sl_log_debug(LOG_TAG, "RmsVoltageMinPhaseB attribute value is %s", unify_value.dump().c_str()); - UN::RmsVoltageMinPhaseB::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::ElectricalMeasurement::Id, - MN::RmsVoltageMinPhaseB::Id); - } - break; + using T = MN::RmsVoltageMinPhaseB::TypeInfo::Type; + std::optional value = from_json(unify_value); + + if( value.has_value()) { + sl_log_debug(LOG_TAG,"RmsVoltageMinPhaseB attribute value is %s",unify_value.dump().c_str()); + UN::RmsVoltageMinPhaseB::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback( + node_matter_endpoint, + Clusters::ElectricalMeasurement::Id, + MN::RmsVoltageMinPhaseB::Id); + } + break; } // type is int16u case MN::RmsVoltageMaxPhaseB::Id: { - using T = MN::RmsVoltageMaxPhaseB::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) { - sl_log_debug(LOG_TAG, "RmsVoltageMaxPhaseB attribute value is %s", unify_value.dump().c_str()); - UN::RmsVoltageMaxPhaseB::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::ElectricalMeasurement::Id, - MN::RmsVoltageMaxPhaseB::Id); - } - break; + using T = MN::RmsVoltageMaxPhaseB::TypeInfo::Type; + std::optional value = from_json(unify_value); + + if( value.has_value()) { + sl_log_debug(LOG_TAG,"RmsVoltageMaxPhaseB attribute value is %s",unify_value.dump().c_str()); + UN::RmsVoltageMaxPhaseB::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback( + node_matter_endpoint, + Clusters::ElectricalMeasurement::Id, + MN::RmsVoltageMaxPhaseB::Id); + } + break; } // type is int16u case MN::RmsCurrentPhaseB::Id: { - using T = MN::RmsCurrentPhaseB::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) { - sl_log_debug(LOG_TAG, "RmsCurrentPhaseB attribute value is %s", unify_value.dump().c_str()); - UN::RmsCurrentPhaseB::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::ElectricalMeasurement::Id, - MN::RmsCurrentPhaseB::Id); - } - break; + using T = MN::RmsCurrentPhaseB::TypeInfo::Type; + std::optional value = from_json(unify_value); + + if( value.has_value()) { + sl_log_debug(LOG_TAG,"RmsCurrentPhaseB attribute value is %s",unify_value.dump().c_str()); + UN::RmsCurrentPhaseB::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback( + node_matter_endpoint, + Clusters::ElectricalMeasurement::Id, + MN::RmsCurrentPhaseB::Id); + } + break; } // type is int16u case MN::RmsCurrentMinPhaseB::Id: { - using T = MN::RmsCurrentMinPhaseB::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) { - sl_log_debug(LOG_TAG, "RmsCurrentMinPhaseB attribute value is %s", unify_value.dump().c_str()); - UN::RmsCurrentMinPhaseB::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::ElectricalMeasurement::Id, - MN::RmsCurrentMinPhaseB::Id); - } - break; + using T = MN::RmsCurrentMinPhaseB::TypeInfo::Type; + std::optional value = from_json(unify_value); + + if( value.has_value()) { + sl_log_debug(LOG_TAG,"RmsCurrentMinPhaseB attribute value is %s",unify_value.dump().c_str()); + UN::RmsCurrentMinPhaseB::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback( + node_matter_endpoint, + Clusters::ElectricalMeasurement::Id, + MN::RmsCurrentMinPhaseB::Id); + } + break; } // type is int16u case MN::RmsCurrentMaxPhaseB::Id: { - using T = MN::RmsCurrentMaxPhaseB::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) { - sl_log_debug(LOG_TAG, "RmsCurrentMaxPhaseB attribute value is %s", unify_value.dump().c_str()); - UN::RmsCurrentMaxPhaseB::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::ElectricalMeasurement::Id, - MN::RmsCurrentMaxPhaseB::Id); - } - break; + using T = MN::RmsCurrentMaxPhaseB::TypeInfo::Type; + std::optional value = from_json(unify_value); + + if( value.has_value()) { + sl_log_debug(LOG_TAG,"RmsCurrentMaxPhaseB attribute value is %s",unify_value.dump().c_str()); + UN::RmsCurrentMaxPhaseB::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback( + node_matter_endpoint, + Clusters::ElectricalMeasurement::Id, + MN::RmsCurrentMaxPhaseB::Id); + } + break; } // type is int16s case MN::ActivePowerPhaseB::Id: { - using T = MN::ActivePowerPhaseB::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) { - sl_log_debug(LOG_TAG, "ActivePowerPhaseB attribute value is %s", unify_value.dump().c_str()); - UN::ActivePowerPhaseB::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::ElectricalMeasurement::Id, - MN::ActivePowerPhaseB::Id); - } - break; + using T = MN::ActivePowerPhaseB::TypeInfo::Type; + std::optional value = from_json(unify_value); + + if( value.has_value()) { + sl_log_debug(LOG_TAG,"ActivePowerPhaseB attribute value is %s",unify_value.dump().c_str()); + UN::ActivePowerPhaseB::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback( + node_matter_endpoint, + Clusters::ElectricalMeasurement::Id, + MN::ActivePowerPhaseB::Id); + } + break; } // type is int16s case MN::ActivePowerMinPhaseB::Id: { - using T = MN::ActivePowerMinPhaseB::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) { - sl_log_debug(LOG_TAG, "ActivePowerMinPhaseB attribute value is %s", unify_value.dump().c_str()); - UN::ActivePowerMinPhaseB::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::ElectricalMeasurement::Id, - MN::ActivePowerMinPhaseB::Id); - } - break; + using T = MN::ActivePowerMinPhaseB::TypeInfo::Type; + std::optional value = from_json(unify_value); + + if( value.has_value()) { + sl_log_debug(LOG_TAG,"ActivePowerMinPhaseB attribute value is %s",unify_value.dump().c_str()); + UN::ActivePowerMinPhaseB::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback( + node_matter_endpoint, + Clusters::ElectricalMeasurement::Id, + MN::ActivePowerMinPhaseB::Id); + } + break; } // type is int16s case MN::ActivePowerMaxPhaseB::Id: { - using T = MN::ActivePowerMaxPhaseB::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) { - sl_log_debug(LOG_TAG, "ActivePowerMaxPhaseB attribute value is %s", unify_value.dump().c_str()); - UN::ActivePowerMaxPhaseB::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::ElectricalMeasurement::Id, - MN::ActivePowerMaxPhaseB::Id); - } - break; + using T = MN::ActivePowerMaxPhaseB::TypeInfo::Type; + std::optional value = from_json(unify_value); + + if( value.has_value()) { + sl_log_debug(LOG_TAG,"ActivePowerMaxPhaseB attribute value is %s",unify_value.dump().c_str()); + UN::ActivePowerMaxPhaseB::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback( + node_matter_endpoint, + Clusters::ElectricalMeasurement::Id, + MN::ActivePowerMaxPhaseB::Id); + } + break; } // type is int16s case MN::ReactivePowerPhaseB::Id: { - using T = MN::ReactivePowerPhaseB::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) { - sl_log_debug(LOG_TAG, "ReactivePowerPhaseB attribute value is %s", unify_value.dump().c_str()); - UN::ReactivePowerPhaseB::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::ElectricalMeasurement::Id, - MN::ReactivePowerPhaseB::Id); - } - break; + using T = MN::ReactivePowerPhaseB::TypeInfo::Type; + std::optional value = from_json(unify_value); + + if( value.has_value()) { + sl_log_debug(LOG_TAG,"ReactivePowerPhaseB attribute value is %s",unify_value.dump().c_str()); + UN::ReactivePowerPhaseB::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback( + node_matter_endpoint, + Clusters::ElectricalMeasurement::Id, + MN::ReactivePowerPhaseB::Id); + } + break; } // type is int16u case MN::ApparentPowerPhaseB::Id: { - using T = MN::ApparentPowerPhaseB::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) { - sl_log_debug(LOG_TAG, "ApparentPowerPhaseB attribute value is %s", unify_value.dump().c_str()); - UN::ApparentPowerPhaseB::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::ElectricalMeasurement::Id, - MN::ApparentPowerPhaseB::Id); - } - break; + using T = MN::ApparentPowerPhaseB::TypeInfo::Type; + std::optional value = from_json(unify_value); + + if( value.has_value()) { + sl_log_debug(LOG_TAG,"ApparentPowerPhaseB attribute value is %s",unify_value.dump().c_str()); + UN::ApparentPowerPhaseB::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback( + node_matter_endpoint, + Clusters::ElectricalMeasurement::Id, + MN::ApparentPowerPhaseB::Id); + } + break; } // type is int8s case MN::PowerFactorPhaseB::Id: { - using T = MN::PowerFactorPhaseB::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) { - sl_log_debug(LOG_TAG, "PowerFactorPhaseB attribute value is %s", unify_value.dump().c_str()); - UN::PowerFactorPhaseB::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::ElectricalMeasurement::Id, - MN::PowerFactorPhaseB::Id); - } - break; + using T = MN::PowerFactorPhaseB::TypeInfo::Type; + std::optional value = from_json(unify_value); + + if( value.has_value()) { + sl_log_debug(LOG_TAG,"PowerFactorPhaseB attribute value is %s",unify_value.dump().c_str()); + UN::PowerFactorPhaseB::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback( + node_matter_endpoint, + Clusters::ElectricalMeasurement::Id, + MN::PowerFactorPhaseB::Id); + } + break; } // type is int16u case MN::AverageRmsVoltageMeasurementPeriodPhaseB::Id: { - using T = MN::AverageRmsVoltageMeasurementPeriodPhaseB::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) { - sl_log_debug(LOG_TAG, "AverageRmsVoltageMeasurementPeriodPhaseB attribute value is %s", unify_value.dump().c_str()); - UN::AverageRmsVoltageMeasurementPeriodPhaseB::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::ElectricalMeasurement::Id, - MN::AverageRmsVoltageMeasurementPeriodPhaseB::Id); - } - break; + using T = MN::AverageRmsVoltageMeasurementPeriodPhaseB::TypeInfo::Type; + std::optional value = from_json(unify_value); + + if( value.has_value()) { + sl_log_debug(LOG_TAG,"AverageRmsVoltageMeasurementPeriodPhaseB attribute value is %s",unify_value.dump().c_str()); + UN::AverageRmsVoltageMeasurementPeriodPhaseB::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback( + node_matter_endpoint, + Clusters::ElectricalMeasurement::Id, + MN::AverageRmsVoltageMeasurementPeriodPhaseB::Id); + } + break; } // type is int16u case MN::AverageRmsOverVoltageCounterPhaseB::Id: { - using T = MN::AverageRmsOverVoltageCounterPhaseB::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) { - sl_log_debug(LOG_TAG, "AverageRmsOverVoltageCounterPhaseB attribute value is %s", unify_value.dump().c_str()); - UN::AverageRmsOverVoltageCounterPhaseB::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::ElectricalMeasurement::Id, - MN::AverageRmsOverVoltageCounterPhaseB::Id); - } - break; + using T = MN::AverageRmsOverVoltageCounterPhaseB::TypeInfo::Type; + std::optional value = from_json(unify_value); + + if( value.has_value()) { + sl_log_debug(LOG_TAG,"AverageRmsOverVoltageCounterPhaseB attribute value is %s",unify_value.dump().c_str()); + UN::AverageRmsOverVoltageCounterPhaseB::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback( + node_matter_endpoint, + Clusters::ElectricalMeasurement::Id, + MN::AverageRmsOverVoltageCounterPhaseB::Id); + } + break; } // type is int16u case MN::AverageRmsUnderVoltageCounterPhaseB::Id: { - using T = MN::AverageRmsUnderVoltageCounterPhaseB::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) { - sl_log_debug(LOG_TAG, "AverageRmsUnderVoltageCounterPhaseB attribute value is %s", unify_value.dump().c_str()); - UN::AverageRmsUnderVoltageCounterPhaseB::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::ElectricalMeasurement::Id, - MN::AverageRmsUnderVoltageCounterPhaseB::Id); - } - break; + using T = MN::AverageRmsUnderVoltageCounterPhaseB::TypeInfo::Type; + std::optional value = from_json(unify_value); + + if( value.has_value()) { + sl_log_debug(LOG_TAG,"AverageRmsUnderVoltageCounterPhaseB attribute value is %s",unify_value.dump().c_str()); + UN::AverageRmsUnderVoltageCounterPhaseB::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback( + node_matter_endpoint, + Clusters::ElectricalMeasurement::Id, + MN::AverageRmsUnderVoltageCounterPhaseB::Id); + } + break; } // type is int16u case MN::RmsExtremeOverVoltagePeriodPhaseB::Id: { - using T = MN::RmsExtremeOverVoltagePeriodPhaseB::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) { - sl_log_debug(LOG_TAG, "RmsExtremeOverVoltagePeriodPhaseB attribute value is %s", unify_value.dump().c_str()); - UN::RmsExtremeOverVoltagePeriodPhaseB::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::ElectricalMeasurement::Id, - MN::RmsExtremeOverVoltagePeriodPhaseB::Id); - } - break; + using T = MN::RmsExtremeOverVoltagePeriodPhaseB::TypeInfo::Type; + std::optional value = from_json(unify_value); + + if( value.has_value()) { + sl_log_debug(LOG_TAG,"RmsExtremeOverVoltagePeriodPhaseB attribute value is %s",unify_value.dump().c_str()); + UN::RmsExtremeOverVoltagePeriodPhaseB::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback( + node_matter_endpoint, + Clusters::ElectricalMeasurement::Id, + MN::RmsExtremeOverVoltagePeriodPhaseB::Id); + } + break; } // type is int16u case MN::RmsExtremeUnderVoltagePeriodPhaseB::Id: { - using T = MN::RmsExtremeUnderVoltagePeriodPhaseB::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) { - sl_log_debug(LOG_TAG, "RmsExtremeUnderVoltagePeriodPhaseB attribute value is %s", unify_value.dump().c_str()); - UN::RmsExtremeUnderVoltagePeriodPhaseB::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::ElectricalMeasurement::Id, - MN::RmsExtremeUnderVoltagePeriodPhaseB::Id); - } - break; + using T = MN::RmsExtremeUnderVoltagePeriodPhaseB::TypeInfo::Type; + std::optional value = from_json(unify_value); + + if( value.has_value()) { + sl_log_debug(LOG_TAG,"RmsExtremeUnderVoltagePeriodPhaseB attribute value is %s",unify_value.dump().c_str()); + UN::RmsExtremeUnderVoltagePeriodPhaseB::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback( + node_matter_endpoint, + Clusters::ElectricalMeasurement::Id, + MN::RmsExtremeUnderVoltagePeriodPhaseB::Id); + } + break; } // type is int16u case MN::RmsVoltageSagPeriodPhaseB::Id: { - using T = MN::RmsVoltageSagPeriodPhaseB::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) { - sl_log_debug(LOG_TAG, "RmsVoltageSagPeriodPhaseB attribute value is %s", unify_value.dump().c_str()); - UN::RmsVoltageSagPeriodPhaseB::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::ElectricalMeasurement::Id, - MN::RmsVoltageSagPeriodPhaseB::Id); - } - break; + using T = MN::RmsVoltageSagPeriodPhaseB::TypeInfo::Type; + std::optional value = from_json(unify_value); + + if( value.has_value()) { + sl_log_debug(LOG_TAG,"RmsVoltageSagPeriodPhaseB attribute value is %s",unify_value.dump().c_str()); + UN::RmsVoltageSagPeriodPhaseB::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback( + node_matter_endpoint, + Clusters::ElectricalMeasurement::Id, + MN::RmsVoltageSagPeriodPhaseB::Id); + } + break; } // type is int16u case MN::RmsVoltageSwellPeriodPhaseB::Id: { - using T = MN::RmsVoltageSwellPeriodPhaseB::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) { - sl_log_debug(LOG_TAG, "RmsVoltageSwellPeriodPhaseB attribute value is %s", unify_value.dump().c_str()); - UN::RmsVoltageSwellPeriodPhaseB::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::ElectricalMeasurement::Id, - MN::RmsVoltageSwellPeriodPhaseB::Id); - } - break; + using T = MN::RmsVoltageSwellPeriodPhaseB::TypeInfo::Type; + std::optional value = from_json(unify_value); + + if( value.has_value()) { + sl_log_debug(LOG_TAG,"RmsVoltageSwellPeriodPhaseB attribute value is %s",unify_value.dump().c_str()); + UN::RmsVoltageSwellPeriodPhaseB::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback( + node_matter_endpoint, + Clusters::ElectricalMeasurement::Id, + MN::RmsVoltageSwellPeriodPhaseB::Id); + } + break; } // type is int16u case MN::LineCurrentPhaseC::Id: { - using T = MN::LineCurrentPhaseC::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) { - sl_log_debug(LOG_TAG, "LineCurrentPhaseC attribute value is %s", unify_value.dump().c_str()); - UN::LineCurrentPhaseC::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::ElectricalMeasurement::Id, - MN::LineCurrentPhaseC::Id); - } - break; + using T = MN::LineCurrentPhaseC::TypeInfo::Type; + std::optional value = from_json(unify_value); + + if( value.has_value()) { + sl_log_debug(LOG_TAG,"LineCurrentPhaseC attribute value is %s",unify_value.dump().c_str()); + UN::LineCurrentPhaseC::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback( + node_matter_endpoint, + Clusters::ElectricalMeasurement::Id, + MN::LineCurrentPhaseC::Id); + } + break; } // type is int16s case MN::ActiveCurrentPhaseC::Id: { - using T = MN::ActiveCurrentPhaseC::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) { - sl_log_debug(LOG_TAG, "ActiveCurrentPhaseC attribute value is %s", unify_value.dump().c_str()); - UN::ActiveCurrentPhaseC::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::ElectricalMeasurement::Id, - MN::ActiveCurrentPhaseC::Id); - } - break; + using T = MN::ActiveCurrentPhaseC::TypeInfo::Type; + std::optional value = from_json(unify_value); + + if( value.has_value()) { + sl_log_debug(LOG_TAG,"ActiveCurrentPhaseC attribute value is %s",unify_value.dump().c_str()); + UN::ActiveCurrentPhaseC::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback( + node_matter_endpoint, + Clusters::ElectricalMeasurement::Id, + MN::ActiveCurrentPhaseC::Id); + } + break; } // type is int16s case MN::ReactiveCurrentPhaseC::Id: { - using T = MN::ReactiveCurrentPhaseC::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) { - sl_log_debug(LOG_TAG, "ReactiveCurrentPhaseC attribute value is %s", unify_value.dump().c_str()); - UN::ReactiveCurrentPhaseC::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::ElectricalMeasurement::Id, - MN::ReactiveCurrentPhaseC::Id); - } - break; + using T = MN::ReactiveCurrentPhaseC::TypeInfo::Type; + std::optional value = from_json(unify_value); + + if( value.has_value()) { + sl_log_debug(LOG_TAG,"ReactiveCurrentPhaseC attribute value is %s",unify_value.dump().c_str()); + UN::ReactiveCurrentPhaseC::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback( + node_matter_endpoint, + Clusters::ElectricalMeasurement::Id, + MN::ReactiveCurrentPhaseC::Id); + } + break; } // type is int16u case MN::RmsVoltagePhaseC::Id: { - using T = MN::RmsVoltagePhaseC::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) { - sl_log_debug(LOG_TAG, "RmsVoltagePhaseC attribute value is %s", unify_value.dump().c_str()); - UN::RmsVoltagePhaseC::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::ElectricalMeasurement::Id, - MN::RmsVoltagePhaseC::Id); - } - break; + using T = MN::RmsVoltagePhaseC::TypeInfo::Type; + std::optional value = from_json(unify_value); + + if( value.has_value()) { + sl_log_debug(LOG_TAG,"RmsVoltagePhaseC attribute value is %s",unify_value.dump().c_str()); + UN::RmsVoltagePhaseC::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback( + node_matter_endpoint, + Clusters::ElectricalMeasurement::Id, + MN::RmsVoltagePhaseC::Id); + } + break; } // type is int16u case MN::RmsVoltageMinPhaseC::Id: { - using T = MN::RmsVoltageMinPhaseC::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) { - sl_log_debug(LOG_TAG, "RmsVoltageMinPhaseC attribute value is %s", unify_value.dump().c_str()); - UN::RmsVoltageMinPhaseC::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::ElectricalMeasurement::Id, - MN::RmsVoltageMinPhaseC::Id); - } - break; + using T = MN::RmsVoltageMinPhaseC::TypeInfo::Type; + std::optional value = from_json(unify_value); + + if( value.has_value()) { + sl_log_debug(LOG_TAG,"RmsVoltageMinPhaseC attribute value is %s",unify_value.dump().c_str()); + UN::RmsVoltageMinPhaseC::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback( + node_matter_endpoint, + Clusters::ElectricalMeasurement::Id, + MN::RmsVoltageMinPhaseC::Id); + } + break; } // type is int16u case MN::RmsVoltageMaxPhaseC::Id: { - using T = MN::RmsVoltageMaxPhaseC::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) { - sl_log_debug(LOG_TAG, "RmsVoltageMaxPhaseC attribute value is %s", unify_value.dump().c_str()); - UN::RmsVoltageMaxPhaseC::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::ElectricalMeasurement::Id, - MN::RmsVoltageMaxPhaseC::Id); - } - break; + using T = MN::RmsVoltageMaxPhaseC::TypeInfo::Type; + std::optional value = from_json(unify_value); + + if( value.has_value()) { + sl_log_debug(LOG_TAG,"RmsVoltageMaxPhaseC attribute value is %s",unify_value.dump().c_str()); + UN::RmsVoltageMaxPhaseC::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback( + node_matter_endpoint, + Clusters::ElectricalMeasurement::Id, + MN::RmsVoltageMaxPhaseC::Id); + } + break; } // type is int16u case MN::RmsCurrentPhaseC::Id: { - using T = MN::RmsCurrentPhaseC::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) { - sl_log_debug(LOG_TAG, "RmsCurrentPhaseC attribute value is %s", unify_value.dump().c_str()); - UN::RmsCurrentPhaseC::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::ElectricalMeasurement::Id, - MN::RmsCurrentPhaseC::Id); - } - break; + using T = MN::RmsCurrentPhaseC::TypeInfo::Type; + std::optional value = from_json(unify_value); + + if( value.has_value()) { + sl_log_debug(LOG_TAG,"RmsCurrentPhaseC attribute value is %s",unify_value.dump().c_str()); + UN::RmsCurrentPhaseC::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback( + node_matter_endpoint, + Clusters::ElectricalMeasurement::Id, + MN::RmsCurrentPhaseC::Id); + } + break; } // type is int16u case MN::RmsCurrentMinPhaseC::Id: { - using T = MN::RmsCurrentMinPhaseC::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) { - sl_log_debug(LOG_TAG, "RmsCurrentMinPhaseC attribute value is %s", unify_value.dump().c_str()); - UN::RmsCurrentMinPhaseC::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::ElectricalMeasurement::Id, - MN::RmsCurrentMinPhaseC::Id); - } - break; + using T = MN::RmsCurrentMinPhaseC::TypeInfo::Type; + std::optional value = from_json(unify_value); + + if( value.has_value()) { + sl_log_debug(LOG_TAG,"RmsCurrentMinPhaseC attribute value is %s",unify_value.dump().c_str()); + UN::RmsCurrentMinPhaseC::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback( + node_matter_endpoint, + Clusters::ElectricalMeasurement::Id, + MN::RmsCurrentMinPhaseC::Id); + } + break; } // type is int16u case MN::RmsCurrentMaxPhaseC::Id: { - using T = MN::RmsCurrentMaxPhaseC::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) { - sl_log_debug(LOG_TAG, "RmsCurrentMaxPhaseC attribute value is %s", unify_value.dump().c_str()); - UN::RmsCurrentMaxPhaseC::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::ElectricalMeasurement::Id, - MN::RmsCurrentMaxPhaseC::Id); - } - break; + using T = MN::RmsCurrentMaxPhaseC::TypeInfo::Type; + std::optional value = from_json(unify_value); + + if( value.has_value()) { + sl_log_debug(LOG_TAG,"RmsCurrentMaxPhaseC attribute value is %s",unify_value.dump().c_str()); + UN::RmsCurrentMaxPhaseC::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback( + node_matter_endpoint, + Clusters::ElectricalMeasurement::Id, + MN::RmsCurrentMaxPhaseC::Id); + } + break; } // type is int16s case MN::ActivePowerPhaseC::Id: { - using T = MN::ActivePowerPhaseC::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) { - sl_log_debug(LOG_TAG, "ActivePowerPhaseC attribute value is %s", unify_value.dump().c_str()); - UN::ActivePowerPhaseC::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::ElectricalMeasurement::Id, - MN::ActivePowerPhaseC::Id); - } - break; + using T = MN::ActivePowerPhaseC::TypeInfo::Type; + std::optional value = from_json(unify_value); + + if( value.has_value()) { + sl_log_debug(LOG_TAG,"ActivePowerPhaseC attribute value is %s",unify_value.dump().c_str()); + UN::ActivePowerPhaseC::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback( + node_matter_endpoint, + Clusters::ElectricalMeasurement::Id, + MN::ActivePowerPhaseC::Id); + } + break; } // type is int16s case MN::ActivePowerMinPhaseC::Id: { - using T = MN::ActivePowerMinPhaseC::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) { - sl_log_debug(LOG_TAG, "ActivePowerMinPhaseC attribute value is %s", unify_value.dump().c_str()); - UN::ActivePowerMinPhaseC::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::ElectricalMeasurement::Id, - MN::ActivePowerMinPhaseC::Id); - } - break; + using T = MN::ActivePowerMinPhaseC::TypeInfo::Type; + std::optional value = from_json(unify_value); + + if( value.has_value()) { + sl_log_debug(LOG_TAG,"ActivePowerMinPhaseC attribute value is %s",unify_value.dump().c_str()); + UN::ActivePowerMinPhaseC::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback( + node_matter_endpoint, + Clusters::ElectricalMeasurement::Id, + MN::ActivePowerMinPhaseC::Id); + } + break; } // type is int16s case MN::ActivePowerMaxPhaseC::Id: { - using T = MN::ActivePowerMaxPhaseC::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) { - sl_log_debug(LOG_TAG, "ActivePowerMaxPhaseC attribute value is %s", unify_value.dump().c_str()); - UN::ActivePowerMaxPhaseC::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::ElectricalMeasurement::Id, - MN::ActivePowerMaxPhaseC::Id); - } - break; + using T = MN::ActivePowerMaxPhaseC::TypeInfo::Type; + std::optional value = from_json(unify_value); + + if( value.has_value()) { + sl_log_debug(LOG_TAG,"ActivePowerMaxPhaseC attribute value is %s",unify_value.dump().c_str()); + UN::ActivePowerMaxPhaseC::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback( + node_matter_endpoint, + Clusters::ElectricalMeasurement::Id, + MN::ActivePowerMaxPhaseC::Id); + } + break; } // type is int16s case MN::ReactivePowerPhaseC::Id: { - using T = MN::ReactivePowerPhaseC::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) { - sl_log_debug(LOG_TAG, "ReactivePowerPhaseC attribute value is %s", unify_value.dump().c_str()); - UN::ReactivePowerPhaseC::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::ElectricalMeasurement::Id, - MN::ReactivePowerPhaseC::Id); - } - break; + using T = MN::ReactivePowerPhaseC::TypeInfo::Type; + std::optional value = from_json(unify_value); + + if( value.has_value()) { + sl_log_debug(LOG_TAG,"ReactivePowerPhaseC attribute value is %s",unify_value.dump().c_str()); + UN::ReactivePowerPhaseC::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback( + node_matter_endpoint, + Clusters::ElectricalMeasurement::Id, + MN::ReactivePowerPhaseC::Id); + } + break; } // type is int16u case MN::ApparentPowerPhaseC::Id: { - using T = MN::ApparentPowerPhaseC::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) { - sl_log_debug(LOG_TAG, "ApparentPowerPhaseC attribute value is %s", unify_value.dump().c_str()); - UN::ApparentPowerPhaseC::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::ElectricalMeasurement::Id, - MN::ApparentPowerPhaseC::Id); - } - break; + using T = MN::ApparentPowerPhaseC::TypeInfo::Type; + std::optional value = from_json(unify_value); + + if( value.has_value()) { + sl_log_debug(LOG_TAG,"ApparentPowerPhaseC attribute value is %s",unify_value.dump().c_str()); + UN::ApparentPowerPhaseC::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback( + node_matter_endpoint, + Clusters::ElectricalMeasurement::Id, + MN::ApparentPowerPhaseC::Id); + } + break; } // type is int8s case MN::PowerFactorPhaseC::Id: { - using T = MN::PowerFactorPhaseC::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) { - sl_log_debug(LOG_TAG, "PowerFactorPhaseC attribute value is %s", unify_value.dump().c_str()); - UN::PowerFactorPhaseC::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::ElectricalMeasurement::Id, - MN::PowerFactorPhaseC::Id); - } - break; + using T = MN::PowerFactorPhaseC::TypeInfo::Type; + std::optional value = from_json(unify_value); + + if( value.has_value()) { + sl_log_debug(LOG_TAG,"PowerFactorPhaseC attribute value is %s",unify_value.dump().c_str()); + UN::PowerFactorPhaseC::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback( + node_matter_endpoint, + Clusters::ElectricalMeasurement::Id, + MN::PowerFactorPhaseC::Id); + } + break; } // type is int16u case MN::AverageRmsVoltageMeasurementPeriodPhaseC::Id: { - using T = MN::AverageRmsVoltageMeasurementPeriodPhaseC::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) { - sl_log_debug(LOG_TAG, "AverageRmsVoltageMeasurementPeriodPhaseC attribute value is %s", unify_value.dump().c_str()); - UN::AverageRmsVoltageMeasurementPeriodPhaseC::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::ElectricalMeasurement::Id, - MN::AverageRmsVoltageMeasurementPeriodPhaseC::Id); - } - break; + using T = MN::AverageRmsVoltageMeasurementPeriodPhaseC::TypeInfo::Type; + std::optional value = from_json(unify_value); + + if( value.has_value()) { + sl_log_debug(LOG_TAG,"AverageRmsVoltageMeasurementPeriodPhaseC attribute value is %s",unify_value.dump().c_str()); + UN::AverageRmsVoltageMeasurementPeriodPhaseC::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback( + node_matter_endpoint, + Clusters::ElectricalMeasurement::Id, + MN::AverageRmsVoltageMeasurementPeriodPhaseC::Id); + } + break; } // type is int16u case MN::AverageRmsOverVoltageCounterPhaseC::Id: { - using T = MN::AverageRmsOverVoltageCounterPhaseC::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) { - sl_log_debug(LOG_TAG, "AverageRmsOverVoltageCounterPhaseC attribute value is %s", unify_value.dump().c_str()); - UN::AverageRmsOverVoltageCounterPhaseC::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::ElectricalMeasurement::Id, - MN::AverageRmsOverVoltageCounterPhaseC::Id); - } - break; + using T = MN::AverageRmsOverVoltageCounterPhaseC::TypeInfo::Type; + std::optional value = from_json(unify_value); + + if( value.has_value()) { + sl_log_debug(LOG_TAG,"AverageRmsOverVoltageCounterPhaseC attribute value is %s",unify_value.dump().c_str()); + UN::AverageRmsOverVoltageCounterPhaseC::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback( + node_matter_endpoint, + Clusters::ElectricalMeasurement::Id, + MN::AverageRmsOverVoltageCounterPhaseC::Id); + } + break; } // type is int16u case MN::AverageRmsUnderVoltageCounterPhaseC::Id: { - using T = MN::AverageRmsUnderVoltageCounterPhaseC::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) { - sl_log_debug(LOG_TAG, "AverageRmsUnderVoltageCounterPhaseC attribute value is %s", unify_value.dump().c_str()); - UN::AverageRmsUnderVoltageCounterPhaseC::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::ElectricalMeasurement::Id, - MN::AverageRmsUnderVoltageCounterPhaseC::Id); - } - break; + using T = MN::AverageRmsUnderVoltageCounterPhaseC::TypeInfo::Type; + std::optional value = from_json(unify_value); + + if( value.has_value()) { + sl_log_debug(LOG_TAG,"AverageRmsUnderVoltageCounterPhaseC attribute value is %s",unify_value.dump().c_str()); + UN::AverageRmsUnderVoltageCounterPhaseC::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback( + node_matter_endpoint, + Clusters::ElectricalMeasurement::Id, + MN::AverageRmsUnderVoltageCounterPhaseC::Id); + } + break; } // type is int16u case MN::RmsExtremeOverVoltagePeriodPhaseC::Id: { - using T = MN::RmsExtremeOverVoltagePeriodPhaseC::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) { - sl_log_debug(LOG_TAG, "RmsExtremeOverVoltagePeriodPhaseC attribute value is %s", unify_value.dump().c_str()); - UN::RmsExtremeOverVoltagePeriodPhaseC::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::ElectricalMeasurement::Id, - MN::RmsExtremeOverVoltagePeriodPhaseC::Id); - } - break; + using T = MN::RmsExtremeOverVoltagePeriodPhaseC::TypeInfo::Type; + std::optional value = from_json(unify_value); + + if( value.has_value()) { + sl_log_debug(LOG_TAG,"RmsExtremeOverVoltagePeriodPhaseC attribute value is %s",unify_value.dump().c_str()); + UN::RmsExtremeOverVoltagePeriodPhaseC::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback( + node_matter_endpoint, + Clusters::ElectricalMeasurement::Id, + MN::RmsExtremeOverVoltagePeriodPhaseC::Id); + } + break; } // type is int16u case MN::RmsExtremeUnderVoltagePeriodPhaseC::Id: { - using T = MN::RmsExtremeUnderVoltagePeriodPhaseC::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) { - sl_log_debug(LOG_TAG, "RmsExtremeUnderVoltagePeriodPhaseC attribute value is %s", unify_value.dump().c_str()); - UN::RmsExtremeUnderVoltagePeriodPhaseC::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::ElectricalMeasurement::Id, - MN::RmsExtremeUnderVoltagePeriodPhaseC::Id); - } - break; + using T = MN::RmsExtremeUnderVoltagePeriodPhaseC::TypeInfo::Type; + std::optional value = from_json(unify_value); + + if( value.has_value()) { + sl_log_debug(LOG_TAG,"RmsExtremeUnderVoltagePeriodPhaseC attribute value is %s",unify_value.dump().c_str()); + UN::RmsExtremeUnderVoltagePeriodPhaseC::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback( + node_matter_endpoint, + Clusters::ElectricalMeasurement::Id, + MN::RmsExtremeUnderVoltagePeriodPhaseC::Id); + } + break; } // type is int16u case MN::RmsVoltageSagPeriodPhaseC::Id: { - using T = MN::RmsVoltageSagPeriodPhaseC::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) { - sl_log_debug(LOG_TAG, "RmsVoltageSagPeriodPhaseC attribute value is %s", unify_value.dump().c_str()); - UN::RmsVoltageSagPeriodPhaseC::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::ElectricalMeasurement::Id, - MN::RmsVoltageSagPeriodPhaseC::Id); - } - break; + using T = MN::RmsVoltageSagPeriodPhaseC::TypeInfo::Type; + std::optional value = from_json(unify_value); + + if( value.has_value()) { + sl_log_debug(LOG_TAG,"RmsVoltageSagPeriodPhaseC attribute value is %s",unify_value.dump().c_str()); + UN::RmsVoltageSagPeriodPhaseC::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback( + node_matter_endpoint, + Clusters::ElectricalMeasurement::Id, + MN::RmsVoltageSagPeriodPhaseC::Id); + } + break; } // type is int16u case MN::RmsVoltageSwellPeriodPhaseC::Id: { - using T = MN::RmsVoltageSwellPeriodPhaseC::TypeInfo::Type; - std::optional value = from_json(unify_value); - - if (value.has_value()) { - sl_log_debug(LOG_TAG, "RmsVoltageSwellPeriodPhaseC attribute value is %s", unify_value.dump().c_str()); - UN::RmsVoltageSwellPeriodPhaseC::Set(attrpath, value.value()); - MatterReportingAttributeChangeCallback(node_matter_endpoint, Clusters::ElectricalMeasurement::Id, - MN::RmsVoltageSwellPeriodPhaseC::Id); - } - break; - } - } + using T = MN::RmsVoltageSwellPeriodPhaseC::TypeInfo::Type; + std::optional value = from_json(unify_value); + + if( value.has_value()) { + sl_log_debug(LOG_TAG,"RmsVoltageSwellPeriodPhaseC attribute value is %s",unify_value.dump().c_str()); + UN::RmsVoltageSwellPeriodPhaseC::Set(attrpath, value.value()); + MatterReportingAttributeChangeCallback( + node_matter_endpoint, + Clusters::ElectricalMeasurement::Id, + MN::RmsVoltageSwellPeriodPhaseC::Id); + } + break; + } + } } + diff --git a/silabs_examples/unify-matter-bridge/linux/zap-generated/data_model_translator/attribute_translator.hpp b/silabs_examples/unify-matter-bridge/linux/zap-generated/data_model_translator/attribute_translator.hpp index 2cde0d50f129dd..b8a6ae8b408964 100644 --- a/silabs_examples/unify-matter-bridge/linux/zap-generated/data_model_translator/attribute_translator.hpp +++ b/silabs_examples/unify-matter-bridge/linux/zap-generated/data_model_translator/attribute_translator.hpp @@ -22,256 +22,284 @@ #include "attribute_translator_interface.hpp" -namespace unify::matter_bridge { +namespace unify::matter_bridge +{ ///////////////////////////////////////////////////////////////////////////////////////////////// /// Attribute Handler for the Identify cluster -/// Please note that the following attributes are not defined in UCL, and they must be handled +/// Please note that the following attributes are not defined in UCL, and they must be handled /// by separate code -/// - identify type -/// - GeneratedCommandList -/// - AcceptedCommandList -/// - AttributeList -/// - FeatureMap -/// - ClusterRevision +/// - identify type +/// - GeneratedCommandList +/// - AcceptedCommandList +/// - AttributeList +/// - FeatureMap +/// - ClusterRevision /// -class IdentifyAttributeAccess : public attribute_translator_interface { -public: - IdentifyAttributeAccess(matter_node_state_monitor& node_state_monitor, UnifyMqtt& unify_mqtt) - : attribute_translator_interface(node_state_monitor, unify_mqtt, chip::app::Clusters::Identify::Id, - "attr_translator_Identify") - , m_unify_mqtt(unify_mqtt) - { - } - - 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({ "Identify" }); } - UnifyMqtt& m_unify_mqtt; +class IdentifyAttributeAccess : public attribute_translator_interface +{ + public: + IdentifyAttributeAccess(matter_node_state_monitor &node_state_monitor, UnifyMqtt &unify_mqtt) : + attribute_translator_interface(node_state_monitor, unify_mqtt, chip::app::Clusters::Identify::Id, "attr_translator_Identify"), m_unify_mqtt(unify_mqtt) + {} + + + 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({ "Identify" });} + UnifyMqtt &m_unify_mqtt; }; ///////////////////////////////////////////////////////////////////////////////////////////////// /// Attribute Handler for the Groups cluster -/// Please note that the following attributes are not defined in UCL, and they must be handled +/// Please note that the following attributes are not defined in UCL, and they must be handled /// by separate code -/// - GeneratedCommandList -/// - AcceptedCommandList -/// - AttributeList -/// - FeatureMap -/// - ClusterRevision +/// - GeneratedCommandList +/// - AcceptedCommandList +/// - AttributeList +/// - FeatureMap +/// - ClusterRevision /// -class GroupsAttributeAccess : public attribute_translator_interface { -public: - GroupsAttributeAccess(matter_node_state_monitor& node_state_monitor, UnifyMqtt& unify_mqtt) - : attribute_translator_interface(node_state_monitor, unify_mqtt, chip::app::Clusters::Groups::Id, "attr_translator_Groups") - , m_unify_mqtt(unify_mqtt) - { - } - - 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({ "Groups" }); } - UnifyMqtt& m_unify_mqtt; +class GroupsAttributeAccess : public attribute_translator_interface +{ + public: + GroupsAttributeAccess(matter_node_state_monitor &node_state_monitor, UnifyMqtt &unify_mqtt) : + attribute_translator_interface(node_state_monitor, unify_mqtt, chip::app::Clusters::Groups::Id, "attr_translator_Groups"), m_unify_mqtt(unify_mqtt) + {} + + + 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({ "Groups" });} + UnifyMqtt &m_unify_mqtt; }; ///////////////////////////////////////////////////////////////////////////////////////////////// /// Attribute Handler for the Scenes cluster -/// Please note that the following attributes are not defined in UCL, and they must be handled +/// Please note that the following attributes are not defined in UCL, and they must be handled /// by separate code -/// - GeneratedCommandList -/// - AcceptedCommandList -/// - AttributeList -/// - FeatureMap -/// - ClusterRevision +/// - GeneratedCommandList +/// - AcceptedCommandList +/// - AttributeList +/// - FeatureMap +/// - ClusterRevision /// -class ScenesAttributeAccess : public attribute_translator_interface { -public: - ScenesAttributeAccess(matter_node_state_monitor& node_state_monitor, UnifyMqtt& unify_mqtt) - : attribute_translator_interface(node_state_monitor, unify_mqtt, chip::app::Clusters::Scenes::Id, "attr_translator_Scenes") - , m_unify_mqtt(unify_mqtt) - { - } - - 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({ "Scenes" }); } - UnifyMqtt& m_unify_mqtt; +class ScenesAttributeAccess : public attribute_translator_interface +{ + public: + ScenesAttributeAccess(matter_node_state_monitor &node_state_monitor, UnifyMqtt &unify_mqtt) : + attribute_translator_interface(node_state_monitor, unify_mqtt, chip::app::Clusters::Scenes::Id, "attr_translator_Scenes"), m_unify_mqtt(unify_mqtt) + {} + + + 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({ "Scenes" });} + UnifyMqtt &m_unify_mqtt; }; ///////////////////////////////////////////////////////////////////////////////////////////////// /// Attribute Handler for the On/Off cluster -/// Please note that the following attributes are not defined in UCL, and they must be handled +/// Please note that the following attributes are not defined in UCL, and they must be handled /// by separate code -/// - GeneratedCommandList -/// - AcceptedCommandList -/// - AttributeList -/// - FeatureMap -/// - ClusterRevision +/// - GeneratedCommandList +/// - AcceptedCommandList +/// - AttributeList +/// - FeatureMap +/// - ClusterRevision /// -class OnOffAttributeAccess : public attribute_translator_interface { -public: - OnOffAttributeAccess(matter_node_state_monitor& node_state_monitor, UnifyMqtt& unify_mqtt) - : attribute_translator_interface(node_state_monitor, unify_mqtt, chip::app::Clusters::OnOff::Id, "attr_translator_OnOff") - , m_unify_mqtt(unify_mqtt) - { - } - - 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({ "OnOff" }); } - UnifyMqtt& m_unify_mqtt; +class OnOffAttributeAccess : public attribute_translator_interface +{ + public: + OnOffAttributeAccess(matter_node_state_monitor &node_state_monitor, UnifyMqtt &unify_mqtt) : + attribute_translator_interface(node_state_monitor, unify_mqtt, chip::app::Clusters::OnOff::Id, "attr_translator_OnOff"), m_unify_mqtt(unify_mqtt) + {} + + + 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({ "OnOff" });} + UnifyMqtt &m_unify_mqtt; }; ///////////////////////////////////////////////////////////////////////////////////////////////// /// Attribute Handler for the Level Control cluster -/// Please note that the following attributes are not defined in UCL, and they must be handled +/// Please note that the following attributes are not defined in UCL, and they must be handled /// by separate code -/// - GeneratedCommandList -/// - AcceptedCommandList -/// - AttributeList -/// - FeatureMap -/// - ClusterRevision +/// - GeneratedCommandList +/// - AcceptedCommandList +/// - AttributeList +/// - FeatureMap +/// - ClusterRevision /// -class LevelControlAttributeAccess : public attribute_translator_interface { -public: - LevelControlAttributeAccess(matter_node_state_monitor& node_state_monitor, UnifyMqtt& unify_mqtt) - : attribute_translator_interface(node_state_monitor, unify_mqtt, chip::app::Clusters::LevelControl::Id, - "attr_translator_LevelControl") - , m_unify_mqtt(unify_mqtt) - { - } - - 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({ "Level" }); } - UnifyMqtt& m_unify_mqtt; +class LevelControlAttributeAccess : public attribute_translator_interface +{ + public: + LevelControlAttributeAccess(matter_node_state_monitor &node_state_monitor, UnifyMqtt &unify_mqtt) : + attribute_translator_interface(node_state_monitor, unify_mqtt, chip::app::Clusters::LevelControl::Id, "attr_translator_LevelControl"), m_unify_mqtt(unify_mqtt) + {} + + + 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({ "Level" });} + UnifyMqtt &m_unify_mqtt; }; ///////////////////////////////////////////////////////////////////////////////////////////////// /// Attribute Handler for the Door Lock cluster -/// Please note that the following attributes are not defined in UCL, and they must be handled +/// Please note that the following attributes are not defined in UCL, and they must be handled /// by separate code /// - CredentialRulesSupport (optional) /// - NumberOfCredentialsSupportedPerUser (optional) /// - LocalProgrammingFeatures (optional) /// - ExpiringUserTimeout (optional) -/// - GeneratedCommandList -/// - AcceptedCommandList -/// - AttributeList -/// - FeatureMap -/// - ClusterRevision +/// - GeneratedCommandList +/// - AcceptedCommandList +/// - AttributeList +/// - FeatureMap +/// - ClusterRevision /// -class DoorLockAttributeAccess : public attribute_translator_interface { -public: - DoorLockAttributeAccess(matter_node_state_monitor& node_state_monitor, UnifyMqtt& unify_mqtt) - : attribute_translator_interface(node_state_monitor, unify_mqtt, chip::app::Clusters::DoorLock::Id, - "attr_translator_DoorLock") - , m_unify_mqtt(unify_mqtt) - { - } - - 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({ "DoorLock" }); } - UnifyMqtt& m_unify_mqtt; +class DoorLockAttributeAccess : public attribute_translator_interface +{ + public: + DoorLockAttributeAccess(matter_node_state_monitor &node_state_monitor, UnifyMqtt &unify_mqtt) : + attribute_translator_interface(node_state_monitor, unify_mqtt, chip::app::Clusters::DoorLock::Id, "attr_translator_DoorLock"), m_unify_mqtt(unify_mqtt) + {} + + + 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({ "DoorLock" });} + UnifyMqtt &m_unify_mqtt; }; ///////////////////////////////////////////////////////////////////////////////////////////////// /// Attribute Handler for the Barrier Control cluster -/// Please note that the following attributes are not defined in UCL, and they must be handled +/// Please note that the following attributes are not defined in UCL, and they must be handled /// by separate code -/// - GeneratedCommandList -/// - AcceptedCommandList -/// - AttributeList -/// - FeatureMap -/// - ClusterRevision +/// - GeneratedCommandList +/// - AcceptedCommandList +/// - AttributeList +/// - FeatureMap +/// - ClusterRevision /// -class BarrierControlAttributeAccess : public attribute_translator_interface { -public: - BarrierControlAttributeAccess(matter_node_state_monitor& node_state_monitor, UnifyMqtt& unify_mqtt) - : attribute_translator_interface(node_state_monitor, unify_mqtt, chip::app::Clusters::BarrierControl::Id, - "attr_translator_BarrierControl") - , m_unify_mqtt(unify_mqtt) - { - } - - 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({ "BarrierControl" }); } - UnifyMqtt& m_unify_mqtt; +class BarrierControlAttributeAccess : public attribute_translator_interface +{ + public: + BarrierControlAttributeAccess(matter_node_state_monitor &node_state_monitor, UnifyMqtt &unify_mqtt) : + attribute_translator_interface(node_state_monitor, unify_mqtt, chip::app::Clusters::BarrierControl::Id, "attr_translator_BarrierControl"), m_unify_mqtt(unify_mqtt) + {} + + + 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({ "BarrierControl" });} + UnifyMqtt &m_unify_mqtt; }; ///////////////////////////////////////////////////////////////////////////////////////////////// /// Attribute Handler for the Thermostat cluster -/// Please note that the following attributes are not defined in UCL, and they must be handled +/// Please note that the following attributes are not defined in UCL, and they must be handled /// by separate code -/// - GeneratedCommandList -/// - AcceptedCommandList -/// - AttributeList -/// - FeatureMap -/// - ClusterRevision +/// - GeneratedCommandList +/// - AcceptedCommandList +/// - AttributeList +/// - FeatureMap +/// - ClusterRevision /// -class ThermostatAttributeAccess : public attribute_translator_interface { -public: - ThermostatAttributeAccess(matter_node_state_monitor& node_state_monitor, UnifyMqtt& unify_mqtt) - : attribute_translator_interface(node_state_monitor, unify_mqtt, chip::app::Clusters::Thermostat::Id, - "attr_translator_Thermostat") - , m_unify_mqtt(unify_mqtt) - { - } - - 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({ "Thermostat" }); } - UnifyMqtt& m_unify_mqtt; +class ThermostatAttributeAccess : public attribute_translator_interface +{ + public: + ThermostatAttributeAccess(matter_node_state_monitor &node_state_monitor, UnifyMqtt &unify_mqtt) : + attribute_translator_interface(node_state_monitor, unify_mqtt, chip::app::Clusters::Thermostat::Id, "attr_translator_Thermostat"), m_unify_mqtt(unify_mqtt) + {} + + + 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({ "Thermostat" });} + UnifyMqtt &m_unify_mqtt; }; ///////////////////////////////////////////////////////////////////////////////////////////////// /// Attribute Handler for the Fan Control cluster -/// Please note that the following attributes are not defined in UCL, and they must be handled +/// Please note that the following attributes are not defined in UCL, and they must be handled /// by separate code -/// - percent setting -/// - percent current +/// - percent setting +/// - percent current /// - speed max (optional) /// - speed setting (optional) /// - speed current (optional) @@ -279,284 +307,298 @@ class ThermostatAttributeAccess : public attribute_translator_interface { /// - rock setting (optional) /// - wind support (optional) /// - wind setting (optional) -/// - GeneratedCommandList -/// - AcceptedCommandList -/// - AttributeList -/// - FeatureMap -/// - ClusterRevision +/// - GeneratedCommandList +/// - AcceptedCommandList +/// - AttributeList +/// - FeatureMap +/// - ClusterRevision /// -class FanControlAttributeAccess : public attribute_translator_interface { -public: - FanControlAttributeAccess(matter_node_state_monitor& node_state_monitor, UnifyMqtt& unify_mqtt) - : attribute_translator_interface(node_state_monitor, unify_mqtt, chip::app::Clusters::FanControl::Id, - "attr_translator_FanControl") - , m_unify_mqtt(unify_mqtt) - { - } - - 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({ "FanControl" }); } - UnifyMqtt& m_unify_mqtt; +class FanControlAttributeAccess : public attribute_translator_interface +{ + public: + FanControlAttributeAccess(matter_node_state_monitor &node_state_monitor, UnifyMqtt &unify_mqtt) : + attribute_translator_interface(node_state_monitor, unify_mqtt, chip::app::Clusters::FanControl::Id, "attr_translator_FanControl"), m_unify_mqtt(unify_mqtt) + {} + + + 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({ "FanControl" });} + UnifyMqtt &m_unify_mqtt; }; ///////////////////////////////////////////////////////////////////////////////////////////////// /// Attribute Handler for the Thermostat User Interface Configuration cluster -/// Please note that the following attributes are not defined in UCL, and they must be handled +/// Please note that the following attributes are not defined in UCL, and they must be handled /// by separate code -/// - GeneratedCommandList -/// - AcceptedCommandList -/// - AttributeList -/// - FeatureMap -/// - ClusterRevision +/// - GeneratedCommandList +/// - AcceptedCommandList +/// - AttributeList +/// - FeatureMap +/// - ClusterRevision /// -class ThermostatUserInterfaceConfigurationAttributeAccess : public attribute_translator_interface { -public: - ThermostatUserInterfaceConfigurationAttributeAccess(matter_node_state_monitor& node_state_monitor, UnifyMqtt& unify_mqtt) - : attribute_translator_interface(node_state_monitor, unify_mqtt, - chip::app::Clusters::ThermostatUserInterfaceConfiguration::Id, - "attr_translator_ThermostatUserInterfaceConfiguration") - , m_unify_mqtt(unify_mqtt) - { - } - - 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({ "ThermostatUserInterfaceConfiguration" }); - } - UnifyMqtt& m_unify_mqtt; +class ThermostatUserInterfaceConfigurationAttributeAccess : public attribute_translator_interface +{ + public: + ThermostatUserInterfaceConfigurationAttributeAccess(matter_node_state_monitor &node_state_monitor, UnifyMqtt &unify_mqtt) : + attribute_translator_interface(node_state_monitor, unify_mqtt, chip::app::Clusters::ThermostatUserInterfaceConfiguration::Id, "attr_translator_ThermostatUserInterfaceConfiguration"), m_unify_mqtt(unify_mqtt) + {} + + + 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({ "ThermostatUserInterfaceConfiguration" });} + UnifyMqtt &m_unify_mqtt; }; ///////////////////////////////////////////////////////////////////////////////////////////////// /// Attribute Handler for the Color Control cluster -/// Please note that the following attributes are not defined in UCL, and they must be handled +/// Please note that the following attributes are not defined in UCL, and they must be handled /// by separate code -/// - GeneratedCommandList -/// - AcceptedCommandList -/// - AttributeList -/// - FeatureMap -/// - ClusterRevision +/// - GeneratedCommandList +/// - AcceptedCommandList +/// - AttributeList +/// - FeatureMap +/// - ClusterRevision /// -class ColorControlAttributeAccess : public attribute_translator_interface { -public: - ColorControlAttributeAccess(matter_node_state_monitor& node_state_monitor, UnifyMqtt& unify_mqtt) - : attribute_translator_interface(node_state_monitor, unify_mqtt, chip::app::Clusters::ColorControl::Id, - "attr_translator_ColorControl") - , m_unify_mqtt(unify_mqtt) - { - } - - 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" }); } - UnifyMqtt& m_unify_mqtt; +class ColorControlAttributeAccess : public attribute_translator_interface +{ + public: + ColorControlAttributeAccess(matter_node_state_monitor &node_state_monitor, UnifyMqtt &unify_mqtt) : + attribute_translator_interface(node_state_monitor, unify_mqtt, chip::app::Clusters::ColorControl::Id, "attr_translator_ColorControl"), m_unify_mqtt(unify_mqtt) + {} + + + 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" });} + UnifyMqtt &m_unify_mqtt; }; ///////////////////////////////////////////////////////////////////////////////////////////////// /// Attribute Handler for the Illuminance Measurement cluster -/// Please note that the following attributes are not defined in UCL, and they must be handled +/// Please note that the following attributes are not defined in UCL, and they must be handled /// by separate code -/// - GeneratedCommandList -/// - AcceptedCommandList -/// - AttributeList -/// - FeatureMap -/// - ClusterRevision +/// - GeneratedCommandList +/// - AcceptedCommandList +/// - AttributeList +/// - FeatureMap +/// - ClusterRevision /// -class IlluminanceMeasurementAttributeAccess : public attribute_translator_interface { -public: - IlluminanceMeasurementAttributeAccess(matter_node_state_monitor& node_state_monitor, UnifyMqtt& unify_mqtt) - : attribute_translator_interface(node_state_monitor, unify_mqtt, chip::app::Clusters::IlluminanceMeasurement::Id, - "attr_translator_IlluminanceMeasurement") - , m_unify_mqtt(unify_mqtt) - { - } - - 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({ "IlluminanceMeasurement" }); - } - UnifyMqtt& m_unify_mqtt; +class IlluminanceMeasurementAttributeAccess : public attribute_translator_interface +{ + public: + IlluminanceMeasurementAttributeAccess(matter_node_state_monitor &node_state_monitor, UnifyMqtt &unify_mqtt) : + attribute_translator_interface(node_state_monitor, unify_mqtt, chip::app::Clusters::IlluminanceMeasurement::Id, "attr_translator_IlluminanceMeasurement"), m_unify_mqtt(unify_mqtt) + {} + + + 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({ "IlluminanceMeasurement" });} + UnifyMqtt &m_unify_mqtt; }; ///////////////////////////////////////////////////////////////////////////////////////////////// /// Attribute Handler for the Temperature Measurement cluster -/// Please note that the following attributes are not defined in UCL, and they must be handled +/// Please note that the following attributes are not defined in UCL, and they must be handled /// by separate code -/// - GeneratedCommandList -/// - AcceptedCommandList -/// - AttributeList -/// - FeatureMap -/// - ClusterRevision +/// - GeneratedCommandList +/// - AcceptedCommandList +/// - AttributeList +/// - FeatureMap +/// - ClusterRevision /// -class TemperatureMeasurementAttributeAccess : public attribute_translator_interface { -public: - TemperatureMeasurementAttributeAccess(matter_node_state_monitor& node_state_monitor, UnifyMqtt& unify_mqtt) - : attribute_translator_interface(node_state_monitor, unify_mqtt, chip::app::Clusters::TemperatureMeasurement::Id, - "attr_translator_TemperatureMeasurement") - , m_unify_mqtt(unify_mqtt) - { - } - - 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({ "TemperatureMeasurement" }); - } - UnifyMqtt& m_unify_mqtt; +class TemperatureMeasurementAttributeAccess : public attribute_translator_interface +{ + public: + TemperatureMeasurementAttributeAccess(matter_node_state_monitor &node_state_monitor, UnifyMqtt &unify_mqtt) : + attribute_translator_interface(node_state_monitor, unify_mqtt, chip::app::Clusters::TemperatureMeasurement::Id, "attr_translator_TemperatureMeasurement"), m_unify_mqtt(unify_mqtt) + {} + + + 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({ "TemperatureMeasurement" });} + UnifyMqtt &m_unify_mqtt; }; ///////////////////////////////////////////////////////////////////////////////////////////////// /// Attribute Handler for the Pressure Measurement cluster -/// Please note that the following attributes are not defined in UCL, and they must be handled +/// Please note that the following attributes are not defined in UCL, and they must be handled /// by separate code -/// - GeneratedCommandList -/// - AcceptedCommandList -/// - AttributeList -/// - FeatureMap -/// - ClusterRevision +/// - GeneratedCommandList +/// - AcceptedCommandList +/// - AttributeList +/// - FeatureMap +/// - ClusterRevision /// -class PressureMeasurementAttributeAccess : public attribute_translator_interface { -public: - PressureMeasurementAttributeAccess(matter_node_state_monitor& node_state_monitor, UnifyMqtt& unify_mqtt) - : attribute_translator_interface(node_state_monitor, unify_mqtt, chip::app::Clusters::PressureMeasurement::Id, - "attr_translator_PressureMeasurement") - , m_unify_mqtt(unify_mqtt) - { - } - - 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({ "PressureMeasurement" }); } - UnifyMqtt& m_unify_mqtt; +class PressureMeasurementAttributeAccess : public attribute_translator_interface +{ + public: + PressureMeasurementAttributeAccess(matter_node_state_monitor &node_state_monitor, UnifyMqtt &unify_mqtt) : + attribute_translator_interface(node_state_monitor, unify_mqtt, chip::app::Clusters::PressureMeasurement::Id, "attr_translator_PressureMeasurement"), m_unify_mqtt(unify_mqtt) + {} + + + 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({ "PressureMeasurement" });} + UnifyMqtt &m_unify_mqtt; }; ///////////////////////////////////////////////////////////////////////////////////////////////// /// Attribute Handler for the Relative Humidity Measurement cluster -/// Please note that the following attributes are not defined in UCL, and they must be handled +/// Please note that the following attributes are not defined in UCL, and they must be handled /// by separate code -/// - GeneratedCommandList -/// - AcceptedCommandList -/// - AttributeList -/// - FeatureMap -/// - ClusterRevision +/// - GeneratedCommandList +/// - AcceptedCommandList +/// - AttributeList +/// - FeatureMap +/// - ClusterRevision /// -class RelativeHumidityMeasurementAttributeAccess : public attribute_translator_interface { -public: - RelativeHumidityMeasurementAttributeAccess(matter_node_state_monitor& node_state_monitor, UnifyMqtt& unify_mqtt) - : attribute_translator_interface(node_state_monitor, unify_mqtt, chip::app::Clusters::RelativeHumidityMeasurement::Id, - "attr_translator_RelativeHumidityMeasurement") - , m_unify_mqtt(unify_mqtt) - { - } - - 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({ "RelativityHumidity" }); } - UnifyMqtt& m_unify_mqtt; +class RelativeHumidityMeasurementAttributeAccess : public attribute_translator_interface +{ + public: + RelativeHumidityMeasurementAttributeAccess(matter_node_state_monitor &node_state_monitor, UnifyMqtt &unify_mqtt) : + attribute_translator_interface(node_state_monitor, unify_mqtt, chip::app::Clusters::RelativeHumidityMeasurement::Id, "attr_translator_RelativeHumidityMeasurement"), m_unify_mqtt(unify_mqtt) + {} + + + 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({ "RelativityHumidity" });} + UnifyMqtt &m_unify_mqtt; }; ///////////////////////////////////////////////////////////////////////////////////////////////// /// Attribute Handler for the Occupancy Sensing cluster -/// Please note that the following attributes are not defined in UCL, and they must be handled +/// Please note that the following attributes are not defined in UCL, and they must be handled /// by separate code -/// - GeneratedCommandList -/// - AcceptedCommandList -/// - AttributeList -/// - FeatureMap -/// - ClusterRevision +/// - GeneratedCommandList +/// - AcceptedCommandList +/// - AttributeList +/// - FeatureMap +/// - ClusterRevision /// -class OccupancySensingAttributeAccess : public attribute_translator_interface { -public: - OccupancySensingAttributeAccess(matter_node_state_monitor& node_state_monitor, UnifyMqtt& unify_mqtt) - : attribute_translator_interface(node_state_monitor, unify_mqtt, chip::app::Clusters::OccupancySensing::Id, - "attr_translator_OccupancySensing") - , m_unify_mqtt(unify_mqtt) - { - } - - 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({ "OccupancySensing" }); } - UnifyMqtt& m_unify_mqtt; +class OccupancySensingAttributeAccess : public attribute_translator_interface +{ + public: + OccupancySensingAttributeAccess(matter_node_state_monitor &node_state_monitor, UnifyMqtt &unify_mqtt) : + attribute_translator_interface(node_state_monitor, unify_mqtt, chip::app::Clusters::OccupancySensing::Id, "attr_translator_OccupancySensing"), m_unify_mqtt(unify_mqtt) + {} + + + 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({ "OccupancySensing" });} + UnifyMqtt &m_unify_mqtt; }; ///////////////////////////////////////////////////////////////////////////////////////////////// /// Attribute Handler for the Electrical Measurement cluster -/// Please note that the following attributes are not defined in UCL, and they must be handled +/// Please note that the following attributes are not defined in UCL, and they must be handled /// by separate code /// - instantaneous voltage (optional) /// - instantaneous power (optional) -/// - GeneratedCommandList -/// - AcceptedCommandList -/// - AttributeList -/// - FeatureMap -/// - ClusterRevision +/// - GeneratedCommandList +/// - AcceptedCommandList +/// - AttributeList +/// - FeatureMap +/// - ClusterRevision /// -class ElectricalMeasurementAttributeAccess : public attribute_translator_interface { -public: - ElectricalMeasurementAttributeAccess(matter_node_state_monitor& node_state_monitor, UnifyMqtt& unify_mqtt) - : attribute_translator_interface(node_state_monitor, unify_mqtt, chip::app::Clusters::ElectricalMeasurement::Id, - "attr_translator_ElectricalMeasurement") - , m_unify_mqtt(unify_mqtt) - { - } - - 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({ "ElectricalMeasurement" }); - } - UnifyMqtt& m_unify_mqtt; +class ElectricalMeasurementAttributeAccess : public attribute_translator_interface +{ + public: + ElectricalMeasurementAttributeAccess(matter_node_state_monitor &node_state_monitor, UnifyMqtt &unify_mqtt) : + attribute_translator_interface(node_state_monitor, unify_mqtt, chip::app::Clusters::ElectricalMeasurement::Id, "attr_translator_ElectricalMeasurement"), m_unify_mqtt(unify_mqtt) + {} + + + 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({ "ElectricalMeasurement" });} + UnifyMqtt &m_unify_mqtt; }; -} // namespace unify::matter_bridge \ No newline at end of file +} // namespace unify::matter_bridge \ No newline at end of file diff --git a/silabs_examples/unify-matter-bridge/linux/zap-generated/data_model_translator/attribute_type_size.cpp b/silabs_examples/unify-matter-bridge/linux/zap-generated/data_model_translator/attribute_type_size.cpp index 164dc60f16f4cd..0dadbc9eff5378 100644 --- a/silabs_examples/unify-matter-bridge/linux/zap-generated/data_model_translator/attribute_type_size.cpp +++ b/silabs_examples/unify-matter-bridge/linux/zap-generated/data_model_translator/attribute_type_size.cpp @@ -148,6 +148,8 @@ 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; @@ -155,23 +157,30 @@ constexpr uint8_t ZCL_IDENTIFY_EFFECT_VARIANT_ATTRIBUTE_TYPES_SIZE = ZCL_ENUM8_A 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_GROUP_CLUSTER_FEATURE_ATTRIBUTE_TYPES = ZCL_BITMAP32_ATTRIBUTE_TYPES; -constexpr uint8_t ZCL_GROUP_CLUSTER_FEATURE_ATTRIBUTE_TYPES_SIZE = ZCL_BITMAP32_ATTRIBUTE_TYPES_SIZE; +constexpr uint8_t ZCL_GROUP_CLUSTER_FEATURE_ATTRIBUTE_TYPES_SIZE = ZCL_BITMAP32_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_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_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_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_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; @@ -182,46 +191,50 @@ constexpr uint8_t ZCL_ON_OFF_EFFECT_IDENTIFIER_ATTRIBUTE_TYPES_SIZE = ZCL_ENUM8_ 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_LEVEL_CONTROL_FEATURE_ATTRIBUTE_TYPES_SIZE = ZCL_BITMAP32_ATTRIBUTE_TYPES_SIZE; constexpr uint8_t ZCL_LEVEL_CONTROL_OPTIONS_ATTRIBUTE_TYPES = ZCL_BITMAP32_ATTRIBUTE_TYPES; -constexpr uint8_t ZCL_LEVEL_CONTROL_OPTIONS_ATTRIBUTE_TYPES_SIZE = ZCL_BITMAP32_ATTRIBUTE_TYPES_SIZE; +constexpr uint8_t ZCL_LEVEL_CONTROL_OPTIONS_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_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_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_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_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_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_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_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_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_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_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_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_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_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_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_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_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; @@ -267,12 +280,17 @@ constexpr uint8_t ZCL_DOOR_LOCK_USER_TYPE_ATTRIBUTE_TYPES_SIZE = ZCL_ENUM8_ATTRI 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_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_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_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_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; @@ -286,26 +304,33 @@ constexpr uint8_t ZCL_THERMOSTAT_SYSTEM_MODE_ATTRIBUTE_TYPES_SIZE = ZCL_ENUM8_AT 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_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_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_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_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_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_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_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; @@ -324,1427 +349,1468 @@ constexpr uint8_t ZCL_SATURATION_MOVE_MODE_ATTRIBUTE_TYPES_SIZE = ZCL_ENUM8_ATTR 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_PRESSURE_FEATURE_ATTRIBUTE_TYPES_SIZE = ZCL_BITMAP32_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 }; - } + 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::Groups::Id: { - switch (attribute_id) { - case Groups::Attributes::NameSupport::Id: { - return { ZCL_BITMAP8_ATTRIBUTE_TYPES, ZCL_BITMAP8_ATTRIBUTE_TYPES_SIZE }; - } - case Groups::Attributes::GeneratedCommandList::Id: { - return { ZCL_ARRAY_ATTRIBUTE_TYPES, ZCL_ARRAY_ATTRIBUTE_TYPES_SIZE }; - } - case Groups::Attributes::AcceptedCommandList::Id: { - return { ZCL_ARRAY_ATTRIBUTE_TYPES, ZCL_ARRAY_ATTRIBUTE_TYPES_SIZE }; - } - case Groups::Attributes::AttributeList::Id: { - return { ZCL_ARRAY_ATTRIBUTE_TYPES, ZCL_ARRAY_ATTRIBUTE_TYPES_SIZE }; - } - case Groups::Attributes::FeatureMap::Id: { - return { ZCL_BITMAP32_ATTRIBUTE_TYPES, ZCL_BITMAP32_ATTRIBUTE_TYPES_SIZE }; - } - case Groups::Attributes::ClusterRevision::Id: { - return { ZCL_INT16U_ATTRIBUTE_TYPES, ZCL_INT16U_ATTRIBUTE_TYPES_SIZE }; - } + return {ZCL_BOOLEAN_ATTRIBUTE_TYPES, 0x01}; + } + } + case chip::app::Clusters::Groups::Id: { + switch(attribute_id) + { + case Groups::Attributes::NameSupport::Id: { + return {ZCL_BITMAP8_ATTRIBUTE_TYPES, ZCL_BITMAP8_ATTRIBUTE_TYPES_SIZE}; + } + case Groups::Attributes::GeneratedCommandList::Id: { + return {ZCL_ARRAY_ATTRIBUTE_TYPES, ZCL_ARRAY_ATTRIBUTE_TYPES_SIZE}; + } + case Groups::Attributes::AcceptedCommandList::Id: { + return {ZCL_ARRAY_ATTRIBUTE_TYPES, ZCL_ARRAY_ATTRIBUTE_TYPES_SIZE}; + } + case Groups::Attributes::AttributeList::Id: { + return {ZCL_ARRAY_ATTRIBUTE_TYPES, ZCL_ARRAY_ATTRIBUTE_TYPES_SIZE}; + } + case Groups::Attributes::FeatureMap::Id: { + return {ZCL_BITMAP32_ATTRIBUTE_TYPES, ZCL_BITMAP32_ATTRIBUTE_TYPES_SIZE}; + } + case Groups::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 }; - } + 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 }; - } + 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::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_LEVEL_CONTROL_OPTIONS_ATTRIBUTE_TYPES, ZCL_LEVEL_CONTROL_OPTIONS_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 }; - } + 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_LEVEL_CONTROL_OPTIONS_ATTRIBUTE_TYPES, ZCL_LEVEL_CONTROL_OPTIONS_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::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 }; - } + 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::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 }; - } + 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 }; - } + 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 }; - } + 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 }; - } + 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 }; - } + 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 }; - } + 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 }; - } + 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 }; - } + 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::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 }; - } + 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 }; - } + 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::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 }; - } + 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 }; + return {ZCL_BOOLEAN_ATTRIBUTE_TYPES, 0x01}; } - } + } default: - return { ZCL_BOOLEAN_ATTRIBUTE_TYPES, 0x01 }; - } + return {ZCL_BOOLEAN_ATTRIBUTE_TYPES, 0x01}; + } } \ No newline at end of file diff --git a/silabs_examples/unify-matter-bridge/linux/zap-generated/data_model_translator/attribute_type_size.hpp b/silabs_examples/unify-matter-bridge/linux/zap-generated/data_model_translator/attribute_type_size.hpp index a8ed9690afe6c9..2c066135615ebc 100644 --- a/silabs_examples/unify-matter-bridge/linux/zap-generated/data_model_translator/attribute_type_size.hpp +++ b/silabs_examples/unify-matter-bridge/linux/zap-generated/data_model_translator/attribute_type_size.hpp @@ -11,11 +11,11 @@ * sections of the MSLA applicable to Source Code. * ******************************************************************************/ -#include + #include struct attr_type_size { - uint8_t attrType; - uint8_t attrSize; + 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-generated/data_model_translator/chip_types_from_json.hpp b/silabs_examples/unify-matter-bridge/linux/zap-generated/data_model_translator/chip_types_from_json.hpp index 240c5bb26a5515..094a85d66e055d 100644 --- a/silabs_examples/unify-matter-bridge/linux/zap-generated/data_model_translator/chip_types_from_json.hpp +++ b/silabs_examples/unify-matter-bridge/linux/zap-generated/data_model_translator/chip_types_from_json.hpp @@ -16,1186 +16,1085 @@ // Default translation template -std::optional inline from_json(const nlohmann::json& value) +std::optional inline from_json(const nlohmann::json & value) { return std::optional(value); } -template <> -std::optional> inline from_json(const nlohmann::json& value) -{ +template<> +std::optional> inline from_json(const nlohmann::json & value) { std::string s = value.get(); - chip::Span span(s.c_str(), s.length()); + chip::Span span(s.c_str(),s.length()); return span; } -/***************************** Bitmap Converters **************/ -template <> -inline std::optional from_json(const nlohmann::json& value) -{ - const std::map table = { - { "Blink", Identify::IdentifyEffectIdentifier::kBlink }, - { "Breathe", Identify::IdentifyEffectIdentifier::kBreathe }, - { "Okay", Identify::IdentifyEffectIdentifier::kOkay }, - { "ChannelChange", Identify::IdentifyEffectIdentifier::kChannelChange }, - { "FinishEffect", Identify::IdentifyEffectIdentifier::kFinishEffect }, - { "StopEffect", Identify::IdentifyEffectIdentifier::kStopEffect }, - }; - - auto i = table.find(value); - if (i != table.end()) { + /***************************** Bitmap Converters **************/ + + +template<> inline std::optional from_json(const nlohmann::json& value) { + const std::map< std::string, Identify::IdentifyEffectIdentifier> + table = { + { "Blink" , Identify::IdentifyEffectIdentifier::kBlink }, + { "Breathe" , Identify::IdentifyEffectIdentifier::kBreathe }, + { "Okay" , Identify::IdentifyEffectIdentifier::kOkay }, + { "ChannelChange" , Identify::IdentifyEffectIdentifier::kChannelChange }, + { "FinishEffect" , Identify::IdentifyEffectIdentifier::kFinishEffect }, + { "StopEffect" , Identify::IdentifyEffectIdentifier::kStopEffect }, + }; + + 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 = { - { "Default", Identify::IdentifyEffectVariant::kDefault }, - }; +template<> inline std::optional from_json(const nlohmann::json& value) { + const std::map< std::string, Identify::IdentifyEffectVariant> + table = { + { "Default" , Identify::IdentifyEffectVariant::kDefault }, + }; - auto i = table.find(value); - if (i != table.end()) { + 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 = { - { "None FIXME", Identify::IdentifyIdentifyType::kNone }, - { "VisibleLight FIXME", Identify::IdentifyIdentifyType::kVisibleLight }, - { "VisibleLED FIXME", Identify::IdentifyIdentifyType::kVisibleLED }, - { "AudibleBeep FIXME", Identify::IdentifyIdentifyType::kAudibleBeep }, - { "Display FIXME", Identify::IdentifyIdentifyType::kDisplay }, - { "Actuator FIXME", Identify::IdentifyIdentifyType::kActuator }, - }; - - auto i = table.find(value); - if (i != table.end()) { +template<> inline std::optional from_json(const nlohmann::json& value) { + const std::map< std::string, Identify::IdentifyIdentifyType> + table = { + { "None FIXME" , Identify::IdentifyIdentifyType::kNone }, + { "VisibleLight FIXME" , Identify::IdentifyIdentifyType::kVisibleLight }, + { "VisibleLED FIXME" , Identify::IdentifyIdentifyType::kVisibleLED }, + { "AudibleBeep FIXME" , Identify::IdentifyIdentifyType::kAudibleBeep }, + { "Display FIXME" , Identify::IdentifyIdentifyType::kDisplay }, + { "Actuator FIXME" , Identify::IdentifyIdentifyType::kActuator }, + }; + + auto i = table.find( value ); + if( i != table.end() ) { return i->second; } else { return std::nullopt; } } -/***************************** Bitmap Converters **************/ -template <> -inline std::optional> from_json(const nlohmann::json& obj) -{ + /***************************** Bitmap Converters **************/ + template<> inline std::optional> from_json(const nlohmann::json& obj) { chip::BitMask r; - r.SetField(Groups::GroupClusterFeature::kGroupNames, obj.value("GroupNames FIXME", false)); + r.SetField(Groups::GroupClusterFeature::kGroupNames, obj.value("GroupNames FIXME",false)); return r; -} + } -/***************************** Bitmap Converters **************/ -template <> -inline std::optional> from_json(const nlohmann::json& obj) -{ + + /***************************** Bitmap Converters **************/ + template<> inline std::optional> from_json(const nlohmann::json& obj) { chip::BitMask r; - r.SetField(Scenes::ScenesCopyMode::kCopyAllScenes, obj.value("CopyAllScenes", false)); + r.SetField(Scenes::ScenesCopyMode::kCopyAllScenes, obj.value("CopyAllScenes",false)); return r; -} + } -/***************************** Bitmap Converters **************/ -template <> -inline std::optional> from_json(const nlohmann::json& obj) -{ + + /***************************** Bitmap Converters **************/ + template<> inline std::optional> from_json(const nlohmann::json& obj) { chip::BitMask r; - r.SetField(OnOff::OnOffControl::kAcceptOnlyWhenOn, obj.value("AcceptOnlyWhenOn", false)); + r.SetField(OnOff::OnOffControl::kAcceptOnlyWhenOn, obj.value("AcceptOnlyWhenOn",false)); return r; -} -template <> -inline std::optional> from_json(const nlohmann::json& obj) -{ + } + template<> inline std::optional> from_json(const nlohmann::json& obj) { chip::BitMask r; - r.SetField(OnOff::OnOffFeature::kLighting, obj.value("Lighting FIXME", false)); + r.SetField(OnOff::OnOffFeature::kLighting, obj.value("Lighting FIXME",false)); return r; -} -template <> -inline std::optional> from_json(const nlohmann::json& obj) -{ + } + template<> inline std::optional> from_json(const nlohmann::json& obj) { chip::BitMask r; - r.SetField(OnOff::SceneFeatures::kSceneNames, obj.value("SceneNames FIXME", false)); + r.SetField(OnOff::SceneFeatures::kSceneNames, obj.value("SceneNames FIXME",false)); return r; -} + } -template <> -inline std::optional from_json(const nlohmann::json& value) -{ - const std::map table = { - { "FadeToOffIn_0p8Seconds FIXME", OnOff::OnOffDelayedAllOffEffectVariant::kFadeToOffIn0p8Seconds }, - { "NoFade FIXME", OnOff::OnOffDelayedAllOffEffectVariant::kNoFade }, - { "50PercentDimDownIn_0p8SecondsThenFadeToOffIn_12Seconds FIXME", - OnOff::OnOffDelayedAllOffEffectVariant::k50PercentDimDownIn0p8SecondsThenFadeToOffIn12Seconds }, - }; - - auto i = table.find(value); - if (i != table.end()) { + +template<> inline std::optional from_json(const nlohmann::json& value) { + const std::map< std::string, OnOff::OnOffDelayedAllOffEffectVariant> + table = { + { "FadeToOffIn_0p8Seconds FIXME" , OnOff::OnOffDelayedAllOffEffectVariant::kFadeToOffIn0p8Seconds }, + { "NoFade FIXME" , OnOff::OnOffDelayedAllOffEffectVariant::kNoFade }, + { "50PercentDimDownIn_0p8SecondsThenFadeToOffIn_12Seconds FIXME" , OnOff::OnOffDelayedAllOffEffectVariant::k50PercentDimDownIn0p8SecondsThenFadeToOffIn12Seconds }, + }; + + 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 = { - { "20PercenterDimUpIn_0p5SecondsThenFadeToOffIn_1Second FIXME", - OnOff::OnOffDyingLightEffectVariant::k20PercenterDimUpIn0p5SecondsThenFadeToOffIn1Second }, - }; +template<> inline std::optional from_json(const nlohmann::json& value) { + const std::map< std::string, OnOff::OnOffDyingLightEffectVariant> + table = { + { "20PercenterDimUpIn_0p5SecondsThenFadeToOffIn_1Second FIXME" , OnOff::OnOffDyingLightEffectVariant::k20PercenterDimUpIn0p5SecondsThenFadeToOffIn1Second }, + }; - auto i = table.find(value); - if (i != table.end()) { + 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 = { - { "DelayedAllOff", OnOff::OnOffEffectIdentifier::kDelayedAllOff }, - { "DyingLight", OnOff::OnOffEffectIdentifier::kDyingLight }, - }; +template<> inline std::optional from_json(const nlohmann::json& value) { + const std::map< std::string, OnOff::OnOffEffectIdentifier> + table = { + { "DelayedAllOff" , OnOff::OnOffEffectIdentifier::kDelayedAllOff }, + { "DyingLight" , OnOff::OnOffEffectIdentifier::kDyingLight }, + }; - auto i = table.find(value); - if (i != table.end()) { + 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 = { - { "SetOnOffTo0", OnOff::OnOffStartUpOnOff::kOff }, - { "SetOnOffTo1", OnOff::OnOffStartUpOnOff::kOn }, - { "TogglePreviousOnOff", OnOff::OnOffStartUpOnOff::kTogglePreviousOnOff }, - }; - - auto i = table.find(value); - if (i != table.end()) { +template<> inline std::optional from_json(const nlohmann::json& value) { + const std::map< std::string, OnOff::OnOffStartUpOnOff> + table = { + { "SetOnOffTo0" , OnOff::OnOffStartUpOnOff::kOff }, + { "SetOnOffTo1" , OnOff::OnOffStartUpOnOff::kOn }, + { "TogglePreviousOnOff" , OnOff::OnOffStartUpOnOff::kTogglePreviousOnOff }, + }; + + auto i = table.find( value ); + if( i != table.end() ) { return i->second; } else { return std::nullopt; } } -/***************************** Bitmap Converters **************/ -template <> -inline std::optional> from_json(const nlohmann::json& obj) -{ + /***************************** Bitmap Converters **************/ + template<> inline std::optional> from_json(const nlohmann::json& obj) { chip::BitMask r; - r.SetField(LevelControl::LevelControlFeature::kOnOff, obj.value("OnOff FIXME", false)); - r.SetField(LevelControl::LevelControlFeature::kLighting, obj.value("Lighting FIXME", false)); - r.SetField(LevelControl::LevelControlFeature::kFrequency, obj.value("Frequency FIXME", false)); + r.SetField(LevelControl::LevelControlFeature::kOnOff, obj.value("OnOff FIXME",false)); + r.SetField(LevelControl::LevelControlFeature::kLighting, obj.value("Lighting FIXME",false)); + r.SetField(LevelControl::LevelControlFeature::kFrequency, obj.value("Frequency FIXME",false)); return r; -} -template <> -inline std::optional> from_json(const nlohmann::json& obj) -{ + } + template<> inline std::optional> from_json(const nlohmann::json& obj) { chip::BitMask r; - r.SetField(LevelControl::LevelControlOptions::kExecuteIfOff, obj.value("ExecuteIfOff", false)); - r.SetField(LevelControl::LevelControlOptions::kCoupleColorTempToLevel, obj.value("CoupleColorTempToLevel", false)); + r.SetField(LevelControl::LevelControlOptions::kExecuteIfOff, obj.value("ExecuteIfOff",false)); + r.SetField(LevelControl::LevelControlOptions::kCoupleColorTempToLevel, obj.value("CoupleColorTempToLevel",false)); return r; -} + } -template <> -inline std::optional from_json(const nlohmann::json& value) -{ - const std::map table = { - { "Up", LevelControl::MoveMode::kUp }, - { "Down", LevelControl::MoveMode::kDown }, - }; - auto i = table.find(value); - if (i != table.end()) { +template<> inline std::optional from_json(const nlohmann::json& value) { + const std::map< std::string, LevelControl::MoveMode> + table = { + { "Up" , LevelControl::MoveMode::kUp }, + { "Down" , LevelControl::MoveMode::kDown }, + }; + + 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 = { - { "Up", LevelControl::StepMode::kUp }, - { "Down", LevelControl::StepMode::kDown }, - }; +template<> inline std::optional from_json(const nlohmann::json& value) { + const std::map< std::string, LevelControl::StepMode> + table = { + { "Up" , LevelControl::StepMode::kUp }, + { "Down" , LevelControl::StepMode::kDown }, + }; - auto i = table.find(value); - if (i != table.end()) { + auto i = table.find( value ); + if( i != table.end() ) { return i->second; } else { return std::nullopt; } } -/***************************** Bitmap Converters **************/ -template <> -inline std::optional> from_json(const nlohmann::json& obj) -{ + /***************************** Bitmap Converters **************/ + template<> inline std::optional> from_json(const nlohmann::json& obj) { chip::BitMask r; - r.SetField(DoorLock::DlCredentialRuleMask::kSingle, obj.value("Single FIXME", false)); - r.SetField(DoorLock::DlCredentialRuleMask::kDual, obj.value("Dual FIXME", false)); - r.SetField(DoorLock::DlCredentialRuleMask::kTri, obj.value("Tri FIXME", false)); + r.SetField(DoorLock::DlCredentialRuleMask::kSingle, obj.value("Single FIXME",false)); + r.SetField(DoorLock::DlCredentialRuleMask::kDual, obj.value("Dual FIXME",false)); + r.SetField(DoorLock::DlCredentialRuleMask::kTri, obj.value("Tri FIXME",false)); return r; -} -template <> -inline std::optional> from_json(const nlohmann::json& obj) -{ + } + template<> inline std::optional> from_json(const nlohmann::json& obj) { chip::BitMask r; - r.SetField(DoorLock::DlCredentialRulesSupport::kSingle, obj.value("Single FIXME", false)); - r.SetField(DoorLock::DlCredentialRulesSupport::kDual, obj.value("Dual FIXME", false)); - r.SetField(DoorLock::DlCredentialRulesSupport::kTri, obj.value("Tri FIXME", false)); + r.SetField(DoorLock::DlCredentialRulesSupport::kSingle, obj.value("Single FIXME",false)); + r.SetField(DoorLock::DlCredentialRulesSupport::kDual, obj.value("Dual FIXME",false)); + r.SetField(DoorLock::DlCredentialRulesSupport::kTri, obj.value("Tri FIXME",false)); return r; -} -template <> -inline std::optional> from_json(const nlohmann::json& obj) -{ + } + template<> inline std::optional> from_json(const nlohmann::json& obj) { chip::BitMask r; - r.SetField(DoorLock::DlDaysMaskMap::kSunday, obj.value("Sun", false)); - r.SetField(DoorLock::DlDaysMaskMap::kMonday, obj.value("Mon", false)); - r.SetField(DoorLock::DlDaysMaskMap::kTuesday, obj.value("Tue", false)); - r.SetField(DoorLock::DlDaysMaskMap::kWednesday, obj.value("Wed", false)); - r.SetField(DoorLock::DlDaysMaskMap::kThursday, obj.value("Thu", false)); - r.SetField(DoorLock::DlDaysMaskMap::kFriday, obj.value("Fri", false)); - r.SetField(DoorLock::DlDaysMaskMap::kSaturday, obj.value("Sat", false)); + r.SetField(DoorLock::DlDaysMaskMap::kSunday, obj.value("Sun",false)); + r.SetField(DoorLock::DlDaysMaskMap::kMonday, obj.value("Mon",false)); + r.SetField(DoorLock::DlDaysMaskMap::kTuesday, obj.value("Tue",false)); + r.SetField(DoorLock::DlDaysMaskMap::kWednesday, obj.value("Wed",false)); + r.SetField(DoorLock::DlDaysMaskMap::kThursday, obj.value("Thu",false)); + r.SetField(DoorLock::DlDaysMaskMap::kFriday, obj.value("Fri",false)); + r.SetField(DoorLock::DlDaysMaskMap::kSaturday, obj.value("Sat",false)); return r; -} -template <> -inline std::optional> from_json(const nlohmann::json& obj) -{ + } + template<> inline std::optional> from_json(const nlohmann::json& obj) { chip::BitMask r; - r.SetField(DoorLock::DlDefaultConfigurationRegister::kEnableLocalProgrammingEnabled, - obj.value("DefaultEnableLocalProgrammingAttributeIsEnabled", false)); - r.SetField(DoorLock::DlDefaultConfigurationRegister::kKeypadInterfaceDefaultAccessEnabled, - obj.value("DefaultKeypadInterfaceIsEnabled", false)); - r.SetField(DoorLock::DlDefaultConfigurationRegister::kRemoteInterfaceDefaultAccessIsEnabled, - obj.value("DefaultRFInterfaceIsEnabled", false)); - r.SetField(DoorLock::DlDefaultConfigurationRegister::kSoundEnabled, obj.value("DefaultSoundVolumeIsEnabled", false)); - r.SetField(DoorLock::DlDefaultConfigurationRegister::kAutoRelockTimeSet, obj.value("DefaultAutoRelockTimeIsEnabled", false)); - r.SetField(DoorLock::DlDefaultConfigurationRegister::kLEDSettingsSet, obj.value("DefaultLEDSettingsIsEnabled", false)); + r.SetField(DoorLock::DlDefaultConfigurationRegister::kEnableLocalProgrammingEnabled, obj.value("DefaultEnableLocalProgrammingAttributeIsEnabled",false)); + r.SetField(DoorLock::DlDefaultConfigurationRegister::kKeypadInterfaceDefaultAccessEnabled, obj.value("DefaultKeypadInterfaceIsEnabled",false)); + r.SetField(DoorLock::DlDefaultConfigurationRegister::kRemoteInterfaceDefaultAccessIsEnabled, obj.value("DefaultRFInterfaceIsEnabled",false)); + r.SetField(DoorLock::DlDefaultConfigurationRegister::kSoundEnabled, obj.value("DefaultSoundVolumeIsEnabled",false)); + r.SetField(DoorLock::DlDefaultConfigurationRegister::kAutoRelockTimeSet, obj.value("DefaultAutoRelockTimeIsEnabled",false)); + r.SetField(DoorLock::DlDefaultConfigurationRegister::kLEDSettingsSet, obj.value("DefaultLEDSettingsIsEnabled",false)); return r; -} -template <> -inline std::optional> from_json(const nlohmann::json& obj) -{ + } + template<> inline std::optional> from_json(const nlohmann::json& obj) { chip::BitMask r; - r.SetField(DoorLock::DlKeypadOperationEventMask::kUnknown, obj.value("KeypadOpUnknownOrMS", false)); - r.SetField(DoorLock::DlKeypadOperationEventMask::kLock, obj.value("KeypadOpLock", false)); - r.SetField(DoorLock::DlKeypadOperationEventMask::kUnlock, obj.value("KeypadOpUnlock", false)); - r.SetField(DoorLock::DlKeypadOperationEventMask::kLockInvalidPIN, obj.value("KeypadOpLockErrorInvalidPIN", false)); - r.SetField(DoorLock::DlKeypadOperationEventMask::kLockInvalidSchedule, obj.value("KeypadOpLockErrorInvalidSchedule", false)); - r.SetField(DoorLock::DlKeypadOperationEventMask::kUnlockInvalidCode, obj.value("KeypadOpUnlockInvalidPIN", false)); - r.SetField(DoorLock::DlKeypadOperationEventMask::kUnlockInvalidSchedule, obj.value("KeypadOpUnlockInvalidSchedule", false)); - r.SetField(DoorLock::DlKeypadOperationEventMask::kNonAccessUserOpEvent, obj.value("KeypadOpNonAccessUser", false)); + r.SetField(DoorLock::DlKeypadOperationEventMask::kUnknown, obj.value("KeypadOpUnknownOrMS",false)); + r.SetField(DoorLock::DlKeypadOperationEventMask::kLock, obj.value("KeypadOpLock",false)); + r.SetField(DoorLock::DlKeypadOperationEventMask::kUnlock, obj.value("KeypadOpUnlock",false)); + r.SetField(DoorLock::DlKeypadOperationEventMask::kLockInvalidPIN, obj.value("KeypadOpLockErrorInvalidPIN",false)); + r.SetField(DoorLock::DlKeypadOperationEventMask::kLockInvalidSchedule, obj.value("KeypadOpLockErrorInvalidSchedule",false)); + r.SetField(DoorLock::DlKeypadOperationEventMask::kUnlockInvalidCode, obj.value("KeypadOpUnlockInvalidPIN",false)); + r.SetField(DoorLock::DlKeypadOperationEventMask::kUnlockInvalidSchedule, obj.value("KeypadOpUnlockInvalidSchedule",false)); + r.SetField(DoorLock::DlKeypadOperationEventMask::kNonAccessUserOpEvent, obj.value("KeypadOpNonAccessUser",false)); return r; -} -template <> -inline std::optional> from_json(const nlohmann::json& obj) -{ + } + template<> inline std::optional> from_json(const nlohmann::json& obj) { chip::BitMask r; - r.SetField(DoorLock::DlKeypadProgrammingEventMask::kUnknown, obj.value("KeypadProgUnknownOrMS", false)); - r.SetField(DoorLock::DlKeypadProgrammingEventMask::kProgrammingPINChanged, obj.value("KeypadProgMasterCodeChanged", false)); - r.SetField(DoorLock::DlKeypadProgrammingEventMask::kPINAdded, obj.value("KeypadProgPINAdded", false)); - r.SetField(DoorLock::DlKeypadProgrammingEventMask::kPINCleared, obj.value("KeypadProgPINDeleted", false)); - r.SetField(DoorLock::DlKeypadProgrammingEventMask::kPINChanged, obj.value("KeypadProgPINChanged", false)); + r.SetField(DoorLock::DlKeypadProgrammingEventMask::kUnknown, obj.value("KeypadProgUnknownOrMS",false)); + r.SetField(DoorLock::DlKeypadProgrammingEventMask::kProgrammingPINChanged, obj.value("KeypadProgMasterCodeChanged",false)); + r.SetField(DoorLock::DlKeypadProgrammingEventMask::kPINAdded, obj.value("KeypadProgPINAdded",false)); + r.SetField(DoorLock::DlKeypadProgrammingEventMask::kPINCleared, obj.value("KeypadProgPINDeleted",false)); + r.SetField(DoorLock::DlKeypadProgrammingEventMask::kPINChanged, obj.value("KeypadProgPINChanged",false)); return r; -} -template <> -inline std::optional> from_json(const nlohmann::json& obj) -{ + } + template<> inline std::optional> from_json(const nlohmann::json& obj) { chip::BitMask r; - r.SetField(DoorLock::DlLocalProgrammingFeatures::kAddUsersCredentialsSchedulesLocally, - obj.value("AddUsersCredentialsSchedulesLocally FIXME", false)); - r.SetField(DoorLock::DlLocalProgrammingFeatures::kModifyUsersCredentialsSchedulesLocally, - obj.value("ModifyUsersCredentialsSchedulesLocally FIXME", false)); - r.SetField(DoorLock::DlLocalProgrammingFeatures::kClearUsersCredentialsSchedulesLocally, - obj.value("ClearUsersCredentialsSchedulesLocally FIXME", false)); - r.SetField(DoorLock::DlLocalProgrammingFeatures::kAdjustLockSettingsLocally, - obj.value("AdjustLockSettingsLocally FIXME", false)); + r.SetField(DoorLock::DlLocalProgrammingFeatures::kAddUsersCredentialsSchedulesLocally, obj.value("AddUsersCredentialsSchedulesLocally FIXME",false)); + r.SetField(DoorLock::DlLocalProgrammingFeatures::kModifyUsersCredentialsSchedulesLocally, obj.value("ModifyUsersCredentialsSchedulesLocally FIXME",false)); + r.SetField(DoorLock::DlLocalProgrammingFeatures::kClearUsersCredentialsSchedulesLocally, obj.value("ClearUsersCredentialsSchedulesLocally FIXME",false)); + r.SetField(DoorLock::DlLocalProgrammingFeatures::kAdjustLockSettingsLocally, obj.value("AdjustLockSettingsLocally FIXME",false)); return r; -} -template <> -inline std::optional> from_json(const nlohmann::json& obj) -{ + } + template<> inline std::optional> from_json(const nlohmann::json& obj) { chip::BitMask r; - r.SetField(DoorLock::DlManualOperationEventMask::kUnknown, obj.value("Unknown FIXME", false)); - r.SetField(DoorLock::DlManualOperationEventMask::kThumbturnLock, obj.value("ThumbturnLock FIXME", false)); - r.SetField(DoorLock::DlManualOperationEventMask::kThumbturnUnlock, obj.value("ThumbturnUnlock FIXME", false)); - r.SetField(DoorLock::DlManualOperationEventMask::kOneTouchLock, obj.value("OneTouchLock FIXME", false)); - r.SetField(DoorLock::DlManualOperationEventMask::kKeyLock, obj.value("KeyLock FIXME", false)); - r.SetField(DoorLock::DlManualOperationEventMask::kKeyUnlock, obj.value("KeyUnlock FIXME", false)); - r.SetField(DoorLock::DlManualOperationEventMask::kAutoLock, obj.value("AutoLock FIXME", false)); - r.SetField(DoorLock::DlManualOperationEventMask::kScheduleLock, obj.value("ScheduleLock FIXME", false)); - r.SetField(DoorLock::DlManualOperationEventMask::kScheduleUnlock, obj.value("ScheduleUnlock FIXME", false)); - r.SetField(DoorLock::DlManualOperationEventMask::kManualLock, obj.value("ManualLock FIXME", false)); - r.SetField(DoorLock::DlManualOperationEventMask::kManualUnlock, obj.value("ManualUnlock FIXME", false)); + r.SetField(DoorLock::DlManualOperationEventMask::kUnknown, obj.value("Unknown FIXME",false)); + r.SetField(DoorLock::DlManualOperationEventMask::kThumbturnLock, obj.value("ThumbturnLock FIXME",false)); + r.SetField(DoorLock::DlManualOperationEventMask::kThumbturnUnlock, obj.value("ThumbturnUnlock FIXME",false)); + r.SetField(DoorLock::DlManualOperationEventMask::kOneTouchLock, obj.value("OneTouchLock FIXME",false)); + r.SetField(DoorLock::DlManualOperationEventMask::kKeyLock, obj.value("KeyLock FIXME",false)); + r.SetField(DoorLock::DlManualOperationEventMask::kKeyUnlock, obj.value("KeyUnlock FIXME",false)); + r.SetField(DoorLock::DlManualOperationEventMask::kAutoLock, obj.value("AutoLock FIXME",false)); + r.SetField(DoorLock::DlManualOperationEventMask::kScheduleLock, obj.value("ScheduleLock FIXME",false)); + r.SetField(DoorLock::DlManualOperationEventMask::kScheduleUnlock, obj.value("ScheduleUnlock FIXME",false)); + r.SetField(DoorLock::DlManualOperationEventMask::kManualLock, obj.value("ManualLock FIXME",false)); + r.SetField(DoorLock::DlManualOperationEventMask::kManualUnlock, obj.value("ManualUnlock FIXME",false)); return r; -} -template <> -inline std::optional> from_json(const nlohmann::json& obj) -{ + } + template<> inline std::optional> from_json(const nlohmann::json& obj) { chip::BitMask r; - r.SetField(DoorLock::DlRFIDOperationEventMask::kUnknown, obj.value("RFIDOpUnknownOrMS", false)); - r.SetField(DoorLock::DlRFIDOperationEventMask::kLock, obj.value("RFIDOpLock", false)); - r.SetField(DoorLock::DlRFIDOperationEventMask::kUnlock, obj.value("RFIDOpUnlock", false)); - r.SetField(DoorLock::DlRFIDOperationEventMask::kLockInvalidRFID, obj.value("RFIDOpLockErrorInvalidRFID", false)); - r.SetField(DoorLock::DlRFIDOperationEventMask::kLockInvalidSchedule, obj.value("RFIDOpLockErrorInvalidSchedule", false)); - r.SetField(DoorLock::DlRFIDOperationEventMask::kUnlockInvalidRFID, obj.value("RFIDOpUnlockErrorInvalidRFID", false)); - r.SetField(DoorLock::DlRFIDOperationEventMask::kUnlockInvalidSchedule, obj.value("RFIDOpUnlockErrorInvalidSchedule", false)); + r.SetField(DoorLock::DlRFIDOperationEventMask::kUnknown, obj.value("RFIDOpUnknownOrMS",false)); + r.SetField(DoorLock::DlRFIDOperationEventMask::kLock, obj.value("RFIDOpLock",false)); + r.SetField(DoorLock::DlRFIDOperationEventMask::kUnlock, obj.value("RFIDOpUnlock",false)); + r.SetField(DoorLock::DlRFIDOperationEventMask::kLockInvalidRFID, obj.value("RFIDOpLockErrorInvalidRFID",false)); + r.SetField(DoorLock::DlRFIDOperationEventMask::kLockInvalidSchedule, obj.value("RFIDOpLockErrorInvalidSchedule",false)); + r.SetField(DoorLock::DlRFIDOperationEventMask::kUnlockInvalidRFID, obj.value("RFIDOpUnlockErrorInvalidRFID",false)); + r.SetField(DoorLock::DlRFIDOperationEventMask::kUnlockInvalidSchedule, obj.value("RFIDOpUnlockErrorInvalidSchedule",false)); return r; -} -template <> -inline std::optional> from_json(const nlohmann::json& obj) -{ + } + template<> inline std::optional> from_json(const nlohmann::json& obj) { chip::BitMask r; - r.SetField(DoorLock::DlRFIDProgrammingEventMask::kUnknown, obj.value("RFIDProgUnknownOrMS", false)); - r.SetField(DoorLock::DlRFIDProgrammingEventMask::kRFIDCodeAdded, obj.value("RFIDProgRFIDAdded", false)); - r.SetField(DoorLock::DlRFIDProgrammingEventMask::kRFIDCodeCleared, obj.value("RFIDProgRFIDDeleted", false)); + r.SetField(DoorLock::DlRFIDProgrammingEventMask::kUnknown, obj.value("RFIDProgUnknownOrMS",false)); + r.SetField(DoorLock::DlRFIDProgrammingEventMask::kRFIDCodeAdded, obj.value("RFIDProgRFIDAdded",false)); + r.SetField(DoorLock::DlRFIDProgrammingEventMask::kRFIDCodeCleared, obj.value("RFIDProgRFIDDeleted",false)); return r; -} -template <> -inline std::optional> from_json(const nlohmann::json& obj) -{ + } + template<> inline std::optional> from_json(const nlohmann::json& obj) { chip::BitMask r; - r.SetField(DoorLock::DlRemoteOperationEventMask::kUnknown, obj.value("RFOpUnknownOrMS", false)); - r.SetField(DoorLock::DlRemoteOperationEventMask::kLock, obj.value("RFOpLock", false)); - r.SetField(DoorLock::DlRemoteOperationEventMask::kUnlock, obj.value("RFOpUnlock", false)); - r.SetField(DoorLock::DlRemoteOperationEventMask::kLockInvalidCode, obj.value("RFOpLockErrorInvalidCode", false)); - r.SetField(DoorLock::DlRemoteOperationEventMask::kLockInvalidSchedule, obj.value("RFOpLockErrorInvalidSchedule", false)); - r.SetField(DoorLock::DlRemoteOperationEventMask::kUnlockInvalidCode, obj.value("RFOpUnlockInvalidCode", false)); - r.SetField(DoorLock::DlRemoteOperationEventMask::kUnlockInvalidSchedule, obj.value("RFOpUnlockInvalidSchedule", false)); + r.SetField(DoorLock::DlRemoteOperationEventMask::kUnknown, obj.value("RFOpUnknownOrMS",false)); + r.SetField(DoorLock::DlRemoteOperationEventMask::kLock, obj.value("RFOpLock",false)); + r.SetField(DoorLock::DlRemoteOperationEventMask::kUnlock, obj.value("RFOpUnlock",false)); + r.SetField(DoorLock::DlRemoteOperationEventMask::kLockInvalidCode, obj.value("RFOpLockErrorInvalidCode",false)); + r.SetField(DoorLock::DlRemoteOperationEventMask::kLockInvalidSchedule, obj.value("RFOpLockErrorInvalidSchedule",false)); + r.SetField(DoorLock::DlRemoteOperationEventMask::kUnlockInvalidCode, obj.value("RFOpUnlockInvalidCode",false)); + r.SetField(DoorLock::DlRemoteOperationEventMask::kUnlockInvalidSchedule, obj.value("RFOpUnlockInvalidSchedule",false)); return r; -} -template <> -inline std::optional> from_json(const nlohmann::json& obj) -{ + } + template<> inline std::optional> from_json(const nlohmann::json& obj) { chip::BitMask r; - r.SetField(DoorLock::DlRemoteProgrammingEventMask::kUnknown, obj.value("RFProgUnknownOrMS", false)); - r.SetField(DoorLock::DlRemoteProgrammingEventMask::kProgrammingPINChanged, obj.value("", false)); - r.SetField(DoorLock::DlRemoteProgrammingEventMask::kPINAdded, obj.value("RFProgPINAdded", false)); - r.SetField(DoorLock::DlRemoteProgrammingEventMask::kPINCleared, obj.value("RFProgPINDeleted", false)); - r.SetField(DoorLock::DlRemoteProgrammingEventMask::kPINChanged, obj.value("RFProgPINChanged", false)); - r.SetField(DoorLock::DlRemoteProgrammingEventMask::kRFIDCodeAdded, obj.value("RFProgRFIDAdded", false)); - r.SetField(DoorLock::DlRemoteProgrammingEventMask::kRFIDCodeCleared, obj.value("RFProgRFIDDeleted", false)); + r.SetField(DoorLock::DlRemoteProgrammingEventMask::kUnknown, obj.value("RFProgUnknownOrMS",false)); + r.SetField(DoorLock::DlRemoteProgrammingEventMask::kProgrammingPINChanged, obj.value("",false)); + r.SetField(DoorLock::DlRemoteProgrammingEventMask::kPINAdded, obj.value("RFProgPINAdded",false)); + r.SetField(DoorLock::DlRemoteProgrammingEventMask::kPINCleared, obj.value("RFProgPINDeleted",false)); + r.SetField(DoorLock::DlRemoteProgrammingEventMask::kPINChanged, obj.value("RFProgPINChanged",false)); + r.SetField(DoorLock::DlRemoteProgrammingEventMask::kRFIDCodeAdded, obj.value("RFProgRFIDAdded",false)); + r.SetField(DoorLock::DlRemoteProgrammingEventMask::kRFIDCodeCleared, obj.value("RFProgRFIDDeleted",false)); return r; -} -template <> -inline std::optional> from_json(const nlohmann::json& obj) -{ + } + template<> inline std::optional> from_json(const nlohmann::json& obj) { chip::BitMask r; - r.SetField(DoorLock::DlSupportedOperatingModes::kNormal, obj.value("Normal FIXME", false)); - r.SetField(DoorLock::DlSupportedOperatingModes::kVacation, obj.value("Vacation FIXME", false)); - r.SetField(DoorLock::DlSupportedOperatingModes::kPrivacy, obj.value("Privacy FIXME", false)); - r.SetField(DoorLock::DlSupportedOperatingModes::kNoRemoteLockUnlock, obj.value("NoRemoteLockUnlock FIXME", false)); - r.SetField(DoorLock::DlSupportedOperatingModes::kPassage, obj.value("Passage FIXME", false)); + r.SetField(DoorLock::DlSupportedOperatingModes::kNormal, obj.value("Normal FIXME",false)); + r.SetField(DoorLock::DlSupportedOperatingModes::kVacation, obj.value("Vacation FIXME",false)); + r.SetField(DoorLock::DlSupportedOperatingModes::kPrivacy, obj.value("Privacy FIXME",false)); + r.SetField(DoorLock::DlSupportedOperatingModes::kNoRemoteLockUnlock, obj.value("NoRemoteLockUnlock FIXME",false)); + r.SetField(DoorLock::DlSupportedOperatingModes::kPassage, obj.value("Passage FIXME",false)); return r; -} -template <> -inline std::optional> from_json(const nlohmann::json& obj) -{ + } + template<> inline std::optional> from_json(const nlohmann::json& obj) { chip::BitMask r; - r.SetField(DoorLock::DoorLockDayOfWeek::kSunday, obj.value("Sunday FIXME", false)); - r.SetField(DoorLock::DoorLockDayOfWeek::kMonday, obj.value("Monday FIXME", false)); - r.SetField(DoorLock::DoorLockDayOfWeek::kTuesday, obj.value("Tuesday FIXME", false)); - r.SetField(DoorLock::DoorLockDayOfWeek::kWednesday, obj.value("Wednesday FIXME", false)); - r.SetField(DoorLock::DoorLockDayOfWeek::kThursday, obj.value("Thursday FIXME", false)); - r.SetField(DoorLock::DoorLockDayOfWeek::kFriday, obj.value("Friday FIXME", false)); - r.SetField(DoorLock::DoorLockDayOfWeek::kSaturday, obj.value("Saturday FIXME", false)); + r.SetField(DoorLock::DoorLockDayOfWeek::kSunday, obj.value("Sunday FIXME",false)); + r.SetField(DoorLock::DoorLockDayOfWeek::kMonday, obj.value("Monday FIXME",false)); + r.SetField(DoorLock::DoorLockDayOfWeek::kTuesday, obj.value("Tuesday FIXME",false)); + r.SetField(DoorLock::DoorLockDayOfWeek::kWednesday, obj.value("Wednesday FIXME",false)); + r.SetField(DoorLock::DoorLockDayOfWeek::kThursday, obj.value("Thursday FIXME",false)); + r.SetField(DoorLock::DoorLockDayOfWeek::kFriday, obj.value("Friday FIXME",false)); + r.SetField(DoorLock::DoorLockDayOfWeek::kSaturday, obj.value("Saturday FIXME",false)); return r; -} -template <> -inline std::optional> from_json(const nlohmann::json& obj) -{ + } + template<> inline std::optional> from_json(const nlohmann::json& obj) { chip::BitMask r; - r.SetField(DoorLock::DoorLockFeature::kPINCredentials, obj.value("PINCredentials FIXME", false)); - r.SetField(DoorLock::DoorLockFeature::kRFIDCredentials, obj.value("RFIDCredentials FIXME", false)); - r.SetField(DoorLock::DoorLockFeature::kFingerCredentials, obj.value("FingerCredentials FIXME", false)); - r.SetField(DoorLock::DoorLockFeature::kLogging, obj.value("Logging FIXME", false)); - r.SetField(DoorLock::DoorLockFeature::kWeekDaySchedules, obj.value("WeekDaySchedules FIXME", false)); - r.SetField(DoorLock::DoorLockFeature::kDoorPositionSensor, obj.value("DoorPositionSensor FIXME", false)); - r.SetField(DoorLock::DoorLockFeature::kFaceCredentials, obj.value("FaceCredentials FIXME", false)); - r.SetField(DoorLock::DoorLockFeature::kCredentialsOTA, obj.value("CredentialsOTA FIXME", false)); - r.SetField(DoorLock::DoorLockFeature::kUsersManagement, obj.value("UsersManagement FIXME", false)); - r.SetField(DoorLock::DoorLockFeature::kNotifications, obj.value("Notifications FIXME", false)); - r.SetField(DoorLock::DoorLockFeature::kYearDaySchedules, obj.value("YearDaySchedules FIXME", false)); - r.SetField(DoorLock::DoorLockFeature::kHolidaySchedules, obj.value("HolidaySchedules FIXME", false)); + r.SetField(DoorLock::DoorLockFeature::kPINCredentials, obj.value("PINCredentials FIXME",false)); + r.SetField(DoorLock::DoorLockFeature::kRFIDCredentials, obj.value("RFIDCredentials FIXME",false)); + r.SetField(DoorLock::DoorLockFeature::kFingerCredentials, obj.value("FingerCredentials FIXME",false)); + r.SetField(DoorLock::DoorLockFeature::kLogging, obj.value("Logging FIXME",false)); + r.SetField(DoorLock::DoorLockFeature::kWeekDaySchedules, obj.value("WeekDaySchedules FIXME",false)); + r.SetField(DoorLock::DoorLockFeature::kDoorPositionSensor, obj.value("DoorPositionSensor FIXME",false)); + r.SetField(DoorLock::DoorLockFeature::kFaceCredentials, obj.value("FaceCredentials FIXME",false)); + r.SetField(DoorLock::DoorLockFeature::kCredentialsOTA, obj.value("CredentialsOTA FIXME",false)); + r.SetField(DoorLock::DoorLockFeature::kUsersManagement, obj.value("UsersManagement FIXME",false)); + r.SetField(DoorLock::DoorLockFeature::kNotifications, obj.value("Notifications FIXME",false)); + r.SetField(DoorLock::DoorLockFeature::kYearDaySchedules, obj.value("YearDaySchedules FIXME",false)); + r.SetField(DoorLock::DoorLockFeature::kHolidaySchedules, obj.value("HolidaySchedules FIXME",false)); return r; -} + } -template <> -inline std::optional from_json(const nlohmann::json& value) -{ - const std::map table = { - { "LockJammed FIXME", DoorLock::DlAlarmCode::kLockJammed }, - { "LockFactoryReset FIXME", DoorLock::DlAlarmCode::kLockFactoryReset }, - { "LockRadioPowerCycled FIXME", DoorLock::DlAlarmCode::kLockRadioPowerCycled }, - { "WrongCodeEntryLimit FIXME", DoorLock::DlAlarmCode::kWrongCodeEntryLimit }, - { "FrontEsceutcheonRemoved FIXME", DoorLock::DlAlarmCode::kFrontEsceutcheonRemoved }, - { "DoorForcedOpen FIXME", DoorLock::DlAlarmCode::kDoorForcedOpen }, - { "DoorAjar FIXME", DoorLock::DlAlarmCode::kDoorAjar }, - { "ForcedUser FIXME", DoorLock::DlAlarmCode::kForcedUser }, - }; - - auto i = table.find(value); - if (i != table.end()) { + +template<> inline std::optional from_json(const nlohmann::json& value) { + const std::map< std::string, DoorLock::DlAlarmCode> + table = { + { "LockJammed FIXME" , DoorLock::DlAlarmCode::kLockJammed }, + { "LockFactoryReset FIXME" , DoorLock::DlAlarmCode::kLockFactoryReset }, + { "LockRadioPowerCycled FIXME" , DoorLock::DlAlarmCode::kLockRadioPowerCycled }, + { "WrongCodeEntryLimit FIXME" , DoorLock::DlAlarmCode::kWrongCodeEntryLimit }, + { "FrontEsceutcheonRemoved FIXME" , DoorLock::DlAlarmCode::kFrontEsceutcheonRemoved }, + { "DoorForcedOpen FIXME" , DoorLock::DlAlarmCode::kDoorForcedOpen }, + { "DoorAjar FIXME" , DoorLock::DlAlarmCode::kDoorAjar }, + { "ForcedUser FIXME" , DoorLock::DlAlarmCode::kForcedUser }, + }; + + 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 = { - { "Single FIXME", DoorLock::DlCredentialRule::kSingle }, - { "Double FIXME", DoorLock::DlCredentialRule::kDouble }, - { "Tri FIXME", DoorLock::DlCredentialRule::kTri }, - }; - - auto i = table.find(value); - if (i != table.end()) { +template<> inline std::optional from_json(const nlohmann::json& value) { + const std::map< std::string, DoorLock::DlCredentialRule> + table = { + { "Single FIXME" , DoorLock::DlCredentialRule::kSingle }, + { "Double FIXME" , DoorLock::DlCredentialRule::kDouble }, + { "Tri FIXME" , DoorLock::DlCredentialRule::kTri }, + }; + + 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 = { - { "ProgrammingPIN FIXME", DoorLock::DlCredentialType::kProgrammingPIN }, - { "PIN FIXME", DoorLock::DlCredentialType::kPin }, - { "RFID FIXME", DoorLock::DlCredentialType::kRfid }, - { "Fingerprint FIXME", DoorLock::DlCredentialType::kFingerprint }, - { "FingerVein FIXME", DoorLock::DlCredentialType::kFingerVein }, - { "Face FIXME", DoorLock::DlCredentialType::kFace }, - }; - - auto i = table.find(value); - if (i != table.end()) { +template<> inline std::optional from_json(const nlohmann::json& value) { + const std::map< std::string, DoorLock::DlCredentialType> + table = { + { "ProgrammingPIN FIXME" , DoorLock::DlCredentialType::kProgrammingPIN }, + { "PIN FIXME" , DoorLock::DlCredentialType::kPin }, + { "RFID FIXME" , DoorLock::DlCredentialType::kRfid }, + { "Fingerprint FIXME" , DoorLock::DlCredentialType::kFingerprint }, + { "FingerVein FIXME" , DoorLock::DlCredentialType::kFingerVein }, + { "Face FIXME" , DoorLock::DlCredentialType::kFace }, + }; + + 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 = { - { "Add FIXME", DoorLock::DlDataOperationType::kAdd }, - { "Clear FIXME", DoorLock::DlDataOperationType::kClear }, - { "Modify FIXME", DoorLock::DlDataOperationType::kModify }, - }; - - auto i = table.find(value); - if (i != table.end()) { +template<> inline std::optional from_json(const nlohmann::json& value) { + const std::map< std::string, DoorLock::DlDataOperationType> + table = { + { "Add FIXME" , DoorLock::DlDataOperationType::kAdd }, + { "Clear FIXME" , DoorLock::DlDataOperationType::kClear }, + { "Modify FIXME" , DoorLock::DlDataOperationType::kModify }, + }; + + 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 = { - { "Open", DoorLock::DlDoorState::kDoorOpen }, - { "Closed", DoorLock::DlDoorState::kDoorClosed }, - { "ErrorJammed", DoorLock::DlDoorState::kDoorJammed }, - { "ErrorForcedOpen", DoorLock::DlDoorState::kDoorForcedOpen }, - { "ErrorUnspecified", DoorLock::DlDoorState::kDoorUnspecifiedError }, - { "Undefined", DoorLock::DlDoorState::kDoorAjar }, - }; - - auto i = table.find(value); - if (i != table.end()) { +template<> inline std::optional from_json(const nlohmann::json& value) { + const std::map< std::string, DoorLock::DlDoorState> + table = { + { "Open" , DoorLock::DlDoorState::kDoorOpen }, + { "Closed" , DoorLock::DlDoorState::kDoorClosed }, + { "ErrorJammed" , DoorLock::DlDoorState::kDoorJammed }, + { "ErrorForcedOpen" , DoorLock::DlDoorState::kDoorForcedOpen }, + { "ErrorUnspecified" , DoorLock::DlDoorState::kDoorUnspecifiedError }, + { "Undefined" , DoorLock::DlDoorState::kDoorAjar }, + }; + + 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 = { - { "Unspecified FIXME", DoorLock::DlLockDataType::kUnspecified }, - { "ProgrammingCode FIXME", DoorLock::DlLockDataType::kProgrammingCode }, - { "UserIndex FIXME", DoorLock::DlLockDataType::kUserIndex }, - { "WeekDaySchedule FIXME", DoorLock::DlLockDataType::kWeekDaySchedule }, - { "YearDaySchedule FIXME", DoorLock::DlLockDataType::kYearDaySchedule }, - { "HolidaySchedule FIXME", DoorLock::DlLockDataType::kHolidaySchedule }, - { "PIN FIXME", DoorLock::DlLockDataType::kPin }, - { "RFID FIXME", DoorLock::DlLockDataType::kRfid }, - { "Fingerprint FIXME", DoorLock::DlLockDataType::kFingerprint }, - }; - - auto i = table.find(value); - if (i != table.end()) { +template<> inline std::optional from_json(const nlohmann::json& value) { + const std::map< std::string, DoorLock::DlLockDataType> + table = { + { "Unspecified FIXME" , DoorLock::DlLockDataType::kUnspecified }, + { "ProgrammingCode FIXME" , DoorLock::DlLockDataType::kProgrammingCode }, + { "UserIndex FIXME" , DoorLock::DlLockDataType::kUserIndex }, + { "WeekDaySchedule FIXME" , DoorLock::DlLockDataType::kWeekDaySchedule }, + { "YearDaySchedule FIXME" , DoorLock::DlLockDataType::kYearDaySchedule }, + { "HolidaySchedule FIXME" , DoorLock::DlLockDataType::kHolidaySchedule }, + { "PIN FIXME" , DoorLock::DlLockDataType::kPin }, + { "RFID FIXME" , DoorLock::DlLockDataType::kRfid }, + { "Fingerprint FIXME" , DoorLock::DlLockDataType::kFingerprint }, + }; + + 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 = { - { "Lock FIXME", DoorLock::DlLockOperationType::kLock }, - { "Unlock FIXME", DoorLock::DlLockOperationType::kUnlock }, - { "NonAccessUserEvent FIXME", DoorLock::DlLockOperationType::kNonAccessUserEvent }, - { "ForcedUserEvent FIXME", DoorLock::DlLockOperationType::kForcedUserEvent }, - }; - - auto i = table.find(value); - if (i != table.end()) { +template<> inline std::optional from_json(const nlohmann::json& value) { + const std::map< std::string, DoorLock::DlLockOperationType> + table = { + { "Lock FIXME" , DoorLock::DlLockOperationType::kLock }, + { "Unlock FIXME" , DoorLock::DlLockOperationType::kUnlock }, + { "NonAccessUserEvent FIXME" , DoorLock::DlLockOperationType::kNonAccessUserEvent }, + { "ForcedUserEvent FIXME" , DoorLock::DlLockOperationType::kForcedUserEvent }, + }; + + 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 = { - { "NotFullyLocked", DoorLock::DlLockState::kNotFullyLocked }, - { "Locked", DoorLock::DlLockState::kLocked }, - { "Unlocked", DoorLock::DlLockState::kUnlocked }, - }; - - auto i = table.find(value); - if (i != table.end()) { +template<> inline std::optional from_json(const nlohmann::json& value) { + const std::map< std::string, DoorLock::DlLockState> + table = { + { "NotFullyLocked" , DoorLock::DlLockState::kNotFullyLocked }, + { "Locked" , DoorLock::DlLockState::kLocked }, + { "Unlocked" , DoorLock::DlLockState::kUnlocked }, + }; + + 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 = { - { "DeadBolt", DoorLock::DlLockType::kDeadBolt }, - { "Magnetic", DoorLock::DlLockType::kMagnetic }, - { "Other", DoorLock::DlLockType::kOther }, - { "Mortise", DoorLock::DlLockType::kMortise }, - { "Rim", DoorLock::DlLockType::kRim }, - { "LatchBolt", DoorLock::DlLockType::kLatchBolt }, - { "CylindricalLock", DoorLock::DlLockType::kCylindricalLock }, - { "TubularLock", DoorLock::DlLockType::kTubularLock }, - { "InterconnectedLock", DoorLock::DlLockType::kInterconnectedLock }, - { "DeadLatch", DoorLock::DlLockType::kDeadLatch }, - { "DoorFurniture", DoorLock::DlLockType::kDoorFurniture }, - }; - - auto i = table.find(value); - if (i != table.end()) { +template<> inline std::optional from_json(const nlohmann::json& value) { + const std::map< std::string, DoorLock::DlLockType> + table = { + { "DeadBolt" , DoorLock::DlLockType::kDeadBolt }, + { "Magnetic" , DoorLock::DlLockType::kMagnetic }, + { "Other" , DoorLock::DlLockType::kOther }, + { "Mortise" , DoorLock::DlLockType::kMortise }, + { "Rim" , DoorLock::DlLockType::kRim }, + { "LatchBolt" , DoorLock::DlLockType::kLatchBolt }, + { "CylindricalLock" , DoorLock::DlLockType::kCylindricalLock }, + { "TubularLock" , DoorLock::DlLockType::kTubularLock }, + { "InterconnectedLock" , DoorLock::DlLockType::kInterconnectedLock }, + { "DeadLatch" , DoorLock::DlLockType::kDeadLatch }, + { "DoorFurniture" , DoorLock::DlLockType::kDoorFurniture }, + }; + + 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 = { - { "Normal FIXME", DoorLock::DlOperatingMode::kNormal }, - { "Vacation FIXME", DoorLock::DlOperatingMode::kVacation }, - { "Privacy FIXME", DoorLock::DlOperatingMode::kPrivacy }, - { "NoRemoteLockUnlock FIXME", DoorLock::DlOperatingMode::kNoRemoteLockUnlock }, - { "Passage FIXME", DoorLock::DlOperatingMode::kPassage }, - }; - - auto i = table.find(value); - if (i != table.end()) { +template<> inline std::optional from_json(const nlohmann::json& value) { + const std::map< std::string, DoorLock::DlOperatingMode> + table = { + { "Normal FIXME" , DoorLock::DlOperatingMode::kNormal }, + { "Vacation FIXME" , DoorLock::DlOperatingMode::kVacation }, + { "Privacy FIXME" , DoorLock::DlOperatingMode::kPrivacy }, + { "NoRemoteLockUnlock FIXME" , DoorLock::DlOperatingMode::kNoRemoteLockUnlock }, + { "Passage FIXME" , DoorLock::DlOperatingMode::kPassage }, + }; + + 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 = { - { "Unspecified FIXME", DoorLock::DlOperationError::kUnspecified }, - { "InvalidCredential FIXME", DoorLock::DlOperationError::kInvalidCredential }, - { "DisabledUserDenied FIXME", DoorLock::DlOperationError::kDisabledUserDenied }, - { "Restricted FIXME", DoorLock::DlOperationError::kRestricted }, - { "InsufficientBattery FIXME", DoorLock::DlOperationError::kInsufficientBattery }, - }; - - auto i = table.find(value); - if (i != table.end()) { +template<> inline std::optional from_json(const nlohmann::json& value) { + const std::map< std::string, DoorLock::DlOperationError> + table = { + { "Unspecified FIXME" , DoorLock::DlOperationError::kUnspecified }, + { "InvalidCredential FIXME" , DoorLock::DlOperationError::kInvalidCredential }, + { "DisabledUserDenied FIXME" , DoorLock::DlOperationError::kDisabledUserDenied }, + { "Restricted FIXME" , DoorLock::DlOperationError::kRestricted }, + { "InsufficientBattery FIXME" , DoorLock::DlOperationError::kInsufficientBattery }, + }; + + 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 = { - { "Unspecified FIXME", DoorLock::DlOperationSource::kUnspecified }, - { "Manual FIXME", DoorLock::DlOperationSource::kManual }, - { "ProprietaryRemote FIXME", DoorLock::DlOperationSource::kProprietaryRemote }, - { "Keypad FIXME", DoorLock::DlOperationSource::kKeypad }, - { "Auto FIXME", DoorLock::DlOperationSource::kAuto }, - { "Button FIXME", DoorLock::DlOperationSource::kButton }, - { "Schedule FIXME", DoorLock::DlOperationSource::kSchedule }, - { "Remote FIXME", DoorLock::DlOperationSource::kRemote }, - { "RFID FIXME", DoorLock::DlOperationSource::kRfid }, - { "Biometric FIXME", DoorLock::DlOperationSource::kBiometric }, - }; - - auto i = table.find(value); - if (i != table.end()) { +template<> inline std::optional from_json(const nlohmann::json& value) { + const std::map< std::string, DoorLock::DlOperationSource> + table = { + { "Unspecified FIXME" , DoorLock::DlOperationSource::kUnspecified }, + { "Manual FIXME" , DoorLock::DlOperationSource::kManual }, + { "ProprietaryRemote FIXME" , DoorLock::DlOperationSource::kProprietaryRemote }, + { "Keypad FIXME" , DoorLock::DlOperationSource::kKeypad }, + { "Auto FIXME" , DoorLock::DlOperationSource::kAuto }, + { "Button FIXME" , DoorLock::DlOperationSource::kButton }, + { "Schedule FIXME" , DoorLock::DlOperationSource::kSchedule }, + { "Remote FIXME" , DoorLock::DlOperationSource::kRemote }, + { "RFID FIXME" , DoorLock::DlOperationSource::kRfid }, + { "Biometric FIXME" , DoorLock::DlOperationSource::kBiometric }, + }; + + 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 = { - { "Success FIXME", DoorLock::DlStatus::kSuccess }, - { "Failure FIXME", DoorLock::DlStatus::kFailure }, - { "Duplicate FIXME", DoorLock::DlStatus::kDuplicate }, - { "Occupied FIXME", DoorLock::DlStatus::kOccupied }, - { "InvalidField FIXME", DoorLock::DlStatus::kInvalidField }, - { "ResourceExhausted FIXME", DoorLock::DlStatus::kResourceExhausted }, - { "NotFound FIXME", DoorLock::DlStatus::kNotFound }, - }; - - auto i = table.find(value); - if (i != table.end()) { +template<> inline std::optional from_json(const nlohmann::json& value) { + const std::map< std::string, DoorLock::DlStatus> + table = { + { "Success FIXME" , DoorLock::DlStatus::kSuccess }, + { "Failure FIXME" , DoorLock::DlStatus::kFailure }, + { "Duplicate FIXME" , DoorLock::DlStatus::kDuplicate }, + { "Occupied FIXME" , DoorLock::DlStatus::kOccupied }, + { "InvalidField FIXME" , DoorLock::DlStatus::kInvalidField }, + { "ResourceExhausted FIXME" , DoorLock::DlStatus::kResourceExhausted }, + { "NotFound FIXME" , DoorLock::DlStatus::kNotFound }, + }; + + 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 = { - { "Available FIXME", DoorLock::DlUserStatus::kAvailable }, - { "OccupiedEnabled FIXME", DoorLock::DlUserStatus::kOccupiedEnabled }, - { "OccupiedDisabled FIXME", DoorLock::DlUserStatus::kOccupiedDisabled }, - }; - - auto i = table.find(value); - if (i != table.end()) { +template<> inline std::optional from_json(const nlohmann::json& value) { + const std::map< std::string, DoorLock::DlUserStatus> + table = { + { "Available FIXME" , DoorLock::DlUserStatus::kAvailable }, + { "OccupiedEnabled FIXME" , DoorLock::DlUserStatus::kOccupiedEnabled }, + { "OccupiedDisabled FIXME" , DoorLock::DlUserStatus::kOccupiedDisabled }, + }; + + 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 = { - { "UnrestrictedUser FIXME", DoorLock::DlUserType::kUnrestrictedUser }, - { "YearDayScheduleUser FIXME", DoorLock::DlUserType::kYearDayScheduleUser }, - { "WeekDayScheduleUser FIXME", DoorLock::DlUserType::kWeekDayScheduleUser }, - { "ProgrammingUser FIXME", DoorLock::DlUserType::kProgrammingUser }, - { "NonAccessUser FIXME", DoorLock::DlUserType::kNonAccessUser }, - { "ForcedUser FIXME", DoorLock::DlUserType::kForcedUser }, - { "DisposableUser FIXME", DoorLock::DlUserType::kDisposableUser }, - { "ExpiringUser FIXME", DoorLock::DlUserType::kExpiringUser }, - { "ScheduleRestrictedUser FIXME", DoorLock::DlUserType::kScheduleRestrictedUser }, - { "RemoteOnlyUser FIXME", DoorLock::DlUserType::kRemoteOnlyUser }, - }; - - auto i = table.find(value); - if (i != table.end()) { +template<> inline std::optional from_json(const nlohmann::json& value) { + const std::map< std::string, DoorLock::DlUserType> + table = { + { "UnrestrictedUser FIXME" , DoorLock::DlUserType::kUnrestrictedUser }, + { "YearDayScheduleUser FIXME" , DoorLock::DlUserType::kYearDayScheduleUser }, + { "WeekDayScheduleUser FIXME" , DoorLock::DlUserType::kWeekDayScheduleUser }, + { "ProgrammingUser FIXME" , DoorLock::DlUserType::kProgrammingUser }, + { "NonAccessUser FIXME" , DoorLock::DlUserType::kNonAccessUser }, + { "ForcedUser FIXME" , DoorLock::DlUserType::kForcedUser }, + { "DisposableUser FIXME" , DoorLock::DlUserType::kDisposableUser }, + { "ExpiringUser FIXME" , DoorLock::DlUserType::kExpiringUser }, + { "ScheduleRestrictedUser FIXME" , DoorLock::DlUserType::kScheduleRestrictedUser }, + { "RemoteOnlyUser FIXME" , DoorLock::DlUserType::kRemoteOnlyUser }, + }; + + 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 = { - { "UnknownOrMS", DoorLock::DoorLockOperationEventCode::kUnknownOrMfgSpecific }, - { "Lock", DoorLock::DoorLockOperationEventCode::kLock }, - { "Unlock", DoorLock::DoorLockOperationEventCode::kUnlock }, - { "LockFailureInvalidPINOrID", DoorLock::DoorLockOperationEventCode::kLockInvalidPinOrId }, - { "LockFailureInvalidSchedule", DoorLock::DoorLockOperationEventCode::kLockInvalidSchedule }, - { "UnlockFailureInvalidPINOrID", DoorLock::DoorLockOperationEventCode::kUnlockInvalidPinOrId }, - { "UnlockFailureInvalidSchedule", DoorLock::DoorLockOperationEventCode::kUnlockInvalidSchedule }, - { "OneTouchLock", DoorLock::DoorLockOperationEventCode::kOneTouchLock }, - { "KeyLock", DoorLock::DoorLockOperationEventCode::kKeyLock }, - { "KeyUnlock", DoorLock::DoorLockOperationEventCode::kKeyUnlock }, - { "AutoLock", DoorLock::DoorLockOperationEventCode::kAutoLock }, - { "ScheduleLock", DoorLock::DoorLockOperationEventCode::kScheduleLock }, - { "ScheduleUnlock", DoorLock::DoorLockOperationEventCode::kScheduleUnlock }, - { "ManualLock", DoorLock::DoorLockOperationEventCode::kManualLock }, - { "ManualUnlock", DoorLock::DoorLockOperationEventCode::kManualUnlock }, - }; - - auto i = table.find(value); - if (i != table.end()) { +template<> inline std::optional from_json(const nlohmann::json& value) { + const std::map< std::string, DoorLock::DoorLockOperationEventCode> + table = { + { "UnknownOrMS" , DoorLock::DoorLockOperationEventCode::kUnknownOrMfgSpecific }, + { "Lock" , DoorLock::DoorLockOperationEventCode::kLock }, + { "Unlock" , DoorLock::DoorLockOperationEventCode::kUnlock }, + { "LockFailureInvalidPINOrID" , DoorLock::DoorLockOperationEventCode::kLockInvalidPinOrId }, + { "LockFailureInvalidSchedule" , DoorLock::DoorLockOperationEventCode::kLockInvalidSchedule }, + { "UnlockFailureInvalidPINOrID" , DoorLock::DoorLockOperationEventCode::kUnlockInvalidPinOrId }, + { "UnlockFailureInvalidSchedule" , DoorLock::DoorLockOperationEventCode::kUnlockInvalidSchedule }, + { "OneTouchLock" , DoorLock::DoorLockOperationEventCode::kOneTouchLock }, + { "KeyLock" , DoorLock::DoorLockOperationEventCode::kKeyLock }, + { "KeyUnlock" , DoorLock::DoorLockOperationEventCode::kKeyUnlock }, + { "AutoLock" , DoorLock::DoorLockOperationEventCode::kAutoLock }, + { "ScheduleLock" , DoorLock::DoorLockOperationEventCode::kScheduleLock }, + { "ScheduleUnlock" , DoorLock::DoorLockOperationEventCode::kScheduleUnlock }, + { "ManualLock" , DoorLock::DoorLockOperationEventCode::kManualLock }, + { "ManualUnlock" , DoorLock::DoorLockOperationEventCode::kManualUnlock }, + }; + + 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 = { - { "UnknownOrMS", DoorLock::DoorLockProgrammingEventCode::kUnknownOrMfgSpecific }, - { "MasterCodeChanged", DoorLock::DoorLockProgrammingEventCode::kMasterCodeChanged }, - { "PINCodeAdded", DoorLock::DoorLockProgrammingEventCode::kPinAdded }, - { "PINCodeDeleted", DoorLock::DoorLockProgrammingEventCode::kPinDeleted }, - { "PINCodeChanged", DoorLock::DoorLockProgrammingEventCode::kPinChanged }, - { "RFIDCodeAdded", DoorLock::DoorLockProgrammingEventCode::kIdAdded }, - { "RFIDCodeDeleted", DoorLock::DoorLockProgrammingEventCode::kIdDeleted }, - }; - - auto i = table.find(value); - if (i != table.end()) { +template<> inline std::optional from_json(const nlohmann::json& value) { + const std::map< std::string, DoorLock::DoorLockProgrammingEventCode> + table = { + { "UnknownOrMS" , DoorLock::DoorLockProgrammingEventCode::kUnknownOrMfgSpecific }, + { "MasterCodeChanged" , DoorLock::DoorLockProgrammingEventCode::kMasterCodeChanged }, + { "PINCodeAdded" , DoorLock::DoorLockProgrammingEventCode::kPinAdded }, + { "PINCodeDeleted" , DoorLock::DoorLockProgrammingEventCode::kPinDeleted }, + { "PINCodeChanged" , DoorLock::DoorLockProgrammingEventCode::kPinChanged }, + { "RFIDCodeAdded" , DoorLock::DoorLockProgrammingEventCode::kIdAdded }, + { "RFIDCodeDeleted" , DoorLock::DoorLockProgrammingEventCode::kIdDeleted }, + }; + + 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 = { - { "Success", DoorLock::DoorLockSetPinOrIdStatus::kSuccess }, - { "GeneralFailure", DoorLock::DoorLockSetPinOrIdStatus::kGeneralFailure }, - { "MemoryFull", DoorLock::DoorLockSetPinOrIdStatus::kMemoryFull }, - { "DuplicateCode", DoorLock::DoorLockSetPinOrIdStatus::kDuplicateCodeError }, - }; - - auto i = table.find(value); - if (i != table.end()) { +template<> inline std::optional from_json(const nlohmann::json& value) { + const std::map< std::string, DoorLock::DoorLockSetPinOrIdStatus> + table = { + { "Success" , DoorLock::DoorLockSetPinOrIdStatus::kSuccess }, + { "GeneralFailure" , DoorLock::DoorLockSetPinOrIdStatus::kGeneralFailure }, + { "MemoryFull" , DoorLock::DoorLockSetPinOrIdStatus::kMemoryFull }, + { "DuplicateCode" , DoorLock::DoorLockSetPinOrIdStatus::kDuplicateCodeError }, + }; + + 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 = { - { "Available", DoorLock::DoorLockUserStatus::kAvailable }, - { "OccupiedEnabled", DoorLock::DoorLockUserStatus::kOccupiedEnabled }, - { "OccupiedDisabled", DoorLock::DoorLockUserStatus::kOccupiedDisabled }, - { "NotSupported", DoorLock::DoorLockUserStatus::kNotSupported }, - }; - - auto i = table.find(value); - if (i != table.end()) { +template<> inline std::optional from_json(const nlohmann::json& value) { + const std::map< std::string, DoorLock::DoorLockUserStatus> + table = { + { "Available" , DoorLock::DoorLockUserStatus::kAvailable }, + { "OccupiedEnabled" , DoorLock::DoorLockUserStatus::kOccupiedEnabled }, + { "OccupiedDisabled" , DoorLock::DoorLockUserStatus::kOccupiedDisabled }, + { "NotSupported" , DoorLock::DoorLockUserStatus::kNotSupported }, + }; + + 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 = { - { "UnrestrictedUser", DoorLock::DoorLockUserType::kUnrestricted }, - { "YearDayScheduleUser", DoorLock::DoorLockUserType::kYearDayScheduleUser }, - { "WeekDayScheduleUser", DoorLock::DoorLockUserType::kWeekDayScheduleUser }, - { "MasterUser", DoorLock::DoorLockUserType::kMasterUser }, - { "NonAccessUser", DoorLock::DoorLockUserType::kNonAccessUser }, - { "NotSupported", DoorLock::DoorLockUserType::kNotSupported }, - }; - - auto i = table.find(value); - if (i != table.end()) { +template<> inline std::optional from_json(const nlohmann::json& value) { + const std::map< std::string, DoorLock::DoorLockUserType> + table = { + { "UnrestrictedUser" , DoorLock::DoorLockUserType::kUnrestricted }, + { "YearDayScheduleUser" , DoorLock::DoorLockUserType::kYearDayScheduleUser }, + { "WeekDayScheduleUser" , DoorLock::DoorLockUserType::kWeekDayScheduleUser }, + { "MasterUser" , DoorLock::DoorLockUserType::kMasterUser }, + { "NonAccessUser" , DoorLock::DoorLockUserType::kNonAccessUser }, + { "NotSupported" , DoorLock::DoorLockUserType::kNotSupported }, + }; + + auto i = table.find( value ); + if( i != table.end() ) { return i->second; } else { return std::nullopt; } } -/***************************** Bitmap Converters **************/ + /***************************** Bitmap Converters **************/ -/***************************** Bitmap Converters **************/ -template <> -inline std::optional> from_json(const nlohmann::json& obj) -{ + + /***************************** Bitmap Converters **************/ + template<> inline std::optional> from_json(const nlohmann::json& obj) { chip::BitMask r; - r.SetField(Thermostat::DayOfWeek::kSunday, obj.value("Sunday", false)); - r.SetField(Thermostat::DayOfWeek::kMonday, obj.value("Monday", false)); - r.SetField(Thermostat::DayOfWeek::kTuesday, obj.value("Tuesday", false)); - r.SetField(Thermostat::DayOfWeek::kWednesday, obj.value("Wednesday", false)); - r.SetField(Thermostat::DayOfWeek::kThursday, obj.value("Thursday", false)); - r.SetField(Thermostat::DayOfWeek::kFriday, obj.value("Friday", false)); - r.SetField(Thermostat::DayOfWeek::kSaturday, obj.value("Saturday", false)); - r.SetField(Thermostat::DayOfWeek::kAwayOrVacation, obj.value("AwayOrVacation", false)); + r.SetField(Thermostat::DayOfWeek::kSunday, obj.value("Sunday",false)); + r.SetField(Thermostat::DayOfWeek::kMonday, obj.value("Monday",false)); + r.SetField(Thermostat::DayOfWeek::kTuesday, obj.value("Tuesday",false)); + r.SetField(Thermostat::DayOfWeek::kWednesday, obj.value("Wednesday",false)); + r.SetField(Thermostat::DayOfWeek::kThursday, obj.value("Thursday",false)); + r.SetField(Thermostat::DayOfWeek::kFriday, obj.value("Friday",false)); + r.SetField(Thermostat::DayOfWeek::kSaturday, obj.value("Saturday",false)); + r.SetField(Thermostat::DayOfWeek::kAwayOrVacation, obj.value("AwayOrVacation",false)); return r; -} -template <> -inline std::optional> from_json(const nlohmann::json& obj) -{ + } + template<> inline std::optional> from_json(const nlohmann::json& obj) { chip::BitMask r; - r.SetField(Thermostat::ModeForSequence::kHeatSetpointFieldPresent, obj.value("Heat", false)); - r.SetField(Thermostat::ModeForSequence::kCoolSetpointFieldPresent, obj.value("Cool", false)); + r.SetField(Thermostat::ModeForSequence::kHeatSetpointFieldPresent, obj.value("Heat",false)); + r.SetField(Thermostat::ModeForSequence::kCoolSetpointFieldPresent, obj.value("Cool",false)); return r; -} -template <> -inline std::optional> from_json(const nlohmann::json& obj) -{ + } + template<> inline std::optional> from_json(const nlohmann::json& obj) { chip::BitMask r; - r.SetField(Thermostat::ThermostatFeature::kHeating, obj.value("Heating FIXME", false)); - r.SetField(Thermostat::ThermostatFeature::kCooling, obj.value("Cooling FIXME", false)); - r.SetField(Thermostat::ThermostatFeature::kOccupancy, obj.value("Occupancy FIXME", false)); - r.SetField(Thermostat::ThermostatFeature::kSchedule, obj.value("Schedule FIXME", false)); - r.SetField(Thermostat::ThermostatFeature::kSetback, obj.value("Setback FIXME", false)); - r.SetField(Thermostat::ThermostatFeature::kAutomode, obj.value("Automode FIXME", false)); + r.SetField(Thermostat::ThermostatFeature::kHeating, obj.value("Heating FIXME",false)); + r.SetField(Thermostat::ThermostatFeature::kCooling, obj.value("Cooling FIXME",false)); + r.SetField(Thermostat::ThermostatFeature::kOccupancy, obj.value("Occupancy FIXME",false)); + r.SetField(Thermostat::ThermostatFeature::kSchedule, obj.value("Schedule FIXME",false)); + r.SetField(Thermostat::ThermostatFeature::kSetback, obj.value("Setback FIXME",false)); + r.SetField(Thermostat::ThermostatFeature::kAutomode, obj.value("Automode FIXME",false)); return r; -} + } -template <> -inline std::optional from_json(const nlohmann::json& value) -{ - const std::map table = { - { "Heat", Thermostat::SetpointAdjustMode::kHeatSetpoint }, - { "Cool", Thermostat::SetpointAdjustMode::kCoolSetpoint }, - { "Both", Thermostat::SetpointAdjustMode::kHeatAndCoolSetpoints }, - }; - - auto i = table.find(value); - if (i != table.end()) { + +template<> inline std::optional from_json(const nlohmann::json& value) { + const std::map< std::string, Thermostat::SetpointAdjustMode> + table = { + { "Heat" , Thermostat::SetpointAdjustMode::kHeatSetpoint }, + { "Cool" , Thermostat::SetpointAdjustMode::kCoolSetpoint }, + { "Both" , Thermostat::SetpointAdjustMode::kHeatAndCoolSetpoints }, + }; + + 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 = { - { "CoolingOnly", Thermostat::ThermostatControlSequence::kCoolingOnly }, - { "CoolingWithReheat", Thermostat::ThermostatControlSequence::kCoolingWithReheat }, - { "HeatingOnly", Thermostat::ThermostatControlSequence::kHeatingOnly }, - { "HeatingWithReheat", Thermostat::ThermostatControlSequence::kHeatingWithReheat }, - { "CoolingAndHeating4Pipes", Thermostat::ThermostatControlSequence::kCoolingAndHeating }, - { "CoolingAndHeating4PipesWithReheat", Thermostat::ThermostatControlSequence::kCoolingAndHeatingWithReheat }, - }; - - auto i = table.find(value); - if (i != table.end()) { +template<> inline std::optional from_json(const nlohmann::json& value) { + const std::map< std::string, Thermostat::ThermostatControlSequence> + table = { + { "CoolingOnly" , Thermostat::ThermostatControlSequence::kCoolingOnly }, + { "CoolingWithReheat" , Thermostat::ThermostatControlSequence::kCoolingWithReheat }, + { "HeatingOnly" , Thermostat::ThermostatControlSequence::kHeatingOnly }, + { "HeatingWithReheat" , Thermostat::ThermostatControlSequence::kHeatingWithReheat }, + { "CoolingAndHeating4Pipes" , Thermostat::ThermostatControlSequence::kCoolingAndHeating }, + { "CoolingAndHeating4PipesWithReheat" , Thermostat::ThermostatControlSequence::kCoolingAndHeatingWithReheat }, + }; + + 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 = { - { "Off", Thermostat::ThermostatRunningMode::kOff }, - { "Cool", Thermostat::ThermostatRunningMode::kCool }, - { "Heat", Thermostat::ThermostatRunningMode::kHeat }, - }; - - auto i = table.find(value); - if (i != table.end()) { +template<> inline std::optional from_json(const nlohmann::json& value) { + const std::map< std::string, Thermostat::ThermostatRunningMode> + table = { + { "Off" , Thermostat::ThermostatRunningMode::kOff }, + { "Cool" , Thermostat::ThermostatRunningMode::kCool }, + { "Heat" , Thermostat::ThermostatRunningMode::kHeat }, + }; + + 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 = { - { "Off", Thermostat::ThermostatSystemMode::kOff }, - { "Auto", Thermostat::ThermostatSystemMode::kAuto }, - { "Cool", Thermostat::ThermostatSystemMode::kCool }, - { "Heat", Thermostat::ThermostatSystemMode::kHeat }, - { "EmergencyHeating", Thermostat::ThermostatSystemMode::kEmergencyHeating }, - { "Precooling", Thermostat::ThermostatSystemMode::kPrecooling }, - { "FanOnly", Thermostat::ThermostatSystemMode::kFanOnly }, - }; - - auto i = table.find(value); - if (i != table.end()) { +template<> inline std::optional from_json(const nlohmann::json& value) { + const std::map< std::string, Thermostat::ThermostatSystemMode> + table = { + { "Off" , Thermostat::ThermostatSystemMode::kOff }, + { "Auto" , Thermostat::ThermostatSystemMode::kAuto }, + { "Cool" , Thermostat::ThermostatSystemMode::kCool }, + { "Heat" , Thermostat::ThermostatSystemMode::kHeat }, + { "EmergencyHeating" , Thermostat::ThermostatSystemMode::kEmergencyHeating }, + { "Precooling" , Thermostat::ThermostatSystemMode::kPrecooling }, + { "FanOnly" , Thermostat::ThermostatSystemMode::kFanOnly }, + }; + + auto i = table.find( value ); + if( i != table.end() ) { return i->second; } else { return std::nullopt; } } -/***************************** Bitmap Converters **************/ -template <> -inline std::optional> from_json(const nlohmann::json& obj) -{ + /***************************** Bitmap Converters **************/ + template<> inline std::optional> from_json(const nlohmann::json& obj) { chip::BitMask r; - r.SetField(FanControl::FanControlFeature::kMultiSpeed, obj.value("MultiSpeed FIXME", false)); - r.SetField(FanControl::FanControlFeature::kAuto, obj.value("Auto FIXME", false)); - r.SetField(FanControl::FanControlFeature::kRocking, obj.value("Rocking FIXME", false)); - r.SetField(FanControl::FanControlFeature::kWind, obj.value("Wind FIXME", false)); + r.SetField(FanControl::FanControlFeature::kMultiSpeed, obj.value("MultiSpeed FIXME",false)); + r.SetField(FanControl::FanControlFeature::kAuto, obj.value("Auto FIXME",false)); + r.SetField(FanControl::FanControlFeature::kRocking, obj.value("Rocking FIXME",false)); + r.SetField(FanControl::FanControlFeature::kWind, obj.value("Wind FIXME",false)); return r; -} -template <> -inline std::optional> from_json(const nlohmann::json& obj) -{ + } + template<> inline std::optional> from_json(const nlohmann::json& obj) { chip::BitMask r; - r.SetField(FanControl::RockSupportMask::kRockLeftRight, obj.value("RockLeftRight FIXME", false)); - r.SetField(FanControl::RockSupportMask::kRockUpDown, obj.value("RockUpDown FIXME", false)); - r.SetField(FanControl::RockSupportMask::kRockRound, obj.value("RockRound FIXME", false)); + r.SetField(FanControl::RockSupportMask::kRockLeftRight, obj.value("RockLeftRight FIXME",false)); + r.SetField(FanControl::RockSupportMask::kRockUpDown, obj.value("RockUpDown FIXME",false)); + r.SetField(FanControl::RockSupportMask::kRockRound, obj.value("RockRound FIXME",false)); return r; -} -template <> -inline std::optional> from_json(const nlohmann::json& obj) -{ + } + template<> inline std::optional> from_json(const nlohmann::json& obj) { chip::BitMask r; - r.SetField(FanControl::WindSettingMask::kSleepWind, obj.value("SleepWind FIXME", false)); - r.SetField(FanControl::WindSettingMask::kNaturalWind, obj.value("NaturalWind FIXME", false)); + r.SetField(FanControl::WindSettingMask::kSleepWind, obj.value("SleepWind FIXME",false)); + r.SetField(FanControl::WindSettingMask::kNaturalWind, obj.value("NaturalWind FIXME",false)); return r; -} -template <> -inline std::optional> from_json(const nlohmann::json& obj) -{ + } + template<> inline std::optional> from_json(const nlohmann::json& obj) { chip::BitMask r; - r.SetField(FanControl::WindSupportMask::kSleepWind, obj.value("SleepWind FIXME", false)); - r.SetField(FanControl::WindSupportMask::kNaturalWind, obj.value("NaturalWind FIXME", false)); + r.SetField(FanControl::WindSupportMask::kSleepWind, obj.value("SleepWind FIXME",false)); + r.SetField(FanControl::WindSupportMask::kNaturalWind, obj.value("NaturalWind FIXME",false)); return r; -} + } -template <> -inline std::optional from_json(const nlohmann::json& value) -{ - const std::map table = { - { "Off/Low/Med/High FIXME", FanControl::FanModeSequenceType::kOffLowMedHigh }, - { "Off/Low/High FIXME", FanControl::FanModeSequenceType::kOffLowHigh }, - { "Off/Low/Med/High/Auto FIXME", FanControl::FanModeSequenceType::kOffLowMedHighAuto }, - { "Off/Low/High/Auto FIXME", FanControl::FanModeSequenceType::kOffLowHighAuto }, - { "Off/On/Auto FIXME", FanControl::FanModeSequenceType::kOffOnAuto }, - { "Off/On FIXME", FanControl::FanModeSequenceType::kOffOn }, - }; - - auto i = table.find(value); - if (i != table.end()) { + +template<> inline std::optional from_json(const nlohmann::json& value) { + const std::map< std::string, FanControl::FanModeSequenceType> + table = { + { "Off/Low/Med/High FIXME" , FanControl::FanModeSequenceType::kOffLowMedHigh }, + { "Off/Low/High FIXME" , FanControl::FanModeSequenceType::kOffLowHigh }, + { "Off/Low/Med/High/Auto FIXME" , FanControl::FanModeSequenceType::kOffLowMedHighAuto }, + { "Off/Low/High/Auto FIXME" , FanControl::FanModeSequenceType::kOffLowHighAuto }, + { "Off/On/Auto FIXME" , FanControl::FanModeSequenceType::kOffOnAuto }, + { "Off/On FIXME" , FanControl::FanModeSequenceType::kOffOn }, + }; + + 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 = { - { "Off FIXME", FanControl::FanModeType::kOff }, - { "Low FIXME", FanControl::FanModeType::kLow }, - { "Medium FIXME", FanControl::FanModeType::kMedium }, - { "High FIXME", FanControl::FanModeType::kHigh }, - { "On FIXME", FanControl::FanModeType::kOn }, - { "Auto FIXME", FanControl::FanModeType::kAuto }, - { "Smart FIXME", FanControl::FanModeType::kSmart }, - }; - - auto i = table.find(value); - if (i != table.end()) { +template<> inline std::optional from_json(const nlohmann::json& value) { + const std::map< std::string, FanControl::FanModeType> + table = { + { "Off FIXME" , FanControl::FanModeType::kOff }, + { "Low FIXME" , FanControl::FanModeType::kLow }, + { "Medium FIXME" , FanControl::FanModeType::kMedium }, + { "High FIXME" , FanControl::FanModeType::kHigh }, + { "On FIXME" , FanControl::FanModeType::kOn }, + { "Auto FIXME" , FanControl::FanModeType::kAuto }, + { "Smart FIXME" , FanControl::FanModeType::kSmart }, + }; + + auto i = table.find( value ); + if( i != table.end() ) { return i->second; } else { return std::nullopt; } } -/***************************** Bitmap Converters **************/ + /***************************** Bitmap Converters **************/ -/***************************** Bitmap Converters **************/ -template <> -inline std::optional> from_json(const nlohmann::json& obj) -{ + + /***************************** Bitmap Converters **************/ + template<> inline std::optional> from_json(const nlohmann::json& obj) { chip::BitMask r; - r.SetField(ColorControl::ColorCapabilities::kHueSaturationSupported, obj.value("HueSaturationSupported", false)); - r.SetField(ColorControl::ColorCapabilities::kEnhancedHueSupported, obj.value("EnhancedHueSupported", false)); - r.SetField(ColorControl::ColorCapabilities::kColorLoopSupported, obj.value("ColorLoopSupported", false)); - r.SetField(ColorControl::ColorCapabilities::kXYAttributesSupported, obj.value("XYSupported", false)); - r.SetField(ColorControl::ColorCapabilities::kColorTemperatureSupported, obj.value("ColorTemperatureSupported", false)); + r.SetField(ColorControl::ColorCapabilities::kHueSaturationSupported, obj.value("HueSaturationSupported",false)); + r.SetField(ColorControl::ColorCapabilities::kEnhancedHueSupported, obj.value("EnhancedHueSupported",false)); + r.SetField(ColorControl::ColorCapabilities::kColorLoopSupported, obj.value("ColorLoopSupported",false)); + r.SetField(ColorControl::ColorCapabilities::kXYAttributesSupported, obj.value("XYSupported",false)); + r.SetField(ColorControl::ColorCapabilities::kColorTemperatureSupported, obj.value("ColorTemperatureSupported",false)); return r; -} -template <> -inline std::optional> from_json(const nlohmann::json& obj) -{ + } + template<> inline std::optional> from_json(const nlohmann::json& obj) { chip::BitMask r; - r.SetField(ColorControl::ColorControlFeature::kHueAndSaturation, obj.value("HueAndSaturation FIXME", false)); - r.SetField(ColorControl::ColorControlFeature::kEnhancedHue, obj.value("EnhancedHue FIXME", false)); - r.SetField(ColorControl::ColorControlFeature::kColorLoop, obj.value("ColorLoop FIXME", false)); - r.SetField(ColorControl::ColorControlFeature::kXy, obj.value("XY FIXME", false)); - r.SetField(ColorControl::ColorControlFeature::kColorTemperature, obj.value("ColorTemperature FIXME", false)); + r.SetField(ColorControl::ColorControlFeature::kHueAndSaturation, obj.value("HueAndSaturation FIXME",false)); + r.SetField(ColorControl::ColorControlFeature::kEnhancedHue, obj.value("EnhancedHue FIXME",false)); + r.SetField(ColorControl::ColorControlFeature::kColorLoop, obj.value("ColorLoop FIXME",false)); + r.SetField(ColorControl::ColorControlFeature::kXy, obj.value("XY FIXME",false)); + r.SetField(ColorControl::ColorControlFeature::kColorTemperature, obj.value("ColorTemperature FIXME",false)); return r; -} -template <> -inline std::optional> from_json(const nlohmann::json& obj) -{ + } + template<> inline std::optional> from_json(const nlohmann::json& obj) { chip::BitMask r; - r.SetField(ColorControl::ColorLoopUpdateFlags::kUpdateAction, obj.value("UpdateAction", false)); - r.SetField(ColorControl::ColorLoopUpdateFlags::kUpdateDirection, obj.value("UpdateDirection", false)); - r.SetField(ColorControl::ColorLoopUpdateFlags::kUpdateTime, obj.value("UpdateTime", false)); - r.SetField(ColorControl::ColorLoopUpdateFlags::kUpdateStartHue, obj.value("UpdateStartHue", false)); + r.SetField(ColorControl::ColorLoopUpdateFlags::kUpdateAction, obj.value("UpdateAction",false)); + r.SetField(ColorControl::ColorLoopUpdateFlags::kUpdateDirection, obj.value("UpdateDirection",false)); + r.SetField(ColorControl::ColorLoopUpdateFlags::kUpdateTime, obj.value("UpdateTime",false)); + r.SetField(ColorControl::ColorLoopUpdateFlags::kUpdateStartHue, obj.value("UpdateStartHue",false)); return r; -} + } -template <> -inline std::optional from_json(const nlohmann::json& value) -{ - const std::map table = { - { "DeactivateColorLoop", ColorControl::ColorLoopAction::kDeactivate }, - { "ActivateColorLoopFromColorLoopStartEnhancedHue", ColorControl::ColorLoopAction::kActivateFromColorLoopStartEnhancedHue }, - { "ActivateColorLoopFromEnhancedCurrentHue", ColorControl::ColorLoopAction::kActivateFromEnhancedCurrentHue }, - }; - - auto i = table.find(value); - if (i != table.end()) { + +template<> inline std::optional from_json(const nlohmann::json& value) { + const std::map< std::string, ColorControl::ColorLoopAction> + table = { + { "DeactivateColorLoop" , ColorControl::ColorLoopAction::kDeactivate }, + { "ActivateColorLoopFromColorLoopStartEnhancedHue" , ColorControl::ColorLoopAction::kActivateFromColorLoopStartEnhancedHue }, + { "ActivateColorLoopFromEnhancedCurrentHue" , ColorControl::ColorLoopAction::kActivateFromEnhancedCurrentHue }, + }; + + 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 = { - { "DecrementEnhancedCurrentHue", ColorControl::ColorLoopDirection::kDecrementHue }, - { "IncrementEnhancedCurrentHue", ColorControl::ColorLoopDirection::kIncrementHue }, - }; +template<> inline std::optional from_json(const nlohmann::json& value) { + const std::map< std::string, ColorControl::ColorLoopDirection> + table = { + { "DecrementEnhancedCurrentHue" , ColorControl::ColorLoopDirection::kDecrementHue }, + { "IncrementEnhancedCurrentHue" , ColorControl::ColorLoopDirection::kIncrementHue }, + }; - auto i = table.find(value); - if (i != table.end()) { + 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", ColorControl::ColorMode::kCurrentHueAndCurrentSaturation }, - { "CurrentXAndCurrentY", ColorControl::ColorMode::kCurrentXAndCurrentY }, - { "ColorTemperatureMireds", ColorControl::ColorMode::kColorTemperature }, - }; - - auto i = table.find(value); - if (i != table.end()) { +template<> inline std::optional from_json(const nlohmann::json& value) { + const std::map< std::string, ColorControl::ColorMode> + table = { + { "CurrentHueAndCurrentSaturation" , ColorControl::ColorMode::kCurrentHueAndCurrentSaturation }, + { "CurrentXAndCurrentY" , ColorControl::ColorMode::kCurrentXAndCurrentY }, + { "ColorTemperatureMireds" , ColorControl::ColorMode::kColorTemperature }, + }; + + 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 = { - { "ShortestDistance", ColorControl::HueDirection::kShortestDistance }, - { "LongestDistance", ColorControl::HueDirection::kLongestDistance }, - { "Up", ColorControl::HueDirection::kUp }, - { "Down", ColorControl::HueDirection::kDown }, - }; - - auto i = table.find(value); - if (i != table.end()) { +template<> inline std::optional from_json(const nlohmann::json& value) { + const std::map< std::string, ColorControl::HueDirection> + table = { + { "ShortestDistance" , ColorControl::HueDirection::kShortestDistance }, + { "LongestDistance" , ColorControl::HueDirection::kLongestDistance }, + { "Up" , ColorControl::HueDirection::kUp }, + { "Down" , ColorControl::HueDirection::kDown }, + }; + + 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 = { - { "Stop", ColorControl::HueMoveMode::kStop }, - { "Up", ColorControl::HueMoveMode::kUp }, - { "Down", ColorControl::HueMoveMode::kDown }, - }; - - auto i = table.find(value); - if (i != table.end()) { +template<> inline std::optional from_json(const nlohmann::json& value) { + const std::map< std::string, ColorControl::HueMoveMode> + table = { + { "Stop" , ColorControl::HueMoveMode::kStop }, + { "Up" , ColorControl::HueMoveMode::kUp }, + { "Down" , ColorControl::HueMoveMode::kDown }, + }; + + 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 = { - { "Up", ColorControl::HueStepMode::kUp }, - { "Down", ColorControl::HueStepMode::kDown }, - }; +template<> inline std::optional from_json(const nlohmann::json& value) { + const std::map< std::string, ColorControl::HueStepMode> + table = { + { "Up" , ColorControl::HueStepMode::kUp }, + { "Down" , ColorControl::HueStepMode::kDown }, + }; - auto i = table.find(value); - if (i != table.end()) { + 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 = { - { "stop FIXME", ColorControl::SaturationMoveMode::kStop }, - { "Up FIXME", ColorControl::SaturationMoveMode::kUp }, - { "Down FIXME", ColorControl::SaturationMoveMode::kDown }, - }; - - auto i = table.find(value); - if (i != table.end()) { +template<> inline std::optional from_json(const nlohmann::json& value) { + const std::map< std::string, ColorControl::SaturationMoveMode> + table = { + { "stop FIXME" , ColorControl::SaturationMoveMode::kStop }, + { "Up FIXME" , ColorControl::SaturationMoveMode::kUp }, + { "Down FIXME" , ColorControl::SaturationMoveMode::kDown }, + }; + + 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 = { - { "Up FIXME", ColorControl::SaturationStepMode::kUp }, - { "Down FIXME", ColorControl::SaturationStepMode::kDown }, - }; +template<> inline std::optional from_json(const nlohmann::json& value) { + const std::map< std::string, ColorControl::SaturationStepMode> + table = { + { "Up FIXME" , ColorControl::SaturationStepMode::kUp }, + { "Down FIXME" , ColorControl::SaturationStepMode::kDown }, + }; - auto i = table.find(value); - if (i != table.end()) { + auto i = table.find( value ); + if( i != table.end() ) { return i->second; } else { return std::nullopt; } } -/***************************** Bitmap Converters **************/ + /***************************** Bitmap Converters **************/ -template <> -inline std::optional from_json(const nlohmann::json& value) -{ - const std::map table = { - { "Photodiode", IlluminanceMeasurement::LightSensorType::kPhotodiode }, - { "Cmos", IlluminanceMeasurement::LightSensorType::kCmos }, - }; - auto i = table.find(value); - if (i != table.end()) { +template<> inline std::optional from_json(const nlohmann::json& value) { + const std::map< std::string, IlluminanceMeasurement::LightSensorType> + table = { + { "Photodiode" , IlluminanceMeasurement::LightSensorType::kPhotodiode }, + { "Cmos" , IlluminanceMeasurement::LightSensorType::kCmos }, + }; + + auto i = table.find( value ); + if( i != table.end() ) { return i->second; } else { return std::nullopt; } } -/***************************** Bitmap Converters **************/ + /***************************** Bitmap Converters **************/ -/***************************** Bitmap Converters **************/ -template <> -inline std::optional> from_json(const nlohmann::json& obj) -{ + + /***************************** Bitmap Converters **************/ + template<> inline std::optional> from_json(const nlohmann::json& obj) { chip::BitMask r; - r.SetField(PressureMeasurement::PressureFeature::kExt, obj.value("EXT FIXME", false)); + r.SetField(PressureMeasurement::PressureFeature::kExt, obj.value("EXT FIXME",false)); return r; -} + } + + + /***************************** Bitmap Converters **************/ + + + /***************************** Bitmap Converters **************/ + -/***************************** Bitmap Converters **************/ + /***************************** Bitmap Converters **************/ -/***************************** Bitmap Converters **************/ -/***************************** Bitmap Converters **************/ diff --git a/silabs_examples/unify-matter-bridge/linux/zap-generated/data_model_translator/chip_types_to_json.hpp b/silabs_examples/unify-matter-bridge/linux/zap-generated/data_model_translator/chip_types_to_json.hpp index 28de2882c0b82e..18811c21800c3f 100644 --- a/silabs_examples/unify-matter-bridge/linux/zap-generated/data_model_translator/chip_types_to_json.hpp +++ b/silabs_examples/unify-matter-bridge/linux/zap-generated/data_model_translator/chip_types_to_json.hpp @@ -18,31 +18,32 @@ // Default translation template -nlohmann::json inline to_json(const T& value) +nlohmann::json inline to_json(const T & value) { return value; } -nlohmann::json inline to_json(const chip::Span& value) +nlohmann::json inline to_json(const chip::Span & value) { - return std::string(value.data(), value.size()); + return std::string( value.data(), value.size()); } -nlohmann::json inline to_json(const chip::Span& value) +nlohmann::json inline to_json(const chip::Span & value) { - return std::string(reinterpret_cast(value.data()), value.size()); + return std::string( reinterpret_cast(value.data()), value.size()); } -template -nlohmann::json inline to_json(const chip::app::DataModel::DecodableList& value) -{ - return "{}"; + +template +nlohmann::json inline to_json(const chip::app::DataModel::DecodableList & value) { + return "{}"; } template -nlohmann::json inline to_json(chip::app::DataModel::Nullable& value) +nlohmann::json inline to_json(chip::app::DataModel::Nullable & value) { - if ((!value.IsNull()) && value.HasValidValue()) { + if ((!value.IsNull()) && value.HasValidValue()) + { return to_json(value.Value()); } return nlohmann::json::value_t::null; @@ -51,64 +52,41 @@ nlohmann::json inline to_json(chip::app::DataModel::Nullable& value) /***************************** Bitmap Convertes **************/ /***************************** Bitmap Converter FIXME**************/ -template <> -nlohmann::json inline to_json(const chip::app::Clusters::Identify::IdentifyEffectIdentifier& value) -{ + +template<> nlohmann::json inline to_json(const chip::app::Clusters::Identify::IdentifyEffectIdentifier& value) { using namespace chip::app::Clusters::Identify; - switch (value) { - case IdentifyEffectIdentifier::kBlink: - return "Blink"; - case IdentifyEffectIdentifier::kBreathe: - return "Breathe"; - case IdentifyEffectIdentifier::kOkay: - return "Okay"; - case IdentifyEffectIdentifier::kChannelChange: - return "ChannelChange"; - case IdentifyEffectIdentifier::kFinishEffect: - return "FinishEffect"; - case IdentifyEffectIdentifier::kStopEffect: - return "StopEffect"; - default: - return "{}"; + switch( value ) { + case IdentifyEffectIdentifier::kBlink: return "Blink"; + case IdentifyEffectIdentifier::kBreathe: return "Breathe"; + case IdentifyEffectIdentifier::kOkay: return "Okay"; + case IdentifyEffectIdentifier::kChannelChange: return "ChannelChange"; + case IdentifyEffectIdentifier::kFinishEffect: return "FinishEffect"; + case IdentifyEffectIdentifier::kStopEffect: return "StopEffect"; + default: return "{}"; } } -template <> -nlohmann::json inline to_json(const chip::app::Clusters::Identify::IdentifyEffectVariant& value) -{ +template<> nlohmann::json inline to_json(const chip::app::Clusters::Identify::IdentifyEffectVariant& value) { using namespace chip::app::Clusters::Identify; - switch (value) { - case IdentifyEffectVariant::kDefault: - return "Default"; - default: - return "{}"; + switch( value ) { + case IdentifyEffectVariant::kDefault: return "Default"; + default: return "{}"; } } -template <> -nlohmann::json inline to_json(const chip::app::Clusters::Identify::IdentifyIdentifyType& value) -{ +template<> nlohmann::json inline to_json(const chip::app::Clusters::Identify::IdentifyIdentifyType& value) { using namespace chip::app::Clusters::Identify; - switch (value) { - case IdentifyIdentifyType::kNone: - return "None FIXME"; - case IdentifyIdentifyType::kVisibleLight: - return "VisibleLight FIXME"; - case IdentifyIdentifyType::kVisibleLED: - return "VisibleLED FIXME"; - case IdentifyIdentifyType::kAudibleBeep: - return "AudibleBeep FIXME"; - case IdentifyIdentifyType::kDisplay: - return "Display FIXME"; - case IdentifyIdentifyType::kActuator: - return "Actuator FIXME"; - default: - return "{}"; + switch( value ) { + case IdentifyIdentifyType::kNone: return "None FIXME"; + case IdentifyIdentifyType::kVisibleLight: return "VisibleLight FIXME"; + case IdentifyIdentifyType::kVisibleLED: return "VisibleLED FIXME"; + case IdentifyIdentifyType::kAudibleBeep: return "AudibleBeep FIXME"; + case IdentifyIdentifyType::kDisplay: return "Display FIXME"; + case IdentifyIdentifyType::kActuator: return "Actuator FIXME"; + default: return "{}"; } } /***************************** Bitmap Converter FIXME**************/ -template <> -nlohmann::json inline to_json(const chip::BitMask& value) -{ +template<> nlohmann::json inline to_json(const chip::BitMask& value) { using namespace chip::app::Clusters::Groups; nlohmann::json obj; obj["GroupNames FIXME"] = static_cast(value.GetField(GroupClusterFeature::kGroupNames)); @@ -117,9 +95,7 @@ nlohmann::json inline to_json(const chip::BitMask -nlohmann::json inline to_json(const chip::BitMask& value) -{ +template<> nlohmann::json inline to_json(const chip::BitMask& value) { using namespace chip::app::Clusters::Scenes; nlohmann::json obj; obj["CopyAllScenes"] = static_cast(value.GetField(ScenesCopyMode::kCopyAllScenes)); @@ -128,81 +104,56 @@ nlohmann::json inline to_json(const chip::BitMask -nlohmann::json inline to_json(const chip::BitMask& value) -{ +template<> nlohmann::json inline to_json(const chip::BitMask& value) { using namespace chip::app::Clusters::OnOff; nlohmann::json obj; obj["AcceptOnlyWhenOn"] = static_cast(value.GetField(OnOffControl::kAcceptOnlyWhenOn)); return obj; } -template <> -nlohmann::json inline to_json(const chip::BitMask& value) -{ +template<> nlohmann::json inline to_json(const chip::BitMask& value) { using namespace chip::app::Clusters::OnOff; nlohmann::json obj; obj["Lighting FIXME"] = static_cast(value.GetField(OnOffFeature::kLighting)); return obj; } -template <> -nlohmann::json inline to_json(const chip::BitMask& value) -{ +template<> nlohmann::json inline to_json(const chip::BitMask& value) { using namespace chip::app::Clusters::OnOff; nlohmann::json obj; obj["SceneNames FIXME"] = static_cast(value.GetField(SceneFeatures::kSceneNames)); return obj; } -template <> -nlohmann::json inline to_json(const chip::app::Clusters::OnOff::OnOffDelayedAllOffEffectVariant& value) -{ +template<> nlohmann::json inline to_json(const chip::app::Clusters::OnOff::OnOffDelayedAllOffEffectVariant& value) { using namespace chip::app::Clusters::OnOff; return static_cast(value); } -template <> -nlohmann::json inline to_json(const chip::app::Clusters::OnOff::OnOffDyingLightEffectVariant& value) -{ +template<> nlohmann::json inline to_json(const chip::app::Clusters::OnOff::OnOffDyingLightEffectVariant& value) { using namespace chip::app::Clusters::OnOff; - switch (value) { - case OnOffDyingLightEffectVariant::k20PercenterDimUpIn0p5SecondsThenFadeToOffIn1Second: - return "20PercenterDimUpIn_0p5SecondsThenFadeToOffIn_1Second FIXME"; - default: - return "{}"; + switch( value ) { + case OnOffDyingLightEffectVariant::k20PercenterDimUpIn0p5SecondsThenFadeToOffIn1Second: return "20PercenterDimUpIn_0p5SecondsThenFadeToOffIn_1Second FIXME"; + default: return "{}"; } } -template <> -nlohmann::json inline to_json(const chip::app::Clusters::OnOff::OnOffEffectIdentifier& value) -{ +template<> nlohmann::json inline to_json(const chip::app::Clusters::OnOff::OnOffEffectIdentifier& value) { using namespace chip::app::Clusters::OnOff; - switch (value) { - case OnOffEffectIdentifier::kDelayedAllOff: - return "DelayedAllOff"; - case OnOffEffectIdentifier::kDyingLight: - return "DyingLight"; - default: - return "{}"; + switch( value ) { + case OnOffEffectIdentifier::kDelayedAllOff: return "DelayedAllOff"; + case OnOffEffectIdentifier::kDyingLight: return "DyingLight"; + default: return "{}"; } } -template <> -nlohmann::json inline to_json(const chip::app::Clusters::OnOff::OnOffStartUpOnOff& value) -{ +template<> nlohmann::json inline to_json(const chip::app::Clusters::OnOff::OnOffStartUpOnOff& value) { using namespace chip::app::Clusters::OnOff; - switch (value) { - case OnOffStartUpOnOff::kOff: - return "SetOnOffTo0"; - case OnOffStartUpOnOff::kOn: - return "SetOnOffTo1"; - case OnOffStartUpOnOff::kTogglePreviousOnOff: - return "TogglePreviousOnOff"; - default: - return "{}"; + switch( value ) { + case OnOffStartUpOnOff::kOff: return "SetOnOffTo0"; + case OnOffStartUpOnOff::kOn: return "SetOnOffTo1"; + case OnOffStartUpOnOff::kTogglePreviousOnOff: return "TogglePreviousOnOff"; + default: return "{}"; } } /***************************** Bitmap Converter FIXME**************/ -template <> -nlohmann::json inline to_json(const chip::BitMask& value) -{ +template<> nlohmann::json inline to_json(const chip::BitMask& value) { using namespace chip::app::Clusters::LevelControl; nlohmann::json obj; obj["OnOff FIXME"] = static_cast(value.GetField(LevelControlFeature::kOnOff)); @@ -210,9 +161,7 @@ nlohmann::json inline to_json(const chip::BitMask(value.GetField(LevelControlFeature::kFrequency)); return obj; } -template <> -nlohmann::json inline to_json(const chip::BitMask& value) -{ +template<> nlohmann::json inline to_json(const chip::BitMask& value) { using namespace chip::app::Clusters::LevelControl; nlohmann::json obj; obj["ExecuteIfOff"] = static_cast(value.GetField(LevelControlOptions::kExecuteIfOff)); @@ -220,37 +169,25 @@ nlohmann::json inline to_json(const chip::BitMask -nlohmann::json inline to_json(const chip::app::Clusters::LevelControl::MoveMode& value) -{ +template<> nlohmann::json inline to_json(const chip::app::Clusters::LevelControl::MoveMode& value) { using namespace chip::app::Clusters::LevelControl; - switch (value) { - case MoveMode::kUp: - return "Up"; - case MoveMode::kDown: - return "Down"; - default: - return "{}"; + switch( value ) { + case MoveMode::kUp: return "Up"; + case MoveMode::kDown: return "Down"; + default: return "{}"; } } -template <> -nlohmann::json inline to_json(const chip::app::Clusters::LevelControl::StepMode& value) -{ +template<> nlohmann::json inline to_json(const chip::app::Clusters::LevelControl::StepMode& value) { using namespace chip::app::Clusters::LevelControl; - switch (value) { - case StepMode::kUp: - return "Up"; - case StepMode::kDown: - return "Down"; - default: - return "{}"; + switch( value ) { + case StepMode::kUp: return "Up"; + case StepMode::kDown: return "Down"; + default: return "{}"; } } /***************************** Bitmap Converter FIXME**************/ -template <> -nlohmann::json inline to_json(const chip::BitMask& value) -{ +template<> nlohmann::json inline to_json(const chip::BitMask& value) { using namespace chip::app::Clusters::DoorLock; nlohmann::json obj; obj["Single FIXME"] = static_cast(value.GetField(DlCredentialRuleMask::kSingle)); @@ -258,9 +195,7 @@ nlohmann::json inline to_json(const chip::BitMask(value.GetField(DlCredentialRuleMask::kTri)); return obj; } -template <> -nlohmann::json inline to_json(const chip::BitMask& value) -{ +template<> nlohmann::json inline to_json(const chip::BitMask& value) { using namespace chip::app::Clusters::DoorLock; nlohmann::json obj; obj["Single FIXME"] = static_cast(value.GetField(DlCredentialRulesSupport::kSingle)); @@ -268,9 +203,7 @@ nlohmann::json inline to_json(const chip::BitMask(value.GetField(DlCredentialRulesSupport::kTri)); return obj; } -template <> -nlohmann::json inline to_json(const chip::BitMask& value) -{ +template<> nlohmann::json inline to_json(const chip::BitMask& value) { using namespace chip::app::Clusters::DoorLock; nlohmann::json obj; obj["Sun"] = static_cast(value.GetField(DlDaysMaskMap::kSunday)); @@ -282,9 +215,7 @@ nlohmann::json inline to_json(const chip::BitMask(value.GetField(DlDaysMaskMap::kSaturday)); return obj; } -template <> -nlohmann::json inline to_json(const chip::BitMask& value) -{ +template<> nlohmann::json inline to_json(const chip::BitMask& value) { using namespace chip::app::Clusters::DoorLock; nlohmann::json obj; obj["DefaultEnableLocalProgrammingAttributeIsEnabled"] = static_cast(value.GetField(DlDefaultConfigurationRegister::kEnableLocalProgrammingEnabled)); @@ -295,9 +226,7 @@ nlohmann::json inline to_json(const chip::BitMask(value.GetField(DlDefaultConfigurationRegister::kLEDSettingsSet)); return obj; } -template <> -nlohmann::json inline to_json(const chip::BitMask& value) -{ +template<> nlohmann::json inline to_json(const chip::BitMask& value) { using namespace chip::app::Clusters::DoorLock; nlohmann::json obj; obj["KeypadOpUnknownOrMS"] = static_cast(value.GetField(DlKeypadOperationEventMask::kUnknown)); @@ -310,9 +239,7 @@ nlohmann::json inline to_json(const chip::BitMask(value.GetField(DlKeypadOperationEventMask::kNonAccessUserOpEvent)); return obj; } -template <> -nlohmann::json inline to_json(const chip::BitMask& value) -{ +template<> nlohmann::json inline to_json(const chip::BitMask& value) { using namespace chip::app::Clusters::DoorLock; nlohmann::json obj; obj["KeypadProgUnknownOrMS"] = static_cast(value.GetField(DlKeypadProgrammingEventMask::kUnknown)); @@ -322,9 +249,7 @@ nlohmann::json inline to_json(const chip::BitMask(value.GetField(DlKeypadProgrammingEventMask::kPINChanged)); return obj; } -template <> -nlohmann::json inline to_json(const chip::BitMask& value) -{ +template<> nlohmann::json inline to_json(const chip::BitMask& value) { using namespace chip::app::Clusters::DoorLock; nlohmann::json obj; obj["AddUsersCredentialsSchedulesLocally FIXME"] = static_cast(value.GetField(DlLocalProgrammingFeatures::kAddUsersCredentialsSchedulesLocally)); @@ -333,9 +258,7 @@ nlohmann::json inline to_json(const chip::BitMask(value.GetField(DlLocalProgrammingFeatures::kAdjustLockSettingsLocally)); return obj; } -template <> -nlohmann::json inline to_json(const chip::BitMask& value) -{ +template<> nlohmann::json inline to_json(const chip::BitMask& value) { using namespace chip::app::Clusters::DoorLock; nlohmann::json obj; obj["Unknown FIXME"] = static_cast(value.GetField(DlManualOperationEventMask::kUnknown)); @@ -351,9 +274,7 @@ nlohmann::json inline to_json(const chip::BitMask(value.GetField(DlManualOperationEventMask::kManualUnlock)); return obj; } -template <> -nlohmann::json inline to_json(const chip::BitMask& value) -{ +template<> nlohmann::json inline to_json(const chip::BitMask& value) { using namespace chip::app::Clusters::DoorLock; nlohmann::json obj; obj["RFIDOpUnknownOrMS"] = static_cast(value.GetField(DlRFIDOperationEventMask::kUnknown)); @@ -365,9 +286,7 @@ nlohmann::json inline to_json(const chip::BitMask(value.GetField(DlRFIDOperationEventMask::kUnlockInvalidSchedule)); return obj; } -template <> -nlohmann::json inline to_json(const chip::BitMask& value) -{ +template<> nlohmann::json inline to_json(const chip::BitMask& value) { using namespace chip::app::Clusters::DoorLock; nlohmann::json obj; obj["RFIDProgUnknownOrMS"] = static_cast(value.GetField(DlRFIDProgrammingEventMask::kUnknown)); @@ -375,9 +294,7 @@ nlohmann::json inline to_json(const chip::BitMask(value.GetField(DlRFIDProgrammingEventMask::kRFIDCodeCleared)); return obj; } -template <> -nlohmann::json inline to_json(const chip::BitMask& value) -{ +template<> nlohmann::json inline to_json(const chip::BitMask& value) { using namespace chip::app::Clusters::DoorLock; nlohmann::json obj; obj["RFOpUnknownOrMS"] = static_cast(value.GetField(DlRemoteOperationEventMask::kUnknown)); @@ -389,9 +306,7 @@ nlohmann::json inline to_json(const chip::BitMask(value.GetField(DlRemoteOperationEventMask::kUnlockInvalidSchedule)); return obj; } -template <> -nlohmann::json inline to_json(const chip::BitMask& value) -{ +template<> nlohmann::json inline to_json(const chip::BitMask& value) { using namespace chip::app::Clusters::DoorLock; nlohmann::json obj; obj["RFProgUnknownOrMS"] = static_cast(value.GetField(DlRemoteProgrammingEventMask::kUnknown)); @@ -403,9 +318,7 @@ nlohmann::json inline to_json(const chip::BitMask(value.GetField(DlRemoteProgrammingEventMask::kRFIDCodeCleared)); return obj; } -template <> -nlohmann::json inline to_json(const chip::BitMask& value) -{ +template<> nlohmann::json inline to_json(const chip::BitMask& value) { using namespace chip::app::Clusters::DoorLock; nlohmann::json obj; obj["Normal FIXME"] = static_cast(value.GetField(DlSupportedOperatingModes::kNormal)); @@ -415,9 +328,7 @@ nlohmann::json inline to_json(const chip::BitMask(value.GetField(DlSupportedOperatingModes::kPassage)); return obj; } -template <> -nlohmann::json inline to_json(const chip::BitMask& value) -{ +template<> nlohmann::json inline to_json(const chip::BitMask& value) { using namespace chip::app::Clusters::DoorLock; nlohmann::json obj; obj["Sunday FIXME"] = static_cast(value.GetField(DoorLockDayOfWeek::kSunday)); @@ -429,9 +340,7 @@ nlohmann::json inline to_json(const chip::BitMask(value.GetField(DoorLockDayOfWeek::kSaturday)); return obj; } -template <> -nlohmann::json inline to_json(const chip::BitMask& value) -{ +template<> nlohmann::json inline to_json(const chip::BitMask& value) { using namespace chip::app::Clusters::DoorLock; nlohmann::json obj; obj["PINCredentials FIXME"] = static_cast(value.GetField(DoorLockFeature::kPINCredentials)); @@ -449,451 +358,261 @@ nlohmann::json inline to_json(const chip::BitMask -nlohmann::json inline to_json(const chip::app::Clusters::DoorLock::DlAlarmCode& value) -{ - using namespace chip::app::Clusters::DoorLock; - switch (value) { - case DlAlarmCode::kLockJammed: - return "LockJammed FIXME"; - case DlAlarmCode::kLockFactoryReset: - return "LockFactoryReset FIXME"; - case DlAlarmCode::kLockRadioPowerCycled: - return "LockRadioPowerCycled FIXME"; - case DlAlarmCode::kWrongCodeEntryLimit: - return "WrongCodeEntryLimit FIXME"; - case DlAlarmCode::kFrontEsceutcheonRemoved: - return "FrontEsceutcheonRemoved FIXME"; - case DlAlarmCode::kDoorForcedOpen: - return "DoorForcedOpen FIXME"; - case DlAlarmCode::kDoorAjar: - return "DoorAjar FIXME"; - case DlAlarmCode::kForcedUser: - return "ForcedUser FIXME"; - default: - return "{}"; - } -} -template <> -nlohmann::json inline to_json(const chip::app::Clusters::DoorLock::DlCredentialRule& value) -{ - using namespace chip::app::Clusters::DoorLock; - switch (value) { - case DlCredentialRule::kSingle: - return "Single FIXME"; - case DlCredentialRule::kDouble: - return "Double FIXME"; - case DlCredentialRule::kTri: - return "Tri FIXME"; - default: - return "{}"; - } -} -template <> -nlohmann::json inline to_json(const chip::app::Clusters::DoorLock::DlCredentialType& value) -{ - using namespace chip::app::Clusters::DoorLock; - switch (value) { - case DlCredentialType::kProgrammingPIN: - return "ProgrammingPIN FIXME"; - case DlCredentialType::kPin: - return "PIN FIXME"; - case DlCredentialType::kRfid: - return "RFID FIXME"; - case DlCredentialType::kFingerprint: - return "Fingerprint FIXME"; - case DlCredentialType::kFingerVein: - return "FingerVein FIXME"; - case DlCredentialType::kFace: - return "Face FIXME"; - default: - return "{}"; - } -} -template <> -nlohmann::json inline to_json(const chip::app::Clusters::DoorLock::DlDataOperationType& value) -{ - using namespace chip::app::Clusters::DoorLock; - switch (value) { - case DlDataOperationType::kAdd: - return "Add FIXME"; - case DlDataOperationType::kClear: - return "Clear FIXME"; - case DlDataOperationType::kModify: - return "Modify FIXME"; - default: - return "{}"; - } -} -template <> -nlohmann::json inline to_json(const chip::app::Clusters::DoorLock::DlDoorState& value) -{ - using namespace chip::app::Clusters::DoorLock; - switch (value) { - case DlDoorState::kDoorOpen: - return "Open"; - case DlDoorState::kDoorClosed: - return "Closed"; - case DlDoorState::kDoorJammed: - return "ErrorJammed"; - case DlDoorState::kDoorForcedOpen: - return "ErrorForcedOpen"; - case DlDoorState::kDoorUnspecifiedError: - return "ErrorUnspecified"; - case DlDoorState::kDoorAjar: - return "Undefined"; - default: - return "{}"; - } -} -template <> -nlohmann::json inline to_json(const chip::app::Clusters::DoorLock::DlLockDataType& value) -{ - using namespace chip::app::Clusters::DoorLock; - switch (value) { - case DlLockDataType::kUnspecified: - return "Unspecified FIXME"; - case DlLockDataType::kProgrammingCode: - return "ProgrammingCode FIXME"; - case DlLockDataType::kUserIndex: - return "UserIndex FIXME"; - case DlLockDataType::kWeekDaySchedule: - return "WeekDaySchedule FIXME"; - case DlLockDataType::kYearDaySchedule: - return "YearDaySchedule FIXME"; - case DlLockDataType::kHolidaySchedule: - return "HolidaySchedule FIXME"; - case DlLockDataType::kPin: - return "PIN FIXME"; - case DlLockDataType::kRfid: - return "RFID FIXME"; - case DlLockDataType::kFingerprint: - return "Fingerprint FIXME"; - default: - return "{}"; - } -} -template <> -nlohmann::json inline to_json(const chip::app::Clusters::DoorLock::DlLockOperationType& value) -{ - using namespace chip::app::Clusters::DoorLock; - switch (value) { - case DlLockOperationType::kLock: - return "Lock FIXME"; - case DlLockOperationType::kUnlock: - return "Unlock FIXME"; - case DlLockOperationType::kNonAccessUserEvent: - return "NonAccessUserEvent FIXME"; - case DlLockOperationType::kForcedUserEvent: - return "ForcedUserEvent FIXME"; - default: - return "{}"; - } -} -template <> -nlohmann::json inline to_json(const chip::app::Clusters::DoorLock::DlLockState& value) -{ - using namespace chip::app::Clusters::DoorLock; - switch (value) { - case DlLockState::kNotFullyLocked: - return "NotFullyLocked"; - case DlLockState::kLocked: - return "Locked"; - case DlLockState::kUnlocked: - return "Unlocked"; - default: - return "{}"; - } -} -template <> -nlohmann::json inline to_json(const chip::app::Clusters::DoorLock::DlLockType& value) -{ +template<> nlohmann::json inline to_json(const chip::app::Clusters::DoorLock::DlAlarmCode& value) { using namespace chip::app::Clusters::DoorLock; - switch (value) { - case DlLockType::kDeadBolt: - return "DeadBolt"; - case DlLockType::kMagnetic: - return "Magnetic"; - case DlLockType::kOther: - return "Other"; - case DlLockType::kMortise: - return "Mortise"; - case DlLockType::kRim: - return "Rim"; - case DlLockType::kLatchBolt: - return "LatchBolt"; - case DlLockType::kCylindricalLock: - return "CylindricalLock"; - case DlLockType::kTubularLock: - return "TubularLock"; - case DlLockType::kInterconnectedLock: - return "InterconnectedLock"; - case DlLockType::kDeadLatch: - return "DeadLatch"; - case DlLockType::kDoorFurniture: - return "DoorFurniture"; - default: - return "{}"; + switch( value ) { + case DlAlarmCode::kLockJammed: return "LockJammed FIXME"; + case DlAlarmCode::kLockFactoryReset: return "LockFactoryReset FIXME"; + case DlAlarmCode::kLockRadioPowerCycled: return "LockRadioPowerCycled FIXME"; + case DlAlarmCode::kWrongCodeEntryLimit: return "WrongCodeEntryLimit FIXME"; + case DlAlarmCode::kFrontEsceutcheonRemoved: return "FrontEsceutcheonRemoved FIXME"; + case DlAlarmCode::kDoorForcedOpen: return "DoorForcedOpen FIXME"; + case DlAlarmCode::kDoorAjar: return "DoorAjar FIXME"; + case DlAlarmCode::kForcedUser: return "ForcedUser FIXME"; + default: return "{}"; } } -template <> -nlohmann::json inline to_json(const chip::app::Clusters::DoorLock::DlOperatingMode& value) -{ +template<> nlohmann::json inline to_json(const chip::app::Clusters::DoorLock::DlCredentialRule& value) { using namespace chip::app::Clusters::DoorLock; - switch (value) { - case DlOperatingMode::kNormal: - return "Normal FIXME"; - case DlOperatingMode::kVacation: - return "Vacation FIXME"; - case DlOperatingMode::kPrivacy: - return "Privacy FIXME"; - case DlOperatingMode::kNoRemoteLockUnlock: - return "NoRemoteLockUnlock FIXME"; - case DlOperatingMode::kPassage: - return "Passage FIXME"; - default: - return "{}"; + switch( value ) { + case DlCredentialRule::kSingle: return "Single FIXME"; + case DlCredentialRule::kDouble: return "Double FIXME"; + case DlCredentialRule::kTri: return "Tri FIXME"; + default: return "{}"; } } -template <> -nlohmann::json inline to_json(const chip::app::Clusters::DoorLock::DlOperationError& value) -{ +template<> nlohmann::json inline to_json(const chip::app::Clusters::DoorLock::DlCredentialType& value) { using namespace chip::app::Clusters::DoorLock; - switch (value) { - case DlOperationError::kUnspecified: - return "Unspecified FIXME"; - case DlOperationError::kInvalidCredential: - return "InvalidCredential FIXME"; - case DlOperationError::kDisabledUserDenied: - return "DisabledUserDenied FIXME"; - case DlOperationError::kRestricted: - return "Restricted FIXME"; - case DlOperationError::kInsufficientBattery: - return "InsufficientBattery FIXME"; - default: - return "{}"; + switch( value ) { + case DlCredentialType::kProgrammingPIN: return "ProgrammingPIN FIXME"; + case DlCredentialType::kPin: return "PIN FIXME"; + case DlCredentialType::kRfid: return "RFID FIXME"; + case DlCredentialType::kFingerprint: return "Fingerprint FIXME"; + case DlCredentialType::kFingerVein: return "FingerVein FIXME"; + case DlCredentialType::kFace: return "Face FIXME"; + default: return "{}"; } } -template <> -nlohmann::json inline to_json(const chip::app::Clusters::DoorLock::DlOperationSource& value) -{ +template<> nlohmann::json inline to_json(const chip::app::Clusters::DoorLock::DlDataOperationType& value) { using namespace chip::app::Clusters::DoorLock; - switch (value) { - case DlOperationSource::kUnspecified: - return "Unspecified FIXME"; - case DlOperationSource::kManual: - return "Manual FIXME"; - case DlOperationSource::kProprietaryRemote: - return "ProprietaryRemote FIXME"; - case DlOperationSource::kKeypad: - return "Keypad FIXME"; - case DlOperationSource::kAuto: - return "Auto FIXME"; - case DlOperationSource::kButton: - return "Button FIXME"; - case DlOperationSource::kSchedule: - return "Schedule FIXME"; - case DlOperationSource::kRemote: - return "Remote FIXME"; - case DlOperationSource::kRfid: - return "RFID FIXME"; - case DlOperationSource::kBiometric: - return "Biometric FIXME"; - default: - return "{}"; + switch( value ) { + case DlDataOperationType::kAdd: return "Add FIXME"; + case DlDataOperationType::kClear: return "Clear FIXME"; + case DlDataOperationType::kModify: return "Modify FIXME"; + default: return "{}"; } } -template <> -nlohmann::json inline to_json(const chip::app::Clusters::DoorLock::DlStatus& value) -{ +template<> nlohmann::json inline to_json(const chip::app::Clusters::DoorLock::DlDoorState& value) { using namespace chip::app::Clusters::DoorLock; - switch (value) { - case DlStatus::kSuccess: - return "Success FIXME"; - case DlStatus::kFailure: - return "Failure FIXME"; - case DlStatus::kDuplicate: - return "Duplicate FIXME"; - case DlStatus::kOccupied: - return "Occupied FIXME"; - case DlStatus::kInvalidField: - return "InvalidField FIXME"; - case DlStatus::kResourceExhausted: - return "ResourceExhausted FIXME"; - case DlStatus::kNotFound: - return "NotFound FIXME"; - default: - return "{}"; + switch( value ) { + case DlDoorState::kDoorOpen: return "Open"; + case DlDoorState::kDoorClosed: return "Closed"; + case DlDoorState::kDoorJammed: return "ErrorJammed"; + case DlDoorState::kDoorForcedOpen: return "ErrorForcedOpen"; + case DlDoorState::kDoorUnspecifiedError: return "ErrorUnspecified"; + case DlDoorState::kDoorAjar: return "Undefined"; + default: return "{}"; } } -template <> -nlohmann::json inline to_json(const chip::app::Clusters::DoorLock::DlUserStatus& value) -{ +template<> nlohmann::json inline to_json(const chip::app::Clusters::DoorLock::DlLockDataType& value) { using namespace chip::app::Clusters::DoorLock; - switch (value) { - case DlUserStatus::kAvailable: - return "Available FIXME"; - case DlUserStatus::kOccupiedEnabled: - return "OccupiedEnabled FIXME"; - case DlUserStatus::kOccupiedDisabled: - return "OccupiedDisabled FIXME"; - default: - return "{}"; + switch( value ) { + case DlLockDataType::kUnspecified: return "Unspecified FIXME"; + case DlLockDataType::kProgrammingCode: return "ProgrammingCode FIXME"; + case DlLockDataType::kUserIndex: return "UserIndex FIXME"; + case DlLockDataType::kWeekDaySchedule: return "WeekDaySchedule FIXME"; + case DlLockDataType::kYearDaySchedule: return "YearDaySchedule FIXME"; + case DlLockDataType::kHolidaySchedule: return "HolidaySchedule FIXME"; + case DlLockDataType::kPin: return "PIN FIXME"; + case DlLockDataType::kRfid: return "RFID FIXME"; + case DlLockDataType::kFingerprint: return "Fingerprint FIXME"; + default: return "{}"; } } -template <> -nlohmann::json inline to_json(const chip::app::Clusters::DoorLock::DlUserType& value) -{ +template<> nlohmann::json inline to_json(const chip::app::Clusters::DoorLock::DlLockOperationType& value) { using namespace chip::app::Clusters::DoorLock; - switch (value) { - case DlUserType::kUnrestrictedUser: - return "UnrestrictedUser FIXME"; - case DlUserType::kYearDayScheduleUser: - return "YearDayScheduleUser FIXME"; - case DlUserType::kWeekDayScheduleUser: - return "WeekDayScheduleUser FIXME"; - case DlUserType::kProgrammingUser: - return "ProgrammingUser FIXME"; - case DlUserType::kNonAccessUser: - return "NonAccessUser FIXME"; - case DlUserType::kForcedUser: - return "ForcedUser FIXME"; - case DlUserType::kDisposableUser: - return "DisposableUser FIXME"; - case DlUserType::kExpiringUser: - return "ExpiringUser FIXME"; - case DlUserType::kScheduleRestrictedUser: - return "ScheduleRestrictedUser FIXME"; - case DlUserType::kRemoteOnlyUser: - return "RemoteOnlyUser FIXME"; - default: - return "{}"; + switch( value ) { + case DlLockOperationType::kLock: return "Lock FIXME"; + case DlLockOperationType::kUnlock: return "Unlock FIXME"; + case DlLockOperationType::kNonAccessUserEvent: return "NonAccessUserEvent FIXME"; + case DlLockOperationType::kForcedUserEvent: return "ForcedUserEvent FIXME"; + default: return "{}"; } } -template <> -nlohmann::json inline to_json(const chip::app::Clusters::DoorLock::DoorLockOperationEventCode& value) -{ +template<> nlohmann::json inline to_json(const chip::app::Clusters::DoorLock::DlLockState& value) { using namespace chip::app::Clusters::DoorLock; - switch (value) { - case DoorLockOperationEventCode::kUnknownOrMfgSpecific: - return "UnknownOrMS"; - case DoorLockOperationEventCode::kLock: - return "Lock"; - case DoorLockOperationEventCode::kUnlock: - return "Unlock"; - case DoorLockOperationEventCode::kLockInvalidPinOrId: - return "LockFailureInvalidPINOrID"; - case DoorLockOperationEventCode::kLockInvalidSchedule: - return "LockFailureInvalidSchedule"; - case DoorLockOperationEventCode::kUnlockInvalidPinOrId: - return "UnlockFailureInvalidPINOrID"; - case DoorLockOperationEventCode::kUnlockInvalidSchedule: - return "UnlockFailureInvalidSchedule"; - case DoorLockOperationEventCode::kOneTouchLock: - return "OneTouchLock"; - case DoorLockOperationEventCode::kKeyLock: - return "KeyLock"; - case DoorLockOperationEventCode::kKeyUnlock: - return "KeyUnlock"; - case DoorLockOperationEventCode::kAutoLock: - return "AutoLock"; - case DoorLockOperationEventCode::kScheduleLock: - return "ScheduleLock"; - case DoorLockOperationEventCode::kScheduleUnlock: - return "ScheduleUnlock"; - case DoorLockOperationEventCode::kManualLock: - return "ManualLock"; - case DoorLockOperationEventCode::kManualUnlock: - return "ManualUnlock"; - default: - return "{}"; + switch( value ) { + case DlLockState::kNotFullyLocked: return "NotFullyLocked"; + case DlLockState::kLocked: return "Locked"; + case DlLockState::kUnlocked: return "Unlocked"; + default: return "{}"; } } -template <> -nlohmann::json inline to_json(const chip::app::Clusters::DoorLock::DoorLockProgrammingEventCode& value) -{ +template<> nlohmann::json inline to_json(const chip::app::Clusters::DoorLock::DlLockType& value) { using namespace chip::app::Clusters::DoorLock; - switch (value) { - case DoorLockProgrammingEventCode::kUnknownOrMfgSpecific: - return "UnknownOrMS"; - case DoorLockProgrammingEventCode::kMasterCodeChanged: - return "MasterCodeChanged"; - case DoorLockProgrammingEventCode::kPinAdded: - return "PINCodeAdded"; - case DoorLockProgrammingEventCode::kPinDeleted: - return "PINCodeDeleted"; - case DoorLockProgrammingEventCode::kPinChanged: - return "PINCodeChanged"; - case DoorLockProgrammingEventCode::kIdAdded: - return "RFIDCodeAdded"; - case DoorLockProgrammingEventCode::kIdDeleted: - return "RFIDCodeDeleted"; - default: - return "{}"; - } -} -template <> -nlohmann::json inline to_json(const chip::app::Clusters::DoorLock::DoorLockSetPinOrIdStatus& value) -{ - using namespace chip::app::Clusters::DoorLock; - switch (value) { - case DoorLockSetPinOrIdStatus::kSuccess: - return "Success"; - case DoorLockSetPinOrIdStatus::kGeneralFailure: - return "GeneralFailure"; - case DoorLockSetPinOrIdStatus::kMemoryFull: - return "MemoryFull"; - case DoorLockSetPinOrIdStatus::kDuplicateCodeError: - return "DuplicateCode"; - default: - return "{}"; - } -} -template <> -nlohmann::json inline to_json(const chip::app::Clusters::DoorLock::DoorLockUserStatus& value) -{ - using namespace chip::app::Clusters::DoorLock; - switch (value) { - case DoorLockUserStatus::kAvailable: - return "Available"; - case DoorLockUserStatus::kOccupiedEnabled: - return "OccupiedEnabled"; - case DoorLockUserStatus::kOccupiedDisabled: - return "OccupiedDisabled"; - case DoorLockUserStatus::kNotSupported: - return "NotSupported"; - default: - return "{}"; - } -} -template <> -nlohmann::json inline to_json(const chip::app::Clusters::DoorLock::DoorLockUserType& value) -{ - using namespace chip::app::Clusters::DoorLock; - switch (value) { - case DoorLockUserType::kUnrestricted: - return "UnrestrictedUser"; - case DoorLockUserType::kYearDayScheduleUser: - return "YearDayScheduleUser"; - case DoorLockUserType::kWeekDayScheduleUser: - return "WeekDayScheduleUser"; - case DoorLockUserType::kMasterUser: - return "MasterUser"; - case DoorLockUserType::kNonAccessUser: - return "NonAccessUser"; - case DoorLockUserType::kNotSupported: - return "NotSupported"; - default: - return "{}"; + switch( value ) { + case DlLockType::kDeadBolt: return "DeadBolt"; + case DlLockType::kMagnetic: return "Magnetic"; + case DlLockType::kOther: return "Other"; + case DlLockType::kMortise: return "Mortise"; + case DlLockType::kRim: return "Rim"; + case DlLockType::kLatchBolt: return "LatchBolt"; + case DlLockType::kCylindricalLock: return "CylindricalLock"; + case DlLockType::kTubularLock: return "TubularLock"; + case DlLockType::kInterconnectedLock: return "InterconnectedLock"; + case DlLockType::kDeadLatch: return "DeadLatch"; + case DlLockType::kDoorFurniture: return "DoorFurniture"; + default: return "{}"; + } +} +template<> nlohmann::json inline to_json(const chip::app::Clusters::DoorLock::DlOperatingMode& value) { + using namespace chip::app::Clusters::DoorLock; + switch( value ) { + case DlOperatingMode::kNormal: return "Normal FIXME"; + case DlOperatingMode::kVacation: return "Vacation FIXME"; + case DlOperatingMode::kPrivacy: return "Privacy FIXME"; + case DlOperatingMode::kNoRemoteLockUnlock: return "NoRemoteLockUnlock FIXME"; + case DlOperatingMode::kPassage: return "Passage FIXME"; + default: return "{}"; + } +} +template<> nlohmann::json inline to_json(const chip::app::Clusters::DoorLock::DlOperationError& value) { + using namespace chip::app::Clusters::DoorLock; + switch( value ) { + case DlOperationError::kUnspecified: return "Unspecified FIXME"; + case DlOperationError::kInvalidCredential: return "InvalidCredential FIXME"; + case DlOperationError::kDisabledUserDenied: return "DisabledUserDenied FIXME"; + case DlOperationError::kRestricted: return "Restricted FIXME"; + case DlOperationError::kInsufficientBattery: return "InsufficientBattery FIXME"; + default: return "{}"; + } +} +template<> nlohmann::json inline to_json(const chip::app::Clusters::DoorLock::DlOperationSource& value) { + using namespace chip::app::Clusters::DoorLock; + switch( value ) { + case DlOperationSource::kUnspecified: return "Unspecified FIXME"; + case DlOperationSource::kManual: return "Manual FIXME"; + case DlOperationSource::kProprietaryRemote: return "ProprietaryRemote FIXME"; + case DlOperationSource::kKeypad: return "Keypad FIXME"; + case DlOperationSource::kAuto: return "Auto FIXME"; + case DlOperationSource::kButton: return "Button FIXME"; + case DlOperationSource::kSchedule: return "Schedule FIXME"; + case DlOperationSource::kRemote: return "Remote FIXME"; + case DlOperationSource::kRfid: return "RFID FIXME"; + case DlOperationSource::kBiometric: return "Biometric FIXME"; + default: return "{}"; + } +} +template<> nlohmann::json inline to_json(const chip::app::Clusters::DoorLock::DlStatus& value) { + using namespace chip::app::Clusters::DoorLock; + switch( value ) { + case DlStatus::kSuccess: return "Success FIXME"; + case DlStatus::kFailure: return "Failure FIXME"; + case DlStatus::kDuplicate: return "Duplicate FIXME"; + case DlStatus::kOccupied: return "Occupied FIXME"; + case DlStatus::kInvalidField: return "InvalidField FIXME"; + case DlStatus::kResourceExhausted: return "ResourceExhausted FIXME"; + case DlStatus::kNotFound: return "NotFound FIXME"; + default: return "{}"; + } +} +template<> nlohmann::json inline to_json(const chip::app::Clusters::DoorLock::DlUserStatus& value) { + using namespace chip::app::Clusters::DoorLock; + switch( value ) { + case DlUserStatus::kAvailable: return "Available FIXME"; + case DlUserStatus::kOccupiedEnabled: return "OccupiedEnabled FIXME"; + case DlUserStatus::kOccupiedDisabled: return "OccupiedDisabled FIXME"; + default: return "{}"; + } +} +template<> nlohmann::json inline to_json(const chip::app::Clusters::DoorLock::DlUserType& value) { + using namespace chip::app::Clusters::DoorLock; + switch( value ) { + case DlUserType::kUnrestrictedUser: return "UnrestrictedUser FIXME"; + case DlUserType::kYearDayScheduleUser: return "YearDayScheduleUser FIXME"; + case DlUserType::kWeekDayScheduleUser: return "WeekDayScheduleUser FIXME"; + case DlUserType::kProgrammingUser: return "ProgrammingUser FIXME"; + case DlUserType::kNonAccessUser: return "NonAccessUser FIXME"; + case DlUserType::kForcedUser: return "ForcedUser FIXME"; + case DlUserType::kDisposableUser: return "DisposableUser FIXME"; + case DlUserType::kExpiringUser: return "ExpiringUser FIXME"; + case DlUserType::kScheduleRestrictedUser: return "ScheduleRestrictedUser FIXME"; + case DlUserType::kRemoteOnlyUser: return "RemoteOnlyUser FIXME"; + default: return "{}"; + } +} +template<> nlohmann::json inline to_json(const chip::app::Clusters::DoorLock::DoorLockOperationEventCode& value) { + using namespace chip::app::Clusters::DoorLock; + switch( value ) { + case DoorLockOperationEventCode::kUnknownOrMfgSpecific: return "UnknownOrMS"; + case DoorLockOperationEventCode::kLock: return "Lock"; + case DoorLockOperationEventCode::kUnlock: return "Unlock"; + case DoorLockOperationEventCode::kLockInvalidPinOrId: return "LockFailureInvalidPINOrID"; + case DoorLockOperationEventCode::kLockInvalidSchedule: return "LockFailureInvalidSchedule"; + case DoorLockOperationEventCode::kUnlockInvalidPinOrId: return "UnlockFailureInvalidPINOrID"; + case DoorLockOperationEventCode::kUnlockInvalidSchedule: return "UnlockFailureInvalidSchedule"; + case DoorLockOperationEventCode::kOneTouchLock: return "OneTouchLock"; + case DoorLockOperationEventCode::kKeyLock: return "KeyLock"; + case DoorLockOperationEventCode::kKeyUnlock: return "KeyUnlock"; + case DoorLockOperationEventCode::kAutoLock: return "AutoLock"; + case DoorLockOperationEventCode::kScheduleLock: return "ScheduleLock"; + case DoorLockOperationEventCode::kScheduleUnlock: return "ScheduleUnlock"; + case DoorLockOperationEventCode::kManualLock: return "ManualLock"; + case DoorLockOperationEventCode::kManualUnlock: return "ManualUnlock"; + default: return "{}"; + } +} +template<> nlohmann::json inline to_json(const chip::app::Clusters::DoorLock::DoorLockProgrammingEventCode& value) { + using namespace chip::app::Clusters::DoorLock; + switch( value ) { + case DoorLockProgrammingEventCode::kUnknownOrMfgSpecific: return "UnknownOrMS"; + case DoorLockProgrammingEventCode::kMasterCodeChanged: return "MasterCodeChanged"; + case DoorLockProgrammingEventCode::kPinAdded: return "PINCodeAdded"; + case DoorLockProgrammingEventCode::kPinDeleted: return "PINCodeDeleted"; + case DoorLockProgrammingEventCode::kPinChanged: return "PINCodeChanged"; + case DoorLockProgrammingEventCode::kIdAdded: return "RFIDCodeAdded"; + case DoorLockProgrammingEventCode::kIdDeleted: return "RFIDCodeDeleted"; + default: return "{}"; + } +} +template<> nlohmann::json inline to_json(const chip::app::Clusters::DoorLock::DoorLockSetPinOrIdStatus& value) { + using namespace chip::app::Clusters::DoorLock; + switch( value ) { + case DoorLockSetPinOrIdStatus::kSuccess: return "Success"; + case DoorLockSetPinOrIdStatus::kGeneralFailure: return "GeneralFailure"; + case DoorLockSetPinOrIdStatus::kMemoryFull: return "MemoryFull"; + case DoorLockSetPinOrIdStatus::kDuplicateCodeError: return "DuplicateCode"; + default: return "{}"; + } +} +template<> nlohmann::json inline to_json(const chip::app::Clusters::DoorLock::DoorLockUserStatus& value) { + using namespace chip::app::Clusters::DoorLock; + switch( value ) { + case DoorLockUserStatus::kAvailable: return "Available"; + case DoorLockUserStatus::kOccupiedEnabled: return "OccupiedEnabled"; + case DoorLockUserStatus::kOccupiedDisabled: return "OccupiedDisabled"; + case DoorLockUserStatus::kNotSupported: return "NotSupported"; + default: return "{}"; + } +} +template<> nlohmann::json inline to_json(const chip::app::Clusters::DoorLock::DoorLockUserType& value) { + using namespace chip::app::Clusters::DoorLock; + switch( value ) { + case DoorLockUserType::kUnrestricted: return "UnrestrictedUser"; + case DoorLockUserType::kYearDayScheduleUser: return "YearDayScheduleUser"; + case DoorLockUserType::kWeekDayScheduleUser: return "WeekDayScheduleUser"; + case DoorLockUserType::kMasterUser: return "MasterUser"; + case DoorLockUserType::kNonAccessUser: return "NonAccessUser"; + case DoorLockUserType::kNotSupported: return "NotSupported"; + default: return "{}"; } } /***************************** Bitmap Converter FIXME**************/ + /***************************** Bitmap Converter FIXME**************/ -template <> -nlohmann::json inline to_json(const chip::BitMask& value) -{ +template<> nlohmann::json inline to_json(const chip::BitMask& value) { using namespace chip::app::Clusters::Thermostat; nlohmann::json obj; obj["Sunday"] = static_cast(value.GetField(DayOfWeek::kSunday)); @@ -906,18 +625,14 @@ nlohmann::json inline to_json(const chip::BitMask(value.GetField(DayOfWeek::kAwayOrVacation)); return obj; } -template <> -nlohmann::json inline to_json(const chip::BitMask& value) -{ +template<> nlohmann::json inline to_json(const chip::BitMask& value) { using namespace chip::app::Clusters::Thermostat; nlohmann::json obj; obj["Heat"] = static_cast(value.GetField(ModeForSequence::kHeatSetpointFieldPresent)); obj["Cool"] = static_cast(value.GetField(ModeForSequence::kCoolSetpointFieldPresent)); return obj; } -template <> -nlohmann::json inline to_json(const chip::BitMask& value) -{ +template<> nlohmann::json inline to_json(const chip::BitMask& value) { using namespace chip::app::Clusters::Thermostat; nlohmann::json obj; obj["Heating FIXME"] = static_cast(value.GetField(ThermostatFeature::kHeating)); @@ -929,85 +644,52 @@ nlohmann::json inline to_json(const chip::BitMask -nlohmann::json inline to_json(const chip::app::Clusters::Thermostat::SetpointAdjustMode& value) -{ +template<> nlohmann::json inline to_json(const chip::app::Clusters::Thermostat::SetpointAdjustMode& value) { using namespace chip::app::Clusters::Thermostat; - switch (value) { - case SetpointAdjustMode::kHeatSetpoint: - return "Heat"; - case SetpointAdjustMode::kCoolSetpoint: - return "Cool"; - case SetpointAdjustMode::kHeatAndCoolSetpoints: - return "Both"; - default: - return "{}"; + switch( value ) { + case SetpointAdjustMode::kHeatSetpoint: return "Heat"; + case SetpointAdjustMode::kCoolSetpoint: return "Cool"; + case SetpointAdjustMode::kHeatAndCoolSetpoints: return "Both"; + default: return "{}"; } } -template <> -nlohmann::json inline to_json(const chip::app::Clusters::Thermostat::ThermostatControlSequence& value) -{ +template<> nlohmann::json inline to_json(const chip::app::Clusters::Thermostat::ThermostatControlSequence& value) { using namespace chip::app::Clusters::Thermostat; - switch (value) { - case ThermostatControlSequence::kCoolingOnly: - return "CoolingOnly"; - case ThermostatControlSequence::kCoolingWithReheat: - return "CoolingWithReheat"; - case ThermostatControlSequence::kHeatingOnly: - return "HeatingOnly"; - case ThermostatControlSequence::kHeatingWithReheat: - return "HeatingWithReheat"; - case ThermostatControlSequence::kCoolingAndHeating: - return "CoolingAndHeating4Pipes"; - case ThermostatControlSequence::kCoolingAndHeatingWithReheat: - return "CoolingAndHeating4PipesWithReheat"; - default: - return "{}"; + switch( value ) { + case ThermostatControlSequence::kCoolingOnly: return "CoolingOnly"; + case ThermostatControlSequence::kCoolingWithReheat: return "CoolingWithReheat"; + case ThermostatControlSequence::kHeatingOnly: return "HeatingOnly"; + case ThermostatControlSequence::kHeatingWithReheat: return "HeatingWithReheat"; + case ThermostatControlSequence::kCoolingAndHeating: return "CoolingAndHeating4Pipes"; + case ThermostatControlSequence::kCoolingAndHeatingWithReheat: return "CoolingAndHeating4PipesWithReheat"; + default: return "{}"; } } -template <> -nlohmann::json inline to_json(const chip::app::Clusters::Thermostat::ThermostatRunningMode& value) -{ +template<> nlohmann::json inline to_json(const chip::app::Clusters::Thermostat::ThermostatRunningMode& value) { using namespace chip::app::Clusters::Thermostat; - switch (value) { - case ThermostatRunningMode::kOff: - return "Off"; - case ThermostatRunningMode::kCool: - return "Cool"; - case ThermostatRunningMode::kHeat: - return "Heat"; - default: - return "{}"; + switch( value ) { + case ThermostatRunningMode::kOff: return "Off"; + case ThermostatRunningMode::kCool: return "Cool"; + case ThermostatRunningMode::kHeat: return "Heat"; + default: return "{}"; } } -template <> -nlohmann::json inline to_json(const chip::app::Clusters::Thermostat::ThermostatSystemMode& value) -{ +template<> nlohmann::json inline to_json(const chip::app::Clusters::Thermostat::ThermostatSystemMode& value) { using namespace chip::app::Clusters::Thermostat; - switch (value) { - case ThermostatSystemMode::kOff: - return "Off"; - case ThermostatSystemMode::kAuto: - return "Auto"; - case ThermostatSystemMode::kCool: - return "Cool"; - case ThermostatSystemMode::kHeat: - return "Heat"; - case ThermostatSystemMode::kEmergencyHeating: - return "EmergencyHeating"; - case ThermostatSystemMode::kPrecooling: - return "Precooling"; - case ThermostatSystemMode::kFanOnly: - return "FanOnly"; - default: - return "{}"; + switch( value ) { + case ThermostatSystemMode::kOff: return "Off"; + case ThermostatSystemMode::kAuto: return "Auto"; + case ThermostatSystemMode::kCool: return "Cool"; + case ThermostatSystemMode::kHeat: return "Heat"; + case ThermostatSystemMode::kEmergencyHeating: return "EmergencyHeating"; + case ThermostatSystemMode::kPrecooling: return "Precooling"; + case ThermostatSystemMode::kFanOnly: return "FanOnly"; + default: return "{}"; } } /***************************** Bitmap Converter FIXME**************/ -template <> -nlohmann::json inline to_json(const chip::BitMask& value) -{ +template<> nlohmann::json inline to_json(const chip::BitMask& value) { using namespace chip::app::Clusters::FanControl; nlohmann::json obj; obj["MultiSpeed FIXME"] = static_cast(value.GetField(FanControlFeature::kMultiSpeed)); @@ -1016,9 +698,7 @@ nlohmann::json inline to_json(const chip::BitMask(value.GetField(FanControlFeature::kWind)); return obj; } -template <> -nlohmann::json inline to_json(const chip::BitMask& value) -{ +template<> nlohmann::json inline to_json(const chip::BitMask& value) { using namespace chip::app::Clusters::FanControl; nlohmann::json obj; obj["RockLeftRight FIXME"] = static_cast(value.GetField(RockSupportMask::kRockLeftRight)); @@ -1026,18 +706,14 @@ nlohmann::json inline to_json(const chip::BitMask(value.GetField(RockSupportMask::kRockRound)); return obj; } -template <> -nlohmann::json inline to_json(const chip::BitMask& value) -{ +template<> nlohmann::json inline to_json(const chip::BitMask& value) { using namespace chip::app::Clusters::FanControl; nlohmann::json obj; obj["SleepWind FIXME"] = static_cast(value.GetField(WindSettingMask::kSleepWind)); obj["NaturalWind FIXME"] = static_cast(value.GetField(WindSettingMask::kNaturalWind)); return obj; } -template <> -nlohmann::json inline to_json(const chip::BitMask& value) -{ +template<> nlohmann::json inline to_json(const chip::BitMask& value) { using namespace chip::app::Clusters::FanControl; nlohmann::json obj; obj["SleepWind FIXME"] = static_cast(value.GetField(WindSupportMask::kSleepWind)); @@ -1045,57 +721,37 @@ nlohmann::json inline to_json(const chip::BitMask -nlohmann::json inline to_json(const chip::app::Clusters::FanControl::FanModeSequenceType& value) -{ +template<> nlohmann::json inline to_json(const chip::app::Clusters::FanControl::FanModeSequenceType& value) { using namespace chip::app::Clusters::FanControl; - switch (value) { - case FanModeSequenceType::kOffLowMedHigh: - return "Off/Low/Med/High FIXME"; - case FanModeSequenceType::kOffLowHigh: - return "Off/Low/High FIXME"; - case FanModeSequenceType::kOffLowMedHighAuto: - return "Off/Low/Med/High/Auto FIXME"; - case FanModeSequenceType::kOffLowHighAuto: - return "Off/Low/High/Auto FIXME"; - case FanModeSequenceType::kOffOnAuto: - return "Off/On/Auto FIXME"; - case FanModeSequenceType::kOffOn: - return "Off/On FIXME"; - default: - return "{}"; + switch( value ) { + case FanModeSequenceType::kOffLowMedHigh: return "Off/Low/Med/High FIXME"; + case FanModeSequenceType::kOffLowHigh: return "Off/Low/High FIXME"; + case FanModeSequenceType::kOffLowMedHighAuto: return "Off/Low/Med/High/Auto FIXME"; + case FanModeSequenceType::kOffLowHighAuto: return "Off/Low/High/Auto FIXME"; + case FanModeSequenceType::kOffOnAuto: return "Off/On/Auto FIXME"; + case FanModeSequenceType::kOffOn: return "Off/On FIXME"; + default: return "{}"; } } -template <> -nlohmann::json inline to_json(const chip::app::Clusters::FanControl::FanModeType& value) -{ +template<> nlohmann::json inline to_json(const chip::app::Clusters::FanControl::FanModeType& value) { using namespace chip::app::Clusters::FanControl; - switch (value) { - case FanModeType::kOff: - return "Off FIXME"; - case FanModeType::kLow: - return "Low FIXME"; - case FanModeType::kMedium: - return "Medium FIXME"; - case FanModeType::kHigh: - return "High FIXME"; - case FanModeType::kOn: - return "On FIXME"; - case FanModeType::kAuto: - return "Auto FIXME"; - case FanModeType::kSmart: - return "Smart FIXME"; - default: - return "{}"; + switch( value ) { + case FanModeType::kOff: return "Off FIXME"; + case FanModeType::kLow: return "Low FIXME"; + case FanModeType::kMedium: return "Medium FIXME"; + case FanModeType::kHigh: return "High FIXME"; + case FanModeType::kOn: return "On FIXME"; + case FanModeType::kAuto: return "Auto FIXME"; + case FanModeType::kSmart: return "Smart FIXME"; + default: return "{}"; } } /***************************** Bitmap Converter FIXME**************/ + /***************************** Bitmap Converter FIXME**************/ -template <> -nlohmann::json inline to_json(const chip::BitMask& value) -{ +template<> nlohmann::json inline to_json(const chip::BitMask& value) { using namespace chip::app::Clusters::ColorControl; nlohmann::json obj; obj["HueSaturationSupported"] = static_cast(value.GetField(ColorCapabilities::kHueSaturationSupported)); @@ -1105,9 +761,7 @@ nlohmann::json inline to_json(const chip::BitMask(value.GetField(ColorCapabilities::kColorTemperatureSupported)); return obj; } -template <> -nlohmann::json inline to_json(const chip::BitMask& value) -{ +template<> nlohmann::json inline to_json(const chip::BitMask& value) { using namespace chip::app::Clusters::ColorControl; nlohmann::json obj; obj["HueAndSaturation FIXME"] = static_cast(value.GetField(ColorControlFeature::kHueAndSaturation)); @@ -1117,9 +771,7 @@ nlohmann::json inline to_json(const chip::BitMask(value.GetField(ColorControlFeature::kColorTemperature)); return obj; } -template <> -nlohmann::json inline to_json(const chip::BitMask& value) -{ +template<> nlohmann::json inline to_json(const chip::BitMask& value) { using namespace chip::app::Clusters::ColorControl; nlohmann::json obj; obj["UpdateAction"] = static_cast(value.GetField(ColorLoopUpdateFlags::kUpdateAction)); @@ -1129,144 +781,93 @@ nlohmann::json inline to_json(const chip::BitMask -nlohmann::json inline to_json(const chip::app::Clusters::ColorControl::ColorLoopAction& value) -{ +template<> nlohmann::json inline to_json(const chip::app::Clusters::ColorControl::ColorLoopAction& value) { using namespace chip::app::Clusters::ColorControl; - switch (value) { - case ColorLoopAction::kDeactivate: - return "DeactivateColorLoop"; - case ColorLoopAction::kActivateFromColorLoopStartEnhancedHue: - return "ActivateColorLoopFromColorLoopStartEnhancedHue"; - case ColorLoopAction::kActivateFromEnhancedCurrentHue: - return "ActivateColorLoopFromEnhancedCurrentHue"; - default: - return "{}"; + switch( value ) { + case ColorLoopAction::kDeactivate: return "DeactivateColorLoop"; + case ColorLoopAction::kActivateFromColorLoopStartEnhancedHue: return "ActivateColorLoopFromColorLoopStartEnhancedHue"; + case ColorLoopAction::kActivateFromEnhancedCurrentHue: return "ActivateColorLoopFromEnhancedCurrentHue"; + default: return "{}"; } } -template <> -nlohmann::json inline to_json(const chip::app::Clusters::ColorControl::ColorLoopDirection& value) -{ +template<> nlohmann::json inline to_json(const chip::app::Clusters::ColorControl::ColorLoopDirection& value) { using namespace chip::app::Clusters::ColorControl; - switch (value) { - case ColorLoopDirection::kDecrementHue: - return "DecrementEnhancedCurrentHue"; - case ColorLoopDirection::kIncrementHue: - return "IncrementEnhancedCurrentHue"; - default: - return "{}"; + switch( value ) { + case ColorLoopDirection::kDecrementHue: return "DecrementEnhancedCurrentHue"; + case ColorLoopDirection::kIncrementHue: return "IncrementEnhancedCurrentHue"; + default: return "{}"; } } -template <> -nlohmann::json inline to_json(const chip::app::Clusters::ColorControl::ColorMode& value) -{ +template<> nlohmann::json inline to_json(const chip::app::Clusters::ColorControl::ColorMode& value) { using namespace chip::app::Clusters::ColorControl; - switch (value) { - case ColorMode::kCurrentHueAndCurrentSaturation: - return "CurrentHueAndCurrentSaturation"; - case ColorMode::kCurrentXAndCurrentY: - return "CurrentXAndCurrentY"; - case ColorMode::kColorTemperature: - return "ColorTemperatureMireds"; - default: - return "{}"; + switch( value ) { + case ColorMode::kCurrentHueAndCurrentSaturation: return "CurrentHueAndCurrentSaturation"; + case ColorMode::kCurrentXAndCurrentY: return "CurrentXAndCurrentY"; + case ColorMode::kColorTemperature: return "ColorTemperatureMireds"; + default: return "{}"; } } -template <> -nlohmann::json inline to_json(const chip::app::Clusters::ColorControl::HueDirection& value) -{ +template<> nlohmann::json inline to_json(const chip::app::Clusters::ColorControl::HueDirection& value) { using namespace chip::app::Clusters::ColorControl; - switch (value) { - case HueDirection::kShortestDistance: - return "ShortestDistance"; - case HueDirection::kLongestDistance: - return "LongestDistance"; - case HueDirection::kUp: - return "Up"; - case HueDirection::kDown: - return "Down"; - default: - return "{}"; + switch( value ) { + case HueDirection::kShortestDistance: return "ShortestDistance"; + case HueDirection::kLongestDistance: return "LongestDistance"; + case HueDirection::kUp: return "Up"; + case HueDirection::kDown: return "Down"; + default: return "{}"; } } -template <> -nlohmann::json inline to_json(const chip::app::Clusters::ColorControl::HueMoveMode& value) -{ +template<> nlohmann::json inline to_json(const chip::app::Clusters::ColorControl::HueMoveMode& value) { using namespace chip::app::Clusters::ColorControl; - switch (value) { - case HueMoveMode::kStop: - return "Stop"; - case HueMoveMode::kUp: - return "Up"; - case HueMoveMode::kDown: - return "Down"; - default: - return "{}"; + switch( value ) { + case HueMoveMode::kStop: return "Stop"; + case HueMoveMode::kUp: return "Up"; + case HueMoveMode::kDown: return "Down"; + default: return "{}"; } } -template <> -nlohmann::json inline to_json(const chip::app::Clusters::ColorControl::HueStepMode& value) -{ +template<> nlohmann::json inline to_json(const chip::app::Clusters::ColorControl::HueStepMode& value) { using namespace chip::app::Clusters::ColorControl; - switch (value) { - case HueStepMode::kUp: - return "Up"; - case HueStepMode::kDown: - return "Down"; - default: - return "{}"; + switch( value ) { + case HueStepMode::kUp: return "Up"; + case HueStepMode::kDown: return "Down"; + default: return "{}"; } } -template <> -nlohmann::json inline to_json(const chip::app::Clusters::ColorControl::SaturationMoveMode& value) -{ +template<> nlohmann::json inline to_json(const chip::app::Clusters::ColorControl::SaturationMoveMode& value) { using namespace chip::app::Clusters::ColorControl; - switch (value) { - case SaturationMoveMode::kStop: - return "stop FIXME"; - case SaturationMoveMode::kUp: - return "Up FIXME"; - case SaturationMoveMode::kDown: - return "Down FIXME"; - default: - return "{}"; + switch( value ) { + case SaturationMoveMode::kStop: return "stop FIXME"; + case SaturationMoveMode::kUp: return "Up FIXME"; + case SaturationMoveMode::kDown: return "Down FIXME"; + default: return "{}"; } } -template <> -nlohmann::json inline to_json(const chip::app::Clusters::ColorControl::SaturationStepMode& value) -{ +template<> nlohmann::json inline to_json(const chip::app::Clusters::ColorControl::SaturationStepMode& value) { using namespace chip::app::Clusters::ColorControl; - switch (value) { - case SaturationStepMode::kUp: - return "Up FIXME"; - case SaturationStepMode::kDown: - return "Down FIXME"; - default: - return "{}"; + switch( value ) { + case SaturationStepMode::kUp: return "Up FIXME"; + case SaturationStepMode::kDown: return "Down FIXME"; + default: return "{}"; } } /***************************** Bitmap Converter FIXME**************/ -template <> -nlohmann::json inline to_json(const chip::app::Clusters::IlluminanceMeasurement::LightSensorType& value) -{ + +template<> nlohmann::json inline to_json(const chip::app::Clusters::IlluminanceMeasurement::LightSensorType& value) { using namespace chip::app::Clusters::IlluminanceMeasurement; - switch (value) { - case LightSensorType::kPhotodiode: - return "Photodiode"; - case LightSensorType::kCmos: - return "Cmos"; - default: - return "{}"; + switch( value ) { + case LightSensorType::kPhotodiode: return "Photodiode"; + case LightSensorType::kCmos: return "Cmos"; + default: return "{}"; } } /***************************** Bitmap Converter FIXME**************/ + /***************************** Bitmap Converter FIXME**************/ -template <> -nlohmann::json inline to_json(const chip::BitMask& value) -{ +template<> nlohmann::json inline to_json(const chip::BitMask& value) { using namespace chip::app::Clusters::PressureMeasurement; nlohmann::json obj; obj["EXT FIXME"] = static_cast(value.GetField(PressureFeature::kExt)); @@ -1275,6 +876,10 @@ nlohmann::json inline to_json(const chip::BitMask -const std::map zap_cluster_revisions = { - { 3, 4 }, - { 4, 3 }, - { 5, 4 }, - { 6, 4 }, - { - 7, - 0, - }, - { 8, 5 }, - { - 15, - 0, - }, - { - 28, - 0, - }, - { - 29, - 0, - }, - { - 30, - 0, - }, - { - 31, - 0, - }, - { - 37, - 0, - }, - { 40, 1 }, - { - 41, - 0, - }, - { - 42, - 0, - }, - { - 43, - 0, - }, - { - 44, - 0, - }, - { 45, 1 }, - { 46, 1 }, - { - 47, - 0, - }, - { - 48, - 0, - }, - { - 49, - 0, - }, - { - 50, - 0, - }, - { - 51, - 0, - }, - { - 52, - 0, - }, - { - 53, - 0, - }, - { - 54, - 0, - }, - { - 55, - 0, - }, - { - 56, - 0, - }, - { 57, 1 }, - { - 59, - 0, - }, - { - 60, - 0, - }, - { - 62, - 0, - }, - { - 63, - 0, - }, - { - 64, - 0, - }, - { - 65, - 0, - }, - { - 66, - 0, - }, - { - 67, - 0, - }, - { - 68, - 0, - }, - { 69, 1 }, - { - 80, - 0, - }, - { 257, 6 }, - { 258, 5 }, - { - 259, - 0, - }, - { 512, 3 }, - { 513, 5 }, - { - 514, - 0, - }, - { - 516, - 0, - }, - { 768, 5 }, - { 769, 4 }, - { 1024, 3 }, - { - 1026, - 0, - }, - { 1027, 3 }, - { - 1028, - 0, - }, - { 1029, 3 }, - { 1030, 2 }, - { - 1283, - 0, - }, - { - 1284, - 0, - }, - { - 1285, - 0, - }, - { - 1286, - 0, - }, - { - 1287, - 0, - }, - { - 1288, - 0, - }, - { - 1289, - 0, - }, - { - 1290, - 0, - }, - { - 1291, - 0, - }, - { - 1292, - 0, - }, - { - 1293, - 0, - }, - { - 1294, - 0, - }, - { 2820, 3 }, - { - 4166, - 0, - }, - { - 4294048773, - 0, - }, - { - 4294048774, - 0, - }, +#include +const std::map zap_cluster_revisions = { +{ 3,4 }, +{ 4,3 }, +{ 5,4 }, +{ 6,4 }, +{ 7,0, }, +{ 8,5 }, +{ 15,0, }, +{ 28,0, }, +{ 29,0, }, +{ 30,0, }, +{ 31,0, }, +{ 37,0, }, +{ 40,1 }, +{ 41,0, }, +{ 42,0, }, +{ 43,0, }, +{ 44,0, }, +{ 45,1 }, +{ 46,1 }, +{ 47,0, }, +{ 48,0, }, +{ 49,0, }, +{ 50,0, }, +{ 51,0, }, +{ 52,0, }, +{ 53,0, }, +{ 54,0, }, +{ 55,0, }, +{ 56,0, }, +{ 57,1 }, +{ 59,0, }, +{ 60,0, }, +{ 62,0, }, +{ 63,0, }, +{ 64,0, }, +{ 65,0, }, +{ 66,0, }, +{ 67,0, }, +{ 68,0, }, +{ 69,1 }, +{ 80,0, }, +{ 257,6 }, +{ 258,5 }, +{ 259,0, }, +{ 512,3 }, +{ 513,5 }, +{ 514,0, }, +{ 516,0, }, +{ 768,5 }, +{ 769,4 }, +{ 1024,3 }, +{ 1026,0, }, +{ 1027,3 }, +{ 1028,0, }, +{ 1029,3 }, +{ 1030,2 }, +{ 1283,0, }, +{ 1284,0, }, +{ 1285,0, }, +{ 1286,0, }, +{ 1287,0, }, +{ 1288,0, }, +{ 1289,0, }, +{ 1290,0, }, +{ 1291,0, }, +{ 1292,0, }, +{ 1293,0, }, +{ 1294,0, }, +{ 2820,3 }, +{ 4166,0, }, +{ 4294048773,0, }, +{ 4294048774,0, }, }; \ No newline at end of file diff --git a/silabs_examples/unify-matter-bridge/linux/zap-generated/data_model_translator/command_translator.cpp b/silabs_examples/unify-matter-bridge/linux/zap-generated/data_model_translator/command_translator.cpp index bcf1f2ec2cff8b..f1f31f84983071 100644 --- a/silabs_examples/unify-matter-bridge/linux/zap-generated/data_model_translator/command_translator.cpp +++ b/silabs_examples/unify-matter-bridge/linux/zap-generated/data_model_translator/command_translator.cpp @@ -11,15 +11,15 @@ * sections of the MSLA applicable to Source Code. * ******************************************************************************/ -#define CHIP_USE_ENUM_CLASS_FOR_IM_ENUM + #define CHIP_USE_ENUM_CLASS_FOR_IM_ENUM #include "command_translator.hpp" -#include "chip_types_to_json.hpp" -#include "cluster_emulator.hpp" -#include "sl_log.h" #include -#include #include +#include +#include "sl_log.h" +#include "chip_types_to_json.hpp" +#include "cluster_emulator.hpp" using namespace chip; using namespace chip::app; @@ -29,2035 +29,2208 @@ using namespace unify::matter_bridge; #define LOG_TAG "matter_cluster_command_server" // Identify : 3 -void IdentifyClusterCommandHandler::InvokeCommand(CommandHandlerInterface::HandlerContext& ctxt) +void IdentifyClusterCommandHandler::InvokeCommand( + CommandHandlerInterface::HandlerContext &ctxt) { - using namespace chip::app::Clusters::Identify; - - 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 = {}; - - if (m_node_state_monitor.emulator().is_command_emulated(ctxt.mRequestPath)) { - m_node_state_monitor.emulator().invoke_command(ctxt); - return; - } - - switch (ctxt.mRequestPath.mCommandId) { - case Commands::Identify::Id: { - Commands::Identify::DecodableType data; - cmd = "Identify"; // "Identify"; - if (DataModel::Decode(ctxt.GetReader(), data) == CHIP_NO_ERROR) { - try { - payload["IdentifyTime"] = to_json(data.identifyTime); - } 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::TriggerEffect::Id: { - Commands::TriggerEffect::DecodableType data; - cmd = "TriggerEffect"; // "TriggerEffect"; - if (DataModel::Decode(ctxt.GetReader(), data) == CHIP_NO_ERROR) { - try { - payload["EffectIdentifier"] = to_json(data.effectIdentifier); - } catch (std::exception& ex) { - sl_log_warning(LOG_TAG, "Failed to add the command argument value to json format: %s", ex.what()); - } - try { - payload["EffectVariant"] = to_json(data.effectVariant); - } 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(); + using namespace chip::app::Clusters::Identify; + + 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 = {}; + + if( m_node_state_monitor.emulator().is_command_emulated(ctxt.mRequestPath) ) { + m_node_state_monitor.emulator().invoke_command(ctxt); + return; + } + + switch (ctxt.mRequestPath.mCommandId) { + case Commands::Identify::Id: + { + Commands::Identify::DecodableType data; + cmd = "Identify"; // "Identify"; + if (DataModel::Decode(ctxt.GetReader(), data) == CHIP_NO_ERROR){ + try { + payload["IdentifyTime"] = to_json(data.identifyTime); + } 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::TriggerEffect::Id: + { + Commands::TriggerEffect::DecodableType data; + cmd = "TriggerEffect"; // "TriggerEffect"; + if (DataModel::Decode(ctxt.GetReader(), data) == CHIP_NO_ERROR){ + try { + payload["EffectIdentifier"] = to_json(data.effectIdentifier); + } catch (std::exception &ex) { + sl_log_warning(LOG_TAG, "Failed to add the command argument value to json format: %s", ex.what()); + } + try { + payload["EffectVariant"] = to_json(data.effectVariant); + } 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(); } // Groups : 4 -void GroupsClusterCommandHandler::InvokeCommand(CommandHandlerInterface::HandlerContext& ctxt) +void GroupsClusterCommandHandler::InvokeCommand( + CommandHandlerInterface::HandlerContext &ctxt) { - using namespace chip::app::Clusters::Groups; - - 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 = {}; - - if (m_node_state_monitor.emulator().is_command_emulated(ctxt.mRequestPath)) { - m_node_state_monitor.emulator().invoke_command(ctxt); - return; - } - - switch (ctxt.mRequestPath.mCommandId) { - case Commands::AddGroup::Id: { - Commands::AddGroup::DecodableType data; - cmd = "AddGroup"; // "AddGroup"; - if (DataModel::Decode(ctxt.GetReader(), data) == CHIP_NO_ERROR) { - try { - payload["GroupId"] = to_json(data.groupId); - } catch (std::exception& ex) { - sl_log_warning(LOG_TAG, "Failed to add the command argument value to json format: %s", ex.what()); - } - try { - payload["GroupName"] = to_json(data.groupName); - } 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::ViewGroup::Id: { - Commands::ViewGroup::DecodableType data; - cmd = "ViewGroup"; // "ViewGroup"; - if (DataModel::Decode(ctxt.GetReader(), data) == CHIP_NO_ERROR) { - try { - payload["GroupId"] = to_json(data.groupId); - } 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::GetGroupMembership::Id: { - Commands::GetGroupMembership::DecodableType data; - cmd = "GetGroupMembership"; // "GetGroupMembership"; - if (DataModel::Decode(ctxt.GetReader(), data) == CHIP_NO_ERROR) { - try { - payload["GroupList"] = to_json(data.groupList); - } 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::RemoveGroup::Id: { - Commands::RemoveGroup::DecodableType data; - cmd = "RemoveGroup"; // "RemoveGroup"; - if (DataModel::Decode(ctxt.GetReader(), data) == CHIP_NO_ERROR) { - try { - payload["GroupId"] = to_json(data.groupId); - } 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::RemoveAllGroups::Id: { - Commands::RemoveAllGroups::DecodableType data; - cmd = "RemoveAllGroups"; // "RemoveAllGroups"; - if (DataModel::Decode(ctxt.GetReader(), data) == CHIP_NO_ERROR) { - } - } break; - case Commands::AddGroupIfIdentifying::Id: { - Commands::AddGroupIfIdentifying::DecodableType data; - cmd = "AddGroupIfIdentifying"; // "AddGroupIfIdentifying"; - if (DataModel::Decode(ctxt.GetReader(), data) == CHIP_NO_ERROR) { - try { - payload["GroupId"] = to_json(data.groupId); - } catch (std::exception& ex) { - sl_log_warning(LOG_TAG, "Failed to add the command argument value to json format: %s", ex.what()); - } - try { - payload["GroupName"] = to_json(data.groupName); - } 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(); + using namespace chip::app::Clusters::Groups; + + 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 = {}; + + if( m_node_state_monitor.emulator().is_command_emulated(ctxt.mRequestPath) ) { + m_node_state_monitor.emulator().invoke_command(ctxt); + return; + } + + switch (ctxt.mRequestPath.mCommandId) { + case Commands::AddGroup::Id: + { + Commands::AddGroup::DecodableType data; + cmd = "AddGroup"; // "AddGroup"; + if (DataModel::Decode(ctxt.GetReader(), data) == CHIP_NO_ERROR){ + try { + payload["GroupId"] = to_json(data.groupId); + } catch (std::exception &ex) { + sl_log_warning(LOG_TAG, "Failed to add the command argument value to json format: %s", ex.what()); + } + try { + payload["GroupName"] = to_json(data.groupName); + } 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::ViewGroup::Id: + { + Commands::ViewGroup::DecodableType data; + cmd = "ViewGroup"; // "ViewGroup"; + if (DataModel::Decode(ctxt.GetReader(), data) == CHIP_NO_ERROR){ + try { + payload["GroupId"] = to_json(data.groupId); + } 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::GetGroupMembership::Id: + { + Commands::GetGroupMembership::DecodableType data; + cmd = "GetGroupMembership"; // "GetGroupMembership"; + if (DataModel::Decode(ctxt.GetReader(), data) == CHIP_NO_ERROR){ + try { + payload["GroupList"] = to_json(data.groupList); + } 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::RemoveGroup::Id: + { + Commands::RemoveGroup::DecodableType data; + cmd = "RemoveGroup"; // "RemoveGroup"; + if (DataModel::Decode(ctxt.GetReader(), data) == CHIP_NO_ERROR){ + try { + payload["GroupId"] = to_json(data.groupId); + } 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::RemoveAllGroups::Id: + { + Commands::RemoveAllGroups::DecodableType data; + cmd = "RemoveAllGroups"; // "RemoveAllGroups"; + if (DataModel::Decode(ctxt.GetReader(), data) == CHIP_NO_ERROR){ + } + } + break; + case Commands::AddGroupIfIdentifying::Id: + { + Commands::AddGroupIfIdentifying::DecodableType data; + cmd = "AddGroupIfIdentifying"; // "AddGroupIfIdentifying"; + if (DataModel::Decode(ctxt.GetReader(), data) == CHIP_NO_ERROR){ + try { + payload["GroupId"] = to_json(data.groupId); + } catch (std::exception &ex) { + sl_log_warning(LOG_TAG, "Failed to add the command argument value to json format: %s", ex.what()); + } + try { + payload["GroupName"] = to_json(data.groupName); + } 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(); } // Scenes : 5 -void ScenesClusterCommandHandler::InvokeCommand(CommandHandlerInterface::HandlerContext& ctxt) +void ScenesClusterCommandHandler::InvokeCommand( + CommandHandlerInterface::HandlerContext &ctxt) { - using namespace chip::app::Clusters::Scenes; - - 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 = {}; - - if (m_node_state_monitor.emulator().is_command_emulated(ctxt.mRequestPath)) { - m_node_state_monitor.emulator().invoke_command(ctxt); - return; - } - - switch (ctxt.mRequestPath.mCommandId) { - case Commands::AddScene::Id: { - Commands::AddScene::DecodableType data; - cmd = "AddScene"; // "AddScene"; - if (DataModel::Decode(ctxt.GetReader(), data) == CHIP_NO_ERROR) { - try { - payload["GroupID"] = to_json(data.groupId); - } catch (std::exception& ex) { - sl_log_warning(LOG_TAG, "Failed to add the command argument value to json format: %s", ex.what()); - } - try { - payload["SceneID"] = to_json(data.sceneId); - } catch (std::exception& ex) { - sl_log_warning(LOG_TAG, "Failed to add the command argument 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()); - } - try { - payload["SceneName"] = to_json(data.sceneName); - } catch (std::exception& ex) { - sl_log_warning(LOG_TAG, "Failed to add the command argument value to json format: %s", ex.what()); - } - try { - payload["ExtensionFieldSets"] = to_json(data.extensionFieldSets); - } 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::ViewScene::Id: { - Commands::ViewScene::DecodableType data; - cmd = "ViewScene"; // "ViewScene"; - if (DataModel::Decode(ctxt.GetReader(), data) == CHIP_NO_ERROR) { - try { - payload["GroupID"] = to_json(data.groupId); - } catch (std::exception& ex) { - sl_log_warning(LOG_TAG, "Failed to add the command argument value to json format: %s", ex.what()); - } - try { - payload["SceneID"] = to_json(data.sceneId); - } 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::RemoveScene::Id: { - Commands::RemoveScene::DecodableType data; - cmd = "RemoveScene"; // "RemoveScene"; - if (DataModel::Decode(ctxt.GetReader(), data) == CHIP_NO_ERROR) { - try { - payload["GroupID"] = to_json(data.groupId); - } catch (std::exception& ex) { - sl_log_warning(LOG_TAG, "Failed to add the command argument value to json format: %s", ex.what()); - } - try { - payload["SceneID"] = to_json(data.sceneId); - } 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::RemoveAllScenes::Id: { - Commands::RemoveAllScenes::DecodableType data; - cmd = "RemoveAllScenes"; // "RemoveAllScenes"; - if (DataModel::Decode(ctxt.GetReader(), data) == CHIP_NO_ERROR) { - try { - payload["GroupID"] = to_json(data.groupId); - } 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::StoreScene::Id: { - Commands::StoreScene::DecodableType data; - cmd = "StoreScene"; // "StoreScene"; - if (DataModel::Decode(ctxt.GetReader(), data) == CHIP_NO_ERROR) { - try { - payload["GroupID"] = to_json(data.groupId); - } catch (std::exception& ex) { - sl_log_warning(LOG_TAG, "Failed to add the command argument value to json format: %s", ex.what()); - } - try { - payload["SceneID"] = to_json(data.sceneId); - } 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::RecallScene::Id: { - Commands::RecallScene::DecodableType data; - cmd = "RecallScene"; // "RecallScene"; - if (DataModel::Decode(ctxt.GetReader(), data) == CHIP_NO_ERROR) { - try { - payload["GroupID"] = to_json(data.groupId); - } catch (std::exception& ex) { - sl_log_warning(LOG_TAG, "Failed to add the command argument value to json format: %s", ex.what()); - } - try { - payload["SceneID"] = to_json(data.sceneId); - } catch (std::exception& ex) { - sl_log_warning(LOG_TAG, "Failed to add the command argument value to json format: %s", ex.what()); - } - if (data.transitionTime.HasValue()) { - try { - payload["TransitionTime"] = to_json(data.transitionTime.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::GetSceneMembership::Id: { - Commands::GetSceneMembership::DecodableType data; - cmd = "GetSceneMembership"; // "GetSceneMembership"; - if (DataModel::Decode(ctxt.GetReader(), data) == CHIP_NO_ERROR) { - try { - payload["GroupID"] = to_json(data.groupId); - } 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::EnhancedAddScene::Id: { - Commands::EnhancedAddScene::DecodableType data; - cmd = "EnhancedAddScene"; // "EnhancedAddScene"; - if (DataModel::Decode(ctxt.GetReader(), data) == CHIP_NO_ERROR) { - try { - payload["GroupID"] = to_json(data.groupId); - } catch (std::exception& ex) { - sl_log_warning(LOG_TAG, "Failed to add the command argument value to json format: %s", ex.what()); - } - try { - payload["SceneID"] = to_json(data.sceneId); - } catch (std::exception& ex) { - sl_log_warning(LOG_TAG, "Failed to add the command argument 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()); - } - try { - payload["SceneName"] = to_json(data.sceneName); - } catch (std::exception& ex) { - sl_log_warning(LOG_TAG, "Failed to add the command argument value to json format: %s", ex.what()); - } - try { - payload["ExtensionFieldSets"] = to_json(data.extensionFieldSets); - } 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::EnhancedViewScene::Id: { - Commands::EnhancedViewScene::DecodableType data; - cmd = "EnhancedViewScene"; // "EnhancedViewScene"; - if (DataModel::Decode(ctxt.GetReader(), data) == CHIP_NO_ERROR) { - try { - payload["GroupID"] = to_json(data.groupId); - } catch (std::exception& ex) { - sl_log_warning(LOG_TAG, "Failed to add the command argument value to json format: %s", ex.what()); - } - try { - payload["SceneID"] = to_json(data.sceneId); - } 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::CopyScene::Id: { - Commands::CopyScene::DecodableType data; - cmd = "CopyScene"; // "CopyScene"; - if (DataModel::Decode(ctxt.GetReader(), data) == CHIP_NO_ERROR) { - try { - payload["Mode"] = to_json(data.mode); - } catch (std::exception& ex) { - sl_log_warning(LOG_TAG, "Failed to add the command argument value to json format: %s", ex.what()); - } - try { - payload["GroupIdentifierFrom"] = to_json(data.groupIdFrom); - } catch (std::exception& ex) { - sl_log_warning(LOG_TAG, "Failed to add the command argument value to json format: %s", ex.what()); - } - try { - payload["SceneIdentifierFrom"] = to_json(data.sceneIdFrom); - } catch (std::exception& ex) { - sl_log_warning(LOG_TAG, "Failed to add the command argument value to json format: %s", ex.what()); - } - try { - payload["GroupIdentifierTo"] = to_json(data.groupIdTo); - } catch (std::exception& ex) { - sl_log_warning(LOG_TAG, "Failed to add the command argument value to json format: %s", ex.what()); - } - try { - payload["SceneIdentifierTo"] = to_json(data.sceneIdTo); - } 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(); + using namespace chip::app::Clusters::Scenes; + + 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 = {}; + + if( m_node_state_monitor.emulator().is_command_emulated(ctxt.mRequestPath) ) { + m_node_state_monitor.emulator().invoke_command(ctxt); + return; + } + + switch (ctxt.mRequestPath.mCommandId) { + case Commands::AddScene::Id: + { + Commands::AddScene::DecodableType data; + cmd = "AddScene"; // "AddScene"; + if (DataModel::Decode(ctxt.GetReader(), data) == CHIP_NO_ERROR){ + try { + payload["GroupID"] = to_json(data.groupId); + } catch (std::exception &ex) { + sl_log_warning(LOG_TAG, "Failed to add the command argument value to json format: %s", ex.what()); + } + try { + payload["SceneID"] = to_json(data.sceneId); + } catch (std::exception &ex) { + sl_log_warning(LOG_TAG, "Failed to add the command argument 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()); + } + try { + payload["SceneName"] = to_json(data.sceneName); + } catch (std::exception &ex) { + sl_log_warning(LOG_TAG, "Failed to add the command argument value to json format: %s", ex.what()); + } + try { + payload["ExtensionFieldSets"] = to_json(data.extensionFieldSets); + } 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::ViewScene::Id: + { + Commands::ViewScene::DecodableType data; + cmd = "ViewScene"; // "ViewScene"; + if (DataModel::Decode(ctxt.GetReader(), data) == CHIP_NO_ERROR){ + try { + payload["GroupID"] = to_json(data.groupId); + } catch (std::exception &ex) { + sl_log_warning(LOG_TAG, "Failed to add the command argument value to json format: %s", ex.what()); + } + try { + payload["SceneID"] = to_json(data.sceneId); + } 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::RemoveScene::Id: + { + Commands::RemoveScene::DecodableType data; + cmd = "RemoveScene"; // "RemoveScene"; + if (DataModel::Decode(ctxt.GetReader(), data) == CHIP_NO_ERROR){ + try { + payload["GroupID"] = to_json(data.groupId); + } catch (std::exception &ex) { + sl_log_warning(LOG_TAG, "Failed to add the command argument value to json format: %s", ex.what()); + } + try { + payload["SceneID"] = to_json(data.sceneId); + } 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::RemoveAllScenes::Id: + { + Commands::RemoveAllScenes::DecodableType data; + cmd = "RemoveAllScenes"; // "RemoveAllScenes"; + if (DataModel::Decode(ctxt.GetReader(), data) == CHIP_NO_ERROR){ + try { + payload["GroupID"] = to_json(data.groupId); + } 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::StoreScene::Id: + { + Commands::StoreScene::DecodableType data; + cmd = "StoreScene"; // "StoreScene"; + if (DataModel::Decode(ctxt.GetReader(), data) == CHIP_NO_ERROR){ + try { + payload["GroupID"] = to_json(data.groupId); + } catch (std::exception &ex) { + sl_log_warning(LOG_TAG, "Failed to add the command argument value to json format: %s", ex.what()); + } + try { + payload["SceneID"] = to_json(data.sceneId); + } 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::RecallScene::Id: + { + Commands::RecallScene::DecodableType data; + cmd = "RecallScene"; // "RecallScene"; + if (DataModel::Decode(ctxt.GetReader(), data) == CHIP_NO_ERROR){ + try { + payload["GroupID"] = to_json(data.groupId); + } catch (std::exception &ex) { + sl_log_warning(LOG_TAG, "Failed to add the command argument value to json format: %s", ex.what()); + } + try { + payload["SceneID"] = to_json(data.sceneId); + } catch (std::exception &ex) { + sl_log_warning(LOG_TAG, "Failed to add the command argument value to json format: %s", ex.what()); + } + if( data.transitionTime.HasValue() ) { + try { + payload["TransitionTime"] = to_json(data.transitionTime.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::GetSceneMembership::Id: + { + Commands::GetSceneMembership::DecodableType data; + cmd = "GetSceneMembership"; // "GetSceneMembership"; + if (DataModel::Decode(ctxt.GetReader(), data) == CHIP_NO_ERROR){ + try { + payload["GroupID"] = to_json(data.groupId); + } 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::EnhancedAddScene::Id: + { + Commands::EnhancedAddScene::DecodableType data; + cmd = "EnhancedAddScene"; // "EnhancedAddScene"; + if (DataModel::Decode(ctxt.GetReader(), data) == CHIP_NO_ERROR){ + try { + payload["GroupID"] = to_json(data.groupId); + } catch (std::exception &ex) { + sl_log_warning(LOG_TAG, "Failed to add the command argument value to json format: %s", ex.what()); + } + try { + payload["SceneID"] = to_json(data.sceneId); + } catch (std::exception &ex) { + sl_log_warning(LOG_TAG, "Failed to add the command argument 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()); + } + try { + payload["SceneName"] = to_json(data.sceneName); + } catch (std::exception &ex) { + sl_log_warning(LOG_TAG, "Failed to add the command argument value to json format: %s", ex.what()); + } + try { + payload["ExtensionFieldSets"] = to_json(data.extensionFieldSets); + } 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::EnhancedViewScene::Id: + { + Commands::EnhancedViewScene::DecodableType data; + cmd = "EnhancedViewScene"; // "EnhancedViewScene"; + if (DataModel::Decode(ctxt.GetReader(), data) == CHIP_NO_ERROR){ + try { + payload["GroupID"] = to_json(data.groupId); + } catch (std::exception &ex) { + sl_log_warning(LOG_TAG, "Failed to add the command argument value to json format: %s", ex.what()); + } + try { + payload["SceneID"] = to_json(data.sceneId); + } 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::CopyScene::Id: + { + Commands::CopyScene::DecodableType data; + cmd = "CopyScene"; // "CopyScene"; + if (DataModel::Decode(ctxt.GetReader(), data) == CHIP_NO_ERROR){ + try { + payload["Mode"] = to_json(data.mode); + } catch (std::exception &ex) { + sl_log_warning(LOG_TAG, "Failed to add the command argument value to json format: %s", ex.what()); + } + try { + payload["GroupIdentifierFrom"] = to_json(data.groupIdFrom); + } catch (std::exception &ex) { + sl_log_warning(LOG_TAG, "Failed to add the command argument value to json format: %s", ex.what()); + } + try { + payload["SceneIdentifierFrom"] = to_json(data.sceneIdFrom); + } catch (std::exception &ex) { + sl_log_warning(LOG_TAG, "Failed to add the command argument value to json format: %s", ex.what()); + } + try { + payload["GroupIdentifierTo"] = to_json(data.groupIdTo); + } catch (std::exception &ex) { + sl_log_warning(LOG_TAG, "Failed to add the command argument value to json format: %s", ex.what()); + } + try { + payload["SceneIdentifierTo"] = to_json(data.sceneIdTo); + } 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(); } // On/Off : 6 -void OnOffClusterCommandHandler::InvokeCommand(CommandHandlerInterface::HandlerContext& ctxt) +void OnOffClusterCommandHandler::InvokeCommand( + CommandHandlerInterface::HandlerContext &ctxt) { - using namespace chip::app::Clusters::OnOff; - - 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 = {}; - - if (m_node_state_monitor.emulator().is_command_emulated(ctxt.mRequestPath)) { - m_node_state_monitor.emulator().invoke_command(ctxt); - return; - } - - switch (ctxt.mRequestPath.mCommandId) { - case Commands::Off::Id: { - Commands::Off::DecodableType data; - cmd = "Off"; // "Off"; - if (DataModel::Decode(ctxt.GetReader(), data) == CHIP_NO_ERROR) { - } - } break; - case Commands::On::Id: { - Commands::On::DecodableType data; - cmd = "On"; // "On"; - if (DataModel::Decode(ctxt.GetReader(), data) == CHIP_NO_ERROR) { - } - } break; - case Commands::Toggle::Id: { - Commands::Toggle::DecodableType data; - cmd = "Toggle"; // "Toggle"; - if (DataModel::Decode(ctxt.GetReader(), data) == CHIP_NO_ERROR) { - } - } break; - case Commands::OffWithEffect::Id: { - Commands::OffWithEffect::DecodableType data; - cmd = "OffWithEffect"; // "OffWithEffect"; - if (DataModel::Decode(ctxt.GetReader(), data) == CHIP_NO_ERROR) { - try { - payload["EffectIdentifier"] = to_json(data.effectId); - } catch (std::exception& ex) { - sl_log_warning(LOG_TAG, "Failed to add the command argument value to json format: %s", ex.what()); - } - try { - payload["EffectVariant"] = to_json(data.effectVariant); - } 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::OnWithRecallGlobalScene::Id: { - Commands::OnWithRecallGlobalScene::DecodableType data; - cmd = "OnWithRecallGlobalScene"; // "OnWithRecallGlobalScene"; - if (DataModel::Decode(ctxt.GetReader(), data) == CHIP_NO_ERROR) { - } - } break; - case Commands::OnWithTimedOff::Id: { - Commands::OnWithTimedOff::DecodableType data; - cmd = "OnWithTimedOff"; // "OnWithTimedOff"; - if (DataModel::Decode(ctxt.GetReader(), data) == CHIP_NO_ERROR) { - try { - payload["OnOffControl"] = to_json(data.onOffControl); - } catch (std::exception& ex) { - sl_log_warning(LOG_TAG, "Failed to add the command argument value to json format: %s", ex.what()); - } - try { - payload["OnTime"] = to_json(data.onTime); - } catch (std::exception& ex) { - sl_log_warning(LOG_TAG, "Failed to add the command argument value to json format: %s", ex.what()); - } - try { - payload["OffWaitTime"] = to_json(data.offWaitTime); - } 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(); + using namespace chip::app::Clusters::OnOff; + + 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 = {}; + + if( m_node_state_monitor.emulator().is_command_emulated(ctxt.mRequestPath) ) { + m_node_state_monitor.emulator().invoke_command(ctxt); + return; + } + + switch (ctxt.mRequestPath.mCommandId) { + case Commands::Off::Id: + { + Commands::Off::DecodableType data; + cmd = "Off"; // "Off"; + if (DataModel::Decode(ctxt.GetReader(), data) == CHIP_NO_ERROR){ + } + } + break; + case Commands::On::Id: + { + Commands::On::DecodableType data; + cmd = "On"; // "On"; + if (DataModel::Decode(ctxt.GetReader(), data) == CHIP_NO_ERROR){ + } + } + break; + case Commands::Toggle::Id: + { + Commands::Toggle::DecodableType data; + cmd = "Toggle"; // "Toggle"; + if (DataModel::Decode(ctxt.GetReader(), data) == CHIP_NO_ERROR){ + } + } + break; + case Commands::OffWithEffect::Id: + { + Commands::OffWithEffect::DecodableType data; + cmd = "OffWithEffect"; // "OffWithEffect"; + if (DataModel::Decode(ctxt.GetReader(), data) == CHIP_NO_ERROR){ + try { + payload["EffectIdentifier"] = to_json(data.effectId); + } catch (std::exception &ex) { + sl_log_warning(LOG_TAG, "Failed to add the command argument value to json format: %s", ex.what()); + } + try { + payload["EffectVariant"] = to_json(data.effectVariant); + } 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::OnWithRecallGlobalScene::Id: + { + Commands::OnWithRecallGlobalScene::DecodableType data; + cmd = "OnWithRecallGlobalScene"; // "OnWithRecallGlobalScene"; + if (DataModel::Decode(ctxt.GetReader(), data) == CHIP_NO_ERROR){ + } + } + break; + case Commands::OnWithTimedOff::Id: + { + Commands::OnWithTimedOff::DecodableType data; + cmd = "OnWithTimedOff"; // "OnWithTimedOff"; + if (DataModel::Decode(ctxt.GetReader(), data) == CHIP_NO_ERROR){ + try { + payload["OnOffControl"] = to_json(data.onOffControl); + } catch (std::exception &ex) { + sl_log_warning(LOG_TAG, "Failed to add the command argument value to json format: %s", ex.what()); + } + try { + payload["OnTime"] = to_json(data.onTime); + } catch (std::exception &ex) { + sl_log_warning(LOG_TAG, "Failed to add the command argument value to json format: %s", ex.what()); + } + try { + payload["OffWaitTime"] = to_json(data.offWaitTime); + } 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(); } // Level Control : 8 -void LevelControlClusterCommandHandler::InvokeCommand(CommandHandlerInterface::HandlerContext& ctxt) +void LevelControlClusterCommandHandler::InvokeCommand( + CommandHandlerInterface::HandlerContext &ctxt) { - using namespace chip::app::Clusters::LevelControl; - - 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 = {}; - - if (m_node_state_monitor.emulator().is_command_emulated(ctxt.mRequestPath)) { - m_node_state_monitor.emulator().invoke_command(ctxt); - return; - } - - switch (ctxt.mRequestPath.mCommandId) { - case Commands::MoveToLevel::Id: { - Commands::MoveToLevel::DecodableType data; - cmd = "MoveToLevel"; // "MoveToLevel"; - if (DataModel::Decode(ctxt.GetReader(), data) == CHIP_NO_ERROR) { - try { - payload["Level"] = to_json(data.level); - } catch (std::exception& ex) { - sl_log_warning(LOG_TAG, "Failed to add the command argument 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()); - } - try { - payload["OptionsMask"] = to_json(data.optionsMask); - } catch (std::exception& ex) { - sl_log_warning(LOG_TAG, "Failed to add the command argument value to json format: %s", ex.what()); - } - try { - payload["OptionsOverride"] = to_json(data.optionsOverride); - } 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::Move::Id: { - Commands::Move::DecodableType data; - cmd = "Move"; // "Move"; - if (DataModel::Decode(ctxt.GetReader(), data) == CHIP_NO_ERROR) { - try { - payload["MoveMode"] = to_json(data.moveMode); - } catch (std::exception& ex) { - sl_log_warning(LOG_TAG, "Failed to add the command argument value to json format: %s", ex.what()); - } - try { - payload["Rate"] = to_json(data.rate); - } catch (std::exception& ex) { - sl_log_warning(LOG_TAG, "Failed to add the command argument value to json format: %s", ex.what()); - } - try { - payload["OptionsMask"] = to_json(data.optionsMask); - } catch (std::exception& ex) { - sl_log_warning(LOG_TAG, "Failed to add the command argument value to json format: %s", ex.what()); - } - try { - payload["OptionsOverride"] = to_json(data.optionsOverride); - } 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::Step::Id: { - Commands::Step::DecodableType data; - cmd = "Step"; // "Step"; - if (DataModel::Decode(ctxt.GetReader(), data) == CHIP_NO_ERROR) { - try { - payload["StepMode"] = to_json(data.stepMode); - } catch (std::exception& ex) { - sl_log_warning(LOG_TAG, "Failed to add the command argument value to json format: %s", ex.what()); - } - try { - payload["StepSize"] = to_json(data.stepSize); - } catch (std::exception& ex) { - sl_log_warning(LOG_TAG, "Failed to add the command argument 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()); - } - try { - payload["OptionsMask"] = to_json(data.optionsMask); - } catch (std::exception& ex) { - sl_log_warning(LOG_TAG, "Failed to add the command argument value to json format: %s", ex.what()); - } - try { - payload["OptionsOverride"] = to_json(data.optionsOverride); - } 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::Stop::Id: { - Commands::Stop::DecodableType data; - cmd = "Stop"; // "Stop"; - if (DataModel::Decode(ctxt.GetReader(), data) == CHIP_NO_ERROR) { - try { - payload["OptionsMask"] = to_json(data.optionsMask); - } catch (std::exception& ex) { - sl_log_warning(LOG_TAG, "Failed to add the command argument value to json format: %s", ex.what()); - } - try { - payload["OptionsOverride"] = to_json(data.optionsOverride); - } 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::MoveToLevelWithOnOff::Id: { - Commands::MoveToLevelWithOnOff::DecodableType data; - cmd = "MoveToLevelWithOnOff"; // "MoveToLevelWithOnOff"; - if (DataModel::Decode(ctxt.GetReader(), data) == CHIP_NO_ERROR) { - try { - payload["Level"] = to_json(data.level); - } catch (std::exception& ex) { - sl_log_warning(LOG_TAG, "Failed to add the command argument 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()); - } - try { - payload["OptionsMask"] = to_json(data.optionsMask); - } catch (std::exception& ex) { - sl_log_warning(LOG_TAG, "Failed to add the command argument value to json format: %s", ex.what()); - } - try { - payload["OptionsOverride"] = to_json(data.optionsOverride); - } 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::MoveWithOnOff::Id: { - Commands::MoveWithOnOff::DecodableType data; - cmd = "MoveWithOnOff"; // "MoveWithOnOff"; - if (DataModel::Decode(ctxt.GetReader(), data) == CHIP_NO_ERROR) { - try { - payload["MoveMode"] = to_json(data.moveMode); - } catch (std::exception& ex) { - sl_log_warning(LOG_TAG, "Failed to add the command argument value to json format: %s", ex.what()); - } - try { - payload["Rate"] = to_json(data.rate); - } catch (std::exception& ex) { - sl_log_warning(LOG_TAG, "Failed to add the command argument value to json format: %s", ex.what()); - } - try { - payload["OptionsMask"] = to_json(data.optionsMask); - } catch (std::exception& ex) { - sl_log_warning(LOG_TAG, "Failed to add the command argument value to json format: %s", ex.what()); - } - try { - payload["OptionsOverride"] = to_json(data.optionsOverride); - } 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::StepWithOnOff::Id: { - Commands::StepWithOnOff::DecodableType data; - cmd = "StepWithOnOff"; // "StepWithOnOff"; - if (DataModel::Decode(ctxt.GetReader(), data) == CHIP_NO_ERROR) { - try { - payload["StepMode"] = to_json(data.stepMode); - } catch (std::exception& ex) { - sl_log_warning(LOG_TAG, "Failed to add the command argument value to json format: %s", ex.what()); - } - try { - payload["StepSize"] = to_json(data.stepSize); - } catch (std::exception& ex) { - sl_log_warning(LOG_TAG, "Failed to add the command argument 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()); - } - try { - payload["OptionsMask"] = to_json(data.optionsMask); - } catch (std::exception& ex) { - sl_log_warning(LOG_TAG, "Failed to add the command argument value to json format: %s", ex.what()); - } - try { - payload["OptionsOverride"] = to_json(data.optionsOverride); - } 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::StopWithOnOff::Id: { - Commands::StopWithOnOff::DecodableType data; - cmd = "StopWithOnOff"; // "StopWithOnOff"; - if (DataModel::Decode(ctxt.GetReader(), data) == CHIP_NO_ERROR) { - try { - payload["OptionsMask"] = to_json(data.optionsMask); - } catch (std::exception& ex) { - sl_log_warning(LOG_TAG, "Failed to add the command argument value to json format: %s", ex.what()); - } - try { - payload["OptionsOverride"] = to_json(data.optionsOverride); - } 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::MoveToClosestFrequency::Id: { - Commands::MoveToClosestFrequency::DecodableType data; - cmd = "MoveToClosestFrequency"; // "MoveToClosestFrequency"; - if (DataModel::Decode(ctxt.GetReader(), data) == CHIP_NO_ERROR) { - try { - payload["Frequency"] = to_json(data.frequency); - } 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(); + using namespace chip::app::Clusters::LevelControl; + + 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 = {}; + + if( m_node_state_monitor.emulator().is_command_emulated(ctxt.mRequestPath) ) { + m_node_state_monitor.emulator().invoke_command(ctxt); + return; + } + + switch (ctxt.mRequestPath.mCommandId) { + case Commands::MoveToLevel::Id: + { + Commands::MoveToLevel::DecodableType data; + cmd = "MoveToLevel"; // "MoveToLevel"; + if (DataModel::Decode(ctxt.GetReader(), data) == CHIP_NO_ERROR){ + try { + payload["Level"] = to_json(data.level); + } catch (std::exception &ex) { + sl_log_warning(LOG_TAG, "Failed to add the command argument 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()); + } + try { + payload["OptionsMask"] = to_json(data.optionsMask); + } catch (std::exception &ex) { + sl_log_warning(LOG_TAG, "Failed to add the command argument value to json format: %s", ex.what()); + } + try { + payload["OptionsOverride"] = to_json(data.optionsOverride); + } 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::Move::Id: + { + Commands::Move::DecodableType data; + cmd = "Move"; // "Move"; + if (DataModel::Decode(ctxt.GetReader(), data) == CHIP_NO_ERROR){ + try { + payload["MoveMode"] = to_json(data.moveMode); + } catch (std::exception &ex) { + sl_log_warning(LOG_TAG, "Failed to add the command argument value to json format: %s", ex.what()); + } + try { + payload["Rate"] = to_json(data.rate); + } catch (std::exception &ex) { + sl_log_warning(LOG_TAG, "Failed to add the command argument value to json format: %s", ex.what()); + } + try { + payload["OptionsMask"] = to_json(data.optionsMask); + } catch (std::exception &ex) { + sl_log_warning(LOG_TAG, "Failed to add the command argument value to json format: %s", ex.what()); + } + try { + payload["OptionsOverride"] = to_json(data.optionsOverride); + } 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::Step::Id: + { + Commands::Step::DecodableType data; + cmd = "Step"; // "Step"; + if (DataModel::Decode(ctxt.GetReader(), data) == CHIP_NO_ERROR){ + try { + payload["StepMode"] = to_json(data.stepMode); + } catch (std::exception &ex) { + sl_log_warning(LOG_TAG, "Failed to add the command argument value to json format: %s", ex.what()); + } + try { + payload["StepSize"] = to_json(data.stepSize); + } catch (std::exception &ex) { + sl_log_warning(LOG_TAG, "Failed to add the command argument 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()); + } + try { + payload["OptionsMask"] = to_json(data.optionsMask); + } catch (std::exception &ex) { + sl_log_warning(LOG_TAG, "Failed to add the command argument value to json format: %s", ex.what()); + } + try { + payload["OptionsOverride"] = to_json(data.optionsOverride); + } 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::Stop::Id: + { + Commands::Stop::DecodableType data; + cmd = "Stop"; // "Stop"; + if (DataModel::Decode(ctxt.GetReader(), data) == CHIP_NO_ERROR){ + try { + payload["OptionsMask"] = to_json(data.optionsMask); + } catch (std::exception &ex) { + sl_log_warning(LOG_TAG, "Failed to add the command argument value to json format: %s", ex.what()); + } + try { + payload["OptionsOverride"] = to_json(data.optionsOverride); + } 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::MoveToLevelWithOnOff::Id: + { + Commands::MoveToLevelWithOnOff::DecodableType data; + cmd = "MoveToLevelWithOnOff"; // "MoveToLevelWithOnOff"; + if (DataModel::Decode(ctxt.GetReader(), data) == CHIP_NO_ERROR){ + try { + payload["Level"] = to_json(data.level); + } catch (std::exception &ex) { + sl_log_warning(LOG_TAG, "Failed to add the command argument 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()); + } + try { + payload["OptionsMask"] = to_json(data.optionsMask); + } catch (std::exception &ex) { + sl_log_warning(LOG_TAG, "Failed to add the command argument value to json format: %s", ex.what()); + } + try { + payload["OptionsOverride"] = to_json(data.optionsOverride); + } 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::MoveWithOnOff::Id: + { + Commands::MoveWithOnOff::DecodableType data; + cmd = "MoveWithOnOff"; // "MoveWithOnOff"; + if (DataModel::Decode(ctxt.GetReader(), data) == CHIP_NO_ERROR){ + try { + payload["MoveMode"] = to_json(data.moveMode); + } catch (std::exception &ex) { + sl_log_warning(LOG_TAG, "Failed to add the command argument value to json format: %s", ex.what()); + } + try { + payload["Rate"] = to_json(data.rate); + } catch (std::exception &ex) { + sl_log_warning(LOG_TAG, "Failed to add the command argument value to json format: %s", ex.what()); + } + try { + payload["OptionsMask"] = to_json(data.optionsMask); + } catch (std::exception &ex) { + sl_log_warning(LOG_TAG, "Failed to add the command argument value to json format: %s", ex.what()); + } + try { + payload["OptionsOverride"] = to_json(data.optionsOverride); + } 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::StepWithOnOff::Id: + { + Commands::StepWithOnOff::DecodableType data; + cmd = "StepWithOnOff"; // "StepWithOnOff"; + if (DataModel::Decode(ctxt.GetReader(), data) == CHIP_NO_ERROR){ + try { + payload["StepMode"] = to_json(data.stepMode); + } catch (std::exception &ex) { + sl_log_warning(LOG_TAG, "Failed to add the command argument value to json format: %s", ex.what()); + } + try { + payload["StepSize"] = to_json(data.stepSize); + } catch (std::exception &ex) { + sl_log_warning(LOG_TAG, "Failed to add the command argument 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()); + } + try { + payload["OptionsMask"] = to_json(data.optionsMask); + } catch (std::exception &ex) { + sl_log_warning(LOG_TAG, "Failed to add the command argument value to json format: %s", ex.what()); + } + try { + payload["OptionsOverride"] = to_json(data.optionsOverride); + } 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::StopWithOnOff::Id: + { + Commands::StopWithOnOff::DecodableType data; + cmd = "StopWithOnOff"; // "StopWithOnOff"; + if (DataModel::Decode(ctxt.GetReader(), data) == CHIP_NO_ERROR){ + try { + payload["OptionsMask"] = to_json(data.optionsMask); + } catch (std::exception &ex) { + sl_log_warning(LOG_TAG, "Failed to add the command argument value to json format: %s", ex.what()); + } + try { + payload["OptionsOverride"] = to_json(data.optionsOverride); + } 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::MoveToClosestFrequency::Id: + { + Commands::MoveToClosestFrequency::DecodableType data; + cmd = "MoveToClosestFrequency"; // "MoveToClosestFrequency"; + if (DataModel::Decode(ctxt.GetReader(), data) == CHIP_NO_ERROR){ + try { + payload["Frequency"] = to_json(data.frequency); + } 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(); } // Door Lock : 257 -void DoorLockClusterCommandHandler::InvokeCommand(CommandHandlerInterface::HandlerContext& ctxt) +void DoorLockClusterCommandHandler::InvokeCommand( + CommandHandlerInterface::HandlerContext &ctxt) { - using namespace chip::app::Clusters::DoorLock; - - 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 = {}; - - if (m_node_state_monitor.emulator().is_command_emulated(ctxt.mRequestPath)) { - m_node_state_monitor.emulator().invoke_command(ctxt); - return; - } - - switch (ctxt.mRequestPath.mCommandId) { - case Commands::LockDoor::Id: { - Commands::LockDoor::DecodableType data; - cmd = "LockDoor"; // "LockDoor"; - if (DataModel::Decode(ctxt.GetReader(), data) == CHIP_NO_ERROR) { - if (data.pinCode.HasValue()) { - try { - payload["PINOrRFIDCode"] = to_json(data.pinCode.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::UnlockDoor::Id: { - Commands::UnlockDoor::DecodableType data; - cmd = "UnlockDoor"; // "UnlockDoor"; - if (DataModel::Decode(ctxt.GetReader(), data) == CHIP_NO_ERROR) { - if (data.pinCode.HasValue()) { - try { - payload["PINOrRFIDCode"] = to_json(data.pinCode.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::UnlockWithTimeout::Id: { - Commands::UnlockWithTimeout::DecodableType data; - cmd = "UnlockWithTimeout"; // "UnlockWithTimeout"; - if (DataModel::Decode(ctxt.GetReader(), data) == CHIP_NO_ERROR) { - try { - payload["TimeoutInSeconds"] = to_json(data.timeout); - } catch (std::exception& ex) { - sl_log_warning(LOG_TAG, "Failed to add the command argument value to json format: %s", ex.what()); - } - if (data.pinCode.HasValue()) { - try { - payload["PINOrRFIDCode"] = to_json(data.pinCode.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::SetWeekDaySchedule::Id: { - Commands::SetWeekDaySchedule::DecodableType data; - cmd = "SetWeekdaySchedule"; // "SetWeekDaySchedule"; - if (DataModel::Decode(ctxt.GetReader(), data) == CHIP_NO_ERROR) { - try { - payload["ScheduleID"] = to_json(data.weekDayIndex); - } catch (std::exception& ex) { - sl_log_warning(LOG_TAG, "Failed to add the command argument value to json format: %s", ex.what()); - } - try { - payload["UserID"] = to_json(data.userIndex); - } catch (std::exception& ex) { - sl_log_warning(LOG_TAG, "Failed to add the command argument value to json format: %s", ex.what()); - } - try { - payload["DaysMask"] = to_json(data.daysMask); - } catch (std::exception& ex) { - sl_log_warning(LOG_TAG, "Failed to add the command argument value to json format: %s", ex.what()); - } - try { - payload["StartHour"] = to_json(data.startHour); - } catch (std::exception& ex) { - sl_log_warning(LOG_TAG, "Failed to add the command argument value to json format: %s", ex.what()); - } - try { - payload["StartMinute"] = to_json(data.startMinute); - } catch (std::exception& ex) { - sl_log_warning(LOG_TAG, "Failed to add the command argument value to json format: %s", ex.what()); - } - try { - payload["EndHour"] = to_json(data.endHour); - } catch (std::exception& ex) { - sl_log_warning(LOG_TAG, "Failed to add the command argument value to json format: %s", ex.what()); - } - try { - payload["EndMinute"] = to_json(data.endMinute); - } 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::GetWeekDaySchedule::Id: { - Commands::GetWeekDaySchedule::DecodableType data; - cmd = "GetWeekdaySchedule"; // "GetWeekDaySchedule"; - if (DataModel::Decode(ctxt.GetReader(), data) == CHIP_NO_ERROR) { - try { - payload["ScheduleID"] = to_json(data.weekDayIndex); - } catch (std::exception& ex) { - sl_log_warning(LOG_TAG, "Failed to add the command argument value to json format: %s", ex.what()); - } - try { - payload["UserID"] = to_json(data.userIndex); - } 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::ClearWeekDaySchedule::Id: { - Commands::ClearWeekDaySchedule::DecodableType data; - cmd = "ClearWeekdaySchedule"; // "ClearWeekDaySchedule"; - if (DataModel::Decode(ctxt.GetReader(), data) == CHIP_NO_ERROR) { - try { - payload["ScheduleID"] = to_json(data.weekDayIndex); - } catch (std::exception& ex) { - sl_log_warning(LOG_TAG, "Failed to add the command argument value to json format: %s", ex.what()); - } - try { - payload["UserID"] = to_json(data.userIndex); - } 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::SetYearDaySchedule::Id: { - Commands::SetYearDaySchedule::DecodableType data; - cmd = "SetYearDaySchedule"; // "SetYearDaySchedule"; - if (DataModel::Decode(ctxt.GetReader(), data) == CHIP_NO_ERROR) { - try { - payload["ScheduleID"] = to_json(data.yearDayIndex); - } catch (std::exception& ex) { - sl_log_warning(LOG_TAG, "Failed to add the command argument value to json format: %s", ex.what()); - } - try { - payload["UserID"] = to_json(data.userIndex); - } catch (std::exception& ex) { - sl_log_warning(LOG_TAG, "Failed to add the command argument value to json format: %s", ex.what()); - } - try { - payload["LocalStartTime"] = to_json(data.localStartTime); - } catch (std::exception& ex) { - sl_log_warning(LOG_TAG, "Failed to add the command argument value to json format: %s", ex.what()); - } - try { - payload["LocalEndTime"] = to_json(data.localEndTime); - } 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::GetYearDaySchedule::Id: { - Commands::GetYearDaySchedule::DecodableType data; - cmd = "GetYearDaySchedule"; // "GetYearDaySchedule"; - if (DataModel::Decode(ctxt.GetReader(), data) == CHIP_NO_ERROR) { - try { - payload["ScheduleID"] = to_json(data.yearDayIndex); - } catch (std::exception& ex) { - sl_log_warning(LOG_TAG, "Failed to add the command argument value to json format: %s", ex.what()); - } - try { - payload["UserID"] = to_json(data.userIndex); - } 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::ClearYearDaySchedule::Id: { - Commands::ClearYearDaySchedule::DecodableType data; - cmd = "ClearYearDaySchedule"; // "ClearYearDaySchedule"; - if (DataModel::Decode(ctxt.GetReader(), data) == CHIP_NO_ERROR) { - try { - payload["ScheduleID"] = to_json(data.yearDayIndex); - } catch (std::exception& ex) { - sl_log_warning(LOG_TAG, "Failed to add the command argument value to json format: %s", ex.what()); - } - try { - payload["UserID"] = to_json(data.userIndex); - } 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::SetHolidaySchedule::Id: { - Commands::SetHolidaySchedule::DecodableType data; - cmd = "SetHolidaySchedule"; // "SetHolidaySchedule"; - if (DataModel::Decode(ctxt.GetReader(), data) == CHIP_NO_ERROR) { - try { - payload["HolidayScheduleID"] = to_json(data.holidayIndex); - } catch (std::exception& ex) { - sl_log_warning(LOG_TAG, "Failed to add the command argument value to json format: %s", ex.what()); - } - try { - payload["LocalStartTime"] = to_json(data.localStartTime); - } catch (std::exception& ex) { - sl_log_warning(LOG_TAG, "Failed to add the command argument value to json format: %s", ex.what()); - } - try { - payload["LocalEndTime"] = to_json(data.localEndTime); - } catch (std::exception& ex) { - sl_log_warning(LOG_TAG, "Failed to add the command argument value to json format: %s", ex.what()); - } - try { - payload["OperatingModeDuringHoliday"] = to_json(data.operatingMode); - } 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::GetHolidaySchedule::Id: { - Commands::GetHolidaySchedule::DecodableType data; - cmd = "GetHolidaySchedule"; // "GetHolidaySchedule"; - if (DataModel::Decode(ctxt.GetReader(), data) == CHIP_NO_ERROR) { - try { - payload["HolidayScheduleID"] = to_json(data.holidayIndex); - } 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::ClearHolidaySchedule::Id: { - Commands::ClearHolidaySchedule::DecodableType data; - cmd = "ClearHolidaySchedule"; // "ClearHolidaySchedule"; - if (DataModel::Decode(ctxt.GetReader(), data) == CHIP_NO_ERROR) { - try { - payload["HolidayScheduleID"] = to_json(data.holidayIndex); - } 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::SetUser::Id: { - Commands::SetUser::DecodableType data; - if (DataModel::Decode(ctxt.GetReader(), data) == CHIP_NO_ERROR) { - Invoke_SetUser(ctxt, data); - } - } break; - case Commands::GetUser::Id: { - Commands::GetUser::DecodableType data; - if (DataModel::Decode(ctxt.GetReader(), data) == CHIP_NO_ERROR) { - Invoke_GetUser(ctxt, data); - } - } break; - case Commands::ClearUser::Id: { - Commands::ClearUser::DecodableType data; - if (DataModel::Decode(ctxt.GetReader(), data) == CHIP_NO_ERROR) { - Invoke_ClearUser(ctxt, data); - } - } break; - case Commands::SetCredential::Id: { - Commands::SetCredential::DecodableType data; - if (DataModel::Decode(ctxt.GetReader(), data) == CHIP_NO_ERROR) { - Invoke_SetCredential(ctxt, data); - } - } break; - case Commands::GetCredentialStatus::Id: { - Commands::GetCredentialStatus::DecodableType data; - if (DataModel::Decode(ctxt.GetReader(), data) == CHIP_NO_ERROR) { - Invoke_GetCredentialStatus(ctxt, data); - } - } break; - case Commands::ClearCredential::Id: { - Commands::ClearCredential::DecodableType data; - if (DataModel::Decode(ctxt.GetReader(), data) == CHIP_NO_ERROR) { - Invoke_ClearCredential(ctxt, data); - } - } 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(); + using namespace chip::app::Clusters::DoorLock; + + 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 = {}; + + if( m_node_state_monitor.emulator().is_command_emulated(ctxt.mRequestPath) ) { + m_node_state_monitor.emulator().invoke_command(ctxt); + return; + } + + switch (ctxt.mRequestPath.mCommandId) { + case Commands::LockDoor::Id: + { + Commands::LockDoor::DecodableType data; + cmd = "LockDoor"; // "LockDoor"; + if (DataModel::Decode(ctxt.GetReader(), data) == CHIP_NO_ERROR){ + if( data.pinCode.HasValue() ) { + try { + payload["PINOrRFIDCode"] = to_json(data.pinCode.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::UnlockDoor::Id: + { + Commands::UnlockDoor::DecodableType data; + cmd = "UnlockDoor"; // "UnlockDoor"; + if (DataModel::Decode(ctxt.GetReader(), data) == CHIP_NO_ERROR){ + if( data.pinCode.HasValue() ) { + try { + payload["PINOrRFIDCode"] = to_json(data.pinCode.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::UnlockWithTimeout::Id: + { + Commands::UnlockWithTimeout::DecodableType data; + cmd = "UnlockWithTimeout"; // "UnlockWithTimeout"; + if (DataModel::Decode(ctxt.GetReader(), data) == CHIP_NO_ERROR){ + try { + payload["TimeoutInSeconds"] = to_json(data.timeout); + } catch (std::exception &ex) { + sl_log_warning(LOG_TAG, "Failed to add the command argument value to json format: %s", ex.what()); + } + if( data.pinCode.HasValue() ) { + try { + payload["PINOrRFIDCode"] = to_json(data.pinCode.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::SetWeekDaySchedule::Id: + { + Commands::SetWeekDaySchedule::DecodableType data; + cmd = "SetWeekdaySchedule"; // "SetWeekDaySchedule"; + if (DataModel::Decode(ctxt.GetReader(), data) == CHIP_NO_ERROR){ + try { + payload["ScheduleID"] = to_json(data.weekDayIndex); + } catch (std::exception &ex) { + sl_log_warning(LOG_TAG, "Failed to add the command argument value to json format: %s", ex.what()); + } + try { + payload["UserID"] = to_json(data.userIndex); + } catch (std::exception &ex) { + sl_log_warning(LOG_TAG, "Failed to add the command argument value to json format: %s", ex.what()); + } + try { + payload["DaysMask"] = to_json(data.daysMask); + } catch (std::exception &ex) { + sl_log_warning(LOG_TAG, "Failed to add the command argument value to json format: %s", ex.what()); + } + try { + payload["StartHour"] = to_json(data.startHour); + } catch (std::exception &ex) { + sl_log_warning(LOG_TAG, "Failed to add the command argument value to json format: %s", ex.what()); + } + try { + payload["StartMinute"] = to_json(data.startMinute); + } catch (std::exception &ex) { + sl_log_warning(LOG_TAG, "Failed to add the command argument value to json format: %s", ex.what()); + } + try { + payload["EndHour"] = to_json(data.endHour); + } catch (std::exception &ex) { + sl_log_warning(LOG_TAG, "Failed to add the command argument value to json format: %s", ex.what()); + } + try { + payload["EndMinute"] = to_json(data.endMinute); + } 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::GetWeekDaySchedule::Id: + { + Commands::GetWeekDaySchedule::DecodableType data; + cmd = "GetWeekdaySchedule"; // "GetWeekDaySchedule"; + if (DataModel::Decode(ctxt.GetReader(), data) == CHIP_NO_ERROR){ + try { + payload["ScheduleID"] = to_json(data.weekDayIndex); + } catch (std::exception &ex) { + sl_log_warning(LOG_TAG, "Failed to add the command argument value to json format: %s", ex.what()); + } + try { + payload["UserID"] = to_json(data.userIndex); + } 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::ClearWeekDaySchedule::Id: + { + Commands::ClearWeekDaySchedule::DecodableType data; + cmd = "ClearWeekdaySchedule"; // "ClearWeekDaySchedule"; + if (DataModel::Decode(ctxt.GetReader(), data) == CHIP_NO_ERROR){ + try { + payload["ScheduleID"] = to_json(data.weekDayIndex); + } catch (std::exception &ex) { + sl_log_warning(LOG_TAG, "Failed to add the command argument value to json format: %s", ex.what()); + } + try { + payload["UserID"] = to_json(data.userIndex); + } 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::SetYearDaySchedule::Id: + { + Commands::SetYearDaySchedule::DecodableType data; + cmd = "SetYearDaySchedule"; // "SetYearDaySchedule"; + if (DataModel::Decode(ctxt.GetReader(), data) == CHIP_NO_ERROR){ + try { + payload["ScheduleID"] = to_json(data.yearDayIndex); + } catch (std::exception &ex) { + sl_log_warning(LOG_TAG, "Failed to add the command argument value to json format: %s", ex.what()); + } + try { + payload["UserID"] = to_json(data.userIndex); + } catch (std::exception &ex) { + sl_log_warning(LOG_TAG, "Failed to add the command argument value to json format: %s", ex.what()); + } + try { + payload["LocalStartTime"] = to_json(data.localStartTime); + } catch (std::exception &ex) { + sl_log_warning(LOG_TAG, "Failed to add the command argument value to json format: %s", ex.what()); + } + try { + payload["LocalEndTime"] = to_json(data.localEndTime); + } 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::GetYearDaySchedule::Id: + { + Commands::GetYearDaySchedule::DecodableType data; + cmd = "GetYearDaySchedule"; // "GetYearDaySchedule"; + if (DataModel::Decode(ctxt.GetReader(), data) == CHIP_NO_ERROR){ + try { + payload["ScheduleID"] = to_json(data.yearDayIndex); + } catch (std::exception &ex) { + sl_log_warning(LOG_TAG, "Failed to add the command argument value to json format: %s", ex.what()); + } + try { + payload["UserID"] = to_json(data.userIndex); + } 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::ClearYearDaySchedule::Id: + { + Commands::ClearYearDaySchedule::DecodableType data; + cmd = "ClearYearDaySchedule"; // "ClearYearDaySchedule"; + if (DataModel::Decode(ctxt.GetReader(), data) == CHIP_NO_ERROR){ + try { + payload["ScheduleID"] = to_json(data.yearDayIndex); + } catch (std::exception &ex) { + sl_log_warning(LOG_TAG, "Failed to add the command argument value to json format: %s", ex.what()); + } + try { + payload["UserID"] = to_json(data.userIndex); + } 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::SetHolidaySchedule::Id: + { + Commands::SetHolidaySchedule::DecodableType data; + cmd = "SetHolidaySchedule"; // "SetHolidaySchedule"; + if (DataModel::Decode(ctxt.GetReader(), data) == CHIP_NO_ERROR){ + try { + payload["HolidayScheduleID"] = to_json(data.holidayIndex); + } catch (std::exception &ex) { + sl_log_warning(LOG_TAG, "Failed to add the command argument value to json format: %s", ex.what()); + } + try { + payload["LocalStartTime"] = to_json(data.localStartTime); + } catch (std::exception &ex) { + sl_log_warning(LOG_TAG, "Failed to add the command argument value to json format: %s", ex.what()); + } + try { + payload["LocalEndTime"] = to_json(data.localEndTime); + } catch (std::exception &ex) { + sl_log_warning(LOG_TAG, "Failed to add the command argument value to json format: %s", ex.what()); + } + try { + payload["OperatingModeDuringHoliday"] = to_json(data.operatingMode); + } 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::GetHolidaySchedule::Id: + { + Commands::GetHolidaySchedule::DecodableType data; + cmd = "GetHolidaySchedule"; // "GetHolidaySchedule"; + if (DataModel::Decode(ctxt.GetReader(), data) == CHIP_NO_ERROR){ + try { + payload["HolidayScheduleID"] = to_json(data.holidayIndex); + } 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::ClearHolidaySchedule::Id: + { + Commands::ClearHolidaySchedule::DecodableType data; + cmd = "ClearHolidaySchedule"; // "ClearHolidaySchedule"; + if (DataModel::Decode(ctxt.GetReader(), data) == CHIP_NO_ERROR){ + try { + payload["HolidayScheduleID"] = to_json(data.holidayIndex); + } 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::SetUser::Id: + { + Commands::SetUser::DecodableType data; + if (DataModel::Decode(ctxt.GetReader(), data) == CHIP_NO_ERROR){ + Invoke_SetUser(ctxt,data); + } + } + break; + case Commands::GetUser::Id: + { + Commands::GetUser::DecodableType data; + if (DataModel::Decode(ctxt.GetReader(), data) == CHIP_NO_ERROR){ + Invoke_GetUser(ctxt,data); + } + } + break; + case Commands::ClearUser::Id: + { + Commands::ClearUser::DecodableType data; + if (DataModel::Decode(ctxt.GetReader(), data) == CHIP_NO_ERROR){ + Invoke_ClearUser(ctxt,data); + } + } + break; + case Commands::SetCredential::Id: + { + Commands::SetCredential::DecodableType data; + if (DataModel::Decode(ctxt.GetReader(), data) == CHIP_NO_ERROR){ + Invoke_SetCredential(ctxt,data); + } + } + break; + case Commands::GetCredentialStatus::Id: + { + Commands::GetCredentialStatus::DecodableType data; + if (DataModel::Decode(ctxt.GetReader(), data) == CHIP_NO_ERROR){ + Invoke_GetCredentialStatus(ctxt,data); + } + } + break; + case Commands::ClearCredential::Id: + { + Commands::ClearCredential::DecodableType data; + if (DataModel::Decode(ctxt.GetReader(), data) == CHIP_NO_ERROR){ + Invoke_ClearCredential(ctxt,data); + } + } + 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(); } // Barrier Control : 259 -void BarrierControlClusterCommandHandler::InvokeCommand(CommandHandlerInterface::HandlerContext& ctxt) +void BarrierControlClusterCommandHandler::InvokeCommand( + CommandHandlerInterface::HandlerContext &ctxt) { - using namespace chip::app::Clusters::BarrierControl; - - 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 = {}; - - if (m_node_state_monitor.emulator().is_command_emulated(ctxt.mRequestPath)) { - m_node_state_monitor.emulator().invoke_command(ctxt); - return; - } - - switch (ctxt.mRequestPath.mCommandId) { - case Commands::BarrierControlGoToPercent::Id: { - Commands::BarrierControlGoToPercent::DecodableType data; - cmd = "GoToPercent"; // "BarrierControlGoToPercent"; - if (DataModel::Decode(ctxt.GetReader(), data) == CHIP_NO_ERROR) { - try { - payload["PercentOpen"] = to_json(data.percentOpen); - } 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::BarrierControlStop::Id: { - Commands::BarrierControlStop::DecodableType data; - cmd = "Stop"; // "BarrierControlStop"; - 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(); + using namespace chip::app::Clusters::BarrierControl; + + 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 = {}; + + if( m_node_state_monitor.emulator().is_command_emulated(ctxt.mRequestPath) ) { + m_node_state_monitor.emulator().invoke_command(ctxt); + return; + } + + switch (ctxt.mRequestPath.mCommandId) { + case Commands::BarrierControlGoToPercent::Id: + { + Commands::BarrierControlGoToPercent::DecodableType data; + cmd = "GoToPercent"; // "BarrierControlGoToPercent"; + if (DataModel::Decode(ctxt.GetReader(), data) == CHIP_NO_ERROR){ + try { + payload["PercentOpen"] = to_json(data.percentOpen); + } 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::BarrierControlStop::Id: + { + Commands::BarrierControlStop::DecodableType data; + cmd = "Stop"; // "BarrierControlStop"; + 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(); } // Thermostat : 513 -void ThermostatClusterCommandHandler::InvokeCommand(CommandHandlerInterface::HandlerContext& ctxt) +void ThermostatClusterCommandHandler::InvokeCommand( + CommandHandlerInterface::HandlerContext &ctxt) { - using namespace chip::app::Clusters::Thermostat; - - 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 = {}; - - if (m_node_state_monitor.emulator().is_command_emulated(ctxt.mRequestPath)) { - m_node_state_monitor.emulator().invoke_command(ctxt); - return; - } - - switch (ctxt.mRequestPath.mCommandId) { - case Commands::SetpointRaiseLower::Id: { - Commands::SetpointRaiseLower::DecodableType data; - cmd = "SetpointRaiseOrLower"; // "SetpointRaiseLower"; - if (DataModel::Decode(ctxt.GetReader(), data) == CHIP_NO_ERROR) { - try { - payload["Mode"] = to_json(data.mode); - } catch (std::exception& ex) { - sl_log_warning(LOG_TAG, "Failed to add the command argument value to json format: %s", ex.what()); - } - try { - payload["Amount"] = to_json(data.amount); - } 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::SetWeeklySchedule::Id: { - Commands::SetWeeklySchedule::DecodableType data; - cmd = "SetWeeklySchedule"; // "SetWeeklySchedule"; - if (DataModel::Decode(ctxt.GetReader(), data) == CHIP_NO_ERROR) { - try { - payload["NumberOfTransitions"] = to_json(data.numberOfTransitionsForSequence); - } catch (std::exception& ex) { - sl_log_warning(LOG_TAG, "Failed to add the command argument value to json format: %s", ex.what()); - } - try { - payload["DayOfWeek"] = to_json(data.dayOfWeekForSequence); - } catch (std::exception& ex) { - sl_log_warning(LOG_TAG, "Failed to add the command argument value to json format: %s", ex.what()); - } - try { - payload["Mode"] = to_json(data.modeForSequence); - } catch (std::exception& ex) { - sl_log_warning(LOG_TAG, "Failed to add the command argument value to json format: %s", ex.what()); - } - try { - payload["Transitions"] = to_json(data.transitions); - } 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::GetWeeklySchedule::Id: { - Commands::GetWeeklySchedule::DecodableType data; - cmd = "GetWeeklySchedule"; // "GetWeeklySchedule"; - if (DataModel::Decode(ctxt.GetReader(), data) == CHIP_NO_ERROR) { - try { - payload["DaysToReturn"] = to_json(data.daysToReturn); - } catch (std::exception& ex) { - sl_log_warning(LOG_TAG, "Failed to add the command argument value to json format: %s", ex.what()); - } - try { - payload["ModeToReturn"] = to_json(data.modeToReturn); - } 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::ClearWeeklySchedule::Id: { - Commands::ClearWeeklySchedule::DecodableType data; - cmd = "ClearWeeklySchedule"; // "ClearWeeklySchedule"; - 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(); + using namespace chip::app::Clusters::Thermostat; + + 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 = {}; + + if( m_node_state_monitor.emulator().is_command_emulated(ctxt.mRequestPath) ) { + m_node_state_monitor.emulator().invoke_command(ctxt); + return; + } + + switch (ctxt.mRequestPath.mCommandId) { + case Commands::SetpointRaiseLower::Id: + { + Commands::SetpointRaiseLower::DecodableType data; + cmd = "SetpointRaiseOrLower"; // "SetpointRaiseLower"; + if (DataModel::Decode(ctxt.GetReader(), data) == CHIP_NO_ERROR){ + try { + payload["Mode"] = to_json(data.mode); + } catch (std::exception &ex) { + sl_log_warning(LOG_TAG, "Failed to add the command argument value to json format: %s", ex.what()); + } + try { + payload["Amount"] = to_json(data.amount); + } 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::SetWeeklySchedule::Id: + { + Commands::SetWeeklySchedule::DecodableType data; + cmd = "SetWeeklySchedule"; // "SetWeeklySchedule"; + if (DataModel::Decode(ctxt.GetReader(), data) == CHIP_NO_ERROR){ + try { + payload["NumberOfTransitions"] = to_json(data.numberOfTransitionsForSequence); + } catch (std::exception &ex) { + sl_log_warning(LOG_TAG, "Failed to add the command argument value to json format: %s", ex.what()); + } + try { + payload["DayOfWeek"] = to_json(data.dayOfWeekForSequence); + } catch (std::exception &ex) { + sl_log_warning(LOG_TAG, "Failed to add the command argument value to json format: %s", ex.what()); + } + try { + payload["Mode"] = to_json(data.modeForSequence); + } catch (std::exception &ex) { + sl_log_warning(LOG_TAG, "Failed to add the command argument value to json format: %s", ex.what()); + } + try { + payload["Transitions"] = to_json(data.transitions); + } 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::GetWeeklySchedule::Id: + { + Commands::GetWeeklySchedule::DecodableType data; + cmd = "GetWeeklySchedule"; // "GetWeeklySchedule"; + if (DataModel::Decode(ctxt.GetReader(), data) == CHIP_NO_ERROR){ + try { + payload["DaysToReturn"] = to_json(data.daysToReturn); + } catch (std::exception &ex) { + sl_log_warning(LOG_TAG, "Failed to add the command argument value to json format: %s", ex.what()); + } + try { + payload["ModeToReturn"] = to_json(data.modeToReturn); + } 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::ClearWeeklySchedule::Id: + { + Commands::ClearWeeklySchedule::DecodableType data; + cmd = "ClearWeeklySchedule"; // "ClearWeeklySchedule"; + 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(); } // Fan Control : 514 -void FanControlClusterCommandHandler::InvokeCommand(CommandHandlerInterface::HandlerContext& ctxt) +void FanControlClusterCommandHandler::InvokeCommand( + CommandHandlerInterface::HandlerContext &ctxt) { - using namespace chip::app::Clusters::FanControl; - - 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 = {}; - - if (m_node_state_monitor.emulator().is_command_emulated(ctxt.mRequestPath)) { - m_node_state_monitor.emulator().invoke_command(ctxt); - return; - } - - 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(); + using namespace chip::app::Clusters::FanControl; + + 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 = {}; + + if( m_node_state_monitor.emulator().is_command_emulated(ctxt.mRequestPath) ) { + m_node_state_monitor.emulator().invoke_command(ctxt); + return; + } + + 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(); } // Thermostat User Interface Configuration : 516 -void ThermostatUserInterfaceConfigurationClusterCommandHandler::InvokeCommand(CommandHandlerInterface::HandlerContext& ctxt) +void ThermostatUserInterfaceConfigurationClusterCommandHandler::InvokeCommand( + CommandHandlerInterface::HandlerContext &ctxt) { - using namespace chip::app::Clusters::ThermostatUserInterfaceConfiguration; - - 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 = {}; - - if (m_node_state_monitor.emulator().is_command_emulated(ctxt.mRequestPath)) { - m_node_state_monitor.emulator().invoke_command(ctxt); - return; - } - - 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(); + using namespace chip::app::Clusters::ThermostatUserInterfaceConfiguration; + + 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 = {}; + + if( m_node_state_monitor.emulator().is_command_emulated(ctxt.mRequestPath) ) { + m_node_state_monitor.emulator().invoke_command(ctxt); + return; + } + + 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(); } // Color Control : 768 -void ColorControlClusterCommandHandler::InvokeCommand(CommandHandlerInterface::HandlerContext& ctxt) +void ColorControlClusterCommandHandler::InvokeCommand( + CommandHandlerInterface::HandlerContext &ctxt) { - using namespace chip::app::Clusters::ColorControl; - - 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 = {}; - - if (m_node_state_monitor.emulator().is_command_emulated(ctxt.mRequestPath)) { - m_node_state_monitor.emulator().invoke_command(ctxt); - return; - } - - switch (ctxt.mRequestPath.mCommandId) { - case Commands::MoveToHue::Id: { - Commands::MoveToHue::DecodableType data; - cmd = "MoveToHue"; // "MoveToHue"; - if (DataModel::Decode(ctxt.GetReader(), data) == CHIP_NO_ERROR) { - try { - payload["Hue"] = to_json(data.hue); - } catch (std::exception& ex) { - sl_log_warning(LOG_TAG, "Failed to add the command argument value to json format: %s", ex.what()); - } - try { - payload["Direction"] = to_json(data.direction); - } catch (std::exception& ex) { - sl_log_warning(LOG_TAG, "Failed to add the command argument 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()); - } - try { - payload["OptionsMask"] = to_json(data.optionsMask); - } catch (std::exception& ex) { - sl_log_warning(LOG_TAG, "Failed to add the command argument value to json format: %s", ex.what()); - } - try { - payload["OptionsOverride"] = to_json(data.optionsOverride); - } 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::MoveHue::Id: { - Commands::MoveHue::DecodableType data; - cmd = "MoveHue"; // "MoveHue"; - if (DataModel::Decode(ctxt.GetReader(), data) == CHIP_NO_ERROR) { - try { - payload["MoveMode"] = to_json(data.moveMode); - } catch (std::exception& ex) { - sl_log_warning(LOG_TAG, "Failed to add the command argument value to json format: %s", ex.what()); - } - try { - payload["Rate"] = to_json(data.rate); - } catch (std::exception& ex) { - sl_log_warning(LOG_TAG, "Failed to add the command argument value to json format: %s", ex.what()); - } - try { - payload["OptionsMask"] = to_json(data.optionsMask); - } catch (std::exception& ex) { - sl_log_warning(LOG_TAG, "Failed to add the command argument value to json format: %s", ex.what()); - } - try { - payload["OptionsOverride"] = to_json(data.optionsOverride); - } 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::StepHue::Id: { - Commands::StepHue::DecodableType data; - cmd = "StepHue"; // "StepHue"; - if (DataModel::Decode(ctxt.GetReader(), data) == CHIP_NO_ERROR) { - try { - payload["StepMode"] = to_json(data.stepMode); - } catch (std::exception& ex) { - sl_log_warning(LOG_TAG, "Failed to add the command argument value to json format: %s", ex.what()); - } - try { - payload["StepSize"] = to_json(data.stepSize); - } catch (std::exception& ex) { - sl_log_warning(LOG_TAG, "Failed to add the command argument 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()); - } - try { - payload["OptionsMask"] = to_json(data.optionsMask); - } catch (std::exception& ex) { - sl_log_warning(LOG_TAG, "Failed to add the command argument value to json format: %s", ex.what()); - } - try { - payload["OptionsOverride"] = to_json(data.optionsOverride); - } 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::MoveToSaturation::Id: { - Commands::MoveToSaturation::DecodableType data; - cmd = "MoveToSaturation"; // "MoveToSaturation"; - if (DataModel::Decode(ctxt.GetReader(), data) == CHIP_NO_ERROR) { - try { - payload["Saturation"] = to_json(data.saturation); - } catch (std::exception& ex) { - sl_log_warning(LOG_TAG, "Failed to add the command argument 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()); - } - try { - payload["OptionsMask"] = to_json(data.optionsMask); - } catch (std::exception& ex) { - sl_log_warning(LOG_TAG, "Failed to add the command argument value to json format: %s", ex.what()); - } - try { - payload["OptionsOverride"] = to_json(data.optionsOverride); - } 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::MoveSaturation::Id: { - Commands::MoveSaturation::DecodableType data; - cmd = "MoveSaturation"; // "MoveSaturation"; - if (DataModel::Decode(ctxt.GetReader(), data) == CHIP_NO_ERROR) { - try { - payload["MoveMode"] = to_json(data.moveMode); - } catch (std::exception& ex) { - sl_log_warning(LOG_TAG, "Failed to add the command argument value to json format: %s", ex.what()); - } - try { - payload["Rate"] = to_json(data.rate); - } catch (std::exception& ex) { - sl_log_warning(LOG_TAG, "Failed to add the command argument value to json format: %s", ex.what()); - } - try { - payload["OptionsMask"] = to_json(data.optionsMask); - } catch (std::exception& ex) { - sl_log_warning(LOG_TAG, "Failed to add the command argument value to json format: %s", ex.what()); - } - try { - payload["OptionsOverride"] = to_json(data.optionsOverride); - } 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::StepSaturation::Id: { - Commands::StepSaturation::DecodableType data; - cmd = "StepSaturation"; // "StepSaturation"; - if (DataModel::Decode(ctxt.GetReader(), data) == CHIP_NO_ERROR) { - try { - payload["StepMode"] = to_json(data.stepMode); - } catch (std::exception& ex) { - sl_log_warning(LOG_TAG, "Failed to add the command argument value to json format: %s", ex.what()); - } - try { - payload["StepSize"] = to_json(data.stepSize); - } catch (std::exception& ex) { - sl_log_warning(LOG_TAG, "Failed to add the command argument 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()); - } - try { - payload["OptionsMask"] = to_json(data.optionsMask); - } catch (std::exception& ex) { - sl_log_warning(LOG_TAG, "Failed to add the command argument value to json format: %s", ex.what()); - } - try { - payload["OptionsOverride"] = to_json(data.optionsOverride); - } 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::MoveToHueAndSaturation::Id: { - Commands::MoveToHueAndSaturation::DecodableType data; - cmd = "MoveToHueAndSaturation"; // "MoveToHueAndSaturation"; - if (DataModel::Decode(ctxt.GetReader(), data) == CHIP_NO_ERROR) { - try { - payload["Hue"] = to_json(data.hue); - } catch (std::exception& ex) { - sl_log_warning(LOG_TAG, "Failed to add the command argument value to json format: %s", ex.what()); - } - try { - payload["Saturation"] = to_json(data.saturation); - } catch (std::exception& ex) { - sl_log_warning(LOG_TAG, "Failed to add the command argument 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()); - } - try { - payload["OptionsMask"] = to_json(data.optionsMask); - } catch (std::exception& ex) { - sl_log_warning(LOG_TAG, "Failed to add the command argument value to json format: %s", ex.what()); - } - try { - payload["OptionsOverride"] = to_json(data.optionsOverride); - } 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::MoveToColor::Id: { - Commands::MoveToColor::DecodableType data; - cmd = "MoveToColor"; // "MoveToColor"; - if (DataModel::Decode(ctxt.GetReader(), data) == CHIP_NO_ERROR) { - try { - payload["ColorX"] = to_json(data.colorX); - } catch (std::exception& ex) { - sl_log_warning(LOG_TAG, "Failed to add the command argument value to json format: %s", ex.what()); - } - try { - payload["ColorY"] = to_json(data.colorY); - } catch (std::exception& ex) { - sl_log_warning(LOG_TAG, "Failed to add the command argument 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()); - } - try { - payload["OptionsMask"] = to_json(data.optionsMask); - } catch (std::exception& ex) { - sl_log_warning(LOG_TAG, "Failed to add the command argument value to json format: %s", ex.what()); - } - try { - payload["OptionsOverride"] = to_json(data.optionsOverride); - } 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::MoveColor::Id: { - Commands::MoveColor::DecodableType data; - cmd = "MoveColor"; // "MoveColor"; - if (DataModel::Decode(ctxt.GetReader(), data) == CHIP_NO_ERROR) { - try { - payload["RateX"] = to_json(data.rateX); - } catch (std::exception& ex) { - sl_log_warning(LOG_TAG, "Failed to add the command argument value to json format: %s", ex.what()); - } - try { - payload["RateY"] = to_json(data.rateY); - } catch (std::exception& ex) { - sl_log_warning(LOG_TAG, "Failed to add the command argument value to json format: %s", ex.what()); - } - try { - payload["OptionsMask"] = to_json(data.optionsMask); - } catch (std::exception& ex) { - sl_log_warning(LOG_TAG, "Failed to add the command argument value to json format: %s", ex.what()); - } - try { - payload["OptionsOverride"] = to_json(data.optionsOverride); - } 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::StepColor::Id: { - Commands::StepColor::DecodableType data; - cmd = "StepColor"; // "StepColor"; - if (DataModel::Decode(ctxt.GetReader(), data) == CHIP_NO_ERROR) { - try { - payload["StepX"] = to_json(data.stepX); - } catch (std::exception& ex) { - sl_log_warning(LOG_TAG, "Failed to add the command argument value to json format: %s", ex.what()); - } - try { - payload["StepY"] = to_json(data.stepY); - } catch (std::exception& ex) { - sl_log_warning(LOG_TAG, "Failed to add the command argument 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()); - } - try { - payload["OptionsMask"] = to_json(data.optionsMask); - } catch (std::exception& ex) { - sl_log_warning(LOG_TAG, "Failed to add the command argument value to json format: %s", ex.what()); - } - try { - payload["OptionsOverride"] = to_json(data.optionsOverride); - } 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::MoveToColorTemperature::Id: { - Commands::MoveToColorTemperature::DecodableType data; - cmd = "MoveToColorTemperature"; // "MoveToColorTemperature"; - if (DataModel::Decode(ctxt.GetReader(), data) == CHIP_NO_ERROR) { - try { - 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()); - } - 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()); - } - try { - payload["OptionsMask"] = to_json(data.optionsMask); - } catch (std::exception& ex) { - sl_log_warning(LOG_TAG, "Failed to add the command argument value to json format: %s", ex.what()); - } - try { - payload["OptionsOverride"] = to_json(data.optionsOverride); - } 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::EnhancedMoveToHue::Id: { - Commands::EnhancedMoveToHue::DecodableType data; - cmd = "EnhancedMoveToHue"; // "EnhancedMoveToHue"; - if (DataModel::Decode(ctxt.GetReader(), data) == CHIP_NO_ERROR) { - try { - payload["EnhancedHue"] = to_json(data.enhancedHue); - } catch (std::exception& ex) { - sl_log_warning(LOG_TAG, "Failed to add the command argument value to json format: %s", ex.what()); - } - try { - payload["Direction"] = to_json(data.direction); - } catch (std::exception& ex) { - sl_log_warning(LOG_TAG, "Failed to add the command argument 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()); - } - try { - payload["OptionsMask"] = to_json(data.optionsMask); - } catch (std::exception& ex) { - sl_log_warning(LOG_TAG, "Failed to add the command argument value to json format: %s", ex.what()); - } - try { - payload["OptionsOverride"] = to_json(data.optionsOverride); - } 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::EnhancedMoveHue::Id: { - Commands::EnhancedMoveHue::DecodableType data; - cmd = "EnhancedMoveHue"; // "EnhancedMoveHue"; - if (DataModel::Decode(ctxt.GetReader(), data) == CHIP_NO_ERROR) { - try { - payload["MoveMode"] = to_json(data.moveMode); - } catch (std::exception& ex) { - sl_log_warning(LOG_TAG, "Failed to add the command argument value to json format: %s", ex.what()); - } - try { - payload["Rate"] = to_json(data.rate); - } catch (std::exception& ex) { - sl_log_warning(LOG_TAG, "Failed to add the command argument value to json format: %s", ex.what()); - } - try { - payload["OptionsMask"] = to_json(data.optionsMask); - } catch (std::exception& ex) { - sl_log_warning(LOG_TAG, "Failed to add the command argument value to json format: %s", ex.what()); - } - try { - payload["OptionsOverride"] = to_json(data.optionsOverride); - } 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::EnhancedStepHue::Id: { - Commands::EnhancedStepHue::DecodableType data; - cmd = "EnhancedStepHue"; // "EnhancedStepHue"; - if (DataModel::Decode(ctxt.GetReader(), data) == CHIP_NO_ERROR) { - try { - payload["StepMode"] = to_json(data.stepMode); - } catch (std::exception& ex) { - sl_log_warning(LOG_TAG, "Failed to add the command argument value to json format: %s", ex.what()); - } - try { - payload["StepSize"] = to_json(data.stepSize); - } catch (std::exception& ex) { - sl_log_warning(LOG_TAG, "Failed to add the command argument 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()); - } - try { - payload["OptionsMask"] = to_json(data.optionsMask); - } catch (std::exception& ex) { - sl_log_warning(LOG_TAG, "Failed to add the command argument value to json format: %s", ex.what()); - } - try { - payload["OptionsOverride"] = to_json(data.optionsOverride); - } 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::EnhancedMoveToHueAndSaturation::Id: { - Commands::EnhancedMoveToHueAndSaturation::DecodableType data; - cmd = "EnhancedMoveToHueAndSaturation"; // "EnhancedMoveToHueAndSaturation"; - if (DataModel::Decode(ctxt.GetReader(), data) == CHIP_NO_ERROR) { - try { - payload["EnhancedHue"] = to_json(data.enhancedHue); - } catch (std::exception& ex) { - sl_log_warning(LOG_TAG, "Failed to add the command argument value to json format: %s", ex.what()); - } - try { - payload["Saturation"] = to_json(data.saturation); - } catch (std::exception& ex) { - sl_log_warning(LOG_TAG, "Failed to add the command argument 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()); - } - try { - payload["OptionsMask"] = to_json(data.optionsMask); - } catch (std::exception& ex) { - sl_log_warning(LOG_TAG, "Failed to add the command argument value to json format: %s", ex.what()); - } - try { - payload["OptionsOverride"] = to_json(data.optionsOverride); - } 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::ColorLoopSet::Id: { - Commands::ColorLoopSet::DecodableType data; - cmd = "ColorLoopSet"; // "ColorLoopSet"; - if (DataModel::Decode(ctxt.GetReader(), data) == CHIP_NO_ERROR) { - try { - payload["UpdateFlags"] = to_json(data.updateFlags); - } catch (std::exception& ex) { - sl_log_warning(LOG_TAG, "Failed to add the command argument value to json format: %s", ex.what()); - } - try { - payload["Action"] = to_json(data.action); - } catch (std::exception& ex) { - sl_log_warning(LOG_TAG, "Failed to add the command argument value to json format: %s", ex.what()); - } - try { - payload["Direction"] = to_json(data.direction); - } catch (std::exception& ex) { - sl_log_warning(LOG_TAG, "Failed to add the command argument value to json format: %s", ex.what()); - } - try { - payload["Time"] = to_json(data.time); - } catch (std::exception& ex) { - sl_log_warning(LOG_TAG, "Failed to add the command argument value to json format: %s", ex.what()); - } - try { - payload["StartHue"] = to_json(data.startHue); - } catch (std::exception& ex) { - sl_log_warning(LOG_TAG, "Failed to add the command argument value to json format: %s", ex.what()); - } - try { - payload["OptionsMask"] = to_json(data.optionsMask); - } catch (std::exception& ex) { - sl_log_warning(LOG_TAG, "Failed to add the command argument value to json format: %s", ex.what()); - } - try { - payload["OptionsOverride"] = to_json(data.optionsOverride); - } 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::StopMoveStep::Id: { - Commands::StopMoveStep::DecodableType data; - cmd = "StopMoveStep"; // "StopMoveStep"; - if (DataModel::Decode(ctxt.GetReader(), data) == CHIP_NO_ERROR) { - try { - payload["OptionsMask"] = to_json(data.optionsMask); - } catch (std::exception& ex) { - sl_log_warning(LOG_TAG, "Failed to add the command argument value to json format: %s", ex.what()); - } - try { - payload["OptionsOverride"] = to_json(data.optionsOverride); - } 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::MoveColorTemperature::Id: { - Commands::MoveColorTemperature::DecodableType data; - cmd = "MoveColorTemperature"; // "MoveColorTemperature"; - if (DataModel::Decode(ctxt.GetReader(), data) == CHIP_NO_ERROR) { - try { - payload["MoveMode"] = to_json(data.moveMode); - } catch (std::exception& ex) { - sl_log_warning(LOG_TAG, "Failed to add the command argument value to json format: %s", ex.what()); - } - try { - payload["Rate"] = to_json(data.rate); - } catch (std::exception& ex) { - sl_log_warning(LOG_TAG, "Failed to add the command argument value to json format: %s", ex.what()); - } - try { - payload["ColorTemperatureMinimumMireds"] = to_json(data.colorTemperatureMinimumMireds); - } catch (std::exception& ex) { - sl_log_warning(LOG_TAG, "Failed to add the command argument value to json format: %s", ex.what()); - } - try { - payload["ColorTemperatureMaximumMireds"] = to_json(data.colorTemperatureMaximumMireds); - } catch (std::exception& ex) { - sl_log_warning(LOG_TAG, "Failed to add the command argument value to json format: %s", ex.what()); - } - try { - payload["OptionsMask"] = to_json(data.optionsMask); - } catch (std::exception& ex) { - sl_log_warning(LOG_TAG, "Failed to add the command argument value to json format: %s", ex.what()); - } - try { - payload["OptionsOverride"] = to_json(data.optionsOverride); - } 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::StepColorTemperature::Id: { - Commands::StepColorTemperature::DecodableType data; - cmd = "StepColorTemperature"; // "StepColorTemperature"; - if (DataModel::Decode(ctxt.GetReader(), data) == CHIP_NO_ERROR) { - try { - payload["StepMode"] = to_json(data.stepMode); - } catch (std::exception& ex) { - sl_log_warning(LOG_TAG, "Failed to add the command argument value to json format: %s", ex.what()); - } - try { - payload["StepSize"] = to_json(data.stepSize); - } catch (std::exception& ex) { - sl_log_warning(LOG_TAG, "Failed to add the command argument 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()); - } - try { - payload["ColorTemperatureMinimumMireds"] = to_json(data.colorTemperatureMinimumMireds); - } catch (std::exception& ex) { - sl_log_warning(LOG_TAG, "Failed to add the command argument value to json format: %s", ex.what()); - } - try { - payload["ColorTemperatureMaximumMireds"] = to_json(data.colorTemperatureMaximumMireds); - } catch (std::exception& ex) { - sl_log_warning(LOG_TAG, "Failed to add the command argument value to json format: %s", ex.what()); - } - try { - payload["OptionsMask"] = to_json(data.optionsMask); - } catch (std::exception& ex) { - sl_log_warning(LOG_TAG, "Failed to add the command argument value to json format: %s", ex.what()); - } - try { - payload["OptionsOverride"] = to_json(data.optionsOverride); - } 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(); + using namespace chip::app::Clusters::ColorControl; + + 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 = {}; + + if( m_node_state_monitor.emulator().is_command_emulated(ctxt.mRequestPath) ) { + m_node_state_monitor.emulator().invoke_command(ctxt); + return; + } + + switch (ctxt.mRequestPath.mCommandId) { + case Commands::MoveToHue::Id: + { + Commands::MoveToHue::DecodableType data; + cmd = "MoveToHue"; // "MoveToHue"; + if (DataModel::Decode(ctxt.GetReader(), data) == CHIP_NO_ERROR){ + try { + payload["Hue"] = to_json(data.hue); + } catch (std::exception &ex) { + sl_log_warning(LOG_TAG, "Failed to add the command argument value to json format: %s", ex.what()); + } + try { + payload["Direction"] = to_json(data.direction); + } catch (std::exception &ex) { + sl_log_warning(LOG_TAG, "Failed to add the command argument 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()); + } + try { + payload["OptionsMask"] = to_json(data.optionsMask); + } catch (std::exception &ex) { + sl_log_warning(LOG_TAG, "Failed to add the command argument value to json format: %s", ex.what()); + } + try { + payload["OptionsOverride"] = to_json(data.optionsOverride); + } 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::MoveHue::Id: + { + Commands::MoveHue::DecodableType data; + cmd = "MoveHue"; // "MoveHue"; + if (DataModel::Decode(ctxt.GetReader(), data) == CHIP_NO_ERROR){ + try { + payload["MoveMode"] = to_json(data.moveMode); + } catch (std::exception &ex) { + sl_log_warning(LOG_TAG, "Failed to add the command argument value to json format: %s", ex.what()); + } + try { + payload["Rate"] = to_json(data.rate); + } catch (std::exception &ex) { + sl_log_warning(LOG_TAG, "Failed to add the command argument value to json format: %s", ex.what()); + } + try { + payload["OptionsMask"] = to_json(data.optionsMask); + } catch (std::exception &ex) { + sl_log_warning(LOG_TAG, "Failed to add the command argument value to json format: %s", ex.what()); + } + try { + payload["OptionsOverride"] = to_json(data.optionsOverride); + } 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::StepHue::Id: + { + Commands::StepHue::DecodableType data; + cmd = "StepHue"; // "StepHue"; + if (DataModel::Decode(ctxt.GetReader(), data) == CHIP_NO_ERROR){ + try { + payload["StepMode"] = to_json(data.stepMode); + } catch (std::exception &ex) { + sl_log_warning(LOG_TAG, "Failed to add the command argument value to json format: %s", ex.what()); + } + try { + payload["StepSize"] = to_json(data.stepSize); + } catch (std::exception &ex) { + sl_log_warning(LOG_TAG, "Failed to add the command argument 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()); + } + try { + payload["OptionsMask"] = to_json(data.optionsMask); + } catch (std::exception &ex) { + sl_log_warning(LOG_TAG, "Failed to add the command argument value to json format: %s", ex.what()); + } + try { + payload["OptionsOverride"] = to_json(data.optionsOverride); + } 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::MoveToSaturation::Id: + { + Commands::MoveToSaturation::DecodableType data; + cmd = "MoveToSaturation"; // "MoveToSaturation"; + if (DataModel::Decode(ctxt.GetReader(), data) == CHIP_NO_ERROR){ + try { + payload["Saturation"] = to_json(data.saturation); + } catch (std::exception &ex) { + sl_log_warning(LOG_TAG, "Failed to add the command argument 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()); + } + try { + payload["OptionsMask"] = to_json(data.optionsMask); + } catch (std::exception &ex) { + sl_log_warning(LOG_TAG, "Failed to add the command argument value to json format: %s", ex.what()); + } + try { + payload["OptionsOverride"] = to_json(data.optionsOverride); + } 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::MoveSaturation::Id: + { + Commands::MoveSaturation::DecodableType data; + cmd = "MoveSaturation"; // "MoveSaturation"; + if (DataModel::Decode(ctxt.GetReader(), data) == CHIP_NO_ERROR){ + try { + payload["MoveMode"] = to_json(data.moveMode); + } catch (std::exception &ex) { + sl_log_warning(LOG_TAG, "Failed to add the command argument value to json format: %s", ex.what()); + } + try { + payload["Rate"] = to_json(data.rate); + } catch (std::exception &ex) { + sl_log_warning(LOG_TAG, "Failed to add the command argument value to json format: %s", ex.what()); + } + try { + payload["OptionsMask"] = to_json(data.optionsMask); + } catch (std::exception &ex) { + sl_log_warning(LOG_TAG, "Failed to add the command argument value to json format: %s", ex.what()); + } + try { + payload["OptionsOverride"] = to_json(data.optionsOverride); + } 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::StepSaturation::Id: + { + Commands::StepSaturation::DecodableType data; + cmd = "StepSaturation"; // "StepSaturation"; + if (DataModel::Decode(ctxt.GetReader(), data) == CHIP_NO_ERROR){ + try { + payload["StepMode"] = to_json(data.stepMode); + } catch (std::exception &ex) { + sl_log_warning(LOG_TAG, "Failed to add the command argument value to json format: %s", ex.what()); + } + try { + payload["StepSize"] = to_json(data.stepSize); + } catch (std::exception &ex) { + sl_log_warning(LOG_TAG, "Failed to add the command argument 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()); + } + try { + payload["OptionsMask"] = to_json(data.optionsMask); + } catch (std::exception &ex) { + sl_log_warning(LOG_TAG, "Failed to add the command argument value to json format: %s", ex.what()); + } + try { + payload["OptionsOverride"] = to_json(data.optionsOverride); + } 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::MoveToHueAndSaturation::Id: + { + Commands::MoveToHueAndSaturation::DecodableType data; + cmd = "MoveToHueAndSaturation"; // "MoveToHueAndSaturation"; + if (DataModel::Decode(ctxt.GetReader(), data) == CHIP_NO_ERROR){ + try { + payload["Hue"] = to_json(data.hue); + } catch (std::exception &ex) { + sl_log_warning(LOG_TAG, "Failed to add the command argument value to json format: %s", ex.what()); + } + try { + payload["Saturation"] = to_json(data.saturation); + } catch (std::exception &ex) { + sl_log_warning(LOG_TAG, "Failed to add the command argument 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()); + } + try { + payload["OptionsMask"] = to_json(data.optionsMask); + } catch (std::exception &ex) { + sl_log_warning(LOG_TAG, "Failed to add the command argument value to json format: %s", ex.what()); + } + try { + payload["OptionsOverride"] = to_json(data.optionsOverride); + } 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::MoveToColor::Id: + { + Commands::MoveToColor::DecodableType data; + cmd = "MoveToColor"; // "MoveToColor"; + if (DataModel::Decode(ctxt.GetReader(), data) == CHIP_NO_ERROR){ + try { + payload["ColorX"] = to_json(data.colorX); + } catch (std::exception &ex) { + sl_log_warning(LOG_TAG, "Failed to add the command argument value to json format: %s", ex.what()); + } + try { + payload["ColorY"] = to_json(data.colorY); + } catch (std::exception &ex) { + sl_log_warning(LOG_TAG, "Failed to add the command argument 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()); + } + try { + payload["OptionsMask"] = to_json(data.optionsMask); + } catch (std::exception &ex) { + sl_log_warning(LOG_TAG, "Failed to add the command argument value to json format: %s", ex.what()); + } + try { + payload["OptionsOverride"] = to_json(data.optionsOverride); + } 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::MoveColor::Id: + { + Commands::MoveColor::DecodableType data; + cmd = "MoveColor"; // "MoveColor"; + if (DataModel::Decode(ctxt.GetReader(), data) == CHIP_NO_ERROR){ + try { + payload["RateX"] = to_json(data.rateX); + } catch (std::exception &ex) { + sl_log_warning(LOG_TAG, "Failed to add the command argument value to json format: %s", ex.what()); + } + try { + payload["RateY"] = to_json(data.rateY); + } catch (std::exception &ex) { + sl_log_warning(LOG_TAG, "Failed to add the command argument value to json format: %s", ex.what()); + } + try { + payload["OptionsMask"] = to_json(data.optionsMask); + } catch (std::exception &ex) { + sl_log_warning(LOG_TAG, "Failed to add the command argument value to json format: %s", ex.what()); + } + try { + payload["OptionsOverride"] = to_json(data.optionsOverride); + } 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::StepColor::Id: + { + Commands::StepColor::DecodableType data; + cmd = "StepColor"; // "StepColor"; + if (DataModel::Decode(ctxt.GetReader(), data) == CHIP_NO_ERROR){ + try { + payload["StepX"] = to_json(data.stepX); + } catch (std::exception &ex) { + sl_log_warning(LOG_TAG, "Failed to add the command argument value to json format: %s", ex.what()); + } + try { + payload["StepY"] = to_json(data.stepY); + } catch (std::exception &ex) { + sl_log_warning(LOG_TAG, "Failed to add the command argument 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()); + } + try { + payload["OptionsMask"] = to_json(data.optionsMask); + } catch (std::exception &ex) { + sl_log_warning(LOG_TAG, "Failed to add the command argument value to json format: %s", ex.what()); + } + try { + payload["OptionsOverride"] = to_json(data.optionsOverride); + } 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::MoveToColorTemperature::Id: + { + Commands::MoveToColorTemperature::DecodableType data; + cmd = "MoveToColorTemperature"; // "MoveToColorTemperature"; + if (DataModel::Decode(ctxt.GetReader(), data) == CHIP_NO_ERROR){ + try { + 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()); + } + 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()); + } + try { + payload["OptionsMask"] = to_json(data.optionsMask); + } catch (std::exception &ex) { + sl_log_warning(LOG_TAG, "Failed to add the command argument value to json format: %s", ex.what()); + } + try { + payload["OptionsOverride"] = to_json(data.optionsOverride); + } 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::EnhancedMoveToHue::Id: + { + Commands::EnhancedMoveToHue::DecodableType data; + cmd = "EnhancedMoveToHue"; // "EnhancedMoveToHue"; + if (DataModel::Decode(ctxt.GetReader(), data) == CHIP_NO_ERROR){ + try { + payload["EnhancedHue"] = to_json(data.enhancedHue); + } catch (std::exception &ex) { + sl_log_warning(LOG_TAG, "Failed to add the command argument value to json format: %s", ex.what()); + } + try { + payload["Direction"] = to_json(data.direction); + } catch (std::exception &ex) { + sl_log_warning(LOG_TAG, "Failed to add the command argument 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()); + } + try { + payload["OptionsMask"] = to_json(data.optionsMask); + } catch (std::exception &ex) { + sl_log_warning(LOG_TAG, "Failed to add the command argument value to json format: %s", ex.what()); + } + try { + payload["OptionsOverride"] = to_json(data.optionsOverride); + } 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::EnhancedMoveHue::Id: + { + Commands::EnhancedMoveHue::DecodableType data; + cmd = "EnhancedMoveHue"; // "EnhancedMoveHue"; + if (DataModel::Decode(ctxt.GetReader(), data) == CHIP_NO_ERROR){ + try { + payload["MoveMode"] = to_json(data.moveMode); + } catch (std::exception &ex) { + sl_log_warning(LOG_TAG, "Failed to add the command argument value to json format: %s", ex.what()); + } + try { + payload["Rate"] = to_json(data.rate); + } catch (std::exception &ex) { + sl_log_warning(LOG_TAG, "Failed to add the command argument value to json format: %s", ex.what()); + } + try { + payload["OptionsMask"] = to_json(data.optionsMask); + } catch (std::exception &ex) { + sl_log_warning(LOG_TAG, "Failed to add the command argument value to json format: %s", ex.what()); + } + try { + payload["OptionsOverride"] = to_json(data.optionsOverride); + } 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::EnhancedStepHue::Id: + { + Commands::EnhancedStepHue::DecodableType data; + cmd = "EnhancedStepHue"; // "EnhancedStepHue"; + if (DataModel::Decode(ctxt.GetReader(), data) == CHIP_NO_ERROR){ + try { + payload["StepMode"] = to_json(data.stepMode); + } catch (std::exception &ex) { + sl_log_warning(LOG_TAG, "Failed to add the command argument value to json format: %s", ex.what()); + } + try { + payload["StepSize"] = to_json(data.stepSize); + } catch (std::exception &ex) { + sl_log_warning(LOG_TAG, "Failed to add the command argument 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()); + } + try { + payload["OptionsMask"] = to_json(data.optionsMask); + } catch (std::exception &ex) { + sl_log_warning(LOG_TAG, "Failed to add the command argument value to json format: %s", ex.what()); + } + try { + payload["OptionsOverride"] = to_json(data.optionsOverride); + } 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::EnhancedMoveToHueAndSaturation::Id: + { + Commands::EnhancedMoveToHueAndSaturation::DecodableType data; + cmd = "EnhancedMoveToHueAndSaturation"; // "EnhancedMoveToHueAndSaturation"; + if (DataModel::Decode(ctxt.GetReader(), data) == CHIP_NO_ERROR){ + try { + payload["EnhancedHue"] = to_json(data.enhancedHue); + } catch (std::exception &ex) { + sl_log_warning(LOG_TAG, "Failed to add the command argument value to json format: %s", ex.what()); + } + try { + payload["Saturation"] = to_json(data.saturation); + } catch (std::exception &ex) { + sl_log_warning(LOG_TAG, "Failed to add the command argument 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()); + } + try { + payload["OptionsMask"] = to_json(data.optionsMask); + } catch (std::exception &ex) { + sl_log_warning(LOG_TAG, "Failed to add the command argument value to json format: %s", ex.what()); + } + try { + payload["OptionsOverride"] = to_json(data.optionsOverride); + } 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::ColorLoopSet::Id: + { + Commands::ColorLoopSet::DecodableType data; + cmd = "ColorLoopSet"; // "ColorLoopSet"; + if (DataModel::Decode(ctxt.GetReader(), data) == CHIP_NO_ERROR){ + try { + payload["UpdateFlags"] = to_json(data.updateFlags); + } catch (std::exception &ex) { + sl_log_warning(LOG_TAG, "Failed to add the command argument value to json format: %s", ex.what()); + } + try { + payload["Action"] = to_json(data.action); + } catch (std::exception &ex) { + sl_log_warning(LOG_TAG, "Failed to add the command argument value to json format: %s", ex.what()); + } + try { + payload["Direction"] = to_json(data.direction); + } catch (std::exception &ex) { + sl_log_warning(LOG_TAG, "Failed to add the command argument value to json format: %s", ex.what()); + } + try { + payload["Time"] = to_json(data.time); + } catch (std::exception &ex) { + sl_log_warning(LOG_TAG, "Failed to add the command argument value to json format: %s", ex.what()); + } + try { + payload["StartHue"] = to_json(data.startHue); + } catch (std::exception &ex) { + sl_log_warning(LOG_TAG, "Failed to add the command argument value to json format: %s", ex.what()); + } + try { + payload["OptionsMask"] = to_json(data.optionsMask); + } catch (std::exception &ex) { + sl_log_warning(LOG_TAG, "Failed to add the command argument value to json format: %s", ex.what()); + } + try { + payload["OptionsOverride"] = to_json(data.optionsOverride); + } 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::StopMoveStep::Id: + { + Commands::StopMoveStep::DecodableType data; + cmd = "StopMoveStep"; // "StopMoveStep"; + if (DataModel::Decode(ctxt.GetReader(), data) == CHIP_NO_ERROR){ + try { + payload["OptionsMask"] = to_json(data.optionsMask); + } catch (std::exception &ex) { + sl_log_warning(LOG_TAG, "Failed to add the command argument value to json format: %s", ex.what()); + } + try { + payload["OptionsOverride"] = to_json(data.optionsOverride); + } 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::MoveColorTemperature::Id: + { + Commands::MoveColorTemperature::DecodableType data; + cmd = "MoveColorTemperature"; // "MoveColorTemperature"; + if (DataModel::Decode(ctxt.GetReader(), data) == CHIP_NO_ERROR){ + try { + payload["MoveMode"] = to_json(data.moveMode); + } catch (std::exception &ex) { + sl_log_warning(LOG_TAG, "Failed to add the command argument value to json format: %s", ex.what()); + } + try { + payload["Rate"] = to_json(data.rate); + } catch (std::exception &ex) { + sl_log_warning(LOG_TAG, "Failed to add the command argument value to json format: %s", ex.what()); + } + try { + payload["ColorTemperatureMinimumMireds"] = to_json(data.colorTemperatureMinimumMireds); + } catch (std::exception &ex) { + sl_log_warning(LOG_TAG, "Failed to add the command argument value to json format: %s", ex.what()); + } + try { + payload["ColorTemperatureMaximumMireds"] = to_json(data.colorTemperatureMaximumMireds); + } catch (std::exception &ex) { + sl_log_warning(LOG_TAG, "Failed to add the command argument value to json format: %s", ex.what()); + } + try { + payload["OptionsMask"] = to_json(data.optionsMask); + } catch (std::exception &ex) { + sl_log_warning(LOG_TAG, "Failed to add the command argument value to json format: %s", ex.what()); + } + try { + payload["OptionsOverride"] = to_json(data.optionsOverride); + } 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::StepColorTemperature::Id: + { + Commands::StepColorTemperature::DecodableType data; + cmd = "StepColorTemperature"; // "StepColorTemperature"; + if (DataModel::Decode(ctxt.GetReader(), data) == CHIP_NO_ERROR){ + try { + payload["StepMode"] = to_json(data.stepMode); + } catch (std::exception &ex) { + sl_log_warning(LOG_TAG, "Failed to add the command argument value to json format: %s", ex.what()); + } + try { + payload["StepSize"] = to_json(data.stepSize); + } catch (std::exception &ex) { + sl_log_warning(LOG_TAG, "Failed to add the command argument 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()); + } + try { + payload["ColorTemperatureMinimumMireds"] = to_json(data.colorTemperatureMinimumMireds); + } catch (std::exception &ex) { + sl_log_warning(LOG_TAG, "Failed to add the command argument value to json format: %s", ex.what()); + } + try { + payload["ColorTemperatureMaximumMireds"] = to_json(data.colorTemperatureMaximumMireds); + } catch (std::exception &ex) { + sl_log_warning(LOG_TAG, "Failed to add the command argument value to json format: %s", ex.what()); + } + try { + payload["OptionsMask"] = to_json(data.optionsMask); + } catch (std::exception &ex) { + sl_log_warning(LOG_TAG, "Failed to add the command argument value to json format: %s", ex.what()); + } + try { + payload["OptionsOverride"] = to_json(data.optionsOverride); + } 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(); } // Illuminance Measurement : 1024 -void IlluminanceMeasurementClusterCommandHandler::InvokeCommand(CommandHandlerInterface::HandlerContext& ctxt) +void IlluminanceMeasurementClusterCommandHandler::InvokeCommand( + CommandHandlerInterface::HandlerContext &ctxt) { - using namespace chip::app::Clusters::IlluminanceMeasurement; - - 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 = {}; - - if (m_node_state_monitor.emulator().is_command_emulated(ctxt.mRequestPath)) { - m_node_state_monitor.emulator().invoke_command(ctxt); - return; - } - - 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(); + using namespace chip::app::Clusters::IlluminanceMeasurement; + + 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 = {}; + + if( m_node_state_monitor.emulator().is_command_emulated(ctxt.mRequestPath) ) { + m_node_state_monitor.emulator().invoke_command(ctxt); + return; + } + + 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(); } // Temperature Measurement : 1026 -void TemperatureMeasurementClusterCommandHandler::InvokeCommand(CommandHandlerInterface::HandlerContext& ctxt) +void TemperatureMeasurementClusterCommandHandler::InvokeCommand( + CommandHandlerInterface::HandlerContext &ctxt) { - using namespace chip::app::Clusters::TemperatureMeasurement; - - 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 = {}; - - if (m_node_state_monitor.emulator().is_command_emulated(ctxt.mRequestPath)) { - m_node_state_monitor.emulator().invoke_command(ctxt); - return; - } - - 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(); + using namespace chip::app::Clusters::TemperatureMeasurement; + + 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 = {}; + + if( m_node_state_monitor.emulator().is_command_emulated(ctxt.mRequestPath) ) { + m_node_state_monitor.emulator().invoke_command(ctxt); + return; + } + + 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(); } // Pressure Measurement : 1027 -void PressureMeasurementClusterCommandHandler::InvokeCommand(CommandHandlerInterface::HandlerContext& ctxt) +void PressureMeasurementClusterCommandHandler::InvokeCommand( + CommandHandlerInterface::HandlerContext &ctxt) { - using namespace chip::app::Clusters::PressureMeasurement; - - 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 = {}; - - if (m_node_state_monitor.emulator().is_command_emulated(ctxt.mRequestPath)) { - m_node_state_monitor.emulator().invoke_command(ctxt); - return; - } - - 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(); + using namespace chip::app::Clusters::PressureMeasurement; + + 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 = {}; + + if( m_node_state_monitor.emulator().is_command_emulated(ctxt.mRequestPath) ) { + m_node_state_monitor.emulator().invoke_command(ctxt); + return; + } + + 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(); } // Relative Humidity Measurement : 1029 -void RelativeHumidityMeasurementClusterCommandHandler::InvokeCommand(CommandHandlerInterface::HandlerContext& ctxt) +void RelativeHumidityMeasurementClusterCommandHandler::InvokeCommand( + CommandHandlerInterface::HandlerContext &ctxt) { - using namespace chip::app::Clusters::RelativeHumidityMeasurement; - - 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 = {}; - - if (m_node_state_monitor.emulator().is_command_emulated(ctxt.mRequestPath)) { - m_node_state_monitor.emulator().invoke_command(ctxt); - return; - } - - 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(); + using namespace chip::app::Clusters::RelativeHumidityMeasurement; + + 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 = {}; + + if( m_node_state_monitor.emulator().is_command_emulated(ctxt.mRequestPath) ) { + m_node_state_monitor.emulator().invoke_command(ctxt); + return; + } + + 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(); } // Occupancy Sensing : 1030 -void OccupancySensingClusterCommandHandler::InvokeCommand(CommandHandlerInterface::HandlerContext& ctxt) +void OccupancySensingClusterCommandHandler::InvokeCommand( + CommandHandlerInterface::HandlerContext &ctxt) { - using namespace chip::app::Clusters::OccupancySensing; - - 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 = {}; - - if (m_node_state_monitor.emulator().is_command_emulated(ctxt.mRequestPath)) { - m_node_state_monitor.emulator().invoke_command(ctxt); - return; - } - - 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(); + using namespace chip::app::Clusters::OccupancySensing; + + 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 = {}; + + if( m_node_state_monitor.emulator().is_command_emulated(ctxt.mRequestPath) ) { + m_node_state_monitor.emulator().invoke_command(ctxt); + return; + } + + 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(); } // Electrical Measurement : 2820 -void ElectricalMeasurementClusterCommandHandler::InvokeCommand(CommandHandlerInterface::HandlerContext& ctxt) +void ElectricalMeasurementClusterCommandHandler::InvokeCommand( + CommandHandlerInterface::HandlerContext &ctxt) { - using namespace chip::app::Clusters::ElectricalMeasurement; - - 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 = {}; - - if (m_node_state_monitor.emulator().is_command_emulated(ctxt.mRequestPath)) { - m_node_state_monitor.emulator().invoke_command(ctxt); - return; - } - - switch (ctxt.mRequestPath.mCommandId) { - case Commands::GetProfileInfoCommand::Id: { - Commands::GetProfileInfoCommand::DecodableType data; - cmd = "GetProfileInfoResponse"; // "GetProfileInfoCommand"; - if (DataModel::Decode(ctxt.GetReader(), data) == CHIP_NO_ERROR) { - } - } break; - case Commands::GetMeasurementProfileCommand::Id: { - Commands::GetMeasurementProfileCommand::DecodableType data; - cmd = "GetMeasurementProfileResponse"; // "GetMeasurementProfileCommand"; - if (DataModel::Decode(ctxt.GetReader(), data) == CHIP_NO_ERROR) { - try { - payload["StartTime"] = to_json(data.attributeId); - } catch (std::exception& ex) { - sl_log_warning(LOG_TAG, "Failed to add the command argument value to json format: %s", ex.what()); - } - try { - payload["Status"] = to_json(data.startTime); - } catch (std::exception& ex) { - sl_log_warning(LOG_TAG, "Failed to add the command argument value to json format: %s", ex.what()); - } - try { - payload["ProfileIntervalPeriod"] = to_json(data.numberOfIntervals); - } 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(); + using namespace chip::app::Clusters::ElectricalMeasurement; + + 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 = {}; + + if( m_node_state_monitor.emulator().is_command_emulated(ctxt.mRequestPath) ) { + m_node_state_monitor.emulator().invoke_command(ctxt); + return; + } + + switch (ctxt.mRequestPath.mCommandId) { + case Commands::GetProfileInfoCommand::Id: + { + Commands::GetProfileInfoCommand::DecodableType data; + cmd = "GetProfileInfoResponse"; // "GetProfileInfoCommand"; + if (DataModel::Decode(ctxt.GetReader(), data) == CHIP_NO_ERROR){ + } + } + break; + case Commands::GetMeasurementProfileCommand::Id: + { + Commands::GetMeasurementProfileCommand::DecodableType data; + cmd = "GetMeasurementProfileResponse"; // "GetMeasurementProfileCommand"; + if (DataModel::Decode(ctxt.GetReader(), data) == CHIP_NO_ERROR){ + try { + payload["StartTime"] = to_json(data.attributeId); + } catch (std::exception &ex) { + sl_log_warning(LOG_TAG, "Failed to add the command argument value to json format: %s", ex.what()); + } + try { + payload["Status"] = to_json(data.startTime); + } catch (std::exception &ex) { + sl_log_warning(LOG_TAG, "Failed to add the command argument value to json format: %s", ex.what()); + } + try { + payload["ProfileIntervalPeriod"] = to_json(data.numberOfIntervals); + } 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-generated/data_model_translator/command_translator.hpp b/silabs_examples/unify-matter-bridge/linux/zap-generated/data_model_translator/command_translator.hpp index ed0a28d8dec534..2aff685f14b440 100644 --- a/silabs_examples/unify-matter-bridge/linux/zap-generated/data_model_translator/command_translator.hpp +++ b/silabs_examples/unify-matter-bridge/linux/zap-generated/data_model_translator/command_translator.hpp @@ -27,541 +27,641 @@ #pragma once #include "command_translator_interface.hpp" -namespace unify::matter_bridge { - -class IdentifyClusterCommandHandler : public command_translator_interface { -public: - IdentifyClusterCommandHandler(const matter_node_state_monitor& node_state_monitor, UnifyMqtt& unify_mqtt, - group_translator& group_translator_m) - : command_translator_interface(node_state_monitor, chip::app::Clusters::Identify::Id, "Identify", unify_mqtt, - group_translator_m) - { +namespace unify::matter_bridge +{ + +class IdentifyClusterCommandHandler : public command_translator_interface +{ + public: + IdentifyClusterCommandHandler( + const matter_node_state_monitor &node_state_monitor, + UnifyMqtt &unify_mqtt, group_translator &group_translator_m) : + command_translator_interface(node_state_monitor, + chip::app::Clusters::Identify::Id,"Identify", unify_mqtt, group_translator_m) + {} + void InvokeCommand(chip::app::CommandHandlerInterface::HandlerContext + &HandlerContext) override; + + + + + + + virtual CHIP_ERROR EnumerateAcceptedCommands(const chip::app::ConcreteClusterPath & cluster, CommandIdCallback callback, void * context) override + { + const chip::CommandId all_commands[] = { 0,64, }; + for (const auto & cmd : all_commands ) + { + if (callback(cmd, context) != chip::Loop::Continue) + { + break; + } } - void InvokeCommand(chip::app::CommandHandlerInterface::HandlerContext& HandlerContext) override; - virtual CHIP_ERROR EnumerateAcceptedCommands(const chip::app::ConcreteClusterPath& cluster, CommandIdCallback callback, - void* context) override - { - const chip::CommandId all_commands[] = { - 0, - 64, - }; - for (const auto& cmd : all_commands) { - if (callback(cmd, context) != chip::Loop::Continue) { - break; - } - } + return CHIP_NO_ERROR; + } - return CHIP_NO_ERROR; - } }; -class GroupsClusterCommandHandler : public command_translator_interface { -public: - GroupsClusterCommandHandler(const matter_node_state_monitor& node_state_monitor, UnifyMqtt& unify_mqtt, - group_translator& group_translator_m) - : command_translator_interface(node_state_monitor, chip::app::Clusters::Groups::Id, "Groups", unify_mqtt, group_translator_m) - { +class GroupsClusterCommandHandler : public command_translator_interface +{ + public: + GroupsClusterCommandHandler( + const matter_node_state_monitor &node_state_monitor, + UnifyMqtt &unify_mqtt, group_translator &group_translator_m) : + command_translator_interface(node_state_monitor, + chip::app::Clusters::Groups::Id,"Groups", unify_mqtt, group_translator_m) + {} + void InvokeCommand(chip::app::CommandHandlerInterface::HandlerContext + &HandlerContext) override; + + + + + + + + + + + virtual CHIP_ERROR EnumerateAcceptedCommands(const chip::app::ConcreteClusterPath & cluster, CommandIdCallback callback, void * context) override + { + const chip::CommandId all_commands[] = { 0,1,2,3,4,5, }; + for (const auto & cmd : all_commands ) + { + if (callback(cmd, context) != chip::Loop::Continue) + { + break; + } } - void InvokeCommand(chip::app::CommandHandlerInterface::HandlerContext& HandlerContext) override; - virtual CHIP_ERROR EnumerateAcceptedCommands(const chip::app::ConcreteClusterPath& cluster, CommandIdCallback callback, - void* context) override - { - const chip::CommandId all_commands[] = { - 0, - 1, - 2, - 3, - 4, - 5, - }; - for (const auto& cmd : all_commands) { - if (callback(cmd, context) != chip::Loop::Continue) { - break; - } - } + return CHIP_NO_ERROR; + } - return CHIP_NO_ERROR; - } }; -class ScenesClusterCommandHandler : public command_translator_interface { -public: - ScenesClusterCommandHandler(const matter_node_state_monitor& node_state_monitor, UnifyMqtt& unify_mqtt, - group_translator& group_translator_m) - : command_translator_interface(node_state_monitor, chip::app::Clusters::Scenes::Id, "Scenes", unify_mqtt, group_translator_m) - { +class ScenesClusterCommandHandler : public command_translator_interface +{ + public: + ScenesClusterCommandHandler( + const matter_node_state_monitor &node_state_monitor, + UnifyMqtt &unify_mqtt, group_translator &group_translator_m) : + command_translator_interface(node_state_monitor, + chip::app::Clusters::Scenes::Id,"Scenes", unify_mqtt, group_translator_m) + {} + void InvokeCommand(chip::app::CommandHandlerInterface::HandlerContext + &HandlerContext) override; + + + + + + + + + + + + + + + virtual CHIP_ERROR EnumerateAcceptedCommands(const chip::app::ConcreteClusterPath & cluster, CommandIdCallback callback, void * context) override + { + const chip::CommandId all_commands[] = { 0,1,2,3,4,5,6,64,65,66, }; + for (const auto & cmd : all_commands ) + { + if (callback(cmd, context) != chip::Loop::Continue) + { + break; + } } - void InvokeCommand(chip::app::CommandHandlerInterface::HandlerContext& HandlerContext) override; - virtual CHIP_ERROR EnumerateAcceptedCommands(const chip::app::ConcreteClusterPath& cluster, CommandIdCallback callback, - void* context) override - { - const chip::CommandId all_commands[] = { - 0, - 1, - 2, - 3, - 4, - 5, - 6, - 64, - 65, - 66, - }; - for (const auto& cmd : all_commands) { - if (callback(cmd, context) != chip::Loop::Continue) { - break; - } - } + return CHIP_NO_ERROR; + } - return CHIP_NO_ERROR; - } }; -class OnOffClusterCommandHandler : public command_translator_interface { -public: - OnOffClusterCommandHandler(const matter_node_state_monitor& node_state_monitor, UnifyMqtt& unify_mqtt, - group_translator& group_translator_m) - : command_translator_interface(node_state_monitor, chip::app::Clusters::OnOff::Id, "OnOff", unify_mqtt, group_translator_m) - { +class OnOffClusterCommandHandler : public command_translator_interface +{ + public: + OnOffClusterCommandHandler( + const matter_node_state_monitor &node_state_monitor, + UnifyMqtt &unify_mqtt, group_translator &group_translator_m) : + command_translator_interface(node_state_monitor, + chip::app::Clusters::OnOff::Id,"OnOff", unify_mqtt, group_translator_m) + {} + void InvokeCommand(chip::app::CommandHandlerInterface::HandlerContext + &HandlerContext) override; + + + + + + + + + + + virtual CHIP_ERROR EnumerateAcceptedCommands(const chip::app::ConcreteClusterPath & cluster, CommandIdCallback callback, void * context) override + { + const chip::CommandId all_commands[] = { 0,1,2,64,65,66, }; + for (const auto & cmd : all_commands ) + { + if (callback(cmd, context) != chip::Loop::Continue) + { + break; + } } - void InvokeCommand(chip::app::CommandHandlerInterface::HandlerContext& HandlerContext) override; - virtual CHIP_ERROR EnumerateAcceptedCommands(const chip::app::ConcreteClusterPath& cluster, CommandIdCallback callback, - void* context) override - { - const chip::CommandId all_commands[] = { - 0, - 1, - 2, - 64, - 65, - 66, - }; - for (const auto& cmd : all_commands) { - if (callback(cmd, context) != chip::Loop::Continue) { - break; - } - } + return CHIP_NO_ERROR; + } - return CHIP_NO_ERROR; - } }; -class LevelControlClusterCommandHandler : public command_translator_interface { -public: - LevelControlClusterCommandHandler(const matter_node_state_monitor& node_state_monitor, UnifyMqtt& unify_mqtt, - group_translator& group_translator_m) - : command_translator_interface(node_state_monitor, chip::app::Clusters::LevelControl::Id, "Level", unify_mqtt, - group_translator_m) - { +class LevelControlClusterCommandHandler : public command_translator_interface +{ + public: + LevelControlClusterCommandHandler( + const matter_node_state_monitor &node_state_monitor, + UnifyMqtt &unify_mqtt, group_translator &group_translator_m) : + command_translator_interface(node_state_monitor, + chip::app::Clusters::LevelControl::Id,"Level", unify_mqtt, group_translator_m) + {} + void InvokeCommand(chip::app::CommandHandlerInterface::HandlerContext + &HandlerContext) override; + + + + + + + + + + + + + + virtual CHIP_ERROR EnumerateAcceptedCommands(const chip::app::ConcreteClusterPath & cluster, CommandIdCallback callback, void * context) override + { + const chip::CommandId all_commands[] = { 0,1,2,3,4,5,6,7,8, }; + for (const auto & cmd : all_commands ) + { + if (callback(cmd, context) != chip::Loop::Continue) + { + break; + } } - void InvokeCommand(chip::app::CommandHandlerInterface::HandlerContext& HandlerContext) override; - virtual CHIP_ERROR EnumerateAcceptedCommands(const chip::app::ConcreteClusterPath& cluster, CommandIdCallback callback, - void* context) override - { - const chip::CommandId all_commands[] = { - 0, - 1, - 2, - 3, - 4, - 5, - 6, - 7, - 8, - }; - for (const auto& cmd : all_commands) { - if (callback(cmd, context) != chip::Loop::Continue) { - break; - } - } + return CHIP_NO_ERROR; + } - return CHIP_NO_ERROR; - } }; -class DoorLockClusterCommandHandler : public command_translator_interface { -public: - DoorLockClusterCommandHandler(const matter_node_state_monitor& node_state_monitor, UnifyMqtt& unify_mqtt, - group_translator& group_translator_m) - : command_translator_interface(node_state_monitor, chip::app::Clusters::DoorLock::Id, "DoorLock", unify_mqtt, - group_translator_m) - { +class DoorLockClusterCommandHandler : public command_translator_interface +{ + public: + DoorLockClusterCommandHandler( + const matter_node_state_monitor &node_state_monitor, + UnifyMqtt &unify_mqtt, group_translator &group_translator_m) : + command_translator_interface(node_state_monitor, + chip::app::Clusters::DoorLock::Id,"DoorLock", unify_mqtt, group_translator_m) + {} + void InvokeCommand(chip::app::CommandHandlerInterface::HandlerContext + &HandlerContext) override; + + + + + + + + + + + + + + + /// + /// The command SetUser is not defined in UCL and must be manually handled + /// + virtual void Invoke_SetUser( CommandHandlerInterface::HandlerContext &ctxt, chip::app::Clusters::DoorLock::Commands::SetUser::DecodableType data) + { + ctxt.mCommandHandler.AddStatus(ctxt.mRequestPath, chip::Protocols::InteractionModel::Status::UnsupportedCommand); + ctxt.SetCommandHandled(); + }; + /// + /// The command GetUser is not defined in UCL and must be manually handled + /// + virtual void Invoke_GetUser( CommandHandlerInterface::HandlerContext &ctxt, chip::app::Clusters::DoorLock::Commands::GetUser::DecodableType data) + { + ctxt.mCommandHandler.AddStatus(ctxt.mRequestPath, chip::Protocols::InteractionModel::Status::UnsupportedCommand); + ctxt.SetCommandHandled(); + }; + /// + /// The command ClearUser is not defined in UCL and must be manually handled + /// + virtual void Invoke_ClearUser( CommandHandlerInterface::HandlerContext &ctxt, chip::app::Clusters::DoorLock::Commands::ClearUser::DecodableType data) + { + ctxt.mCommandHandler.AddStatus(ctxt.mRequestPath, chip::Protocols::InteractionModel::Status::UnsupportedCommand); + ctxt.SetCommandHandled(); + }; + /// + /// The command SetCredential is not defined in UCL and must be manually handled + /// + virtual void Invoke_SetCredential( CommandHandlerInterface::HandlerContext &ctxt, chip::app::Clusters::DoorLock::Commands::SetCredential::DecodableType data) + { + ctxt.mCommandHandler.AddStatus(ctxt.mRequestPath, chip::Protocols::InteractionModel::Status::UnsupportedCommand); + ctxt.SetCommandHandled(); + }; + /// + /// The command GetCredentialStatus is not defined in UCL and must be manually handled + /// + virtual void Invoke_GetCredentialStatus( CommandHandlerInterface::HandlerContext &ctxt, chip::app::Clusters::DoorLock::Commands::GetCredentialStatus::DecodableType data) + { + ctxt.mCommandHandler.AddStatus(ctxt.mRequestPath, chip::Protocols::InteractionModel::Status::UnsupportedCommand); + ctxt.SetCommandHandled(); + }; + /// + /// The command ClearCredential is not defined in UCL and must be manually handled + /// + virtual void Invoke_ClearCredential( CommandHandlerInterface::HandlerContext &ctxt, chip::app::Clusters::DoorLock::Commands::ClearCredential::DecodableType data) + { + ctxt.mCommandHandler.AddStatus(ctxt.mRequestPath, chip::Protocols::InteractionModel::Status::UnsupportedCommand); + ctxt.SetCommandHandled(); + }; + + + virtual CHIP_ERROR EnumerateAcceptedCommands(const chip::app::ConcreteClusterPath & cluster, CommandIdCallback callback, void * context) override + { + const chip::CommandId all_commands[] = { 0,1,3,11,12,13,14,15,16,17,18,19,26,27,29,34,36,38, }; + for (const auto & cmd : all_commands ) + { + if (callback(cmd, context) != chip::Loop::Continue) + { + break; + } } - void InvokeCommand(chip::app::CommandHandlerInterface::HandlerContext& HandlerContext) override; - /// - /// The command SetUser is not defined in UCL and must be manually handled - /// - virtual void Invoke_SetUser(CommandHandlerInterface::HandlerContext& ctxt, - chip::app::Clusters::DoorLock::Commands::SetUser::DecodableType data) - { - ctxt.mCommandHandler.AddStatus(ctxt.mRequestPath, chip::Protocols::InteractionModel::Status::UnsupportedCommand); - ctxt.SetCommandHandled(); - }; - /// - /// The command GetUser is not defined in UCL and must be manually handled - /// - virtual void Invoke_GetUser(CommandHandlerInterface::HandlerContext& ctxt, - chip::app::Clusters::DoorLock::Commands::GetUser::DecodableType data) - { - ctxt.mCommandHandler.AddStatus(ctxt.mRequestPath, chip::Protocols::InteractionModel::Status::UnsupportedCommand); - ctxt.SetCommandHandled(); - }; - /// - /// The command ClearUser is not defined in UCL and must be manually handled - /// - virtual void Invoke_ClearUser(CommandHandlerInterface::HandlerContext& ctxt, - chip::app::Clusters::DoorLock::Commands::ClearUser::DecodableType data) - { - ctxt.mCommandHandler.AddStatus(ctxt.mRequestPath, chip::Protocols::InteractionModel::Status::UnsupportedCommand); - ctxt.SetCommandHandled(); - }; - /// - /// The command SetCredential is not defined in UCL and must be manually handled - /// - virtual void Invoke_SetCredential(CommandHandlerInterface::HandlerContext& ctxt, - chip::app::Clusters::DoorLock::Commands::SetCredential::DecodableType data) - { - ctxt.mCommandHandler.AddStatus(ctxt.mRequestPath, chip::Protocols::InteractionModel::Status::UnsupportedCommand); - ctxt.SetCommandHandled(); - }; - /// - /// The command GetCredentialStatus is not defined in UCL and must be manually handled - /// - virtual void Invoke_GetCredentialStatus(CommandHandlerInterface::HandlerContext& ctxt, - chip::app::Clusters::DoorLock::Commands::GetCredentialStatus::DecodableType data) - { - ctxt.mCommandHandler.AddStatus(ctxt.mRequestPath, chip::Protocols::InteractionModel::Status::UnsupportedCommand); - ctxt.SetCommandHandled(); - }; - /// - /// The command ClearCredential is not defined in UCL and must be manually handled - /// - virtual void Invoke_ClearCredential(CommandHandlerInterface::HandlerContext& ctxt, - chip::app::Clusters::DoorLock::Commands::ClearCredential::DecodableType data) - { - ctxt.mCommandHandler.AddStatus(ctxt.mRequestPath, chip::Protocols::InteractionModel::Status::UnsupportedCommand); - ctxt.SetCommandHandled(); - }; + return CHIP_NO_ERROR; + } - virtual CHIP_ERROR EnumerateAcceptedCommands(const chip::app::ConcreteClusterPath& cluster, CommandIdCallback callback, - void* context) override - { - const chip::CommandId all_commands[] = { - 0, - 1, - 3, - 11, - 12, - 13, - 14, - 15, - 16, - 17, - 18, - 19, - 26, - 27, - 29, - 34, - 36, - 38, - }; - for (const auto& cmd : all_commands) { - if (callback(cmd, context) != chip::Loop::Continue) { - break; - } - } - - return CHIP_NO_ERROR; - } }; -class BarrierControlClusterCommandHandler : public command_translator_interface { -public: - BarrierControlClusterCommandHandler(const matter_node_state_monitor& node_state_monitor, UnifyMqtt& unify_mqtt, - group_translator& group_translator_m) - : command_translator_interface(node_state_monitor, chip::app::Clusters::BarrierControl::Id, "BarrierControl", unify_mqtt, - group_translator_m) - { +class BarrierControlClusterCommandHandler : public command_translator_interface +{ + public: + BarrierControlClusterCommandHandler( + const matter_node_state_monitor &node_state_monitor, + UnifyMqtt &unify_mqtt, group_translator &group_translator_m) : + command_translator_interface(node_state_monitor, + chip::app::Clusters::BarrierControl::Id,"BarrierControl", unify_mqtt, group_translator_m) + {} + void InvokeCommand(chip::app::CommandHandlerInterface::HandlerContext + &HandlerContext) override; + + + + + + + virtual CHIP_ERROR EnumerateAcceptedCommands(const chip::app::ConcreteClusterPath & cluster, CommandIdCallback callback, void * context) override + { + const chip::CommandId all_commands[] = { 0,1, }; + for (const auto & cmd : all_commands ) + { + if (callback(cmd, context) != chip::Loop::Continue) + { + break; + } } - void InvokeCommand(chip::app::CommandHandlerInterface::HandlerContext& HandlerContext) override; - virtual CHIP_ERROR EnumerateAcceptedCommands(const chip::app::ConcreteClusterPath& cluster, CommandIdCallback callback, - void* context) override - { - const chip::CommandId all_commands[] = { - 0, - 1, - }; - for (const auto& cmd : all_commands) { - if (callback(cmd, context) != chip::Loop::Continue) { - break; - } - } + return CHIP_NO_ERROR; + } - return CHIP_NO_ERROR; - } }; -class ThermostatClusterCommandHandler : public command_translator_interface { -public: - ThermostatClusterCommandHandler(const matter_node_state_monitor& node_state_monitor, UnifyMqtt& unify_mqtt, - group_translator& group_translator_m) - : command_translator_interface(node_state_monitor, chip::app::Clusters::Thermostat::Id, "Thermostat", unify_mqtt, - group_translator_m) - { +class ThermostatClusterCommandHandler : public command_translator_interface +{ + public: + ThermostatClusterCommandHandler( + const matter_node_state_monitor &node_state_monitor, + UnifyMqtt &unify_mqtt, group_translator &group_translator_m) : + command_translator_interface(node_state_monitor, + chip::app::Clusters::Thermostat::Id,"Thermostat", unify_mqtt, group_translator_m) + {} + void InvokeCommand(chip::app::CommandHandlerInterface::HandlerContext + &HandlerContext) override; + + + + + + + + + virtual CHIP_ERROR EnumerateAcceptedCommands(const chip::app::ConcreteClusterPath & cluster, CommandIdCallback callback, void * context) override + { + const chip::CommandId all_commands[] = { 0,1,2,3, }; + for (const auto & cmd : all_commands ) + { + if (callback(cmd, context) != chip::Loop::Continue) + { + break; + } } - void InvokeCommand(chip::app::CommandHandlerInterface::HandlerContext& HandlerContext) override; - virtual CHIP_ERROR EnumerateAcceptedCommands(const chip::app::ConcreteClusterPath& cluster, CommandIdCallback callback, - void* context) override - { - const chip::CommandId all_commands[] = { - 0, - 1, - 2, - 3, - }; - for (const auto& cmd : all_commands) { - if (callback(cmd, context) != chip::Loop::Continue) { - break; - } - } + return CHIP_NO_ERROR; + } - return CHIP_NO_ERROR; - } }; -class FanControlClusterCommandHandler : public command_translator_interface { -public: - FanControlClusterCommandHandler(const matter_node_state_monitor& node_state_monitor, UnifyMqtt& unify_mqtt, - group_translator& group_translator_m) - : command_translator_interface(node_state_monitor, chip::app::Clusters::FanControl::Id, "FanControl", unify_mqtt, - group_translator_m) - { +class FanControlClusterCommandHandler : public command_translator_interface +{ + public: + FanControlClusterCommandHandler( + const matter_node_state_monitor &node_state_monitor, + UnifyMqtt &unify_mqtt, group_translator &group_translator_m) : + command_translator_interface(node_state_monitor, + chip::app::Clusters::FanControl::Id,"FanControl", unify_mqtt, group_translator_m) + {} + void InvokeCommand(chip::app::CommandHandlerInterface::HandlerContext + &HandlerContext) override; + + + + + virtual CHIP_ERROR EnumerateAcceptedCommands(const chip::app::ConcreteClusterPath & cluster, CommandIdCallback callback, void * context) override + { + const chip::CommandId all_commands[] = { }; + for (const auto & cmd : all_commands ) + { + if (callback(cmd, context) != chip::Loop::Continue) + { + break; + } } - void InvokeCommand(chip::app::CommandHandlerInterface::HandlerContext& HandlerContext) override; - virtual CHIP_ERROR EnumerateAcceptedCommands(const chip::app::ConcreteClusterPath& cluster, CommandIdCallback callback, - void* context) override - { - const chip::CommandId all_commands[] = {}; - for (const auto& cmd : all_commands) { - if (callback(cmd, context) != chip::Loop::Continue) { - break; - } - } + return CHIP_NO_ERROR; + } - return CHIP_NO_ERROR; - } }; -class ThermostatUserInterfaceConfigurationClusterCommandHandler : public command_translator_interface { -public: - ThermostatUserInterfaceConfigurationClusterCommandHandler(const matter_node_state_monitor& node_state_monitor, - UnifyMqtt& unify_mqtt, group_translator& group_translator_m) - : command_translator_interface(node_state_monitor, chip::app::Clusters::ThermostatUserInterfaceConfiguration::Id, - "ThermostatUserInterfaceConfiguration", unify_mqtt, group_translator_m) - { +class ThermostatUserInterfaceConfigurationClusterCommandHandler : public command_translator_interface +{ + public: + ThermostatUserInterfaceConfigurationClusterCommandHandler( + const matter_node_state_monitor &node_state_monitor, + UnifyMqtt &unify_mqtt, group_translator &group_translator_m) : + command_translator_interface(node_state_monitor, + chip::app::Clusters::ThermostatUserInterfaceConfiguration::Id,"ThermostatUserInterfaceConfiguration", unify_mqtt, group_translator_m) + {} + void InvokeCommand(chip::app::CommandHandlerInterface::HandlerContext + &HandlerContext) override; + + + + + virtual CHIP_ERROR EnumerateAcceptedCommands(const chip::app::ConcreteClusterPath & cluster, CommandIdCallback callback, void * context) override + { + const chip::CommandId all_commands[] = { }; + for (const auto & cmd : all_commands ) + { + if (callback(cmd, context) != chip::Loop::Continue) + { + break; + } } - void InvokeCommand(chip::app::CommandHandlerInterface::HandlerContext& HandlerContext) override; - virtual CHIP_ERROR EnumerateAcceptedCommands(const chip::app::ConcreteClusterPath& cluster, CommandIdCallback callback, - void* context) override - { - const chip::CommandId all_commands[] = {}; - for (const auto& cmd : all_commands) { - if (callback(cmd, context) != chip::Loop::Continue) { - break; - } - } + return CHIP_NO_ERROR; + } - return CHIP_NO_ERROR; - } }; -class ColorControlClusterCommandHandler : public command_translator_interface { -public: - ColorControlClusterCommandHandler(const matter_node_state_monitor& node_state_monitor, UnifyMqtt& unify_mqtt, - group_translator& group_translator_m) - : command_translator_interface(node_state_monitor, chip::app::Clusters::ColorControl::Id, "ColorControl", unify_mqtt, - group_translator_m) - { +class ColorControlClusterCommandHandler : public command_translator_interface +{ + public: + ColorControlClusterCommandHandler( + const matter_node_state_monitor &node_state_monitor, + UnifyMqtt &unify_mqtt, group_translator &group_translator_m) : + command_translator_interface(node_state_monitor, + chip::app::Clusters::ColorControl::Id,"ColorControl", unify_mqtt, group_translator_m) + {} + void InvokeCommand(chip::app::CommandHandlerInterface::HandlerContext + &HandlerContext) override; + + + + + + + + + + + + + + + + + + + + + + + + virtual CHIP_ERROR EnumerateAcceptedCommands(const chip::app::ConcreteClusterPath & cluster, CommandIdCallback callback, void * context) override + { + const chip::CommandId all_commands[] = { 0,1,2,3,4,5,6,7,8,9,10,64,65,66,67,68,71,75,76, }; + for (const auto & cmd : all_commands ) + { + if (callback(cmd, context) != chip::Loop::Continue) + { + break; + } } - void InvokeCommand(chip::app::CommandHandlerInterface::HandlerContext& HandlerContext) override; - virtual CHIP_ERROR EnumerateAcceptedCommands(const chip::app::ConcreteClusterPath& cluster, CommandIdCallback callback, - void* context) override - { - const chip::CommandId all_commands[] = { - 0, - 1, - 2, - 3, - 4, - 5, - 6, - 7, - 8, - 9, - 10, - 64, - 65, - 66, - 67, - 68, - 71, - 75, - 76, - }; - for (const auto& cmd : all_commands) { - if (callback(cmd, context) != chip::Loop::Continue) { - break; - } - } + return CHIP_NO_ERROR; + } - return CHIP_NO_ERROR; - } }; -class IlluminanceMeasurementClusterCommandHandler : public command_translator_interface { -public: - IlluminanceMeasurementClusterCommandHandler(const matter_node_state_monitor& node_state_monitor, UnifyMqtt& unify_mqtt, - group_translator& group_translator_m) - : command_translator_interface(node_state_monitor, chip::app::Clusters::IlluminanceMeasurement::Id, "IlluminanceMeasurement", - unify_mqtt, group_translator_m) - { +class IlluminanceMeasurementClusterCommandHandler : public command_translator_interface +{ + public: + IlluminanceMeasurementClusterCommandHandler( + const matter_node_state_monitor &node_state_monitor, + UnifyMqtt &unify_mqtt, group_translator &group_translator_m) : + command_translator_interface(node_state_monitor, + chip::app::Clusters::IlluminanceMeasurement::Id,"IlluminanceMeasurement", unify_mqtt, group_translator_m) + {} + void InvokeCommand(chip::app::CommandHandlerInterface::HandlerContext + &HandlerContext) override; + + + + + virtual CHIP_ERROR EnumerateAcceptedCommands(const chip::app::ConcreteClusterPath & cluster, CommandIdCallback callback, void * context) override + { + const chip::CommandId all_commands[] = { }; + for (const auto & cmd : all_commands ) + { + if (callback(cmd, context) != chip::Loop::Continue) + { + break; + } } - void InvokeCommand(chip::app::CommandHandlerInterface::HandlerContext& HandlerContext) override; - virtual CHIP_ERROR EnumerateAcceptedCommands(const chip::app::ConcreteClusterPath& cluster, CommandIdCallback callback, - void* context) override - { - const chip::CommandId all_commands[] = {}; - for (const auto& cmd : all_commands) { - if (callback(cmd, context) != chip::Loop::Continue) { - break; - } - } + return CHIP_NO_ERROR; + } - return CHIP_NO_ERROR; - } }; -class TemperatureMeasurementClusterCommandHandler : public command_translator_interface { -public: - TemperatureMeasurementClusterCommandHandler(const matter_node_state_monitor& node_state_monitor, UnifyMqtt& unify_mqtt, - group_translator& group_translator_m) - : command_translator_interface(node_state_monitor, chip::app::Clusters::TemperatureMeasurement::Id, "TemperatureMeasurement", - unify_mqtt, group_translator_m) - { +class TemperatureMeasurementClusterCommandHandler : public command_translator_interface +{ + public: + TemperatureMeasurementClusterCommandHandler( + const matter_node_state_monitor &node_state_monitor, + UnifyMqtt &unify_mqtt, group_translator &group_translator_m) : + command_translator_interface(node_state_monitor, + chip::app::Clusters::TemperatureMeasurement::Id,"TemperatureMeasurement", unify_mqtt, group_translator_m) + {} + void InvokeCommand(chip::app::CommandHandlerInterface::HandlerContext + &HandlerContext) override; + + + + + virtual CHIP_ERROR EnumerateAcceptedCommands(const chip::app::ConcreteClusterPath & cluster, CommandIdCallback callback, void * context) override + { + const chip::CommandId all_commands[] = { }; + for (const auto & cmd : all_commands ) + { + if (callback(cmd, context) != chip::Loop::Continue) + { + break; + } } - void InvokeCommand(chip::app::CommandHandlerInterface::HandlerContext& HandlerContext) override; - virtual CHIP_ERROR EnumerateAcceptedCommands(const chip::app::ConcreteClusterPath& cluster, CommandIdCallback callback, - void* context) override - { - const chip::CommandId all_commands[] = {}; - for (const auto& cmd : all_commands) { - if (callback(cmd, context) != chip::Loop::Continue) { - break; - } - } + return CHIP_NO_ERROR; + } - return CHIP_NO_ERROR; - } }; -class PressureMeasurementClusterCommandHandler : public command_translator_interface { -public: - PressureMeasurementClusterCommandHandler(const matter_node_state_monitor& node_state_monitor, UnifyMqtt& unify_mqtt, - group_translator& group_translator_m) - : command_translator_interface(node_state_monitor, chip::app::Clusters::PressureMeasurement::Id, "PressureMeasurement", - unify_mqtt, group_translator_m) - { +class PressureMeasurementClusterCommandHandler : public command_translator_interface +{ + public: + PressureMeasurementClusterCommandHandler( + const matter_node_state_monitor &node_state_monitor, + UnifyMqtt &unify_mqtt, group_translator &group_translator_m) : + command_translator_interface(node_state_monitor, + chip::app::Clusters::PressureMeasurement::Id,"PressureMeasurement", unify_mqtt, group_translator_m) + {} + void InvokeCommand(chip::app::CommandHandlerInterface::HandlerContext + &HandlerContext) override; + + + + + virtual CHIP_ERROR EnumerateAcceptedCommands(const chip::app::ConcreteClusterPath & cluster, CommandIdCallback callback, void * context) override + { + const chip::CommandId all_commands[] = { }; + for (const auto & cmd : all_commands ) + { + if (callback(cmd, context) != chip::Loop::Continue) + { + break; + } } - void InvokeCommand(chip::app::CommandHandlerInterface::HandlerContext& HandlerContext) override; - virtual CHIP_ERROR EnumerateAcceptedCommands(const chip::app::ConcreteClusterPath& cluster, CommandIdCallback callback, - void* context) override - { - const chip::CommandId all_commands[] = {}; - for (const auto& cmd : all_commands) { - if (callback(cmd, context) != chip::Loop::Continue) { - break; - } - } + return CHIP_NO_ERROR; + } - return CHIP_NO_ERROR; - } }; -class RelativeHumidityMeasurementClusterCommandHandler : public command_translator_interface { -public: - RelativeHumidityMeasurementClusterCommandHandler(const matter_node_state_monitor& node_state_monitor, UnifyMqtt& unify_mqtt, - group_translator& group_translator_m) - : command_translator_interface(node_state_monitor, chip::app::Clusters::RelativeHumidityMeasurement::Id, "RelativityHumidity", - unify_mqtt, group_translator_m) - { +class RelativeHumidityMeasurementClusterCommandHandler : public command_translator_interface +{ + public: + RelativeHumidityMeasurementClusterCommandHandler( + const matter_node_state_monitor &node_state_monitor, + UnifyMqtt &unify_mqtt, group_translator &group_translator_m) : + command_translator_interface(node_state_monitor, + chip::app::Clusters::RelativeHumidityMeasurement::Id,"RelativityHumidity", unify_mqtt, group_translator_m) + {} + void InvokeCommand(chip::app::CommandHandlerInterface::HandlerContext + &HandlerContext) override; + + + + + virtual CHIP_ERROR EnumerateAcceptedCommands(const chip::app::ConcreteClusterPath & cluster, CommandIdCallback callback, void * context) override + { + const chip::CommandId all_commands[] = { }; + for (const auto & cmd : all_commands ) + { + if (callback(cmd, context) != chip::Loop::Continue) + { + break; + } } - void InvokeCommand(chip::app::CommandHandlerInterface::HandlerContext& HandlerContext) override; - virtual CHIP_ERROR EnumerateAcceptedCommands(const chip::app::ConcreteClusterPath& cluster, CommandIdCallback callback, - void* context) override - { - const chip::CommandId all_commands[] = {}; - for (const auto& cmd : all_commands) { - if (callback(cmd, context) != chip::Loop::Continue) { - break; - } - } + return CHIP_NO_ERROR; + } - return CHIP_NO_ERROR; - } }; -class OccupancySensingClusterCommandHandler : public command_translator_interface { -public: - OccupancySensingClusterCommandHandler(const matter_node_state_monitor& node_state_monitor, UnifyMqtt& unify_mqtt, - group_translator& group_translator_m) - : command_translator_interface(node_state_monitor, chip::app::Clusters::OccupancySensing::Id, "OccupancySensing", unify_mqtt, - group_translator_m) - { +class OccupancySensingClusterCommandHandler : public command_translator_interface +{ + public: + OccupancySensingClusterCommandHandler( + const matter_node_state_monitor &node_state_monitor, + UnifyMqtt &unify_mqtt, group_translator &group_translator_m) : + command_translator_interface(node_state_monitor, + chip::app::Clusters::OccupancySensing::Id,"OccupancySensing", unify_mqtt, group_translator_m) + {} + void InvokeCommand(chip::app::CommandHandlerInterface::HandlerContext + &HandlerContext) override; + + + + + virtual CHIP_ERROR EnumerateAcceptedCommands(const chip::app::ConcreteClusterPath & cluster, CommandIdCallback callback, void * context) override + { + const chip::CommandId all_commands[] = { }; + for (const auto & cmd : all_commands ) + { + if (callback(cmd, context) != chip::Loop::Continue) + { + break; + } } - void InvokeCommand(chip::app::CommandHandlerInterface::HandlerContext& HandlerContext) override; - virtual CHIP_ERROR EnumerateAcceptedCommands(const chip::app::ConcreteClusterPath& cluster, CommandIdCallback callback, - void* context) override - { - const chip::CommandId all_commands[] = {}; - for (const auto& cmd : all_commands) { - if (callback(cmd, context) != chip::Loop::Continue) { - break; - } - } + return CHIP_NO_ERROR; + } - return CHIP_NO_ERROR; - } }; -class ElectricalMeasurementClusterCommandHandler : public command_translator_interface { -public: - ElectricalMeasurementClusterCommandHandler(const matter_node_state_monitor& node_state_monitor, UnifyMqtt& unify_mqtt, - group_translator& group_translator_m) - : command_translator_interface(node_state_monitor, chip::app::Clusters::ElectricalMeasurement::Id, "ElectricalMeasurement", - unify_mqtt, group_translator_m) - { +class ElectricalMeasurementClusterCommandHandler : public command_translator_interface +{ + public: + ElectricalMeasurementClusterCommandHandler( + const matter_node_state_monitor &node_state_monitor, + UnifyMqtt &unify_mqtt, group_translator &group_translator_m) : + command_translator_interface(node_state_monitor, + chip::app::Clusters::ElectricalMeasurement::Id,"ElectricalMeasurement", unify_mqtt, group_translator_m) + {} + void InvokeCommand(chip::app::CommandHandlerInterface::HandlerContext + &HandlerContext) override; + + + + + + + virtual CHIP_ERROR EnumerateAcceptedCommands(const chip::app::ConcreteClusterPath & cluster, CommandIdCallback callback, void * context) override + { + const chip::CommandId all_commands[] = { 0,1, }; + for (const auto & cmd : all_commands ) + { + if (callback(cmd, context) != chip::Loop::Continue) + { + break; + } } - void InvokeCommand(chip::app::CommandHandlerInterface::HandlerContext& HandlerContext) override; - virtual CHIP_ERROR EnumerateAcceptedCommands(const chip::app::ConcreteClusterPath& cluster, CommandIdCallback callback, - void* context) override - { - const chip::CommandId all_commands[] = { - 0, - 1, - }; - for (const auto& cmd : all_commands) { - if (callback(cmd, context) != chip::Loop::Continue) { - break; - } - } + return CHIP_NO_ERROR; + } - return CHIP_NO_ERROR; - } }; -} // namespace unify::matter_bridge +} // namespace unify::matter_bridge -#endif // COMMAND_TRANSLATOR_HPP +#endif //COMMAND_TRANSLATOR_HPP /** @} end command_translator */ diff --git a/silabs_examples/unify-matter-bridge/linux/zap-generated/data_model_translator/device-type-mapper/matter_id_model.inc b/silabs_examples/unify-matter-bridge/linux/zap-generated/data_model_translator/device-type-mapper/matter_id_model.inc index 556787442d0aea..06efddfefc8ba7 100644 --- a/silabs_examples/unify-matter-bridge/linux/zap-generated/data_model_translator/device-type-mapper/matter_id_model.inc +++ b/silabs_examples/unify-matter-bridge/linux/zap-generated/data_model_translator/device-type-mapper/matter_id_model.inc @@ -17,2470 +17,2502 @@ // Component include #include -// Standard library -#include +// Standard library #include +#include #include // Matter includes -#include #include +#include #include // Cluster mapping Matter namespace chip { namespace app { - namespace Clusters { +namespace Clusters { + +static const std::unordered_map matter_cluster_id_map { + { "Identify", Identify::Id}, + { "Groups", Groups::Id}, + { "Scenes", Scenes::Id}, + { "OnOff", OnOff::Id}, + { "OnOffSwitchConfiguration", OnOffSwitchConfiguration::Id}, + { "LevelControl", LevelControl::Id}, + { "BinaryInputBasic", BinaryInputBasic::Id}, + { "PulseWidthModulation", PulseWidthModulation::Id}, + { "Descriptor", Descriptor::Id}, + { "Binding", Binding::Id}, + { "AccessControl", AccessControl::Id}, + { "Actions", Actions::Id}, + { "Basic", Basic::Id}, + { "OtaSoftwareUpdateProvider", OtaSoftwareUpdateProvider::Id}, + { "OtaSoftwareUpdateRequestor", OtaSoftwareUpdateRequestor::Id}, + { "LocalizationConfiguration", LocalizationConfiguration::Id}, + { "TimeFormatLocalization", TimeFormatLocalization::Id}, + { "UnitLocalization", UnitLocalization::Id}, + { "PowerSourceConfiguration", PowerSourceConfiguration::Id}, + { "PowerSource", PowerSource::Id}, + { "GeneralCommissioning", GeneralCommissioning::Id}, + { "NetworkCommissioning", NetworkCommissioning::Id}, + { "DiagnosticLogs", DiagnosticLogs::Id}, + { "GeneralDiagnostics", GeneralDiagnostics::Id}, + { "SoftwareDiagnostics", SoftwareDiagnostics::Id}, + { "ThreadNetworkDiagnostics", ThreadNetworkDiagnostics::Id}, + { "WiFiNetworkDiagnostics", WiFiNetworkDiagnostics::Id}, + { "EthernetNetworkDiagnostics", EthernetNetworkDiagnostics::Id}, + { "TimeSynchronization", TimeSynchronization::Id}, + { "BridgedDeviceBasic", BridgedDeviceBasic::Id}, + { "Switch", Switch::Id}, + { "AdministratorCommissioning", AdministratorCommissioning::Id}, + { "OperationalCredentials", OperationalCredentials::Id}, + { "GroupKeyManagement", GroupKeyManagement::Id}, + { "FixedLabel", FixedLabel::Id}, + { "UserLabel", UserLabel::Id}, + { "ProxyConfiguration", ProxyConfiguration::Id}, + { "ProxyDiscovery", ProxyDiscovery::Id}, + { "ProxyValid", ProxyValid::Id}, + { "BooleanState", BooleanState::Id}, + { "ModeSelect", ModeSelect::Id}, + { "DoorLock", DoorLock::Id}, + { "WindowCovering", WindowCovering::Id}, + { "BarrierControl", BarrierControl::Id}, + { "PumpConfigurationAndControl", PumpConfigurationAndControl::Id}, + { "Thermostat", Thermostat::Id}, + { "FanControl", FanControl::Id}, + { "ThermostatUserInterfaceConfiguration", ThermostatUserInterfaceConfiguration::Id}, + { "ColorControl", ColorControl::Id}, + { "BallastConfiguration", BallastConfiguration::Id}, + { "IlluminanceMeasurement", IlluminanceMeasurement::Id}, + { "TemperatureMeasurement", TemperatureMeasurement::Id}, + { "PressureMeasurement", PressureMeasurement::Id}, + { "FlowMeasurement", FlowMeasurement::Id}, + { "RelativeHumidityMeasurement", RelativeHumidityMeasurement::Id}, + { "OccupancySensing", OccupancySensing::Id}, + { "WakeOnLan", WakeOnLan::Id}, + { "Channel", Channel::Id}, + { "TargetNavigator", TargetNavigator::Id}, + { "MediaPlayback", MediaPlayback::Id}, + { "MediaInput", MediaInput::Id}, + { "LowPower", LowPower::Id}, + { "KeypadInput", KeypadInput::Id}, + { "ContentLauncher", ContentLauncher::Id}, + { "AudioOutput", AudioOutput::Id}, + { "ApplicationLauncher", ApplicationLauncher::Id}, + { "ApplicationBasic", ApplicationBasic::Id}, + { "AccountLogin", AccountLogin::Id}, + { "ElectricalMeasurement", ElectricalMeasurement::Id}, + { "ClientMonitoring", ClientMonitoring::Id}, + { "UnitTesting", UnitTesting::Id}, + { "FaultInjection", FaultInjection::Id} +}; - static const std::unordered_map matter_cluster_id_map { - { "Identify", Identify::Id }, - { "Groups", Groups::Id }, - { "Scenes", Scenes::Id }, - { "OnOff", OnOff::Id }, - { "OnOffSwitchConfiguration", OnOffSwitchConfiguration::Id }, - { "LevelControl", LevelControl::Id }, - { "BinaryInputBasic", BinaryInputBasic::Id }, - { "PulseWidthModulation", PulseWidthModulation::Id }, - { "Descriptor", Descriptor::Id }, - { "Binding", Binding::Id }, - { "AccessControl", AccessControl::Id }, - { "Actions", Actions::Id }, - { "Basic", Basic::Id }, - { "OtaSoftwareUpdateProvider", OtaSoftwareUpdateProvider::Id }, - { "OtaSoftwareUpdateRequestor", OtaSoftwareUpdateRequestor::Id }, - { "LocalizationConfiguration", LocalizationConfiguration::Id }, - { "TimeFormatLocalization", TimeFormatLocalization::Id }, - { "UnitLocalization", UnitLocalization::Id }, - { "PowerSourceConfiguration", PowerSourceConfiguration::Id }, - { "PowerSource", PowerSource::Id }, - { "GeneralCommissioning", GeneralCommissioning::Id }, - { "NetworkCommissioning", NetworkCommissioning::Id }, - { "DiagnosticLogs", DiagnosticLogs::Id }, - { "GeneralDiagnostics", GeneralDiagnostics::Id }, - { "SoftwareDiagnostics", SoftwareDiagnostics::Id }, - { "ThreadNetworkDiagnostics", ThreadNetworkDiagnostics::Id }, - { "WiFiNetworkDiagnostics", WiFiNetworkDiagnostics::Id }, - { "EthernetNetworkDiagnostics", EthernetNetworkDiagnostics::Id }, - { "TimeSynchronization", TimeSynchronization::Id }, - { "BridgedDeviceBasic", BridgedDeviceBasic::Id }, - { "Switch", Switch::Id }, - { "AdministratorCommissioning", AdministratorCommissioning::Id }, - { "OperationalCredentials", OperationalCredentials::Id }, - { "GroupKeyManagement", GroupKeyManagement::Id }, - { "FixedLabel", FixedLabel::Id }, - { "UserLabel", UserLabel::Id }, - { "ProxyConfiguration", ProxyConfiguration::Id }, - { "ProxyDiscovery", ProxyDiscovery::Id }, - { "ProxyValid", ProxyValid::Id }, - { "BooleanState", BooleanState::Id }, - { "ModeSelect", ModeSelect::Id }, - { "DoorLock", DoorLock::Id }, - { "WindowCovering", WindowCovering::Id }, - { "BarrierControl", BarrierControl::Id }, - { "PumpConfigurationAndControl", PumpConfigurationAndControl::Id }, - { "Thermostat", Thermostat::Id }, - { "FanControl", FanControl::Id }, - { "ThermostatUserInterfaceConfiguration", ThermostatUserInterfaceConfiguration::Id }, - { "ColorControl", ColorControl::Id }, - { "BallastConfiguration", BallastConfiguration::Id }, - { "IlluminanceMeasurement", IlluminanceMeasurement::Id }, - { "TemperatureMeasurement", TemperatureMeasurement::Id }, - { "PressureMeasurement", PressureMeasurement::Id }, - { "FlowMeasurement", FlowMeasurement::Id }, - { "RelativeHumidityMeasurement", RelativeHumidityMeasurement::Id }, - { "OccupancySensing", OccupancySensing::Id }, - { "WakeOnLan", WakeOnLan::Id }, - { "Channel", Channel::Id }, - { "TargetNavigator", TargetNavigator::Id }, - { "MediaPlayback", MediaPlayback::Id }, - { "MediaInput", MediaInput::Id }, - { "LowPower", LowPower::Id }, - { "KeypadInput", KeypadInput::Id }, - { "ContentLauncher", ContentLauncher::Id }, - { "AudioOutput", AudioOutput::Id }, - { "ApplicationLauncher", ApplicationLauncher::Id }, - { "ApplicationBasic", ApplicationBasic::Id }, - { "AccountLogin", AccountLogin::Id }, - { "ElectricalMeasurement", ElectricalMeasurement::Id }, - { "ClientMonitoring", ClientMonitoring::Id }, - { "UnitTesting", UnitTesting::Id }, - { "FaultInjection", FaultInjection::Id } - }; +// Attribute mapping Matter +// Attribute structure for each cluster +namespace Identify { +namespace Attributes { +static const std::unordered_map matter_attribute_id_cluster_map { + { "IdentifyTime", IdentifyTime::Id }, + { "IdentifyType", IdentifyType::Id }, + { "GeneratedCommandList", GeneratedCommandList::Id }, + { "AcceptedCommandList", AcceptedCommandList::Id }, + { "AttributeList", AttributeList::Id }, + { "FeatureMap", FeatureMap::Id }, + { "ClusterRevision", ClusterRevision::Id } +}; +} // namespace Attributes +} // namespace Identify +namespace Groups { +namespace Attributes { +static const std::unordered_map matter_attribute_id_cluster_map { + { "NameSupport", NameSupport::Id }, + { "GeneratedCommandList", GeneratedCommandList::Id }, + { "AcceptedCommandList", AcceptedCommandList::Id }, + { "AttributeList", AttributeList::Id }, + { "FeatureMap", FeatureMap::Id }, + { "ClusterRevision", ClusterRevision::Id } +}; +} // namespace Attributes +} // namespace Groups +namespace Scenes { +namespace Attributes { +static const std::unordered_map matter_attribute_id_cluster_map { + { "SceneCount", SceneCount::Id }, + { "CurrentScene", CurrentScene::Id }, + { "CurrentGroup", CurrentGroup::Id }, + { "SceneValid", SceneValid::Id }, + { "NameSupport", NameSupport::Id }, + { "LastConfiguredBy", LastConfiguredBy::Id }, + { "GeneratedCommandList", GeneratedCommandList::Id }, + { "AcceptedCommandList", AcceptedCommandList::Id }, + { "AttributeList", AttributeList::Id }, + { "FeatureMap", FeatureMap::Id }, + { "ClusterRevision", ClusterRevision::Id } +}; +} // namespace Attributes +} // namespace Scenes +namespace OnOff { +namespace Attributes { +static const std::unordered_map matter_attribute_id_cluster_map { + { "OnOff", OnOff::Id }, + { "GlobalSceneControl", GlobalSceneControl::Id }, + { "OnTime", OnTime::Id }, + { "OffWaitTime", OffWaitTime::Id }, + { "StartUpOnOff", StartUpOnOff::Id }, + { "GeneratedCommandList", GeneratedCommandList::Id }, + { "AcceptedCommandList", AcceptedCommandList::Id }, + { "AttributeList", AttributeList::Id }, + { "FeatureMap", FeatureMap::Id }, + { "ClusterRevision", ClusterRevision::Id } +}; +} // namespace Attributes +} // namespace OnOff +namespace OnOffSwitchConfiguration { +namespace Attributes { +static const std::unordered_map matter_attribute_id_cluster_map { + { "SwitchType", SwitchType::Id }, + { "SwitchActions", SwitchActions::Id }, + { "GeneratedCommandList", GeneratedCommandList::Id }, + { "AcceptedCommandList", AcceptedCommandList::Id }, + { "AttributeList", AttributeList::Id }, + { "FeatureMap", FeatureMap::Id }, + { "ClusterRevision", ClusterRevision::Id } +}; +} // namespace Attributes +} // namespace OnOffSwitchConfiguration +namespace LevelControl { +namespace Attributes { +static const std::unordered_map matter_attribute_id_cluster_map { + { "CurrentLevel", CurrentLevel::Id }, + { "RemainingTime", RemainingTime::Id }, + { "MinLevel", MinLevel::Id }, + { "MaxLevel", MaxLevel::Id }, + { "CurrentFrequency", CurrentFrequency::Id }, + { "MinFrequency", MinFrequency::Id }, + { "MaxFrequency", MaxFrequency::Id }, + { "Options", Options::Id }, + { "OnOffTransitionTime", OnOffTransitionTime::Id }, + { "OnLevel", OnLevel::Id }, + { "OnTransitionTime", OnTransitionTime::Id }, + { "OffTransitionTime", OffTransitionTime::Id }, + { "DefaultMoveRate", DefaultMoveRate::Id }, + { "StartUpCurrentLevel", StartUpCurrentLevel::Id }, + { "GeneratedCommandList", GeneratedCommandList::Id }, + { "AcceptedCommandList", AcceptedCommandList::Id }, + { "AttributeList", AttributeList::Id }, + { "FeatureMap", FeatureMap::Id }, + { "ClusterRevision", ClusterRevision::Id } +}; +} // namespace Attributes +} // namespace LevelControl +namespace BinaryInputBasic { +namespace Attributes { +static const std::unordered_map matter_attribute_id_cluster_map { + { "ActiveText", ActiveText::Id }, + { "Description", Description::Id }, + { "InactiveText", InactiveText::Id }, + { "OutOfService", OutOfService::Id }, + { "Polarity", Polarity::Id }, + { "PresentValue", PresentValue::Id }, + { "Reliability", Reliability::Id }, + { "StatusFlags", StatusFlags::Id }, + { "ApplicationType", ApplicationType::Id }, + { "GeneratedCommandList", GeneratedCommandList::Id }, + { "AcceptedCommandList", AcceptedCommandList::Id }, + { "AttributeList", AttributeList::Id }, + { "FeatureMap", FeatureMap::Id }, + { "ClusterRevision", ClusterRevision::Id } +}; +} // namespace Attributes +} // namespace BinaryInputBasic +namespace PulseWidthModulation { +namespace Attributes { +static const std::unordered_map matter_attribute_id_cluster_map { + { "GeneratedCommandList", GeneratedCommandList::Id }, + { "AcceptedCommandList", AcceptedCommandList::Id }, + { "AttributeList", AttributeList::Id }, + { "FeatureMap", FeatureMap::Id }, + { "ClusterRevision", ClusterRevision::Id } +}; +} // namespace Attributes +} // namespace PulseWidthModulation +namespace Descriptor { +namespace Attributes { +static const std::unordered_map matter_attribute_id_cluster_map { + { "DeviceTypeList", DeviceTypeList::Id }, + { "ServerList", ServerList::Id }, + { "ClientList", ClientList::Id }, + { "PartsList", PartsList::Id }, + { "GeneratedCommandList", GeneratedCommandList::Id }, + { "AcceptedCommandList", AcceptedCommandList::Id }, + { "AttributeList", AttributeList::Id }, + { "FeatureMap", FeatureMap::Id }, + { "ClusterRevision", ClusterRevision::Id } +}; +} // namespace Attributes +} // namespace Descriptor +namespace Binding { +namespace Attributes { +static const std::unordered_map matter_attribute_id_cluster_map { + { "Binding", Binding::Id }, + { "GeneratedCommandList", GeneratedCommandList::Id }, + { "AcceptedCommandList", AcceptedCommandList::Id }, + { "AttributeList", AttributeList::Id }, + { "FeatureMap", FeatureMap::Id }, + { "ClusterRevision", ClusterRevision::Id } +}; +} // namespace Attributes +} // namespace Binding +namespace AccessControl { +namespace Attributes { +static const std::unordered_map matter_attribute_id_cluster_map { + { "Acl", Acl::Id }, + { "Extension", Extension::Id }, + { "SubjectsPerAccessControlEntry", SubjectsPerAccessControlEntry::Id }, + { "TargetsPerAccessControlEntry", TargetsPerAccessControlEntry::Id }, + { "AccessControlEntriesPerFabric", AccessControlEntriesPerFabric::Id }, + { "GeneratedCommandList", GeneratedCommandList::Id }, + { "AcceptedCommandList", AcceptedCommandList::Id }, + { "AttributeList", AttributeList::Id }, + { "FeatureMap", FeatureMap::Id }, + { "ClusterRevision", ClusterRevision::Id } +}; +} // namespace Attributes +} // namespace AccessControl +namespace Actions { +namespace Attributes { +static const std::unordered_map matter_attribute_id_cluster_map { + { "ActionList", ActionList::Id }, + { "EndpointLists", EndpointLists::Id }, + { "SetupURL", SetupURL::Id }, + { "GeneratedCommandList", GeneratedCommandList::Id }, + { "AcceptedCommandList", AcceptedCommandList::Id }, + { "AttributeList", AttributeList::Id }, + { "FeatureMap", FeatureMap::Id }, + { "ClusterRevision", ClusterRevision::Id } +}; +} // namespace Attributes +} // namespace Actions +namespace Basic { +namespace Attributes { +static const std::unordered_map matter_attribute_id_cluster_map { + { "DataModelRevision", DataModelRevision::Id }, + { "VendorName", VendorName::Id }, + { "VendorID", VendorID::Id }, + { "ProductName", ProductName::Id }, + { "ProductID", ProductID::Id }, + { "NodeLabel", NodeLabel::Id }, + { "Location", Location::Id }, + { "HardwareVersion", HardwareVersion::Id }, + { "HardwareVersionString", HardwareVersionString::Id }, + { "SoftwareVersion", SoftwareVersion::Id }, + { "SoftwareVersionString", SoftwareVersionString::Id }, + { "ManufacturingDate", ManufacturingDate::Id }, + { "PartNumber", PartNumber::Id }, + { "ProductURL", ProductURL::Id }, + { "ProductLabel", ProductLabel::Id }, + { "SerialNumber", SerialNumber::Id }, + { "LocalConfigDisabled", LocalConfigDisabled::Id }, + { "Reachable", Reachable::Id }, + { "UniqueID", UniqueID::Id }, + { "CapabilityMinima", CapabilityMinima::Id }, + { "GeneratedCommandList", GeneratedCommandList::Id }, + { "AcceptedCommandList", AcceptedCommandList::Id }, + { "AttributeList", AttributeList::Id }, + { "FeatureMap", FeatureMap::Id }, + { "ClusterRevision", ClusterRevision::Id } +}; +} // namespace Attributes +} // namespace Basic +namespace OtaSoftwareUpdateProvider { +namespace Attributes { +static const std::unordered_map matter_attribute_id_cluster_map { + { "GeneratedCommandList", GeneratedCommandList::Id }, + { "AcceptedCommandList", AcceptedCommandList::Id }, + { "AttributeList", AttributeList::Id }, + { "FeatureMap", FeatureMap::Id }, + { "ClusterRevision", ClusterRevision::Id } +}; +} // namespace Attributes +} // namespace OtaSoftwareUpdateProvider +namespace OtaSoftwareUpdateRequestor { +namespace Attributes { +static const std::unordered_map matter_attribute_id_cluster_map { + { "DefaultOtaProviders", DefaultOtaProviders::Id }, + { "UpdatePossible", UpdatePossible::Id }, + { "UpdateState", UpdateState::Id }, + { "UpdateStateProgress", UpdateStateProgress::Id }, + { "GeneratedCommandList", GeneratedCommandList::Id }, + { "AcceptedCommandList", AcceptedCommandList::Id }, + { "AttributeList", AttributeList::Id }, + { "FeatureMap", FeatureMap::Id }, + { "ClusterRevision", ClusterRevision::Id } +}; +} // namespace Attributes +} // namespace OtaSoftwareUpdateRequestor +namespace LocalizationConfiguration { +namespace Attributes { +static const std::unordered_map matter_attribute_id_cluster_map { + { "ActiveLocale", ActiveLocale::Id }, + { "SupportedLocales", SupportedLocales::Id }, + { "GeneratedCommandList", GeneratedCommandList::Id }, + { "AcceptedCommandList", AcceptedCommandList::Id }, + { "AttributeList", AttributeList::Id }, + { "FeatureMap", FeatureMap::Id }, + { "ClusterRevision", ClusterRevision::Id } +}; +} // namespace Attributes +} // namespace LocalizationConfiguration +namespace TimeFormatLocalization { +namespace Attributes { +static const std::unordered_map matter_attribute_id_cluster_map { + { "HourFormat", HourFormat::Id }, + { "ActiveCalendarType", ActiveCalendarType::Id }, + { "SupportedCalendarTypes", SupportedCalendarTypes::Id }, + { "GeneratedCommandList", GeneratedCommandList::Id }, + { "AcceptedCommandList", AcceptedCommandList::Id }, + { "AttributeList", AttributeList::Id }, + { "FeatureMap", FeatureMap::Id }, + { "ClusterRevision", ClusterRevision::Id } +}; +} // namespace Attributes +} // namespace TimeFormatLocalization +namespace UnitLocalization { +namespace Attributes { +static const std::unordered_map matter_attribute_id_cluster_map { + { "TemperatureUnit", TemperatureUnit::Id }, + { "GeneratedCommandList", GeneratedCommandList::Id }, + { "AcceptedCommandList", AcceptedCommandList::Id }, + { "AttributeList", AttributeList::Id }, + { "FeatureMap", FeatureMap::Id }, + { "ClusterRevision", ClusterRevision::Id } +}; +} // namespace Attributes +} // namespace UnitLocalization +namespace PowerSourceConfiguration { +namespace Attributes { +static const std::unordered_map matter_attribute_id_cluster_map { + { "Sources", Sources::Id }, + { "GeneratedCommandList", GeneratedCommandList::Id }, + { "AcceptedCommandList", AcceptedCommandList::Id }, + { "AttributeList", AttributeList::Id }, + { "FeatureMap", FeatureMap::Id }, + { "ClusterRevision", ClusterRevision::Id } +}; +} // namespace Attributes +} // namespace PowerSourceConfiguration +namespace PowerSource { +namespace Attributes { +static const std::unordered_map matter_attribute_id_cluster_map { + { "Status", Status::Id }, + { "Order", Order::Id }, + { "Description", Description::Id }, + { "WiredAssessedInputVoltage", WiredAssessedInputVoltage::Id }, + { "WiredAssessedInputFrequency", WiredAssessedInputFrequency::Id }, + { "WiredCurrentType", WiredCurrentType::Id }, + { "WiredAssessedCurrent", WiredAssessedCurrent::Id }, + { "WiredNominalVoltage", WiredNominalVoltage::Id }, + { "WiredMaximumCurrent", WiredMaximumCurrent::Id }, + { "WiredPresent", WiredPresent::Id }, + { "ActiveWiredFaults", ActiveWiredFaults::Id }, + { "BatVoltage", BatVoltage::Id }, + { "BatPercentRemaining", BatPercentRemaining::Id }, + { "BatTimeRemaining", BatTimeRemaining::Id }, + { "BatChargeLevel", BatChargeLevel::Id }, + { "BatReplacementNeeded", BatReplacementNeeded::Id }, + { "BatReplaceability", BatReplaceability::Id }, + { "BatPresent", BatPresent::Id }, + { "ActiveBatFaults", ActiveBatFaults::Id }, + { "BatReplacementDescription", BatReplacementDescription::Id }, + { "BatCommonDesignation", BatCommonDesignation::Id }, + { "BatANSIDesignation", BatANSIDesignation::Id }, + { "BatIECDesignation", BatIECDesignation::Id }, + { "BatApprovedChemistry", BatApprovedChemistry::Id }, + { "BatCapacity", BatCapacity::Id }, + { "BatQuantity", BatQuantity::Id }, + { "BatChargeState", BatChargeState::Id }, + { "BatTimeToFullCharge", BatTimeToFullCharge::Id }, + { "BatFunctionalWhileCharging", BatFunctionalWhileCharging::Id }, + { "BatChargingCurrent", BatChargingCurrent::Id }, + { "ActiveBatChargeFaults", ActiveBatChargeFaults::Id }, + { "GeneratedCommandList", GeneratedCommandList::Id }, + { "AcceptedCommandList", AcceptedCommandList::Id }, + { "AttributeList", AttributeList::Id }, + { "FeatureMap", FeatureMap::Id }, + { "ClusterRevision", ClusterRevision::Id } +}; +} // namespace Attributes +} // namespace PowerSource +namespace GeneralCommissioning { +namespace Attributes { +static const std::unordered_map matter_attribute_id_cluster_map { + { "Breadcrumb", Breadcrumb::Id }, + { "BasicCommissioningInfo", BasicCommissioningInfo::Id }, + { "RegulatoryConfig", RegulatoryConfig::Id }, + { "LocationCapability", LocationCapability::Id }, + { "SupportsConcurrentConnection", SupportsConcurrentConnection::Id }, + { "GeneratedCommandList", GeneratedCommandList::Id }, + { "AcceptedCommandList", AcceptedCommandList::Id }, + { "AttributeList", AttributeList::Id }, + { "FeatureMap", FeatureMap::Id }, + { "ClusterRevision", ClusterRevision::Id } +}; +} // namespace Attributes +} // namespace GeneralCommissioning +namespace NetworkCommissioning { +namespace Attributes { +static const std::unordered_map matter_attribute_id_cluster_map { + { "MaxNetworks", MaxNetworks::Id }, + { "Networks", Networks::Id }, + { "ScanMaxTimeSeconds", ScanMaxTimeSeconds::Id }, + { "ConnectMaxTimeSeconds", ConnectMaxTimeSeconds::Id }, + { "InterfaceEnabled", InterfaceEnabled::Id }, + { "LastNetworkingStatus", LastNetworkingStatus::Id }, + { "LastNetworkID", LastNetworkID::Id }, + { "LastConnectErrorValue", LastConnectErrorValue::Id }, + { "GeneratedCommandList", GeneratedCommandList::Id }, + { "AcceptedCommandList", AcceptedCommandList::Id }, + { "AttributeList", AttributeList::Id }, + { "FeatureMap", FeatureMap::Id }, + { "ClusterRevision", ClusterRevision::Id } +}; +} // namespace Attributes +} // namespace NetworkCommissioning +namespace DiagnosticLogs { +namespace Attributes { +static const std::unordered_map matter_attribute_id_cluster_map { + { "GeneratedCommandList", GeneratedCommandList::Id }, + { "AcceptedCommandList", AcceptedCommandList::Id }, + { "AttributeList", AttributeList::Id }, + { "FeatureMap", FeatureMap::Id }, + { "ClusterRevision", ClusterRevision::Id } +}; +} // namespace Attributes +} // namespace DiagnosticLogs +namespace GeneralDiagnostics { +namespace Attributes { +static const std::unordered_map matter_attribute_id_cluster_map { + { "NetworkInterfaces", NetworkInterfaces::Id }, + { "RebootCount", RebootCount::Id }, + { "UpTime", UpTime::Id }, + { "TotalOperationalHours", TotalOperationalHours::Id }, + { "BootReasons", BootReasons::Id }, + { "ActiveHardwareFaults", ActiveHardwareFaults::Id }, + { "ActiveRadioFaults", ActiveRadioFaults::Id }, + { "ActiveNetworkFaults", ActiveNetworkFaults::Id }, + { "TestEventTriggersEnabled", TestEventTriggersEnabled::Id }, + { "GeneratedCommandList", GeneratedCommandList::Id }, + { "AcceptedCommandList", AcceptedCommandList::Id }, + { "AttributeList", AttributeList::Id }, + { "FeatureMap", FeatureMap::Id }, + { "ClusterRevision", ClusterRevision::Id } +}; +} // namespace Attributes +} // namespace GeneralDiagnostics +namespace SoftwareDiagnostics { +namespace Attributes { +static const std::unordered_map matter_attribute_id_cluster_map { + { "ThreadMetrics", ThreadMetrics::Id }, + { "CurrentHeapFree", CurrentHeapFree::Id }, + { "CurrentHeapUsed", CurrentHeapUsed::Id }, + { "CurrentHeapHighWatermark", CurrentHeapHighWatermark::Id }, + { "GeneratedCommandList", GeneratedCommandList::Id }, + { "AcceptedCommandList", AcceptedCommandList::Id }, + { "AttributeList", AttributeList::Id }, + { "FeatureMap", FeatureMap::Id }, + { "ClusterRevision", ClusterRevision::Id } +}; +} // namespace Attributes +} // namespace SoftwareDiagnostics +namespace ThreadNetworkDiagnostics { +namespace Attributes { +static const std::unordered_map matter_attribute_id_cluster_map { + { "Channel", Channel::Id }, + { "RoutingRole", RoutingRole::Id }, + { "NetworkName", NetworkName::Id }, + { "PanId", PanId::Id }, + { "ExtendedPanId", ExtendedPanId::Id }, + { "MeshLocalPrefix", MeshLocalPrefix::Id }, + { "OverrunCount", OverrunCount::Id }, + { "NeighborTableList", NeighborTableList::Id }, + { "RouteTableList", RouteTableList::Id }, + { "PartitionId", PartitionId::Id }, + { "Weighting", Weighting::Id }, + { "DataVersion", DataVersion::Id }, + { "StableDataVersion", StableDataVersion::Id }, + { "LeaderRouterId", LeaderRouterId::Id }, + { "DetachedRoleCount", DetachedRoleCount::Id }, + { "ChildRoleCount", ChildRoleCount::Id }, + { "RouterRoleCount", RouterRoleCount::Id }, + { "LeaderRoleCount", LeaderRoleCount::Id }, + { "AttachAttemptCount", AttachAttemptCount::Id }, + { "PartitionIdChangeCount", PartitionIdChangeCount::Id }, + { "BetterPartitionAttachAttemptCount", BetterPartitionAttachAttemptCount::Id }, + { "ParentChangeCount", ParentChangeCount::Id }, + { "TxTotalCount", TxTotalCount::Id }, + { "TxUnicastCount", TxUnicastCount::Id }, + { "TxBroadcastCount", TxBroadcastCount::Id }, + { "TxAckRequestedCount", TxAckRequestedCount::Id }, + { "TxAckedCount", TxAckedCount::Id }, + { "TxNoAckRequestedCount", TxNoAckRequestedCount::Id }, + { "TxDataCount", TxDataCount::Id }, + { "TxDataPollCount", TxDataPollCount::Id }, + { "TxBeaconCount", TxBeaconCount::Id }, + { "TxBeaconRequestCount", TxBeaconRequestCount::Id }, + { "TxOtherCount", TxOtherCount::Id }, + { "TxRetryCount", TxRetryCount::Id }, + { "TxDirectMaxRetryExpiryCount", TxDirectMaxRetryExpiryCount::Id }, + { "TxIndirectMaxRetryExpiryCount", TxIndirectMaxRetryExpiryCount::Id }, + { "TxErrCcaCount", TxErrCcaCount::Id }, + { "TxErrAbortCount", TxErrAbortCount::Id }, + { "TxErrBusyChannelCount", TxErrBusyChannelCount::Id }, + { "RxTotalCount", RxTotalCount::Id }, + { "RxUnicastCount", RxUnicastCount::Id }, + { "RxBroadcastCount", RxBroadcastCount::Id }, + { "RxDataCount", RxDataCount::Id }, + { "RxDataPollCount", RxDataPollCount::Id }, + { "RxBeaconCount", RxBeaconCount::Id }, + { "RxBeaconRequestCount", RxBeaconRequestCount::Id }, + { "RxOtherCount", RxOtherCount::Id }, + { "RxAddressFilteredCount", RxAddressFilteredCount::Id }, + { "RxDestAddrFilteredCount", RxDestAddrFilteredCount::Id }, + { "RxDuplicatedCount", RxDuplicatedCount::Id }, + { "RxErrNoFrameCount", RxErrNoFrameCount::Id }, + { "RxErrUnknownNeighborCount", RxErrUnknownNeighborCount::Id }, + { "RxErrInvalidSrcAddrCount", RxErrInvalidSrcAddrCount::Id }, + { "RxErrSecCount", RxErrSecCount::Id }, + { "RxErrFcsCount", RxErrFcsCount::Id }, + { "RxErrOtherCount", RxErrOtherCount::Id }, + { "ActiveTimestamp", ActiveTimestamp::Id }, + { "PendingTimestamp", PendingTimestamp::Id }, + { "Delay", Delay::Id }, + { "SecurityPolicy", SecurityPolicy::Id }, + { "ChannelPage0Mask", ChannelPage0Mask::Id }, + { "OperationalDatasetComponents", OperationalDatasetComponents::Id }, + { "ActiveNetworkFaultsList", ActiveNetworkFaultsList::Id }, + { "GeneratedCommandList", GeneratedCommandList::Id }, + { "AcceptedCommandList", AcceptedCommandList::Id }, + { "AttributeList", AttributeList::Id }, + { "FeatureMap", FeatureMap::Id }, + { "ClusterRevision", ClusterRevision::Id } +}; +} // namespace Attributes +} // namespace ThreadNetworkDiagnostics +namespace WiFiNetworkDiagnostics { +namespace Attributes { +static const std::unordered_map matter_attribute_id_cluster_map { + { "Bssid", Bssid::Id }, + { "SecurityType", SecurityType::Id }, + { "WiFiVersion", WiFiVersion::Id }, + { "ChannelNumber", ChannelNumber::Id }, + { "Rssi", Rssi::Id }, + { "BeaconLostCount", BeaconLostCount::Id }, + { "BeaconRxCount", BeaconRxCount::Id }, + { "PacketMulticastRxCount", PacketMulticastRxCount::Id }, + { "PacketMulticastTxCount", PacketMulticastTxCount::Id }, + { "PacketUnicastRxCount", PacketUnicastRxCount::Id }, + { "PacketUnicastTxCount", PacketUnicastTxCount::Id }, + { "CurrentMaxRate", CurrentMaxRate::Id }, + { "OverrunCount", OverrunCount::Id }, + { "GeneratedCommandList", GeneratedCommandList::Id }, + { "AcceptedCommandList", AcceptedCommandList::Id }, + { "AttributeList", AttributeList::Id }, + { "FeatureMap", FeatureMap::Id }, + { "ClusterRevision", ClusterRevision::Id } +}; +} // namespace Attributes +} // namespace WiFiNetworkDiagnostics +namespace EthernetNetworkDiagnostics { +namespace Attributes { +static const std::unordered_map matter_attribute_id_cluster_map { + { "PHYRate", PHYRate::Id }, + { "FullDuplex", FullDuplex::Id }, + { "PacketRxCount", PacketRxCount::Id }, + { "PacketTxCount", PacketTxCount::Id }, + { "TxErrCount", TxErrCount::Id }, + { "CollisionCount", CollisionCount::Id }, + { "OverrunCount", OverrunCount::Id }, + { "CarrierDetect", CarrierDetect::Id }, + { "TimeSinceReset", TimeSinceReset::Id }, + { "GeneratedCommandList", GeneratedCommandList::Id }, + { "AcceptedCommandList", AcceptedCommandList::Id }, + { "AttributeList", AttributeList::Id }, + { "FeatureMap", FeatureMap::Id }, + { "ClusterRevision", ClusterRevision::Id } +}; +} // namespace Attributes +} // namespace EthernetNetworkDiagnostics +namespace TimeSynchronization { +namespace Attributes { +static const std::unordered_map matter_attribute_id_cluster_map { + { "UTCTime", UTCTime::Id }, + { "Granularity", Granularity::Id }, + { "TimeSource", TimeSource::Id }, + { "TrustedTimeNodeId", TrustedTimeNodeId::Id }, + { "DefaultNtp", DefaultNtp::Id }, + { "TimeZone", TimeZone::Id }, + { "DstOffset", DstOffset::Id }, + { "LocalTime", LocalTime::Id }, + { "TimeZoneDatabase", TimeZoneDatabase::Id }, + { "NtpServerPort", NtpServerPort::Id }, + { "GeneratedCommandList", GeneratedCommandList::Id }, + { "AcceptedCommandList", AcceptedCommandList::Id }, + { "AttributeList", AttributeList::Id }, + { "FeatureMap", FeatureMap::Id }, + { "ClusterRevision", ClusterRevision::Id } +}; +} // namespace Attributes +} // namespace TimeSynchronization +namespace BridgedDeviceBasic { +namespace Attributes { +static const std::unordered_map matter_attribute_id_cluster_map { + { "VendorName", VendorName::Id }, + { "VendorID", VendorID::Id }, + { "ProductName", ProductName::Id }, + { "NodeLabel", NodeLabel::Id }, + { "HardwareVersion", HardwareVersion::Id }, + { "HardwareVersionString", HardwareVersionString::Id }, + { "SoftwareVersion", SoftwareVersion::Id }, + { "SoftwareVersionString", SoftwareVersionString::Id }, + { "ManufacturingDate", ManufacturingDate::Id }, + { "PartNumber", PartNumber::Id }, + { "ProductURL", ProductURL::Id }, + { "ProductLabel", ProductLabel::Id }, + { "SerialNumber", SerialNumber::Id }, + { "Reachable", Reachable::Id }, + { "UniqueID", UniqueID::Id }, + { "GeneratedCommandList", GeneratedCommandList::Id }, + { "AcceptedCommandList", AcceptedCommandList::Id }, + { "AttributeList", AttributeList::Id }, + { "FeatureMap", FeatureMap::Id }, + { "ClusterRevision", ClusterRevision::Id } +}; +} // namespace Attributes +} // namespace BridgedDeviceBasic +namespace Switch { +namespace Attributes { +static const std::unordered_map matter_attribute_id_cluster_map { + { "NumberOfPositions", NumberOfPositions::Id }, + { "CurrentPosition", CurrentPosition::Id }, + { "MultiPressMax", MultiPressMax::Id }, + { "GeneratedCommandList", GeneratedCommandList::Id }, + { "AcceptedCommandList", AcceptedCommandList::Id }, + { "AttributeList", AttributeList::Id }, + { "FeatureMap", FeatureMap::Id }, + { "ClusterRevision", ClusterRevision::Id } +}; +} // namespace Attributes +} // namespace Switch +namespace AdministratorCommissioning { +namespace Attributes { +static const std::unordered_map matter_attribute_id_cluster_map { + { "WindowStatus", WindowStatus::Id }, + { "AdminFabricIndex", AdminFabricIndex::Id }, + { "AdminVendorId", AdminVendorId::Id }, + { "GeneratedCommandList", GeneratedCommandList::Id }, + { "AcceptedCommandList", AcceptedCommandList::Id }, + { "AttributeList", AttributeList::Id }, + { "FeatureMap", FeatureMap::Id }, + { "ClusterRevision", ClusterRevision::Id } +}; +} // namespace Attributes +} // namespace AdministratorCommissioning +namespace OperationalCredentials { +namespace Attributes { +static const std::unordered_map matter_attribute_id_cluster_map { + { "NOCs", NOCs::Id }, + { "Fabrics", Fabrics::Id }, + { "SupportedFabrics", SupportedFabrics::Id }, + { "CommissionedFabrics", CommissionedFabrics::Id }, + { "TrustedRootCertificates", TrustedRootCertificates::Id }, + { "CurrentFabricIndex", CurrentFabricIndex::Id }, + { "GeneratedCommandList", GeneratedCommandList::Id }, + { "AcceptedCommandList", AcceptedCommandList::Id }, + { "AttributeList", AttributeList::Id }, + { "FeatureMap", FeatureMap::Id }, + { "ClusterRevision", ClusterRevision::Id } +}; +} // namespace Attributes +} // namespace OperationalCredentials +namespace GroupKeyManagement { +namespace Attributes { +static const std::unordered_map matter_attribute_id_cluster_map { + { "GroupKeyMap", GroupKeyMap::Id }, + { "GroupTable", GroupTable::Id }, + { "MaxGroupsPerFabric", MaxGroupsPerFabric::Id }, + { "MaxGroupKeysPerFabric", MaxGroupKeysPerFabric::Id }, + { "GeneratedCommandList", GeneratedCommandList::Id }, + { "AcceptedCommandList", AcceptedCommandList::Id }, + { "AttributeList", AttributeList::Id }, + { "FeatureMap", FeatureMap::Id }, + { "ClusterRevision", ClusterRevision::Id } +}; +} // namespace Attributes +} // namespace GroupKeyManagement +namespace FixedLabel { +namespace Attributes { +static const std::unordered_map matter_attribute_id_cluster_map { + { "LabelList", LabelList::Id }, + { "GeneratedCommandList", GeneratedCommandList::Id }, + { "AcceptedCommandList", AcceptedCommandList::Id }, + { "AttributeList", AttributeList::Id }, + { "FeatureMap", FeatureMap::Id }, + { "ClusterRevision", ClusterRevision::Id } +}; +} // namespace Attributes +} // namespace FixedLabel +namespace UserLabel { +namespace Attributes { +static const std::unordered_map matter_attribute_id_cluster_map { + { "LabelList", LabelList::Id }, + { "GeneratedCommandList", GeneratedCommandList::Id }, + { "AcceptedCommandList", AcceptedCommandList::Id }, + { "AttributeList", AttributeList::Id }, + { "FeatureMap", FeatureMap::Id }, + { "ClusterRevision", ClusterRevision::Id } +}; +} // namespace Attributes +} // namespace UserLabel +namespace ProxyConfiguration { +namespace Attributes { +static const std::unordered_map matter_attribute_id_cluster_map { + { "GeneratedCommandList", GeneratedCommandList::Id }, + { "AcceptedCommandList", AcceptedCommandList::Id }, + { "AttributeList", AttributeList::Id }, + { "FeatureMap", FeatureMap::Id }, + { "ClusterRevision", ClusterRevision::Id } +}; +} // namespace Attributes +} // namespace ProxyConfiguration +namespace ProxyDiscovery { +namespace Attributes { +static const std::unordered_map matter_attribute_id_cluster_map { + { "GeneratedCommandList", GeneratedCommandList::Id }, + { "AcceptedCommandList", AcceptedCommandList::Id }, + { "AttributeList", AttributeList::Id }, + { "FeatureMap", FeatureMap::Id }, + { "ClusterRevision", ClusterRevision::Id } +}; +} // namespace Attributes +} // namespace ProxyDiscovery +namespace ProxyValid { +namespace Attributes { +static const std::unordered_map matter_attribute_id_cluster_map { + { "GeneratedCommandList", GeneratedCommandList::Id }, + { "AcceptedCommandList", AcceptedCommandList::Id }, + { "AttributeList", AttributeList::Id }, + { "FeatureMap", FeatureMap::Id }, + { "ClusterRevision", ClusterRevision::Id } +}; +} // namespace Attributes +} // namespace ProxyValid +namespace BooleanState { +namespace Attributes { +static const std::unordered_map matter_attribute_id_cluster_map { + { "StateValue", StateValue::Id }, + { "GeneratedCommandList", GeneratedCommandList::Id }, + { "AcceptedCommandList", AcceptedCommandList::Id }, + { "AttributeList", AttributeList::Id }, + { "FeatureMap", FeatureMap::Id }, + { "ClusterRevision", ClusterRevision::Id } +}; +} // namespace Attributes +} // namespace BooleanState +namespace ModeSelect { +namespace Attributes { +static const std::unordered_map matter_attribute_id_cluster_map { + { "Description", Description::Id }, + { "StandardNamespace", StandardNamespace::Id }, + { "SupportedModes", SupportedModes::Id }, + { "CurrentMode", CurrentMode::Id }, + { "StartUpMode", StartUpMode::Id }, + { "OnMode", OnMode::Id }, + { "GeneratedCommandList", GeneratedCommandList::Id }, + { "AcceptedCommandList", AcceptedCommandList::Id }, + { "AttributeList", AttributeList::Id }, + { "FeatureMap", FeatureMap::Id }, + { "ClusterRevision", ClusterRevision::Id } +}; +} // namespace Attributes +} // namespace ModeSelect +namespace DoorLock { +namespace Attributes { +static const std::unordered_map matter_attribute_id_cluster_map { + { "LockState", LockState::Id }, + { "LockType", LockType::Id }, + { "ActuatorEnabled", ActuatorEnabled::Id }, + { "DoorState", DoorState::Id }, + { "DoorOpenEvents", DoorOpenEvents::Id }, + { "DoorClosedEvents", DoorClosedEvents::Id }, + { "OpenPeriod", OpenPeriod::Id }, + { "NumberOfTotalUsersSupported", NumberOfTotalUsersSupported::Id }, + { "NumberOfPINUsersSupported", NumberOfPINUsersSupported::Id }, + { "NumberOfRFIDUsersSupported", NumberOfRFIDUsersSupported::Id }, + { "NumberOfWeekDaySchedulesSupportedPerUser", NumberOfWeekDaySchedulesSupportedPerUser::Id }, + { "NumberOfYearDaySchedulesSupportedPerUser", NumberOfYearDaySchedulesSupportedPerUser::Id }, + { "NumberOfHolidaySchedulesSupported", NumberOfHolidaySchedulesSupported::Id }, + { "MaxPINCodeLength", MaxPINCodeLength::Id }, + { "MinPINCodeLength", MinPINCodeLength::Id }, + { "MaxRFIDCodeLength", MaxRFIDCodeLength::Id }, + { "MinRFIDCodeLength", MinRFIDCodeLength::Id }, + { "CredentialRulesSupport", CredentialRulesSupport::Id }, + { "NumberOfCredentialsSupportedPerUser", NumberOfCredentialsSupportedPerUser::Id }, + { "Language", Language::Id }, + { "LEDSettings", LEDSettings::Id }, + { "AutoRelockTime", AutoRelockTime::Id }, + { "SoundVolume", SoundVolume::Id }, + { "OperatingMode", OperatingMode::Id }, + { "SupportedOperatingModes", SupportedOperatingModes::Id }, + { "DefaultConfigurationRegister", DefaultConfigurationRegister::Id }, + { "EnableLocalProgramming", EnableLocalProgramming::Id }, + { "EnableOneTouchLocking", EnableOneTouchLocking::Id }, + { "EnableInsideStatusLED", EnableInsideStatusLED::Id }, + { "EnablePrivacyModeButton", EnablePrivacyModeButton::Id }, + { "LocalProgrammingFeatures", LocalProgrammingFeatures::Id }, + { "WrongCodeEntryLimit", WrongCodeEntryLimit::Id }, + { "UserCodeTemporaryDisableTime", UserCodeTemporaryDisableTime::Id }, + { "SendPINOverTheAir", SendPINOverTheAir::Id }, + { "RequirePINforRemoteOperation", RequirePINforRemoteOperation::Id }, + { "ExpiringUserTimeout", ExpiringUserTimeout::Id }, + { "GeneratedCommandList", GeneratedCommandList::Id }, + { "AcceptedCommandList", AcceptedCommandList::Id }, + { "AttributeList", AttributeList::Id }, + { "FeatureMap", FeatureMap::Id }, + { "ClusterRevision", ClusterRevision::Id } +}; +} // namespace Attributes +} // namespace DoorLock +namespace WindowCovering { +namespace Attributes { +static const std::unordered_map matter_attribute_id_cluster_map { + { "Type", Type::Id }, + { "PhysicalClosedLimitLift", PhysicalClosedLimitLift::Id }, + { "PhysicalClosedLimitTilt", PhysicalClosedLimitTilt::Id }, + { "CurrentPositionLift", CurrentPositionLift::Id }, + { "CurrentPositionTilt", CurrentPositionTilt::Id }, + { "NumberOfActuationsLift", NumberOfActuationsLift::Id }, + { "NumberOfActuationsTilt", NumberOfActuationsTilt::Id }, + { "ConfigStatus", ConfigStatus::Id }, + { "CurrentPositionLiftPercentage", CurrentPositionLiftPercentage::Id }, + { "CurrentPositionTiltPercentage", CurrentPositionTiltPercentage::Id }, + { "OperationalStatus", OperationalStatus::Id }, + { "TargetPositionLiftPercent100ths", TargetPositionLiftPercent100ths::Id }, + { "TargetPositionTiltPercent100ths", TargetPositionTiltPercent100ths::Id }, + { "EndProductType", EndProductType::Id }, + { "CurrentPositionLiftPercent100ths", CurrentPositionLiftPercent100ths::Id }, + { "CurrentPositionTiltPercent100ths", CurrentPositionTiltPercent100ths::Id }, + { "InstalledOpenLimitLift", InstalledOpenLimitLift::Id }, + { "InstalledClosedLimitLift", InstalledClosedLimitLift::Id }, + { "InstalledOpenLimitTilt", InstalledOpenLimitTilt::Id }, + { "InstalledClosedLimitTilt", InstalledClosedLimitTilt::Id }, + { "Mode", Mode::Id }, + { "SafetyStatus", SafetyStatus::Id }, + { "GeneratedCommandList", GeneratedCommandList::Id }, + { "AcceptedCommandList", AcceptedCommandList::Id }, + { "AttributeList", AttributeList::Id }, + { "FeatureMap", FeatureMap::Id }, + { "ClusterRevision", ClusterRevision::Id } +}; +} // namespace Attributes +} // namespace WindowCovering +namespace BarrierControl { +namespace Attributes { +static const std::unordered_map matter_attribute_id_cluster_map { + { "BarrierMovingState", BarrierMovingState::Id }, + { "BarrierSafetyStatus", BarrierSafetyStatus::Id }, + { "BarrierCapabilities", BarrierCapabilities::Id }, + { "BarrierOpenEvents", BarrierOpenEvents::Id }, + { "BarrierCloseEvents", BarrierCloseEvents::Id }, + { "BarrierCommandOpenEvents", BarrierCommandOpenEvents::Id }, + { "BarrierCommandCloseEvents", BarrierCommandCloseEvents::Id }, + { "BarrierOpenPeriod", BarrierOpenPeriod::Id }, + { "BarrierClosePeriod", BarrierClosePeriod::Id }, + { "BarrierPosition", BarrierPosition::Id }, + { "GeneratedCommandList", GeneratedCommandList::Id }, + { "AcceptedCommandList", AcceptedCommandList::Id }, + { "AttributeList", AttributeList::Id }, + { "FeatureMap", FeatureMap::Id }, + { "ClusterRevision", ClusterRevision::Id } +}; +} // namespace Attributes +} // namespace BarrierControl +namespace PumpConfigurationAndControl { +namespace Attributes { +static const std::unordered_map matter_attribute_id_cluster_map { + { "MaxPressure", MaxPressure::Id }, + { "MaxSpeed", MaxSpeed::Id }, + { "MaxFlow", MaxFlow::Id }, + { "MinConstPressure", MinConstPressure::Id }, + { "MaxConstPressure", MaxConstPressure::Id }, + { "MinCompPressure", MinCompPressure::Id }, + { "MaxCompPressure", MaxCompPressure::Id }, + { "MinConstSpeed", MinConstSpeed::Id }, + { "MaxConstSpeed", MaxConstSpeed::Id }, + { "MinConstFlow", MinConstFlow::Id }, + { "MaxConstFlow", MaxConstFlow::Id }, + { "MinConstTemp", MinConstTemp::Id }, + { "MaxConstTemp", MaxConstTemp::Id }, + { "PumpStatus", PumpStatus::Id }, + { "EffectiveOperationMode", EffectiveOperationMode::Id }, + { "EffectiveControlMode", EffectiveControlMode::Id }, + { "Capacity", Capacity::Id }, + { "Speed", Speed::Id }, + { "LifetimeRunningHours", LifetimeRunningHours::Id }, + { "Power", Power::Id }, + { "LifetimeEnergyConsumed", LifetimeEnergyConsumed::Id }, + { "OperationMode", OperationMode::Id }, + { "ControlMode", ControlMode::Id }, + { "GeneratedCommandList", GeneratedCommandList::Id }, + { "AcceptedCommandList", AcceptedCommandList::Id }, + { "AttributeList", AttributeList::Id }, + { "FeatureMap", FeatureMap::Id }, + { "ClusterRevision", ClusterRevision::Id } +}; +} // namespace Attributes +} // namespace PumpConfigurationAndControl +namespace Thermostat { +namespace Attributes { +static const std::unordered_map matter_attribute_id_cluster_map { + { "LocalTemperature", LocalTemperature::Id }, + { "OutdoorTemperature", OutdoorTemperature::Id }, + { "Occupancy", Occupancy::Id }, + { "AbsMinHeatSetpointLimit", AbsMinHeatSetpointLimit::Id }, + { "AbsMaxHeatSetpointLimit", AbsMaxHeatSetpointLimit::Id }, + { "AbsMinCoolSetpointLimit", AbsMinCoolSetpointLimit::Id }, + { "AbsMaxCoolSetpointLimit", AbsMaxCoolSetpointLimit::Id }, + { "PICoolingDemand", PICoolingDemand::Id }, + { "PIHeatingDemand", PIHeatingDemand::Id }, + { "HVACSystemTypeConfiguration", HVACSystemTypeConfiguration::Id }, + { "LocalTemperatureCalibration", LocalTemperatureCalibration::Id }, + { "OccupiedCoolingSetpoint", OccupiedCoolingSetpoint::Id }, + { "OccupiedHeatingSetpoint", OccupiedHeatingSetpoint::Id }, + { "UnoccupiedCoolingSetpoint", UnoccupiedCoolingSetpoint::Id }, + { "UnoccupiedHeatingSetpoint", UnoccupiedHeatingSetpoint::Id }, + { "MinHeatSetpointLimit", MinHeatSetpointLimit::Id }, + { "MaxHeatSetpointLimit", MaxHeatSetpointLimit::Id }, + { "MinCoolSetpointLimit", MinCoolSetpointLimit::Id }, + { "MaxCoolSetpointLimit", MaxCoolSetpointLimit::Id }, + { "MinSetpointDeadBand", MinSetpointDeadBand::Id }, + { "RemoteSensing", RemoteSensing::Id }, + { "ControlSequenceOfOperation", ControlSequenceOfOperation::Id }, + { "SystemMode", SystemMode::Id }, + { "ThermostatRunningMode", ThermostatRunningMode::Id }, + { "StartOfWeek", StartOfWeek::Id }, + { "NumberOfWeeklyTransitions", NumberOfWeeklyTransitions::Id }, + { "NumberOfDailyTransitions", NumberOfDailyTransitions::Id }, + { "TemperatureSetpointHold", TemperatureSetpointHold::Id }, + { "TemperatureSetpointHoldDuration", TemperatureSetpointHoldDuration::Id }, + { "ThermostatProgrammingOperationMode", ThermostatProgrammingOperationMode::Id }, + { "ThermostatRunningState", ThermostatRunningState::Id }, + { "SetpointChangeSource", SetpointChangeSource::Id }, + { "SetpointChangeAmount", SetpointChangeAmount::Id }, + { "SetpointChangeSourceTimestamp", SetpointChangeSourceTimestamp::Id }, + { "OccupiedSetback", OccupiedSetback::Id }, + { "OccupiedSetbackMin", OccupiedSetbackMin::Id }, + { "OccupiedSetbackMax", OccupiedSetbackMax::Id }, + { "UnoccupiedSetback", UnoccupiedSetback::Id }, + { "UnoccupiedSetbackMin", UnoccupiedSetbackMin::Id }, + { "UnoccupiedSetbackMax", UnoccupiedSetbackMax::Id }, + { "EmergencyHeatDelta", EmergencyHeatDelta::Id }, + { "ACType", ACType::Id }, + { "ACCapacity", ACCapacity::Id }, + { "ACRefrigerantType", ACRefrigerantType::Id }, + { "ACCompressorType", ACCompressorType::Id }, + { "ACErrorCode", ACErrorCode::Id }, + { "ACLouverPosition", ACLouverPosition::Id }, + { "ACCoilTemperature", ACCoilTemperature::Id }, + { "ACCapacityformat", ACCapacityformat::Id }, + { "GeneratedCommandList", GeneratedCommandList::Id }, + { "AcceptedCommandList", AcceptedCommandList::Id }, + { "AttributeList", AttributeList::Id }, + { "FeatureMap", FeatureMap::Id }, + { "ClusterRevision", ClusterRevision::Id } +}; +} // namespace Attributes +} // namespace Thermostat +namespace FanControl { +namespace Attributes { +static const std::unordered_map matter_attribute_id_cluster_map { + { "FanMode", FanMode::Id }, + { "FanModeSequence", FanModeSequence::Id }, + { "PercentSetting", PercentSetting::Id }, + { "PercentCurrent", PercentCurrent::Id }, + { "SpeedMax", SpeedMax::Id }, + { "SpeedSetting", SpeedSetting::Id }, + { "SpeedCurrent", SpeedCurrent::Id }, + { "RockSupport", RockSupport::Id }, + { "RockSetting", RockSetting::Id }, + { "WindSupport", WindSupport::Id }, + { "WindSetting", WindSetting::Id }, + { "GeneratedCommandList", GeneratedCommandList::Id }, + { "AcceptedCommandList", AcceptedCommandList::Id }, + { "AttributeList", AttributeList::Id }, + { "FeatureMap", FeatureMap::Id }, + { "ClusterRevision", ClusterRevision::Id } +}; +} // namespace Attributes +} // namespace FanControl +namespace ThermostatUserInterfaceConfiguration { +namespace Attributes { +static const std::unordered_map matter_attribute_id_cluster_map { + { "TemperatureDisplayMode", TemperatureDisplayMode::Id }, + { "KeypadLockout", KeypadLockout::Id }, + { "ScheduleProgrammingVisibility", ScheduleProgrammingVisibility::Id }, + { "GeneratedCommandList", GeneratedCommandList::Id }, + { "AcceptedCommandList", AcceptedCommandList::Id }, + { "AttributeList", AttributeList::Id }, + { "FeatureMap", FeatureMap::Id }, + { "ClusterRevision", ClusterRevision::Id } +}; +} // namespace Attributes +} // namespace ThermostatUserInterfaceConfiguration +namespace ColorControl { +namespace Attributes { +static const std::unordered_map matter_attribute_id_cluster_map { + { "CurrentHue", CurrentHue::Id }, + { "CurrentSaturation", CurrentSaturation::Id }, + { "RemainingTime", RemainingTime::Id }, + { "CurrentX", CurrentX::Id }, + { "CurrentY", CurrentY::Id }, + { "DriftCompensation", DriftCompensation::Id }, + { "CompensationText", CompensationText::Id }, + { "ColorTemperatureMireds", ColorTemperatureMireds::Id }, + { "ColorMode", ColorMode::Id }, + { "Options", Options::Id }, + { "NumberOfPrimaries", NumberOfPrimaries::Id }, + { "Primary1X", Primary1X::Id }, + { "Primary1Y", Primary1Y::Id }, + { "Primary1Intensity", Primary1Intensity::Id }, + { "Primary2X", Primary2X::Id }, + { "Primary2Y", Primary2Y::Id }, + { "Primary2Intensity", Primary2Intensity::Id }, + { "Primary3X", Primary3X::Id }, + { "Primary3Y", Primary3Y::Id }, + { "Primary3Intensity", Primary3Intensity::Id }, + { "Primary4X", Primary4X::Id }, + { "Primary4Y", Primary4Y::Id }, + { "Primary4Intensity", Primary4Intensity::Id }, + { "Primary5X", Primary5X::Id }, + { "Primary5Y", Primary5Y::Id }, + { "Primary5Intensity", Primary5Intensity::Id }, + { "Primary6X", Primary6X::Id }, + { "Primary6Y", Primary6Y::Id }, + { "Primary6Intensity", Primary6Intensity::Id }, + { "WhitePointX", WhitePointX::Id }, + { "WhitePointY", WhitePointY::Id }, + { "ColorPointRX", ColorPointRX::Id }, + { "ColorPointRY", ColorPointRY::Id }, + { "ColorPointRIntensity", ColorPointRIntensity::Id }, + { "ColorPointGX", ColorPointGX::Id }, + { "ColorPointGY", ColorPointGY::Id }, + { "ColorPointGIntensity", ColorPointGIntensity::Id }, + { "ColorPointBX", ColorPointBX::Id }, + { "ColorPointBY", ColorPointBY::Id }, + { "ColorPointBIntensity", ColorPointBIntensity::Id }, + { "EnhancedCurrentHue", EnhancedCurrentHue::Id }, + { "EnhancedColorMode", EnhancedColorMode::Id }, + { "ColorLoopActive", ColorLoopActive::Id }, + { "ColorLoopDirection", ColorLoopDirection::Id }, + { "ColorLoopTime", ColorLoopTime::Id }, + { "ColorLoopStartEnhancedHue", ColorLoopStartEnhancedHue::Id }, + { "ColorLoopStoredEnhancedHue", ColorLoopStoredEnhancedHue::Id }, + { "ColorCapabilities", ColorCapabilities::Id }, + { "ColorTempPhysicalMinMireds", ColorTempPhysicalMinMireds::Id }, + { "ColorTempPhysicalMaxMireds", ColorTempPhysicalMaxMireds::Id }, + { "CoupleColorTempToLevelMinMireds", CoupleColorTempToLevelMinMireds::Id }, + { "StartUpColorTemperatureMireds", StartUpColorTemperatureMireds::Id }, + { "GeneratedCommandList", GeneratedCommandList::Id }, + { "AcceptedCommandList", AcceptedCommandList::Id }, + { "AttributeList", AttributeList::Id }, + { "FeatureMap", FeatureMap::Id }, + { "ClusterRevision", ClusterRevision::Id } +}; +} // namespace Attributes +} // namespace ColorControl +namespace BallastConfiguration { +namespace Attributes { +static const std::unordered_map matter_attribute_id_cluster_map { + { "PhysicalMinLevel", PhysicalMinLevel::Id }, + { "PhysicalMaxLevel", PhysicalMaxLevel::Id }, + { "BallastStatus", BallastStatus::Id }, + { "MinLevel", MinLevel::Id }, + { "MaxLevel", MaxLevel::Id }, + { "IntrinsicBalanceFactor", IntrinsicBalanceFactor::Id }, + { "BallastFactorAdjustment", BallastFactorAdjustment::Id }, + { "LampQuantity", LampQuantity::Id }, + { "LampType", LampType::Id }, + { "LampManufacturer", LampManufacturer::Id }, + { "LampRatedHours", LampRatedHours::Id }, + { "LampBurnHours", LampBurnHours::Id }, + { "LampAlarmMode", LampAlarmMode::Id }, + { "LampBurnHoursTripPoint", LampBurnHoursTripPoint::Id }, + { "GeneratedCommandList", GeneratedCommandList::Id }, + { "AcceptedCommandList", AcceptedCommandList::Id }, + { "AttributeList", AttributeList::Id }, + { "FeatureMap", FeatureMap::Id }, + { "ClusterRevision", ClusterRevision::Id } +}; +} // namespace Attributes +} // namespace BallastConfiguration +namespace IlluminanceMeasurement { +namespace Attributes { +static const std::unordered_map matter_attribute_id_cluster_map { + { "MeasuredValue", MeasuredValue::Id }, + { "MinMeasuredValue", MinMeasuredValue::Id }, + { "MaxMeasuredValue", MaxMeasuredValue::Id }, + { "Tolerance", Tolerance::Id }, + { "LightSensorType", LightSensorType::Id }, + { "GeneratedCommandList", GeneratedCommandList::Id }, + { "AcceptedCommandList", AcceptedCommandList::Id }, + { "AttributeList", AttributeList::Id }, + { "FeatureMap", FeatureMap::Id }, + { "ClusterRevision", ClusterRevision::Id } +}; +} // namespace Attributes +} // namespace IlluminanceMeasurement +namespace TemperatureMeasurement { +namespace Attributes { +static const std::unordered_map matter_attribute_id_cluster_map { + { "MeasuredValue", MeasuredValue::Id }, + { "MinMeasuredValue", MinMeasuredValue::Id }, + { "MaxMeasuredValue", MaxMeasuredValue::Id }, + { "Tolerance", Tolerance::Id }, + { "GeneratedCommandList", GeneratedCommandList::Id }, + { "AcceptedCommandList", AcceptedCommandList::Id }, + { "AttributeList", AttributeList::Id }, + { "FeatureMap", FeatureMap::Id }, + { "ClusterRevision", ClusterRevision::Id } +}; +} // namespace Attributes +} // namespace TemperatureMeasurement +namespace PressureMeasurement { +namespace Attributes { +static const std::unordered_map matter_attribute_id_cluster_map { + { "MeasuredValue", MeasuredValue::Id }, + { "MinMeasuredValue", MinMeasuredValue::Id }, + { "MaxMeasuredValue", MaxMeasuredValue::Id }, + { "Tolerance", Tolerance::Id }, + { "ScaledValue", ScaledValue::Id }, + { "MinScaledValue", MinScaledValue::Id }, + { "MaxScaledValue", MaxScaledValue::Id }, + { "ScaledTolerance", ScaledTolerance::Id }, + { "Scale", Scale::Id }, + { "GeneratedCommandList", GeneratedCommandList::Id }, + { "AcceptedCommandList", AcceptedCommandList::Id }, + { "AttributeList", AttributeList::Id }, + { "FeatureMap", FeatureMap::Id }, + { "ClusterRevision", ClusterRevision::Id } +}; +} // namespace Attributes +} // namespace PressureMeasurement +namespace FlowMeasurement { +namespace Attributes { +static const std::unordered_map matter_attribute_id_cluster_map { + { "MeasuredValue", MeasuredValue::Id }, + { "MinMeasuredValue", MinMeasuredValue::Id }, + { "MaxMeasuredValue", MaxMeasuredValue::Id }, + { "Tolerance", Tolerance::Id }, + { "GeneratedCommandList", GeneratedCommandList::Id }, + { "AcceptedCommandList", AcceptedCommandList::Id }, + { "AttributeList", AttributeList::Id }, + { "FeatureMap", FeatureMap::Id }, + { "ClusterRevision", ClusterRevision::Id } +}; +} // namespace Attributes +} // namespace FlowMeasurement +namespace RelativeHumidityMeasurement { +namespace Attributes { +static const std::unordered_map matter_attribute_id_cluster_map { + { "MeasuredValue", MeasuredValue::Id }, + { "MinMeasuredValue", MinMeasuredValue::Id }, + { "MaxMeasuredValue", MaxMeasuredValue::Id }, + { "Tolerance", Tolerance::Id }, + { "GeneratedCommandList", GeneratedCommandList::Id }, + { "AcceptedCommandList", AcceptedCommandList::Id }, + { "AttributeList", AttributeList::Id }, + { "FeatureMap", FeatureMap::Id }, + { "ClusterRevision", ClusterRevision::Id } +}; +} // namespace Attributes +} // namespace RelativeHumidityMeasurement +namespace OccupancySensing { +namespace Attributes { +static const std::unordered_map matter_attribute_id_cluster_map { + { "Occupancy", Occupancy::Id }, + { "OccupancySensorType", OccupancySensorType::Id }, + { "OccupancySensorTypeBitmap", OccupancySensorTypeBitmap::Id }, + { "PirOccupiedToUnoccupiedDelay", PirOccupiedToUnoccupiedDelay::Id }, + { "PirUnoccupiedToOccupiedDelay", PirUnoccupiedToOccupiedDelay::Id }, + { "PirUnoccupiedToOccupiedThreshold", PirUnoccupiedToOccupiedThreshold::Id }, + { "UltrasonicOccupiedToUnoccupiedDelay", UltrasonicOccupiedToUnoccupiedDelay::Id }, + { "UltrasonicUnoccupiedToOccupiedDelay", UltrasonicUnoccupiedToOccupiedDelay::Id }, + { "UltrasonicUnoccupiedToOccupiedThreshold", UltrasonicUnoccupiedToOccupiedThreshold::Id }, + { "PhysicalContactOccupiedToUnoccupiedDelay", PhysicalContactOccupiedToUnoccupiedDelay::Id }, + { "PhysicalContactUnoccupiedToOccupiedDelay", PhysicalContactUnoccupiedToOccupiedDelay::Id }, + { "PhysicalContactUnoccupiedToOccupiedThreshold", PhysicalContactUnoccupiedToOccupiedThreshold::Id }, + { "GeneratedCommandList", GeneratedCommandList::Id }, + { "AcceptedCommandList", AcceptedCommandList::Id }, + { "AttributeList", AttributeList::Id }, + { "FeatureMap", FeatureMap::Id }, + { "ClusterRevision", ClusterRevision::Id } +}; +} // namespace Attributes +} // namespace OccupancySensing +namespace WakeOnLan { +namespace Attributes { +static const std::unordered_map matter_attribute_id_cluster_map { + { "MACAddress", MACAddress::Id }, + { "GeneratedCommandList", GeneratedCommandList::Id }, + { "AcceptedCommandList", AcceptedCommandList::Id }, + { "AttributeList", AttributeList::Id }, + { "FeatureMap", FeatureMap::Id }, + { "ClusterRevision", ClusterRevision::Id } +}; +} // namespace Attributes +} // namespace WakeOnLan +namespace Channel { +namespace Attributes { +static const std::unordered_map matter_attribute_id_cluster_map { + { "ChannelList", ChannelList::Id }, + { "Lineup", Lineup::Id }, + { "CurrentChannel", CurrentChannel::Id }, + { "GeneratedCommandList", GeneratedCommandList::Id }, + { "AcceptedCommandList", AcceptedCommandList::Id }, + { "AttributeList", AttributeList::Id }, + { "FeatureMap", FeatureMap::Id }, + { "ClusterRevision", ClusterRevision::Id } +}; +} // namespace Attributes +} // namespace Channel +namespace TargetNavigator { +namespace Attributes { +static const std::unordered_map matter_attribute_id_cluster_map { + { "TargetList", TargetList::Id }, + { "CurrentTarget", CurrentTarget::Id }, + { "GeneratedCommandList", GeneratedCommandList::Id }, + { "AcceptedCommandList", AcceptedCommandList::Id }, + { "AttributeList", AttributeList::Id }, + { "FeatureMap", FeatureMap::Id }, + { "ClusterRevision", ClusterRevision::Id } +}; +} // namespace Attributes +} // namespace TargetNavigator +namespace MediaPlayback { +namespace Attributes { +static const std::unordered_map matter_attribute_id_cluster_map { + { "CurrentState", CurrentState::Id }, + { "StartTime", StartTime::Id }, + { "Duration", Duration::Id }, + { "SampledPosition", SampledPosition::Id }, + { "PlaybackSpeed", PlaybackSpeed::Id }, + { "SeekRangeEnd", SeekRangeEnd::Id }, + { "SeekRangeStart", SeekRangeStart::Id }, + { "GeneratedCommandList", GeneratedCommandList::Id }, + { "AcceptedCommandList", AcceptedCommandList::Id }, + { "AttributeList", AttributeList::Id }, + { "FeatureMap", FeatureMap::Id }, + { "ClusterRevision", ClusterRevision::Id } +}; +} // namespace Attributes +} // namespace MediaPlayback +namespace MediaInput { +namespace Attributes { +static const std::unordered_map matter_attribute_id_cluster_map { + { "InputList", InputList::Id }, + { "CurrentInput", CurrentInput::Id }, + { "GeneratedCommandList", GeneratedCommandList::Id }, + { "AcceptedCommandList", AcceptedCommandList::Id }, + { "AttributeList", AttributeList::Id }, + { "FeatureMap", FeatureMap::Id }, + { "ClusterRevision", ClusterRevision::Id } +}; +} // namespace Attributes +} // namespace MediaInput +namespace LowPower { +namespace Attributes { +static const std::unordered_map matter_attribute_id_cluster_map { + { "GeneratedCommandList", GeneratedCommandList::Id }, + { "AcceptedCommandList", AcceptedCommandList::Id }, + { "AttributeList", AttributeList::Id }, + { "FeatureMap", FeatureMap::Id }, + { "ClusterRevision", ClusterRevision::Id } +}; +} // namespace Attributes +} // namespace LowPower +namespace KeypadInput { +namespace Attributes { +static const std::unordered_map matter_attribute_id_cluster_map { + { "GeneratedCommandList", GeneratedCommandList::Id }, + { "AcceptedCommandList", AcceptedCommandList::Id }, + { "AttributeList", AttributeList::Id }, + { "FeatureMap", FeatureMap::Id }, + { "ClusterRevision", ClusterRevision::Id } +}; +} // namespace Attributes +} // namespace KeypadInput +namespace ContentLauncher { +namespace Attributes { +static const std::unordered_map matter_attribute_id_cluster_map { + { "AcceptHeader", AcceptHeader::Id }, + { "SupportedStreamingProtocols", SupportedStreamingProtocols::Id }, + { "GeneratedCommandList", GeneratedCommandList::Id }, + { "AcceptedCommandList", AcceptedCommandList::Id }, + { "AttributeList", AttributeList::Id }, + { "FeatureMap", FeatureMap::Id }, + { "ClusterRevision", ClusterRevision::Id } +}; +} // namespace Attributes +} // namespace ContentLauncher +namespace AudioOutput { +namespace Attributes { +static const std::unordered_map matter_attribute_id_cluster_map { + { "OutputList", OutputList::Id }, + { "CurrentOutput", CurrentOutput::Id }, + { "GeneratedCommandList", GeneratedCommandList::Id }, + { "AcceptedCommandList", AcceptedCommandList::Id }, + { "AttributeList", AttributeList::Id }, + { "FeatureMap", FeatureMap::Id }, + { "ClusterRevision", ClusterRevision::Id } +}; +} // namespace Attributes +} // namespace AudioOutput +namespace ApplicationLauncher { +namespace Attributes { +static const std::unordered_map matter_attribute_id_cluster_map { + { "CatalogList", CatalogList::Id }, + { "CurrentApp", CurrentApp::Id }, + { "GeneratedCommandList", GeneratedCommandList::Id }, + { "AcceptedCommandList", AcceptedCommandList::Id }, + { "AttributeList", AttributeList::Id }, + { "FeatureMap", FeatureMap::Id }, + { "ClusterRevision", ClusterRevision::Id } +}; +} // namespace Attributes +} // namespace ApplicationLauncher +namespace ApplicationBasic { +namespace Attributes { +static const std::unordered_map matter_attribute_id_cluster_map { + { "VendorName", VendorName::Id }, + { "VendorID", VendorID::Id }, + { "ApplicationName", ApplicationName::Id }, + { "ProductID", ProductID::Id }, + { "Application", Application::Id }, + { "Status", Status::Id }, + { "ApplicationVersion", ApplicationVersion::Id }, + { "AllowedVendorList", AllowedVendorList::Id }, + { "GeneratedCommandList", GeneratedCommandList::Id }, + { "AcceptedCommandList", AcceptedCommandList::Id }, + { "AttributeList", AttributeList::Id }, + { "FeatureMap", FeatureMap::Id }, + { "ClusterRevision", ClusterRevision::Id } +}; +} // namespace Attributes +} // namespace ApplicationBasic +namespace AccountLogin { +namespace Attributes { +static const std::unordered_map matter_attribute_id_cluster_map { + { "GeneratedCommandList", GeneratedCommandList::Id }, + { "AcceptedCommandList", AcceptedCommandList::Id }, + { "AttributeList", AttributeList::Id }, + { "FeatureMap", FeatureMap::Id }, + { "ClusterRevision", ClusterRevision::Id } +}; +} // namespace Attributes +} // namespace AccountLogin +namespace ElectricalMeasurement { +namespace Attributes { +static const std::unordered_map matter_attribute_id_cluster_map { + { "MeasurementType", MeasurementType::Id }, + { "DcVoltage", DcVoltage::Id }, + { "DcVoltageMin", DcVoltageMin::Id }, + { "DcVoltageMax", DcVoltageMax::Id }, + { "DcCurrent", DcCurrent::Id }, + { "DcCurrentMin", DcCurrentMin::Id }, + { "DcCurrentMax", DcCurrentMax::Id }, + { "DcPower", DcPower::Id }, + { "DcPowerMin", DcPowerMin::Id }, + { "DcPowerMax", DcPowerMax::Id }, + { "DcVoltageMultiplier", DcVoltageMultiplier::Id }, + { "DcVoltageDivisor", DcVoltageDivisor::Id }, + { "DcCurrentMultiplier", DcCurrentMultiplier::Id }, + { "DcCurrentDivisor", DcCurrentDivisor::Id }, + { "DcPowerMultiplier", DcPowerMultiplier::Id }, + { "DcPowerDivisor", DcPowerDivisor::Id }, + { "AcFrequency", AcFrequency::Id }, + { "AcFrequencyMin", AcFrequencyMin::Id }, + { "AcFrequencyMax", AcFrequencyMax::Id }, + { "NeutralCurrent", NeutralCurrent::Id }, + { "TotalActivePower", TotalActivePower::Id }, + { "TotalReactivePower", TotalReactivePower::Id }, + { "TotalApparentPower", TotalApparentPower::Id }, + { "Measured1stHarmonicCurrent", Measured1stHarmonicCurrent::Id }, + { "Measured3rdHarmonicCurrent", Measured3rdHarmonicCurrent::Id }, + { "Measured5thHarmonicCurrent", Measured5thHarmonicCurrent::Id }, + { "Measured7thHarmonicCurrent", Measured7thHarmonicCurrent::Id }, + { "Measured9thHarmonicCurrent", Measured9thHarmonicCurrent::Id }, + { "Measured11thHarmonicCurrent", Measured11thHarmonicCurrent::Id }, + { "MeasuredPhase1stHarmonicCurrent", MeasuredPhase1stHarmonicCurrent::Id }, + { "MeasuredPhase3rdHarmonicCurrent", MeasuredPhase3rdHarmonicCurrent::Id }, + { "MeasuredPhase5thHarmonicCurrent", MeasuredPhase5thHarmonicCurrent::Id }, + { "MeasuredPhase7thHarmonicCurrent", MeasuredPhase7thHarmonicCurrent::Id }, + { "MeasuredPhase9thHarmonicCurrent", MeasuredPhase9thHarmonicCurrent::Id }, + { "MeasuredPhase11thHarmonicCurrent", MeasuredPhase11thHarmonicCurrent::Id }, + { "AcFrequencyMultiplier", AcFrequencyMultiplier::Id }, + { "AcFrequencyDivisor", AcFrequencyDivisor::Id }, + { "PowerMultiplier", PowerMultiplier::Id }, + { "PowerDivisor", PowerDivisor::Id }, + { "HarmonicCurrentMultiplier", HarmonicCurrentMultiplier::Id }, + { "PhaseHarmonicCurrentMultiplier", PhaseHarmonicCurrentMultiplier::Id }, + { "InstantaneousVoltage", InstantaneousVoltage::Id }, + { "InstantaneousLineCurrent", InstantaneousLineCurrent::Id }, + { "InstantaneousActiveCurrent", InstantaneousActiveCurrent::Id }, + { "InstantaneousReactiveCurrent", InstantaneousReactiveCurrent::Id }, + { "InstantaneousPower", InstantaneousPower::Id }, + { "RmsVoltage", RmsVoltage::Id }, + { "RmsVoltageMin", RmsVoltageMin::Id }, + { "RmsVoltageMax", RmsVoltageMax::Id }, + { "RmsCurrent", RmsCurrent::Id }, + { "RmsCurrentMin", RmsCurrentMin::Id }, + { "RmsCurrentMax", RmsCurrentMax::Id }, + { "ActivePower", ActivePower::Id }, + { "ActivePowerMin", ActivePowerMin::Id }, + { "ActivePowerMax", ActivePowerMax::Id }, + { "ReactivePower", ReactivePower::Id }, + { "ApparentPower", ApparentPower::Id }, + { "PowerFactor", PowerFactor::Id }, + { "AverageRmsVoltageMeasurementPeriod", AverageRmsVoltageMeasurementPeriod::Id }, + { "AverageRmsUnderVoltageCounter", AverageRmsUnderVoltageCounter::Id }, + { "RmsExtremeOverVoltagePeriod", RmsExtremeOverVoltagePeriod::Id }, + { "RmsExtremeUnderVoltagePeriod", RmsExtremeUnderVoltagePeriod::Id }, + { "RmsVoltageSagPeriod", RmsVoltageSagPeriod::Id }, + { "RmsVoltageSwellPeriod", RmsVoltageSwellPeriod::Id }, + { "AcVoltageMultiplier", AcVoltageMultiplier::Id }, + { "AcVoltageDivisor", AcVoltageDivisor::Id }, + { "AcCurrentMultiplier", AcCurrentMultiplier::Id }, + { "AcCurrentDivisor", AcCurrentDivisor::Id }, + { "AcPowerMultiplier", AcPowerMultiplier::Id }, + { "AcPowerDivisor", AcPowerDivisor::Id }, + { "OverloadAlarmsMask", OverloadAlarmsMask::Id }, + { "VoltageOverload", VoltageOverload::Id }, + { "CurrentOverload", CurrentOverload::Id }, + { "AcOverloadAlarmsMask", AcOverloadAlarmsMask::Id }, + { "AcVoltageOverload", AcVoltageOverload::Id }, + { "AcCurrentOverload", AcCurrentOverload::Id }, + { "AcActivePowerOverload", AcActivePowerOverload::Id }, + { "AcReactivePowerOverload", AcReactivePowerOverload::Id }, + { "AverageRmsOverVoltage", AverageRmsOverVoltage::Id }, + { "AverageRmsUnderVoltage", AverageRmsUnderVoltage::Id }, + { "RmsExtremeOverVoltage", RmsExtremeOverVoltage::Id }, + { "RmsExtremeUnderVoltage", RmsExtremeUnderVoltage::Id }, + { "RmsVoltageSag", RmsVoltageSag::Id }, + { "RmsVoltageSwell", RmsVoltageSwell::Id }, + { "LineCurrentPhaseB", LineCurrentPhaseB::Id }, + { "ActiveCurrentPhaseB", ActiveCurrentPhaseB::Id }, + { "ReactiveCurrentPhaseB", ReactiveCurrentPhaseB::Id }, + { "RmsVoltagePhaseB", RmsVoltagePhaseB::Id }, + { "RmsVoltageMinPhaseB", RmsVoltageMinPhaseB::Id }, + { "RmsVoltageMaxPhaseB", RmsVoltageMaxPhaseB::Id }, + { "RmsCurrentPhaseB", RmsCurrentPhaseB::Id }, + { "RmsCurrentMinPhaseB", RmsCurrentMinPhaseB::Id }, + { "RmsCurrentMaxPhaseB", RmsCurrentMaxPhaseB::Id }, + { "ActivePowerPhaseB", ActivePowerPhaseB::Id }, + { "ActivePowerMinPhaseB", ActivePowerMinPhaseB::Id }, + { "ActivePowerMaxPhaseB", ActivePowerMaxPhaseB::Id }, + { "ReactivePowerPhaseB", ReactivePowerPhaseB::Id }, + { "ApparentPowerPhaseB", ApparentPowerPhaseB::Id }, + { "PowerFactorPhaseB", PowerFactorPhaseB::Id }, + { "AverageRmsVoltageMeasurementPeriodPhaseB", AverageRmsVoltageMeasurementPeriodPhaseB::Id }, + { "AverageRmsOverVoltageCounterPhaseB", AverageRmsOverVoltageCounterPhaseB::Id }, + { "AverageRmsUnderVoltageCounterPhaseB", AverageRmsUnderVoltageCounterPhaseB::Id }, + { "RmsExtremeOverVoltagePeriodPhaseB", RmsExtremeOverVoltagePeriodPhaseB::Id }, + { "RmsExtremeUnderVoltagePeriodPhaseB", RmsExtremeUnderVoltagePeriodPhaseB::Id }, + { "RmsVoltageSagPeriodPhaseB", RmsVoltageSagPeriodPhaseB::Id }, + { "RmsVoltageSwellPeriodPhaseB", RmsVoltageSwellPeriodPhaseB::Id }, + { "LineCurrentPhaseC", LineCurrentPhaseC::Id }, + { "ActiveCurrentPhaseC", ActiveCurrentPhaseC::Id }, + { "ReactiveCurrentPhaseC", ReactiveCurrentPhaseC::Id }, + { "RmsVoltagePhaseC", RmsVoltagePhaseC::Id }, + { "RmsVoltageMinPhaseC", RmsVoltageMinPhaseC::Id }, + { "RmsVoltageMaxPhaseC", RmsVoltageMaxPhaseC::Id }, + { "RmsCurrentPhaseC", RmsCurrentPhaseC::Id }, + { "RmsCurrentMinPhaseC", RmsCurrentMinPhaseC::Id }, + { "RmsCurrentMaxPhaseC", RmsCurrentMaxPhaseC::Id }, + { "ActivePowerPhaseC", ActivePowerPhaseC::Id }, + { "ActivePowerMinPhaseC", ActivePowerMinPhaseC::Id }, + { "ActivePowerMaxPhaseC", ActivePowerMaxPhaseC::Id }, + { "ReactivePowerPhaseC", ReactivePowerPhaseC::Id }, + { "ApparentPowerPhaseC", ApparentPowerPhaseC::Id }, + { "PowerFactorPhaseC", PowerFactorPhaseC::Id }, + { "AverageRmsVoltageMeasurementPeriodPhaseC", AverageRmsVoltageMeasurementPeriodPhaseC::Id }, + { "AverageRmsOverVoltageCounterPhaseC", AverageRmsOverVoltageCounterPhaseC::Id }, + { "AverageRmsUnderVoltageCounterPhaseC", AverageRmsUnderVoltageCounterPhaseC::Id }, + { "RmsExtremeOverVoltagePeriodPhaseC", RmsExtremeOverVoltagePeriodPhaseC::Id }, + { "RmsExtremeUnderVoltagePeriodPhaseC", RmsExtremeUnderVoltagePeriodPhaseC::Id }, + { "RmsVoltageSagPeriodPhaseC", RmsVoltageSagPeriodPhaseC::Id }, + { "RmsVoltageSwellPeriodPhaseC", RmsVoltageSwellPeriodPhaseC::Id }, + { "GeneratedCommandList", GeneratedCommandList::Id }, + { "AcceptedCommandList", AcceptedCommandList::Id }, + { "AttributeList", AttributeList::Id }, + { "FeatureMap", FeatureMap::Id }, + { "ClusterRevision", ClusterRevision::Id } +}; +} // namespace Attributes +} // namespace ElectricalMeasurement +namespace ClientMonitoring { +namespace Attributes { +static const std::unordered_map matter_attribute_id_cluster_map { + { "IdleModeInterval", IdleModeInterval::Id }, + { "ActiveModeInterval", ActiveModeInterval::Id }, + { "ActiveModeThreshold", ActiveModeThreshold::Id }, + { "ExpectedClients", ExpectedClients::Id }, + { "GeneratedCommandList", GeneratedCommandList::Id }, + { "AcceptedCommandList", AcceptedCommandList::Id }, + { "AttributeList", AttributeList::Id }, + { "FeatureMap", FeatureMap::Id }, + { "ClusterRevision", ClusterRevision::Id } +}; +} // namespace Attributes +} // namespace ClientMonitoring +namespace UnitTesting { +namespace Attributes { +static const std::unordered_map matter_attribute_id_cluster_map { + { "Boolean", Boolean::Id }, + { "Bitmap8", Bitmap8::Id }, + { "Bitmap16", Bitmap16::Id }, + { "Bitmap32", Bitmap32::Id }, + { "Bitmap64", Bitmap64::Id }, + { "Int8u", Int8u::Id }, + { "Int16u", Int16u::Id }, + { "Int24u", Int24u::Id }, + { "Int32u", Int32u::Id }, + { "Int40u", Int40u::Id }, + { "Int48u", Int48u::Id }, + { "Int56u", Int56u::Id }, + { "Int64u", Int64u::Id }, + { "Int8s", Int8s::Id }, + { "Int16s", Int16s::Id }, + { "Int24s", Int24s::Id }, + { "Int32s", Int32s::Id }, + { "Int40s", Int40s::Id }, + { "Int48s", Int48s::Id }, + { "Int56s", Int56s::Id }, + { "Int64s", Int64s::Id }, + { "Enum8", Enum8::Id }, + { "Enum16", Enum16::Id }, + { "FloatSingle", FloatSingle::Id }, + { "FloatDouble", FloatDouble::Id }, + { "OctetString", OctetString::Id }, + { "ListInt8u", ListInt8u::Id }, + { "ListOctetString", ListOctetString::Id }, + { "ListStructOctetString", ListStructOctetString::Id }, + { "LongOctetString", LongOctetString::Id }, + { "CharString", CharString::Id }, + { "LongCharString", LongCharString::Id }, + { "EpochUs", EpochUs::Id }, + { "EpochS", EpochS::Id }, + { "VendorId", VendorId::Id }, + { "ListNullablesAndOptionalsStruct", ListNullablesAndOptionalsStruct::Id }, + { "EnumAttr", EnumAttr::Id }, + { "StructAttr", StructAttr::Id }, + { "RangeRestrictedInt8u", RangeRestrictedInt8u::Id }, + { "RangeRestrictedInt8s", RangeRestrictedInt8s::Id }, + { "RangeRestrictedInt16u", RangeRestrictedInt16u::Id }, + { "RangeRestrictedInt16s", RangeRestrictedInt16s::Id }, + { "ListLongOctetString", ListLongOctetString::Id }, + { "ListFabricScoped", ListFabricScoped::Id }, + { "TimedWriteBoolean", TimedWriteBoolean::Id }, + { "GeneralErrorBoolean", GeneralErrorBoolean::Id }, + { "ClusterErrorBoolean", ClusterErrorBoolean::Id }, + { "Unsupported", Unsupported::Id }, + { "NullableBoolean", NullableBoolean::Id }, + { "NullableBitmap8", NullableBitmap8::Id }, + { "NullableBitmap16", NullableBitmap16::Id }, + { "NullableBitmap32", NullableBitmap32::Id }, + { "NullableBitmap64", NullableBitmap64::Id }, + { "NullableInt8u", NullableInt8u::Id }, + { "NullableInt16u", NullableInt16u::Id }, + { "NullableInt24u", NullableInt24u::Id }, + { "NullableInt32u", NullableInt32u::Id }, + { "NullableInt40u", NullableInt40u::Id }, + { "NullableInt48u", NullableInt48u::Id }, + { "NullableInt56u", NullableInt56u::Id }, + { "NullableInt64u", NullableInt64u::Id }, + { "NullableInt8s", NullableInt8s::Id }, + { "NullableInt16s", NullableInt16s::Id }, + { "NullableInt24s", NullableInt24s::Id }, + { "NullableInt32s", NullableInt32s::Id }, + { "NullableInt40s", NullableInt40s::Id }, + { "NullableInt48s", NullableInt48s::Id }, + { "NullableInt56s", NullableInt56s::Id }, + { "NullableInt64s", NullableInt64s::Id }, + { "NullableEnum8", NullableEnum8::Id }, + { "NullableEnum16", NullableEnum16::Id }, + { "NullableFloatSingle", NullableFloatSingle::Id }, + { "NullableFloatDouble", NullableFloatDouble::Id }, + { "NullableOctetString", NullableOctetString::Id }, + { "NullableCharString", NullableCharString::Id }, + { "NullableEnumAttr", NullableEnumAttr::Id }, + { "NullableStruct", NullableStruct::Id }, + { "NullableRangeRestrictedInt8u", NullableRangeRestrictedInt8u::Id }, + { "NullableRangeRestrictedInt8s", NullableRangeRestrictedInt8s::Id }, + { "NullableRangeRestrictedInt16u", NullableRangeRestrictedInt16u::Id }, + { "NullableRangeRestrictedInt16s", NullableRangeRestrictedInt16s::Id }, + { "WriteOnlyInt8u", WriteOnlyInt8u::Id }, + { "GeneratedCommandList", GeneratedCommandList::Id }, + { "AcceptedCommandList", AcceptedCommandList::Id }, + { "AttributeList", AttributeList::Id }, + { "FeatureMap", FeatureMap::Id }, + { "ClusterRevision", ClusterRevision::Id } +}; +} // namespace Attributes +} // namespace UnitTesting +namespace FaultInjection { +namespace Attributes { +static const std::unordered_map matter_attribute_id_cluster_map { + { "GeneratedCommandList", GeneratedCommandList::Id }, + { "AcceptedCommandList", AcceptedCommandList::Id }, + { "AttributeList", AttributeList::Id }, + { "FeatureMap", FeatureMap::Id }, + { "ClusterRevision", ClusterRevision::Id } +}; +} // namespace Attributes +} // namespace FaultInjection - // Attribute mapping Matter - // Attribute structure for each cluster - namespace Identify { - namespace Attributes { - static const std::unordered_map matter_attribute_id_cluster_map { - { "IdentifyTime", IdentifyTime::Id }, - { "IdentifyType", IdentifyType::Id }, - { "GeneratedCommandList", GeneratedCommandList::Id }, - { "AcceptedCommandList", AcceptedCommandList::Id }, - { "AttributeList", AttributeList::Id }, - { "FeatureMap", FeatureMap::Id }, - { "ClusterRevision", ClusterRevision::Id } - }; - } // namespace Attributes - } // namespace Identify - namespace Groups { - namespace Attributes { - static const std::unordered_map matter_attribute_id_cluster_map { - { "NameSupport", NameSupport::Id }, - { "GeneratedCommandList", GeneratedCommandList::Id }, - { "AcceptedCommandList", AcceptedCommandList::Id }, - { "AttributeList", AttributeList::Id }, - { "FeatureMap", FeatureMap::Id }, - { "ClusterRevision", ClusterRevision::Id } - }; - } // namespace Attributes - } // namespace Groups - namespace Scenes { - namespace Attributes { - static const std::unordered_map matter_attribute_id_cluster_map { - { "SceneCount", SceneCount::Id }, - { "CurrentScene", CurrentScene::Id }, - { "CurrentGroup", CurrentGroup::Id }, - { "SceneValid", SceneValid::Id }, - { "NameSupport", NameSupport::Id }, - { "LastConfiguredBy", LastConfiguredBy::Id }, - { "GeneratedCommandList", GeneratedCommandList::Id }, - { "AcceptedCommandList", AcceptedCommandList::Id }, - { "AttributeList", AttributeList::Id }, - { "FeatureMap", FeatureMap::Id }, - { "ClusterRevision", ClusterRevision::Id } - }; - } // namespace Attributes - } // namespace Scenes - namespace OnOff { - namespace Attributes { - static const std::unordered_map matter_attribute_id_cluster_map { - { "OnOff", OnOff::Id }, - { "GlobalSceneControl", GlobalSceneControl::Id }, - { "OnTime", OnTime::Id }, - { "OffWaitTime", OffWaitTime::Id }, - { "StartUpOnOff", StartUpOnOff::Id }, - { "GeneratedCommandList", GeneratedCommandList::Id }, - { "AcceptedCommandList", AcceptedCommandList::Id }, - { "AttributeList", AttributeList::Id }, - { "FeatureMap", FeatureMap::Id }, - { "ClusterRevision", ClusterRevision::Id } - }; - } // namespace Attributes - } // namespace OnOff - namespace OnOffSwitchConfiguration { - namespace Attributes { - static const std::unordered_map matter_attribute_id_cluster_map { - { "SwitchType", SwitchType::Id }, - { "SwitchActions", SwitchActions::Id }, - { "GeneratedCommandList", GeneratedCommandList::Id }, - { "AcceptedCommandList", AcceptedCommandList::Id }, - { "AttributeList", AttributeList::Id }, - { "FeatureMap", FeatureMap::Id }, - { "ClusterRevision", ClusterRevision::Id } - }; - } // namespace Attributes - } // namespace OnOffSwitchConfiguration - namespace LevelControl { - namespace Attributes { - static const std::unordered_map matter_attribute_id_cluster_map { - { "CurrentLevel", CurrentLevel::Id }, - { "RemainingTime", RemainingTime::Id }, - { "MinLevel", MinLevel::Id }, - { "MaxLevel", MaxLevel::Id }, - { "CurrentFrequency", CurrentFrequency::Id }, - { "MinFrequency", MinFrequency::Id }, - { "MaxFrequency", MaxFrequency::Id }, - { "Options", Options::Id }, - { "OnOffTransitionTime", OnOffTransitionTime::Id }, - { "OnLevel", OnLevel::Id }, - { "OnTransitionTime", OnTransitionTime::Id }, - { "OffTransitionTime", OffTransitionTime::Id }, - { "DefaultMoveRate", DefaultMoveRate::Id }, - { "StartUpCurrentLevel", StartUpCurrentLevel::Id }, - { "GeneratedCommandList", GeneratedCommandList::Id }, - { "AcceptedCommandList", AcceptedCommandList::Id }, - { "AttributeList", AttributeList::Id }, - { "FeatureMap", FeatureMap::Id }, - { "ClusterRevision", ClusterRevision::Id } - }; - } // namespace Attributes - } // namespace LevelControl - namespace BinaryInputBasic { - namespace Attributes { - static const std::unordered_map matter_attribute_id_cluster_map { - { "ActiveText", ActiveText::Id }, - { "Description", Description::Id }, - { "InactiveText", InactiveText::Id }, - { "OutOfService", OutOfService::Id }, - { "Polarity", Polarity::Id }, - { "PresentValue", PresentValue::Id }, - { "Reliability", Reliability::Id }, - { "StatusFlags", StatusFlags::Id }, - { "ApplicationType", ApplicationType::Id }, - { "GeneratedCommandList", GeneratedCommandList::Id }, - { "AcceptedCommandList", AcceptedCommandList::Id }, - { "AttributeList", AttributeList::Id }, - { "FeatureMap", FeatureMap::Id }, - { "ClusterRevision", ClusterRevision::Id } - }; - } // namespace Attributes - } // namespace BinaryInputBasic - namespace PulseWidthModulation { - namespace Attributes { - static const std::unordered_map matter_attribute_id_cluster_map { - { "GeneratedCommandList", GeneratedCommandList::Id }, - { "AcceptedCommandList", AcceptedCommandList::Id }, - { "AttributeList", AttributeList::Id }, - { "FeatureMap", FeatureMap::Id }, - { "ClusterRevision", ClusterRevision::Id } - }; - } // namespace Attributes - } // namespace PulseWidthModulation - namespace Descriptor { - namespace Attributes { - static const std::unordered_map matter_attribute_id_cluster_map { - { "DeviceTypeList", DeviceTypeList::Id }, - { "ServerList", ServerList::Id }, - { "ClientList", ClientList::Id }, - { "PartsList", PartsList::Id }, - { "GeneratedCommandList", GeneratedCommandList::Id }, - { "AcceptedCommandList", AcceptedCommandList::Id }, - { "AttributeList", AttributeList::Id }, - { "FeatureMap", FeatureMap::Id }, - { "ClusterRevision", ClusterRevision::Id } - }; - } // namespace Attributes - } // namespace Descriptor - namespace Binding { - namespace Attributes { - static const std::unordered_map matter_attribute_id_cluster_map { - { "Binding", Binding::Id }, - { "GeneratedCommandList", GeneratedCommandList::Id }, - { "AcceptedCommandList", AcceptedCommandList::Id }, - { "AttributeList", AttributeList::Id }, - { "FeatureMap", FeatureMap::Id }, - { "ClusterRevision", ClusterRevision::Id } - }; - } // namespace Attributes - } // namespace Binding - namespace AccessControl { - namespace Attributes { - static const std::unordered_map matter_attribute_id_cluster_map { - { "Acl", Acl::Id }, - { "Extension", Extension::Id }, - { "SubjectsPerAccessControlEntry", SubjectsPerAccessControlEntry::Id }, - { "TargetsPerAccessControlEntry", TargetsPerAccessControlEntry::Id }, - { "AccessControlEntriesPerFabric", AccessControlEntriesPerFabric::Id }, - { "GeneratedCommandList", GeneratedCommandList::Id }, - { "AcceptedCommandList", AcceptedCommandList::Id }, - { "AttributeList", AttributeList::Id }, - { "FeatureMap", FeatureMap::Id }, - { "ClusterRevision", ClusterRevision::Id } - }; - } // namespace Attributes - } // namespace AccessControl - namespace Actions { - namespace Attributes { - static const std::unordered_map matter_attribute_id_cluster_map { - { "ActionList", ActionList::Id }, - { "EndpointLists", EndpointLists::Id }, - { "SetupURL", SetupURL::Id }, - { "GeneratedCommandList", GeneratedCommandList::Id }, - { "AcceptedCommandList", AcceptedCommandList::Id }, - { "AttributeList", AttributeList::Id }, - { "FeatureMap", FeatureMap::Id }, - { "ClusterRevision", ClusterRevision::Id } - }; - } // namespace Attributes - } // namespace Actions - namespace Basic { - namespace Attributes { - static const std::unordered_map matter_attribute_id_cluster_map { - { "DataModelRevision", DataModelRevision::Id }, - { "VendorName", VendorName::Id }, - { "VendorID", VendorID::Id }, - { "ProductName", ProductName::Id }, - { "ProductID", ProductID::Id }, - { "NodeLabel", NodeLabel::Id }, - { "Location", Location::Id }, - { "HardwareVersion", HardwareVersion::Id }, - { "HardwareVersionString", HardwareVersionString::Id }, - { "SoftwareVersion", SoftwareVersion::Id }, - { "SoftwareVersionString", SoftwareVersionString::Id }, - { "ManufacturingDate", ManufacturingDate::Id }, - { "PartNumber", PartNumber::Id }, - { "ProductURL", ProductURL::Id }, - { "ProductLabel", ProductLabel::Id }, - { "SerialNumber", SerialNumber::Id }, - { "LocalConfigDisabled", LocalConfigDisabled::Id }, - { "Reachable", Reachable::Id }, - { "UniqueID", UniqueID::Id }, - { "CapabilityMinima", CapabilityMinima::Id }, - { "GeneratedCommandList", GeneratedCommandList::Id }, - { "AcceptedCommandList", AcceptedCommandList::Id }, - { "AttributeList", AttributeList::Id }, - { "FeatureMap", FeatureMap::Id }, - { "ClusterRevision", ClusterRevision::Id } - }; - } // namespace Attributes - } // namespace Basic - namespace OtaSoftwareUpdateProvider { - namespace Attributes { - static const std::unordered_map matter_attribute_id_cluster_map { - { "GeneratedCommandList", GeneratedCommandList::Id }, - { "AcceptedCommandList", AcceptedCommandList::Id }, - { "AttributeList", AttributeList::Id }, - { "FeatureMap", FeatureMap::Id }, - { "ClusterRevision", ClusterRevision::Id } - }; - } // namespace Attributes - } // namespace OtaSoftwareUpdateProvider - namespace OtaSoftwareUpdateRequestor { - namespace Attributes { - static const std::unordered_map matter_attribute_id_cluster_map { - { "DefaultOtaProviders", DefaultOtaProviders::Id }, - { "UpdatePossible", UpdatePossible::Id }, - { "UpdateState", UpdateState::Id }, - { "UpdateStateProgress", UpdateStateProgress::Id }, - { "GeneratedCommandList", GeneratedCommandList::Id }, - { "AcceptedCommandList", AcceptedCommandList::Id }, - { "AttributeList", AttributeList::Id }, - { "FeatureMap", FeatureMap::Id }, - { "ClusterRevision", ClusterRevision::Id } - }; - } // namespace Attributes - } // namespace OtaSoftwareUpdateRequestor - namespace LocalizationConfiguration { - namespace Attributes { - static const std::unordered_map matter_attribute_id_cluster_map { - { "ActiveLocale", ActiveLocale::Id }, - { "SupportedLocales", SupportedLocales::Id }, - { "GeneratedCommandList", GeneratedCommandList::Id }, - { "AcceptedCommandList", AcceptedCommandList::Id }, - { "AttributeList", AttributeList::Id }, - { "FeatureMap", FeatureMap::Id }, - { "ClusterRevision", ClusterRevision::Id } - }; - } // namespace Attributes - } // namespace LocalizationConfiguration - namespace TimeFormatLocalization { - namespace Attributes { - static const std::unordered_map matter_attribute_id_cluster_map { - { "HourFormat", HourFormat::Id }, - { "ActiveCalendarType", ActiveCalendarType::Id }, - { "SupportedCalendarTypes", SupportedCalendarTypes::Id }, - { "GeneratedCommandList", GeneratedCommandList::Id }, - { "AcceptedCommandList", AcceptedCommandList::Id }, - { "AttributeList", AttributeList::Id }, - { "FeatureMap", FeatureMap::Id }, - { "ClusterRevision", ClusterRevision::Id } - }; - } // namespace Attributes - } // namespace TimeFormatLocalization - namespace UnitLocalization { - namespace Attributes { - static const std::unordered_map matter_attribute_id_cluster_map { - { "TemperatureUnit", TemperatureUnit::Id }, - { "GeneratedCommandList", GeneratedCommandList::Id }, - { "AcceptedCommandList", AcceptedCommandList::Id }, - { "AttributeList", AttributeList::Id }, - { "FeatureMap", FeatureMap::Id }, - { "ClusterRevision", ClusterRevision::Id } - }; - } // namespace Attributes - } // namespace UnitLocalization - namespace PowerSourceConfiguration { - namespace Attributes { - static const std::unordered_map matter_attribute_id_cluster_map { - { "Sources", Sources::Id }, - { "GeneratedCommandList", GeneratedCommandList::Id }, - { "AcceptedCommandList", AcceptedCommandList::Id }, - { "AttributeList", AttributeList::Id }, - { "FeatureMap", FeatureMap::Id }, - { "ClusterRevision", ClusterRevision::Id } - }; - } // namespace Attributes - } // namespace PowerSourceConfiguration - namespace PowerSource { - namespace Attributes { - static const std::unordered_map matter_attribute_id_cluster_map { - { "Status", Status::Id }, - { "Order", Order::Id }, - { "Description", Description::Id }, - { "WiredAssessedInputVoltage", WiredAssessedInputVoltage::Id }, - { "WiredAssessedInputFrequency", WiredAssessedInputFrequency::Id }, - { "WiredCurrentType", WiredCurrentType::Id }, - { "WiredAssessedCurrent", WiredAssessedCurrent::Id }, - { "WiredNominalVoltage", WiredNominalVoltage::Id }, - { "WiredMaximumCurrent", WiredMaximumCurrent::Id }, - { "WiredPresent", WiredPresent::Id }, - { "ActiveWiredFaults", ActiveWiredFaults::Id }, - { "BatVoltage", BatVoltage::Id }, - { "BatPercentRemaining", BatPercentRemaining::Id }, - { "BatTimeRemaining", BatTimeRemaining::Id }, - { "BatChargeLevel", BatChargeLevel::Id }, - { "BatReplacementNeeded", BatReplacementNeeded::Id }, - { "BatReplaceability", BatReplaceability::Id }, - { "BatPresent", BatPresent::Id }, - { "ActiveBatFaults", ActiveBatFaults::Id }, - { "BatReplacementDescription", BatReplacementDescription::Id }, - { "BatCommonDesignation", BatCommonDesignation::Id }, - { "BatANSIDesignation", BatANSIDesignation::Id }, - { "BatIECDesignation", BatIECDesignation::Id }, - { "BatApprovedChemistry", BatApprovedChemistry::Id }, - { "BatCapacity", BatCapacity::Id }, - { "BatQuantity", BatQuantity::Id }, - { "BatChargeState", BatChargeState::Id }, - { "BatTimeToFullCharge", BatTimeToFullCharge::Id }, - { "BatFunctionalWhileCharging", BatFunctionalWhileCharging::Id }, - { "BatChargingCurrent", BatChargingCurrent::Id }, - { "ActiveBatChargeFaults", ActiveBatChargeFaults::Id }, - { "GeneratedCommandList", GeneratedCommandList::Id }, - { "AcceptedCommandList", AcceptedCommandList::Id }, - { "AttributeList", AttributeList::Id }, - { "FeatureMap", FeatureMap::Id }, - { "ClusterRevision", ClusterRevision::Id } - }; - } // namespace Attributes - } // namespace PowerSource - namespace GeneralCommissioning { - namespace Attributes { - static const std::unordered_map matter_attribute_id_cluster_map { - { "Breadcrumb", Breadcrumb::Id }, - { "BasicCommissioningInfo", BasicCommissioningInfo::Id }, - { "RegulatoryConfig", RegulatoryConfig::Id }, - { "LocationCapability", LocationCapability::Id }, - { "SupportsConcurrentConnection", SupportsConcurrentConnection::Id }, - { "GeneratedCommandList", GeneratedCommandList::Id }, - { "AcceptedCommandList", AcceptedCommandList::Id }, - { "AttributeList", AttributeList::Id }, - { "FeatureMap", FeatureMap::Id }, - { "ClusterRevision", ClusterRevision::Id } - }; - } // namespace Attributes - } // namespace GeneralCommissioning - namespace NetworkCommissioning { - namespace Attributes { - static const std::unordered_map matter_attribute_id_cluster_map { - { "MaxNetworks", MaxNetworks::Id }, - { "Networks", Networks::Id }, - { "ScanMaxTimeSeconds", ScanMaxTimeSeconds::Id }, - { "ConnectMaxTimeSeconds", ConnectMaxTimeSeconds::Id }, - { "InterfaceEnabled", InterfaceEnabled::Id }, - { "LastNetworkingStatus", LastNetworkingStatus::Id }, - { "LastNetworkID", LastNetworkID::Id }, - { "LastConnectErrorValue", LastConnectErrorValue::Id }, - { "GeneratedCommandList", GeneratedCommandList::Id }, - { "AcceptedCommandList", AcceptedCommandList::Id }, - { "AttributeList", AttributeList::Id }, - { "FeatureMap", FeatureMap::Id }, - { "ClusterRevision", ClusterRevision::Id } - }; - } // namespace Attributes - } // namespace NetworkCommissioning - namespace DiagnosticLogs { - namespace Attributes { - static const std::unordered_map matter_attribute_id_cluster_map { - { "GeneratedCommandList", GeneratedCommandList::Id }, - { "AcceptedCommandList", AcceptedCommandList::Id }, - { "AttributeList", AttributeList::Id }, - { "FeatureMap", FeatureMap::Id }, - { "ClusterRevision", ClusterRevision::Id } - }; - } // namespace Attributes - } // namespace DiagnosticLogs - namespace GeneralDiagnostics { - namespace Attributes { - static const std::unordered_map matter_attribute_id_cluster_map { - { "NetworkInterfaces", NetworkInterfaces::Id }, - { "RebootCount", RebootCount::Id }, - { "UpTime", UpTime::Id }, - { "TotalOperationalHours", TotalOperationalHours::Id }, - { "BootReasons", BootReasons::Id }, - { "ActiveHardwareFaults", ActiveHardwareFaults::Id }, - { "ActiveRadioFaults", ActiveRadioFaults::Id }, - { "ActiveNetworkFaults", ActiveNetworkFaults::Id }, - { "TestEventTriggersEnabled", TestEventTriggersEnabled::Id }, - { "GeneratedCommandList", GeneratedCommandList::Id }, - { "AcceptedCommandList", AcceptedCommandList::Id }, - { "AttributeList", AttributeList::Id }, - { "FeatureMap", FeatureMap::Id }, - { "ClusterRevision", ClusterRevision::Id } - }; - } // namespace Attributes - } // namespace GeneralDiagnostics - namespace SoftwareDiagnostics { - namespace Attributes { - static const std::unordered_map matter_attribute_id_cluster_map { - { "ThreadMetrics", ThreadMetrics::Id }, - { "CurrentHeapFree", CurrentHeapFree::Id }, - { "CurrentHeapUsed", CurrentHeapUsed::Id }, - { "CurrentHeapHighWatermark", CurrentHeapHighWatermark::Id }, - { "GeneratedCommandList", GeneratedCommandList::Id }, - { "AcceptedCommandList", AcceptedCommandList::Id }, - { "AttributeList", AttributeList::Id }, - { "FeatureMap", FeatureMap::Id }, - { "ClusterRevision", ClusterRevision::Id } - }; - } // namespace Attributes - } // namespace SoftwareDiagnostics - namespace ThreadNetworkDiagnostics { - namespace Attributes { - static const std::unordered_map matter_attribute_id_cluster_map { - { "Channel", Channel::Id }, - { "RoutingRole", RoutingRole::Id }, - { "NetworkName", NetworkName::Id }, - { "PanId", PanId::Id }, - { "ExtendedPanId", ExtendedPanId::Id }, - { "MeshLocalPrefix", MeshLocalPrefix::Id }, - { "OverrunCount", OverrunCount::Id }, - { "NeighborTableList", NeighborTableList::Id }, - { "RouteTableList", RouteTableList::Id }, - { "PartitionId", PartitionId::Id }, - { "Weighting", Weighting::Id }, - { "DataVersion", DataVersion::Id }, - { "StableDataVersion", StableDataVersion::Id }, - { "LeaderRouterId", LeaderRouterId::Id }, - { "DetachedRoleCount", DetachedRoleCount::Id }, - { "ChildRoleCount", ChildRoleCount::Id }, - { "RouterRoleCount", RouterRoleCount::Id }, - { "LeaderRoleCount", LeaderRoleCount::Id }, - { "AttachAttemptCount", AttachAttemptCount::Id }, - { "PartitionIdChangeCount", PartitionIdChangeCount::Id }, - { "BetterPartitionAttachAttemptCount", BetterPartitionAttachAttemptCount::Id }, - { "ParentChangeCount", ParentChangeCount::Id }, - { "TxTotalCount", TxTotalCount::Id }, - { "TxUnicastCount", TxUnicastCount::Id }, - { "TxBroadcastCount", TxBroadcastCount::Id }, - { "TxAckRequestedCount", TxAckRequestedCount::Id }, - { "TxAckedCount", TxAckedCount::Id }, - { "TxNoAckRequestedCount", TxNoAckRequestedCount::Id }, - { "TxDataCount", TxDataCount::Id }, - { "TxDataPollCount", TxDataPollCount::Id }, - { "TxBeaconCount", TxBeaconCount::Id }, - { "TxBeaconRequestCount", TxBeaconRequestCount::Id }, - { "TxOtherCount", TxOtherCount::Id }, - { "TxRetryCount", TxRetryCount::Id }, - { "TxDirectMaxRetryExpiryCount", TxDirectMaxRetryExpiryCount::Id }, - { "TxIndirectMaxRetryExpiryCount", TxIndirectMaxRetryExpiryCount::Id }, - { "TxErrCcaCount", TxErrCcaCount::Id }, - { "TxErrAbortCount", TxErrAbortCount::Id }, - { "TxErrBusyChannelCount", TxErrBusyChannelCount::Id }, - { "RxTotalCount", RxTotalCount::Id }, - { "RxUnicastCount", RxUnicastCount::Id }, - { "RxBroadcastCount", RxBroadcastCount::Id }, - { "RxDataCount", RxDataCount::Id }, - { "RxDataPollCount", RxDataPollCount::Id }, - { "RxBeaconCount", RxBeaconCount::Id }, - { "RxBeaconRequestCount", RxBeaconRequestCount::Id }, - { "RxOtherCount", RxOtherCount::Id }, - { "RxAddressFilteredCount", RxAddressFilteredCount::Id }, - { "RxDestAddrFilteredCount", RxDestAddrFilteredCount::Id }, - { "RxDuplicatedCount", RxDuplicatedCount::Id }, - { "RxErrNoFrameCount", RxErrNoFrameCount::Id }, - { "RxErrUnknownNeighborCount", RxErrUnknownNeighborCount::Id }, - { "RxErrInvalidSrcAddrCount", RxErrInvalidSrcAddrCount::Id }, - { "RxErrSecCount", RxErrSecCount::Id }, - { "RxErrFcsCount", RxErrFcsCount::Id }, - { "RxErrOtherCount", RxErrOtherCount::Id }, - { "ActiveTimestamp", ActiveTimestamp::Id }, - { "PendingTimestamp", PendingTimestamp::Id }, - { "Delay", Delay::Id }, - { "SecurityPolicy", SecurityPolicy::Id }, - { "ChannelPage0Mask", ChannelPage0Mask::Id }, - { "OperationalDatasetComponents", OperationalDatasetComponents::Id }, - { "ActiveNetworkFaultsList", ActiveNetworkFaultsList::Id }, - { "GeneratedCommandList", GeneratedCommandList::Id }, - { "AcceptedCommandList", AcceptedCommandList::Id }, - { "AttributeList", AttributeList::Id }, - { "FeatureMap", FeatureMap::Id }, - { "ClusterRevision", ClusterRevision::Id } - }; - } // namespace Attributes - } // namespace ThreadNetworkDiagnostics - namespace WiFiNetworkDiagnostics { - namespace Attributes { - static const std::unordered_map matter_attribute_id_cluster_map { - { "Bssid", Bssid::Id }, - { "SecurityType", SecurityType::Id }, - { "WiFiVersion", WiFiVersion::Id }, - { "ChannelNumber", ChannelNumber::Id }, - { "Rssi", Rssi::Id }, - { "BeaconLostCount", BeaconLostCount::Id }, - { "BeaconRxCount", BeaconRxCount::Id }, - { "PacketMulticastRxCount", PacketMulticastRxCount::Id }, - { "PacketMulticastTxCount", PacketMulticastTxCount::Id }, - { "PacketUnicastRxCount", PacketUnicastRxCount::Id }, - { "PacketUnicastTxCount", PacketUnicastTxCount::Id }, - { "CurrentMaxRate", CurrentMaxRate::Id }, - { "OverrunCount", OverrunCount::Id }, - { "GeneratedCommandList", GeneratedCommandList::Id }, - { "AcceptedCommandList", AcceptedCommandList::Id }, - { "AttributeList", AttributeList::Id }, - { "FeatureMap", FeatureMap::Id }, - { "ClusterRevision", ClusterRevision::Id } - }; - } // namespace Attributes - } // namespace WiFiNetworkDiagnostics - namespace EthernetNetworkDiagnostics { - namespace Attributes { - static const std::unordered_map matter_attribute_id_cluster_map { - { "PHYRate", PHYRate::Id }, - { "FullDuplex", FullDuplex::Id }, - { "PacketRxCount", PacketRxCount::Id }, - { "PacketTxCount", PacketTxCount::Id }, - { "TxErrCount", TxErrCount::Id }, - { "CollisionCount", CollisionCount::Id }, - { "OverrunCount", OverrunCount::Id }, - { "CarrierDetect", CarrierDetect::Id }, - { "TimeSinceReset", TimeSinceReset::Id }, - { "GeneratedCommandList", GeneratedCommandList::Id }, - { "AcceptedCommandList", AcceptedCommandList::Id }, - { "AttributeList", AttributeList::Id }, - { "FeatureMap", FeatureMap::Id }, - { "ClusterRevision", ClusterRevision::Id } - }; - } // namespace Attributes - } // namespace EthernetNetworkDiagnostics - namespace TimeSynchronization { - namespace Attributes { - static const std::unordered_map matter_attribute_id_cluster_map { - { "UTCTime", UTCTime::Id }, - { "Granularity", Granularity::Id }, - { "TimeSource", TimeSource::Id }, - { "TrustedTimeNodeId", TrustedTimeNodeId::Id }, - { "DefaultNtp", DefaultNtp::Id }, - { "TimeZone", TimeZone::Id }, - { "DstOffset", DstOffset::Id }, - { "LocalTime", LocalTime::Id }, - { "TimeZoneDatabase", TimeZoneDatabase::Id }, - { "NtpServerPort", NtpServerPort::Id }, - { "GeneratedCommandList", GeneratedCommandList::Id }, - { "AcceptedCommandList", AcceptedCommandList::Id }, - { "AttributeList", AttributeList::Id }, - { "FeatureMap", FeatureMap::Id }, - { "ClusterRevision", ClusterRevision::Id } - }; - } // namespace Attributes - } // namespace TimeSynchronization - namespace BridgedDeviceBasic { - namespace Attributes { - static const std::unordered_map matter_attribute_id_cluster_map { - { "VendorName", VendorName::Id }, - { "VendorID", VendorID::Id }, - { "ProductName", ProductName::Id }, - { "NodeLabel", NodeLabel::Id }, - { "HardwareVersion", HardwareVersion::Id }, - { "HardwareVersionString", HardwareVersionString::Id }, - { "SoftwareVersion", SoftwareVersion::Id }, - { "SoftwareVersionString", SoftwareVersionString::Id }, - { "ManufacturingDate", ManufacturingDate::Id }, - { "PartNumber", PartNumber::Id }, - { "ProductURL", ProductURL::Id }, - { "ProductLabel", ProductLabel::Id }, - { "SerialNumber", SerialNumber::Id }, - { "Reachable", Reachable::Id }, - { "UniqueID", UniqueID::Id }, - { "GeneratedCommandList", GeneratedCommandList::Id }, - { "AcceptedCommandList", AcceptedCommandList::Id }, - { "AttributeList", AttributeList::Id }, - { "FeatureMap", FeatureMap::Id }, - { "ClusterRevision", ClusterRevision::Id } - }; - } // namespace Attributes - } // namespace BridgedDeviceBasic - namespace Switch { - namespace Attributes { - static const std::unordered_map matter_attribute_id_cluster_map { - { "NumberOfPositions", NumberOfPositions::Id }, - { "CurrentPosition", CurrentPosition::Id }, - { "MultiPressMax", MultiPressMax::Id }, - { "GeneratedCommandList", GeneratedCommandList::Id }, - { "AcceptedCommandList", AcceptedCommandList::Id }, - { "AttributeList", AttributeList::Id }, - { "FeatureMap", FeatureMap::Id }, - { "ClusterRevision", ClusterRevision::Id } - }; - } // namespace Attributes - } // namespace Switch - namespace AdministratorCommissioning { - namespace Attributes { - static const std::unordered_map matter_attribute_id_cluster_map { - { "WindowStatus", WindowStatus::Id }, - { "AdminFabricIndex", AdminFabricIndex::Id }, - { "AdminVendorId", AdminVendorId::Id }, - { "GeneratedCommandList", GeneratedCommandList::Id }, - { "AcceptedCommandList", AcceptedCommandList::Id }, - { "AttributeList", AttributeList::Id }, - { "FeatureMap", FeatureMap::Id }, - { "ClusterRevision", ClusterRevision::Id } - }; - } // namespace Attributes - } // namespace AdministratorCommissioning - namespace OperationalCredentials { - namespace Attributes { - static const std::unordered_map matter_attribute_id_cluster_map { - { "NOCs", NOCs::Id }, - { "Fabrics", Fabrics::Id }, - { "SupportedFabrics", SupportedFabrics::Id }, - { "CommissionedFabrics", CommissionedFabrics::Id }, - { "TrustedRootCertificates", TrustedRootCertificates::Id }, - { "CurrentFabricIndex", CurrentFabricIndex::Id }, - { "GeneratedCommandList", GeneratedCommandList::Id }, - { "AcceptedCommandList", AcceptedCommandList::Id }, - { "AttributeList", AttributeList::Id }, - { "FeatureMap", FeatureMap::Id }, - { "ClusterRevision", ClusterRevision::Id } - }; - } // namespace Attributes - } // namespace OperationalCredentials - namespace GroupKeyManagement { - namespace Attributes { - static const std::unordered_map matter_attribute_id_cluster_map { - { "GroupKeyMap", GroupKeyMap::Id }, - { "GroupTable", GroupTable::Id }, - { "MaxGroupsPerFabric", MaxGroupsPerFabric::Id }, - { "MaxGroupKeysPerFabric", MaxGroupKeysPerFabric::Id }, - { "GeneratedCommandList", GeneratedCommandList::Id }, - { "AcceptedCommandList", AcceptedCommandList::Id }, - { "AttributeList", AttributeList::Id }, - { "FeatureMap", FeatureMap::Id }, - { "ClusterRevision", ClusterRevision::Id } - }; - } // namespace Attributes - } // namespace GroupKeyManagement - namespace FixedLabel { - namespace Attributes { - static const std::unordered_map matter_attribute_id_cluster_map { - { "LabelList", LabelList::Id }, - { "GeneratedCommandList", GeneratedCommandList::Id }, - { "AcceptedCommandList", AcceptedCommandList::Id }, - { "AttributeList", AttributeList::Id }, - { "FeatureMap", FeatureMap::Id }, - { "ClusterRevision", ClusterRevision::Id } - }; - } // namespace Attributes - } // namespace FixedLabel - namespace UserLabel { - namespace Attributes { - static const std::unordered_map matter_attribute_id_cluster_map { - { "LabelList", LabelList::Id }, - { "GeneratedCommandList", GeneratedCommandList::Id }, - { "AcceptedCommandList", AcceptedCommandList::Id }, - { "AttributeList", AttributeList::Id }, - { "FeatureMap", FeatureMap::Id }, - { "ClusterRevision", ClusterRevision::Id } - }; - } // namespace Attributes - } // namespace UserLabel - namespace ProxyConfiguration { - namespace Attributes { - static const std::unordered_map matter_attribute_id_cluster_map { - { "GeneratedCommandList", GeneratedCommandList::Id }, - { "AcceptedCommandList", AcceptedCommandList::Id }, - { "AttributeList", AttributeList::Id }, - { "FeatureMap", FeatureMap::Id }, - { "ClusterRevision", ClusterRevision::Id } - }; - } // namespace Attributes - } // namespace ProxyConfiguration - namespace ProxyDiscovery { - namespace Attributes { - static const std::unordered_map matter_attribute_id_cluster_map { - { "GeneratedCommandList", GeneratedCommandList::Id }, - { "AcceptedCommandList", AcceptedCommandList::Id }, - { "AttributeList", AttributeList::Id }, - { "FeatureMap", FeatureMap::Id }, - { "ClusterRevision", ClusterRevision::Id } - }; - } // namespace Attributes - } // namespace ProxyDiscovery - namespace ProxyValid { - namespace Attributes { - static const std::unordered_map matter_attribute_id_cluster_map { - { "GeneratedCommandList", GeneratedCommandList::Id }, - { "AcceptedCommandList", AcceptedCommandList::Id }, - { "AttributeList", AttributeList::Id }, - { "FeatureMap", FeatureMap::Id }, - { "ClusterRevision", ClusterRevision::Id } - }; - } // namespace Attributes - } // namespace ProxyValid - namespace BooleanState { - namespace Attributes { - static const std::unordered_map matter_attribute_id_cluster_map { - { "StateValue", StateValue::Id }, - { "GeneratedCommandList", GeneratedCommandList::Id }, - { "AcceptedCommandList", AcceptedCommandList::Id }, - { "AttributeList", AttributeList::Id }, - { "FeatureMap", FeatureMap::Id }, - { "ClusterRevision", ClusterRevision::Id } - }; - } // namespace Attributes - } // namespace BooleanState - namespace ModeSelect { - namespace Attributes { - static const std::unordered_map matter_attribute_id_cluster_map { - { "Description", Description::Id }, - { "StandardNamespace", StandardNamespace::Id }, - { "SupportedModes", SupportedModes::Id }, - { "CurrentMode", CurrentMode::Id }, - { "StartUpMode", StartUpMode::Id }, - { "OnMode", OnMode::Id }, - { "GeneratedCommandList", GeneratedCommandList::Id }, - { "AcceptedCommandList", AcceptedCommandList::Id }, - { "AttributeList", AttributeList::Id }, - { "FeatureMap", FeatureMap::Id }, - { "ClusterRevision", ClusterRevision::Id } - }; - } // namespace Attributes - } // namespace ModeSelect - namespace DoorLock { - namespace Attributes { - static const std::unordered_map matter_attribute_id_cluster_map { - { "LockState", LockState::Id }, - { "LockType", LockType::Id }, - { "ActuatorEnabled", ActuatorEnabled::Id }, - { "DoorState", DoorState::Id }, - { "DoorOpenEvents", DoorOpenEvents::Id }, - { "DoorClosedEvents", DoorClosedEvents::Id }, - { "OpenPeriod", OpenPeriod::Id }, - { "NumberOfTotalUsersSupported", NumberOfTotalUsersSupported::Id }, - { "NumberOfPINUsersSupported", NumberOfPINUsersSupported::Id }, - { "NumberOfRFIDUsersSupported", NumberOfRFIDUsersSupported::Id }, - { "NumberOfWeekDaySchedulesSupportedPerUser", NumberOfWeekDaySchedulesSupportedPerUser::Id }, - { "NumberOfYearDaySchedulesSupportedPerUser", NumberOfYearDaySchedulesSupportedPerUser::Id }, - { "NumberOfHolidaySchedulesSupported", NumberOfHolidaySchedulesSupported::Id }, - { "MaxPINCodeLength", MaxPINCodeLength::Id }, - { "MinPINCodeLength", MinPINCodeLength::Id }, - { "MaxRFIDCodeLength", MaxRFIDCodeLength::Id }, - { "MinRFIDCodeLength", MinRFIDCodeLength::Id }, - { "CredentialRulesSupport", CredentialRulesSupport::Id }, - { "NumberOfCredentialsSupportedPerUser", NumberOfCredentialsSupportedPerUser::Id }, - { "Language", Language::Id }, - { "LEDSettings", LEDSettings::Id }, - { "AutoRelockTime", AutoRelockTime::Id }, - { "SoundVolume", SoundVolume::Id }, - { "OperatingMode", OperatingMode::Id }, - { "SupportedOperatingModes", SupportedOperatingModes::Id }, - { "DefaultConfigurationRegister", DefaultConfigurationRegister::Id }, - { "EnableLocalProgramming", EnableLocalProgramming::Id }, - { "EnableOneTouchLocking", EnableOneTouchLocking::Id }, - { "EnableInsideStatusLED", EnableInsideStatusLED::Id }, - { "EnablePrivacyModeButton", EnablePrivacyModeButton::Id }, - { "LocalProgrammingFeatures", LocalProgrammingFeatures::Id }, - { "WrongCodeEntryLimit", WrongCodeEntryLimit::Id }, - { "UserCodeTemporaryDisableTime", UserCodeTemporaryDisableTime::Id }, - { "SendPINOverTheAir", SendPINOverTheAir::Id }, - { "RequirePINforRemoteOperation", RequirePINforRemoteOperation::Id }, - { "ExpiringUserTimeout", ExpiringUserTimeout::Id }, - { "GeneratedCommandList", GeneratedCommandList::Id }, - { "AcceptedCommandList", AcceptedCommandList::Id }, - { "AttributeList", AttributeList::Id }, - { "FeatureMap", FeatureMap::Id }, - { "ClusterRevision", ClusterRevision::Id } - }; - } // namespace Attributes - } // namespace DoorLock - namespace WindowCovering { - namespace Attributes { - static const std::unordered_map matter_attribute_id_cluster_map { - { "Type", Type::Id }, - { "PhysicalClosedLimitLift", PhysicalClosedLimitLift::Id }, - { "PhysicalClosedLimitTilt", PhysicalClosedLimitTilt::Id }, - { "CurrentPositionLift", CurrentPositionLift::Id }, - { "CurrentPositionTilt", CurrentPositionTilt::Id }, - { "NumberOfActuationsLift", NumberOfActuationsLift::Id }, - { "NumberOfActuationsTilt", NumberOfActuationsTilt::Id }, - { "ConfigStatus", ConfigStatus::Id }, - { "CurrentPositionLiftPercentage", CurrentPositionLiftPercentage::Id }, - { "CurrentPositionTiltPercentage", CurrentPositionTiltPercentage::Id }, - { "OperationalStatus", OperationalStatus::Id }, - { "TargetPositionLiftPercent100ths", TargetPositionLiftPercent100ths::Id }, - { "TargetPositionTiltPercent100ths", TargetPositionTiltPercent100ths::Id }, - { "EndProductType", EndProductType::Id }, - { "CurrentPositionLiftPercent100ths", CurrentPositionLiftPercent100ths::Id }, - { "CurrentPositionTiltPercent100ths", CurrentPositionTiltPercent100ths::Id }, - { "InstalledOpenLimitLift", InstalledOpenLimitLift::Id }, - { "InstalledClosedLimitLift", InstalledClosedLimitLift::Id }, - { "InstalledOpenLimitTilt", InstalledOpenLimitTilt::Id }, - { "InstalledClosedLimitTilt", InstalledClosedLimitTilt::Id }, - { "Mode", Mode::Id }, - { "SafetyStatus", SafetyStatus::Id }, - { "GeneratedCommandList", GeneratedCommandList::Id }, - { "AcceptedCommandList", AcceptedCommandList::Id }, - { "AttributeList", AttributeList::Id }, - { "FeatureMap", FeatureMap::Id }, - { "ClusterRevision", ClusterRevision::Id } - }; - } // namespace Attributes - } // namespace WindowCovering - namespace BarrierControl { - namespace Attributes { - static const std::unordered_map matter_attribute_id_cluster_map { - { "BarrierMovingState", BarrierMovingState::Id }, - { "BarrierSafetyStatus", BarrierSafetyStatus::Id }, - { "BarrierCapabilities", BarrierCapabilities::Id }, - { "BarrierOpenEvents", BarrierOpenEvents::Id }, - { "BarrierCloseEvents", BarrierCloseEvents::Id }, - { "BarrierCommandOpenEvents", BarrierCommandOpenEvents::Id }, - { "BarrierCommandCloseEvents", BarrierCommandCloseEvents::Id }, - { "BarrierOpenPeriod", BarrierOpenPeriod::Id }, - { "BarrierClosePeriod", BarrierClosePeriod::Id }, - { "BarrierPosition", BarrierPosition::Id }, - { "GeneratedCommandList", GeneratedCommandList::Id }, - { "AcceptedCommandList", AcceptedCommandList::Id }, - { "AttributeList", AttributeList::Id }, - { "FeatureMap", FeatureMap::Id }, - { "ClusterRevision", ClusterRevision::Id } - }; - } // namespace Attributes - } // namespace BarrierControl - namespace PumpConfigurationAndControl { - namespace Attributes { - static const std::unordered_map matter_attribute_id_cluster_map { - { "MaxPressure", MaxPressure::Id }, - { "MaxSpeed", MaxSpeed::Id }, - { "MaxFlow", MaxFlow::Id }, - { "MinConstPressure", MinConstPressure::Id }, - { "MaxConstPressure", MaxConstPressure::Id }, - { "MinCompPressure", MinCompPressure::Id }, - { "MaxCompPressure", MaxCompPressure::Id }, - { "MinConstSpeed", MinConstSpeed::Id }, - { "MaxConstSpeed", MaxConstSpeed::Id }, - { "MinConstFlow", MinConstFlow::Id }, - { "MaxConstFlow", MaxConstFlow::Id }, - { "MinConstTemp", MinConstTemp::Id }, - { "MaxConstTemp", MaxConstTemp::Id }, - { "PumpStatus", PumpStatus::Id }, - { "EffectiveOperationMode", EffectiveOperationMode::Id }, - { "EffectiveControlMode", EffectiveControlMode::Id }, - { "Capacity", Capacity::Id }, - { "Speed", Speed::Id }, - { "LifetimeRunningHours", LifetimeRunningHours::Id }, - { "Power", Power::Id }, - { "LifetimeEnergyConsumed", LifetimeEnergyConsumed::Id }, - { "OperationMode", OperationMode::Id }, - { "ControlMode", ControlMode::Id }, - { "GeneratedCommandList", GeneratedCommandList::Id }, - { "AcceptedCommandList", AcceptedCommandList::Id }, - { "AttributeList", AttributeList::Id }, - { "FeatureMap", FeatureMap::Id }, - { "ClusterRevision", ClusterRevision::Id } - }; - } // namespace Attributes - } // namespace PumpConfigurationAndControl - namespace Thermostat { - namespace Attributes { - static const std::unordered_map matter_attribute_id_cluster_map { - { "LocalTemperature", LocalTemperature::Id }, - { "OutdoorTemperature", OutdoorTemperature::Id }, - { "Occupancy", Occupancy::Id }, - { "AbsMinHeatSetpointLimit", AbsMinHeatSetpointLimit::Id }, - { "AbsMaxHeatSetpointLimit", AbsMaxHeatSetpointLimit::Id }, - { "AbsMinCoolSetpointLimit", AbsMinCoolSetpointLimit::Id }, - { "AbsMaxCoolSetpointLimit", AbsMaxCoolSetpointLimit::Id }, - { "PICoolingDemand", PICoolingDemand::Id }, - { "PIHeatingDemand", PIHeatingDemand::Id }, - { "HVACSystemTypeConfiguration", HVACSystemTypeConfiguration::Id }, - { "LocalTemperatureCalibration", LocalTemperatureCalibration::Id }, - { "OccupiedCoolingSetpoint", OccupiedCoolingSetpoint::Id }, - { "OccupiedHeatingSetpoint", OccupiedHeatingSetpoint::Id }, - { "UnoccupiedCoolingSetpoint", UnoccupiedCoolingSetpoint::Id }, - { "UnoccupiedHeatingSetpoint", UnoccupiedHeatingSetpoint::Id }, - { "MinHeatSetpointLimit", MinHeatSetpointLimit::Id }, - { "MaxHeatSetpointLimit", MaxHeatSetpointLimit::Id }, - { "MinCoolSetpointLimit", MinCoolSetpointLimit::Id }, - { "MaxCoolSetpointLimit", MaxCoolSetpointLimit::Id }, - { "MinSetpointDeadBand", MinSetpointDeadBand::Id }, - { "RemoteSensing", RemoteSensing::Id }, - { "ControlSequenceOfOperation", ControlSequenceOfOperation::Id }, - { "SystemMode", SystemMode::Id }, - { "ThermostatRunningMode", ThermostatRunningMode::Id }, - { "StartOfWeek", StartOfWeek::Id }, - { "NumberOfWeeklyTransitions", NumberOfWeeklyTransitions::Id }, - { "NumberOfDailyTransitions", NumberOfDailyTransitions::Id }, - { "TemperatureSetpointHold", TemperatureSetpointHold::Id }, - { "TemperatureSetpointHoldDuration", TemperatureSetpointHoldDuration::Id }, - { "ThermostatProgrammingOperationMode", ThermostatProgrammingOperationMode::Id }, - { "ThermostatRunningState", ThermostatRunningState::Id }, - { "SetpointChangeSource", SetpointChangeSource::Id }, - { "SetpointChangeAmount", SetpointChangeAmount::Id }, - { "SetpointChangeSourceTimestamp", SetpointChangeSourceTimestamp::Id }, - { "OccupiedSetback", OccupiedSetback::Id }, - { "OccupiedSetbackMin", OccupiedSetbackMin::Id }, - { "OccupiedSetbackMax", OccupiedSetbackMax::Id }, - { "UnoccupiedSetback", UnoccupiedSetback::Id }, - { "UnoccupiedSetbackMin", UnoccupiedSetbackMin::Id }, - { "UnoccupiedSetbackMax", UnoccupiedSetbackMax::Id }, - { "EmergencyHeatDelta", EmergencyHeatDelta::Id }, - { "ACType", ACType::Id }, - { "ACCapacity", ACCapacity::Id }, - { "ACRefrigerantType", ACRefrigerantType::Id }, - { "ACCompressorType", ACCompressorType::Id }, - { "ACErrorCode", ACErrorCode::Id }, - { "ACLouverPosition", ACLouverPosition::Id }, - { "ACCoilTemperature", ACCoilTemperature::Id }, - { "ACCapacityformat", ACCapacityformat::Id }, - { "GeneratedCommandList", GeneratedCommandList::Id }, - { "AcceptedCommandList", AcceptedCommandList::Id }, - { "AttributeList", AttributeList::Id }, - { "FeatureMap", FeatureMap::Id }, - { "ClusterRevision", ClusterRevision::Id } - }; - } // namespace Attributes - } // namespace Thermostat - namespace FanControl { - namespace Attributes { - static const std::unordered_map matter_attribute_id_cluster_map { - { "FanMode", FanMode::Id }, - { "FanModeSequence", FanModeSequence::Id }, - { "PercentSetting", PercentSetting::Id }, - { "PercentCurrent", PercentCurrent::Id }, - { "SpeedMax", SpeedMax::Id }, - { "SpeedSetting", SpeedSetting::Id }, - { "SpeedCurrent", SpeedCurrent::Id }, - { "RockSupport", RockSupport::Id }, - { "RockSetting", RockSetting::Id }, - { "WindSupport", WindSupport::Id }, - { "WindSetting", WindSetting::Id }, - { "GeneratedCommandList", GeneratedCommandList::Id }, - { "AcceptedCommandList", AcceptedCommandList::Id }, - { "AttributeList", AttributeList::Id }, - { "FeatureMap", FeatureMap::Id }, - { "ClusterRevision", ClusterRevision::Id } - }; - } // namespace Attributes - } // namespace FanControl - namespace ThermostatUserInterfaceConfiguration { - namespace Attributes { - static const std::unordered_map matter_attribute_id_cluster_map { - { "TemperatureDisplayMode", TemperatureDisplayMode::Id }, - { "KeypadLockout", KeypadLockout::Id }, - { "ScheduleProgrammingVisibility", ScheduleProgrammingVisibility::Id }, - { "GeneratedCommandList", GeneratedCommandList::Id }, - { "AcceptedCommandList", AcceptedCommandList::Id }, - { "AttributeList", AttributeList::Id }, - { "FeatureMap", FeatureMap::Id }, - { "ClusterRevision", ClusterRevision::Id } - }; - } // namespace Attributes - } // namespace ThermostatUserInterfaceConfiguration - namespace ColorControl { - namespace Attributes { - static const std::unordered_map matter_attribute_id_cluster_map { - { "CurrentHue", CurrentHue::Id }, - { "CurrentSaturation", CurrentSaturation::Id }, - { "RemainingTime", RemainingTime::Id }, - { "CurrentX", CurrentX::Id }, - { "CurrentY", CurrentY::Id }, - { "DriftCompensation", DriftCompensation::Id }, - { "CompensationText", CompensationText::Id }, - { "ColorTemperatureMireds", ColorTemperatureMireds::Id }, - { "ColorMode", ColorMode::Id }, - { "Options", Options::Id }, - { "NumberOfPrimaries", NumberOfPrimaries::Id }, - { "Primary1X", Primary1X::Id }, - { "Primary1Y", Primary1Y::Id }, - { "Primary1Intensity", Primary1Intensity::Id }, - { "Primary2X", Primary2X::Id }, - { "Primary2Y", Primary2Y::Id }, - { "Primary2Intensity", Primary2Intensity::Id }, - { "Primary3X", Primary3X::Id }, - { "Primary3Y", Primary3Y::Id }, - { "Primary3Intensity", Primary3Intensity::Id }, - { "Primary4X", Primary4X::Id }, - { "Primary4Y", Primary4Y::Id }, - { "Primary4Intensity", Primary4Intensity::Id }, - { "Primary5X", Primary5X::Id }, - { "Primary5Y", Primary5Y::Id }, - { "Primary5Intensity", Primary5Intensity::Id }, - { "Primary6X", Primary6X::Id }, - { "Primary6Y", Primary6Y::Id }, - { "Primary6Intensity", Primary6Intensity::Id }, - { "WhitePointX", WhitePointX::Id }, - { "WhitePointY", WhitePointY::Id }, - { "ColorPointRX", ColorPointRX::Id }, - { "ColorPointRY", ColorPointRY::Id }, - { "ColorPointRIntensity", ColorPointRIntensity::Id }, - { "ColorPointGX", ColorPointGX::Id }, - { "ColorPointGY", ColorPointGY::Id }, - { "ColorPointGIntensity", ColorPointGIntensity::Id }, - { "ColorPointBX", ColorPointBX::Id }, - { "ColorPointBY", ColorPointBY::Id }, - { "ColorPointBIntensity", ColorPointBIntensity::Id }, - { "EnhancedCurrentHue", EnhancedCurrentHue::Id }, - { "EnhancedColorMode", EnhancedColorMode::Id }, - { "ColorLoopActive", ColorLoopActive::Id }, - { "ColorLoopDirection", ColorLoopDirection::Id }, - { "ColorLoopTime", ColorLoopTime::Id }, - { "ColorLoopStartEnhancedHue", ColorLoopStartEnhancedHue::Id }, - { "ColorLoopStoredEnhancedHue", ColorLoopStoredEnhancedHue::Id }, - { "ColorCapabilities", ColorCapabilities::Id }, - { "ColorTempPhysicalMinMireds", ColorTempPhysicalMinMireds::Id }, - { "ColorTempPhysicalMaxMireds", ColorTempPhysicalMaxMireds::Id }, - { "CoupleColorTempToLevelMinMireds", CoupleColorTempToLevelMinMireds::Id }, - { "StartUpColorTemperatureMireds", StartUpColorTemperatureMireds::Id }, - { "GeneratedCommandList", GeneratedCommandList::Id }, - { "AcceptedCommandList", AcceptedCommandList::Id }, - { "AttributeList", AttributeList::Id }, - { "FeatureMap", FeatureMap::Id }, - { "ClusterRevision", ClusterRevision::Id } - }; - } // namespace Attributes - } // namespace ColorControl - namespace BallastConfiguration { - namespace Attributes { - static const std::unordered_map matter_attribute_id_cluster_map { - { "PhysicalMinLevel", PhysicalMinLevel::Id }, - { "PhysicalMaxLevel", PhysicalMaxLevel::Id }, - { "BallastStatus", BallastStatus::Id }, - { "MinLevel", MinLevel::Id }, - { "MaxLevel", MaxLevel::Id }, - { "IntrinsicBalanceFactor", IntrinsicBalanceFactor::Id }, - { "BallastFactorAdjustment", BallastFactorAdjustment::Id }, - { "LampQuantity", LampQuantity::Id }, - { "LampType", LampType::Id }, - { "LampManufacturer", LampManufacturer::Id }, - { "LampRatedHours", LampRatedHours::Id }, - { "LampBurnHours", LampBurnHours::Id }, - { "LampAlarmMode", LampAlarmMode::Id }, - { "LampBurnHoursTripPoint", LampBurnHoursTripPoint::Id }, - { "GeneratedCommandList", GeneratedCommandList::Id }, - { "AcceptedCommandList", AcceptedCommandList::Id }, - { "AttributeList", AttributeList::Id }, - { "FeatureMap", FeatureMap::Id }, - { "ClusterRevision", ClusterRevision::Id } - }; - } // namespace Attributes - } // namespace BallastConfiguration - namespace IlluminanceMeasurement { - namespace Attributes { - static const std::unordered_map matter_attribute_id_cluster_map { - { "MeasuredValue", MeasuredValue::Id }, - { "MinMeasuredValue", MinMeasuredValue::Id }, - { "MaxMeasuredValue", MaxMeasuredValue::Id }, - { "Tolerance", Tolerance::Id }, - { "LightSensorType", LightSensorType::Id }, - { "GeneratedCommandList", GeneratedCommandList::Id }, - { "AcceptedCommandList", AcceptedCommandList::Id }, - { "AttributeList", AttributeList::Id }, - { "FeatureMap", FeatureMap::Id }, - { "ClusterRevision", ClusterRevision::Id } - }; - } // namespace Attributes - } // namespace IlluminanceMeasurement - namespace TemperatureMeasurement { - namespace Attributes { - static const std::unordered_map matter_attribute_id_cluster_map { - { "MeasuredValue", MeasuredValue::Id }, - { "MinMeasuredValue", MinMeasuredValue::Id }, - { "MaxMeasuredValue", MaxMeasuredValue::Id }, - { "Tolerance", Tolerance::Id }, - { "GeneratedCommandList", GeneratedCommandList::Id }, - { "AcceptedCommandList", AcceptedCommandList::Id }, - { "AttributeList", AttributeList::Id }, - { "FeatureMap", FeatureMap::Id }, - { "ClusterRevision", ClusterRevision::Id } - }; - } // namespace Attributes - } // namespace TemperatureMeasurement - namespace PressureMeasurement { - namespace Attributes { - static const std::unordered_map matter_attribute_id_cluster_map { - { "MeasuredValue", MeasuredValue::Id }, - { "MinMeasuredValue", MinMeasuredValue::Id }, - { "MaxMeasuredValue", MaxMeasuredValue::Id }, - { "Tolerance", Tolerance::Id }, - { "ScaledValue", ScaledValue::Id }, - { "MinScaledValue", MinScaledValue::Id }, - { "MaxScaledValue", MaxScaledValue::Id }, - { "ScaledTolerance", ScaledTolerance::Id }, - { "Scale", Scale::Id }, - { "GeneratedCommandList", GeneratedCommandList::Id }, - { "AcceptedCommandList", AcceptedCommandList::Id }, - { "AttributeList", AttributeList::Id }, - { "FeatureMap", FeatureMap::Id }, - { "ClusterRevision", ClusterRevision::Id } - }; - } // namespace Attributes - } // namespace PressureMeasurement - namespace FlowMeasurement { - namespace Attributes { - static const std::unordered_map matter_attribute_id_cluster_map { - { "MeasuredValue", MeasuredValue::Id }, - { "MinMeasuredValue", MinMeasuredValue::Id }, - { "MaxMeasuredValue", MaxMeasuredValue::Id }, - { "Tolerance", Tolerance::Id }, - { "GeneratedCommandList", GeneratedCommandList::Id }, - { "AcceptedCommandList", AcceptedCommandList::Id }, - { "AttributeList", AttributeList::Id }, - { "FeatureMap", FeatureMap::Id }, - { "ClusterRevision", ClusterRevision::Id } - }; - } // namespace Attributes - } // namespace FlowMeasurement - namespace RelativeHumidityMeasurement { - namespace Attributes { - static const std::unordered_map matter_attribute_id_cluster_map { - { "MeasuredValue", MeasuredValue::Id }, - { "MinMeasuredValue", MinMeasuredValue::Id }, - { "MaxMeasuredValue", MaxMeasuredValue::Id }, - { "Tolerance", Tolerance::Id }, - { "GeneratedCommandList", GeneratedCommandList::Id }, - { "AcceptedCommandList", AcceptedCommandList::Id }, - { "AttributeList", AttributeList::Id }, - { "FeatureMap", FeatureMap::Id }, - { "ClusterRevision", ClusterRevision::Id } - }; - } // namespace Attributes - } // namespace RelativeHumidityMeasurement - namespace OccupancySensing { - namespace Attributes { - static const std::unordered_map matter_attribute_id_cluster_map { - { "Occupancy", Occupancy::Id }, - { "OccupancySensorType", OccupancySensorType::Id }, - { "OccupancySensorTypeBitmap", OccupancySensorTypeBitmap::Id }, - { "PirOccupiedToUnoccupiedDelay", PirOccupiedToUnoccupiedDelay::Id }, - { "PirUnoccupiedToOccupiedDelay", PirUnoccupiedToOccupiedDelay::Id }, - { "PirUnoccupiedToOccupiedThreshold", PirUnoccupiedToOccupiedThreshold::Id }, - { "UltrasonicOccupiedToUnoccupiedDelay", UltrasonicOccupiedToUnoccupiedDelay::Id }, - { "UltrasonicUnoccupiedToOccupiedDelay", UltrasonicUnoccupiedToOccupiedDelay::Id }, - { "UltrasonicUnoccupiedToOccupiedThreshold", UltrasonicUnoccupiedToOccupiedThreshold::Id }, - { "PhysicalContactOccupiedToUnoccupiedDelay", PhysicalContactOccupiedToUnoccupiedDelay::Id }, - { "PhysicalContactUnoccupiedToOccupiedDelay", PhysicalContactUnoccupiedToOccupiedDelay::Id }, - { "PhysicalContactUnoccupiedToOccupiedThreshold", PhysicalContactUnoccupiedToOccupiedThreshold::Id }, - { "GeneratedCommandList", GeneratedCommandList::Id }, - { "AcceptedCommandList", AcceptedCommandList::Id }, - { "AttributeList", AttributeList::Id }, - { "FeatureMap", FeatureMap::Id }, - { "ClusterRevision", ClusterRevision::Id } - }; - } // namespace Attributes - } // namespace OccupancySensing - namespace WakeOnLan { - namespace Attributes { - static const std::unordered_map matter_attribute_id_cluster_map { - { "MACAddress", MACAddress::Id }, - { "GeneratedCommandList", GeneratedCommandList::Id }, - { "AcceptedCommandList", AcceptedCommandList::Id }, - { "AttributeList", AttributeList::Id }, - { "FeatureMap", FeatureMap::Id }, - { "ClusterRevision", ClusterRevision::Id } - }; - } // namespace Attributes - } // namespace WakeOnLan - namespace Channel { - namespace Attributes { - static const std::unordered_map matter_attribute_id_cluster_map { - { "ChannelList", ChannelList::Id }, - { "Lineup", Lineup::Id }, - { "CurrentChannel", CurrentChannel::Id }, - { "GeneratedCommandList", GeneratedCommandList::Id }, - { "AcceptedCommandList", AcceptedCommandList::Id }, - { "AttributeList", AttributeList::Id }, - { "FeatureMap", FeatureMap::Id }, - { "ClusterRevision", ClusterRevision::Id } - }; - } // namespace Attributes - } // namespace Channel - namespace TargetNavigator { - namespace Attributes { - static const std::unordered_map matter_attribute_id_cluster_map { - { "TargetList", TargetList::Id }, - { "CurrentTarget", CurrentTarget::Id }, - { "GeneratedCommandList", GeneratedCommandList::Id }, - { "AcceptedCommandList", AcceptedCommandList::Id }, - { "AttributeList", AttributeList::Id }, - { "FeatureMap", FeatureMap::Id }, - { "ClusterRevision", ClusterRevision::Id } - }; - } // namespace Attributes - } // namespace TargetNavigator - namespace MediaPlayback { - namespace Attributes { - static const std::unordered_map matter_attribute_id_cluster_map { - { "CurrentState", CurrentState::Id }, - { "StartTime", StartTime::Id }, - { "Duration", Duration::Id }, - { "SampledPosition", SampledPosition::Id }, - { "PlaybackSpeed", PlaybackSpeed::Id }, - { "SeekRangeEnd", SeekRangeEnd::Id }, - { "SeekRangeStart", SeekRangeStart::Id }, - { "GeneratedCommandList", GeneratedCommandList::Id }, - { "AcceptedCommandList", AcceptedCommandList::Id }, - { "AttributeList", AttributeList::Id }, - { "FeatureMap", FeatureMap::Id }, - { "ClusterRevision", ClusterRevision::Id } - }; - } // namespace Attributes - } // namespace MediaPlayback - namespace MediaInput { - namespace Attributes { - static const std::unordered_map matter_attribute_id_cluster_map { - { "InputList", InputList::Id }, - { "CurrentInput", CurrentInput::Id }, - { "GeneratedCommandList", GeneratedCommandList::Id }, - { "AcceptedCommandList", AcceptedCommandList::Id }, - { "AttributeList", AttributeList::Id }, - { "FeatureMap", FeatureMap::Id }, - { "ClusterRevision", ClusterRevision::Id } - }; - } // namespace Attributes - } // namespace MediaInput - namespace LowPower { - namespace Attributes { - static const std::unordered_map matter_attribute_id_cluster_map { - { "GeneratedCommandList", GeneratedCommandList::Id }, - { "AcceptedCommandList", AcceptedCommandList::Id }, - { "AttributeList", AttributeList::Id }, - { "FeatureMap", FeatureMap::Id }, - { "ClusterRevision", ClusterRevision::Id } - }; - } // namespace Attributes - } // namespace LowPower - namespace KeypadInput { - namespace Attributes { - static const std::unordered_map matter_attribute_id_cluster_map { - { "GeneratedCommandList", GeneratedCommandList::Id }, - { "AcceptedCommandList", AcceptedCommandList::Id }, - { "AttributeList", AttributeList::Id }, - { "FeatureMap", FeatureMap::Id }, - { "ClusterRevision", ClusterRevision::Id } - }; - } // namespace Attributes - } // namespace KeypadInput - namespace ContentLauncher { - namespace Attributes { - static const std::unordered_map matter_attribute_id_cluster_map { - { "AcceptHeader", AcceptHeader::Id }, - { "SupportedStreamingProtocols", SupportedStreamingProtocols::Id }, - { "GeneratedCommandList", GeneratedCommandList::Id }, - { "AcceptedCommandList", AcceptedCommandList::Id }, - { "AttributeList", AttributeList::Id }, - { "FeatureMap", FeatureMap::Id }, - { "ClusterRevision", ClusterRevision::Id } - }; - } // namespace Attributes - } // namespace ContentLauncher - namespace AudioOutput { - namespace Attributes { - static const std::unordered_map matter_attribute_id_cluster_map { - { "OutputList", OutputList::Id }, - { "CurrentOutput", CurrentOutput::Id }, - { "GeneratedCommandList", GeneratedCommandList::Id }, - { "AcceptedCommandList", AcceptedCommandList::Id }, - { "AttributeList", AttributeList::Id }, - { "FeatureMap", FeatureMap::Id }, - { "ClusterRevision", ClusterRevision::Id } - }; - } // namespace Attributes - } // namespace AudioOutput - namespace ApplicationLauncher { - namespace Attributes { - static const std::unordered_map matter_attribute_id_cluster_map { - { "CatalogList", CatalogList::Id }, - { "CurrentApp", CurrentApp::Id }, - { "GeneratedCommandList", GeneratedCommandList::Id }, - { "AcceptedCommandList", AcceptedCommandList::Id }, - { "AttributeList", AttributeList::Id }, - { "FeatureMap", FeatureMap::Id }, - { "ClusterRevision", ClusterRevision::Id } - }; - } // namespace Attributes - } // namespace ApplicationLauncher - namespace ApplicationBasic { - namespace Attributes { - static const std::unordered_map matter_attribute_id_cluster_map { - { "VendorName", VendorName::Id }, - { "VendorID", VendorID::Id }, - { "ApplicationName", ApplicationName::Id }, - { "ProductID", ProductID::Id }, - { "Application", Application::Id }, - { "Status", Status::Id }, - { "ApplicationVersion", ApplicationVersion::Id }, - { "AllowedVendorList", AllowedVendorList::Id }, - { "GeneratedCommandList", GeneratedCommandList::Id }, - { "AcceptedCommandList", AcceptedCommandList::Id }, - { "AttributeList", AttributeList::Id }, - { "FeatureMap", FeatureMap::Id }, - { "ClusterRevision", ClusterRevision::Id } - }; - } // namespace Attributes - } // namespace ApplicationBasic - namespace AccountLogin { - namespace Attributes { - static const std::unordered_map matter_attribute_id_cluster_map { - { "GeneratedCommandList", GeneratedCommandList::Id }, - { "AcceptedCommandList", AcceptedCommandList::Id }, - { "AttributeList", AttributeList::Id }, - { "FeatureMap", FeatureMap::Id }, - { "ClusterRevision", ClusterRevision::Id } - }; - } // namespace Attributes - } // namespace AccountLogin - namespace ElectricalMeasurement { - namespace Attributes { - static const std::unordered_map matter_attribute_id_cluster_map { - { "MeasurementType", MeasurementType::Id }, - { "DcVoltage", DcVoltage::Id }, - { "DcVoltageMin", DcVoltageMin::Id }, - { "DcVoltageMax", DcVoltageMax::Id }, - { "DcCurrent", DcCurrent::Id }, - { "DcCurrentMin", DcCurrentMin::Id }, - { "DcCurrentMax", DcCurrentMax::Id }, - { "DcPower", DcPower::Id }, - { "DcPowerMin", DcPowerMin::Id }, - { "DcPowerMax", DcPowerMax::Id }, - { "DcVoltageMultiplier", DcVoltageMultiplier::Id }, - { "DcVoltageDivisor", DcVoltageDivisor::Id }, - { "DcCurrentMultiplier", DcCurrentMultiplier::Id }, - { "DcCurrentDivisor", DcCurrentDivisor::Id }, - { "DcPowerMultiplier", DcPowerMultiplier::Id }, - { "DcPowerDivisor", DcPowerDivisor::Id }, - { "AcFrequency", AcFrequency::Id }, - { "AcFrequencyMin", AcFrequencyMin::Id }, - { "AcFrequencyMax", AcFrequencyMax::Id }, - { "NeutralCurrent", NeutralCurrent::Id }, - { "TotalActivePower", TotalActivePower::Id }, - { "TotalReactivePower", TotalReactivePower::Id }, - { "TotalApparentPower", TotalApparentPower::Id }, - { "Measured1stHarmonicCurrent", Measured1stHarmonicCurrent::Id }, - { "Measured3rdHarmonicCurrent", Measured3rdHarmonicCurrent::Id }, - { "Measured5thHarmonicCurrent", Measured5thHarmonicCurrent::Id }, - { "Measured7thHarmonicCurrent", Measured7thHarmonicCurrent::Id }, - { "Measured9thHarmonicCurrent", Measured9thHarmonicCurrent::Id }, - { "Measured11thHarmonicCurrent", Measured11thHarmonicCurrent::Id }, - { "MeasuredPhase1stHarmonicCurrent", MeasuredPhase1stHarmonicCurrent::Id }, - { "MeasuredPhase3rdHarmonicCurrent", MeasuredPhase3rdHarmonicCurrent::Id }, - { "MeasuredPhase5thHarmonicCurrent", MeasuredPhase5thHarmonicCurrent::Id }, - { "MeasuredPhase7thHarmonicCurrent", MeasuredPhase7thHarmonicCurrent::Id }, - { "MeasuredPhase9thHarmonicCurrent", MeasuredPhase9thHarmonicCurrent::Id }, - { "MeasuredPhase11thHarmonicCurrent", MeasuredPhase11thHarmonicCurrent::Id }, - { "AcFrequencyMultiplier", AcFrequencyMultiplier::Id }, - { "AcFrequencyDivisor", AcFrequencyDivisor::Id }, - { "PowerMultiplier", PowerMultiplier::Id }, - { "PowerDivisor", PowerDivisor::Id }, - { "HarmonicCurrentMultiplier", HarmonicCurrentMultiplier::Id }, - { "PhaseHarmonicCurrentMultiplier", PhaseHarmonicCurrentMultiplier::Id }, - { "InstantaneousVoltage", InstantaneousVoltage::Id }, - { "InstantaneousLineCurrent", InstantaneousLineCurrent::Id }, - { "InstantaneousActiveCurrent", InstantaneousActiveCurrent::Id }, - { "InstantaneousReactiveCurrent", InstantaneousReactiveCurrent::Id }, - { "InstantaneousPower", InstantaneousPower::Id }, - { "RmsVoltage", RmsVoltage::Id }, - { "RmsVoltageMin", RmsVoltageMin::Id }, - { "RmsVoltageMax", RmsVoltageMax::Id }, - { "RmsCurrent", RmsCurrent::Id }, - { "RmsCurrentMin", RmsCurrentMin::Id }, - { "RmsCurrentMax", RmsCurrentMax::Id }, - { "ActivePower", ActivePower::Id }, - { "ActivePowerMin", ActivePowerMin::Id }, - { "ActivePowerMax", ActivePowerMax::Id }, - { "ReactivePower", ReactivePower::Id }, - { "ApparentPower", ApparentPower::Id }, - { "PowerFactor", PowerFactor::Id }, - { "AverageRmsVoltageMeasurementPeriod", AverageRmsVoltageMeasurementPeriod::Id }, - { "AverageRmsUnderVoltageCounter", AverageRmsUnderVoltageCounter::Id }, - { "RmsExtremeOverVoltagePeriod", RmsExtremeOverVoltagePeriod::Id }, - { "RmsExtremeUnderVoltagePeriod", RmsExtremeUnderVoltagePeriod::Id }, - { "RmsVoltageSagPeriod", RmsVoltageSagPeriod::Id }, - { "RmsVoltageSwellPeriod", RmsVoltageSwellPeriod::Id }, - { "AcVoltageMultiplier", AcVoltageMultiplier::Id }, - { "AcVoltageDivisor", AcVoltageDivisor::Id }, - { "AcCurrentMultiplier", AcCurrentMultiplier::Id }, - { "AcCurrentDivisor", AcCurrentDivisor::Id }, - { "AcPowerMultiplier", AcPowerMultiplier::Id }, - { "AcPowerDivisor", AcPowerDivisor::Id }, - { "OverloadAlarmsMask", OverloadAlarmsMask::Id }, - { "VoltageOverload", VoltageOverload::Id }, - { "CurrentOverload", CurrentOverload::Id }, - { "AcOverloadAlarmsMask", AcOverloadAlarmsMask::Id }, - { "AcVoltageOverload", AcVoltageOverload::Id }, - { "AcCurrentOverload", AcCurrentOverload::Id }, - { "AcActivePowerOverload", AcActivePowerOverload::Id }, - { "AcReactivePowerOverload", AcReactivePowerOverload::Id }, - { "AverageRmsOverVoltage", AverageRmsOverVoltage::Id }, - { "AverageRmsUnderVoltage", AverageRmsUnderVoltage::Id }, - { "RmsExtremeOverVoltage", RmsExtremeOverVoltage::Id }, - { "RmsExtremeUnderVoltage", RmsExtremeUnderVoltage::Id }, - { "RmsVoltageSag", RmsVoltageSag::Id }, - { "RmsVoltageSwell", RmsVoltageSwell::Id }, - { "LineCurrentPhaseB", LineCurrentPhaseB::Id }, - { "ActiveCurrentPhaseB", ActiveCurrentPhaseB::Id }, - { "ReactiveCurrentPhaseB", ReactiveCurrentPhaseB::Id }, - { "RmsVoltagePhaseB", RmsVoltagePhaseB::Id }, - { "RmsVoltageMinPhaseB", RmsVoltageMinPhaseB::Id }, - { "RmsVoltageMaxPhaseB", RmsVoltageMaxPhaseB::Id }, - { "RmsCurrentPhaseB", RmsCurrentPhaseB::Id }, - { "RmsCurrentMinPhaseB", RmsCurrentMinPhaseB::Id }, - { "RmsCurrentMaxPhaseB", RmsCurrentMaxPhaseB::Id }, - { "ActivePowerPhaseB", ActivePowerPhaseB::Id }, - { "ActivePowerMinPhaseB", ActivePowerMinPhaseB::Id }, - { "ActivePowerMaxPhaseB", ActivePowerMaxPhaseB::Id }, - { "ReactivePowerPhaseB", ReactivePowerPhaseB::Id }, - { "ApparentPowerPhaseB", ApparentPowerPhaseB::Id }, - { "PowerFactorPhaseB", PowerFactorPhaseB::Id }, - { "AverageRmsVoltageMeasurementPeriodPhaseB", AverageRmsVoltageMeasurementPeriodPhaseB::Id }, - { "AverageRmsOverVoltageCounterPhaseB", AverageRmsOverVoltageCounterPhaseB::Id }, - { "AverageRmsUnderVoltageCounterPhaseB", AverageRmsUnderVoltageCounterPhaseB::Id }, - { "RmsExtremeOverVoltagePeriodPhaseB", RmsExtremeOverVoltagePeriodPhaseB::Id }, - { "RmsExtremeUnderVoltagePeriodPhaseB", RmsExtremeUnderVoltagePeriodPhaseB::Id }, - { "RmsVoltageSagPeriodPhaseB", RmsVoltageSagPeriodPhaseB::Id }, - { "RmsVoltageSwellPeriodPhaseB", RmsVoltageSwellPeriodPhaseB::Id }, - { "LineCurrentPhaseC", LineCurrentPhaseC::Id }, - { "ActiveCurrentPhaseC", ActiveCurrentPhaseC::Id }, - { "ReactiveCurrentPhaseC", ReactiveCurrentPhaseC::Id }, - { "RmsVoltagePhaseC", RmsVoltagePhaseC::Id }, - { "RmsVoltageMinPhaseC", RmsVoltageMinPhaseC::Id }, - { "RmsVoltageMaxPhaseC", RmsVoltageMaxPhaseC::Id }, - { "RmsCurrentPhaseC", RmsCurrentPhaseC::Id }, - { "RmsCurrentMinPhaseC", RmsCurrentMinPhaseC::Id }, - { "RmsCurrentMaxPhaseC", RmsCurrentMaxPhaseC::Id }, - { "ActivePowerPhaseC", ActivePowerPhaseC::Id }, - { "ActivePowerMinPhaseC", ActivePowerMinPhaseC::Id }, - { "ActivePowerMaxPhaseC", ActivePowerMaxPhaseC::Id }, - { "ReactivePowerPhaseC", ReactivePowerPhaseC::Id }, - { "ApparentPowerPhaseC", ApparentPowerPhaseC::Id }, - { "PowerFactorPhaseC", PowerFactorPhaseC::Id }, - { "AverageRmsVoltageMeasurementPeriodPhaseC", AverageRmsVoltageMeasurementPeriodPhaseC::Id }, - { "AverageRmsOverVoltageCounterPhaseC", AverageRmsOverVoltageCounterPhaseC::Id }, - { "AverageRmsUnderVoltageCounterPhaseC", AverageRmsUnderVoltageCounterPhaseC::Id }, - { "RmsExtremeOverVoltagePeriodPhaseC", RmsExtremeOverVoltagePeriodPhaseC::Id }, - { "RmsExtremeUnderVoltagePeriodPhaseC", RmsExtremeUnderVoltagePeriodPhaseC::Id }, - { "RmsVoltageSagPeriodPhaseC", RmsVoltageSagPeriodPhaseC::Id }, - { "RmsVoltageSwellPeriodPhaseC", RmsVoltageSwellPeriodPhaseC::Id }, - { "GeneratedCommandList", GeneratedCommandList::Id }, - { "AcceptedCommandList", AcceptedCommandList::Id }, - { "AttributeList", AttributeList::Id }, - { "FeatureMap", FeatureMap::Id }, - { "ClusterRevision", ClusterRevision::Id } - }; - } // namespace Attributes - } // namespace ElectricalMeasurement - namespace ClientMonitoring { - namespace Attributes { - static const std::unordered_map matter_attribute_id_cluster_map { - { "IdleModeInterval", IdleModeInterval::Id }, - { "ActiveModeInterval", ActiveModeInterval::Id }, - { "ActiveModeThreshold", ActiveModeThreshold::Id }, - { "ExpectedClients", ExpectedClients::Id }, - { "GeneratedCommandList", GeneratedCommandList::Id }, - { "AcceptedCommandList", AcceptedCommandList::Id }, - { "AttributeList", AttributeList::Id }, - { "FeatureMap", FeatureMap::Id }, - { "ClusterRevision", ClusterRevision::Id } - }; - } // namespace Attributes - } // namespace ClientMonitoring - namespace UnitTesting { - namespace Attributes { - static const std::unordered_map matter_attribute_id_cluster_map { - { "Boolean", Boolean::Id }, - { "Bitmap8", Bitmap8::Id }, - { "Bitmap16", Bitmap16::Id }, - { "Bitmap32", Bitmap32::Id }, - { "Bitmap64", Bitmap64::Id }, - { "Int8u", Int8u::Id }, - { "Int16u", Int16u::Id }, - { "Int24u", Int24u::Id }, - { "Int32u", Int32u::Id }, - { "Int40u", Int40u::Id }, - { "Int48u", Int48u::Id }, - { "Int56u", Int56u::Id }, - { "Int64u", Int64u::Id }, - { "Int8s", Int8s::Id }, - { "Int16s", Int16s::Id }, - { "Int24s", Int24s::Id }, - { "Int32s", Int32s::Id }, - { "Int40s", Int40s::Id }, - { "Int48s", Int48s::Id }, - { "Int56s", Int56s::Id }, - { "Int64s", Int64s::Id }, - { "Enum8", Enum8::Id }, - { "Enum16", Enum16::Id }, - { "FloatSingle", FloatSingle::Id }, - { "FloatDouble", FloatDouble::Id }, - { "OctetString", OctetString::Id }, - { "ListInt8u", ListInt8u::Id }, - { "ListOctetString", ListOctetString::Id }, - { "ListStructOctetString", ListStructOctetString::Id }, - { "LongOctetString", LongOctetString::Id }, - { "CharString", CharString::Id }, - { "LongCharString", LongCharString::Id }, - { "EpochUs", EpochUs::Id }, - { "EpochS", EpochS::Id }, - { "VendorId", VendorId::Id }, - { "ListNullablesAndOptionalsStruct", ListNullablesAndOptionalsStruct::Id }, - { "EnumAttr", EnumAttr::Id }, - { "StructAttr", StructAttr::Id }, - { "RangeRestrictedInt8u", RangeRestrictedInt8u::Id }, - { "RangeRestrictedInt8s", RangeRestrictedInt8s::Id }, - { "RangeRestrictedInt16u", RangeRestrictedInt16u::Id }, - { "RangeRestrictedInt16s", RangeRestrictedInt16s::Id }, - { "ListLongOctetString", ListLongOctetString::Id }, - { "ListFabricScoped", ListFabricScoped::Id }, - { "TimedWriteBoolean", TimedWriteBoolean::Id }, - { "GeneralErrorBoolean", GeneralErrorBoolean::Id }, - { "ClusterErrorBoolean", ClusterErrorBoolean::Id }, - { "Unsupported", Unsupported::Id }, - { "NullableBoolean", NullableBoolean::Id }, - { "NullableBitmap8", NullableBitmap8::Id }, - { "NullableBitmap16", NullableBitmap16::Id }, - { "NullableBitmap32", NullableBitmap32::Id }, - { "NullableBitmap64", NullableBitmap64::Id }, - { "NullableInt8u", NullableInt8u::Id }, - { "NullableInt16u", NullableInt16u::Id }, - { "NullableInt24u", NullableInt24u::Id }, - { "NullableInt32u", NullableInt32u::Id }, - { "NullableInt40u", NullableInt40u::Id }, - { "NullableInt48u", NullableInt48u::Id }, - { "NullableInt56u", NullableInt56u::Id }, - { "NullableInt64u", NullableInt64u::Id }, - { "NullableInt8s", NullableInt8s::Id }, - { "NullableInt16s", NullableInt16s::Id }, - { "NullableInt24s", NullableInt24s::Id }, - { "NullableInt32s", NullableInt32s::Id }, - { "NullableInt40s", NullableInt40s::Id }, - { "NullableInt48s", NullableInt48s::Id }, - { "NullableInt56s", NullableInt56s::Id }, - { "NullableInt64s", NullableInt64s::Id }, - { "NullableEnum8", NullableEnum8::Id }, - { "NullableEnum16", NullableEnum16::Id }, - { "NullableFloatSingle", NullableFloatSingle::Id }, - { "NullableFloatDouble", NullableFloatDouble::Id }, - { "NullableOctetString", NullableOctetString::Id }, - { "NullableCharString", NullableCharString::Id }, - { "NullableEnumAttr", NullableEnumAttr::Id }, - { "NullableStruct", NullableStruct::Id }, - { "NullableRangeRestrictedInt8u", NullableRangeRestrictedInt8u::Id }, - { "NullableRangeRestrictedInt8s", NullableRangeRestrictedInt8s::Id }, - { "NullableRangeRestrictedInt16u", NullableRangeRestrictedInt16u::Id }, - { "NullableRangeRestrictedInt16s", NullableRangeRestrictedInt16s::Id }, - { "WriteOnlyInt8u", WriteOnlyInt8u::Id }, - { "GeneratedCommandList", GeneratedCommandList::Id }, - { "AcceptedCommandList", AcceptedCommandList::Id }, - { "AttributeList", AttributeList::Id }, - { "FeatureMap", FeatureMap::Id }, - { "ClusterRevision", ClusterRevision::Id } - }; - } // namespace Attributes - } // namespace UnitTesting - namespace FaultInjection { - namespace Attributes { - static const std::unordered_map matter_attribute_id_cluster_map { - { "GeneratedCommandList", GeneratedCommandList::Id }, - { "AcceptedCommandList", AcceptedCommandList::Id }, - { "AttributeList", AttributeList::Id }, - { "FeatureMap", FeatureMap::Id }, - { "ClusterRevision", ClusterRevision::Id } - }; - } // namespace Attributes - } // namespace FaultInjection +// Global map of each clusters attributes +static const std::unordered_map> matter_attribute_id_map { + { "Identify", Identify::Attributes::matter_attribute_id_cluster_map }, + { "Groups", Groups::Attributes::matter_attribute_id_cluster_map }, + { "Scenes", Scenes::Attributes::matter_attribute_id_cluster_map }, + { "OnOff", OnOff::Attributes::matter_attribute_id_cluster_map }, + { "OnOffSwitchConfiguration", OnOffSwitchConfiguration::Attributes::matter_attribute_id_cluster_map }, + { "LevelControl", LevelControl::Attributes::matter_attribute_id_cluster_map }, + { "BinaryInputBasic", BinaryInputBasic::Attributes::matter_attribute_id_cluster_map }, + { "PulseWidthModulation", PulseWidthModulation::Attributes::matter_attribute_id_cluster_map }, + { "Descriptor", Descriptor::Attributes::matter_attribute_id_cluster_map }, + { "Binding", Binding::Attributes::matter_attribute_id_cluster_map }, + { "AccessControl", AccessControl::Attributes::matter_attribute_id_cluster_map }, + { "Actions", Actions::Attributes::matter_attribute_id_cluster_map }, + { "Basic", Basic::Attributes::matter_attribute_id_cluster_map }, + { "OtaSoftwareUpdateProvider", OtaSoftwareUpdateProvider::Attributes::matter_attribute_id_cluster_map }, + { "OtaSoftwareUpdateRequestor", OtaSoftwareUpdateRequestor::Attributes::matter_attribute_id_cluster_map }, + { "LocalizationConfiguration", LocalizationConfiguration::Attributes::matter_attribute_id_cluster_map }, + { "TimeFormatLocalization", TimeFormatLocalization::Attributes::matter_attribute_id_cluster_map }, + { "UnitLocalization", UnitLocalization::Attributes::matter_attribute_id_cluster_map }, + { "PowerSourceConfiguration", PowerSourceConfiguration::Attributes::matter_attribute_id_cluster_map }, + { "PowerSource", PowerSource::Attributes::matter_attribute_id_cluster_map }, + { "GeneralCommissioning", GeneralCommissioning::Attributes::matter_attribute_id_cluster_map }, + { "NetworkCommissioning", NetworkCommissioning::Attributes::matter_attribute_id_cluster_map }, + { "DiagnosticLogs", DiagnosticLogs::Attributes::matter_attribute_id_cluster_map }, + { "GeneralDiagnostics", GeneralDiagnostics::Attributes::matter_attribute_id_cluster_map }, + { "SoftwareDiagnostics", SoftwareDiagnostics::Attributes::matter_attribute_id_cluster_map }, + { "ThreadNetworkDiagnostics", ThreadNetworkDiagnostics::Attributes::matter_attribute_id_cluster_map }, + { "WiFiNetworkDiagnostics", WiFiNetworkDiagnostics::Attributes::matter_attribute_id_cluster_map }, + { "EthernetNetworkDiagnostics", EthernetNetworkDiagnostics::Attributes::matter_attribute_id_cluster_map }, + { "TimeSynchronization", TimeSynchronization::Attributes::matter_attribute_id_cluster_map }, + { "BridgedDeviceBasic", BridgedDeviceBasic::Attributes::matter_attribute_id_cluster_map }, + { "Switch", Switch::Attributes::matter_attribute_id_cluster_map }, + { "AdministratorCommissioning", AdministratorCommissioning::Attributes::matter_attribute_id_cluster_map }, + { "OperationalCredentials", OperationalCredentials::Attributes::matter_attribute_id_cluster_map }, + { "GroupKeyManagement", GroupKeyManagement::Attributes::matter_attribute_id_cluster_map }, + { "FixedLabel", FixedLabel::Attributes::matter_attribute_id_cluster_map }, + { "UserLabel", UserLabel::Attributes::matter_attribute_id_cluster_map }, + { "ProxyConfiguration", ProxyConfiguration::Attributes::matter_attribute_id_cluster_map }, + { "ProxyDiscovery", ProxyDiscovery::Attributes::matter_attribute_id_cluster_map }, + { "ProxyValid", ProxyValid::Attributes::matter_attribute_id_cluster_map }, + { "BooleanState", BooleanState::Attributes::matter_attribute_id_cluster_map }, + { "ModeSelect", ModeSelect::Attributes::matter_attribute_id_cluster_map }, + { "DoorLock", DoorLock::Attributes::matter_attribute_id_cluster_map }, + { "WindowCovering", WindowCovering::Attributes::matter_attribute_id_cluster_map }, + { "BarrierControl", BarrierControl::Attributes::matter_attribute_id_cluster_map }, + { "PumpConfigurationAndControl", PumpConfigurationAndControl::Attributes::matter_attribute_id_cluster_map }, + { "Thermostat", Thermostat::Attributes::matter_attribute_id_cluster_map }, + { "FanControl", FanControl::Attributes::matter_attribute_id_cluster_map }, + { "ThermostatUserInterfaceConfiguration", ThermostatUserInterfaceConfiguration::Attributes::matter_attribute_id_cluster_map }, + { "ColorControl", ColorControl::Attributes::matter_attribute_id_cluster_map }, + { "BallastConfiguration", BallastConfiguration::Attributes::matter_attribute_id_cluster_map }, + { "IlluminanceMeasurement", IlluminanceMeasurement::Attributes::matter_attribute_id_cluster_map }, + { "TemperatureMeasurement", TemperatureMeasurement::Attributes::matter_attribute_id_cluster_map }, + { "PressureMeasurement", PressureMeasurement::Attributes::matter_attribute_id_cluster_map }, + { "FlowMeasurement", FlowMeasurement::Attributes::matter_attribute_id_cluster_map }, + { "RelativeHumidityMeasurement", RelativeHumidityMeasurement::Attributes::matter_attribute_id_cluster_map }, + { "OccupancySensing", OccupancySensing::Attributes::matter_attribute_id_cluster_map }, + { "WakeOnLan", WakeOnLan::Attributes::matter_attribute_id_cluster_map }, + { "Channel", Channel::Attributes::matter_attribute_id_cluster_map }, + { "TargetNavigator", TargetNavigator::Attributes::matter_attribute_id_cluster_map }, + { "MediaPlayback", MediaPlayback::Attributes::matter_attribute_id_cluster_map }, + { "MediaInput", MediaInput::Attributes::matter_attribute_id_cluster_map }, + { "LowPower", LowPower::Attributes::matter_attribute_id_cluster_map }, + { "KeypadInput", KeypadInput::Attributes::matter_attribute_id_cluster_map }, + { "ContentLauncher", ContentLauncher::Attributes::matter_attribute_id_cluster_map }, + { "AudioOutput", AudioOutput::Attributes::matter_attribute_id_cluster_map }, + { "ApplicationLauncher", ApplicationLauncher::Attributes::matter_attribute_id_cluster_map }, + { "ApplicationBasic", ApplicationBasic::Attributes::matter_attribute_id_cluster_map }, + { "AccountLogin", AccountLogin::Attributes::matter_attribute_id_cluster_map }, + { "ElectricalMeasurement", ElectricalMeasurement::Attributes::matter_attribute_id_cluster_map }, + { "ClientMonitoring", ClientMonitoring::Attributes::matter_attribute_id_cluster_map }, + { "UnitTesting", UnitTesting::Attributes::matter_attribute_id_cluster_map }, + { "FaultInjection", FaultInjection::Attributes::matter_attribute_id_cluster_map } +}; - // Global map of each clusters attributes - static const std::unordered_map> matter_attribute_id_map { - { "Identify", Identify::Attributes::matter_attribute_id_cluster_map }, - { "Groups", Groups::Attributes::matter_attribute_id_cluster_map }, - { "Scenes", Scenes::Attributes::matter_attribute_id_cluster_map }, - { "OnOff", OnOff::Attributes::matter_attribute_id_cluster_map }, - { "OnOffSwitchConfiguration", OnOffSwitchConfiguration::Attributes::matter_attribute_id_cluster_map }, - { "LevelControl", LevelControl::Attributes::matter_attribute_id_cluster_map }, - { "BinaryInputBasic", BinaryInputBasic::Attributes::matter_attribute_id_cluster_map }, - { "PulseWidthModulation", PulseWidthModulation::Attributes::matter_attribute_id_cluster_map }, - { "Descriptor", Descriptor::Attributes::matter_attribute_id_cluster_map }, - { "Binding", Binding::Attributes::matter_attribute_id_cluster_map }, - { "AccessControl", AccessControl::Attributes::matter_attribute_id_cluster_map }, - { "Actions", Actions::Attributes::matter_attribute_id_cluster_map }, - { "Basic", Basic::Attributes::matter_attribute_id_cluster_map }, - { "OtaSoftwareUpdateProvider", OtaSoftwareUpdateProvider::Attributes::matter_attribute_id_cluster_map }, - { "OtaSoftwareUpdateRequestor", OtaSoftwareUpdateRequestor::Attributes::matter_attribute_id_cluster_map }, - { "LocalizationConfiguration", LocalizationConfiguration::Attributes::matter_attribute_id_cluster_map }, - { "TimeFormatLocalization", TimeFormatLocalization::Attributes::matter_attribute_id_cluster_map }, - { "UnitLocalization", UnitLocalization::Attributes::matter_attribute_id_cluster_map }, - { "PowerSourceConfiguration", PowerSourceConfiguration::Attributes::matter_attribute_id_cluster_map }, - { "PowerSource", PowerSource::Attributes::matter_attribute_id_cluster_map }, - { "GeneralCommissioning", GeneralCommissioning::Attributes::matter_attribute_id_cluster_map }, - { "NetworkCommissioning", NetworkCommissioning::Attributes::matter_attribute_id_cluster_map }, - { "DiagnosticLogs", DiagnosticLogs::Attributes::matter_attribute_id_cluster_map }, - { "GeneralDiagnostics", GeneralDiagnostics::Attributes::matter_attribute_id_cluster_map }, - { "SoftwareDiagnostics", SoftwareDiagnostics::Attributes::matter_attribute_id_cluster_map }, - { "ThreadNetworkDiagnostics", ThreadNetworkDiagnostics::Attributes::matter_attribute_id_cluster_map }, - { "WiFiNetworkDiagnostics", WiFiNetworkDiagnostics::Attributes::matter_attribute_id_cluster_map }, - { "EthernetNetworkDiagnostics", EthernetNetworkDiagnostics::Attributes::matter_attribute_id_cluster_map }, - { "TimeSynchronization", TimeSynchronization::Attributes::matter_attribute_id_cluster_map }, - { "BridgedDeviceBasic", BridgedDeviceBasic::Attributes::matter_attribute_id_cluster_map }, - { "Switch", Switch::Attributes::matter_attribute_id_cluster_map }, - { "AdministratorCommissioning", AdministratorCommissioning::Attributes::matter_attribute_id_cluster_map }, - { "OperationalCredentials", OperationalCredentials::Attributes::matter_attribute_id_cluster_map }, - { "GroupKeyManagement", GroupKeyManagement::Attributes::matter_attribute_id_cluster_map }, - { "FixedLabel", FixedLabel::Attributes::matter_attribute_id_cluster_map }, - { "UserLabel", UserLabel::Attributes::matter_attribute_id_cluster_map }, - { "ProxyConfiguration", ProxyConfiguration::Attributes::matter_attribute_id_cluster_map }, - { "ProxyDiscovery", ProxyDiscovery::Attributes::matter_attribute_id_cluster_map }, - { "ProxyValid", ProxyValid::Attributes::matter_attribute_id_cluster_map }, - { "BooleanState", BooleanState::Attributes::matter_attribute_id_cluster_map }, - { "ModeSelect", ModeSelect::Attributes::matter_attribute_id_cluster_map }, - { "DoorLock", DoorLock::Attributes::matter_attribute_id_cluster_map }, - { "WindowCovering", WindowCovering::Attributes::matter_attribute_id_cluster_map }, - { "BarrierControl", BarrierControl::Attributes::matter_attribute_id_cluster_map }, - { "PumpConfigurationAndControl", PumpConfigurationAndControl::Attributes::matter_attribute_id_cluster_map }, - { "Thermostat", Thermostat::Attributes::matter_attribute_id_cluster_map }, - { "FanControl", FanControl::Attributes::matter_attribute_id_cluster_map }, - { "ThermostatUserInterfaceConfiguration", ThermostatUserInterfaceConfiguration::Attributes::matter_attribute_id_cluster_map }, - { "ColorControl", ColorControl::Attributes::matter_attribute_id_cluster_map }, - { "BallastConfiguration", BallastConfiguration::Attributes::matter_attribute_id_cluster_map }, - { "IlluminanceMeasurement", IlluminanceMeasurement::Attributes::matter_attribute_id_cluster_map }, - { "TemperatureMeasurement", TemperatureMeasurement::Attributes::matter_attribute_id_cluster_map }, - { "PressureMeasurement", PressureMeasurement::Attributes::matter_attribute_id_cluster_map }, - { "FlowMeasurement", FlowMeasurement::Attributes::matter_attribute_id_cluster_map }, - { "RelativeHumidityMeasurement", RelativeHumidityMeasurement::Attributes::matter_attribute_id_cluster_map }, - { "OccupancySensing", OccupancySensing::Attributes::matter_attribute_id_cluster_map }, - { "WakeOnLan", WakeOnLan::Attributes::matter_attribute_id_cluster_map }, - { "Channel", Channel::Attributes::matter_attribute_id_cluster_map }, - { "TargetNavigator", TargetNavigator::Attributes::matter_attribute_id_cluster_map }, - { "MediaPlayback", MediaPlayback::Attributes::matter_attribute_id_cluster_map }, - { "MediaInput", MediaInput::Attributes::matter_attribute_id_cluster_map }, - { "LowPower", LowPower::Attributes::matter_attribute_id_cluster_map }, - { "KeypadInput", KeypadInput::Attributes::matter_attribute_id_cluster_map }, - { "ContentLauncher", ContentLauncher::Attributes::matter_attribute_id_cluster_map }, - { "AudioOutput", AudioOutput::Attributes::matter_attribute_id_cluster_map }, - { "ApplicationLauncher", ApplicationLauncher::Attributes::matter_attribute_id_cluster_map }, - { "ApplicationBasic", ApplicationBasic::Attributes::matter_attribute_id_cluster_map }, - { "AccountLogin", AccountLogin::Attributes::matter_attribute_id_cluster_map }, - { "ElectricalMeasurement", ElectricalMeasurement::Attributes::matter_attribute_id_cluster_map }, - { "ClientMonitoring", ClientMonitoring::Attributes::matter_attribute_id_cluster_map }, - { "UnitTesting", UnitTesting::Attributes::matter_attribute_id_cluster_map }, - { "FaultInjection", FaultInjection::Attributes::matter_attribute_id_cluster_map } - }; - // Command mapping Matter - // Command structure for each cluster - namespace Identify { - namespace Commands { - static const std::unordered_map matter_command_id_cluster_map { - { "Identify", Identify::Id }, - { "TriggerEffect", TriggerEffect::Id } - }; - } // namespace Commands - } // namespace Identify - namespace Groups { - namespace Commands { - static const std::unordered_map matter_command_id_cluster_map { - { "AddGroup", AddGroup::Id }, - { "AddGroupResponse", AddGroupResponse::Id }, - { "ViewGroup", ViewGroup::Id }, - { "ViewGroupResponse", ViewGroupResponse::Id }, - { "GetGroupMembership", GetGroupMembership::Id }, - { "GetGroupMembershipResponse", GetGroupMembershipResponse::Id }, - { "RemoveGroup", RemoveGroup::Id }, - { "RemoveGroupResponse", RemoveGroupResponse::Id }, - { "RemoveAllGroups", RemoveAllGroups::Id }, - { "AddGroupIfIdentifying", AddGroupIfIdentifying::Id } - }; - } // namespace Commands - } // namespace Groups - namespace Scenes { - namespace Commands { - static const std::unordered_map matter_command_id_cluster_map { - { "AddScene", AddScene::Id }, - { "AddSceneResponse", AddSceneResponse::Id }, - { "ViewScene", ViewScene::Id }, - { "ViewSceneResponse", ViewSceneResponse::Id }, - { "RemoveScene", RemoveScene::Id }, - { "RemoveSceneResponse", RemoveSceneResponse::Id }, - { "RemoveAllScenes", RemoveAllScenes::Id }, - { "RemoveAllScenesResponse", RemoveAllScenesResponse::Id }, - { "StoreScene", StoreScene::Id }, - { "StoreSceneResponse", StoreSceneResponse::Id }, - { "RecallScene", RecallScene::Id }, - { "GetSceneMembership", GetSceneMembership::Id }, - { "GetSceneMembershipResponse", GetSceneMembershipResponse::Id }, - { "EnhancedAddScene", EnhancedAddScene::Id }, - { "EnhancedAddSceneResponse", EnhancedAddSceneResponse::Id }, - { "EnhancedViewScene", EnhancedViewScene::Id }, - { "EnhancedViewSceneResponse", EnhancedViewSceneResponse::Id }, - { "CopyScene", CopyScene::Id }, - { "CopySceneResponse", CopySceneResponse::Id } - }; - } // namespace Commands - } // namespace Scenes - namespace OnOff { - namespace Commands { - static const std::unordered_map matter_command_id_cluster_map { - { "Off", Off::Id }, - { "On", On::Id }, - { "Toggle", Toggle::Id }, - { "OffWithEffect", OffWithEffect::Id }, - { "OnWithRecallGlobalScene", OnWithRecallGlobalScene::Id }, - { "OnWithTimedOff", OnWithTimedOff::Id } - }; - } // namespace Commands - } // namespace OnOff - namespace OnOffSwitchConfiguration { - namespace Commands { - static const std::unordered_map matter_command_id_cluster_map {}; - } // namespace Commands - } // namespace OnOffSwitchConfiguration - namespace LevelControl { - namespace Commands { - static const std::unordered_map matter_command_id_cluster_map { - { "MoveToLevel", MoveToLevel::Id }, - { "Move", Move::Id }, - { "Step", Step::Id }, - { "Stop", Stop::Id }, - { "MoveToLevelWithOnOff", MoveToLevelWithOnOff::Id }, - { "MoveWithOnOff", MoveWithOnOff::Id }, - { "StepWithOnOff", StepWithOnOff::Id }, - { "StopWithOnOff", StopWithOnOff::Id }, - { "MoveToClosestFrequency", MoveToClosestFrequency::Id } - }; - } // namespace Commands - } // namespace LevelControl - namespace BinaryInputBasic { - namespace Commands { - static const std::unordered_map matter_command_id_cluster_map {}; - } // namespace Commands - } // namespace BinaryInputBasic - namespace PulseWidthModulation { - namespace Commands { - static const std::unordered_map matter_command_id_cluster_map {}; - } // namespace Commands - } // namespace PulseWidthModulation - namespace Descriptor { - namespace Commands { - static const std::unordered_map matter_command_id_cluster_map {}; - } // namespace Commands - } // namespace Descriptor - namespace Binding { - namespace Commands { - static const std::unordered_map matter_command_id_cluster_map {}; - } // namespace Commands - } // namespace Binding - namespace AccessControl { - namespace Commands { - static const std::unordered_map matter_command_id_cluster_map {}; - } // namespace Commands - } // namespace AccessControl - namespace Actions { - namespace Commands { - static const std::unordered_map matter_command_id_cluster_map { - { "InstantAction", InstantAction::Id }, - { "InstantActionWithTransition", InstantActionWithTransition::Id }, - { "StartAction", StartAction::Id }, - { "StartActionWithDuration", StartActionWithDuration::Id }, - { "StopAction", StopAction::Id }, - { "PauseAction", PauseAction::Id }, - { "PauseActionWithDuration", PauseActionWithDuration::Id }, - { "ResumeAction", ResumeAction::Id }, - { "EnableAction", EnableAction::Id }, - { "EnableActionWithDuration", EnableActionWithDuration::Id }, - { "DisableAction", DisableAction::Id }, - { "DisableActionWithDuration", DisableActionWithDuration::Id } - }; - } // namespace Commands - } // namespace Actions - namespace Basic { - namespace Commands { - static const std::unordered_map matter_command_id_cluster_map { - { "MfgSpecificPing", MfgSpecificPing::Id } - }; - } // namespace Commands - } // namespace Basic - namespace OtaSoftwareUpdateProvider { - namespace Commands { - static const std::unordered_map matter_command_id_cluster_map { - { "QueryImage", QueryImage::Id }, - { "QueryImageResponse", QueryImageResponse::Id }, - { "ApplyUpdateRequest", ApplyUpdateRequest::Id }, - { "ApplyUpdateResponse", ApplyUpdateResponse::Id }, - { "NotifyUpdateApplied", NotifyUpdateApplied::Id } - }; - } // namespace Commands - } // namespace OtaSoftwareUpdateProvider - namespace OtaSoftwareUpdateRequestor { - namespace Commands { - static const std::unordered_map matter_command_id_cluster_map { - { "AnnounceOtaProvider", AnnounceOtaProvider::Id } - }; - } // namespace Commands - } // namespace OtaSoftwareUpdateRequestor - namespace LocalizationConfiguration { - namespace Commands { - static const std::unordered_map matter_command_id_cluster_map {}; - } // namespace Commands - } // namespace LocalizationConfiguration - namespace TimeFormatLocalization { - namespace Commands { - static const std::unordered_map matter_command_id_cluster_map {}; - } // namespace Commands - } // namespace TimeFormatLocalization - namespace UnitLocalization { - namespace Commands { - static const std::unordered_map matter_command_id_cluster_map {}; - } // namespace Commands - } // namespace UnitLocalization - namespace PowerSourceConfiguration { - namespace Commands { - static const std::unordered_map matter_command_id_cluster_map {}; - } // namespace Commands - } // namespace PowerSourceConfiguration - namespace PowerSource { - namespace Commands { - static const std::unordered_map matter_command_id_cluster_map {}; - } // namespace Commands - } // namespace PowerSource - namespace GeneralCommissioning { - namespace Commands { - static const std::unordered_map matter_command_id_cluster_map { - { "ArmFailSafe", ArmFailSafe::Id }, - { "ArmFailSafeResponse", ArmFailSafeResponse::Id }, - { "SetRegulatoryConfig", SetRegulatoryConfig::Id }, - { "SetRegulatoryConfigResponse", SetRegulatoryConfigResponse::Id }, - { "CommissioningComplete", CommissioningComplete::Id }, - { "CommissioningCompleteResponse", CommissioningCompleteResponse::Id } - }; - } // namespace Commands - } // namespace GeneralCommissioning - namespace NetworkCommissioning { - namespace Commands { - static const std::unordered_map matter_command_id_cluster_map { - { "ScanNetworks", ScanNetworks::Id }, - { "ScanNetworksResponse", ScanNetworksResponse::Id }, - { "AddOrUpdateWiFiNetwork", AddOrUpdateWiFiNetwork::Id }, - { "AddOrUpdateThreadNetwork", AddOrUpdateThreadNetwork::Id }, - { "RemoveNetwork", RemoveNetwork::Id }, - { "NetworkConfigResponse", NetworkConfigResponse::Id }, - { "ConnectNetwork", ConnectNetwork::Id }, - { "ConnectNetworkResponse", ConnectNetworkResponse::Id }, - { "ReorderNetwork", ReorderNetwork::Id } - }; - } // namespace Commands - } // namespace NetworkCommissioning - namespace DiagnosticLogs { - namespace Commands { - static const std::unordered_map matter_command_id_cluster_map { - { "RetrieveLogsRequest", RetrieveLogsRequest::Id }, - { "RetrieveLogsResponse", RetrieveLogsResponse::Id } - }; - } // namespace Commands - } // namespace DiagnosticLogs - namespace GeneralDiagnostics { - namespace Commands { - static const std::unordered_map matter_command_id_cluster_map { - { "TestEventTrigger", TestEventTrigger::Id } - }; - } // namespace Commands - } // namespace GeneralDiagnostics - namespace SoftwareDiagnostics { - namespace Commands { - static const std::unordered_map matter_command_id_cluster_map { - { "ResetWatermarks", ResetWatermarks::Id } - }; - } // namespace Commands - } // namespace SoftwareDiagnostics - namespace ThreadNetworkDiagnostics { - namespace Commands { - static const std::unordered_map matter_command_id_cluster_map { - { "ResetCounts", ResetCounts::Id } - }; - } // namespace Commands - } // namespace ThreadNetworkDiagnostics - namespace WiFiNetworkDiagnostics { - namespace Commands { - static const std::unordered_map matter_command_id_cluster_map { - { "ResetCounts", ResetCounts::Id } - }; - } // namespace Commands - } // namespace WiFiNetworkDiagnostics - namespace EthernetNetworkDiagnostics { - namespace Commands { - static const std::unordered_map matter_command_id_cluster_map { - { "ResetCounts", ResetCounts::Id } - }; - } // namespace Commands - } // namespace EthernetNetworkDiagnostics - namespace TimeSynchronization { - namespace Commands { - static const std::unordered_map matter_command_id_cluster_map { - { "SetUtcTime", SetUtcTime::Id } - }; - } // namespace Commands - } // namespace TimeSynchronization - namespace BridgedDeviceBasic { - namespace Commands { - static const std::unordered_map matter_command_id_cluster_map {}; - } // namespace Commands - } // namespace BridgedDeviceBasic - namespace Switch { - namespace Commands { - static const std::unordered_map matter_command_id_cluster_map {}; - } // namespace Commands - } // namespace Switch - namespace AdministratorCommissioning { - namespace Commands { - static const std::unordered_map matter_command_id_cluster_map { - { "OpenCommissioningWindow", OpenCommissioningWindow::Id }, - { "OpenBasicCommissioningWindow", OpenBasicCommissioningWindow::Id }, - { "RevokeCommissioning", RevokeCommissioning::Id } - }; - } // namespace Commands - } // namespace AdministratorCommissioning - namespace OperationalCredentials { - namespace Commands { - static const std::unordered_map matter_command_id_cluster_map { - { "AttestationRequest", AttestationRequest::Id }, - { "AttestationResponse", AttestationResponse::Id }, - { "CertificateChainRequest", CertificateChainRequest::Id }, - { "CertificateChainResponse", CertificateChainResponse::Id }, - { "CSRRequest", CSRRequest::Id }, - { "CSRResponse", CSRResponse::Id }, - { "AddNOC", AddNOC::Id }, - { "UpdateNOC", UpdateNOC::Id }, - { "NOCResponse", NOCResponse::Id }, - { "UpdateFabricLabel", UpdateFabricLabel::Id }, - { "RemoveFabric", RemoveFabric::Id }, - { "AddTrustedRootCertificate", AddTrustedRootCertificate::Id } - }; - } // namespace Commands - } // namespace OperationalCredentials - namespace GroupKeyManagement { - namespace Commands { - static const std::unordered_map matter_command_id_cluster_map { - { "KeySetWrite", KeySetWrite::Id }, - { "KeySetRead", KeySetRead::Id }, - { "KeySetReadResponse", KeySetReadResponse::Id }, - { "KeySetRemove", KeySetRemove::Id }, - { "KeySetReadAllIndices", KeySetReadAllIndices::Id }, - { "KeySetReadAllIndicesResponse", KeySetReadAllIndicesResponse::Id } - }; - } // namespace Commands - } // namespace GroupKeyManagement - namespace FixedLabel { - namespace Commands { - static const std::unordered_map matter_command_id_cluster_map {}; - } // namespace Commands - } // namespace FixedLabel - namespace UserLabel { - namespace Commands { - static const std::unordered_map matter_command_id_cluster_map {}; - } // namespace Commands - } // namespace UserLabel - namespace ProxyConfiguration { - namespace Commands { - static const std::unordered_map matter_command_id_cluster_map {}; - } // namespace Commands - } // namespace ProxyConfiguration - namespace ProxyDiscovery { - namespace Commands { - static const std::unordered_map matter_command_id_cluster_map {}; - } // namespace Commands - } // namespace ProxyDiscovery - namespace ProxyValid { - namespace Commands { - static const std::unordered_map matter_command_id_cluster_map {}; - } // namespace Commands - } // namespace ProxyValid - namespace BooleanState { - namespace Commands { - static const std::unordered_map matter_command_id_cluster_map {}; - } // namespace Commands - } // namespace BooleanState - namespace ModeSelect { - namespace Commands { - static const std::unordered_map matter_command_id_cluster_map { - { "ChangeToMode", ChangeToMode::Id } - }; - } // namespace Commands - } // namespace ModeSelect - namespace DoorLock { - namespace Commands { - static const std::unordered_map matter_command_id_cluster_map { - { "LockDoor", LockDoor::Id }, - { "UnlockDoor", UnlockDoor::Id }, - { "UnlockWithTimeout", UnlockWithTimeout::Id }, - { "SetWeekDaySchedule", SetWeekDaySchedule::Id }, - { "GetWeekDaySchedule", GetWeekDaySchedule::Id }, - { "GetWeekDayScheduleResponse", GetWeekDayScheduleResponse::Id }, - { "ClearWeekDaySchedule", ClearWeekDaySchedule::Id }, - { "SetYearDaySchedule", SetYearDaySchedule::Id }, - { "GetYearDaySchedule", GetYearDaySchedule::Id }, - { "GetYearDayScheduleResponse", GetYearDayScheduleResponse::Id }, - { "ClearYearDaySchedule", ClearYearDaySchedule::Id }, - { "SetHolidaySchedule", SetHolidaySchedule::Id }, - { "GetHolidaySchedule", GetHolidaySchedule::Id }, - { "GetHolidayScheduleResponse", GetHolidayScheduleResponse::Id }, - { "ClearHolidaySchedule", ClearHolidaySchedule::Id }, - { "SetUser", SetUser::Id }, - { "GetUser", GetUser::Id }, - { "GetUserResponse", GetUserResponse::Id }, - { "ClearUser", ClearUser::Id }, - { "SetCredential", SetCredential::Id }, - { "SetCredentialResponse", SetCredentialResponse::Id }, - { "GetCredentialStatus", GetCredentialStatus::Id }, - { "GetCredentialStatusResponse", GetCredentialStatusResponse::Id }, - { "ClearCredential", ClearCredential::Id } - }; - } // namespace Commands - } // namespace DoorLock - namespace WindowCovering { - namespace Commands { - static const std::unordered_map matter_command_id_cluster_map { - { "UpOrOpen", UpOrOpen::Id }, - { "DownOrClose", DownOrClose::Id }, - { "StopMotion", StopMotion::Id }, - { "GoToLiftValue", GoToLiftValue::Id }, - { "GoToLiftPercentage", GoToLiftPercentage::Id }, - { "GoToTiltValue", GoToTiltValue::Id }, - { "GoToTiltPercentage", GoToTiltPercentage::Id } - }; - } // namespace Commands - } // namespace WindowCovering - namespace BarrierControl { - namespace Commands { - static const std::unordered_map matter_command_id_cluster_map { - { "BarrierControlGoToPercent", BarrierControlGoToPercent::Id }, - { "BarrierControlStop", BarrierControlStop::Id } - }; - } // namespace Commands - } // namespace BarrierControl - namespace PumpConfigurationAndControl { - namespace Commands { - static const std::unordered_map matter_command_id_cluster_map {}; - } // namespace Commands - } // namespace PumpConfigurationAndControl - namespace Thermostat { - namespace Commands { - static const std::unordered_map matter_command_id_cluster_map { - { "SetpointRaiseLower", SetpointRaiseLower::Id }, - { "GetWeeklyScheduleResponse", GetWeeklyScheduleResponse::Id }, - { "SetWeeklySchedule", SetWeeklySchedule::Id }, - { "GetWeeklySchedule", GetWeeklySchedule::Id }, - { "ClearWeeklySchedule", ClearWeeklySchedule::Id } - }; - } // namespace Commands - } // namespace Thermostat - namespace FanControl { - namespace Commands { - static const std::unordered_map matter_command_id_cluster_map {}; - } // namespace Commands - } // namespace FanControl - namespace ThermostatUserInterfaceConfiguration { - namespace Commands { - static const std::unordered_map matter_command_id_cluster_map {}; - } // namespace Commands - } // namespace ThermostatUserInterfaceConfiguration - namespace ColorControl { - namespace Commands { - static const std::unordered_map matter_command_id_cluster_map { - { "MoveToHue", MoveToHue::Id }, - { "MoveHue", MoveHue::Id }, - { "StepHue", StepHue::Id }, - { "MoveToSaturation", MoveToSaturation::Id }, - { "MoveSaturation", MoveSaturation::Id }, - { "StepSaturation", StepSaturation::Id }, - { "MoveToHueAndSaturation", MoveToHueAndSaturation::Id }, - { "MoveToColor", MoveToColor::Id }, - { "MoveColor", MoveColor::Id }, - { "StepColor", StepColor::Id }, - { "MoveToColorTemperature", MoveToColorTemperature::Id }, - { "EnhancedMoveToHue", EnhancedMoveToHue::Id }, - { "EnhancedMoveHue", EnhancedMoveHue::Id }, - { "EnhancedStepHue", EnhancedStepHue::Id }, - { "EnhancedMoveToHueAndSaturation", EnhancedMoveToHueAndSaturation::Id }, - { "ColorLoopSet", ColorLoopSet::Id }, - { "StopMoveStep", StopMoveStep::Id }, - { "MoveColorTemperature", MoveColorTemperature::Id }, - { "StepColorTemperature", StepColorTemperature::Id } - }; - } // namespace Commands - } // namespace ColorControl - namespace BallastConfiguration { - namespace Commands { - static const std::unordered_map matter_command_id_cluster_map {}; - } // namespace Commands - } // namespace BallastConfiguration - namespace IlluminanceMeasurement { - namespace Commands { - static const std::unordered_map matter_command_id_cluster_map {}; - } // namespace Commands - } // namespace IlluminanceMeasurement - namespace TemperatureMeasurement { - namespace Commands { - static const std::unordered_map matter_command_id_cluster_map {}; - } // namespace Commands - } // namespace TemperatureMeasurement - namespace PressureMeasurement { - namespace Commands { - static const std::unordered_map matter_command_id_cluster_map {}; - } // namespace Commands - } // namespace PressureMeasurement - namespace FlowMeasurement { - namespace Commands { - static const std::unordered_map matter_command_id_cluster_map {}; - } // namespace Commands - } // namespace FlowMeasurement - namespace RelativeHumidityMeasurement { - namespace Commands { - static const std::unordered_map matter_command_id_cluster_map {}; - } // namespace Commands - } // namespace RelativeHumidityMeasurement - namespace OccupancySensing { - namespace Commands { - static const std::unordered_map matter_command_id_cluster_map {}; - } // namespace Commands - } // namespace OccupancySensing - namespace WakeOnLan { - namespace Commands { - static const std::unordered_map matter_command_id_cluster_map {}; - } // namespace Commands - } // namespace WakeOnLan - namespace Channel { - namespace Commands { - static const std::unordered_map matter_command_id_cluster_map { - { "ChangeChannel", ChangeChannel::Id }, - { "ChangeChannelResponse", ChangeChannelResponse::Id }, - { "ChangeChannelByNumber", ChangeChannelByNumber::Id }, - { "SkipChannel", SkipChannel::Id } - }; - } // namespace Commands - } // namespace Channel - namespace TargetNavigator { - namespace Commands { - static const std::unordered_map matter_command_id_cluster_map { - { "NavigateTarget", NavigateTarget::Id }, - { "NavigateTargetResponse", NavigateTargetResponse::Id } - }; - } // namespace Commands - } // namespace TargetNavigator - namespace MediaPlayback { - namespace Commands { - static const std::unordered_map matter_command_id_cluster_map { - { "Play", Play::Id }, - { "Pause", Pause::Id }, - { "StopPlayback", StopPlayback::Id }, - { "StartOver", StartOver::Id }, - { "Previous", Previous::Id }, - { "Next", Next::Id }, - { "Rewind", Rewind::Id }, - { "FastForward", FastForward::Id }, - { "SkipForward", SkipForward::Id }, - { "SkipBackward", SkipBackward::Id }, - { "PlaybackResponse", PlaybackResponse::Id }, - { "Seek", Seek::Id } - }; - } // namespace Commands - } // namespace MediaPlayback - namespace MediaInput { - namespace Commands { - static const std::unordered_map matter_command_id_cluster_map { - { "SelectInput", SelectInput::Id }, - { "ShowInputStatus", ShowInputStatus::Id }, - { "HideInputStatus", HideInputStatus::Id }, - { "RenameInput", RenameInput::Id } - }; - } // namespace Commands - } // namespace MediaInput - namespace LowPower { - namespace Commands { - static const std::unordered_map matter_command_id_cluster_map { - { "Sleep", Sleep::Id } - }; - } // namespace Commands - } // namespace LowPower - namespace KeypadInput { - namespace Commands { - static const std::unordered_map matter_command_id_cluster_map { - { "SendKey", SendKey::Id }, - { "SendKeyResponse", SendKeyResponse::Id } - }; - } // namespace Commands - } // namespace KeypadInput - namespace ContentLauncher { - namespace Commands { - static const std::unordered_map matter_command_id_cluster_map { - { "LaunchContent", LaunchContent::Id }, - { "LaunchURL", LaunchURL::Id }, - { "LaunchResponse", LaunchResponse::Id } - }; - } // namespace Commands - } // namespace ContentLauncher - namespace AudioOutput { - namespace Commands { - static const std::unordered_map matter_command_id_cluster_map { - { "SelectOutput", SelectOutput::Id }, - { "RenameOutput", RenameOutput::Id } - }; - } // namespace Commands - } // namespace AudioOutput - namespace ApplicationLauncher { - namespace Commands { - static const std::unordered_map matter_command_id_cluster_map { - { "LaunchApp", LaunchApp::Id }, - { "StopApp", StopApp::Id }, - { "HideApp", HideApp::Id }, - { "LauncherResponse", LauncherResponse::Id } - }; - } // namespace Commands - } // namespace ApplicationLauncher - namespace ApplicationBasic { - namespace Commands { - static const std::unordered_map matter_command_id_cluster_map {}; - } // namespace Commands - } // namespace ApplicationBasic - namespace AccountLogin { - namespace Commands { - static const std::unordered_map matter_command_id_cluster_map { - { "GetSetupPIN", GetSetupPIN::Id }, - { "GetSetupPINResponse", GetSetupPINResponse::Id }, - { "Login", Login::Id }, - { "Logout", Logout::Id } - }; - } // namespace Commands - } // namespace AccountLogin - namespace ElectricalMeasurement { - namespace Commands { - static const std::unordered_map matter_command_id_cluster_map { - { "GetProfileInfoResponseCommand", GetProfileInfoResponseCommand::Id }, - { "GetProfileInfoCommand", GetProfileInfoCommand::Id }, - { "GetMeasurementProfileResponseCommand", GetMeasurementProfileResponseCommand::Id }, - { "GetMeasurementProfileCommand", GetMeasurementProfileCommand::Id } - }; - } // namespace Commands - } // namespace ElectricalMeasurement - namespace ClientMonitoring { - namespace Commands { - static const std::unordered_map matter_command_id_cluster_map { - { "RegisterClientMonitoring", RegisterClientMonitoring::Id }, - { "StayAwakeRequest", StayAwakeRequest::Id } - }; - } // namespace Commands - } // namespace ClientMonitoring - namespace UnitTesting { - namespace Commands { - static const std::unordered_map matter_command_id_cluster_map { - { "Test", Test::Id }, - { "TestSpecificResponse", TestSpecificResponse::Id }, - { "TestNotHandled", TestNotHandled::Id }, - { "TestAddArgumentsResponse", TestAddArgumentsResponse::Id }, - { "TestSpecific", TestSpecific::Id }, - { "TestSimpleArgumentResponse", TestSimpleArgumentResponse::Id }, - { "TestUnknownCommand", TestUnknownCommand::Id }, - { "TestStructArrayArgumentResponse", TestStructArrayArgumentResponse::Id }, - { "TestAddArguments", TestAddArguments::Id }, - { "TestListInt8UReverseResponse", TestListInt8UReverseResponse::Id }, - { "TestSimpleArgumentRequest", TestSimpleArgumentRequest::Id }, - { "TestEnumsResponse", TestEnumsResponse::Id }, - { "TestStructArrayArgumentRequest", TestStructArrayArgumentRequest::Id }, - { "TestNullableOptionalResponse", TestNullableOptionalResponse::Id }, - { "TestStructArgumentRequest", TestStructArgumentRequest::Id }, - { "TestComplexNullableOptionalResponse", TestComplexNullableOptionalResponse::Id }, - { "TestNestedStructArgumentRequest", TestNestedStructArgumentRequest::Id }, - { "BooleanResponse", BooleanResponse::Id }, - { "TestListStructArgumentRequest", TestListStructArgumentRequest::Id }, - { "SimpleStructResponse", SimpleStructResponse::Id }, - { "TestListInt8UArgumentRequest", TestListInt8UArgumentRequest::Id }, - { "TestEmitTestEventResponse", TestEmitTestEventResponse::Id }, - { "TestNestedStructListArgumentRequest", TestNestedStructListArgumentRequest::Id }, - { "TestEmitTestFabricScopedEventResponse", TestEmitTestFabricScopedEventResponse::Id }, - { "TestListNestedStructListArgumentRequest", TestListNestedStructListArgumentRequest::Id }, - { "TestListInt8UReverseRequest", TestListInt8UReverseRequest::Id }, - { "TestEnumsRequest", TestEnumsRequest::Id }, - { "TestNullableOptionalRequest", TestNullableOptionalRequest::Id }, - { "TestComplexNullableOptionalRequest", TestComplexNullableOptionalRequest::Id }, - { "SimpleStructEchoRequest", SimpleStructEchoRequest::Id }, - { "TimedInvokeRequest", TimedInvokeRequest::Id }, - { "TestSimpleOptionalArgumentRequest", TestSimpleOptionalArgumentRequest::Id }, - { "TestEmitTestEventRequest", TestEmitTestEventRequest::Id }, - { "TestEmitTestFabricScopedEventRequest", TestEmitTestFabricScopedEventRequest::Id } - }; - } // namespace Commands - } // namespace UnitTesting - namespace FaultInjection { - namespace Commands { - static const std::unordered_map matter_command_id_cluster_map { - { "FailAtFault", FailAtFault::Id }, - { "FailRandomlyAtFault", FailRandomlyAtFault::Id } - }; - } // namespace Commands - } // namespace FaultInjection +// Command mapping Matter +// Command structure for each cluster +namespace Identify { +namespace Commands { +static const std::unordered_map matter_command_id_cluster_map { + { "Identify", Identify::Id }, + { "TriggerEffect", TriggerEffect::Id } +}; +} // namespace Commands +} // namespace Identify +namespace Groups { +namespace Commands { +static const std::unordered_map matter_command_id_cluster_map { + { "AddGroup", AddGroup::Id }, + { "AddGroupResponse", AddGroupResponse::Id }, + { "ViewGroup", ViewGroup::Id }, + { "ViewGroupResponse", ViewGroupResponse::Id }, + { "GetGroupMembership", GetGroupMembership::Id }, + { "GetGroupMembershipResponse", GetGroupMembershipResponse::Id }, + { "RemoveGroup", RemoveGroup::Id }, + { "RemoveGroupResponse", RemoveGroupResponse::Id }, + { "RemoveAllGroups", RemoveAllGroups::Id }, + { "AddGroupIfIdentifying", AddGroupIfIdentifying::Id } +}; +} // namespace Commands +} // namespace Groups +namespace Scenes { +namespace Commands { +static const std::unordered_map matter_command_id_cluster_map { + { "AddScene", AddScene::Id }, + { "AddSceneResponse", AddSceneResponse::Id }, + { "ViewScene", ViewScene::Id }, + { "ViewSceneResponse", ViewSceneResponse::Id }, + { "RemoveScene", RemoveScene::Id }, + { "RemoveSceneResponse", RemoveSceneResponse::Id }, + { "RemoveAllScenes", RemoveAllScenes::Id }, + { "RemoveAllScenesResponse", RemoveAllScenesResponse::Id }, + { "StoreScene", StoreScene::Id }, + { "StoreSceneResponse", StoreSceneResponse::Id }, + { "RecallScene", RecallScene::Id }, + { "GetSceneMembership", GetSceneMembership::Id }, + { "GetSceneMembershipResponse", GetSceneMembershipResponse::Id }, + { "EnhancedAddScene", EnhancedAddScene::Id }, + { "EnhancedAddSceneResponse", EnhancedAddSceneResponse::Id }, + { "EnhancedViewScene", EnhancedViewScene::Id }, + { "EnhancedViewSceneResponse", EnhancedViewSceneResponse::Id }, + { "CopyScene", CopyScene::Id }, + { "CopySceneResponse", CopySceneResponse::Id } +}; +} // namespace Commands +} // namespace Scenes +namespace OnOff { +namespace Commands { +static const std::unordered_map matter_command_id_cluster_map { + { "Off", Off::Id }, + { "On", On::Id }, + { "Toggle", Toggle::Id }, + { "OffWithEffect", OffWithEffect::Id }, + { "OnWithRecallGlobalScene", OnWithRecallGlobalScene::Id }, + { "OnWithTimedOff", OnWithTimedOff::Id } +}; +} // namespace Commands +} // namespace OnOff +namespace OnOffSwitchConfiguration { +namespace Commands { +static const std::unordered_map matter_command_id_cluster_map { +}; +} // namespace Commands +} // namespace OnOffSwitchConfiguration +namespace LevelControl { +namespace Commands { +static const std::unordered_map matter_command_id_cluster_map { + { "MoveToLevel", MoveToLevel::Id }, + { "Move", Move::Id }, + { "Step", Step::Id }, + { "Stop", Stop::Id }, + { "MoveToLevelWithOnOff", MoveToLevelWithOnOff::Id }, + { "MoveWithOnOff", MoveWithOnOff::Id }, + { "StepWithOnOff", StepWithOnOff::Id }, + { "StopWithOnOff", StopWithOnOff::Id }, + { "MoveToClosestFrequency", MoveToClosestFrequency::Id } +}; +} // namespace Commands +} // namespace LevelControl +namespace BinaryInputBasic { +namespace Commands { +static const std::unordered_map matter_command_id_cluster_map { +}; +} // namespace Commands +} // namespace BinaryInputBasic +namespace PulseWidthModulation { +namespace Commands { +static const std::unordered_map matter_command_id_cluster_map { +}; +} // namespace Commands +} // namespace PulseWidthModulation +namespace Descriptor { +namespace Commands { +static const std::unordered_map matter_command_id_cluster_map { +}; +} // namespace Commands +} // namespace Descriptor +namespace Binding { +namespace Commands { +static const std::unordered_map matter_command_id_cluster_map { +}; +} // namespace Commands +} // namespace Binding +namespace AccessControl { +namespace Commands { +static const std::unordered_map matter_command_id_cluster_map { +}; +} // namespace Commands +} // namespace AccessControl +namespace Actions { +namespace Commands { +static const std::unordered_map matter_command_id_cluster_map { + { "InstantAction", InstantAction::Id }, + { "InstantActionWithTransition", InstantActionWithTransition::Id }, + { "StartAction", StartAction::Id }, + { "StartActionWithDuration", StartActionWithDuration::Id }, + { "StopAction", StopAction::Id }, + { "PauseAction", PauseAction::Id }, + { "PauseActionWithDuration", PauseActionWithDuration::Id }, + { "ResumeAction", ResumeAction::Id }, + { "EnableAction", EnableAction::Id }, + { "EnableActionWithDuration", EnableActionWithDuration::Id }, + { "DisableAction", DisableAction::Id }, + { "DisableActionWithDuration", DisableActionWithDuration::Id } +}; +} // namespace Commands +} // namespace Actions +namespace Basic { +namespace Commands { +static const std::unordered_map matter_command_id_cluster_map { + { "MfgSpecificPing", MfgSpecificPing::Id } +}; +} // namespace Commands +} // namespace Basic +namespace OtaSoftwareUpdateProvider { +namespace Commands { +static const std::unordered_map matter_command_id_cluster_map { + { "QueryImage", QueryImage::Id }, + { "QueryImageResponse", QueryImageResponse::Id }, + { "ApplyUpdateRequest", ApplyUpdateRequest::Id }, + { "ApplyUpdateResponse", ApplyUpdateResponse::Id }, + { "NotifyUpdateApplied", NotifyUpdateApplied::Id } +}; +} // namespace Commands +} // namespace OtaSoftwareUpdateProvider +namespace OtaSoftwareUpdateRequestor { +namespace Commands { +static const std::unordered_map matter_command_id_cluster_map { + { "AnnounceOtaProvider", AnnounceOtaProvider::Id } +}; +} // namespace Commands +} // namespace OtaSoftwareUpdateRequestor +namespace LocalizationConfiguration { +namespace Commands { +static const std::unordered_map matter_command_id_cluster_map { +}; +} // namespace Commands +} // namespace LocalizationConfiguration +namespace TimeFormatLocalization { +namespace Commands { +static const std::unordered_map matter_command_id_cluster_map { +}; +} // namespace Commands +} // namespace TimeFormatLocalization +namespace UnitLocalization { +namespace Commands { +static const std::unordered_map matter_command_id_cluster_map { +}; +} // namespace Commands +} // namespace UnitLocalization +namespace PowerSourceConfiguration { +namespace Commands { +static const std::unordered_map matter_command_id_cluster_map { +}; +} // namespace Commands +} // namespace PowerSourceConfiguration +namespace PowerSource { +namespace Commands { +static const std::unordered_map matter_command_id_cluster_map { +}; +} // namespace Commands +} // namespace PowerSource +namespace GeneralCommissioning { +namespace Commands { +static const std::unordered_map matter_command_id_cluster_map { + { "ArmFailSafe", ArmFailSafe::Id }, + { "ArmFailSafeResponse", ArmFailSafeResponse::Id }, + { "SetRegulatoryConfig", SetRegulatoryConfig::Id }, + { "SetRegulatoryConfigResponse", SetRegulatoryConfigResponse::Id }, + { "CommissioningComplete", CommissioningComplete::Id }, + { "CommissioningCompleteResponse", CommissioningCompleteResponse::Id } +}; +} // namespace Commands +} // namespace GeneralCommissioning +namespace NetworkCommissioning { +namespace Commands { +static const std::unordered_map matter_command_id_cluster_map { + { "ScanNetworks", ScanNetworks::Id }, + { "ScanNetworksResponse", ScanNetworksResponse::Id }, + { "AddOrUpdateWiFiNetwork", AddOrUpdateWiFiNetwork::Id }, + { "AddOrUpdateThreadNetwork", AddOrUpdateThreadNetwork::Id }, + { "RemoveNetwork", RemoveNetwork::Id }, + { "NetworkConfigResponse", NetworkConfigResponse::Id }, + { "ConnectNetwork", ConnectNetwork::Id }, + { "ConnectNetworkResponse", ConnectNetworkResponse::Id }, + { "ReorderNetwork", ReorderNetwork::Id } +}; +} // namespace Commands +} // namespace NetworkCommissioning +namespace DiagnosticLogs { +namespace Commands { +static const std::unordered_map matter_command_id_cluster_map { + { "RetrieveLogsRequest", RetrieveLogsRequest::Id }, + { "RetrieveLogsResponse", RetrieveLogsResponse::Id } +}; +} // namespace Commands +} // namespace DiagnosticLogs +namespace GeneralDiagnostics { +namespace Commands { +static const std::unordered_map matter_command_id_cluster_map { + { "TestEventTrigger", TestEventTrigger::Id } +}; +} // namespace Commands +} // namespace GeneralDiagnostics +namespace SoftwareDiagnostics { +namespace Commands { +static const std::unordered_map matter_command_id_cluster_map { + { "ResetWatermarks", ResetWatermarks::Id } +}; +} // namespace Commands +} // namespace SoftwareDiagnostics +namespace ThreadNetworkDiagnostics { +namespace Commands { +static const std::unordered_map matter_command_id_cluster_map { + { "ResetCounts", ResetCounts::Id } +}; +} // namespace Commands +} // namespace ThreadNetworkDiagnostics +namespace WiFiNetworkDiagnostics { +namespace Commands { +static const std::unordered_map matter_command_id_cluster_map { + { "ResetCounts", ResetCounts::Id } +}; +} // namespace Commands +} // namespace WiFiNetworkDiagnostics +namespace EthernetNetworkDiagnostics { +namespace Commands { +static const std::unordered_map matter_command_id_cluster_map { + { "ResetCounts", ResetCounts::Id } +}; +} // namespace Commands +} // namespace EthernetNetworkDiagnostics +namespace TimeSynchronization { +namespace Commands { +static const std::unordered_map matter_command_id_cluster_map { + { "SetUtcTime", SetUtcTime::Id } +}; +} // namespace Commands +} // namespace TimeSynchronization +namespace BridgedDeviceBasic { +namespace Commands { +static const std::unordered_map matter_command_id_cluster_map { +}; +} // namespace Commands +} // namespace BridgedDeviceBasic +namespace Switch { +namespace Commands { +static const std::unordered_map matter_command_id_cluster_map { +}; +} // namespace Commands +} // namespace Switch +namespace AdministratorCommissioning { +namespace Commands { +static const std::unordered_map matter_command_id_cluster_map { + { "OpenCommissioningWindow", OpenCommissioningWindow::Id }, + { "OpenBasicCommissioningWindow", OpenBasicCommissioningWindow::Id }, + { "RevokeCommissioning", RevokeCommissioning::Id } +}; +} // namespace Commands +} // namespace AdministratorCommissioning +namespace OperationalCredentials { +namespace Commands { +static const std::unordered_map matter_command_id_cluster_map { + { "AttestationRequest", AttestationRequest::Id }, + { "AttestationResponse", AttestationResponse::Id }, + { "CertificateChainRequest", CertificateChainRequest::Id }, + { "CertificateChainResponse", CertificateChainResponse::Id }, + { "CSRRequest", CSRRequest::Id }, + { "CSRResponse", CSRResponse::Id }, + { "AddNOC", AddNOC::Id }, + { "UpdateNOC", UpdateNOC::Id }, + { "NOCResponse", NOCResponse::Id }, + { "UpdateFabricLabel", UpdateFabricLabel::Id }, + { "RemoveFabric", RemoveFabric::Id }, + { "AddTrustedRootCertificate", AddTrustedRootCertificate::Id } +}; +} // namespace Commands +} // namespace OperationalCredentials +namespace GroupKeyManagement { +namespace Commands { +static const std::unordered_map matter_command_id_cluster_map { + { "KeySetWrite", KeySetWrite::Id }, + { "KeySetRead", KeySetRead::Id }, + { "KeySetReadResponse", KeySetReadResponse::Id }, + { "KeySetRemove", KeySetRemove::Id }, + { "KeySetReadAllIndices", KeySetReadAllIndices::Id }, + { "KeySetReadAllIndicesResponse", KeySetReadAllIndicesResponse::Id } +}; +} // namespace Commands +} // namespace GroupKeyManagement +namespace FixedLabel { +namespace Commands { +static const std::unordered_map matter_command_id_cluster_map { +}; +} // namespace Commands +} // namespace FixedLabel +namespace UserLabel { +namespace Commands { +static const std::unordered_map matter_command_id_cluster_map { +}; +} // namespace Commands +} // namespace UserLabel +namespace ProxyConfiguration { +namespace Commands { +static const std::unordered_map matter_command_id_cluster_map { +}; +} // namespace Commands +} // namespace ProxyConfiguration +namespace ProxyDiscovery { +namespace Commands { +static const std::unordered_map matter_command_id_cluster_map { +}; +} // namespace Commands +} // namespace ProxyDiscovery +namespace ProxyValid { +namespace Commands { +static const std::unordered_map matter_command_id_cluster_map { +}; +} // namespace Commands +} // namespace ProxyValid +namespace BooleanState { +namespace Commands { +static const std::unordered_map matter_command_id_cluster_map { +}; +} // namespace Commands +} // namespace BooleanState +namespace ModeSelect { +namespace Commands { +static const std::unordered_map matter_command_id_cluster_map { + { "ChangeToMode", ChangeToMode::Id } +}; +} // namespace Commands +} // namespace ModeSelect +namespace DoorLock { +namespace Commands { +static const std::unordered_map matter_command_id_cluster_map { + { "LockDoor", LockDoor::Id }, + { "UnlockDoor", UnlockDoor::Id }, + { "UnlockWithTimeout", UnlockWithTimeout::Id }, + { "SetWeekDaySchedule", SetWeekDaySchedule::Id }, + { "GetWeekDaySchedule", GetWeekDaySchedule::Id }, + { "GetWeekDayScheduleResponse", GetWeekDayScheduleResponse::Id }, + { "ClearWeekDaySchedule", ClearWeekDaySchedule::Id }, + { "SetYearDaySchedule", SetYearDaySchedule::Id }, + { "GetYearDaySchedule", GetYearDaySchedule::Id }, + { "GetYearDayScheduleResponse", GetYearDayScheduleResponse::Id }, + { "ClearYearDaySchedule", ClearYearDaySchedule::Id }, + { "SetHolidaySchedule", SetHolidaySchedule::Id }, + { "GetHolidaySchedule", GetHolidaySchedule::Id }, + { "GetHolidayScheduleResponse", GetHolidayScheduleResponse::Id }, + { "ClearHolidaySchedule", ClearHolidaySchedule::Id }, + { "SetUser", SetUser::Id }, + { "GetUser", GetUser::Id }, + { "GetUserResponse", GetUserResponse::Id }, + { "ClearUser", ClearUser::Id }, + { "SetCredential", SetCredential::Id }, + { "SetCredentialResponse", SetCredentialResponse::Id }, + { "GetCredentialStatus", GetCredentialStatus::Id }, + { "GetCredentialStatusResponse", GetCredentialStatusResponse::Id }, + { "ClearCredential", ClearCredential::Id } +}; +} // namespace Commands +} // namespace DoorLock +namespace WindowCovering { +namespace Commands { +static const std::unordered_map matter_command_id_cluster_map { + { "UpOrOpen", UpOrOpen::Id }, + { "DownOrClose", DownOrClose::Id }, + { "StopMotion", StopMotion::Id }, + { "GoToLiftValue", GoToLiftValue::Id }, + { "GoToLiftPercentage", GoToLiftPercentage::Id }, + { "GoToTiltValue", GoToTiltValue::Id }, + { "GoToTiltPercentage", GoToTiltPercentage::Id } +}; +} // namespace Commands +} // namespace WindowCovering +namespace BarrierControl { +namespace Commands { +static const std::unordered_map matter_command_id_cluster_map { + { "BarrierControlGoToPercent", BarrierControlGoToPercent::Id }, + { "BarrierControlStop", BarrierControlStop::Id } +}; +} // namespace Commands +} // namespace BarrierControl +namespace PumpConfigurationAndControl { +namespace Commands { +static const std::unordered_map matter_command_id_cluster_map { +}; +} // namespace Commands +} // namespace PumpConfigurationAndControl +namespace Thermostat { +namespace Commands { +static const std::unordered_map matter_command_id_cluster_map { + { "SetpointRaiseLower", SetpointRaiseLower::Id }, + { "GetWeeklyScheduleResponse", GetWeeklyScheduleResponse::Id }, + { "SetWeeklySchedule", SetWeeklySchedule::Id }, + { "GetWeeklySchedule", GetWeeklySchedule::Id }, + { "ClearWeeklySchedule", ClearWeeklySchedule::Id } +}; +} // namespace Commands +} // namespace Thermostat +namespace FanControl { +namespace Commands { +static const std::unordered_map matter_command_id_cluster_map { +}; +} // namespace Commands +} // namespace FanControl +namespace ThermostatUserInterfaceConfiguration { +namespace Commands { +static const std::unordered_map matter_command_id_cluster_map { +}; +} // namespace Commands +} // namespace ThermostatUserInterfaceConfiguration +namespace ColorControl { +namespace Commands { +static const std::unordered_map matter_command_id_cluster_map { + { "MoveToHue", MoveToHue::Id }, + { "MoveHue", MoveHue::Id }, + { "StepHue", StepHue::Id }, + { "MoveToSaturation", MoveToSaturation::Id }, + { "MoveSaturation", MoveSaturation::Id }, + { "StepSaturation", StepSaturation::Id }, + { "MoveToHueAndSaturation", MoveToHueAndSaturation::Id }, + { "MoveToColor", MoveToColor::Id }, + { "MoveColor", MoveColor::Id }, + { "StepColor", StepColor::Id }, + { "MoveToColorTemperature", MoveToColorTemperature::Id }, + { "EnhancedMoveToHue", EnhancedMoveToHue::Id }, + { "EnhancedMoveHue", EnhancedMoveHue::Id }, + { "EnhancedStepHue", EnhancedStepHue::Id }, + { "EnhancedMoveToHueAndSaturation", EnhancedMoveToHueAndSaturation::Id }, + { "ColorLoopSet", ColorLoopSet::Id }, + { "StopMoveStep", StopMoveStep::Id }, + { "MoveColorTemperature", MoveColorTemperature::Id }, + { "StepColorTemperature", StepColorTemperature::Id } +}; +} // namespace Commands +} // namespace ColorControl +namespace BallastConfiguration { +namespace Commands { +static const std::unordered_map matter_command_id_cluster_map { +}; +} // namespace Commands +} // namespace BallastConfiguration +namespace IlluminanceMeasurement { +namespace Commands { +static const std::unordered_map matter_command_id_cluster_map { +}; +} // namespace Commands +} // namespace IlluminanceMeasurement +namespace TemperatureMeasurement { +namespace Commands { +static const std::unordered_map matter_command_id_cluster_map { +}; +} // namespace Commands +} // namespace TemperatureMeasurement +namespace PressureMeasurement { +namespace Commands { +static const std::unordered_map matter_command_id_cluster_map { +}; +} // namespace Commands +} // namespace PressureMeasurement +namespace FlowMeasurement { +namespace Commands { +static const std::unordered_map matter_command_id_cluster_map { +}; +} // namespace Commands +} // namespace FlowMeasurement +namespace RelativeHumidityMeasurement { +namespace Commands { +static const std::unordered_map matter_command_id_cluster_map { +}; +} // namespace Commands +} // namespace RelativeHumidityMeasurement +namespace OccupancySensing { +namespace Commands { +static const std::unordered_map matter_command_id_cluster_map { +}; +} // namespace Commands +} // namespace OccupancySensing +namespace WakeOnLan { +namespace Commands { +static const std::unordered_map matter_command_id_cluster_map { +}; +} // namespace Commands +} // namespace WakeOnLan +namespace Channel { +namespace Commands { +static const std::unordered_map matter_command_id_cluster_map { + { "ChangeChannel", ChangeChannel::Id }, + { "ChangeChannelResponse", ChangeChannelResponse::Id }, + { "ChangeChannelByNumber", ChangeChannelByNumber::Id }, + { "SkipChannel", SkipChannel::Id } +}; +} // namespace Commands +} // namespace Channel +namespace TargetNavigator { +namespace Commands { +static const std::unordered_map matter_command_id_cluster_map { + { "NavigateTarget", NavigateTarget::Id }, + { "NavigateTargetResponse", NavigateTargetResponse::Id } +}; +} // namespace Commands +} // namespace TargetNavigator +namespace MediaPlayback { +namespace Commands { +static const std::unordered_map matter_command_id_cluster_map { + { "Play", Play::Id }, + { "Pause", Pause::Id }, + { "StopPlayback", StopPlayback::Id }, + { "StartOver", StartOver::Id }, + { "Previous", Previous::Id }, + { "Next", Next::Id }, + { "Rewind", Rewind::Id }, + { "FastForward", FastForward::Id }, + { "SkipForward", SkipForward::Id }, + { "SkipBackward", SkipBackward::Id }, + { "PlaybackResponse", PlaybackResponse::Id }, + { "Seek", Seek::Id } +}; +} // namespace Commands +} // namespace MediaPlayback +namespace MediaInput { +namespace Commands { +static const std::unordered_map matter_command_id_cluster_map { + { "SelectInput", SelectInput::Id }, + { "ShowInputStatus", ShowInputStatus::Id }, + { "HideInputStatus", HideInputStatus::Id }, + { "RenameInput", RenameInput::Id } +}; +} // namespace Commands +} // namespace MediaInput +namespace LowPower { +namespace Commands { +static const std::unordered_map matter_command_id_cluster_map { + { "Sleep", Sleep::Id } +}; +} // namespace Commands +} // namespace LowPower +namespace KeypadInput { +namespace Commands { +static const std::unordered_map matter_command_id_cluster_map { + { "SendKey", SendKey::Id }, + { "SendKeyResponse", SendKeyResponse::Id } +}; +} // namespace Commands +} // namespace KeypadInput +namespace ContentLauncher { +namespace Commands { +static const std::unordered_map matter_command_id_cluster_map { + { "LaunchContent", LaunchContent::Id }, + { "LaunchURL", LaunchURL::Id }, + { "LaunchResponse", LaunchResponse::Id } +}; +} // namespace Commands +} // namespace ContentLauncher +namespace AudioOutput { +namespace Commands { +static const std::unordered_map matter_command_id_cluster_map { + { "SelectOutput", SelectOutput::Id }, + { "RenameOutput", RenameOutput::Id } +}; +} // namespace Commands +} // namespace AudioOutput +namespace ApplicationLauncher { +namespace Commands { +static const std::unordered_map matter_command_id_cluster_map { + { "LaunchApp", LaunchApp::Id }, + { "StopApp", StopApp::Id }, + { "HideApp", HideApp::Id }, + { "LauncherResponse", LauncherResponse::Id } +}; +} // namespace Commands +} // namespace ApplicationLauncher +namespace ApplicationBasic { +namespace Commands { +static const std::unordered_map matter_command_id_cluster_map { +}; +} // namespace Commands +} // namespace ApplicationBasic +namespace AccountLogin { +namespace Commands { +static const std::unordered_map matter_command_id_cluster_map { + { "GetSetupPIN", GetSetupPIN::Id }, + { "GetSetupPINResponse", GetSetupPINResponse::Id }, + { "Login", Login::Id }, + { "Logout", Logout::Id } +}; +} // namespace Commands +} // namespace AccountLogin +namespace ElectricalMeasurement { +namespace Commands { +static const std::unordered_map matter_command_id_cluster_map { + { "GetProfileInfoResponseCommand", GetProfileInfoResponseCommand::Id }, + { "GetProfileInfoCommand", GetProfileInfoCommand::Id }, + { "GetMeasurementProfileResponseCommand", GetMeasurementProfileResponseCommand::Id }, + { "GetMeasurementProfileCommand", GetMeasurementProfileCommand::Id } +}; +} // namespace Commands +} // namespace ElectricalMeasurement +namespace ClientMonitoring { +namespace Commands { +static const std::unordered_map matter_command_id_cluster_map { + { "RegisterClientMonitoring", RegisterClientMonitoring::Id }, + { "StayAwakeRequest", StayAwakeRequest::Id } +}; +} // namespace Commands +} // namespace ClientMonitoring +namespace UnitTesting { +namespace Commands { +static const std::unordered_map matter_command_id_cluster_map { + { "Test", Test::Id }, + { "TestSpecificResponse", TestSpecificResponse::Id }, + { "TestNotHandled", TestNotHandled::Id }, + { "TestAddArgumentsResponse", TestAddArgumentsResponse::Id }, + { "TestSpecific", TestSpecific::Id }, + { "TestSimpleArgumentResponse", TestSimpleArgumentResponse::Id }, + { "TestUnknownCommand", TestUnknownCommand::Id }, + { "TestStructArrayArgumentResponse", TestStructArrayArgumentResponse::Id }, + { "TestAddArguments", TestAddArguments::Id }, + { "TestListInt8UReverseResponse", TestListInt8UReverseResponse::Id }, + { "TestSimpleArgumentRequest", TestSimpleArgumentRequest::Id }, + { "TestEnumsResponse", TestEnumsResponse::Id }, + { "TestStructArrayArgumentRequest", TestStructArrayArgumentRequest::Id }, + { "TestNullableOptionalResponse", TestNullableOptionalResponse::Id }, + { "TestStructArgumentRequest", TestStructArgumentRequest::Id }, + { "TestComplexNullableOptionalResponse", TestComplexNullableOptionalResponse::Id }, + { "TestNestedStructArgumentRequest", TestNestedStructArgumentRequest::Id }, + { "BooleanResponse", BooleanResponse::Id }, + { "TestListStructArgumentRequest", TestListStructArgumentRequest::Id }, + { "SimpleStructResponse", SimpleStructResponse::Id }, + { "TestListInt8UArgumentRequest", TestListInt8UArgumentRequest::Id }, + { "TestEmitTestEventResponse", TestEmitTestEventResponse::Id }, + { "TestNestedStructListArgumentRequest", TestNestedStructListArgumentRequest::Id }, + { "TestEmitTestFabricScopedEventResponse", TestEmitTestFabricScopedEventResponse::Id }, + { "TestListNestedStructListArgumentRequest", TestListNestedStructListArgumentRequest::Id }, + { "TestListInt8UReverseRequest", TestListInt8UReverseRequest::Id }, + { "TestEnumsRequest", TestEnumsRequest::Id }, + { "TestNullableOptionalRequest", TestNullableOptionalRequest::Id }, + { "TestComplexNullableOptionalRequest", TestComplexNullableOptionalRequest::Id }, + { "SimpleStructEchoRequest", SimpleStructEchoRequest::Id }, + { "TimedInvokeRequest", TimedInvokeRequest::Id }, + { "TestSimpleOptionalArgumentRequest", TestSimpleOptionalArgumentRequest::Id }, + { "TestEmitTestEventRequest", TestEmitTestEventRequest::Id }, + { "TestEmitTestFabricScopedEventRequest", TestEmitTestFabricScopedEventRequest::Id } +}; +} // namespace Commands +} // namespace UnitTesting +namespace FaultInjection { +namespace Commands { +static const std::unordered_map matter_command_id_cluster_map { + { "FailAtFault", FailAtFault::Id }, + { "FailRandomlyAtFault", FailRandomlyAtFault::Id } +}; +} // namespace Commands +} // namespace FaultInjection - // Global map of each clusters commands - static const std::unordered_map> matter_command_id_map { - { "Identify", Identify::Commands::matter_command_id_cluster_map }, - { "Groups", Groups::Commands::matter_command_id_cluster_map }, - { "Scenes", Scenes::Commands::matter_command_id_cluster_map }, - { "OnOff", OnOff::Commands::matter_command_id_cluster_map }, - { "OnOffSwitchConfiguration", OnOffSwitchConfiguration::Commands::matter_command_id_cluster_map }, - { "LevelControl", LevelControl::Commands::matter_command_id_cluster_map }, - { "BinaryInputBasic", BinaryInputBasic::Commands::matter_command_id_cluster_map }, - { "PulseWidthModulation", PulseWidthModulation::Commands::matter_command_id_cluster_map }, - { "Descriptor", Descriptor::Commands::matter_command_id_cluster_map }, - { "Binding", Binding::Commands::matter_command_id_cluster_map }, - { "AccessControl", AccessControl::Commands::matter_command_id_cluster_map }, - { "Actions", Actions::Commands::matter_command_id_cluster_map }, - { "Basic", Basic::Commands::matter_command_id_cluster_map }, - { "OtaSoftwareUpdateProvider", OtaSoftwareUpdateProvider::Commands::matter_command_id_cluster_map }, - { "OtaSoftwareUpdateRequestor", OtaSoftwareUpdateRequestor::Commands::matter_command_id_cluster_map }, - { "LocalizationConfiguration", LocalizationConfiguration::Commands::matter_command_id_cluster_map }, - { "TimeFormatLocalization", TimeFormatLocalization::Commands::matter_command_id_cluster_map }, - { "UnitLocalization", UnitLocalization::Commands::matter_command_id_cluster_map }, - { "PowerSourceConfiguration", PowerSourceConfiguration::Commands::matter_command_id_cluster_map }, - { "PowerSource", PowerSource::Commands::matter_command_id_cluster_map }, - { "GeneralCommissioning", GeneralCommissioning::Commands::matter_command_id_cluster_map }, - { "NetworkCommissioning", NetworkCommissioning::Commands::matter_command_id_cluster_map }, - { "DiagnosticLogs", DiagnosticLogs::Commands::matter_command_id_cluster_map }, - { "GeneralDiagnostics", GeneralDiagnostics::Commands::matter_command_id_cluster_map }, - { "SoftwareDiagnostics", SoftwareDiagnostics::Commands::matter_command_id_cluster_map }, - { "ThreadNetworkDiagnostics", ThreadNetworkDiagnostics::Commands::matter_command_id_cluster_map }, - { "WiFiNetworkDiagnostics", WiFiNetworkDiagnostics::Commands::matter_command_id_cluster_map }, - { "EthernetNetworkDiagnostics", EthernetNetworkDiagnostics::Commands::matter_command_id_cluster_map }, - { "TimeSynchronization", TimeSynchronization::Commands::matter_command_id_cluster_map }, - { "BridgedDeviceBasic", BridgedDeviceBasic::Commands::matter_command_id_cluster_map }, - { "Switch", Switch::Commands::matter_command_id_cluster_map }, - { "AdministratorCommissioning", AdministratorCommissioning::Commands::matter_command_id_cluster_map }, - { "OperationalCredentials", OperationalCredentials::Commands::matter_command_id_cluster_map }, - { "GroupKeyManagement", GroupKeyManagement::Commands::matter_command_id_cluster_map }, - { "FixedLabel", FixedLabel::Commands::matter_command_id_cluster_map }, - { "UserLabel", UserLabel::Commands::matter_command_id_cluster_map }, - { "ProxyConfiguration", ProxyConfiguration::Commands::matter_command_id_cluster_map }, - { "ProxyDiscovery", ProxyDiscovery::Commands::matter_command_id_cluster_map }, - { "ProxyValid", ProxyValid::Commands::matter_command_id_cluster_map }, - { "BooleanState", BooleanState::Commands::matter_command_id_cluster_map }, - { "ModeSelect", ModeSelect::Commands::matter_command_id_cluster_map }, - { "DoorLock", DoorLock::Commands::matter_command_id_cluster_map }, - { "WindowCovering", WindowCovering::Commands::matter_command_id_cluster_map }, - { "BarrierControl", BarrierControl::Commands::matter_command_id_cluster_map }, - { "PumpConfigurationAndControl", PumpConfigurationAndControl::Commands::matter_command_id_cluster_map }, - { "Thermostat", Thermostat::Commands::matter_command_id_cluster_map }, - { "FanControl", FanControl::Commands::matter_command_id_cluster_map }, - { "ThermostatUserInterfaceConfiguration", ThermostatUserInterfaceConfiguration::Commands::matter_command_id_cluster_map }, - { "ColorControl", ColorControl::Commands::matter_command_id_cluster_map }, - { "BallastConfiguration", BallastConfiguration::Commands::matter_command_id_cluster_map }, - { "IlluminanceMeasurement", IlluminanceMeasurement::Commands::matter_command_id_cluster_map }, - { "TemperatureMeasurement", TemperatureMeasurement::Commands::matter_command_id_cluster_map }, - { "PressureMeasurement", PressureMeasurement::Commands::matter_command_id_cluster_map }, - { "FlowMeasurement", FlowMeasurement::Commands::matter_command_id_cluster_map }, - { "RelativeHumidityMeasurement", RelativeHumidityMeasurement::Commands::matter_command_id_cluster_map }, - { "OccupancySensing", OccupancySensing::Commands::matter_command_id_cluster_map }, - { "WakeOnLan", WakeOnLan::Commands::matter_command_id_cluster_map }, - { "Channel", Channel::Commands::matter_command_id_cluster_map }, - { "TargetNavigator", TargetNavigator::Commands::matter_command_id_cluster_map }, - { "MediaPlayback", MediaPlayback::Commands::matter_command_id_cluster_map }, - { "MediaInput", MediaInput::Commands::matter_command_id_cluster_map }, - { "LowPower", LowPower::Commands::matter_command_id_cluster_map }, - { "KeypadInput", KeypadInput::Commands::matter_command_id_cluster_map }, - { "ContentLauncher", ContentLauncher::Commands::matter_command_id_cluster_map }, - { "AudioOutput", AudioOutput::Commands::matter_command_id_cluster_map }, - { "ApplicationLauncher", ApplicationLauncher::Commands::matter_command_id_cluster_map }, - { "ApplicationBasic", ApplicationBasic::Commands::matter_command_id_cluster_map }, - { "AccountLogin", AccountLogin::Commands::matter_command_id_cluster_map }, - { "ElectricalMeasurement", ElectricalMeasurement::Commands::matter_command_id_cluster_map }, - { "ClientMonitoring", ClientMonitoring::Commands::matter_command_id_cluster_map }, - { "UnitTesting", UnitTesting::Commands::matter_command_id_cluster_map }, - { "FaultInjection", FaultInjection::Commands::matter_command_id_cluster_map } - }; +// Global map of each clusters commands +static const std::unordered_map> matter_command_id_map { + { "Identify", Identify::Commands::matter_command_id_cluster_map }, + { "Groups", Groups::Commands::matter_command_id_cluster_map }, + { "Scenes", Scenes::Commands::matter_command_id_cluster_map }, + { "OnOff", OnOff::Commands::matter_command_id_cluster_map }, + { "OnOffSwitchConfiguration", OnOffSwitchConfiguration::Commands::matter_command_id_cluster_map }, + { "LevelControl", LevelControl::Commands::matter_command_id_cluster_map }, + { "BinaryInputBasic", BinaryInputBasic::Commands::matter_command_id_cluster_map }, + { "PulseWidthModulation", PulseWidthModulation::Commands::matter_command_id_cluster_map }, + { "Descriptor", Descriptor::Commands::matter_command_id_cluster_map }, + { "Binding", Binding::Commands::matter_command_id_cluster_map }, + { "AccessControl", AccessControl::Commands::matter_command_id_cluster_map }, + { "Actions", Actions::Commands::matter_command_id_cluster_map }, + { "Basic", Basic::Commands::matter_command_id_cluster_map }, + { "OtaSoftwareUpdateProvider", OtaSoftwareUpdateProvider::Commands::matter_command_id_cluster_map }, + { "OtaSoftwareUpdateRequestor", OtaSoftwareUpdateRequestor::Commands::matter_command_id_cluster_map }, + { "LocalizationConfiguration", LocalizationConfiguration::Commands::matter_command_id_cluster_map }, + { "TimeFormatLocalization", TimeFormatLocalization::Commands::matter_command_id_cluster_map }, + { "UnitLocalization", UnitLocalization::Commands::matter_command_id_cluster_map }, + { "PowerSourceConfiguration", PowerSourceConfiguration::Commands::matter_command_id_cluster_map }, + { "PowerSource", PowerSource::Commands::matter_command_id_cluster_map }, + { "GeneralCommissioning", GeneralCommissioning::Commands::matter_command_id_cluster_map }, + { "NetworkCommissioning", NetworkCommissioning::Commands::matter_command_id_cluster_map }, + { "DiagnosticLogs", DiagnosticLogs::Commands::matter_command_id_cluster_map }, + { "GeneralDiagnostics", GeneralDiagnostics::Commands::matter_command_id_cluster_map }, + { "SoftwareDiagnostics", SoftwareDiagnostics::Commands::matter_command_id_cluster_map }, + { "ThreadNetworkDiagnostics", ThreadNetworkDiagnostics::Commands::matter_command_id_cluster_map }, + { "WiFiNetworkDiagnostics", WiFiNetworkDiagnostics::Commands::matter_command_id_cluster_map }, + { "EthernetNetworkDiagnostics", EthernetNetworkDiagnostics::Commands::matter_command_id_cluster_map }, + { "TimeSynchronization", TimeSynchronization::Commands::matter_command_id_cluster_map }, + { "BridgedDeviceBasic", BridgedDeviceBasic::Commands::matter_command_id_cluster_map }, + { "Switch", Switch::Commands::matter_command_id_cluster_map }, + { "AdministratorCommissioning", AdministratorCommissioning::Commands::matter_command_id_cluster_map }, + { "OperationalCredentials", OperationalCredentials::Commands::matter_command_id_cluster_map }, + { "GroupKeyManagement", GroupKeyManagement::Commands::matter_command_id_cluster_map }, + { "FixedLabel", FixedLabel::Commands::matter_command_id_cluster_map }, + { "UserLabel", UserLabel::Commands::matter_command_id_cluster_map }, + { "ProxyConfiguration", ProxyConfiguration::Commands::matter_command_id_cluster_map }, + { "ProxyDiscovery", ProxyDiscovery::Commands::matter_command_id_cluster_map }, + { "ProxyValid", ProxyValid::Commands::matter_command_id_cluster_map }, + { "BooleanState", BooleanState::Commands::matter_command_id_cluster_map }, + { "ModeSelect", ModeSelect::Commands::matter_command_id_cluster_map }, + { "DoorLock", DoorLock::Commands::matter_command_id_cluster_map }, + { "WindowCovering", WindowCovering::Commands::matter_command_id_cluster_map }, + { "BarrierControl", BarrierControl::Commands::matter_command_id_cluster_map }, + { "PumpConfigurationAndControl", PumpConfigurationAndControl::Commands::matter_command_id_cluster_map }, + { "Thermostat", Thermostat::Commands::matter_command_id_cluster_map }, + { "FanControl", FanControl::Commands::matter_command_id_cluster_map }, + { "ThermostatUserInterfaceConfiguration", ThermostatUserInterfaceConfiguration::Commands::matter_command_id_cluster_map }, + { "ColorControl", ColorControl::Commands::matter_command_id_cluster_map }, + { "BallastConfiguration", BallastConfiguration::Commands::matter_command_id_cluster_map }, + { "IlluminanceMeasurement", IlluminanceMeasurement::Commands::matter_command_id_cluster_map }, + { "TemperatureMeasurement", TemperatureMeasurement::Commands::matter_command_id_cluster_map }, + { "PressureMeasurement", PressureMeasurement::Commands::matter_command_id_cluster_map }, + { "FlowMeasurement", FlowMeasurement::Commands::matter_command_id_cluster_map }, + { "RelativeHumidityMeasurement", RelativeHumidityMeasurement::Commands::matter_command_id_cluster_map }, + { "OccupancySensing", OccupancySensing::Commands::matter_command_id_cluster_map }, + { "WakeOnLan", WakeOnLan::Commands::matter_command_id_cluster_map }, + { "Channel", Channel::Commands::matter_command_id_cluster_map }, + { "TargetNavigator", TargetNavigator::Commands::matter_command_id_cluster_map }, + { "MediaPlayback", MediaPlayback::Commands::matter_command_id_cluster_map }, + { "MediaInput", MediaInput::Commands::matter_command_id_cluster_map }, + { "LowPower", LowPower::Commands::matter_command_id_cluster_map }, + { "KeypadInput", KeypadInput::Commands::matter_command_id_cluster_map }, + { "ContentLauncher", ContentLauncher::Commands::matter_command_id_cluster_map }, + { "AudioOutput", AudioOutput::Commands::matter_command_id_cluster_map }, + { "ApplicationLauncher", ApplicationLauncher::Commands::matter_command_id_cluster_map }, + { "ApplicationBasic", ApplicationBasic::Commands::matter_command_id_cluster_map }, + { "AccountLogin", AccountLogin::Commands::matter_command_id_cluster_map }, + { "ElectricalMeasurement", ElectricalMeasurement::Commands::matter_command_id_cluster_map }, + { "ClientMonitoring", ClientMonitoring::Commands::matter_command_id_cluster_map }, + { "UnitTesting", UnitTesting::Commands::matter_command_id_cluster_map }, + { "FaultInjection", FaultInjection::Commands::matter_command_id_cluster_map } +}; - } // namespace Clusters +} // namespace Clusters } // namespace app } // namespace chip diff --git a/silabs_examples/unify-matter-bridge/linux/zap-generated/data_model_translator/unify_accessors.cpp b/silabs_examples/unify-matter-bridge/linux/zap-generated/data_model_translator/unify_accessors.cpp index 5a36cd2c07133f..4287b5d2aa4ad7 100644 --- a/silabs_examples/unify-matter-bridge/linux/zap-generated/data_model_translator/unify_accessors.cpp +++ b/silabs_examples/unify-matter-bridge/linux/zap-generated/data_model_translator/unify_accessors.cpp @@ -19,12255 +19,13777 @@ using namespace chip::app; namespace unify { namespace matter_bridge { - namespace Identify { - namespace Attributes { - - namespace IdentifyTime { - - 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; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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 IdentifyTime - - namespace IdentifyType { - - 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; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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 IdentifyType - - 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; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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 Identify - - namespace Groups { - namespace Attributes { - - namespace NameSupport { - - 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; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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 NameSupport - - 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; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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 Groups - - namespace Scenes { - namespace Attributes { - - namespace SceneCount { - - 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; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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 SceneCount - - namespace CurrentScene { - - 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; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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 CurrentScene - - namespace CurrentGroup { - - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::GroupId& value) - { - attribute_state_cache& cache = attribute_state_cache::get_instance(); - - using Traits = NumericAttributeTraits; - Traits::StorageType temp_storage; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::GroupId& 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 CurrentGroup - - namespace SceneValid { - - 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; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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 SceneValid - - namespace NameSupport { - - 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; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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 NameSupport - - namespace LastConfiguredBy { - - 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; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value.SetNonNull(tmp); - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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 LastConfiguredBy - - 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; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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 Scenes - - namespace OnOff { - namespace Attributes { - - namespace OnOff { - - 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; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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 OnOff - - namespace GlobalSceneControl { - - 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; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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 GlobalSceneControl - - namespace OnTime { - - 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; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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 OnTime - - namespace OffWaitTime { - - 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; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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 OffWaitTime - - namespace StartUpOnOff { - - 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; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value.SetNonNull(tmp); - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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 StartUpOnOff - - 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; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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 OnOff - - namespace LevelControl { - namespace Attributes { - - namespace CurrentLevel { - - 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; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value.SetNonNull(tmp); - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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 CurrentLevel - - namespace RemainingTime { - - 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; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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 RemainingTime - - namespace MinLevel { - - 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; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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 MinLevel - - namespace MaxLevel { - - 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; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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 MaxLevel - - namespace CurrentFrequency { - - 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; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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 CurrentFrequency - - namespace MinFrequency { - - 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; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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 MinFrequency - - namespace MaxFrequency { - - 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; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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 MaxFrequency - - namespace Options { - - 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; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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 Options - - namespace OnOffTransitionTime { - - 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; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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 OnOffTransitionTime - - namespace OnLevel { - - 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; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value.SetNonNull(tmp); - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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 OnLevel - - namespace OnTransitionTime { - - 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; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value.SetNonNull(tmp); - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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 OnTransitionTime - - namespace OffTransitionTime { - - 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; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value.SetNonNull(tmp); - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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 OffTransitionTime - - namespace DefaultMoveRate { - - 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; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value.SetNonNull(tmp); - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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 DefaultMoveRate - - namespace StartUpCurrentLevel { - - 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; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value.SetNonNull(tmp); - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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 StartUpCurrentLevel - - 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; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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 LevelControl - - 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; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value.SetNonNull(tmp); - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value.SetNonNull(tmp); - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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 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; - Traits::StorageType temp_storage; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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 BarrierMovingState - - namespace BarrierSafetyStatus { - - 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; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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 BarrierSafetyStatus - - namespace BarrierCapabilities { - - 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; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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 BarrierCapabilities - - namespace BarrierOpenEvents { - - 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; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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 BarrierOpenEvents - - namespace BarrierCloseEvents { - - 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; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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 BarrierCloseEvents - - namespace BarrierCommandOpenEvents { - - 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; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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 BarrierCommandOpenEvents - - namespace BarrierCommandCloseEvents { - - 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; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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 BarrierCommandCloseEvents - - namespace BarrierOpenPeriod { - - 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; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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 BarrierOpenPeriod - - namespace BarrierClosePeriod { - - 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; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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 BarrierClosePeriod - - namespace BarrierPosition { - - 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; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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 BarrierPosition - - 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; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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 BarrierControl - - 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(); - - using Traits = NumericAttributeTraits; - Traits::StorageType temp_storage; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value.SetNonNull(tmp); - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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 LocalTemperature - - namespace OutdoorTemperature { - - 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; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value.SetNonNull(tmp); - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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 OutdoorTemperature - - namespace Occupancy { - - 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; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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 Occupancy - - namespace AbsMinHeatSetpointLimit { - - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, int16_t& value) - { - attribute_state_cache& cache = attribute_state_cache::get_instance(); - - using Traits = NumericAttributeTraits; - Traits::StorageType temp_storage; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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; - Traits::WorkingToStorage(value, storageValue); - cache.set(endpoint, storageValue); - return EMBER_ZCL_STATUS_SUCCESS; - } - - } // namespace AbsMinHeatSetpointLimit - - namespace AbsMaxHeatSetpointLimit { - - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, int16_t& value) - { - attribute_state_cache& cache = attribute_state_cache::get_instance(); - - using Traits = NumericAttributeTraits; - Traits::StorageType temp_storage; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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; - Traits::WorkingToStorage(value, storageValue); - cache.set(endpoint, storageValue); - return EMBER_ZCL_STATUS_SUCCESS; - } - - } // namespace AbsMaxHeatSetpointLimit - - namespace AbsMinCoolSetpointLimit { - - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, int16_t& value) - { - attribute_state_cache& cache = attribute_state_cache::get_instance(); - - using Traits = NumericAttributeTraits; - Traits::StorageType temp_storage; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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; - Traits::WorkingToStorage(value, storageValue); - cache.set(endpoint, storageValue); - return EMBER_ZCL_STATUS_SUCCESS; - } - - } // namespace AbsMinCoolSetpointLimit - - namespace AbsMaxCoolSetpointLimit { - - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, int16_t& value) - { - attribute_state_cache& cache = attribute_state_cache::get_instance(); - - using Traits = NumericAttributeTraits; - Traits::StorageType temp_storage; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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; - Traits::WorkingToStorage(value, storageValue); - cache.set(endpoint, storageValue); - return EMBER_ZCL_STATUS_SUCCESS; - } - - } // namespace AbsMaxCoolSetpointLimit - - namespace PICoolingDemand { - - 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; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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 PICoolingDemand - - namespace PIHeatingDemand { - - 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; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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 PIHeatingDemand - - namespace HVACSystemTypeConfiguration { - - 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; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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 HVACSystemTypeConfiguration - - namespace LocalTemperatureCalibration { - - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, int8_t& value) - { - attribute_state_cache& cache = attribute_state_cache::get_instance(); - - using Traits = NumericAttributeTraits; - Traits::StorageType temp_storage; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const int8_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 LocalTemperatureCalibration - - namespace OccupiedCoolingSetpoint { - - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, int16_t& value) - { - attribute_state_cache& cache = attribute_state_cache::get_instance(); - - using Traits = NumericAttributeTraits; - Traits::StorageType temp_storage; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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; - Traits::WorkingToStorage(value, storageValue); - cache.set(endpoint, storageValue); - return EMBER_ZCL_STATUS_SUCCESS; - } - - } // namespace OccupiedCoolingSetpoint - - namespace OccupiedHeatingSetpoint { - - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, int16_t& value) - { - attribute_state_cache& cache = attribute_state_cache::get_instance(); - - using Traits = NumericAttributeTraits; - Traits::StorageType temp_storage; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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; - Traits::WorkingToStorage(value, storageValue); - cache.set(endpoint, storageValue); - return EMBER_ZCL_STATUS_SUCCESS; - } - - } // namespace OccupiedHeatingSetpoint - - namespace UnoccupiedCoolingSetpoint { - - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, int16_t& value) - { - attribute_state_cache& cache = attribute_state_cache::get_instance(); - - using Traits = NumericAttributeTraits; - Traits::StorageType temp_storage; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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; - Traits::WorkingToStorage(value, storageValue); - cache.set(endpoint, storageValue); - return EMBER_ZCL_STATUS_SUCCESS; - } - - } // namespace UnoccupiedCoolingSetpoint - - namespace UnoccupiedHeatingSetpoint { - - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, int16_t& value) - { - attribute_state_cache& cache = attribute_state_cache::get_instance(); - - using Traits = NumericAttributeTraits; - Traits::StorageType temp_storage; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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; - Traits::WorkingToStorage(value, storageValue); - cache.set(endpoint, storageValue); - return EMBER_ZCL_STATUS_SUCCESS; - } - - } // namespace UnoccupiedHeatingSetpoint - - namespace MinHeatSetpointLimit { - - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, int16_t& value) - { - attribute_state_cache& cache = attribute_state_cache::get_instance(); - - using Traits = NumericAttributeTraits; - Traits::StorageType temp_storage; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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; - Traits::WorkingToStorage(value, storageValue); - cache.set(endpoint, storageValue); - return EMBER_ZCL_STATUS_SUCCESS; - } - - } // namespace MinHeatSetpointLimit - - namespace MaxHeatSetpointLimit { - - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, int16_t& value) - { - attribute_state_cache& cache = attribute_state_cache::get_instance(); - - using Traits = NumericAttributeTraits; - Traits::StorageType temp_storage; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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; - Traits::WorkingToStorage(value, storageValue); - cache.set(endpoint, storageValue); - return EMBER_ZCL_STATUS_SUCCESS; - } - - } // namespace MaxHeatSetpointLimit - - namespace MinCoolSetpointLimit { - - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, int16_t& value) - { - attribute_state_cache& cache = attribute_state_cache::get_instance(); - - using Traits = NumericAttributeTraits; - Traits::StorageType temp_storage; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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; - Traits::WorkingToStorage(value, storageValue); - cache.set(endpoint, storageValue); - return EMBER_ZCL_STATUS_SUCCESS; - } - - } // namespace MinCoolSetpointLimit - - namespace MaxCoolSetpointLimit { - - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, int16_t& value) - { - attribute_state_cache& cache = attribute_state_cache::get_instance(); - - using Traits = NumericAttributeTraits; - Traits::StorageType temp_storage; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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; - Traits::WorkingToStorage(value, storageValue); - cache.set(endpoint, storageValue); - return EMBER_ZCL_STATUS_SUCCESS; - } - - } // namespace MaxCoolSetpointLimit - - namespace MinSetpointDeadBand { - - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, int8_t& value) - { - attribute_state_cache& cache = attribute_state_cache::get_instance(); - - using Traits = NumericAttributeTraits; - Traits::StorageType temp_storage; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const int8_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 MinSetpointDeadBand - - namespace RemoteSensing { - - 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; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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 RemoteSensing - - namespace ControlSequenceOfOperation { - - 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; - Traits::StorageType temp_storage; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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; - Traits::StorageType storageValue; - Traits::WorkingToStorage(value, storageValue); - cache.set(endpoint, storageValue); - return EMBER_ZCL_STATUS_SUCCESS; - } - - } // namespace ControlSequenceOfOperation - - namespace SystemMode { - - 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; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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 SystemMode - - namespace ThermostatRunningMode { - - 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; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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 ThermostatRunningMode - - namespace StartOfWeek { - - 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; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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 StartOfWeek - - namespace NumberOfWeeklyTransitions { - - 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; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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 NumberOfWeeklyTransitions - - namespace NumberOfDailyTransitions { - - 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; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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 NumberOfDailyTransitions - - namespace TemperatureSetpointHold { - - 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; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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 TemperatureSetpointHold - - namespace TemperatureSetpointHoldDuration { - - 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; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value.SetNonNull(tmp); - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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 TemperatureSetpointHoldDuration - - namespace ThermostatProgrammingOperationMode { - - 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; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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 ThermostatProgrammingOperationMode - - namespace ThermostatRunningState { - - 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; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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 ThermostatRunningState - - namespace SetpointChangeSource { - - 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; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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 SetpointChangeSource - - namespace SetpointChangeAmount { - - 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; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value.SetNonNull(tmp); - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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 SetpointChangeAmount - - namespace SetpointChangeSourceTimestamp { - - 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; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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 SetpointChangeSourceTimestamp - - namespace OccupiedSetback { - - 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; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value.SetNonNull(tmp); - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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 OccupiedSetback - - namespace OccupiedSetbackMin { - - 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; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value.SetNonNull(tmp); - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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 OccupiedSetbackMin - - namespace OccupiedSetbackMax { - - 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; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value.SetNonNull(tmp); - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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 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; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value.SetNonNull(tmp); - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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 UnoccupiedSetback - - namespace UnoccupiedSetbackMin { - - 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; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value.SetNonNull(tmp); - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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 UnoccupiedSetbackMin - - namespace UnoccupiedSetbackMax { - - 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; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value.SetNonNull(tmp); - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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 UnoccupiedSetbackMax - - namespace EmergencyHeatDelta { - - 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; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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 EmergencyHeatDelta - - namespace ACType { - - 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; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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 ACType - - namespace ACCapacity { - - 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; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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 ACCapacity - - namespace ACRefrigerantType { - - 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; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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 ACRefrigerantType - - namespace ACCompressorType { - - 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; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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 ACCompressorType - - namespace ACErrorCode { - - 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; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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 ACErrorCode - - namespace ACLouverPosition { - - 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; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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 ACLouverPosition - - 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; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value.SetNonNull(tmp); - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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) - { - attribute_state_cache& cache = attribute_state_cache::get_instance(); - - using Traits = NumericAttributeTraits; - Traits::StorageType temp_storage; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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 ACCapacityformat - - 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; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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 Thermostat - - namespace FanControl { - namespace Attributes { - - namespace FanMode { - - 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; - Traits::StorageType temp_storage; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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; - Traits::StorageType storageValue; - Traits::WorkingToStorage(value, storageValue); - cache.set(endpoint, storageValue); - return EMBER_ZCL_STATUS_SUCCESS; - } - - } // namespace FanMode - - namespace FanModeSequence { - - 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; - Traits::StorageType temp_storage; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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; - Traits::StorageType storageValue; - Traits::WorkingToStorage(value, storageValue); - cache.set(endpoint, storageValue); - return EMBER_ZCL_STATUS_SUCCESS; - } - - } // namespace FanModeSequence - - namespace PercentSetting { - - 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; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value.SetNonNull(tmp); - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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 PercentSetting - - namespace PercentCurrent { - - 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; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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 PercentCurrent - - namespace SpeedMax { - - 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; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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 SpeedMax - - namespace SpeedSetting { - - 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; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value.SetNonNull(tmp); - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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 SpeedSetting - - namespace SpeedCurrent { - - 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; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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 SpeedCurrent - - namespace RockSupport { - - 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; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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 RockSupport - - namespace RockSetting { - - 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; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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 RockSetting - - namespace WindSupport { - - 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; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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 WindSupport - - namespace WindSetting { - - 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; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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 WindSetting - - 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; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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 FanControl - - namespace ThermostatUserInterfaceConfiguration { - namespace Attributes { - - namespace TemperatureDisplayMode { - - 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; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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 TemperatureDisplayMode - - namespace KeypadLockout { - - 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; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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 KeypadLockout - - namespace ScheduleProgrammingVisibility { - - 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; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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 ScheduleProgrammingVisibility - - 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; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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 ThermostatUserInterfaceConfiguration - - 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(); - - using Traits = NumericAttributeTraits; - Traits::StorageType temp_storage; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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 CurrentHue - - namespace CurrentSaturation { - - 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; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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 CurrentSaturation - - namespace RemainingTime { - - 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; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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 RemainingTime - - namespace CurrentX { - - 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; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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 CurrentX - - namespace CurrentY { - - 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; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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 CurrentY - - namespace DriftCompensation { - - 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; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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 DriftCompensation - - namespace CompensationText { - - 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; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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 CompensationText - - namespace ColorTemperatureMireds { - - 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; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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 ColorTemperatureMireds - - namespace ColorMode { - - 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; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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 ColorMode - - namespace Options { - - 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; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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 Options - - namespace NumberOfPrimaries { - - 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; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value.SetNonNull(tmp); - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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 NumberOfPrimaries - - namespace Primary1X { - - 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; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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 Primary1X - - namespace Primary1Y { - - 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; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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 Primary1Y - - namespace Primary1Intensity { - - 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; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value.SetNonNull(tmp); - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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 Primary1Intensity - - namespace Primary2X { - - 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; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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 Primary2X - - namespace Primary2Y { - - 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; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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 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; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value.SetNonNull(tmp); - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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) - { - attribute_state_cache& cache = attribute_state_cache::get_instance(); - - using Traits = NumericAttributeTraits; - Traits::StorageType temp_storage; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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 Primary3X - - namespace Primary3Y { - - 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; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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 Primary3Y - - namespace Primary3Intensity { - - 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; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value.SetNonNull(tmp); - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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 Primary3Intensity - - namespace Primary4X { - - 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; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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 Primary4X - - namespace Primary4Y { - - 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; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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 Primary4Y - - namespace Primary4Intensity { - - 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; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value.SetNonNull(tmp); - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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 Primary5X - - namespace Primary5Y { - - 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; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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 Primary5Y - - namespace Primary5Intensity { - - 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; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value.SetNonNull(tmp); - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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 Primary5Intensity - - namespace Primary6X { - - 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; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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 Primary6X - - namespace Primary6Y { - - 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; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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 Primary6Y - - namespace Primary6Intensity { - - 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; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value.SetNonNull(tmp); - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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 Primary6Intensity - - namespace WhitePointX { - - 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; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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 WhitePointX - - namespace WhitePointY { - - 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; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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 WhitePointY - - namespace ColorPointRX { - - 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; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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 ColorPointRX - - namespace ColorPointRY { - - 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; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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 ColorPointRY - - namespace ColorPointRIntensity { - - 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; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value.SetNonNull(tmp); - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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 ColorPointRIntensity - - namespace ColorPointGX { - - 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; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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 ColorPointGX - - namespace ColorPointGY { - - 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; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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 ColorPointGY - - namespace ColorPointGIntensity { - - 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; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value.SetNonNull(tmp); - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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 ColorPointGIntensity - - namespace ColorPointBX { - - 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; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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 ColorPointBX - - namespace ColorPointBY { - - 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; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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 ColorPointBY - - namespace ColorPointBIntensity { - - 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; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value.SetNonNull(tmp); - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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 ColorPointBIntensity - - namespace EnhancedCurrentHue { - - 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; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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 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; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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 ColorLoopActive { - - 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; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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 ColorLoopActive - - namespace ColorLoopDirection { - - 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; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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 ColorLoopDirection - - namespace ColorLoopTime { - - 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; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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 ColorLoopTime - - namespace ColorLoopStartEnhancedHue { - - 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; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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 ColorLoopStartEnhancedHue - - namespace ColorLoopStoredEnhancedHue { - - 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; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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 ColorLoopStoredEnhancedHue - - namespace ColorCapabilities { - - 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; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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 ColorCapabilities - - namespace ColorTempPhysicalMinMireds { - - 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; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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 ColorTempPhysicalMinMireds - - namespace ColorTempPhysicalMaxMireds { - - 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; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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 ColorTempPhysicalMaxMireds - - namespace CoupleColorTempToLevelMinMireds { - - 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; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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 CoupleColorTempToLevelMinMireds - - namespace StartUpColorTemperatureMireds { - - 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; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value.SetNonNull(tmp); - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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 ColorControl - - namespace IlluminanceMeasurement { - namespace Attributes { - - namespace MeasuredValue { - - 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; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value.SetNonNull(tmp); - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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 MeasuredValue - - namespace MinMeasuredValue { - - 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; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value.SetNonNull(tmp); - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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 MinMeasuredValue - - namespace MaxMeasuredValue { - - 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; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value.SetNonNull(tmp); - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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 MaxMeasuredValue - - namespace Tolerance { - - 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; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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 Tolerance - - namespace LightSensorType { - - 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; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value.SetNonNull(tmp); - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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 LightSensorType - - 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; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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 IlluminanceMeasurement - - namespace TemperatureMeasurement { - namespace Attributes { - - namespace MeasuredValue { - - 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; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value.SetNonNull(tmp); - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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 MeasuredValue - - namespace MinMeasuredValue { - - 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; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value.SetNonNull(tmp); - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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 MinMeasuredValue - - namespace MaxMeasuredValue { - - 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; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value.SetNonNull(tmp); - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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 MaxMeasuredValue - - namespace Tolerance { - - 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; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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 Tolerance - - 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; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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 TemperatureMeasurement - - namespace PressureMeasurement { - namespace Attributes { - - namespace MeasuredValue { - - 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; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value.SetNonNull(tmp); - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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 MeasuredValue - - namespace MinMeasuredValue { - - 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; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value.SetNonNull(tmp); - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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 MinMeasuredValue - - namespace MaxMeasuredValue { - - 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; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value.SetNonNull(tmp); - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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 MaxMeasuredValue - - namespace Tolerance { - - 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; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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 Tolerance - - namespace ScaledValue { - - 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; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value.SetNonNull(tmp); - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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 ScaledValue - - namespace MinScaledValue { - - 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; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value.SetNonNull(tmp); - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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 MinScaledValue - - namespace MaxScaledValue { - - 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; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value.SetNonNull(tmp); - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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 MaxScaledValue - - namespace ScaledTolerance { - - 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; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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 ScaledTolerance - - namespace Scale { - - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, int8_t& value) - { - attribute_state_cache& cache = attribute_state_cache::get_instance(); - - using Traits = NumericAttributeTraits; - Traits::StorageType temp_storage; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const int8_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 Scale - - 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; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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 PressureMeasurement - - namespace RelativeHumidityMeasurement { - namespace Attributes { - - namespace MeasuredValue { - - 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; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value.SetNonNull(tmp); - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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 MeasuredValue - - namespace MinMeasuredValue { - - 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; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value.SetNonNull(tmp); - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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 MinMeasuredValue - - namespace MaxMeasuredValue { - - 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; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value.SetNonNull(tmp); - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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 MaxMeasuredValue - - namespace Tolerance { - - 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; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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 Tolerance - - 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; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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 RelativeHumidityMeasurement - - namespace OccupancySensing { - namespace Attributes { - - namespace Occupancy { - - 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; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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 Occupancy - - namespace OccupancySensorType { - - 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; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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 OccupancySensorType - - namespace OccupancySensorTypeBitmap { - - 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; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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 OccupancySensorTypeBitmap - - namespace PirOccupiedToUnoccupiedDelay { - - 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; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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 PirOccupiedToUnoccupiedDelay - - namespace PirUnoccupiedToOccupiedDelay { - - 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; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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 PirUnoccupiedToOccupiedDelay - - namespace PirUnoccupiedToOccupiedThreshold { - - 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; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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 PirUnoccupiedToOccupiedThreshold - - namespace UltrasonicOccupiedToUnoccupiedDelay { - - 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; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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 UltrasonicOccupiedToUnoccupiedDelay - - namespace UltrasonicUnoccupiedToOccupiedDelay { - - 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; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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 UltrasonicUnoccupiedToOccupiedDelay - - namespace UltrasonicUnoccupiedToOccupiedThreshold { - - 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; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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 UltrasonicUnoccupiedToOccupiedThreshold - - namespace PhysicalContactOccupiedToUnoccupiedDelay { - - 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; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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 PhysicalContactOccupiedToUnoccupiedDelay - - namespace PhysicalContactUnoccupiedToOccupiedDelay { - - 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; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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 PhysicalContactUnoccupiedToOccupiedDelay - - namespace PhysicalContactUnoccupiedToOccupiedThreshold { - - 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; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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 PhysicalContactUnoccupiedToOccupiedThreshold - - 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; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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 OccupancySensing - - namespace ElectricalMeasurement { - namespace Attributes { - - namespace MeasurementType { - - 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; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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 MeasurementType - - namespace DcVoltage { - - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, int16_t& value) - { - attribute_state_cache& cache = attribute_state_cache::get_instance(); - - using Traits = NumericAttributeTraits; - Traits::StorageType temp_storage; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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; - Traits::WorkingToStorage(value, storageValue); - cache.set(endpoint, storageValue); - return EMBER_ZCL_STATUS_SUCCESS; - } - - } // namespace DcVoltage - - namespace DcVoltageMin { - - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, int16_t& value) - { - attribute_state_cache& cache = attribute_state_cache::get_instance(); - - using Traits = NumericAttributeTraits; - Traits::StorageType temp_storage; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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; - Traits::WorkingToStorage(value, storageValue); - cache.set(endpoint, storageValue); - return EMBER_ZCL_STATUS_SUCCESS; - } - - } // namespace DcVoltageMin - - namespace DcVoltageMax { - - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, int16_t& value) - { - attribute_state_cache& cache = attribute_state_cache::get_instance(); - - using Traits = NumericAttributeTraits; - Traits::StorageType temp_storage; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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; - Traits::WorkingToStorage(value, storageValue); - cache.set(endpoint, storageValue); - return EMBER_ZCL_STATUS_SUCCESS; - } - - } // namespace DcVoltageMax - - namespace DcCurrent { - - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, int16_t& value) - { - attribute_state_cache& cache = attribute_state_cache::get_instance(); - - using Traits = NumericAttributeTraits; - Traits::StorageType temp_storage; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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; - Traits::WorkingToStorage(value, storageValue); - cache.set(endpoint, storageValue); - return EMBER_ZCL_STATUS_SUCCESS; - } - - } // namespace DcCurrent - - namespace DcCurrentMin { - - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, int16_t& value) - { - attribute_state_cache& cache = attribute_state_cache::get_instance(); - - using Traits = NumericAttributeTraits; - Traits::StorageType temp_storage; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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; - Traits::WorkingToStorage(value, storageValue); - cache.set(endpoint, storageValue); - return EMBER_ZCL_STATUS_SUCCESS; - } - - } // namespace DcCurrentMin - - namespace DcCurrentMax { - - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, int16_t& value) - { - attribute_state_cache& cache = attribute_state_cache::get_instance(); - - using Traits = NumericAttributeTraits; - Traits::StorageType temp_storage; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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; - Traits::WorkingToStorage(value, storageValue); - cache.set(endpoint, storageValue); - return EMBER_ZCL_STATUS_SUCCESS; - } - - } // namespace DcCurrentMax - - namespace DcPower { - - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, int16_t& value) - { - attribute_state_cache& cache = attribute_state_cache::get_instance(); - - using Traits = NumericAttributeTraits; - Traits::StorageType temp_storage; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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; - Traits::WorkingToStorage(value, storageValue); - cache.set(endpoint, storageValue); - return EMBER_ZCL_STATUS_SUCCESS; - } - - } // namespace DcPower - - namespace DcPowerMin { - - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, int16_t& value) - { - attribute_state_cache& cache = attribute_state_cache::get_instance(); - - using Traits = NumericAttributeTraits; - Traits::StorageType temp_storage; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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; - Traits::WorkingToStorage(value, storageValue); - cache.set(endpoint, storageValue); - return EMBER_ZCL_STATUS_SUCCESS; - } - - } // namespace DcPowerMin - - namespace DcPowerMax { - - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, int16_t& value) - { - attribute_state_cache& cache = attribute_state_cache::get_instance(); - - using Traits = NumericAttributeTraits; - Traits::StorageType temp_storage; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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; - Traits::WorkingToStorage(value, storageValue); - cache.set(endpoint, storageValue); - return EMBER_ZCL_STATUS_SUCCESS; - } - - } // namespace DcPowerMax - - namespace DcVoltageMultiplier { - - 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; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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 DcVoltageMultiplier - - namespace DcVoltageDivisor { - - 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; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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 DcVoltageDivisor - - namespace DcCurrentMultiplier { - - 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; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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 DcCurrentMultiplier - - namespace DcCurrentDivisor { - - 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; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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 DcCurrentDivisor - - namespace DcPowerMultiplier { - - 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; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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 DcPowerMultiplier - - namespace DcPowerDivisor { - - 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; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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 DcPowerDivisor - - namespace AcFrequency { - - 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; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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 AcFrequency - - namespace AcFrequencyMin { - - 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; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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 AcFrequencyMin - - namespace AcFrequencyMax { - - 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; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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 AcFrequencyMax - - namespace NeutralCurrent { - - 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; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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 NeutralCurrent - - namespace TotalActivePower { - - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, int32_t& value) - { - attribute_state_cache& cache = attribute_state_cache::get_instance(); - - using Traits = NumericAttributeTraits; - Traits::StorageType temp_storage; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const int32_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 TotalActivePower - - namespace TotalReactivePower { - - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, int32_t& value) - { - attribute_state_cache& cache = attribute_state_cache::get_instance(); - - using Traits = NumericAttributeTraits; - Traits::StorageType temp_storage; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const int32_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 TotalReactivePower - - namespace TotalApparentPower { - - 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; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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 TotalApparentPower - - namespace Measured1stHarmonicCurrent { - - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, int16_t& value) - { - attribute_state_cache& cache = attribute_state_cache::get_instance(); - - using Traits = NumericAttributeTraits; - Traits::StorageType temp_storage; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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; - Traits::WorkingToStorage(value, storageValue); - cache.set(endpoint, storageValue); - return EMBER_ZCL_STATUS_SUCCESS; - } - - } // namespace Measured1stHarmonicCurrent - - namespace Measured3rdHarmonicCurrent { - - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, int16_t& value) - { - attribute_state_cache& cache = attribute_state_cache::get_instance(); - - using Traits = NumericAttributeTraits; - Traits::StorageType temp_storage; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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; - Traits::WorkingToStorage(value, storageValue); - cache.set(endpoint, storageValue); - return EMBER_ZCL_STATUS_SUCCESS; - } - - } // namespace Measured3rdHarmonicCurrent - - namespace Measured5thHarmonicCurrent { - - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, int16_t& value) - { - attribute_state_cache& cache = attribute_state_cache::get_instance(); - - using Traits = NumericAttributeTraits; - Traits::StorageType temp_storage; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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; - Traits::WorkingToStorage(value, storageValue); - cache.set(endpoint, storageValue); - return EMBER_ZCL_STATUS_SUCCESS; - } - - } // namespace Measured5thHarmonicCurrent - - namespace Measured7thHarmonicCurrent { - - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, int16_t& value) - { - attribute_state_cache& cache = attribute_state_cache::get_instance(); - - using Traits = NumericAttributeTraits; - Traits::StorageType temp_storage; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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; - Traits::WorkingToStorage(value, storageValue); - cache.set(endpoint, storageValue); - return EMBER_ZCL_STATUS_SUCCESS; - } - - } // namespace Measured7thHarmonicCurrent - - namespace Measured9thHarmonicCurrent { - - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, int16_t& value) - { - attribute_state_cache& cache = attribute_state_cache::get_instance(); - - using Traits = NumericAttributeTraits; - Traits::StorageType temp_storage; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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; - Traits::WorkingToStorage(value, storageValue); - cache.set(endpoint, storageValue); - return EMBER_ZCL_STATUS_SUCCESS; - } - - } // namespace Measured9thHarmonicCurrent - - namespace Measured11thHarmonicCurrent { - - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, int16_t& value) - { - attribute_state_cache& cache = attribute_state_cache::get_instance(); - - using Traits = NumericAttributeTraits; - Traits::StorageType temp_storage; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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; - Traits::WorkingToStorage(value, storageValue); - cache.set(endpoint, storageValue); - return EMBER_ZCL_STATUS_SUCCESS; - } - - } // namespace Measured11thHarmonicCurrent - - namespace MeasuredPhase1stHarmonicCurrent { - - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, int16_t& value) - { - attribute_state_cache& cache = attribute_state_cache::get_instance(); - - using Traits = NumericAttributeTraits; - Traits::StorageType temp_storage; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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; - Traits::WorkingToStorage(value, storageValue); - cache.set(endpoint, storageValue); - return EMBER_ZCL_STATUS_SUCCESS; - } - - } // namespace MeasuredPhase1stHarmonicCurrent - - namespace MeasuredPhase3rdHarmonicCurrent { - - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, int16_t& value) - { - attribute_state_cache& cache = attribute_state_cache::get_instance(); - - using Traits = NumericAttributeTraits; - Traits::StorageType temp_storage; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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; - Traits::WorkingToStorage(value, storageValue); - cache.set(endpoint, storageValue); - return EMBER_ZCL_STATUS_SUCCESS; - } - - } // namespace MeasuredPhase3rdHarmonicCurrent - - namespace MeasuredPhase5thHarmonicCurrent { - - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, int16_t& value) - { - attribute_state_cache& cache = attribute_state_cache::get_instance(); - - using Traits = NumericAttributeTraits; - Traits::StorageType temp_storage; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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; - Traits::WorkingToStorage(value, storageValue); - cache.set(endpoint, storageValue); - return EMBER_ZCL_STATUS_SUCCESS; - } - - } // namespace MeasuredPhase5thHarmonicCurrent - - namespace MeasuredPhase7thHarmonicCurrent { - - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, int16_t& value) - { - attribute_state_cache& cache = attribute_state_cache::get_instance(); - - using Traits = NumericAttributeTraits; - Traits::StorageType temp_storage; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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; - Traits::WorkingToStorage(value, storageValue); - cache.set(endpoint, storageValue); - return EMBER_ZCL_STATUS_SUCCESS; - } - - } // namespace MeasuredPhase7thHarmonicCurrent - - namespace MeasuredPhase9thHarmonicCurrent { - - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, int16_t& value) - { - attribute_state_cache& cache = attribute_state_cache::get_instance(); - - using Traits = NumericAttributeTraits; - Traits::StorageType temp_storage; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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; - Traits::WorkingToStorage(value, storageValue); - cache.set(endpoint, storageValue); - return EMBER_ZCL_STATUS_SUCCESS; - } - - } // namespace MeasuredPhase9thHarmonicCurrent - - namespace MeasuredPhase11thHarmonicCurrent { - - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, int16_t& value) - { - attribute_state_cache& cache = attribute_state_cache::get_instance(); - - using Traits = NumericAttributeTraits; - Traits::StorageType temp_storage; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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; - Traits::WorkingToStorage(value, storageValue); - cache.set(endpoint, storageValue); - return EMBER_ZCL_STATUS_SUCCESS; - } - - } // namespace MeasuredPhase11thHarmonicCurrent - - namespace AcFrequencyMultiplier { - - 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; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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 AcFrequencyMultiplier - - namespace AcFrequencyDivisor { - - 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; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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 AcFrequencyDivisor - - namespace PowerMultiplier { - - 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; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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 PowerMultiplier - - namespace PowerDivisor { - - 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; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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 PowerDivisor - - namespace HarmonicCurrentMultiplier { - - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, int8_t& value) - { - attribute_state_cache& cache = attribute_state_cache::get_instance(); - - using Traits = NumericAttributeTraits; - Traits::StorageType temp_storage; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const int8_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 HarmonicCurrentMultiplier - - namespace PhaseHarmonicCurrentMultiplier { - - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, int8_t& value) - { - attribute_state_cache& cache = attribute_state_cache::get_instance(); - - using Traits = NumericAttributeTraits; - Traits::StorageType temp_storage; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const int8_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 PhaseHarmonicCurrentMultiplier - - namespace InstantaneousVoltage { - - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, int16_t& value) - { - attribute_state_cache& cache = attribute_state_cache::get_instance(); - - using Traits = NumericAttributeTraits; - Traits::StorageType temp_storage; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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; - Traits::WorkingToStorage(value, storageValue); - cache.set(endpoint, storageValue); - return EMBER_ZCL_STATUS_SUCCESS; - } - - } // namespace InstantaneousVoltage - - namespace InstantaneousLineCurrent { - - 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; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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 InstantaneousLineCurrent - - namespace InstantaneousActiveCurrent { - - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, int16_t& value) - { - attribute_state_cache& cache = attribute_state_cache::get_instance(); - - using Traits = NumericAttributeTraits; - Traits::StorageType temp_storage; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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; - Traits::WorkingToStorage(value, storageValue); - cache.set(endpoint, storageValue); - return EMBER_ZCL_STATUS_SUCCESS; - } - - } // namespace InstantaneousActiveCurrent - - namespace InstantaneousReactiveCurrent { - - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, int16_t& value) - { - attribute_state_cache& cache = attribute_state_cache::get_instance(); - - using Traits = NumericAttributeTraits; - Traits::StorageType temp_storage; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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; - Traits::WorkingToStorage(value, storageValue); - cache.set(endpoint, storageValue); - return EMBER_ZCL_STATUS_SUCCESS; - } - - } // namespace InstantaneousReactiveCurrent - - namespace InstantaneousPower { - - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, int16_t& value) - { - attribute_state_cache& cache = attribute_state_cache::get_instance(); - - using Traits = NumericAttributeTraits; - Traits::StorageType temp_storage; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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; - Traits::WorkingToStorage(value, storageValue); - cache.set(endpoint, storageValue); - return EMBER_ZCL_STATUS_SUCCESS; - } - - } // namespace InstantaneousPower - - namespace RmsVoltage { - - 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; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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 RmsVoltage - - namespace RmsVoltageMin { - - 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; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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 RmsVoltageMin - - namespace RmsVoltageMax { - - 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; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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 RmsVoltageMax - - namespace RmsCurrent { - - 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; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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 RmsCurrent - - namespace RmsCurrentMin { - - 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; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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 RmsCurrentMin - - namespace RmsCurrentMax { - - 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; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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 RmsCurrentMax - - namespace ActivePower { - - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, int16_t& value) - { - attribute_state_cache& cache = attribute_state_cache::get_instance(); - - using Traits = NumericAttributeTraits; - Traits::StorageType temp_storage; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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; - Traits::WorkingToStorage(value, storageValue); - cache.set(endpoint, storageValue); - return EMBER_ZCL_STATUS_SUCCESS; - } - - } // namespace ActivePower - - namespace ActivePowerMin { - - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, int16_t& value) - { - attribute_state_cache& cache = attribute_state_cache::get_instance(); - - using Traits = NumericAttributeTraits; - Traits::StorageType temp_storage; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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; - Traits::WorkingToStorage(value, storageValue); - cache.set(endpoint, storageValue); - return EMBER_ZCL_STATUS_SUCCESS; - } - - } // namespace ActivePowerMin - - namespace ActivePowerMax { - - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, int16_t& value) - { - attribute_state_cache& cache = attribute_state_cache::get_instance(); - - using Traits = NumericAttributeTraits; - Traits::StorageType temp_storage; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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; - Traits::WorkingToStorage(value, storageValue); - cache.set(endpoint, storageValue); - return EMBER_ZCL_STATUS_SUCCESS; - } - - } // namespace ActivePowerMax - - namespace ReactivePower { - - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, int16_t& value) - { - attribute_state_cache& cache = attribute_state_cache::get_instance(); - - using Traits = NumericAttributeTraits; - Traits::StorageType temp_storage; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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; - Traits::WorkingToStorage(value, storageValue); - cache.set(endpoint, storageValue); - return EMBER_ZCL_STATUS_SUCCESS; - } - - } // namespace ReactivePower - - namespace ApparentPower { - - 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; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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 ApparentPower - - namespace PowerFactor { - - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, int8_t& value) - { - attribute_state_cache& cache = attribute_state_cache::get_instance(); - - using Traits = NumericAttributeTraits; - Traits::StorageType temp_storage; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const int8_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 PowerFactor - - namespace AverageRmsVoltageMeasurementPeriod { - - 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; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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 AverageRmsVoltageMeasurementPeriod - - namespace AverageRmsUnderVoltageCounter { - - 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; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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 AverageRmsUnderVoltageCounter - - namespace RmsExtremeOverVoltagePeriod { - - 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; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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 RmsExtremeOverVoltagePeriod - - namespace RmsExtremeUnderVoltagePeriod { - - 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; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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 RmsExtremeUnderVoltagePeriod - - namespace RmsVoltageSagPeriod { - - 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; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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 RmsVoltageSagPeriod - - namespace RmsVoltageSwellPeriod { - - 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; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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 RmsVoltageSwellPeriod - - namespace AcVoltageMultiplier { - - 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; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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 AcVoltageMultiplier - - namespace AcVoltageDivisor { - - 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; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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 AcVoltageDivisor - - namespace AcCurrentMultiplier { - - 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; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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 AcCurrentMultiplier - - namespace AcCurrentDivisor { - - 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; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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 AcCurrentDivisor - - namespace AcPowerMultiplier { - - 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; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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 AcPowerMultiplier - - namespace AcPowerDivisor { - - 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; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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 AcPowerDivisor - - namespace OverloadAlarmsMask { - - 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; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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 OverloadAlarmsMask - - namespace VoltageOverload { - - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, int16_t& value) - { - attribute_state_cache& cache = attribute_state_cache::get_instance(); - - using Traits = NumericAttributeTraits; - Traits::StorageType temp_storage; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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; - Traits::WorkingToStorage(value, storageValue); - cache.set(endpoint, storageValue); - return EMBER_ZCL_STATUS_SUCCESS; - } - - } // namespace VoltageOverload - - namespace CurrentOverload { - - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, int16_t& value) - { - attribute_state_cache& cache = attribute_state_cache::get_instance(); - - using Traits = NumericAttributeTraits; - Traits::StorageType temp_storage; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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; - Traits::WorkingToStorage(value, storageValue); - cache.set(endpoint, storageValue); - return EMBER_ZCL_STATUS_SUCCESS; - } - - } // namespace CurrentOverload - - namespace AcOverloadAlarmsMask { - - 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; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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 AcOverloadAlarmsMask - - namespace AcVoltageOverload { - - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, int16_t& value) - { - attribute_state_cache& cache = attribute_state_cache::get_instance(); - - using Traits = NumericAttributeTraits; - Traits::StorageType temp_storage; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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; - Traits::WorkingToStorage(value, storageValue); - cache.set(endpoint, storageValue); - return EMBER_ZCL_STATUS_SUCCESS; - } - - } // namespace AcVoltageOverload - - namespace AcCurrentOverload { - - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, int16_t& value) - { - attribute_state_cache& cache = attribute_state_cache::get_instance(); - - using Traits = NumericAttributeTraits; - Traits::StorageType temp_storage; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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; - Traits::WorkingToStorage(value, storageValue); - cache.set(endpoint, storageValue); - return EMBER_ZCL_STATUS_SUCCESS; - } - - } // namespace AcCurrentOverload - - namespace AcActivePowerOverload { - - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, int16_t& value) - { - attribute_state_cache& cache = attribute_state_cache::get_instance(); - - using Traits = NumericAttributeTraits; - Traits::StorageType temp_storage; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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; - Traits::WorkingToStorage(value, storageValue); - cache.set(endpoint, storageValue); - return EMBER_ZCL_STATUS_SUCCESS; - } - - } // namespace AcActivePowerOverload - - namespace AcReactivePowerOverload { - - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, int16_t& value) - { - attribute_state_cache& cache = attribute_state_cache::get_instance(); - - using Traits = NumericAttributeTraits; - Traits::StorageType temp_storage; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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; - Traits::WorkingToStorage(value, storageValue); - cache.set(endpoint, storageValue); - return EMBER_ZCL_STATUS_SUCCESS; - } - - } // namespace AcReactivePowerOverload - - namespace AverageRmsOverVoltage { - - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, int16_t& value) - { - attribute_state_cache& cache = attribute_state_cache::get_instance(); - - using Traits = NumericAttributeTraits; - Traits::StorageType temp_storage; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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; - Traits::WorkingToStorage(value, storageValue); - cache.set(endpoint, storageValue); - return EMBER_ZCL_STATUS_SUCCESS; - } - - } // namespace AverageRmsOverVoltage - - namespace AverageRmsUnderVoltage { - - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, int16_t& value) - { - attribute_state_cache& cache = attribute_state_cache::get_instance(); - - using Traits = NumericAttributeTraits; - Traits::StorageType temp_storage; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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; - Traits::WorkingToStorage(value, storageValue); - cache.set(endpoint, storageValue); - return EMBER_ZCL_STATUS_SUCCESS; - } - - } // namespace AverageRmsUnderVoltage - - namespace RmsExtremeOverVoltage { - - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, int16_t& value) - { - attribute_state_cache& cache = attribute_state_cache::get_instance(); - - using Traits = NumericAttributeTraits; - Traits::StorageType temp_storage; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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; - Traits::WorkingToStorage(value, storageValue); - cache.set(endpoint, storageValue); - return EMBER_ZCL_STATUS_SUCCESS; - } - - } // namespace RmsExtremeOverVoltage - - namespace RmsExtremeUnderVoltage { - - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, int16_t& value) - { - attribute_state_cache& cache = attribute_state_cache::get_instance(); - - using Traits = NumericAttributeTraits; - Traits::StorageType temp_storage; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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; - Traits::WorkingToStorage(value, storageValue); - cache.set(endpoint, storageValue); - return EMBER_ZCL_STATUS_SUCCESS; - } - - } // namespace RmsExtremeUnderVoltage - - namespace RmsVoltageSag { - - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, int16_t& value) - { - attribute_state_cache& cache = attribute_state_cache::get_instance(); - - using Traits = NumericAttributeTraits; - Traits::StorageType temp_storage; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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; - Traits::WorkingToStorage(value, storageValue); - cache.set(endpoint, storageValue); - return EMBER_ZCL_STATUS_SUCCESS; - } - - } // namespace RmsVoltageSag - - namespace RmsVoltageSwell { - - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, int16_t& value) - { - attribute_state_cache& cache = attribute_state_cache::get_instance(); - - using Traits = NumericAttributeTraits; - Traits::StorageType temp_storage; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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; - Traits::WorkingToStorage(value, storageValue); - cache.set(endpoint, storageValue); - return EMBER_ZCL_STATUS_SUCCESS; - } - - } // namespace RmsVoltageSwell - - namespace LineCurrentPhaseB { - - 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; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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 LineCurrentPhaseB - - namespace ActiveCurrentPhaseB { - - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, int16_t& value) - { - attribute_state_cache& cache = attribute_state_cache::get_instance(); - - using Traits = NumericAttributeTraits; - Traits::StorageType temp_storage; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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; - Traits::WorkingToStorage(value, storageValue); - cache.set(endpoint, storageValue); - return EMBER_ZCL_STATUS_SUCCESS; - } - - } // namespace ActiveCurrentPhaseB - - namespace ReactiveCurrentPhaseB { - - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, int16_t& value) - { - attribute_state_cache& cache = attribute_state_cache::get_instance(); - - using Traits = NumericAttributeTraits; - Traits::StorageType temp_storage; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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; - Traits::WorkingToStorage(value, storageValue); - cache.set(endpoint, storageValue); - return EMBER_ZCL_STATUS_SUCCESS; - } - - } // namespace ReactiveCurrentPhaseB - - namespace RmsVoltagePhaseB { - - 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; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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 RmsVoltagePhaseB - - namespace RmsVoltageMinPhaseB { - - 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; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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 RmsVoltageMinPhaseB - - namespace RmsVoltageMaxPhaseB { - - 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; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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 RmsVoltageMaxPhaseB - - namespace RmsCurrentPhaseB { - - 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; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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 RmsCurrentPhaseB - - namespace RmsCurrentMinPhaseB { - - 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; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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 RmsCurrentMinPhaseB - - namespace RmsCurrentMaxPhaseB { - - 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; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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 RmsCurrentMaxPhaseB - - namespace ActivePowerPhaseB { - - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, int16_t& value) - { - attribute_state_cache& cache = attribute_state_cache::get_instance(); - - using Traits = NumericAttributeTraits; - Traits::StorageType temp_storage; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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; - Traits::WorkingToStorage(value, storageValue); - cache.set(endpoint, storageValue); - return EMBER_ZCL_STATUS_SUCCESS; - } - - } // namespace ActivePowerPhaseB - - namespace ActivePowerMinPhaseB { - - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, int16_t& value) - { - attribute_state_cache& cache = attribute_state_cache::get_instance(); - - using Traits = NumericAttributeTraits; - Traits::StorageType temp_storage; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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; - Traits::WorkingToStorage(value, storageValue); - cache.set(endpoint, storageValue); - return EMBER_ZCL_STATUS_SUCCESS; - } - - } // namespace ActivePowerMinPhaseB - - namespace ActivePowerMaxPhaseB { - - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, int16_t& value) - { - attribute_state_cache& cache = attribute_state_cache::get_instance(); - - using Traits = NumericAttributeTraits; - Traits::StorageType temp_storage; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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; - Traits::WorkingToStorage(value, storageValue); - cache.set(endpoint, storageValue); - return EMBER_ZCL_STATUS_SUCCESS; - } - - } // namespace ActivePowerMaxPhaseB - - namespace ReactivePowerPhaseB { - - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, int16_t& value) - { - attribute_state_cache& cache = attribute_state_cache::get_instance(); - - using Traits = NumericAttributeTraits; - Traits::StorageType temp_storage; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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; - Traits::WorkingToStorage(value, storageValue); - cache.set(endpoint, storageValue); - return EMBER_ZCL_STATUS_SUCCESS; - } - - } // namespace ReactivePowerPhaseB - - namespace ApparentPowerPhaseB { - - 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; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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 ApparentPowerPhaseB - - namespace PowerFactorPhaseB { - - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, int8_t& value) - { - attribute_state_cache& cache = attribute_state_cache::get_instance(); - - using Traits = NumericAttributeTraits; - Traits::StorageType temp_storage; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const int8_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 PowerFactorPhaseB - - namespace AverageRmsVoltageMeasurementPeriodPhaseB { - - 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; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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 AverageRmsVoltageMeasurementPeriodPhaseB - - namespace AverageRmsOverVoltageCounterPhaseB { - - 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; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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 AverageRmsOverVoltageCounterPhaseB - - namespace AverageRmsUnderVoltageCounterPhaseB { - - 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; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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 AverageRmsUnderVoltageCounterPhaseB - - namespace RmsExtremeOverVoltagePeriodPhaseB { - - 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; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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 RmsExtremeOverVoltagePeriodPhaseB - - namespace RmsExtremeUnderVoltagePeriodPhaseB { - - 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; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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 RmsExtremeUnderVoltagePeriodPhaseB - - namespace RmsVoltageSagPeriodPhaseB { - - 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; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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 RmsVoltageSagPeriodPhaseB - - namespace RmsVoltageSwellPeriodPhaseB { - - 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; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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 RmsVoltageSwellPeriodPhaseB - - namespace LineCurrentPhaseC { - - 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; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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 LineCurrentPhaseC - - namespace ActiveCurrentPhaseC { - - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, int16_t& value) - { - attribute_state_cache& cache = attribute_state_cache::get_instance(); - - using Traits = NumericAttributeTraits; - Traits::StorageType temp_storage; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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; - Traits::WorkingToStorage(value, storageValue); - cache.set(endpoint, storageValue); - return EMBER_ZCL_STATUS_SUCCESS; - } - - } // namespace ActiveCurrentPhaseC - - namespace ReactiveCurrentPhaseC { - - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, int16_t& value) - { - attribute_state_cache& cache = attribute_state_cache::get_instance(); - - using Traits = NumericAttributeTraits; - Traits::StorageType temp_storage; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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; - Traits::WorkingToStorage(value, storageValue); - cache.set(endpoint, storageValue); - return EMBER_ZCL_STATUS_SUCCESS; - } - - } // namespace ReactiveCurrentPhaseC - - namespace RmsVoltagePhaseC { - - 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; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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 RmsVoltagePhaseC - - namespace RmsVoltageMinPhaseC { - - 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; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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 RmsVoltageMinPhaseC - - namespace RmsVoltageMaxPhaseC { - - 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; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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 RmsVoltageMaxPhaseC - - namespace RmsCurrentPhaseC { - - 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; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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 RmsCurrentPhaseC - - namespace RmsCurrentMinPhaseC { - - 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; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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 RmsCurrentMinPhaseC - - namespace RmsCurrentMaxPhaseC { - - 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; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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 RmsCurrentMaxPhaseC - - namespace ActivePowerPhaseC { - - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, int16_t& value) - { - attribute_state_cache& cache = attribute_state_cache::get_instance(); - - using Traits = NumericAttributeTraits; - Traits::StorageType temp_storage; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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; - Traits::WorkingToStorage(value, storageValue); - cache.set(endpoint, storageValue); - return EMBER_ZCL_STATUS_SUCCESS; - } - - } // namespace ActivePowerPhaseC - - namespace ActivePowerMinPhaseC { - - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, int16_t& value) - { - attribute_state_cache& cache = attribute_state_cache::get_instance(); - - using Traits = NumericAttributeTraits; - Traits::StorageType temp_storage; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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; - Traits::WorkingToStorage(value, storageValue); - cache.set(endpoint, storageValue); - return EMBER_ZCL_STATUS_SUCCESS; - } - - } // namespace ActivePowerMinPhaseC - - namespace ActivePowerMaxPhaseC { - - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, int16_t& value) - { - attribute_state_cache& cache = attribute_state_cache::get_instance(); - - using Traits = NumericAttributeTraits; - Traits::StorageType temp_storage; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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; - Traits::WorkingToStorage(value, storageValue); - cache.set(endpoint, storageValue); - return EMBER_ZCL_STATUS_SUCCESS; - } - - } // namespace ActivePowerMaxPhaseC - - namespace ReactivePowerPhaseC { - - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, int16_t& value) - { - attribute_state_cache& cache = attribute_state_cache::get_instance(); - - using Traits = NumericAttributeTraits; - Traits::StorageType temp_storage; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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; - Traits::WorkingToStorage(value, storageValue); - cache.set(endpoint, storageValue); - return EMBER_ZCL_STATUS_SUCCESS; - } - - } // namespace ReactivePowerPhaseC - - namespace ApparentPowerPhaseC { - - 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; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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 ApparentPowerPhaseC - - namespace PowerFactorPhaseC { - - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, int8_t& value) - { - attribute_state_cache& cache = attribute_state_cache::get_instance(); - - using Traits = NumericAttributeTraits; - Traits::StorageType temp_storage; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const int8_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 PowerFactorPhaseC - - namespace AverageRmsVoltageMeasurementPeriodPhaseC { - - 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; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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 AverageRmsVoltageMeasurementPeriodPhaseC - - namespace AverageRmsOverVoltageCounterPhaseC { - - 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; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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 AverageRmsOverVoltageCounterPhaseC - - namespace AverageRmsUnderVoltageCounterPhaseC { - - 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; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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 AverageRmsUnderVoltageCounterPhaseC - - namespace RmsExtremeOverVoltagePeriodPhaseC { - - 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; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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 RmsExtremeOverVoltagePeriodPhaseC - - namespace RmsExtremeUnderVoltagePeriodPhaseC { - - 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; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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 RmsExtremeUnderVoltagePeriodPhaseC - - namespace RmsVoltageSagPeriodPhaseC { - - 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; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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 RmsVoltageSagPeriodPhaseC - - namespace RmsVoltageSwellPeriodPhaseC { - - 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; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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 RmsVoltageSwellPeriodPhaseC - - 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; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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; - - if (cache.get(endpoint, temp_storage)) { - auto tmp = Traits::StorageToWorking(temp_storage); - - value = tmp; - return EMBER_ZCL_STATUS_SUCCESS; - } else { - return EMBER_ZCL_STATUS_FAILURE; - } - } - - 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 ElectricalMeasurement - -} // namespace matter_bridge -} // namespace unify +namespace Identify { +namespace Attributes { + +namespace IdentifyTime { + + + + + +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; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value = tmp; + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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 IdentifyTime + +namespace IdentifyType { + + + + + +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; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value = tmp; + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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 IdentifyType + +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; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value = tmp; + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value = tmp; + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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 +} // Identify + +namespace Groups { +namespace Attributes { + +namespace NameSupport { + + + + + +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; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value = tmp; + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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 NameSupport + +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; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value = tmp; + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value = tmp; + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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 +} // Groups + +namespace Scenes { +namespace Attributes { + +namespace SceneCount { + + + + + +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; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value = tmp; + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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 SceneCount + +namespace CurrentScene { + + + + + +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; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value = tmp; + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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 CurrentScene + +namespace CurrentGroup { + + + + + +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::GroupId& value) +{ + attribute_state_cache& cache = attribute_state_cache::get_instance(); + + using Traits = NumericAttributeTraits; + Traits::StorageType temp_storage; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value = tmp; + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::GroupId& 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 CurrentGroup + +namespace SceneValid { + + + + + +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; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value = tmp; + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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 SceneValid + +namespace NameSupport { + + + + + +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; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value = tmp; + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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 NameSupport + +namespace LastConfiguredBy { + + + + + +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; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value.SetNonNull(tmp); + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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 LastConfiguredBy + +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; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value = tmp; + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value = tmp; + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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 +} // Scenes + +namespace OnOff { +namespace Attributes { + +namespace OnOff { + + + + + +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; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value = tmp; + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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 OnOff + +namespace GlobalSceneControl { + + + + + +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; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value = tmp; + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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 GlobalSceneControl + +namespace OnTime { + + + + + +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; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value = tmp; + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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 OnTime + +namespace OffWaitTime { + + + + + +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; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value = tmp; + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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 OffWaitTime + +namespace StartUpOnOff { + + + + + +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; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value.SetNonNull(tmp); + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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 StartUpOnOff + +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; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value = tmp; + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value = tmp; + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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 +} // OnOff + +namespace LevelControl { +namespace Attributes { + +namespace CurrentLevel { + + + + + +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; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value.SetNonNull(tmp); + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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 CurrentLevel + +namespace RemainingTime { + + + + + +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; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value = tmp; + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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 RemainingTime + +namespace MinLevel { + + + + + +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; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value = tmp; + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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 MinLevel + +namespace MaxLevel { + + + + + +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; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value = tmp; + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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 MaxLevel + +namespace CurrentFrequency { + + + + + +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; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value = tmp; + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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 CurrentFrequency + +namespace MinFrequency { + + + + + +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; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value = tmp; + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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 MinFrequency + +namespace MaxFrequency { + + + + + +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; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value = tmp; + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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 MaxFrequency + +namespace Options { + + + + + +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; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value = tmp; + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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 Options + +namespace OnOffTransitionTime { + + + + + +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; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value = tmp; + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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 OnOffTransitionTime + +namespace OnLevel { + + + + + +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; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value.SetNonNull(tmp); + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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 OnLevel + +namespace OnTransitionTime { + + + + + +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; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value.SetNonNull(tmp); + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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 OnTransitionTime + +namespace OffTransitionTime { + + + + + +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; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value.SetNonNull(tmp); + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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 OffTransitionTime + +namespace DefaultMoveRate { + + + + + +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; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value.SetNonNull(tmp); + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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 DefaultMoveRate + +namespace StartUpCurrentLevel { + + + + + +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; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value.SetNonNull(tmp); + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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 StartUpCurrentLevel + +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; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value = tmp; + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value = tmp; + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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 +} // LevelControl + +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; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value.SetNonNull(tmp); + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value = tmp; + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value = tmp; + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value.SetNonNull(tmp); + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value = tmp; + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value = tmp; + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value = tmp; + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value = tmp; + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value = tmp; + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value = tmp; + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value = tmp; + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value = tmp; + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value = tmp; + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value = tmp; + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value = tmp; + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value = tmp; + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value = tmp; + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value = tmp; + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value = tmp; + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value = tmp; + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value = tmp; + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value = tmp; + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value = tmp; + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value = tmp; + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value = tmp; + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value = tmp; + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value = tmp; + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value = tmp; + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value = tmp; + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value = tmp; + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value = tmp; + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value = tmp; + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value = tmp; + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value = tmp; + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value = tmp; + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value = tmp; + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value = tmp; + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value = tmp; + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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 +} // DoorLock + +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; + Traits::StorageType temp_storage; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value = tmp; + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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 BarrierMovingState + +namespace BarrierSafetyStatus { + + + + + +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; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value = tmp; + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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 BarrierSafetyStatus + +namespace BarrierCapabilities { + + + + + +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; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value = tmp; + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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 BarrierCapabilities + +namespace BarrierOpenEvents { + + + + + +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; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value = tmp; + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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 BarrierOpenEvents + +namespace BarrierCloseEvents { + + + + + +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; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value = tmp; + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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 BarrierCloseEvents + +namespace BarrierCommandOpenEvents { + + + + + +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; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value = tmp; + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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 BarrierCommandOpenEvents + +namespace BarrierCommandCloseEvents { + + + + + +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; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value = tmp; + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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 BarrierCommandCloseEvents + +namespace BarrierOpenPeriod { + + + + + +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; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value = tmp; + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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 BarrierOpenPeriod + +namespace BarrierClosePeriod { + + + + + +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; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value = tmp; + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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 BarrierClosePeriod + +namespace BarrierPosition { + + + + + +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; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value = tmp; + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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 BarrierPosition + +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; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value = tmp; + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value = tmp; + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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 +} // BarrierControl + +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(); + + using Traits = NumericAttributeTraits; + Traits::StorageType temp_storage; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value.SetNonNull(tmp); + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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 LocalTemperature + +namespace OutdoorTemperature { + + + + + +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; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value.SetNonNull(tmp); + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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 OutdoorTemperature + +namespace Occupancy { + + + + + +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; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value = tmp; + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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 Occupancy + +namespace AbsMinHeatSetpointLimit { + + + + + +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, int16_t& value) +{ + attribute_state_cache& cache = attribute_state_cache::get_instance(); + + using Traits = NumericAttributeTraits; + Traits::StorageType temp_storage; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value = tmp; + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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; + Traits::WorkingToStorage(value, storageValue); + cache.set(endpoint,storageValue); + return EMBER_ZCL_STATUS_SUCCESS; +} + + +} // namespace AbsMinHeatSetpointLimit + +namespace AbsMaxHeatSetpointLimit { + + + + + +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, int16_t& value) +{ + attribute_state_cache& cache = attribute_state_cache::get_instance(); + + using Traits = NumericAttributeTraits; + Traits::StorageType temp_storage; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value = tmp; + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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; + Traits::WorkingToStorage(value, storageValue); + cache.set(endpoint,storageValue); + return EMBER_ZCL_STATUS_SUCCESS; +} + + +} // namespace AbsMaxHeatSetpointLimit + +namespace AbsMinCoolSetpointLimit { + + + + + +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, int16_t& value) +{ + attribute_state_cache& cache = attribute_state_cache::get_instance(); + + using Traits = NumericAttributeTraits; + Traits::StorageType temp_storage; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value = tmp; + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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; + Traits::WorkingToStorage(value, storageValue); + cache.set(endpoint,storageValue); + return EMBER_ZCL_STATUS_SUCCESS; +} + + +} // namespace AbsMinCoolSetpointLimit + +namespace AbsMaxCoolSetpointLimit { + + + + + +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, int16_t& value) +{ + attribute_state_cache& cache = attribute_state_cache::get_instance(); + + using Traits = NumericAttributeTraits; + Traits::StorageType temp_storage; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value = tmp; + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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; + Traits::WorkingToStorage(value, storageValue); + cache.set(endpoint,storageValue); + return EMBER_ZCL_STATUS_SUCCESS; +} + + +} // namespace AbsMaxCoolSetpointLimit + +namespace PICoolingDemand { + + + + + +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; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value = tmp; + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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 PICoolingDemand + +namespace PIHeatingDemand { + + + + + +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; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value = tmp; + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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 PIHeatingDemand + +namespace HVACSystemTypeConfiguration { + + + + + +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; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value = tmp; + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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 HVACSystemTypeConfiguration + +namespace LocalTemperatureCalibration { + + + + + +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, int8_t& value) +{ + attribute_state_cache& cache = attribute_state_cache::get_instance(); + + using Traits = NumericAttributeTraits; + Traits::StorageType temp_storage; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value = tmp; + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const int8_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 LocalTemperatureCalibration + +namespace OccupiedCoolingSetpoint { + + + + + +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, int16_t& value) +{ + attribute_state_cache& cache = attribute_state_cache::get_instance(); + + using Traits = NumericAttributeTraits; + Traits::StorageType temp_storage; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value = tmp; + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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; + Traits::WorkingToStorage(value, storageValue); + cache.set(endpoint,storageValue); + return EMBER_ZCL_STATUS_SUCCESS; +} + + +} // namespace OccupiedCoolingSetpoint + +namespace OccupiedHeatingSetpoint { + + + + + +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, int16_t& value) +{ + attribute_state_cache& cache = attribute_state_cache::get_instance(); + + using Traits = NumericAttributeTraits; + Traits::StorageType temp_storage; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value = tmp; + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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; + Traits::WorkingToStorage(value, storageValue); + cache.set(endpoint,storageValue); + return EMBER_ZCL_STATUS_SUCCESS; +} + + +} // namespace OccupiedHeatingSetpoint + +namespace UnoccupiedCoolingSetpoint { + + + + + +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, int16_t& value) +{ + attribute_state_cache& cache = attribute_state_cache::get_instance(); + + using Traits = NumericAttributeTraits; + Traits::StorageType temp_storage; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value = tmp; + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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; + Traits::WorkingToStorage(value, storageValue); + cache.set(endpoint,storageValue); + return EMBER_ZCL_STATUS_SUCCESS; +} + + +} // namespace UnoccupiedCoolingSetpoint + +namespace UnoccupiedHeatingSetpoint { + + + + + +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, int16_t& value) +{ + attribute_state_cache& cache = attribute_state_cache::get_instance(); + + using Traits = NumericAttributeTraits; + Traits::StorageType temp_storage; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value = tmp; + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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; + Traits::WorkingToStorage(value, storageValue); + cache.set(endpoint,storageValue); + return EMBER_ZCL_STATUS_SUCCESS; +} + + +} // namespace UnoccupiedHeatingSetpoint + +namespace MinHeatSetpointLimit { + + + + + +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, int16_t& value) +{ + attribute_state_cache& cache = attribute_state_cache::get_instance(); + + using Traits = NumericAttributeTraits; + Traits::StorageType temp_storage; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value = tmp; + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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; + Traits::WorkingToStorage(value, storageValue); + cache.set(endpoint,storageValue); + return EMBER_ZCL_STATUS_SUCCESS; +} + + +} // namespace MinHeatSetpointLimit + +namespace MaxHeatSetpointLimit { + + + + + +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, int16_t& value) +{ + attribute_state_cache& cache = attribute_state_cache::get_instance(); + + using Traits = NumericAttributeTraits; + Traits::StorageType temp_storage; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value = tmp; + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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; + Traits::WorkingToStorage(value, storageValue); + cache.set(endpoint,storageValue); + return EMBER_ZCL_STATUS_SUCCESS; +} + + +} // namespace MaxHeatSetpointLimit + +namespace MinCoolSetpointLimit { + + + + + +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, int16_t& value) +{ + attribute_state_cache& cache = attribute_state_cache::get_instance(); + + using Traits = NumericAttributeTraits; + Traits::StorageType temp_storage; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value = tmp; + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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; + Traits::WorkingToStorage(value, storageValue); + cache.set(endpoint,storageValue); + return EMBER_ZCL_STATUS_SUCCESS; +} + + +} // namespace MinCoolSetpointLimit + +namespace MaxCoolSetpointLimit { + + + + + +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, int16_t& value) +{ + attribute_state_cache& cache = attribute_state_cache::get_instance(); + + using Traits = NumericAttributeTraits; + Traits::StorageType temp_storage; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value = tmp; + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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; + Traits::WorkingToStorage(value, storageValue); + cache.set(endpoint,storageValue); + return EMBER_ZCL_STATUS_SUCCESS; +} + + +} // namespace MaxCoolSetpointLimit + +namespace MinSetpointDeadBand { + + + + + +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, int8_t& value) +{ + attribute_state_cache& cache = attribute_state_cache::get_instance(); + + using Traits = NumericAttributeTraits; + Traits::StorageType temp_storage; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value = tmp; + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const int8_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 MinSetpointDeadBand + +namespace RemoteSensing { + + + + + +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; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value = tmp; + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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 RemoteSensing + +namespace ControlSequenceOfOperation { + + + + + +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; + Traits::StorageType temp_storage; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value = tmp; + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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; + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + cache.set(endpoint,storageValue); + return EMBER_ZCL_STATUS_SUCCESS; +} + + +} // namespace ControlSequenceOfOperation + +namespace SystemMode { + + + + + +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; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value = tmp; + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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 SystemMode + +namespace ThermostatRunningMode { + + + + + +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; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value = tmp; + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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 ThermostatRunningMode + +namespace StartOfWeek { + + + + + +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; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value = tmp; + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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 StartOfWeek + +namespace NumberOfWeeklyTransitions { + + + + + +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; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value = tmp; + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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 NumberOfWeeklyTransitions + +namespace NumberOfDailyTransitions { + + + + + +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; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value = tmp; + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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 NumberOfDailyTransitions + +namespace TemperatureSetpointHold { + + + + + +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; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value = tmp; + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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 TemperatureSetpointHold + +namespace TemperatureSetpointHoldDuration { + + + + + +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; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value.SetNonNull(tmp); + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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 TemperatureSetpointHoldDuration + +namespace ThermostatProgrammingOperationMode { + + + + + +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; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value = tmp; + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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 ThermostatProgrammingOperationMode + +namespace ThermostatRunningState { + + + + + +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; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value = tmp; + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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 ThermostatRunningState + +namespace SetpointChangeSource { + + + + + +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; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value = tmp; + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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 SetpointChangeSource + +namespace SetpointChangeAmount { + + + + + +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; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value.SetNonNull(tmp); + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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 SetpointChangeAmount + +namespace SetpointChangeSourceTimestamp { + + + + + +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; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value = tmp; + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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 SetpointChangeSourceTimestamp + +namespace OccupiedSetback { + + + + + +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; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value.SetNonNull(tmp); + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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 OccupiedSetback + +namespace OccupiedSetbackMin { + + + + + +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; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value.SetNonNull(tmp); + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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 OccupiedSetbackMin + +namespace OccupiedSetbackMax { + + + + + +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; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value.SetNonNull(tmp); + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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 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; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value.SetNonNull(tmp); + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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 UnoccupiedSetback + +namespace UnoccupiedSetbackMin { + + + + + +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; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value.SetNonNull(tmp); + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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 UnoccupiedSetbackMin + +namespace UnoccupiedSetbackMax { + + + + + +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; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value.SetNonNull(tmp); + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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 UnoccupiedSetbackMax + +namespace EmergencyHeatDelta { + + + + + +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; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value = tmp; + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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 EmergencyHeatDelta + +namespace ACType { + + + + + +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; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value = tmp; + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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 ACType + +namespace ACCapacity { + + + + + +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; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value = tmp; + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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 ACCapacity + +namespace ACRefrigerantType { + + + + + +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; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value = tmp; + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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 ACRefrigerantType + +namespace ACCompressorType { + + + + + +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; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value = tmp; + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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 ACCompressorType + +namespace ACErrorCode { + + + + + +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; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value = tmp; + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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 ACErrorCode + +namespace ACLouverPosition { + + + + + +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; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value = tmp; + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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 ACLouverPosition + +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; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value.SetNonNull(tmp); + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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) +{ + attribute_state_cache& cache = attribute_state_cache::get_instance(); + + using Traits = NumericAttributeTraits; + Traits::StorageType temp_storage; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value = tmp; + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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 ACCapacityformat + +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; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value = tmp; + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value = tmp; + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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 +} // Thermostat + +namespace FanControl { +namespace Attributes { + +namespace FanMode { + + + + + +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; + Traits::StorageType temp_storage; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value = tmp; + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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; + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + cache.set(endpoint,storageValue); + return EMBER_ZCL_STATUS_SUCCESS; +} + + +} // namespace FanMode + +namespace FanModeSequence { + + + + + +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; + Traits::StorageType temp_storage; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value = tmp; + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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; + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + cache.set(endpoint,storageValue); + return EMBER_ZCL_STATUS_SUCCESS; +} + + +} // namespace FanModeSequence + +namespace PercentSetting { + + + + + +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; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value.SetNonNull(tmp); + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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 PercentSetting + +namespace PercentCurrent { + + + + + +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; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value = tmp; + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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 PercentCurrent + +namespace SpeedMax { + + + + + +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; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value = tmp; + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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 SpeedMax + +namespace SpeedSetting { + + + + + +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; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value.SetNonNull(tmp); + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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 SpeedSetting + +namespace SpeedCurrent { + + + + + +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; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value = tmp; + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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 SpeedCurrent + +namespace RockSupport { + + + + + +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; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value = tmp; + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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 RockSupport + +namespace RockSetting { + + + + + +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; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value = tmp; + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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 RockSetting + +namespace WindSupport { + + + + + +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; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value = tmp; + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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 WindSupport + +namespace WindSetting { + + + + + +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; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value = tmp; + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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 WindSetting + +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; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value = tmp; + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value = tmp; + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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 +} // FanControl + +namespace ThermostatUserInterfaceConfiguration { +namespace Attributes { + +namespace TemperatureDisplayMode { + + + + + +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; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value = tmp; + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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 TemperatureDisplayMode + +namespace KeypadLockout { + + + + + +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; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value = tmp; + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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 KeypadLockout + +namespace ScheduleProgrammingVisibility { + + + + + +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; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value = tmp; + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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 ScheduleProgrammingVisibility + +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; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value = tmp; + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value = tmp; + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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 +} // ThermostatUserInterfaceConfiguration + +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(); + + using Traits = NumericAttributeTraits; + Traits::StorageType temp_storage; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value = tmp; + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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 CurrentHue + +namespace CurrentSaturation { + + + + + +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; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value = tmp; + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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 CurrentSaturation + +namespace RemainingTime { + + + + + +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; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value = tmp; + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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 RemainingTime + +namespace CurrentX { + + + + + +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; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value = tmp; + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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 CurrentX + +namespace CurrentY { + + + + + +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; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value = tmp; + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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 CurrentY + +namespace DriftCompensation { + + + + + +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; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value = tmp; + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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 DriftCompensation + +namespace CompensationText { + + + + + +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; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value = tmp; + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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 CompensationText + +namespace ColorTemperatureMireds { + + + + + +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; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value = tmp; + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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 ColorTemperatureMireds + +namespace ColorMode { + + + + + +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; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value = tmp; + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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 ColorMode + +namespace Options { + + + + + +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; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value = tmp; + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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 Options + +namespace NumberOfPrimaries { + + + + + +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; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value.SetNonNull(tmp); + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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 NumberOfPrimaries + +namespace Primary1X { + + + + + +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; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value = tmp; + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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 Primary1X + +namespace Primary1Y { + + + + + +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; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value = tmp; + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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 Primary1Y + +namespace Primary1Intensity { + + + + + +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; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value.SetNonNull(tmp); + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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 Primary1Intensity + +namespace Primary2X { + + + + + +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; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value = tmp; + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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 Primary2X + +namespace Primary2Y { + + + + + +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; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value = tmp; + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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 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; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value.SetNonNull(tmp); + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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) +{ + attribute_state_cache& cache = attribute_state_cache::get_instance(); + + using Traits = NumericAttributeTraits; + Traits::StorageType temp_storage; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value = tmp; + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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 Primary3X + +namespace Primary3Y { + + + + + +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; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value = tmp; + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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 Primary3Y + +namespace Primary3Intensity { + + + + + +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; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value.SetNonNull(tmp); + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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 Primary3Intensity + +namespace Primary4X { + + + + + +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; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value = tmp; + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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 Primary4X + +namespace Primary4Y { + + + + + +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; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value = tmp; + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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 Primary4Y + +namespace Primary4Intensity { + + + + + +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; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value.SetNonNull(tmp); + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value = tmp; + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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 Primary5X + +namespace Primary5Y { + + + + + +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; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value = tmp; + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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 Primary5Y + +namespace Primary5Intensity { + + + + + +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; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value.SetNonNull(tmp); + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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 Primary5Intensity + +namespace Primary6X { + + + + + +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; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value = tmp; + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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 Primary6X + +namespace Primary6Y { + + + + + +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; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value = tmp; + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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 Primary6Y + +namespace Primary6Intensity { + + + + + +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; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value.SetNonNull(tmp); + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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 Primary6Intensity + +namespace WhitePointX { + + + + + +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; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value = tmp; + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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 WhitePointX + +namespace WhitePointY { + + + + + +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; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value = tmp; + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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 WhitePointY + +namespace ColorPointRX { + + + + + +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; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value = tmp; + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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 ColorPointRX + +namespace ColorPointRY { + + + + + +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; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value = tmp; + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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 ColorPointRY + +namespace ColorPointRIntensity { + + + + + +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; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value.SetNonNull(tmp); + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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 ColorPointRIntensity + +namespace ColorPointGX { + + + + + +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; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value = tmp; + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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 ColorPointGX + +namespace ColorPointGY { + + + + + +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; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value = tmp; + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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 ColorPointGY + +namespace ColorPointGIntensity { + + + + + +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; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value.SetNonNull(tmp); + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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 ColorPointGIntensity + +namespace ColorPointBX { + + + + + +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; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value = tmp; + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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 ColorPointBX + +namespace ColorPointBY { + + + + + +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; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value = tmp; + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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 ColorPointBY + +namespace ColorPointBIntensity { + + + + + +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; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value.SetNonNull(tmp); + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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 ColorPointBIntensity + +namespace EnhancedCurrentHue { + + + + + +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; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value = tmp; + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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 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; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value = tmp; + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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 ColorLoopActive { + + + + + +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; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value = tmp; + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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 ColorLoopActive + +namespace ColorLoopDirection { + + + + + +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; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value = tmp; + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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 ColorLoopDirection + +namespace ColorLoopTime { + + + + + +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; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value = tmp; + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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 ColorLoopTime + +namespace ColorLoopStartEnhancedHue { + + + + + +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; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value = tmp; + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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 ColorLoopStartEnhancedHue + +namespace ColorLoopStoredEnhancedHue { + + + + + +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; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value = tmp; + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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 ColorLoopStoredEnhancedHue + +namespace ColorCapabilities { + + + + + +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; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value = tmp; + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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 ColorCapabilities + +namespace ColorTempPhysicalMinMireds { + + + + + +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; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value = tmp; + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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 ColorTempPhysicalMinMireds + +namespace ColorTempPhysicalMaxMireds { + + + + + +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; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value = tmp; + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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 ColorTempPhysicalMaxMireds + +namespace CoupleColorTempToLevelMinMireds { + + + + + +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; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value = tmp; + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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 CoupleColorTempToLevelMinMireds + +namespace StartUpColorTemperatureMireds { + + + + + +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; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value.SetNonNull(tmp); + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value = tmp; + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value = tmp; + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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 +} // ColorControl + +namespace IlluminanceMeasurement { +namespace Attributes { + +namespace MeasuredValue { + + + + + +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; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value.SetNonNull(tmp); + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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 MeasuredValue + +namespace MinMeasuredValue { + + + + + +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; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value.SetNonNull(tmp); + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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 MinMeasuredValue + +namespace MaxMeasuredValue { + + + + + +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; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value.SetNonNull(tmp); + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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 MaxMeasuredValue + +namespace Tolerance { + + + + + +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; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value = tmp; + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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 Tolerance + +namespace LightSensorType { + + + + + +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; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value.SetNonNull(tmp); + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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 LightSensorType + +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; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value = tmp; + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value = tmp; + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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 +} // IlluminanceMeasurement + +namespace TemperatureMeasurement { +namespace Attributes { + +namespace MeasuredValue { + + + + + +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; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value.SetNonNull(tmp); + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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 MeasuredValue + +namespace MinMeasuredValue { + + + + + +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; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value.SetNonNull(tmp); + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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 MinMeasuredValue + +namespace MaxMeasuredValue { + + + + + +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; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value.SetNonNull(tmp); + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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 MaxMeasuredValue + +namespace Tolerance { + + + + + +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; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value = tmp; + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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 Tolerance + +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; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value = tmp; + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value = tmp; + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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 +} // TemperatureMeasurement + +namespace PressureMeasurement { +namespace Attributes { + +namespace MeasuredValue { + + + + + +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; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value.SetNonNull(tmp); + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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 MeasuredValue + +namespace MinMeasuredValue { + + + + + +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; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value.SetNonNull(tmp); + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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 MinMeasuredValue + +namespace MaxMeasuredValue { + + + + + +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; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value.SetNonNull(tmp); + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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 MaxMeasuredValue + +namespace Tolerance { + + + + + +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; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value = tmp; + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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 Tolerance + +namespace ScaledValue { + + + + + +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; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value.SetNonNull(tmp); + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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 ScaledValue + +namespace MinScaledValue { + + + + + +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; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value.SetNonNull(tmp); + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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 MinScaledValue + +namespace MaxScaledValue { + + + + + +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; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value.SetNonNull(tmp); + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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 MaxScaledValue + +namespace ScaledTolerance { + + + + + +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; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value = tmp; + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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 ScaledTolerance + +namespace Scale { + + + + + +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, int8_t& value) +{ + attribute_state_cache& cache = attribute_state_cache::get_instance(); + + using Traits = NumericAttributeTraits; + Traits::StorageType temp_storage; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value = tmp; + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const int8_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 Scale + +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; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value = tmp; + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value = tmp; + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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 +} // PressureMeasurement + +namespace RelativeHumidityMeasurement { +namespace Attributes { + +namespace MeasuredValue { + + + + + +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; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value.SetNonNull(tmp); + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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 MeasuredValue + +namespace MinMeasuredValue { + + + + + +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; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value.SetNonNull(tmp); + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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 MinMeasuredValue + +namespace MaxMeasuredValue { + + + + + +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; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value.SetNonNull(tmp); + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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 MaxMeasuredValue + +namespace Tolerance { + + + + + +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; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value = tmp; + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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 Tolerance + +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; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value = tmp; + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value = tmp; + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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 +} // RelativeHumidityMeasurement + +namespace OccupancySensing { +namespace Attributes { + +namespace Occupancy { + + + + + +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; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value = tmp; + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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 Occupancy + +namespace OccupancySensorType { + + + + + +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; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value = tmp; + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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 OccupancySensorType + +namespace OccupancySensorTypeBitmap { + + + + + +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; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value = tmp; + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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 OccupancySensorTypeBitmap + +namespace PirOccupiedToUnoccupiedDelay { + + + + + +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; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value = tmp; + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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 PirOccupiedToUnoccupiedDelay + +namespace PirUnoccupiedToOccupiedDelay { + + + + + +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; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value = tmp; + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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 PirUnoccupiedToOccupiedDelay + +namespace PirUnoccupiedToOccupiedThreshold { + + + + + +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; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value = tmp; + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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 PirUnoccupiedToOccupiedThreshold + +namespace UltrasonicOccupiedToUnoccupiedDelay { + + + + + +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; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value = tmp; + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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 UltrasonicOccupiedToUnoccupiedDelay + +namespace UltrasonicUnoccupiedToOccupiedDelay { + + + + + +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; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value = tmp; + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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 UltrasonicUnoccupiedToOccupiedDelay + +namespace UltrasonicUnoccupiedToOccupiedThreshold { + + + + + +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; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value = tmp; + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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 UltrasonicUnoccupiedToOccupiedThreshold + +namespace PhysicalContactOccupiedToUnoccupiedDelay { + + + + + +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; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value = tmp; + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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 PhysicalContactOccupiedToUnoccupiedDelay + +namespace PhysicalContactUnoccupiedToOccupiedDelay { + + + + + +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; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value = tmp; + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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 PhysicalContactUnoccupiedToOccupiedDelay + +namespace PhysicalContactUnoccupiedToOccupiedThreshold { + + + + + +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; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value = tmp; + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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 PhysicalContactUnoccupiedToOccupiedThreshold + +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; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value = tmp; + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value = tmp; + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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 +} // OccupancySensing + +namespace ElectricalMeasurement { +namespace Attributes { + +namespace MeasurementType { + + + + + +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; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value = tmp; + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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 MeasurementType + +namespace DcVoltage { + + + + + +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, int16_t& value) +{ + attribute_state_cache& cache = attribute_state_cache::get_instance(); + + using Traits = NumericAttributeTraits; + Traits::StorageType temp_storage; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value = tmp; + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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; + Traits::WorkingToStorage(value, storageValue); + cache.set(endpoint,storageValue); + return EMBER_ZCL_STATUS_SUCCESS; +} + + +} // namespace DcVoltage + +namespace DcVoltageMin { + + + + + +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, int16_t& value) +{ + attribute_state_cache& cache = attribute_state_cache::get_instance(); + + using Traits = NumericAttributeTraits; + Traits::StorageType temp_storage; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value = tmp; + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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; + Traits::WorkingToStorage(value, storageValue); + cache.set(endpoint,storageValue); + return EMBER_ZCL_STATUS_SUCCESS; +} + + +} // namespace DcVoltageMin + +namespace DcVoltageMax { + + + + + +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, int16_t& value) +{ + attribute_state_cache& cache = attribute_state_cache::get_instance(); + + using Traits = NumericAttributeTraits; + Traits::StorageType temp_storage; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value = tmp; + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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; + Traits::WorkingToStorage(value, storageValue); + cache.set(endpoint,storageValue); + return EMBER_ZCL_STATUS_SUCCESS; +} + + +} // namespace DcVoltageMax + +namespace DcCurrent { + + + + + +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, int16_t& value) +{ + attribute_state_cache& cache = attribute_state_cache::get_instance(); + + using Traits = NumericAttributeTraits; + Traits::StorageType temp_storage; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value = tmp; + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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; + Traits::WorkingToStorage(value, storageValue); + cache.set(endpoint,storageValue); + return EMBER_ZCL_STATUS_SUCCESS; +} + + +} // namespace DcCurrent + +namespace DcCurrentMin { + + + + + +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, int16_t& value) +{ + attribute_state_cache& cache = attribute_state_cache::get_instance(); + + using Traits = NumericAttributeTraits; + Traits::StorageType temp_storage; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value = tmp; + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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; + Traits::WorkingToStorage(value, storageValue); + cache.set(endpoint,storageValue); + return EMBER_ZCL_STATUS_SUCCESS; +} + + +} // namespace DcCurrentMin + +namespace DcCurrentMax { + + + + + +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, int16_t& value) +{ + attribute_state_cache& cache = attribute_state_cache::get_instance(); + + using Traits = NumericAttributeTraits; + Traits::StorageType temp_storage; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value = tmp; + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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; + Traits::WorkingToStorage(value, storageValue); + cache.set(endpoint,storageValue); + return EMBER_ZCL_STATUS_SUCCESS; +} + + +} // namespace DcCurrentMax + +namespace DcPower { + + + + + +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, int16_t& value) +{ + attribute_state_cache& cache = attribute_state_cache::get_instance(); + + using Traits = NumericAttributeTraits; + Traits::StorageType temp_storage; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value = tmp; + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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; + Traits::WorkingToStorage(value, storageValue); + cache.set(endpoint,storageValue); + return EMBER_ZCL_STATUS_SUCCESS; +} + + +} // namespace DcPower + +namespace DcPowerMin { + + + + + +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, int16_t& value) +{ + attribute_state_cache& cache = attribute_state_cache::get_instance(); + + using Traits = NumericAttributeTraits; + Traits::StorageType temp_storage; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value = tmp; + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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; + Traits::WorkingToStorage(value, storageValue); + cache.set(endpoint,storageValue); + return EMBER_ZCL_STATUS_SUCCESS; +} + + +} // namespace DcPowerMin + +namespace DcPowerMax { + + + + + +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, int16_t& value) +{ + attribute_state_cache& cache = attribute_state_cache::get_instance(); + + using Traits = NumericAttributeTraits; + Traits::StorageType temp_storage; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value = tmp; + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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; + Traits::WorkingToStorage(value, storageValue); + cache.set(endpoint,storageValue); + return EMBER_ZCL_STATUS_SUCCESS; +} + + +} // namespace DcPowerMax + +namespace DcVoltageMultiplier { + + + + + +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; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value = tmp; + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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 DcVoltageMultiplier + +namespace DcVoltageDivisor { + + + + + +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; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value = tmp; + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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 DcVoltageDivisor + +namespace DcCurrentMultiplier { + + + + + +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; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value = tmp; + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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 DcCurrentMultiplier + +namespace DcCurrentDivisor { + + + + + +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; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value = tmp; + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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 DcCurrentDivisor + +namespace DcPowerMultiplier { + + + + + +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; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value = tmp; + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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 DcPowerMultiplier + +namespace DcPowerDivisor { + + + + + +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; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value = tmp; + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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 DcPowerDivisor + +namespace AcFrequency { + + + + + +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; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value = tmp; + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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 AcFrequency + +namespace AcFrequencyMin { + + + + + +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; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value = tmp; + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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 AcFrequencyMin + +namespace AcFrequencyMax { + + + + + +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; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value = tmp; + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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 AcFrequencyMax + +namespace NeutralCurrent { + + + + + +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; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value = tmp; + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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 NeutralCurrent + +namespace TotalActivePower { + + + + + +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, int32_t& value) +{ + attribute_state_cache& cache = attribute_state_cache::get_instance(); + + using Traits = NumericAttributeTraits; + Traits::StorageType temp_storage; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value = tmp; + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const int32_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 TotalActivePower + +namespace TotalReactivePower { + + + + + +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, int32_t& value) +{ + attribute_state_cache& cache = attribute_state_cache::get_instance(); + + using Traits = NumericAttributeTraits; + Traits::StorageType temp_storage; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value = tmp; + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const int32_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 TotalReactivePower + +namespace TotalApparentPower { + + + + + +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; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value = tmp; + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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 TotalApparentPower + +namespace Measured1stHarmonicCurrent { + + + + + +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, int16_t& value) +{ + attribute_state_cache& cache = attribute_state_cache::get_instance(); + + using Traits = NumericAttributeTraits; + Traits::StorageType temp_storage; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value = tmp; + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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; + Traits::WorkingToStorage(value, storageValue); + cache.set(endpoint,storageValue); + return EMBER_ZCL_STATUS_SUCCESS; +} + + +} // namespace Measured1stHarmonicCurrent + +namespace Measured3rdHarmonicCurrent { + + + + + +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, int16_t& value) +{ + attribute_state_cache& cache = attribute_state_cache::get_instance(); + + using Traits = NumericAttributeTraits; + Traits::StorageType temp_storage; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value = tmp; + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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; + Traits::WorkingToStorage(value, storageValue); + cache.set(endpoint,storageValue); + return EMBER_ZCL_STATUS_SUCCESS; +} + + +} // namespace Measured3rdHarmonicCurrent + +namespace Measured5thHarmonicCurrent { + + + + + +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, int16_t& value) +{ + attribute_state_cache& cache = attribute_state_cache::get_instance(); + + using Traits = NumericAttributeTraits; + Traits::StorageType temp_storage; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value = tmp; + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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; + Traits::WorkingToStorage(value, storageValue); + cache.set(endpoint,storageValue); + return EMBER_ZCL_STATUS_SUCCESS; +} + + +} // namespace Measured5thHarmonicCurrent + +namespace Measured7thHarmonicCurrent { + + + + + +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, int16_t& value) +{ + attribute_state_cache& cache = attribute_state_cache::get_instance(); + + using Traits = NumericAttributeTraits; + Traits::StorageType temp_storage; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value = tmp; + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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; + Traits::WorkingToStorage(value, storageValue); + cache.set(endpoint,storageValue); + return EMBER_ZCL_STATUS_SUCCESS; +} + + +} // namespace Measured7thHarmonicCurrent + +namespace Measured9thHarmonicCurrent { + + + + + +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, int16_t& value) +{ + attribute_state_cache& cache = attribute_state_cache::get_instance(); + + using Traits = NumericAttributeTraits; + Traits::StorageType temp_storage; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value = tmp; + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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; + Traits::WorkingToStorage(value, storageValue); + cache.set(endpoint,storageValue); + return EMBER_ZCL_STATUS_SUCCESS; +} + + +} // namespace Measured9thHarmonicCurrent + +namespace Measured11thHarmonicCurrent { + + + + + +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, int16_t& value) +{ + attribute_state_cache& cache = attribute_state_cache::get_instance(); + + using Traits = NumericAttributeTraits; + Traits::StorageType temp_storage; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value = tmp; + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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; + Traits::WorkingToStorage(value, storageValue); + cache.set(endpoint,storageValue); + return EMBER_ZCL_STATUS_SUCCESS; +} + + +} // namespace Measured11thHarmonicCurrent + +namespace MeasuredPhase1stHarmonicCurrent { + + + + + +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, int16_t& value) +{ + attribute_state_cache& cache = attribute_state_cache::get_instance(); + + using Traits = NumericAttributeTraits; + Traits::StorageType temp_storage; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value = tmp; + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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; + Traits::WorkingToStorage(value, storageValue); + cache.set(endpoint,storageValue); + return EMBER_ZCL_STATUS_SUCCESS; +} + + +} // namespace MeasuredPhase1stHarmonicCurrent + +namespace MeasuredPhase3rdHarmonicCurrent { + + + + + +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, int16_t& value) +{ + attribute_state_cache& cache = attribute_state_cache::get_instance(); + + using Traits = NumericAttributeTraits; + Traits::StorageType temp_storage; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value = tmp; + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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; + Traits::WorkingToStorage(value, storageValue); + cache.set(endpoint,storageValue); + return EMBER_ZCL_STATUS_SUCCESS; +} + + +} // namespace MeasuredPhase3rdHarmonicCurrent + +namespace MeasuredPhase5thHarmonicCurrent { + + + + + +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, int16_t& value) +{ + attribute_state_cache& cache = attribute_state_cache::get_instance(); + + using Traits = NumericAttributeTraits; + Traits::StorageType temp_storage; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value = tmp; + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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; + Traits::WorkingToStorage(value, storageValue); + cache.set(endpoint,storageValue); + return EMBER_ZCL_STATUS_SUCCESS; +} + + +} // namespace MeasuredPhase5thHarmonicCurrent + +namespace MeasuredPhase7thHarmonicCurrent { + + + + + +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, int16_t& value) +{ + attribute_state_cache& cache = attribute_state_cache::get_instance(); + + using Traits = NumericAttributeTraits; + Traits::StorageType temp_storage; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value = tmp; + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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; + Traits::WorkingToStorage(value, storageValue); + cache.set(endpoint,storageValue); + return EMBER_ZCL_STATUS_SUCCESS; +} + + +} // namespace MeasuredPhase7thHarmonicCurrent + +namespace MeasuredPhase9thHarmonicCurrent { + + + + + +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, int16_t& value) +{ + attribute_state_cache& cache = attribute_state_cache::get_instance(); + + using Traits = NumericAttributeTraits; + Traits::StorageType temp_storage; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value = tmp; + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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; + Traits::WorkingToStorage(value, storageValue); + cache.set(endpoint,storageValue); + return EMBER_ZCL_STATUS_SUCCESS; +} + + +} // namespace MeasuredPhase9thHarmonicCurrent + +namespace MeasuredPhase11thHarmonicCurrent { + + + + + +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, int16_t& value) +{ + attribute_state_cache& cache = attribute_state_cache::get_instance(); + + using Traits = NumericAttributeTraits; + Traits::StorageType temp_storage; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value = tmp; + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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; + Traits::WorkingToStorage(value, storageValue); + cache.set(endpoint,storageValue); + return EMBER_ZCL_STATUS_SUCCESS; +} + + +} // namespace MeasuredPhase11thHarmonicCurrent + +namespace AcFrequencyMultiplier { + + + + + +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; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value = tmp; + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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 AcFrequencyMultiplier + +namespace AcFrequencyDivisor { + + + + + +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; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value = tmp; + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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 AcFrequencyDivisor + +namespace PowerMultiplier { + + + + + +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; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value = tmp; + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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 PowerMultiplier + +namespace PowerDivisor { + + + + + +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; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value = tmp; + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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 PowerDivisor + +namespace HarmonicCurrentMultiplier { + + + + + +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, int8_t& value) +{ + attribute_state_cache& cache = attribute_state_cache::get_instance(); + + using Traits = NumericAttributeTraits; + Traits::StorageType temp_storage; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value = tmp; + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const int8_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 HarmonicCurrentMultiplier + +namespace PhaseHarmonicCurrentMultiplier { + + + + + +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, int8_t& value) +{ + attribute_state_cache& cache = attribute_state_cache::get_instance(); + + using Traits = NumericAttributeTraits; + Traits::StorageType temp_storage; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value = tmp; + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const int8_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 PhaseHarmonicCurrentMultiplier + +namespace InstantaneousVoltage { + + + + + +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, int16_t& value) +{ + attribute_state_cache& cache = attribute_state_cache::get_instance(); + + using Traits = NumericAttributeTraits; + Traits::StorageType temp_storage; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value = tmp; + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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; + Traits::WorkingToStorage(value, storageValue); + cache.set(endpoint,storageValue); + return EMBER_ZCL_STATUS_SUCCESS; +} + + +} // namespace InstantaneousVoltage + +namespace InstantaneousLineCurrent { + + + + + +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; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value = tmp; + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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 InstantaneousLineCurrent + +namespace InstantaneousActiveCurrent { + + + + + +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, int16_t& value) +{ + attribute_state_cache& cache = attribute_state_cache::get_instance(); + + using Traits = NumericAttributeTraits; + Traits::StorageType temp_storage; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value = tmp; + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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; + Traits::WorkingToStorage(value, storageValue); + cache.set(endpoint,storageValue); + return EMBER_ZCL_STATUS_SUCCESS; +} + + +} // namespace InstantaneousActiveCurrent + +namespace InstantaneousReactiveCurrent { + + + + + +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, int16_t& value) +{ + attribute_state_cache& cache = attribute_state_cache::get_instance(); + + using Traits = NumericAttributeTraits; + Traits::StorageType temp_storage; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value = tmp; + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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; + Traits::WorkingToStorage(value, storageValue); + cache.set(endpoint,storageValue); + return EMBER_ZCL_STATUS_SUCCESS; +} + + +} // namespace InstantaneousReactiveCurrent + +namespace InstantaneousPower { + + + + + +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, int16_t& value) +{ + attribute_state_cache& cache = attribute_state_cache::get_instance(); + + using Traits = NumericAttributeTraits; + Traits::StorageType temp_storage; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value = tmp; + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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; + Traits::WorkingToStorage(value, storageValue); + cache.set(endpoint,storageValue); + return EMBER_ZCL_STATUS_SUCCESS; +} + + +} // namespace InstantaneousPower + +namespace RmsVoltage { + + + + + +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; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value = tmp; + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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 RmsVoltage + +namespace RmsVoltageMin { + + + + + +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; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value = tmp; + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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 RmsVoltageMin + +namespace RmsVoltageMax { + + + + + +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; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value = tmp; + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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 RmsVoltageMax + +namespace RmsCurrent { + + + + + +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; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value = tmp; + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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 RmsCurrent + +namespace RmsCurrentMin { + + + + + +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; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value = tmp; + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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 RmsCurrentMin + +namespace RmsCurrentMax { + + + + + +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; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value = tmp; + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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 RmsCurrentMax + +namespace ActivePower { + + + + + +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, int16_t& value) +{ + attribute_state_cache& cache = attribute_state_cache::get_instance(); + + using Traits = NumericAttributeTraits; + Traits::StorageType temp_storage; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value = tmp; + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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; + Traits::WorkingToStorage(value, storageValue); + cache.set(endpoint,storageValue); + return EMBER_ZCL_STATUS_SUCCESS; +} + + +} // namespace ActivePower + +namespace ActivePowerMin { + + + + + +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, int16_t& value) +{ + attribute_state_cache& cache = attribute_state_cache::get_instance(); + + using Traits = NumericAttributeTraits; + Traits::StorageType temp_storage; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value = tmp; + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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; + Traits::WorkingToStorage(value, storageValue); + cache.set(endpoint,storageValue); + return EMBER_ZCL_STATUS_SUCCESS; +} + + +} // namespace ActivePowerMin + +namespace ActivePowerMax { + + + + + +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, int16_t& value) +{ + attribute_state_cache& cache = attribute_state_cache::get_instance(); + + using Traits = NumericAttributeTraits; + Traits::StorageType temp_storage; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value = tmp; + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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; + Traits::WorkingToStorage(value, storageValue); + cache.set(endpoint,storageValue); + return EMBER_ZCL_STATUS_SUCCESS; +} + + +} // namespace ActivePowerMax + +namespace ReactivePower { + + + + + +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, int16_t& value) +{ + attribute_state_cache& cache = attribute_state_cache::get_instance(); + + using Traits = NumericAttributeTraits; + Traits::StorageType temp_storage; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value = tmp; + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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; + Traits::WorkingToStorage(value, storageValue); + cache.set(endpoint,storageValue); + return EMBER_ZCL_STATUS_SUCCESS; +} + + +} // namespace ReactivePower + +namespace ApparentPower { + + + + + +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; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value = tmp; + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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 ApparentPower + +namespace PowerFactor { + + + + + +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, int8_t& value) +{ + attribute_state_cache& cache = attribute_state_cache::get_instance(); + + using Traits = NumericAttributeTraits; + Traits::StorageType temp_storage; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value = tmp; + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const int8_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 PowerFactor + +namespace AverageRmsVoltageMeasurementPeriod { + + + + + +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; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value = tmp; + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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 AverageRmsVoltageMeasurementPeriod + +namespace AverageRmsUnderVoltageCounter { + + + + + +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; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value = tmp; + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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 AverageRmsUnderVoltageCounter + +namespace RmsExtremeOverVoltagePeriod { + + + + + +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; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value = tmp; + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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 RmsExtremeOverVoltagePeriod + +namespace RmsExtremeUnderVoltagePeriod { + + + + + +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; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value = tmp; + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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 RmsExtremeUnderVoltagePeriod + +namespace RmsVoltageSagPeriod { + + + + + +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; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value = tmp; + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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 RmsVoltageSagPeriod + +namespace RmsVoltageSwellPeriod { + + + + + +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; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value = tmp; + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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 RmsVoltageSwellPeriod + +namespace AcVoltageMultiplier { + + + + + +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; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value = tmp; + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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 AcVoltageMultiplier + +namespace AcVoltageDivisor { + + + + + +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; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value = tmp; + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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 AcVoltageDivisor + +namespace AcCurrentMultiplier { + + + + + +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; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value = tmp; + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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 AcCurrentMultiplier + +namespace AcCurrentDivisor { + + + + + +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; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value = tmp; + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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 AcCurrentDivisor + +namespace AcPowerMultiplier { + + + + + +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; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value = tmp; + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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 AcPowerMultiplier + +namespace AcPowerDivisor { + + + + + +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; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value = tmp; + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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 AcPowerDivisor + +namespace OverloadAlarmsMask { + + + + + +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; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value = tmp; + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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 OverloadAlarmsMask + +namespace VoltageOverload { + + + + + +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, int16_t& value) +{ + attribute_state_cache& cache = attribute_state_cache::get_instance(); + + using Traits = NumericAttributeTraits; + Traits::StorageType temp_storage; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value = tmp; + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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; + Traits::WorkingToStorage(value, storageValue); + cache.set(endpoint,storageValue); + return EMBER_ZCL_STATUS_SUCCESS; +} + + +} // namespace VoltageOverload + +namespace CurrentOverload { + + + + + +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, int16_t& value) +{ + attribute_state_cache& cache = attribute_state_cache::get_instance(); + + using Traits = NumericAttributeTraits; + Traits::StorageType temp_storage; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value = tmp; + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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; + Traits::WorkingToStorage(value, storageValue); + cache.set(endpoint,storageValue); + return EMBER_ZCL_STATUS_SUCCESS; +} + + +} // namespace CurrentOverload + +namespace AcOverloadAlarmsMask { + + + + + +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; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value = tmp; + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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 AcOverloadAlarmsMask + +namespace AcVoltageOverload { + + + + + +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, int16_t& value) +{ + attribute_state_cache& cache = attribute_state_cache::get_instance(); + + using Traits = NumericAttributeTraits; + Traits::StorageType temp_storage; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value = tmp; + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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; + Traits::WorkingToStorage(value, storageValue); + cache.set(endpoint,storageValue); + return EMBER_ZCL_STATUS_SUCCESS; +} + + +} // namespace AcVoltageOverload + +namespace AcCurrentOverload { + + + + + +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, int16_t& value) +{ + attribute_state_cache& cache = attribute_state_cache::get_instance(); + + using Traits = NumericAttributeTraits; + Traits::StorageType temp_storage; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value = tmp; + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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; + Traits::WorkingToStorage(value, storageValue); + cache.set(endpoint,storageValue); + return EMBER_ZCL_STATUS_SUCCESS; +} + + +} // namespace AcCurrentOverload + +namespace AcActivePowerOverload { + + + + + +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, int16_t& value) +{ + attribute_state_cache& cache = attribute_state_cache::get_instance(); + + using Traits = NumericAttributeTraits; + Traits::StorageType temp_storage; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value = tmp; + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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; + Traits::WorkingToStorage(value, storageValue); + cache.set(endpoint,storageValue); + return EMBER_ZCL_STATUS_SUCCESS; +} + + +} // namespace AcActivePowerOverload + +namespace AcReactivePowerOverload { + + + + + +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, int16_t& value) +{ + attribute_state_cache& cache = attribute_state_cache::get_instance(); + + using Traits = NumericAttributeTraits; + Traits::StorageType temp_storage; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value = tmp; + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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; + Traits::WorkingToStorage(value, storageValue); + cache.set(endpoint,storageValue); + return EMBER_ZCL_STATUS_SUCCESS; +} + + +} // namespace AcReactivePowerOverload + +namespace AverageRmsOverVoltage { + + + + + +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, int16_t& value) +{ + attribute_state_cache& cache = attribute_state_cache::get_instance(); + + using Traits = NumericAttributeTraits; + Traits::StorageType temp_storage; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value = tmp; + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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; + Traits::WorkingToStorage(value, storageValue); + cache.set(endpoint,storageValue); + return EMBER_ZCL_STATUS_SUCCESS; +} + + +} // namespace AverageRmsOverVoltage + +namespace AverageRmsUnderVoltage { + + + + + +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, int16_t& value) +{ + attribute_state_cache& cache = attribute_state_cache::get_instance(); + + using Traits = NumericAttributeTraits; + Traits::StorageType temp_storage; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value = tmp; + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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; + Traits::WorkingToStorage(value, storageValue); + cache.set(endpoint,storageValue); + return EMBER_ZCL_STATUS_SUCCESS; +} + + +} // namespace AverageRmsUnderVoltage + +namespace RmsExtremeOverVoltage { + + + + + +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, int16_t& value) +{ + attribute_state_cache& cache = attribute_state_cache::get_instance(); + + using Traits = NumericAttributeTraits; + Traits::StorageType temp_storage; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value = tmp; + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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; + Traits::WorkingToStorage(value, storageValue); + cache.set(endpoint,storageValue); + return EMBER_ZCL_STATUS_SUCCESS; +} + + +} // namespace RmsExtremeOverVoltage + +namespace RmsExtremeUnderVoltage { + + + + + +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, int16_t& value) +{ + attribute_state_cache& cache = attribute_state_cache::get_instance(); + + using Traits = NumericAttributeTraits; + Traits::StorageType temp_storage; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value = tmp; + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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; + Traits::WorkingToStorage(value, storageValue); + cache.set(endpoint,storageValue); + return EMBER_ZCL_STATUS_SUCCESS; +} + + +} // namespace RmsExtremeUnderVoltage + +namespace RmsVoltageSag { + + + + + +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, int16_t& value) +{ + attribute_state_cache& cache = attribute_state_cache::get_instance(); + + using Traits = NumericAttributeTraits; + Traits::StorageType temp_storage; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value = tmp; + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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; + Traits::WorkingToStorage(value, storageValue); + cache.set(endpoint,storageValue); + return EMBER_ZCL_STATUS_SUCCESS; +} + + +} // namespace RmsVoltageSag + +namespace RmsVoltageSwell { + + + + + +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, int16_t& value) +{ + attribute_state_cache& cache = attribute_state_cache::get_instance(); + + using Traits = NumericAttributeTraits; + Traits::StorageType temp_storage; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value = tmp; + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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; + Traits::WorkingToStorage(value, storageValue); + cache.set(endpoint,storageValue); + return EMBER_ZCL_STATUS_SUCCESS; +} + + +} // namespace RmsVoltageSwell + +namespace LineCurrentPhaseB { + + + + + +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; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value = tmp; + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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 LineCurrentPhaseB + +namespace ActiveCurrentPhaseB { + + + + + +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, int16_t& value) +{ + attribute_state_cache& cache = attribute_state_cache::get_instance(); + + using Traits = NumericAttributeTraits; + Traits::StorageType temp_storage; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value = tmp; + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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; + Traits::WorkingToStorage(value, storageValue); + cache.set(endpoint,storageValue); + return EMBER_ZCL_STATUS_SUCCESS; +} + + +} // namespace ActiveCurrentPhaseB + +namespace ReactiveCurrentPhaseB { + + + + + +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, int16_t& value) +{ + attribute_state_cache& cache = attribute_state_cache::get_instance(); + + using Traits = NumericAttributeTraits; + Traits::StorageType temp_storage; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value = tmp; + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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; + Traits::WorkingToStorage(value, storageValue); + cache.set(endpoint,storageValue); + return EMBER_ZCL_STATUS_SUCCESS; +} + + +} // namespace ReactiveCurrentPhaseB + +namespace RmsVoltagePhaseB { + + + + + +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; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value = tmp; + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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 RmsVoltagePhaseB + +namespace RmsVoltageMinPhaseB { + + + + + +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; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value = tmp; + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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 RmsVoltageMinPhaseB + +namespace RmsVoltageMaxPhaseB { + + + + + +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; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value = tmp; + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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 RmsVoltageMaxPhaseB + +namespace RmsCurrentPhaseB { + + + + + +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; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value = tmp; + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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 RmsCurrentPhaseB + +namespace RmsCurrentMinPhaseB { + + + + + +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; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value = tmp; + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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 RmsCurrentMinPhaseB + +namespace RmsCurrentMaxPhaseB { + + + + + +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; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value = tmp; + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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 RmsCurrentMaxPhaseB + +namespace ActivePowerPhaseB { + + + + + +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, int16_t& value) +{ + attribute_state_cache& cache = attribute_state_cache::get_instance(); + + using Traits = NumericAttributeTraits; + Traits::StorageType temp_storage; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value = tmp; + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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; + Traits::WorkingToStorage(value, storageValue); + cache.set(endpoint,storageValue); + return EMBER_ZCL_STATUS_SUCCESS; +} + + +} // namespace ActivePowerPhaseB + +namespace ActivePowerMinPhaseB { + + + + + +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, int16_t& value) +{ + attribute_state_cache& cache = attribute_state_cache::get_instance(); + + using Traits = NumericAttributeTraits; + Traits::StorageType temp_storage; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value = tmp; + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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; + Traits::WorkingToStorage(value, storageValue); + cache.set(endpoint,storageValue); + return EMBER_ZCL_STATUS_SUCCESS; +} + + +} // namespace ActivePowerMinPhaseB + +namespace ActivePowerMaxPhaseB { + + + + + +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, int16_t& value) +{ + attribute_state_cache& cache = attribute_state_cache::get_instance(); + + using Traits = NumericAttributeTraits; + Traits::StorageType temp_storage; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value = tmp; + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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; + Traits::WorkingToStorage(value, storageValue); + cache.set(endpoint,storageValue); + return EMBER_ZCL_STATUS_SUCCESS; +} + + +} // namespace ActivePowerMaxPhaseB + +namespace ReactivePowerPhaseB { + + + + + +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, int16_t& value) +{ + attribute_state_cache& cache = attribute_state_cache::get_instance(); + + using Traits = NumericAttributeTraits; + Traits::StorageType temp_storage; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value = tmp; + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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; + Traits::WorkingToStorage(value, storageValue); + cache.set(endpoint,storageValue); + return EMBER_ZCL_STATUS_SUCCESS; +} + + +} // namespace ReactivePowerPhaseB + +namespace ApparentPowerPhaseB { + + + + + +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; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value = tmp; + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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 ApparentPowerPhaseB + +namespace PowerFactorPhaseB { + + + + + +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, int8_t& value) +{ + attribute_state_cache& cache = attribute_state_cache::get_instance(); + + using Traits = NumericAttributeTraits; + Traits::StorageType temp_storage; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value = tmp; + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const int8_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 PowerFactorPhaseB + +namespace AverageRmsVoltageMeasurementPeriodPhaseB { + + + + + +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; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value = tmp; + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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 AverageRmsVoltageMeasurementPeriodPhaseB + +namespace AverageRmsOverVoltageCounterPhaseB { + + + + + +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; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value = tmp; + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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 AverageRmsOverVoltageCounterPhaseB + +namespace AverageRmsUnderVoltageCounterPhaseB { + + + + + +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; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value = tmp; + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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 AverageRmsUnderVoltageCounterPhaseB + +namespace RmsExtremeOverVoltagePeriodPhaseB { + + + + + +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; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value = tmp; + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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 RmsExtremeOverVoltagePeriodPhaseB + +namespace RmsExtremeUnderVoltagePeriodPhaseB { + + + + + +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; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value = tmp; + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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 RmsExtremeUnderVoltagePeriodPhaseB + +namespace RmsVoltageSagPeriodPhaseB { + + + + + +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; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value = tmp; + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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 RmsVoltageSagPeriodPhaseB + +namespace RmsVoltageSwellPeriodPhaseB { + + + + + +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; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value = tmp; + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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 RmsVoltageSwellPeriodPhaseB + +namespace LineCurrentPhaseC { + + + + + +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; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value = tmp; + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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 LineCurrentPhaseC + +namespace ActiveCurrentPhaseC { + + + + + +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, int16_t& value) +{ + attribute_state_cache& cache = attribute_state_cache::get_instance(); + + using Traits = NumericAttributeTraits; + Traits::StorageType temp_storage; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value = tmp; + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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; + Traits::WorkingToStorage(value, storageValue); + cache.set(endpoint,storageValue); + return EMBER_ZCL_STATUS_SUCCESS; +} + + +} // namespace ActiveCurrentPhaseC + +namespace ReactiveCurrentPhaseC { + + + + + +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, int16_t& value) +{ + attribute_state_cache& cache = attribute_state_cache::get_instance(); + + using Traits = NumericAttributeTraits; + Traits::StorageType temp_storage; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value = tmp; + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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; + Traits::WorkingToStorage(value, storageValue); + cache.set(endpoint,storageValue); + return EMBER_ZCL_STATUS_SUCCESS; +} + + +} // namespace ReactiveCurrentPhaseC + +namespace RmsVoltagePhaseC { + + + + + +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; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value = tmp; + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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 RmsVoltagePhaseC + +namespace RmsVoltageMinPhaseC { + + + + + +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; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value = tmp; + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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 RmsVoltageMinPhaseC + +namespace RmsVoltageMaxPhaseC { + + + + + +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; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value = tmp; + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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 RmsVoltageMaxPhaseC + +namespace RmsCurrentPhaseC { + + + + + +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; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value = tmp; + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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 RmsCurrentPhaseC + +namespace RmsCurrentMinPhaseC { + + + + + +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; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value = tmp; + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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 RmsCurrentMinPhaseC + +namespace RmsCurrentMaxPhaseC { + + + + + +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; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value = tmp; + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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 RmsCurrentMaxPhaseC + +namespace ActivePowerPhaseC { + + + + + +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, int16_t& value) +{ + attribute_state_cache& cache = attribute_state_cache::get_instance(); + + using Traits = NumericAttributeTraits; + Traits::StorageType temp_storage; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value = tmp; + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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; + Traits::WorkingToStorage(value, storageValue); + cache.set(endpoint,storageValue); + return EMBER_ZCL_STATUS_SUCCESS; +} + + +} // namespace ActivePowerPhaseC + +namespace ActivePowerMinPhaseC { + + + + + +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, int16_t& value) +{ + attribute_state_cache& cache = attribute_state_cache::get_instance(); + + using Traits = NumericAttributeTraits; + Traits::StorageType temp_storage; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value = tmp; + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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; + Traits::WorkingToStorage(value, storageValue); + cache.set(endpoint,storageValue); + return EMBER_ZCL_STATUS_SUCCESS; +} + + +} // namespace ActivePowerMinPhaseC + +namespace ActivePowerMaxPhaseC { + + + + + +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, int16_t& value) +{ + attribute_state_cache& cache = attribute_state_cache::get_instance(); + + using Traits = NumericAttributeTraits; + Traits::StorageType temp_storage; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value = tmp; + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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; + Traits::WorkingToStorage(value, storageValue); + cache.set(endpoint,storageValue); + return EMBER_ZCL_STATUS_SUCCESS; +} + + +} // namespace ActivePowerMaxPhaseC + +namespace ReactivePowerPhaseC { + + + + + +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, int16_t& value) +{ + attribute_state_cache& cache = attribute_state_cache::get_instance(); + + using Traits = NumericAttributeTraits; + Traits::StorageType temp_storage; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value = tmp; + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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; + Traits::WorkingToStorage(value, storageValue); + cache.set(endpoint,storageValue); + return EMBER_ZCL_STATUS_SUCCESS; +} + + +} // namespace ReactivePowerPhaseC + +namespace ApparentPowerPhaseC { + + + + + +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; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value = tmp; + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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 ApparentPowerPhaseC + +namespace PowerFactorPhaseC { + + + + + +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, int8_t& value) +{ + attribute_state_cache& cache = attribute_state_cache::get_instance(); + + using Traits = NumericAttributeTraits; + Traits::StorageType temp_storage; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value = tmp; + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const int8_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 PowerFactorPhaseC + +namespace AverageRmsVoltageMeasurementPeriodPhaseC { + + + + + +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; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value = tmp; + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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 AverageRmsVoltageMeasurementPeriodPhaseC + +namespace AverageRmsOverVoltageCounterPhaseC { + + + + + +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; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value = tmp; + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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 AverageRmsOverVoltageCounterPhaseC + +namespace AverageRmsUnderVoltageCounterPhaseC { + + + + + +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; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value = tmp; + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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 AverageRmsUnderVoltageCounterPhaseC + +namespace RmsExtremeOverVoltagePeriodPhaseC { + + + + + +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; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value = tmp; + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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 RmsExtremeOverVoltagePeriodPhaseC + +namespace RmsExtremeUnderVoltagePeriodPhaseC { + + + + + +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; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value = tmp; + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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 RmsExtremeUnderVoltagePeriodPhaseC + +namespace RmsVoltageSagPeriodPhaseC { + + + + + +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; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value = tmp; + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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 RmsVoltageSagPeriodPhaseC + +namespace RmsVoltageSwellPeriodPhaseC { + + + + + +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; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value = tmp; + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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 RmsVoltageSwellPeriodPhaseC + +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; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value = tmp; + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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; + + if(cache.get(endpoint,temp_storage)) { + auto tmp = Traits::StorageToWorking(temp_storage); + + value = tmp; + return EMBER_ZCL_STATUS_SUCCESS; + } else { + return EMBER_ZCL_STATUS_FAILURE; + } +} + +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 +} // ElectricalMeasurement + + +} // matter_bridge +} // unify diff --git a/silabs_examples/unify-matter-bridge/linux/zap-generated/data_model_translator/unify_accessors.hpp b/silabs_examples/unify-matter-bridge/linux/zap-generated/data_model_translator/unify_accessors.hpp index a3a3b308b3dd0d..99215ee489536b 100644 --- a/silabs_examples/unify-matter-bridge/linux/zap-generated/data_model_translator/unify_accessors.hpp +++ b/silabs_examples/unify-matter-bridge/linux/zap-generated/data_model_translator/unify_accessors.hpp @@ -6,4841 +6,4746 @@ #pragma once -#include #include #include +#include #include namespace unify { namespace matter_bridge { - namespace Identify { - namespace Attributes { - - namespace IdentifyTime { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); - } // namespace IdentifyTime - - namespace IdentifyType { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint8_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint8_t& value); - } // namespace IdentifyType - - namespace FeatureMap { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint32_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint32_t& value); - } // namespace FeatureMap - - namespace ClusterRevision { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); - } // namespace ClusterRevision - - } // namespace Attributes - } // namespace Identify - - namespace Groups { - namespace Attributes { - - namespace NameSupport { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint8_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint8_t& value); - } // namespace NameSupport - - namespace FeatureMap { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint32_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint32_t& value); - } // namespace FeatureMap - - namespace ClusterRevision { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); - } // namespace ClusterRevision - - } // namespace Attributes - } // namespace Groups - - namespace Scenes { - namespace Attributes { - - namespace SceneCount { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint8_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint8_t& value); - } // namespace SceneCount - - namespace CurrentScene { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint8_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint8_t& value); - } // namespace CurrentScene - - namespace CurrentGroup { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::GroupId& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::GroupId& value); - } // namespace CurrentGroup - - namespace SceneValid { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, bool& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const bool& value); - } // namespace SceneValid - - namespace NameSupport { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint8_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint8_t& value); - } // namespace NameSupport - - namespace LastConfiguredBy { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::DataModel::Nullable& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::DataModel::Nullable& value); - } // namespace LastConfiguredBy - - namespace FeatureMap { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint32_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint32_t& value); - } // namespace FeatureMap - - namespace ClusterRevision { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); - } // namespace ClusterRevision - - } // namespace Attributes - } // namespace Scenes - - namespace OnOff { - namespace Attributes { - - namespace OnOff { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, bool& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const bool& value); - } // namespace OnOff - - namespace GlobalSceneControl { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, bool& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const bool& value); - } // namespace GlobalSceneControl - - namespace OnTime { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); - } // namespace OnTime - - namespace OffWaitTime { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); - } // namespace OffWaitTime - - namespace StartUpOnOff { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, - chip::app::DataModel::Nullable& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, - const chip::app::DataModel::Nullable& value); - } // namespace StartUpOnOff - - namespace FeatureMap { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint32_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint32_t& value); - } // namespace FeatureMap - - namespace ClusterRevision { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); - } // namespace ClusterRevision - - } // namespace Attributes - } // namespace OnOff - - namespace OnOffSwitchConfiguration { - namespace Attributes { - - namespace SwitchType { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint8_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint8_t& value); - } // namespace SwitchType - - namespace SwitchActions { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint8_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint8_t& value); - } // namespace SwitchActions - - namespace FeatureMap { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint32_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint32_t& value); - } // namespace FeatureMap - - namespace ClusterRevision { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); - } // namespace ClusterRevision - - } // namespace Attributes - } // namespace OnOffSwitchConfiguration - - namespace LevelControl { - namespace Attributes { - - namespace CurrentLevel { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::DataModel::Nullable& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::DataModel::Nullable& value); - } // namespace CurrentLevel - - namespace RemainingTime { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); - } // namespace RemainingTime - - namespace MinLevel { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint8_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint8_t& value); - } // namespace MinLevel - - namespace MaxLevel { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint8_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint8_t& value); - } // namespace MaxLevel - - namespace CurrentFrequency { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); - } // namespace CurrentFrequency - - namespace MinFrequency { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); - } // namespace MinFrequency - - namespace MaxFrequency { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); - } // namespace MaxFrequency - - namespace Options { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, - chip::BitMask& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, - const chip::BitMask& value); - } // namespace Options - - namespace OnOffTransitionTime { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); - } // namespace OnOffTransitionTime - - namespace OnLevel { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::DataModel::Nullable& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::DataModel::Nullable& value); - } // namespace OnLevel - - namespace OnTransitionTime { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::DataModel::Nullable& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::DataModel::Nullable& value); - } // namespace OnTransitionTime - - namespace OffTransitionTime { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::DataModel::Nullable& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::DataModel::Nullable& value); - } // namespace OffTransitionTime - - namespace DefaultMoveRate { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::DataModel::Nullable& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::DataModel::Nullable& value); - } // namespace DefaultMoveRate - - namespace StartUpCurrentLevel { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::DataModel::Nullable& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::DataModel::Nullable& value); - } // namespace StartUpCurrentLevel - - namespace FeatureMap { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint32_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint32_t& value); - } // namespace FeatureMap - - namespace ClusterRevision { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); - } // namespace ClusterRevision - - } // namespace Attributes - } // namespace LevelControl - - namespace BinaryInputBasic { - namespace Attributes { - - namespace ActiveText { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::CharSpan& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::CharSpan& value); - } // namespace ActiveText - - namespace Description { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::CharSpan& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::CharSpan& value); - } // namespace Description - - namespace InactiveText { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::CharSpan& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::CharSpan& value); - } // namespace InactiveText - - namespace OutOfService { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, bool& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const bool& value); - } // namespace OutOfService - - namespace Polarity { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint8_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint8_t& value); - } // namespace Polarity - - namespace PresentValue { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, bool& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const bool& value); - } // namespace PresentValue - - namespace Reliability { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint8_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint8_t& value); - } // namespace Reliability - - namespace StatusFlags { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint8_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint8_t& value); - } // namespace StatusFlags - - namespace ApplicationType { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint32_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint32_t& value); - } // namespace ApplicationType - - namespace FeatureMap { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint32_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint32_t& value); - } // namespace FeatureMap - - namespace ClusterRevision { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); - } // namespace ClusterRevision - - } // namespace Attributes - } // namespace BinaryInputBasic - - namespace PulseWidthModulation { - namespace Attributes { - - namespace FeatureMap { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint32_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint32_t& value); - } // namespace FeatureMap - - namespace ClusterRevision { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); - } // namespace ClusterRevision - - } // namespace Attributes - } // namespace PulseWidthModulation - - namespace Descriptor { - namespace Attributes { - - namespace FeatureMap { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint32_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint32_t& value); - } // namespace FeatureMap - - namespace ClusterRevision { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); - } // namespace ClusterRevision - - } // namespace Attributes - } // namespace Descriptor - - namespace Binding { - namespace Attributes { - - namespace FeatureMap { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint32_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint32_t& value); - } // namespace FeatureMap - - namespace ClusterRevision { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); - } // namespace ClusterRevision - - } // namespace Attributes - } // namespace Binding - - namespace AccessControl { - namespace Attributes { - - namespace SubjectsPerAccessControlEntry { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); - } // namespace SubjectsPerAccessControlEntry - - namespace TargetsPerAccessControlEntry { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); - } // namespace TargetsPerAccessControlEntry - - namespace AccessControlEntriesPerFabric { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); - } // namespace AccessControlEntriesPerFabric - - namespace FeatureMap { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint32_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint32_t& value); - } // namespace FeatureMap - - namespace ClusterRevision { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); - } // namespace ClusterRevision - - } // namespace Attributes - } // namespace AccessControl - - namespace Actions { - namespace Attributes { - - namespace SetupURL { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::CharSpan& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::CharSpan& value); - } // namespace SetupURL - - namespace FeatureMap { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint32_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint32_t& value); - } // namespace FeatureMap - - namespace ClusterRevision { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); - } // namespace ClusterRevision - - } // namespace Attributes - } // namespace Actions - - namespace Basic { - namespace Attributes { - - namespace DataModelRevision { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); - } // namespace DataModelRevision - - namespace VendorName { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::CharSpan& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::CharSpan& value); - } // namespace VendorName - - namespace VendorID { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::VendorId& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::VendorId& value); - } // namespace VendorID - - namespace ProductName { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::CharSpan& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::CharSpan& value); - } // namespace ProductName - - namespace ProductID { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); - } // namespace ProductID - - namespace NodeLabel { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::CharSpan& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::CharSpan& value); - } // namespace NodeLabel - - namespace Location { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::CharSpan& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::CharSpan& value); - } // namespace Location - - namespace HardwareVersion { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); - } // namespace HardwareVersion - - namespace HardwareVersionString { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::CharSpan& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::CharSpan& value); - } // namespace HardwareVersionString - - namespace SoftwareVersion { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint32_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint32_t& value); - } // namespace SoftwareVersion - - namespace SoftwareVersionString { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::CharSpan& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::CharSpan& value); - } // namespace SoftwareVersionString - - namespace ManufacturingDate { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::CharSpan& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::CharSpan& value); - } // namespace ManufacturingDate - - namespace PartNumber { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::CharSpan& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::CharSpan& value); - } // namespace PartNumber - - namespace ProductURL { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::CharSpan& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::CharSpan& value); - } // namespace ProductURL - - namespace ProductLabel { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::CharSpan& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::CharSpan& value); - } // namespace ProductLabel - - namespace SerialNumber { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::CharSpan& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::CharSpan& value); - } // namespace SerialNumber - - namespace LocalConfigDisabled { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, bool& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const bool& value); - } // namespace LocalConfigDisabled - - namespace Reachable { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, bool& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const bool& value); - } // namespace Reachable - - namespace UniqueID { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::CharSpan& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::CharSpan& value); - } // namespace UniqueID - - namespace FeatureMap { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint32_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint32_t& value); - } // namespace FeatureMap - - namespace ClusterRevision { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); - } // namespace ClusterRevision - - } // namespace Attributes - } // namespace Basic - - namespace OtaSoftwareUpdateProvider { - namespace Attributes { - - namespace FeatureMap { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint32_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint32_t& value); - } // namespace FeatureMap - - namespace ClusterRevision { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); - } // namespace ClusterRevision - - } // namespace Attributes - } // namespace OtaSoftwareUpdateProvider - - namespace OtaSoftwareUpdateRequestor { - namespace Attributes { - - namespace UpdatePossible { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, bool& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const bool& value); - } // namespace UpdatePossible - - namespace UpdateState { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, - chip::app::Clusters::OtaSoftwareUpdateRequestor::OTAUpdateStateEnum& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, - const chip::app::Clusters::OtaSoftwareUpdateRequestor::OTAUpdateStateEnum& value); - } // namespace UpdateState - - namespace UpdateStateProgress { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::DataModel::Nullable& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::DataModel::Nullable& value); - } // namespace UpdateStateProgress - - namespace FeatureMap { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint32_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint32_t& value); - } // namespace FeatureMap - - namespace ClusterRevision { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); - } // namespace ClusterRevision - - } // namespace Attributes - } // namespace OtaSoftwareUpdateRequestor - - namespace LocalizationConfiguration { - namespace Attributes { - - namespace ActiveLocale { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::CharSpan& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::CharSpan& value); - } // namespace ActiveLocale - - namespace FeatureMap { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint32_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint32_t& value); - } // namespace FeatureMap - - namespace ClusterRevision { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); - } // namespace ClusterRevision - - } // namespace Attributes - } // namespace LocalizationConfiguration - - namespace TimeFormatLocalization { - namespace Attributes { - - namespace HourFormat { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, - chip::app::Clusters::TimeFormatLocalization::HourFormat& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, - const chip::app::Clusters::TimeFormatLocalization::HourFormat& value); - } // namespace HourFormat - - namespace ActiveCalendarType { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, - chip::app::Clusters::TimeFormatLocalization::CalendarType& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, - const chip::app::Clusters::TimeFormatLocalization::CalendarType& value); - } // namespace ActiveCalendarType - - namespace FeatureMap { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint32_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint32_t& value); - } // namespace FeatureMap - - namespace ClusterRevision { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); - } // namespace ClusterRevision - - } // namespace Attributes - } // namespace TimeFormatLocalization - - namespace UnitLocalization { - namespace Attributes { - - namespace TemperatureUnit { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::Clusters::UnitLocalization::TempUnit& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::Clusters::UnitLocalization::TempUnit& value); - } // namespace TemperatureUnit - - namespace FeatureMap { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint32_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint32_t& value); - } // namespace FeatureMap - - namespace ClusterRevision { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); - } // namespace ClusterRevision - - } // namespace Attributes - } // namespace UnitLocalization - - namespace PowerSourceConfiguration { - namespace Attributes { - - namespace FeatureMap { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint32_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint32_t& value); - } // namespace FeatureMap - - namespace ClusterRevision { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); - } // namespace ClusterRevision - - } // namespace Attributes - } // namespace PowerSourceConfiguration - - namespace PowerSource { - namespace Attributes { - - namespace Status { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::Clusters::PowerSource::PowerSourceStatus& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, - const chip::app::Clusters::PowerSource::PowerSourceStatus& value); - } // namespace Status - - namespace Order { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint8_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint8_t& value); - } // namespace Order - - namespace Description { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::CharSpan& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::CharSpan& value); - } // namespace Description - - namespace WiredAssessedInputVoltage { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::DataModel::Nullable& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::DataModel::Nullable& value); - } // namespace WiredAssessedInputVoltage - - namespace WiredAssessedInputFrequency { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::DataModel::Nullable& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::DataModel::Nullable& value); - } // namespace WiredAssessedInputFrequency - - namespace WiredCurrentType { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::Clusters::PowerSource::WiredCurrentType& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, - const chip::app::Clusters::PowerSource::WiredCurrentType& value); - } // namespace WiredCurrentType - - namespace WiredAssessedCurrent { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::DataModel::Nullable& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::DataModel::Nullable& value); - } // namespace WiredAssessedCurrent - - namespace WiredNominalVoltage { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint32_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint32_t& value); - } // namespace WiredNominalVoltage - - namespace WiredMaximumCurrent { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint32_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint32_t& value); - } // namespace WiredMaximumCurrent - - namespace WiredPresent { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, bool& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const bool& value); - } // namespace WiredPresent - - namespace BatVoltage { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::DataModel::Nullable& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::DataModel::Nullable& value); - } // namespace BatVoltage - - namespace BatPercentRemaining { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::DataModel::Nullable& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::DataModel::Nullable& value); - } // namespace BatPercentRemaining - - namespace BatTimeRemaining { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::DataModel::Nullable& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::DataModel::Nullable& value); - } // namespace BatTimeRemaining - - namespace BatChargeLevel { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::Clusters::PowerSource::BatChargeLevel& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, - const chip::app::Clusters::PowerSource::BatChargeLevel& value); - } // namespace BatChargeLevel - - namespace BatReplacementNeeded { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, bool& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const bool& value); - } // namespace BatReplacementNeeded - - namespace BatReplaceability { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::Clusters::PowerSource::BatReplaceability& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, - const chip::app::Clusters::PowerSource::BatReplaceability& value); - } // namespace BatReplaceability - - namespace BatPresent { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, bool& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const bool& value); - } // namespace BatPresent - - namespace BatReplacementDescription { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::CharSpan& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::CharSpan& value); - } // namespace BatReplacementDescription - - namespace BatCommonDesignation { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint32_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint32_t& value); - } // namespace BatCommonDesignation - - namespace BatANSIDesignation { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::CharSpan& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::CharSpan& value); - } // namespace BatANSIDesignation - - namespace BatIECDesignation { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::CharSpan& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::CharSpan& value); - } // namespace BatIECDesignation - - namespace BatApprovedChemistry { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint32_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint32_t& value); - } // namespace BatApprovedChemistry - - namespace BatCapacity { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint32_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint32_t& value); - } // namespace BatCapacity - - namespace BatQuantity { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint8_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint8_t& value); - } // namespace BatQuantity - - namespace BatChargeState { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::Clusters::PowerSource::BatChargeState& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, - const chip::app::Clusters::PowerSource::BatChargeState& value); - } // namespace BatChargeState - - namespace BatTimeToFullCharge { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::DataModel::Nullable& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::DataModel::Nullable& value); - } // namespace BatTimeToFullCharge - - namespace BatFunctionalWhileCharging { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, bool& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const bool& value); - } // namespace BatFunctionalWhileCharging - - namespace BatChargingCurrent { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::DataModel::Nullable& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::DataModel::Nullable& value); - } // namespace BatChargingCurrent - - namespace FeatureMap { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint32_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint32_t& value); - } // namespace FeatureMap - - namespace ClusterRevision { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); - } // namespace ClusterRevision - - } // namespace Attributes - } // namespace PowerSource - - namespace GeneralCommissioning { - namespace Attributes { - - namespace Breadcrumb { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint64_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint64_t& value); - } // namespace Breadcrumb - - namespace RegulatoryConfig { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, - chip::app::Clusters::GeneralCommissioning::RegulatoryLocationType& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, - const chip::app::Clusters::GeneralCommissioning::RegulatoryLocationType& value); - } // namespace RegulatoryConfig - - namespace LocationCapability { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, - chip::app::Clusters::GeneralCommissioning::RegulatoryLocationType& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, - const chip::app::Clusters::GeneralCommissioning::RegulatoryLocationType& value); - } // namespace LocationCapability - - namespace SupportsConcurrentConnection { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, bool& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const bool& value); - } // namespace SupportsConcurrentConnection - - namespace FeatureMap { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint32_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint32_t& value); - } // namespace FeatureMap - - namespace ClusterRevision { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); - } // namespace ClusterRevision - - } // namespace Attributes - } // namespace GeneralCommissioning - - namespace NetworkCommissioning { - namespace Attributes { - - namespace MaxNetworks { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint8_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint8_t& value); - } // namespace MaxNetworks - - namespace ScanMaxTimeSeconds { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint8_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint8_t& value); - } // namespace ScanMaxTimeSeconds - - namespace ConnectMaxTimeSeconds { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint8_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint8_t& value); - } // namespace ConnectMaxTimeSeconds - - namespace InterfaceEnabled { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, bool& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const bool& value); - } // namespace InterfaceEnabled - - namespace LastNetworkingStatus { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, - chip::app::DataModel::Nullable& value); - EmberAfStatus - Set(const chip::app::ConcreteAttributePath& endpoint, - const chip::app::DataModel::Nullable& value); - } // namespace LastNetworkingStatus - - namespace LastNetworkID { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::DataModel::Nullable& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::DataModel::Nullable& value); - } // namespace LastNetworkID - - namespace LastConnectErrorValue { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::DataModel::Nullable& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::DataModel::Nullable& value); - } // namespace LastConnectErrorValue - - namespace FeatureMap { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint32_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint32_t& value); - } // namespace FeatureMap - - namespace ClusterRevision { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); - } // namespace ClusterRevision - - } // namespace Attributes - } // namespace NetworkCommissioning - - namespace DiagnosticLogs { - namespace Attributes { - - namespace FeatureMap { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint32_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint32_t& value); - } // namespace FeatureMap - - namespace ClusterRevision { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); - } // namespace ClusterRevision - - } // namespace Attributes - } // namespace DiagnosticLogs - - namespace GeneralDiagnostics { - namespace Attributes { - - namespace RebootCount { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); - } // namespace RebootCount - - namespace UpTime { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint64_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint64_t& value); - } // namespace UpTime - - namespace TotalOperationalHours { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint32_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint32_t& value); - } // namespace TotalOperationalHours - - namespace BootReasons { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint8_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint8_t& value); - } // namespace BootReasons - - namespace TestEventTriggersEnabled { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, bool& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const bool& value); - } // namespace TestEventTriggersEnabled - - namespace FeatureMap { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint32_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint32_t& value); - } // namespace FeatureMap - - namespace ClusterRevision { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); - } // namespace ClusterRevision - - } // namespace Attributes - } // namespace GeneralDiagnostics - - namespace SoftwareDiagnostics { - namespace Attributes { - - namespace CurrentHeapFree { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint64_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint64_t& value); - } // namespace CurrentHeapFree - - namespace CurrentHeapUsed { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint64_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint64_t& value); - } // namespace CurrentHeapUsed - - namespace CurrentHeapHighWatermark { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint64_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint64_t& value); - } // namespace CurrentHeapHighWatermark - - namespace FeatureMap { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint32_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint32_t& value); - } // namespace FeatureMap - - namespace ClusterRevision { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); - } // namespace ClusterRevision - - } // namespace Attributes - } // namespace SoftwareDiagnostics - - namespace ThreadNetworkDiagnostics { - namespace Attributes { - - namespace Channel { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::DataModel::Nullable& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::DataModel::Nullable& value); - } // namespace Channel - - namespace RoutingRole { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, - chip::app::DataModel::Nullable& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, - const chip::app::DataModel::Nullable& value); - } // namespace RoutingRole - - namespace NetworkName { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::DataModel::Nullable& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::DataModel::Nullable& value); - } // namespace NetworkName - - namespace PanId { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::DataModel::Nullable& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::DataModel::Nullable& value); - } // namespace PanId - - namespace ExtendedPanId { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::DataModel::Nullable& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::DataModel::Nullable& value); - } // namespace ExtendedPanId - - namespace MeshLocalPrefix { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::DataModel::Nullable& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::DataModel::Nullable& value); - } // namespace MeshLocalPrefix - - namespace OverrunCount { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint64_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint64_t& value); - } // namespace OverrunCount - - namespace PartitionId { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::DataModel::Nullable& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::DataModel::Nullable& value); - } // namespace PartitionId - - namespace Weighting { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::DataModel::Nullable& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::DataModel::Nullable& value); - } // namespace Weighting - - namespace DataVersion { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::DataModel::Nullable& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::DataModel::Nullable& value); - } // namespace DataVersion - - namespace StableDataVersion { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::DataModel::Nullable& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::DataModel::Nullable& value); - } // namespace StableDataVersion - - namespace LeaderRouterId { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::DataModel::Nullable& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::DataModel::Nullable& value); - } // namespace LeaderRouterId - - namespace DetachedRoleCount { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); - } // namespace DetachedRoleCount - - namespace ChildRoleCount { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); - } // namespace ChildRoleCount - - namespace RouterRoleCount { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); - } // namespace RouterRoleCount - - namespace LeaderRoleCount { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); - } // namespace LeaderRoleCount - - namespace AttachAttemptCount { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); - } // namespace AttachAttemptCount - - namespace PartitionIdChangeCount { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); - } // namespace PartitionIdChangeCount - - namespace BetterPartitionAttachAttemptCount { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); - } // namespace BetterPartitionAttachAttemptCount - - namespace ParentChangeCount { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); - } // namespace ParentChangeCount - - namespace TxTotalCount { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint32_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint32_t& value); - } // namespace TxTotalCount - - namespace TxUnicastCount { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint32_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint32_t& value); - } // namespace TxUnicastCount - - namespace TxBroadcastCount { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint32_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint32_t& value); - } // namespace TxBroadcastCount - - namespace TxAckRequestedCount { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint32_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint32_t& value); - } // namespace TxAckRequestedCount - - namespace TxAckedCount { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint32_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint32_t& value); - } // namespace TxAckedCount - - namespace TxNoAckRequestedCount { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint32_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint32_t& value); - } // namespace TxNoAckRequestedCount - - namespace TxDataCount { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint32_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint32_t& value); - } // namespace TxDataCount - - namespace TxDataPollCount { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint32_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint32_t& value); - } // namespace TxDataPollCount - - namespace TxBeaconCount { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint32_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint32_t& value); - } // namespace TxBeaconCount - - namespace TxBeaconRequestCount { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint32_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint32_t& value); - } // namespace TxBeaconRequestCount - - namespace TxOtherCount { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint32_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint32_t& value); - } // namespace TxOtherCount - - namespace TxRetryCount { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint32_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint32_t& value); - } // namespace TxRetryCount - - namespace TxDirectMaxRetryExpiryCount { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint32_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint32_t& value); - } // namespace TxDirectMaxRetryExpiryCount - - namespace TxIndirectMaxRetryExpiryCount { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint32_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint32_t& value); - } // namespace TxIndirectMaxRetryExpiryCount - - namespace TxErrCcaCount { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint32_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint32_t& value); - } // namespace TxErrCcaCount - - namespace TxErrAbortCount { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint32_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint32_t& value); - } // namespace TxErrAbortCount - - namespace TxErrBusyChannelCount { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint32_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint32_t& value); - } // namespace TxErrBusyChannelCount - - namespace RxTotalCount { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint32_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint32_t& value); - } // namespace RxTotalCount - - namespace RxUnicastCount { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint32_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint32_t& value); - } // namespace RxUnicastCount - - namespace RxBroadcastCount { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint32_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint32_t& value); - } // namespace RxBroadcastCount - - namespace RxDataCount { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint32_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint32_t& value); - } // namespace RxDataCount - - namespace RxDataPollCount { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint32_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint32_t& value); - } // namespace RxDataPollCount - - namespace RxBeaconCount { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint32_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint32_t& value); - } // namespace RxBeaconCount - - namespace RxBeaconRequestCount { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint32_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint32_t& value); - } // namespace RxBeaconRequestCount - - namespace RxOtherCount { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint32_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint32_t& value); - } // namespace RxOtherCount - - namespace RxAddressFilteredCount { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint32_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint32_t& value); - } // namespace RxAddressFilteredCount - - namespace RxDestAddrFilteredCount { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint32_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint32_t& value); - } // namespace RxDestAddrFilteredCount - - namespace RxDuplicatedCount { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint32_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint32_t& value); - } // namespace RxDuplicatedCount - - namespace RxErrNoFrameCount { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint32_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint32_t& value); - } // namespace RxErrNoFrameCount - - namespace RxErrUnknownNeighborCount { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint32_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint32_t& value); - } // namespace RxErrUnknownNeighborCount - - namespace RxErrInvalidSrcAddrCount { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint32_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint32_t& value); - } // namespace RxErrInvalidSrcAddrCount - - namespace RxErrSecCount { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint32_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint32_t& value); - } // namespace RxErrSecCount - - namespace RxErrFcsCount { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint32_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint32_t& value); - } // namespace RxErrFcsCount - - namespace RxErrOtherCount { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint32_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint32_t& value); - } // namespace RxErrOtherCount - - namespace ActiveTimestamp { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::DataModel::Nullable& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::DataModel::Nullable& value); - } // namespace ActiveTimestamp - - namespace PendingTimestamp { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::DataModel::Nullable& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::DataModel::Nullable& value); - } // namespace PendingTimestamp - - namespace Delay { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::DataModel::Nullable& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::DataModel::Nullable& value); - } // namespace Delay - - namespace ChannelPage0Mask { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::DataModel::Nullable& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::DataModel::Nullable& value); - } // namespace ChannelPage0Mask - - namespace FeatureMap { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint32_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint32_t& value); - } // namespace FeatureMap - - namespace ClusterRevision { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); - } // namespace ClusterRevision - - } // namespace Attributes - } // namespace ThreadNetworkDiagnostics - - namespace WiFiNetworkDiagnostics { - namespace Attributes { - - namespace Bssid { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::DataModel::Nullable& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::DataModel::Nullable& value); - } // namespace Bssid - - namespace SecurityType { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, - chip::app::DataModel::Nullable& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, - const chip::app::DataModel::Nullable& value); - } // namespace SecurityType - - namespace WiFiVersion { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, - chip::app::DataModel::Nullable& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, - const chip::app::DataModel::Nullable& value); - } // namespace WiFiVersion - - namespace ChannelNumber { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::DataModel::Nullable& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::DataModel::Nullable& value); - } // namespace ChannelNumber - - namespace Rssi { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::DataModel::Nullable& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::DataModel::Nullable& value); - } // namespace Rssi - - namespace BeaconLostCount { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::DataModel::Nullable& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::DataModel::Nullable& value); - } // namespace BeaconLostCount - - namespace BeaconRxCount { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::DataModel::Nullable& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::DataModel::Nullable& value); - } // namespace BeaconRxCount - - namespace PacketMulticastRxCount { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::DataModel::Nullable& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::DataModel::Nullable& value); - } // namespace PacketMulticastRxCount - - namespace PacketMulticastTxCount { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::DataModel::Nullable& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::DataModel::Nullable& value); - } // namespace PacketMulticastTxCount - - namespace PacketUnicastRxCount { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::DataModel::Nullable& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::DataModel::Nullable& value); - } // namespace PacketUnicastRxCount - - namespace PacketUnicastTxCount { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::DataModel::Nullable& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::DataModel::Nullable& value); - } // namespace PacketUnicastTxCount - - namespace CurrentMaxRate { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::DataModel::Nullable& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::DataModel::Nullable& value); - } // namespace CurrentMaxRate - - namespace OverrunCount { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::DataModel::Nullable& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::DataModel::Nullable& value); - } // namespace OverrunCount - - namespace FeatureMap { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint32_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint32_t& value); - } // namespace FeatureMap - - namespace ClusterRevision { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); - } // namespace ClusterRevision - - } // namespace Attributes - } // namespace WiFiNetworkDiagnostics - - namespace EthernetNetworkDiagnostics { - namespace Attributes { - - namespace PHYRate { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, - chip::app::DataModel::Nullable& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, - const chip::app::DataModel::Nullable& value); - } // namespace PHYRate - - namespace FullDuplex { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::DataModel::Nullable& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::DataModel::Nullable& value); - } // namespace FullDuplex - - namespace PacketRxCount { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint64_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint64_t& value); - } // namespace PacketRxCount - - namespace PacketTxCount { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint64_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint64_t& value); - } // namespace PacketTxCount - - namespace TxErrCount { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint64_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint64_t& value); - } // namespace TxErrCount - - namespace CollisionCount { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint64_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint64_t& value); - } // namespace CollisionCount - - namespace OverrunCount { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint64_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint64_t& value); - } // namespace OverrunCount - - namespace CarrierDetect { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::DataModel::Nullable& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::DataModel::Nullable& value); - } // namespace CarrierDetect - - namespace TimeSinceReset { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint64_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint64_t& value); - } // namespace TimeSinceReset - - namespace FeatureMap { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint32_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint32_t& value); - } // namespace FeatureMap - - namespace ClusterRevision { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); - } // namespace ClusterRevision - - } // namespace Attributes - } // namespace EthernetNetworkDiagnostics - - namespace TimeSynchronization { - namespace Attributes { - - namespace UTCTime { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::DataModel::Nullable& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::DataModel::Nullable& value); - } // namespace UTCTime - - namespace Granularity { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, - chip::app::Clusters::TimeSynchronization::GranularityEnum& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, - const chip::app::Clusters::TimeSynchronization::GranularityEnum& value); - } // namespace Granularity - - namespace TimeSource { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, - chip::app::Clusters::TimeSynchronization::TimeSourceEnum& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, - const chip::app::Clusters::TimeSynchronization::TimeSourceEnum& value); - } // namespace TimeSource - - namespace TrustedTimeNodeId { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::DataModel::Nullable& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::DataModel::Nullable& value); - } // namespace TrustedTimeNodeId - - namespace DefaultNtp { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::DataModel::Nullable& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::DataModel::Nullable& value); - } // namespace DefaultNtp - - namespace LocalTime { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::DataModel::Nullable& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::DataModel::Nullable& value); - } // namespace LocalTime - - namespace TimeZoneDatabase { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, bool& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const bool& value); - } // namespace TimeZoneDatabase - - namespace NtpServerPort { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::DataModel::Nullable& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::DataModel::Nullable& value); - } // namespace NtpServerPort - - namespace FeatureMap { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint32_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint32_t& value); - } // namespace FeatureMap - - namespace ClusterRevision { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); - } // namespace ClusterRevision - - } // namespace Attributes - } // namespace TimeSynchronization - - namespace BridgedDeviceBasic { - namespace Attributes { - - namespace VendorName { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::CharSpan& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::CharSpan& value); - } // namespace VendorName - - namespace VendorID { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::VendorId& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::VendorId& value); - } // namespace VendorID - - namespace ProductName { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::CharSpan& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::CharSpan& value); - } // namespace ProductName - - namespace NodeLabel { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::CharSpan& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::CharSpan& value); - } // namespace NodeLabel - - namespace HardwareVersion { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); - } // namespace HardwareVersion - - namespace HardwareVersionString { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::CharSpan& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::CharSpan& value); - } // namespace HardwareVersionString - - namespace SoftwareVersion { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint32_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint32_t& value); - } // namespace SoftwareVersion - - namespace SoftwareVersionString { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::CharSpan& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::CharSpan& value); - } // namespace SoftwareVersionString - - namespace ManufacturingDate { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::CharSpan& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::CharSpan& value); - } // namespace ManufacturingDate - - namespace PartNumber { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::CharSpan& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::CharSpan& value); - } // namespace PartNumber - - namespace ProductURL { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::CharSpan& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::CharSpan& value); - } // namespace ProductURL - - namespace ProductLabel { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::CharSpan& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::CharSpan& value); - } // namespace ProductLabel - - namespace SerialNumber { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::CharSpan& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::CharSpan& value); - } // namespace SerialNumber - - namespace Reachable { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, bool& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const bool& value); - } // namespace Reachable - - namespace UniqueID { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::CharSpan& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::CharSpan& value); - } // namespace UniqueID - - namespace FeatureMap { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint32_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint32_t& value); - } // namespace FeatureMap - - namespace ClusterRevision { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); - } // namespace ClusterRevision - - } // namespace Attributes - } // namespace BridgedDeviceBasic - - namespace Switch { - namespace Attributes { - - namespace NumberOfPositions { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint8_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint8_t& value); - } // namespace NumberOfPositions - - namespace CurrentPosition { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint8_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint8_t& value); - } // namespace CurrentPosition - - namespace MultiPressMax { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint8_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint8_t& value); - } // namespace MultiPressMax - - namespace FeatureMap { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint32_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint32_t& value); - } // namespace FeatureMap - - namespace ClusterRevision { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); - } // namespace ClusterRevision - - } // namespace Attributes - } // namespace Switch - - namespace AdministratorCommissioning { - namespace Attributes { - - namespace WindowStatus { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, - chip::app::Clusters::AdministratorCommissioning::CommissioningWindowStatus& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, - const chip::app::Clusters::AdministratorCommissioning::CommissioningWindowStatus& value); - } // namespace WindowStatus - - namespace AdminFabricIndex { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::DataModel::Nullable& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, - const chip::app::DataModel::Nullable& value); - } // namespace AdminFabricIndex - - namespace AdminVendorId { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::DataModel::Nullable& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::DataModel::Nullable& value); - } // namespace AdminVendorId - - namespace FeatureMap { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint32_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint32_t& value); - } // namespace FeatureMap - - namespace ClusterRevision { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); - } // namespace ClusterRevision - - } // namespace Attributes - } // namespace AdministratorCommissioning - - namespace OperationalCredentials { - namespace Attributes { - - namespace SupportedFabrics { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint8_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint8_t& value); - } // namespace SupportedFabrics - - namespace CommissionedFabrics { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint8_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint8_t& value); - } // namespace CommissionedFabrics - - namespace CurrentFabricIndex { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint8_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint8_t& value); - } // namespace CurrentFabricIndex - - namespace FeatureMap { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint32_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint32_t& value); - } // namespace FeatureMap - - namespace ClusterRevision { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); - } // namespace ClusterRevision - - } // namespace Attributes - } // namespace OperationalCredentials - - namespace GroupKeyManagement { - namespace Attributes { - - namespace MaxGroupsPerFabric { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); - } // namespace MaxGroupsPerFabric - - namespace MaxGroupKeysPerFabric { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); - } // namespace MaxGroupKeysPerFabric - - namespace FeatureMap { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint32_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint32_t& value); - } // namespace FeatureMap - - namespace ClusterRevision { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); - } // namespace ClusterRevision - - } // namespace Attributes - } // namespace GroupKeyManagement - - namespace FixedLabel { - namespace Attributes { - - namespace FeatureMap { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint32_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint32_t& value); - } // namespace FeatureMap - - namespace ClusterRevision { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); - } // namespace ClusterRevision - - } // namespace Attributes - } // namespace FixedLabel - - namespace UserLabel { - namespace Attributes { - - namespace FeatureMap { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint32_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint32_t& value); - } // namespace FeatureMap - - namespace ClusterRevision { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); - } // namespace ClusterRevision - - } // namespace Attributes - } // namespace UserLabel - - namespace ProxyConfiguration { - namespace Attributes { - - namespace FeatureMap { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint32_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint32_t& value); - } // namespace FeatureMap - - namespace ClusterRevision { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); - } // namespace ClusterRevision - - } // namespace Attributes - } // namespace ProxyConfiguration - - namespace ProxyDiscovery { - namespace Attributes { - - namespace FeatureMap { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint32_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint32_t& value); - } // namespace FeatureMap - - namespace ClusterRevision { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); - } // namespace ClusterRevision - - } // namespace Attributes - } // namespace ProxyDiscovery - - namespace ProxyValid { - namespace Attributes { - - namespace FeatureMap { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint32_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint32_t& value); - } // namespace FeatureMap - - namespace ClusterRevision { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); - } // namespace ClusterRevision - - } // namespace Attributes - } // namespace ProxyValid - - namespace BooleanState { - namespace Attributes { - - namespace StateValue { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, bool& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const bool& value); - } // namespace StateValue - - namespace FeatureMap { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint32_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint32_t& value); - } // namespace FeatureMap - - namespace ClusterRevision { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); - } // namespace ClusterRevision - - } // namespace Attributes - } // namespace BooleanState - - namespace ModeSelect { - namespace Attributes { - - namespace Description { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::CharSpan& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::CharSpan& value); - } // namespace Description - - namespace StandardNamespace { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::DataModel::Nullable& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::DataModel::Nullable& value); - } // namespace StandardNamespace - - namespace CurrentMode { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint8_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint8_t& value); - } // namespace CurrentMode - - namespace StartUpMode { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::DataModel::Nullable& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::DataModel::Nullable& value); - } // namespace StartUpMode - - namespace OnMode { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::DataModel::Nullable& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::DataModel::Nullable& value); - } // namespace OnMode - - namespace FeatureMap { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint32_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint32_t& value); - } // namespace FeatureMap - - namespace ClusterRevision { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); - } // namespace ClusterRevision - - } // namespace Attributes - } // namespace ModeSelect - - namespace DoorLock { - namespace Attributes { - - namespace LockState { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, - chip::app::DataModel::Nullable& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, - const chip::app::DataModel::Nullable& value); - } // namespace LockState - - namespace LockType { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::Clusters::DoorLock::DlLockType& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::Clusters::DoorLock::DlLockType& value); - } // namespace LockType - - namespace ActuatorEnabled { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, bool& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const bool& value); - } // namespace ActuatorEnabled - - namespace DoorState { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, - chip::app::DataModel::Nullable& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, - const chip::app::DataModel::Nullable& value); - } // namespace DoorState - - namespace DoorOpenEvents { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint32_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint32_t& value); - } // namespace DoorOpenEvents - - namespace DoorClosedEvents { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint32_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint32_t& value); - } // namespace DoorClosedEvents - - namespace OpenPeriod { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); - } // namespace OpenPeriod - - namespace NumberOfTotalUsersSupported { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); - } // namespace NumberOfTotalUsersSupported - - namespace NumberOfPINUsersSupported { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); - } // namespace NumberOfPINUsersSupported - - namespace NumberOfRFIDUsersSupported { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); - } // namespace NumberOfRFIDUsersSupported - - namespace NumberOfWeekDaySchedulesSupportedPerUser { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint8_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint8_t& value); - } // namespace NumberOfWeekDaySchedulesSupportedPerUser - - namespace NumberOfYearDaySchedulesSupportedPerUser { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint8_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint8_t& value); - } // namespace NumberOfYearDaySchedulesSupportedPerUser - - namespace NumberOfHolidaySchedulesSupported { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint8_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint8_t& value); - } // namespace NumberOfHolidaySchedulesSupported - - namespace MaxPINCodeLength { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint8_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint8_t& value); - } // namespace MaxPINCodeLength - - namespace MinPINCodeLength { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint8_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint8_t& value); - } // namespace MinPINCodeLength - - namespace MaxRFIDCodeLength { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint8_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint8_t& value); - } // namespace MaxRFIDCodeLength - - namespace MinRFIDCodeLength { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint8_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint8_t& value); - } // namespace MinRFIDCodeLength - - namespace CredentialRulesSupport { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, - chip::BitMask& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, - const chip::BitMask& value); - } // namespace CredentialRulesSupport - - namespace NumberOfCredentialsSupportedPerUser { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint8_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint8_t& value); - } // namespace NumberOfCredentialsSupportedPerUser - - namespace Language { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::CharSpan& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::CharSpan& value); - } // namespace Language - - namespace LEDSettings { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint8_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint8_t& value); - } // namespace LEDSettings - - namespace AutoRelockTime { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint32_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint32_t& value); - } // namespace AutoRelockTime - - namespace SoundVolume { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint8_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint8_t& value); - } // namespace SoundVolume - - namespace OperatingMode { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::Clusters::DoorLock::DlOperatingMode& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::Clusters::DoorLock::DlOperatingMode& value); - } // namespace OperatingMode - - namespace SupportedOperatingModes { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, - chip::BitMask& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, - const chip::BitMask& value); - } // namespace SupportedOperatingModes - - namespace DefaultConfigurationRegister { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, - chip::BitMask& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, - const chip::BitMask& value); - } // namespace DefaultConfigurationRegister - - namespace EnableLocalProgramming { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, bool& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const bool& value); - } // namespace EnableLocalProgramming - - namespace EnableOneTouchLocking { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, bool& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const bool& value); - } // namespace EnableOneTouchLocking - - namespace EnableInsideStatusLED { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, bool& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const bool& value); - } // namespace EnableInsideStatusLED - - namespace EnablePrivacyModeButton { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, bool& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const bool& value); - } // namespace EnablePrivacyModeButton - - namespace LocalProgrammingFeatures { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, - chip::BitMask& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, - const chip::BitMask& value); - } // namespace LocalProgrammingFeatures - - namespace WrongCodeEntryLimit { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint8_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint8_t& value); - } // namespace WrongCodeEntryLimit - - namespace UserCodeTemporaryDisableTime { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint8_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint8_t& value); - } // namespace UserCodeTemporaryDisableTime - - namespace SendPINOverTheAir { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, bool& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const bool& value); - } // namespace SendPINOverTheAir - - namespace RequirePINforRemoteOperation { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, bool& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const bool& value); - } // namespace RequirePINforRemoteOperation - - namespace ExpiringUserTimeout { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); - } // namespace ExpiringUserTimeout - - namespace FeatureMap { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint32_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint32_t& value); - } // namespace FeatureMap - - namespace ClusterRevision { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); - } // 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); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::Clusters::WindowCovering::Type& value); - } // namespace Type - - namespace PhysicalClosedLimitLift { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); - } // namespace PhysicalClosedLimitLift - - namespace PhysicalClosedLimitTilt { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); - } // namespace PhysicalClosedLimitTilt - - namespace CurrentPositionLift { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::DataModel::Nullable& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::DataModel::Nullable& value); - } // namespace CurrentPositionLift - - namespace CurrentPositionTilt { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::DataModel::Nullable& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::DataModel::Nullable& value); - } // namespace CurrentPositionTilt - - namespace NumberOfActuationsLift { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); - } // namespace NumberOfActuationsLift - - namespace NumberOfActuationsTilt { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); - } // namespace NumberOfActuationsTilt - - namespace ConfigStatus { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, - chip::BitMask& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, - const chip::BitMask& value); - } // namespace ConfigStatus - - namespace CurrentPositionLiftPercentage { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::DataModel::Nullable& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::DataModel::Nullable& value); - } // namespace CurrentPositionLiftPercentage - - namespace CurrentPositionTiltPercentage { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::DataModel::Nullable& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::DataModel::Nullable& value); - } // namespace CurrentPositionTiltPercentage - - namespace OperationalStatus { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, - chip::BitMask& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, - const chip::BitMask& value); - } // namespace OperationalStatus - - namespace TargetPositionLiftPercent100ths { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::DataModel::Nullable& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, - const chip::app::DataModel::Nullable& value); - } // namespace TargetPositionLiftPercent100ths - - namespace TargetPositionTiltPercent100ths { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::DataModel::Nullable& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, - const chip::app::DataModel::Nullable& value); - } // namespace TargetPositionTiltPercent100ths - - namespace EndProductType { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::Clusters::WindowCovering::EndProductType& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, - const chip::app::Clusters::WindowCovering::EndProductType& value); - } // namespace EndProductType - - namespace CurrentPositionLiftPercent100ths { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::DataModel::Nullable& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, - const chip::app::DataModel::Nullable& value); - } // namespace CurrentPositionLiftPercent100ths - - namespace CurrentPositionTiltPercent100ths { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::DataModel::Nullable& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, - const chip::app::DataModel::Nullable& value); - } // namespace CurrentPositionTiltPercent100ths - - namespace InstalledOpenLimitLift { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); - } // namespace InstalledOpenLimitLift - - namespace InstalledClosedLimitLift { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); - } // namespace InstalledClosedLimitLift - - namespace InstalledOpenLimitTilt { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); - } // namespace InstalledOpenLimitTilt - - namespace InstalledClosedLimitTilt { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); - } // namespace InstalledClosedLimitTilt - - namespace Mode { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, - chip::BitMask& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, - const chip::BitMask& value); - } // namespace Mode - - namespace SafetyStatus { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, - chip::BitMask& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, - const chip::BitMask& value); - } // namespace SafetyStatus - - namespace FeatureMap { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint32_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint32_t& value); - } // namespace FeatureMap - - namespace ClusterRevision { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); - } // namespace ClusterRevision - - } // namespace Attributes - } // namespace WindowCovering - - namespace BarrierControl { - namespace Attributes { - - namespace BarrierMovingState { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint8_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint8_t& value); - } // namespace BarrierMovingState - - namespace BarrierSafetyStatus { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); - } // namespace BarrierSafetyStatus - - namespace BarrierCapabilities { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint8_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint8_t& value); - } // namespace BarrierCapabilities - - namespace BarrierOpenEvents { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); - } // namespace BarrierOpenEvents - - namespace BarrierCloseEvents { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); - } // namespace BarrierCloseEvents - - namespace BarrierCommandOpenEvents { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); - } // namespace BarrierCommandOpenEvents - - namespace BarrierCommandCloseEvents { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); - } // namespace BarrierCommandCloseEvents - - namespace BarrierOpenPeriod { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); - } // namespace BarrierOpenPeriod - - namespace BarrierClosePeriod { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); - } // namespace BarrierClosePeriod - - namespace BarrierPosition { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint8_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint8_t& value); - } // namespace BarrierPosition - - namespace FeatureMap { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint32_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint32_t& value); - } // namespace FeatureMap - - namespace ClusterRevision { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); - } // namespace ClusterRevision - - } // namespace Attributes - } // namespace BarrierControl - - namespace PumpConfigurationAndControl { - namespace Attributes { - - namespace MaxPressure { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::DataModel::Nullable& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::DataModel::Nullable& value); - } // namespace MaxPressure - - namespace MaxSpeed { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::DataModel::Nullable& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::DataModel::Nullable& value); - } // namespace MaxSpeed - - namespace MaxFlow { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::DataModel::Nullable& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::DataModel::Nullable& value); - } // namespace MaxFlow - - namespace MinConstPressure { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::DataModel::Nullable& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::DataModel::Nullable& value); - } // namespace MinConstPressure - - namespace MaxConstPressure { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::DataModel::Nullable& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::DataModel::Nullable& value); - } // namespace MaxConstPressure - - namespace MinCompPressure { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::DataModel::Nullable& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::DataModel::Nullable& value); - } // namespace MinCompPressure - - namespace MaxCompPressure { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::DataModel::Nullable& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::DataModel::Nullable& value); - } // namespace MaxCompPressure - - namespace MinConstSpeed { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::DataModel::Nullable& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::DataModel::Nullable& value); - } // namespace MinConstSpeed - - namespace MaxConstSpeed { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::DataModel::Nullable& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::DataModel::Nullable& value); - } // namespace MaxConstSpeed - - namespace MinConstFlow { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::DataModel::Nullable& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::DataModel::Nullable& value); - } // namespace MinConstFlow - - namespace MaxConstFlow { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::DataModel::Nullable& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::DataModel::Nullable& value); - } // namespace MaxConstFlow - - namespace MinConstTemp { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::DataModel::Nullable& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::DataModel::Nullable& value); - } // namespace MinConstTemp - - namespace MaxConstTemp { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::DataModel::Nullable& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::DataModel::Nullable& value); - } // namespace MaxConstTemp - - namespace PumpStatus { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, - chip::BitMask& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, - const chip::BitMask& value); - } // namespace PumpStatus - - namespace EffectiveOperationMode { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, - chip::app::Clusters::PumpConfigurationAndControl::PumpOperationMode& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, - const chip::app::Clusters::PumpConfigurationAndControl::PumpOperationMode& value); - } // namespace EffectiveOperationMode - - namespace EffectiveControlMode { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, - chip::app::Clusters::PumpConfigurationAndControl::PumpControlMode& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, - const chip::app::Clusters::PumpConfigurationAndControl::PumpControlMode& value); - } // namespace EffectiveControlMode - - namespace Capacity { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::DataModel::Nullable& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::DataModel::Nullable& value); - } // namespace Capacity - - namespace Speed { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::DataModel::Nullable& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::DataModel::Nullable& value); - } // namespace Speed - - namespace LifetimeRunningHours { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::DataModel::Nullable& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::DataModel::Nullable& value); - } // namespace LifetimeRunningHours - - namespace Power { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::DataModel::Nullable& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::DataModel::Nullable& value); - } // namespace Power - - namespace LifetimeEnergyConsumed { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::DataModel::Nullable& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::DataModel::Nullable& value); - } // namespace LifetimeEnergyConsumed - - namespace OperationMode { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, - chip::app::Clusters::PumpConfigurationAndControl::PumpOperationMode& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, - const chip::app::Clusters::PumpConfigurationAndControl::PumpOperationMode& value); - } // namespace OperationMode - - namespace ControlMode { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, - chip::app::Clusters::PumpConfigurationAndControl::PumpControlMode& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, - const chip::app::Clusters::PumpConfigurationAndControl::PumpControlMode& value); - } // namespace ControlMode - - namespace FeatureMap { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint32_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint32_t& value); - } // namespace FeatureMap - - namespace ClusterRevision { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); - } // namespace ClusterRevision - - } // namespace Attributes - } // namespace PumpConfigurationAndControl - - namespace Thermostat { - namespace Attributes { - - namespace LocalTemperature { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::DataModel::Nullable& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::DataModel::Nullable& value); - } // namespace LocalTemperature - - namespace OutdoorTemperature { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::DataModel::Nullable& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::DataModel::Nullable& value); - } // namespace OutdoorTemperature - - namespace Occupancy { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint8_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint8_t& value); - } // namespace Occupancy - - namespace AbsMinHeatSetpointLimit { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, int16_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const int16_t& value); - } // namespace AbsMinHeatSetpointLimit - - namespace AbsMaxHeatSetpointLimit { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, int16_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const int16_t& value); - } // namespace AbsMaxHeatSetpointLimit - - namespace AbsMinCoolSetpointLimit { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, int16_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const int16_t& value); - } // namespace AbsMinCoolSetpointLimit - - namespace AbsMaxCoolSetpointLimit { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, int16_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const int16_t& value); - } // namespace AbsMaxCoolSetpointLimit - - namespace PICoolingDemand { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint8_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint8_t& value); - } // namespace PICoolingDemand - - namespace PIHeatingDemand { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint8_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint8_t& value); - } // namespace PIHeatingDemand - - namespace HVACSystemTypeConfiguration { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint8_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint8_t& value); - } // namespace HVACSystemTypeConfiguration - - namespace LocalTemperatureCalibration { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, int8_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const int8_t& value); - } // namespace LocalTemperatureCalibration - - namespace OccupiedCoolingSetpoint { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, int16_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const int16_t& value); - } // namespace OccupiedCoolingSetpoint - - namespace OccupiedHeatingSetpoint { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, int16_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const int16_t& value); - } // namespace OccupiedHeatingSetpoint - - namespace UnoccupiedCoolingSetpoint { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, int16_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const int16_t& value); - } // namespace UnoccupiedCoolingSetpoint - - namespace UnoccupiedHeatingSetpoint { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, int16_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const int16_t& value); - } // namespace UnoccupiedHeatingSetpoint - - namespace MinHeatSetpointLimit { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, int16_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const int16_t& value); - } // namespace MinHeatSetpointLimit - - namespace MaxHeatSetpointLimit { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, int16_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const int16_t& value); - } // namespace MaxHeatSetpointLimit - - namespace MinCoolSetpointLimit { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, int16_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const int16_t& value); - } // namespace MinCoolSetpointLimit - - namespace MaxCoolSetpointLimit { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, int16_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const int16_t& value); - } // namespace MaxCoolSetpointLimit - - namespace MinSetpointDeadBand { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, int8_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const int8_t& value); - } // namespace MinSetpointDeadBand - - namespace RemoteSensing { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint8_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint8_t& value); - } // namespace RemoteSensing - - namespace ControlSequenceOfOperation { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, - chip::app::Clusters::Thermostat::ThermostatControlSequence& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, - const chip::app::Clusters::Thermostat::ThermostatControlSequence& value); - } // namespace ControlSequenceOfOperation - - namespace SystemMode { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint8_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint8_t& value); - } // namespace SystemMode - - namespace ThermostatRunningMode { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint8_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint8_t& value); - } // namespace ThermostatRunningMode - - namespace StartOfWeek { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint8_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint8_t& value); - } // namespace StartOfWeek - - namespace NumberOfWeeklyTransitions { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint8_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint8_t& value); - } // namespace NumberOfWeeklyTransitions - - namespace NumberOfDailyTransitions { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint8_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint8_t& value); - } // namespace NumberOfDailyTransitions - - namespace TemperatureSetpointHold { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint8_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint8_t& value); - } // namespace TemperatureSetpointHold - - namespace TemperatureSetpointHoldDuration { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::DataModel::Nullable& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::DataModel::Nullable& value); - } // namespace TemperatureSetpointHoldDuration - - namespace ThermostatProgrammingOperationMode { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint8_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint8_t& value); - } // namespace ThermostatProgrammingOperationMode - - namespace ThermostatRunningState { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); - } // namespace ThermostatRunningState - - namespace SetpointChangeSource { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint8_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint8_t& value); - } // namespace SetpointChangeSource - - namespace SetpointChangeAmount { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::DataModel::Nullable& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::DataModel::Nullable& value); - } // namespace SetpointChangeAmount - - namespace SetpointChangeSourceTimestamp { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint32_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint32_t& value); - } // namespace SetpointChangeSourceTimestamp - - namespace OccupiedSetback { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::DataModel::Nullable& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::DataModel::Nullable& value); - } // namespace OccupiedSetback - - namespace OccupiedSetbackMin { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::DataModel::Nullable& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::DataModel::Nullable& value); - } // namespace OccupiedSetbackMin - - namespace OccupiedSetbackMax { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::DataModel::Nullable& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::DataModel::Nullable& value); - } // namespace OccupiedSetbackMax - - namespace UnoccupiedSetback { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::DataModel::Nullable& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::DataModel::Nullable& value); - } // namespace UnoccupiedSetback - - namespace UnoccupiedSetbackMin { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::DataModel::Nullable& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::DataModel::Nullable& value); - } // namespace UnoccupiedSetbackMin - - namespace UnoccupiedSetbackMax { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::DataModel::Nullable& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::DataModel::Nullable& value); - } // namespace UnoccupiedSetbackMax - - namespace EmergencyHeatDelta { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint8_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint8_t& value); - } // namespace EmergencyHeatDelta - - namespace ACType { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint8_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint8_t& value); - } // namespace ACType - - namespace ACCapacity { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); - } // namespace ACCapacity - - namespace ACRefrigerantType { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint8_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint8_t& value); - } // namespace ACRefrigerantType - - namespace ACCompressorType { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint8_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint8_t& value); - } // namespace ACCompressorType - - namespace ACErrorCode { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint32_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint32_t& value); - } // namespace ACErrorCode - - namespace ACLouverPosition { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint8_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint8_t& value); - } // namespace ACLouverPosition - - namespace ACCoilTemperature { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::DataModel::Nullable& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::DataModel::Nullable& value); - } // namespace ACCoilTemperature - - namespace ACCapacityformat { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint8_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint8_t& value); - } // namespace ACCapacityformat - - namespace FeatureMap { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint32_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint32_t& value); - } // namespace FeatureMap - - namespace ClusterRevision { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); - } // namespace ClusterRevision - - } // namespace Attributes - } // namespace Thermostat - - namespace FanControl { - namespace Attributes { - - namespace FanMode { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::Clusters::FanControl::FanModeType& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::Clusters::FanControl::FanModeType& value); - } // namespace FanMode - - namespace FanModeSequence { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::Clusters::FanControl::FanModeSequenceType& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, - const chip::app::Clusters::FanControl::FanModeSequenceType& value); - } // namespace FanModeSequence - - namespace PercentSetting { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::DataModel::Nullable& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::DataModel::Nullable& value); - } // namespace PercentSetting - - namespace PercentCurrent { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint8_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint8_t& value); - } // namespace PercentCurrent - - namespace SpeedMax { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint8_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint8_t& value); - } // namespace SpeedMax - - namespace SpeedSetting { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::DataModel::Nullable& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::DataModel::Nullable& value); - } // namespace SpeedSetting - - namespace SpeedCurrent { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint8_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint8_t& value); - } // namespace SpeedCurrent - - namespace RockSupport { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint8_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint8_t& value); - } // namespace RockSupport - - namespace RockSetting { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint8_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint8_t& value); - } // namespace RockSetting - - namespace WindSupport { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint8_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint8_t& value); - } // namespace WindSupport - - namespace WindSetting { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint8_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint8_t& value); - } // namespace WindSetting - - namespace FeatureMap { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint32_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint32_t& value); - } // namespace FeatureMap - - namespace ClusterRevision { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); - } // namespace ClusterRevision - - } // namespace Attributes - } // namespace FanControl - - namespace ThermostatUserInterfaceConfiguration { - namespace Attributes { - - namespace TemperatureDisplayMode { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint8_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint8_t& value); - } // namespace TemperatureDisplayMode - - namespace KeypadLockout { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint8_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint8_t& value); - } // namespace KeypadLockout - - namespace ScheduleProgrammingVisibility { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint8_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint8_t& value); - } // namespace ScheduleProgrammingVisibility - - namespace FeatureMap { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint32_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint32_t& value); - } // namespace FeatureMap - - namespace ClusterRevision { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); - } // namespace ClusterRevision - - } // namespace Attributes - } // namespace ThermostatUserInterfaceConfiguration - - namespace ColorControl { - namespace Attributes { - - namespace CurrentHue { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint8_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint8_t& value); - } // namespace CurrentHue - - namespace CurrentSaturation { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint8_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint8_t& value); - } // namespace CurrentSaturation - - namespace RemainingTime { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); - } // namespace RemainingTime - - namespace CurrentX { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); - } // namespace CurrentX - - namespace CurrentY { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); - } // namespace CurrentY - - namespace DriftCompensation { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint8_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint8_t& value); - } // namespace DriftCompensation - - namespace CompensationText { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::CharSpan& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::CharSpan& value); - } // namespace CompensationText - - namespace ColorTemperatureMireds { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); - } // namespace ColorTemperatureMireds - - namespace ColorMode { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint8_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint8_t& value); - } // namespace ColorMode - - namespace Options { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint8_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint8_t& value); - } // namespace Options - - namespace NumberOfPrimaries { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::DataModel::Nullable& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::DataModel::Nullable& value); - } // namespace NumberOfPrimaries - - namespace Primary1X { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); - } // namespace Primary1X - - namespace Primary1Y { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); - } // namespace Primary1Y - - namespace Primary1Intensity { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::DataModel::Nullable& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::DataModel::Nullable& value); - } // namespace Primary1Intensity - - namespace Primary2X { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); - } // namespace Primary2X - - namespace Primary2Y { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); - } // namespace Primary2Y - - namespace Primary2Intensity { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::DataModel::Nullable& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::DataModel::Nullable& value); - } // namespace Primary2Intensity - - namespace Primary3X { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); - } // namespace Primary3X - - namespace Primary3Y { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); - } // namespace Primary3Y - - namespace Primary3Intensity { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::DataModel::Nullable& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::DataModel::Nullable& value); - } // namespace Primary3Intensity - - namespace Primary4X { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); - } // namespace Primary4X - - namespace Primary4Y { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); - } // namespace Primary4Y - - namespace Primary4Intensity { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::DataModel::Nullable& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::DataModel::Nullable& value); - } // namespace Primary4Intensity - - namespace Primary5X { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); - } // namespace Primary5X - - namespace Primary5Y { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); - } // namespace Primary5Y - - namespace Primary5Intensity { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::DataModel::Nullable& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::DataModel::Nullable& value); - } // namespace Primary5Intensity - - namespace Primary6X { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); - } // namespace Primary6X - - namespace Primary6Y { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); - } // namespace Primary6Y - - namespace Primary6Intensity { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::DataModel::Nullable& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::DataModel::Nullable& value); - } // namespace Primary6Intensity - - namespace WhitePointX { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); - } // namespace WhitePointX - - namespace WhitePointY { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); - } // namespace WhitePointY - - namespace ColorPointRX { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); - } // namespace ColorPointRX - - namespace ColorPointRY { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); - } // namespace ColorPointRY - - namespace ColorPointRIntensity { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::DataModel::Nullable& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::DataModel::Nullable& value); - } // namespace ColorPointRIntensity - - namespace ColorPointGX { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); - } // namespace ColorPointGX - - namespace ColorPointGY { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); - } // namespace ColorPointGY - - namespace ColorPointGIntensity { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::DataModel::Nullable& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::DataModel::Nullable& value); - } // namespace ColorPointGIntensity - - namespace ColorPointBX { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); - } // namespace ColorPointBX - - namespace ColorPointBY { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); - } // namespace ColorPointBY - - namespace ColorPointBIntensity { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::DataModel::Nullable& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::DataModel::Nullable& value); - } // namespace ColorPointBIntensity - - namespace EnhancedCurrentHue { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); - } // namespace EnhancedCurrentHue - - namespace EnhancedColorMode { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint8_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint8_t& value); - } // namespace EnhancedColorMode - - namespace ColorLoopActive { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint8_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint8_t& value); - } // namespace ColorLoopActive - - namespace ColorLoopDirection { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint8_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint8_t& value); - } // namespace ColorLoopDirection - - namespace ColorLoopTime { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); - } // namespace ColorLoopTime - - namespace ColorLoopStartEnhancedHue { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); - } // namespace ColorLoopStartEnhancedHue - - namespace ColorLoopStoredEnhancedHue { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); - } // namespace ColorLoopStoredEnhancedHue - - namespace ColorCapabilities { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); - } // namespace ColorCapabilities - - namespace ColorTempPhysicalMinMireds { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); - } // namespace ColorTempPhysicalMinMireds - - namespace ColorTempPhysicalMaxMireds { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); - } // namespace ColorTempPhysicalMaxMireds - - namespace CoupleColorTempToLevelMinMireds { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); - } // namespace CoupleColorTempToLevelMinMireds - - namespace StartUpColorTemperatureMireds { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::DataModel::Nullable& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::DataModel::Nullable& value); - } // namespace StartUpColorTemperatureMireds - - namespace FeatureMap { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint32_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint32_t& value); - } // namespace FeatureMap - - namespace ClusterRevision { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); - } // namespace ClusterRevision - - } // namespace Attributes - } // namespace ColorControl - - namespace BallastConfiguration { - namespace Attributes { - - namespace PhysicalMinLevel { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint8_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint8_t& value); - } // namespace PhysicalMinLevel - - namespace PhysicalMaxLevel { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint8_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint8_t& value); - } // namespace PhysicalMaxLevel - - namespace BallastStatus { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint8_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint8_t& value); - } // namespace BallastStatus - - namespace MinLevel { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint8_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint8_t& value); - } // namespace MinLevel - - namespace MaxLevel { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint8_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint8_t& value); - } // namespace MaxLevel - - namespace IntrinsicBalanceFactor { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::DataModel::Nullable& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::DataModel::Nullable& value); - } // namespace IntrinsicBalanceFactor - - namespace BallastFactorAdjustment { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::DataModel::Nullable& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::DataModel::Nullable& value); - } // namespace BallastFactorAdjustment - - namespace LampQuantity { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint8_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint8_t& value); - } // namespace LampQuantity - - namespace LampType { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::CharSpan& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::CharSpan& value); - } // namespace LampType - - namespace LampManufacturer { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::CharSpan& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::CharSpan& value); - } // namespace LampManufacturer - - namespace LampRatedHours { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::DataModel::Nullable& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::DataModel::Nullable& value); - } // namespace LampRatedHours - - namespace LampBurnHours { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::DataModel::Nullable& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::DataModel::Nullable& value); - } // namespace LampBurnHours - - namespace LampAlarmMode { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint8_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint8_t& value); - } // namespace LampAlarmMode - - namespace LampBurnHoursTripPoint { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::DataModel::Nullable& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::DataModel::Nullable& value); - } // namespace LampBurnHoursTripPoint - - namespace FeatureMap { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint32_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint32_t& value); - } // namespace FeatureMap - - namespace ClusterRevision { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); - } // namespace ClusterRevision - - } // namespace Attributes - } // namespace BallastConfiguration - - namespace IlluminanceMeasurement { - namespace Attributes { - - namespace MeasuredValue { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::DataModel::Nullable& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::DataModel::Nullable& value); - } // namespace MeasuredValue - - namespace MinMeasuredValue { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::DataModel::Nullable& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::DataModel::Nullable& value); - } // namespace MinMeasuredValue - - namespace MaxMeasuredValue { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::DataModel::Nullable& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::DataModel::Nullable& value); - } // namespace MaxMeasuredValue - - namespace Tolerance { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); - } // namespace Tolerance - - namespace LightSensorType { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::DataModel::Nullable& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::DataModel::Nullable& value); - } // namespace LightSensorType - - namespace FeatureMap { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint32_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint32_t& value); - } // namespace FeatureMap - - namespace ClusterRevision { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); - } // namespace ClusterRevision - - } // namespace Attributes - } // namespace IlluminanceMeasurement - - namespace TemperatureMeasurement { - namespace Attributes { - - namespace MeasuredValue { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::DataModel::Nullable& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::DataModel::Nullable& value); - } // namespace MeasuredValue - - namespace MinMeasuredValue { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::DataModel::Nullable& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::DataModel::Nullable& value); - } // namespace MinMeasuredValue - - namespace MaxMeasuredValue { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::DataModel::Nullable& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::DataModel::Nullable& value); - } // namespace MaxMeasuredValue - - namespace Tolerance { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); - } // namespace Tolerance - - namespace FeatureMap { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint32_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint32_t& value); - } // namespace FeatureMap - - namespace ClusterRevision { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); - } // namespace ClusterRevision - - } // namespace Attributes - } // namespace TemperatureMeasurement - - namespace PressureMeasurement { - namespace Attributes { - - namespace MeasuredValue { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::DataModel::Nullable& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::DataModel::Nullable& value); - } // namespace MeasuredValue - - namespace MinMeasuredValue { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::DataModel::Nullable& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::DataModel::Nullable& value); - } // namespace MinMeasuredValue - - namespace MaxMeasuredValue { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::DataModel::Nullable& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::DataModel::Nullable& value); - } // namespace MaxMeasuredValue - - namespace Tolerance { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); - } // namespace Tolerance - - namespace ScaledValue { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::DataModel::Nullable& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::DataModel::Nullable& value); - } // namespace ScaledValue - - namespace MinScaledValue { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::DataModel::Nullable& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::DataModel::Nullable& value); - } // namespace MinScaledValue - - namespace MaxScaledValue { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::DataModel::Nullable& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::DataModel::Nullable& value); - } // namespace MaxScaledValue - - namespace ScaledTolerance { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); - } // namespace ScaledTolerance - - namespace Scale { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, int8_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const int8_t& value); - } // namespace Scale - - namespace FeatureMap { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint32_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint32_t& value); - } // namespace FeatureMap - - namespace ClusterRevision { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); - } // namespace ClusterRevision - - } // namespace Attributes - } // namespace PressureMeasurement - - namespace FlowMeasurement { - namespace Attributes { - - namespace MeasuredValue { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::DataModel::Nullable& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::DataModel::Nullable& value); - } // namespace MeasuredValue - - namespace MinMeasuredValue { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::DataModel::Nullable& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::DataModel::Nullable& value); - } // namespace MinMeasuredValue - - namespace MaxMeasuredValue { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::DataModel::Nullable& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::DataModel::Nullable& value); - } // namespace MaxMeasuredValue - - namespace Tolerance { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); - } // namespace Tolerance - - namespace FeatureMap { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint32_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint32_t& value); - } // namespace FeatureMap - - namespace ClusterRevision { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); - } // namespace ClusterRevision - - } // namespace Attributes - } // namespace FlowMeasurement - - namespace RelativeHumidityMeasurement { - namespace Attributes { - - namespace MeasuredValue { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::DataModel::Nullable& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::DataModel::Nullable& value); - } // namespace MeasuredValue - - namespace MinMeasuredValue { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::DataModel::Nullable& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::DataModel::Nullable& value); - } // namespace MinMeasuredValue - - namespace MaxMeasuredValue { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::DataModel::Nullable& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::DataModel::Nullable& value); - } // namespace MaxMeasuredValue - - namespace Tolerance { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); - } // namespace Tolerance - - namespace FeatureMap { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint32_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint32_t& value); - } // namespace FeatureMap - - namespace ClusterRevision { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); - } // namespace ClusterRevision - - } // namespace Attributes - } // namespace RelativeHumidityMeasurement - - namespace OccupancySensing { - namespace Attributes { - - namespace Occupancy { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint8_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint8_t& value); - } // namespace Occupancy - - namespace OccupancySensorType { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint8_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint8_t& value); - } // namespace OccupancySensorType - - namespace OccupancySensorTypeBitmap { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint8_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint8_t& value); - } // namespace OccupancySensorTypeBitmap - - namespace PirOccupiedToUnoccupiedDelay { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); - } // namespace PirOccupiedToUnoccupiedDelay - - namespace PirUnoccupiedToOccupiedDelay { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); - } // namespace PirUnoccupiedToOccupiedDelay - - namespace PirUnoccupiedToOccupiedThreshold { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint8_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint8_t& value); - } // namespace PirUnoccupiedToOccupiedThreshold - - namespace UltrasonicOccupiedToUnoccupiedDelay { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); - } // namespace UltrasonicOccupiedToUnoccupiedDelay - - namespace UltrasonicUnoccupiedToOccupiedDelay { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); - } // namespace UltrasonicUnoccupiedToOccupiedDelay - - namespace UltrasonicUnoccupiedToOccupiedThreshold { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint8_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint8_t& value); - } // namespace UltrasonicUnoccupiedToOccupiedThreshold - - namespace PhysicalContactOccupiedToUnoccupiedDelay { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); - } // namespace PhysicalContactOccupiedToUnoccupiedDelay - - namespace PhysicalContactUnoccupiedToOccupiedDelay { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); - } // namespace PhysicalContactUnoccupiedToOccupiedDelay - - namespace PhysicalContactUnoccupiedToOccupiedThreshold { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint8_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint8_t& value); - } // namespace PhysicalContactUnoccupiedToOccupiedThreshold - - namespace FeatureMap { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint32_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint32_t& value); - } // namespace FeatureMap - - namespace ClusterRevision { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); - } // namespace ClusterRevision - - } // namespace Attributes - } // namespace OccupancySensing - - namespace WakeOnLan { - namespace Attributes { - - namespace MACAddress { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::CharSpan& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::CharSpan& value); - } // namespace MACAddress - - namespace FeatureMap { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint32_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint32_t& value); - } // namespace FeatureMap - - namespace ClusterRevision { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); - } // namespace ClusterRevision - - } // namespace Attributes - } // namespace WakeOnLan - - namespace Channel { - namespace Attributes { - - namespace FeatureMap { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint32_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint32_t& value); - } // namespace FeatureMap - - namespace ClusterRevision { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); - } // namespace ClusterRevision - - } // namespace Attributes - } // namespace Channel - - namespace TargetNavigator { - namespace Attributes { - - namespace CurrentTarget { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint8_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint8_t& value); - } // namespace CurrentTarget - - namespace FeatureMap { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint32_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint32_t& value); - } // namespace FeatureMap - - namespace ClusterRevision { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); - } // namespace ClusterRevision - - } // namespace Attributes - } // namespace TargetNavigator - - namespace MediaPlayback { - namespace Attributes { - - namespace CurrentState { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::Clusters::MediaPlayback::PlaybackStateEnum& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, - const chip::app::Clusters::MediaPlayback::PlaybackStateEnum& value); - } // namespace CurrentState - - namespace StartTime { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::DataModel::Nullable& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::DataModel::Nullable& value); - } // namespace StartTime - - namespace Duration { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::DataModel::Nullable& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::DataModel::Nullable& value); - } // namespace Duration - - namespace PlaybackSpeed { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, float& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const float& value); - } // namespace PlaybackSpeed - - namespace SeekRangeEnd { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::DataModel::Nullable& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::DataModel::Nullable& value); - } // namespace SeekRangeEnd - - namespace SeekRangeStart { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::DataModel::Nullable& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::DataModel::Nullable& value); - } // namespace SeekRangeStart - - namespace FeatureMap { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint32_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint32_t& value); - } // namespace FeatureMap - - namespace ClusterRevision { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); - } // namespace ClusterRevision - - } // namespace Attributes - } // namespace MediaPlayback - - namespace MediaInput { - namespace Attributes { - - namespace CurrentInput { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint8_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint8_t& value); - } // namespace CurrentInput - - namespace FeatureMap { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint32_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint32_t& value); - } // namespace FeatureMap - - namespace ClusterRevision { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); - } // namespace ClusterRevision - - } // namespace Attributes - } // namespace MediaInput - - namespace LowPower { - namespace Attributes { - - namespace FeatureMap { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint32_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint32_t& value); - } // namespace FeatureMap - - namespace ClusterRevision { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); - } // namespace ClusterRevision - - } // namespace Attributes - } // namespace LowPower - - namespace KeypadInput { - namespace Attributes { - - namespace FeatureMap { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint32_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint32_t& value); - } // namespace FeatureMap - - namespace ClusterRevision { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); - } // namespace ClusterRevision - - } // namespace Attributes - } // namespace KeypadInput - - namespace ContentLauncher { - namespace Attributes { - - namespace SupportedStreamingProtocols { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint32_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint32_t& value); - } // namespace SupportedStreamingProtocols - - namespace FeatureMap { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint32_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint32_t& value); - } // namespace FeatureMap - - namespace ClusterRevision { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); - } // namespace ClusterRevision - - } // namespace Attributes - } // namespace ContentLauncher - - namespace AudioOutput { - namespace Attributes { - - namespace CurrentOutput { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint8_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint8_t& value); - } // namespace CurrentOutput - - namespace FeatureMap { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint32_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint32_t& value); - } // namespace FeatureMap - - namespace ClusterRevision { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); - } // namespace ClusterRevision - - } // namespace Attributes - } // namespace AudioOutput - - namespace ApplicationLauncher { - namespace Attributes { - - namespace FeatureMap { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint32_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint32_t& value); - } // namespace FeatureMap - - namespace ClusterRevision { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); - } // namespace ClusterRevision - - } // namespace Attributes - } // namespace ApplicationLauncher - - namespace ApplicationBasic { - namespace Attributes { - - namespace VendorName { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::CharSpan& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::CharSpan& value); - } // namespace VendorName - - namespace VendorID { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::VendorId& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::VendorId& value); - } // namespace VendorID - - namespace ApplicationName { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::CharSpan& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::CharSpan& value); - } // namespace ApplicationName - - namespace ProductID { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); - } // namespace ProductID - - namespace Status { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, - chip::app::Clusters::ApplicationBasic::ApplicationStatusEnum& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, - const chip::app::Clusters::ApplicationBasic::ApplicationStatusEnum& value); - } // namespace Status - - namespace ApplicationVersion { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::CharSpan& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::CharSpan& value); - } // namespace ApplicationVersion - - namespace FeatureMap { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint32_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint32_t& value); - } // namespace FeatureMap - - namespace ClusterRevision { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); - } // namespace ClusterRevision - - } // namespace Attributes - } // namespace ApplicationBasic - - namespace AccountLogin { - namespace Attributes { - - namespace FeatureMap { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint32_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint32_t& value); - } // namespace FeatureMap - - namespace ClusterRevision { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); - } // namespace ClusterRevision - - } // namespace Attributes - } // namespace AccountLogin - - namespace ElectricalMeasurement { - namespace Attributes { - - namespace MeasurementType { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint32_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint32_t& value); - } // namespace MeasurementType - - namespace DcVoltage { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, int16_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const int16_t& value); - } // namespace DcVoltage - - namespace DcVoltageMin { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, int16_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const int16_t& value); - } // namespace DcVoltageMin - - namespace DcVoltageMax { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, int16_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const int16_t& value); - } // namespace DcVoltageMax - - namespace DcCurrent { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, int16_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const int16_t& value); - } // namespace DcCurrent - - namespace DcCurrentMin { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, int16_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const int16_t& value); - } // namespace DcCurrentMin - - namespace DcCurrentMax { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, int16_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const int16_t& value); - } // namespace DcCurrentMax - - namespace DcPower { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, int16_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const int16_t& value); - } // namespace DcPower - - namespace DcPowerMin { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, int16_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const int16_t& value); - } // namespace DcPowerMin - - namespace DcPowerMax { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, int16_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const int16_t& value); - } // namespace DcPowerMax - - namespace DcVoltageMultiplier { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); - } // namespace DcVoltageMultiplier - - namespace DcVoltageDivisor { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); - } // namespace DcVoltageDivisor - - namespace DcCurrentMultiplier { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); - } // namespace DcCurrentMultiplier - - namespace DcCurrentDivisor { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); - } // namespace DcCurrentDivisor - - namespace DcPowerMultiplier { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); - } // namespace DcPowerMultiplier - - namespace DcPowerDivisor { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); - } // namespace DcPowerDivisor - - namespace AcFrequency { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); - } // namespace AcFrequency - - namespace AcFrequencyMin { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); - } // namespace AcFrequencyMin - - namespace AcFrequencyMax { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); - } // namespace AcFrequencyMax - - namespace NeutralCurrent { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); - } // namespace NeutralCurrent - - namespace TotalActivePower { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, int32_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const int32_t& value); - } // namespace TotalActivePower - - namespace TotalReactivePower { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, int32_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const int32_t& value); - } // namespace TotalReactivePower - - namespace TotalApparentPower { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint32_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint32_t& value); - } // namespace TotalApparentPower - - namespace Measured1stHarmonicCurrent { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, int16_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const int16_t& value); - } // namespace Measured1stHarmonicCurrent - - namespace Measured3rdHarmonicCurrent { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, int16_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const int16_t& value); - } // namespace Measured3rdHarmonicCurrent - - namespace Measured5thHarmonicCurrent { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, int16_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const int16_t& value); - } // namespace Measured5thHarmonicCurrent - - namespace Measured7thHarmonicCurrent { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, int16_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const int16_t& value); - } // namespace Measured7thHarmonicCurrent - - namespace Measured9thHarmonicCurrent { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, int16_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const int16_t& value); - } // namespace Measured9thHarmonicCurrent - - namespace Measured11thHarmonicCurrent { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, int16_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const int16_t& value); - } // namespace Measured11thHarmonicCurrent - - namespace MeasuredPhase1stHarmonicCurrent { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, int16_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const int16_t& value); - } // namespace MeasuredPhase1stHarmonicCurrent - - namespace MeasuredPhase3rdHarmonicCurrent { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, int16_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const int16_t& value); - } // namespace MeasuredPhase3rdHarmonicCurrent - - namespace MeasuredPhase5thHarmonicCurrent { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, int16_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const int16_t& value); - } // namespace MeasuredPhase5thHarmonicCurrent - - namespace MeasuredPhase7thHarmonicCurrent { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, int16_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const int16_t& value); - } // namespace MeasuredPhase7thHarmonicCurrent - - namespace MeasuredPhase9thHarmonicCurrent { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, int16_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const int16_t& value); - } // namespace MeasuredPhase9thHarmonicCurrent - - namespace MeasuredPhase11thHarmonicCurrent { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, int16_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const int16_t& value); - } // namespace MeasuredPhase11thHarmonicCurrent - - namespace AcFrequencyMultiplier { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); - } // namespace AcFrequencyMultiplier - - namespace AcFrequencyDivisor { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); - } // namespace AcFrequencyDivisor - - namespace PowerMultiplier { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint32_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint32_t& value); - } // namespace PowerMultiplier - - namespace PowerDivisor { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint32_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint32_t& value); - } // namespace PowerDivisor - - namespace HarmonicCurrentMultiplier { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, int8_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const int8_t& value); - } // namespace HarmonicCurrentMultiplier - - namespace PhaseHarmonicCurrentMultiplier { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, int8_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const int8_t& value); - } // namespace PhaseHarmonicCurrentMultiplier - - namespace InstantaneousVoltage { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, int16_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const int16_t& value); - } // namespace InstantaneousVoltage - - namespace InstantaneousLineCurrent { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); - } // namespace InstantaneousLineCurrent - - namespace InstantaneousActiveCurrent { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, int16_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const int16_t& value); - } // namespace InstantaneousActiveCurrent - - namespace InstantaneousReactiveCurrent { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, int16_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const int16_t& value); - } // namespace InstantaneousReactiveCurrent - - namespace InstantaneousPower { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, int16_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const int16_t& value); - } // namespace InstantaneousPower - - namespace RmsVoltage { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); - } // namespace RmsVoltage - - namespace RmsVoltageMin { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); - } // namespace RmsVoltageMin - - namespace RmsVoltageMax { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); - } // namespace RmsVoltageMax - - namespace RmsCurrent { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); - } // namespace RmsCurrent - - namespace RmsCurrentMin { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); - } // namespace RmsCurrentMin - - namespace RmsCurrentMax { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); - } // namespace RmsCurrentMax - - namespace ActivePower { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, int16_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const int16_t& value); - } // namespace ActivePower - - namespace ActivePowerMin { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, int16_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const int16_t& value); - } // namespace ActivePowerMin - - namespace ActivePowerMax { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, int16_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const int16_t& value); - } // namespace ActivePowerMax - - namespace ReactivePower { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, int16_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const int16_t& value); - } // namespace ReactivePower - - namespace ApparentPower { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); - } // namespace ApparentPower - - namespace PowerFactor { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, int8_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const int8_t& value); - } // namespace PowerFactor - - namespace AverageRmsVoltageMeasurementPeriod { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); - } // namespace AverageRmsVoltageMeasurementPeriod - - namespace AverageRmsUnderVoltageCounter { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); - } // namespace AverageRmsUnderVoltageCounter - - namespace RmsExtremeOverVoltagePeriod { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); - } // namespace RmsExtremeOverVoltagePeriod - - namespace RmsExtremeUnderVoltagePeriod { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); - } // namespace RmsExtremeUnderVoltagePeriod - - namespace RmsVoltageSagPeriod { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); - } // namespace RmsVoltageSagPeriod - - namespace RmsVoltageSwellPeriod { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); - } // namespace RmsVoltageSwellPeriod - - namespace AcVoltageMultiplier { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); - } // namespace AcVoltageMultiplier - - namespace AcVoltageDivisor { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); - } // namespace AcVoltageDivisor - - namespace AcCurrentMultiplier { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); - } // namespace AcCurrentMultiplier - - namespace AcCurrentDivisor { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); - } // namespace AcCurrentDivisor - - namespace AcPowerMultiplier { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); - } // namespace AcPowerMultiplier - - namespace AcPowerDivisor { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); - } // namespace AcPowerDivisor - - namespace OverloadAlarmsMask { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint8_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint8_t& value); - } // namespace OverloadAlarmsMask - - namespace VoltageOverload { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, int16_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const int16_t& value); - } // namespace VoltageOverload - - namespace CurrentOverload { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, int16_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const int16_t& value); - } // namespace CurrentOverload - - namespace AcOverloadAlarmsMask { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); - } // namespace AcOverloadAlarmsMask - - namespace AcVoltageOverload { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, int16_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const int16_t& value); - } // namespace AcVoltageOverload - - namespace AcCurrentOverload { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, int16_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const int16_t& value); - } // namespace AcCurrentOverload - - namespace AcActivePowerOverload { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, int16_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const int16_t& value); - } // namespace AcActivePowerOverload - - namespace AcReactivePowerOverload { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, int16_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const int16_t& value); - } // namespace AcReactivePowerOverload - - namespace AverageRmsOverVoltage { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, int16_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const int16_t& value); - } // namespace AverageRmsOverVoltage - - namespace AverageRmsUnderVoltage { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, int16_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const int16_t& value); - } // namespace AverageRmsUnderVoltage - - namespace RmsExtremeOverVoltage { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, int16_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const int16_t& value); - } // namespace RmsExtremeOverVoltage - - namespace RmsExtremeUnderVoltage { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, int16_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const int16_t& value); - } // namespace RmsExtremeUnderVoltage - - namespace RmsVoltageSag { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, int16_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const int16_t& value); - } // namespace RmsVoltageSag - - namespace RmsVoltageSwell { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, int16_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const int16_t& value); - } // namespace RmsVoltageSwell - - namespace LineCurrentPhaseB { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); - } // namespace LineCurrentPhaseB - - namespace ActiveCurrentPhaseB { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, int16_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const int16_t& value); - } // namespace ActiveCurrentPhaseB - - namespace ReactiveCurrentPhaseB { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, int16_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const int16_t& value); - } // namespace ReactiveCurrentPhaseB - - namespace RmsVoltagePhaseB { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); - } // namespace RmsVoltagePhaseB - - namespace RmsVoltageMinPhaseB { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); - } // namespace RmsVoltageMinPhaseB - - namespace RmsVoltageMaxPhaseB { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); - } // namespace RmsVoltageMaxPhaseB - - namespace RmsCurrentPhaseB { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); - } // namespace RmsCurrentPhaseB - - namespace RmsCurrentMinPhaseB { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); - } // namespace RmsCurrentMinPhaseB - - namespace RmsCurrentMaxPhaseB { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); - } // namespace RmsCurrentMaxPhaseB - - namespace ActivePowerPhaseB { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, int16_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const int16_t& value); - } // namespace ActivePowerPhaseB - - namespace ActivePowerMinPhaseB { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, int16_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const int16_t& value); - } // namespace ActivePowerMinPhaseB - - namespace ActivePowerMaxPhaseB { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, int16_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const int16_t& value); - } // namespace ActivePowerMaxPhaseB - - namespace ReactivePowerPhaseB { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, int16_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const int16_t& value); - } // namespace ReactivePowerPhaseB - - namespace ApparentPowerPhaseB { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); - } // namespace ApparentPowerPhaseB - - namespace PowerFactorPhaseB { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, int8_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const int8_t& value); - } // namespace PowerFactorPhaseB - - namespace AverageRmsVoltageMeasurementPeriodPhaseB { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); - } // namespace AverageRmsVoltageMeasurementPeriodPhaseB - - namespace AverageRmsOverVoltageCounterPhaseB { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); - } // namespace AverageRmsOverVoltageCounterPhaseB - - namespace AverageRmsUnderVoltageCounterPhaseB { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); - } // namespace AverageRmsUnderVoltageCounterPhaseB - - namespace RmsExtremeOverVoltagePeriodPhaseB { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); - } // namespace RmsExtremeOverVoltagePeriodPhaseB - - namespace RmsExtremeUnderVoltagePeriodPhaseB { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); - } // namespace RmsExtremeUnderVoltagePeriodPhaseB - - namespace RmsVoltageSagPeriodPhaseB { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); - } // namespace RmsVoltageSagPeriodPhaseB - - namespace RmsVoltageSwellPeriodPhaseB { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); - } // namespace RmsVoltageSwellPeriodPhaseB - - namespace LineCurrentPhaseC { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); - } // namespace LineCurrentPhaseC - - namespace ActiveCurrentPhaseC { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, int16_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const int16_t& value); - } // namespace ActiveCurrentPhaseC - - namespace ReactiveCurrentPhaseC { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, int16_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const int16_t& value); - } // namespace ReactiveCurrentPhaseC - - namespace RmsVoltagePhaseC { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); - } // namespace RmsVoltagePhaseC - - namespace RmsVoltageMinPhaseC { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); - } // namespace RmsVoltageMinPhaseC - - namespace RmsVoltageMaxPhaseC { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); - } // namespace RmsVoltageMaxPhaseC - - namespace RmsCurrentPhaseC { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); - } // namespace RmsCurrentPhaseC - - namespace RmsCurrentMinPhaseC { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); - } // namespace RmsCurrentMinPhaseC - - namespace RmsCurrentMaxPhaseC { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); - } // namespace RmsCurrentMaxPhaseC - - namespace ActivePowerPhaseC { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, int16_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const int16_t& value); - } // namespace ActivePowerPhaseC - - namespace ActivePowerMinPhaseC { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, int16_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const int16_t& value); - } // namespace ActivePowerMinPhaseC - - namespace ActivePowerMaxPhaseC { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, int16_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const int16_t& value); - } // namespace ActivePowerMaxPhaseC - - namespace ReactivePowerPhaseC { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, int16_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const int16_t& value); - } // namespace ReactivePowerPhaseC - - namespace ApparentPowerPhaseC { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); - } // namespace ApparentPowerPhaseC - - namespace PowerFactorPhaseC { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, int8_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const int8_t& value); - } // namespace PowerFactorPhaseC - - namespace AverageRmsVoltageMeasurementPeriodPhaseC { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); - } // namespace AverageRmsVoltageMeasurementPeriodPhaseC - - namespace AverageRmsOverVoltageCounterPhaseC { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); - } // namespace AverageRmsOverVoltageCounterPhaseC - - namespace AverageRmsUnderVoltageCounterPhaseC { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); - } // namespace AverageRmsUnderVoltageCounterPhaseC - - namespace RmsExtremeOverVoltagePeriodPhaseC { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); - } // namespace RmsExtremeOverVoltagePeriodPhaseC - - namespace RmsExtremeUnderVoltagePeriodPhaseC { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); - } // namespace RmsExtremeUnderVoltagePeriodPhaseC - - namespace RmsVoltageSagPeriodPhaseC { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); - } // namespace RmsVoltageSagPeriodPhaseC - - namespace RmsVoltageSwellPeriodPhaseC { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); - } // namespace RmsVoltageSwellPeriodPhaseC - - namespace FeatureMap { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint32_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint32_t& value); - } // namespace FeatureMap - - namespace ClusterRevision { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); - } // namespace ClusterRevision - - } // namespace Attributes - } // namespace ElectricalMeasurement - - namespace ClientMonitoring { - namespace Attributes { - - namespace IdleModeInterval { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint32_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint32_t& value); - } // namespace IdleModeInterval - - namespace ActiveModeInterval { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint32_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint32_t& value); - } // namespace ActiveModeInterval - - namespace ActiveModeThreshold { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); - } // namespace ActiveModeThreshold - - namespace FeatureMap { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint32_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint32_t& value); - } // namespace FeatureMap - - namespace ClusterRevision { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); - } // namespace ClusterRevision - - } // namespace Attributes - } // namespace ClientMonitoring - - namespace UnitTesting { - namespace Attributes { - - namespace Boolean { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, bool& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const bool& value); - } // namespace Boolean - - namespace Bitmap8 { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, - chip::BitMask& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, - const chip::BitMask& value); - } // namespace Bitmap8 - - namespace Bitmap16 { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, - chip::BitMask& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, - const chip::BitMask& value); - } // namespace Bitmap16 - - namespace Bitmap32 { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, - chip::BitMask& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, - const chip::BitMask& value); - } // namespace Bitmap32 - - namespace Bitmap64 { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, - chip::BitMask& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, - const chip::BitMask& value); - } // namespace Bitmap64 - - namespace Int8u { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint8_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint8_t& value); - } // namespace Int8u - - namespace Int16u { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); - } // namespace Int16u - - namespace Int24u { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint32_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint32_t& value); - } // namespace Int24u - - namespace Int32u { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint32_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint32_t& value); - } // namespace Int32u - - namespace Int40u { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint64_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint64_t& value); - } // namespace Int40u - - namespace Int48u { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint64_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint64_t& value); - } // namespace Int48u - - namespace Int56u { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint64_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint64_t& value); - } // namespace Int56u - - namespace Int64u { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint64_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint64_t& value); - } // namespace Int64u - - namespace Int8s { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, int8_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const int8_t& value); - } // namespace Int8s - - namespace Int16s { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, int16_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const int16_t& value); - } // namespace Int16s - - namespace Int24s { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, int32_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const int32_t& value); - } // namespace Int24s - - namespace Int32s { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, int32_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const int32_t& value); - } // namespace Int32s - - namespace Int40s { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, int64_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const int64_t& value); - } // namespace Int40s - - namespace Int48s { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, int64_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const int64_t& value); - } // namespace Int48s - - namespace Int56s { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, int64_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const int64_t& value); - } // namespace Int56s - - namespace Int64s { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, int64_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const int64_t& value); - } // namespace Int64s - - namespace Enum8 { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint8_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint8_t& value); - } // namespace Enum8 - - namespace Enum16 { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); - } // namespace Enum16 - - namespace FloatSingle { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, float& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const float& value); - } // namespace FloatSingle - - namespace FloatDouble { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, double& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const double& value); - } // namespace FloatDouble - - namespace OctetString { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::ByteSpan& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::ByteSpan& value); - } // namespace OctetString - - namespace LongOctetString { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::ByteSpan& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::ByteSpan& value); - } // namespace LongOctetString - - namespace CharString { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::CharSpan& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::CharSpan& value); - } // namespace CharString - - namespace LongCharString { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::CharSpan& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::CharSpan& value); - } // namespace LongCharString - - namespace EpochUs { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint64_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint64_t& value); - } // namespace EpochUs - - namespace EpochS { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint32_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint32_t& value); - } // namespace EpochS - - namespace VendorId { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::VendorId& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::VendorId& value); - } // namespace VendorId - - namespace EnumAttr { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::Clusters::UnitTesting::SimpleEnum& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::Clusters::UnitTesting::SimpleEnum& value); - } // namespace EnumAttr - - namespace RangeRestrictedInt8u { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint8_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint8_t& value); - } // namespace RangeRestrictedInt8u - - namespace RangeRestrictedInt8s { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, int8_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const int8_t& value); - } // namespace RangeRestrictedInt8s - - namespace RangeRestrictedInt16u { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); - } // namespace RangeRestrictedInt16u - - namespace RangeRestrictedInt16s { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, int16_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const int16_t& value); - } // namespace RangeRestrictedInt16s - - namespace TimedWriteBoolean { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, bool& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const bool& value); - } // namespace TimedWriteBoolean - - namespace GeneralErrorBoolean { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, bool& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const bool& value); - } // namespace GeneralErrorBoolean - - namespace ClusterErrorBoolean { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, bool& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const bool& value); - } // namespace ClusterErrorBoolean - - namespace Unsupported { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, bool& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const bool& value); - } // namespace Unsupported - - namespace NullableBoolean { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::DataModel::Nullable& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::DataModel::Nullable& value); - } // namespace NullableBoolean - - namespace NullableBitmap8 { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, - chip::app::DataModel::Nullable>& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, - const chip::app::DataModel::Nullable>& value); - } // namespace NullableBitmap8 - - namespace NullableBitmap16 { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, - chip::app::DataModel::Nullable>& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, - const chip::app::DataModel::Nullable>& value); - } // namespace NullableBitmap16 - - namespace NullableBitmap32 { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, - chip::app::DataModel::Nullable>& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, - const chip::app::DataModel::Nullable>& value); - } // namespace NullableBitmap32 - - namespace NullableBitmap64 { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, - chip::app::DataModel::Nullable>& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, - const chip::app::DataModel::Nullable>& value); - } // namespace NullableBitmap64 - - namespace NullableInt8u { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::DataModel::Nullable& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::DataModel::Nullable& value); - } // namespace NullableInt8u - - namespace NullableInt16u { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::DataModel::Nullable& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::DataModel::Nullable& value); - } // namespace NullableInt16u - - namespace NullableInt24u { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::DataModel::Nullable& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::DataModel::Nullable& value); - } // namespace NullableInt24u - - namespace NullableInt32u { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::DataModel::Nullable& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::DataModel::Nullable& value); - } // namespace NullableInt32u - - namespace NullableInt40u { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::DataModel::Nullable& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::DataModel::Nullable& value); - } // namespace NullableInt40u - - namespace NullableInt48u { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::DataModel::Nullable& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::DataModel::Nullable& value); - } // namespace NullableInt48u - - namespace NullableInt56u { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::DataModel::Nullable& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::DataModel::Nullable& value); - } // namespace NullableInt56u - - namespace NullableInt64u { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::DataModel::Nullable& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::DataModel::Nullable& value); - } // namespace NullableInt64u - - namespace NullableInt8s { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::DataModel::Nullable& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::DataModel::Nullable& value); - } // namespace NullableInt8s - - namespace NullableInt16s { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::DataModel::Nullable& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::DataModel::Nullable& value); - } // namespace NullableInt16s - - namespace NullableInt24s { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::DataModel::Nullable& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::DataModel::Nullable& value); - } // namespace NullableInt24s - - namespace NullableInt32s { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::DataModel::Nullable& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::DataModel::Nullable& value); - } // namespace NullableInt32s - - namespace NullableInt40s { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::DataModel::Nullable& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::DataModel::Nullable& value); - } // namespace NullableInt40s - - namespace NullableInt48s { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::DataModel::Nullable& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::DataModel::Nullable& value); - } // namespace NullableInt48s - - namespace NullableInt56s { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::DataModel::Nullable& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::DataModel::Nullable& value); - } // namespace NullableInt56s - - namespace NullableInt64s { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::DataModel::Nullable& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::DataModel::Nullable& value); - } // namespace NullableInt64s - - namespace NullableEnum8 { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::DataModel::Nullable& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::DataModel::Nullable& value); - } // namespace NullableEnum8 - - namespace NullableEnum16 { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::DataModel::Nullable& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::DataModel::Nullable& value); - } // namespace NullableEnum16 - - namespace NullableFloatSingle { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::DataModel::Nullable& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::DataModel::Nullable& value); - } // namespace NullableFloatSingle - - namespace NullableFloatDouble { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::DataModel::Nullable& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::DataModel::Nullable& value); - } // namespace NullableFloatDouble - - namespace NullableOctetString { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::DataModel::Nullable& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::DataModel::Nullable& value); - } // namespace NullableOctetString - - namespace NullableCharString { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::DataModel::Nullable& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::DataModel::Nullable& value); - } // namespace NullableCharString - - namespace NullableEnumAttr { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, - chip::app::DataModel::Nullable& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, - const chip::app::DataModel::Nullable& value); - } // namespace NullableEnumAttr - - namespace NullableRangeRestrictedInt8u { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::DataModel::Nullable& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::DataModel::Nullable& value); - } // namespace NullableRangeRestrictedInt8u - - namespace NullableRangeRestrictedInt8s { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::DataModel::Nullable& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::DataModel::Nullable& value); - } // namespace NullableRangeRestrictedInt8s - - namespace NullableRangeRestrictedInt16u { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::DataModel::Nullable& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::DataModel::Nullable& value); - } // namespace NullableRangeRestrictedInt16u - - namespace NullableRangeRestrictedInt16s { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::DataModel::Nullable& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::DataModel::Nullable& value); - } // namespace NullableRangeRestrictedInt16s - - namespace WriteOnlyInt8u { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint8_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint8_t& value); - } // namespace WriteOnlyInt8u - - namespace FeatureMap { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint32_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint32_t& value); - } // namespace FeatureMap - - namespace ClusterRevision { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); - } // namespace ClusterRevision - - } // namespace Attributes - } // namespace UnitTesting - - namespace FaultInjection { - namespace Attributes { - - namespace FeatureMap { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint32_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint32_t& value); - } // namespace FeatureMap - - namespace ClusterRevision { - EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); - EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); - } // namespace ClusterRevision - - } // namespace Attributes - } // namespace FaultInjection - -} // namespace matter_bridge -} // namespace unify +namespace Identify { +namespace Attributes { + +namespace IdentifyTime { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); +} // namespace IdentifyTime + +namespace IdentifyType { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint8_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint8_t& value); +} // namespace IdentifyType + +namespace FeatureMap { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint32_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint32_t& value); +} // namespace FeatureMap + +namespace ClusterRevision { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); +} // namespace ClusterRevision + +} // namespace Attributes +} // Identify + +namespace Groups { +namespace Attributes { + +namespace NameSupport { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint8_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint8_t& value); +} // namespace NameSupport + +namespace FeatureMap { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint32_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint32_t& value); +} // namespace FeatureMap + +namespace ClusterRevision { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); +} // namespace ClusterRevision + +} // namespace Attributes +} // Groups + +namespace Scenes { +namespace Attributes { + +namespace SceneCount { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint8_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint8_t& value); +} // namespace SceneCount + +namespace CurrentScene { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint8_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint8_t& value); +} // namespace CurrentScene + +namespace CurrentGroup { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::GroupId& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::GroupId& value); +} // namespace CurrentGroup + +namespace SceneValid { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, bool& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const bool& value); +} // namespace SceneValid + +namespace NameSupport { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint8_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint8_t& value); +} // namespace NameSupport + +namespace LastConfiguredBy { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::DataModel::Nullable& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::DataModel::Nullable& value); +} // namespace LastConfiguredBy + +namespace FeatureMap { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint32_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint32_t& value); +} // namespace FeatureMap + +namespace ClusterRevision { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); +} // namespace ClusterRevision + +} // namespace Attributes +} // Scenes + +namespace OnOff { +namespace Attributes { + +namespace OnOff { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, bool& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const bool& value); +} // namespace OnOff + +namespace GlobalSceneControl { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, bool& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const bool& value); +} // namespace GlobalSceneControl + +namespace OnTime { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); +} // namespace OnTime + +namespace OffWaitTime { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); +} // namespace OffWaitTime + +namespace StartUpOnOff { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::DataModel::Nullable& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::DataModel::Nullable& value); +} // namespace StartUpOnOff + +namespace FeatureMap { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint32_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint32_t& value); +} // namespace FeatureMap + +namespace ClusterRevision { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); +} // namespace ClusterRevision + +} // namespace Attributes +} // OnOff + +namespace OnOffSwitchConfiguration { +namespace Attributes { + +namespace SwitchType { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint8_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint8_t& value); +} // namespace SwitchType + +namespace SwitchActions { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint8_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint8_t& value); +} // namespace SwitchActions + +namespace FeatureMap { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint32_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint32_t& value); +} // namespace FeatureMap + +namespace ClusterRevision { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); +} // namespace ClusterRevision + +} // namespace Attributes +} // OnOffSwitchConfiguration + +namespace LevelControl { +namespace Attributes { + +namespace CurrentLevel { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::DataModel::Nullable& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::DataModel::Nullable& value); +} // namespace CurrentLevel + +namespace RemainingTime { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); +} // namespace RemainingTime + +namespace MinLevel { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint8_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint8_t& value); +} // namespace MinLevel + +namespace MaxLevel { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint8_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint8_t& value); +} // namespace MaxLevel + +namespace CurrentFrequency { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); +} // namespace CurrentFrequency + +namespace MinFrequency { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); +} // namespace MinFrequency + +namespace MaxFrequency { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); +} // namespace MaxFrequency + +namespace Options { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::BitMask& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::BitMask& value); +} // namespace Options + +namespace OnOffTransitionTime { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); +} // namespace OnOffTransitionTime + +namespace OnLevel { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::DataModel::Nullable& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::DataModel::Nullable& value); +} // namespace OnLevel + +namespace OnTransitionTime { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::DataModel::Nullable& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::DataModel::Nullable& value); +} // namespace OnTransitionTime + +namespace OffTransitionTime { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::DataModel::Nullable& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::DataModel::Nullable& value); +} // namespace OffTransitionTime + +namespace DefaultMoveRate { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::DataModel::Nullable& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::DataModel::Nullable& value); +} // namespace DefaultMoveRate + +namespace StartUpCurrentLevel { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::DataModel::Nullable& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::DataModel::Nullable& value); +} // namespace StartUpCurrentLevel + +namespace FeatureMap { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint32_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint32_t& value); +} // namespace FeatureMap + +namespace ClusterRevision { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); +} // namespace ClusterRevision + +} // namespace Attributes +} // LevelControl + +namespace BinaryInputBasic { +namespace Attributes { + +namespace ActiveText { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::CharSpan& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::CharSpan& value); +} // namespace ActiveText + +namespace Description { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::CharSpan& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::CharSpan& value); +} // namespace Description + +namespace InactiveText { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::CharSpan& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::CharSpan& value); +} // namespace InactiveText + +namespace OutOfService { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, bool& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const bool& value); +} // namespace OutOfService + +namespace Polarity { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint8_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint8_t& value); +} // namespace Polarity + +namespace PresentValue { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, bool& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const bool& value); +} // namespace PresentValue + +namespace Reliability { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint8_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint8_t& value); +} // namespace Reliability + +namespace StatusFlags { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint8_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint8_t& value); +} // namespace StatusFlags + +namespace ApplicationType { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint32_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint32_t& value); +} // namespace ApplicationType + +namespace FeatureMap { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint32_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint32_t& value); +} // namespace FeatureMap + +namespace ClusterRevision { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); +} // namespace ClusterRevision + +} // namespace Attributes +} // BinaryInputBasic + +namespace PulseWidthModulation { +namespace Attributes { + +namespace FeatureMap { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint32_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint32_t& value); +} // namespace FeatureMap + +namespace ClusterRevision { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); +} // namespace ClusterRevision + +} // namespace Attributes +} // PulseWidthModulation + +namespace Descriptor { +namespace Attributes { + +namespace FeatureMap { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint32_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint32_t& value); +} // namespace FeatureMap + +namespace ClusterRevision { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); +} // namespace ClusterRevision + +} // namespace Attributes +} // Descriptor + +namespace Binding { +namespace Attributes { + +namespace FeatureMap { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint32_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint32_t& value); +} // namespace FeatureMap + +namespace ClusterRevision { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); +} // namespace ClusterRevision + +} // namespace Attributes +} // Binding + +namespace AccessControl { +namespace Attributes { + +namespace SubjectsPerAccessControlEntry { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); +} // namespace SubjectsPerAccessControlEntry + +namespace TargetsPerAccessControlEntry { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); +} // namespace TargetsPerAccessControlEntry + +namespace AccessControlEntriesPerFabric { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); +} // namespace AccessControlEntriesPerFabric + +namespace FeatureMap { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint32_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint32_t& value); +} // namespace FeatureMap + +namespace ClusterRevision { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); +} // namespace ClusterRevision + +} // namespace Attributes +} // AccessControl + +namespace Actions { +namespace Attributes { + +namespace SetupURL { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::CharSpan& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::CharSpan& value); +} // namespace SetupURL + +namespace FeatureMap { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint32_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint32_t& value); +} // namespace FeatureMap + +namespace ClusterRevision { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); +} // namespace ClusterRevision + +} // namespace Attributes +} // Actions + +namespace Basic { +namespace Attributes { + +namespace DataModelRevision { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); +} // namespace DataModelRevision + +namespace VendorName { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::CharSpan& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::CharSpan& value); +} // namespace VendorName + +namespace VendorID { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::VendorId& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::VendorId& value); +} // namespace VendorID + +namespace ProductName { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::CharSpan& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::CharSpan& value); +} // namespace ProductName + +namespace ProductID { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); +} // namespace ProductID + +namespace NodeLabel { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::CharSpan& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::CharSpan& value); +} // namespace NodeLabel + +namespace Location { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::CharSpan& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::CharSpan& value); +} // namespace Location + +namespace HardwareVersion { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); +} // namespace HardwareVersion + +namespace HardwareVersionString { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::CharSpan& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::CharSpan& value); +} // namespace HardwareVersionString + +namespace SoftwareVersion { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint32_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint32_t& value); +} // namespace SoftwareVersion + +namespace SoftwareVersionString { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::CharSpan& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::CharSpan& value); +} // namespace SoftwareVersionString + +namespace ManufacturingDate { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::CharSpan& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::CharSpan& value); +} // namespace ManufacturingDate + +namespace PartNumber { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::CharSpan& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::CharSpan& value); +} // namespace PartNumber + +namespace ProductURL { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::CharSpan& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::CharSpan& value); +} // namespace ProductURL + +namespace ProductLabel { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::CharSpan& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::CharSpan& value); +} // namespace ProductLabel + +namespace SerialNumber { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::CharSpan& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::CharSpan& value); +} // namespace SerialNumber + +namespace LocalConfigDisabled { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, bool& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const bool& value); +} // namespace LocalConfigDisabled + +namespace Reachable { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, bool& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const bool& value); +} // namespace Reachable + +namespace UniqueID { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::CharSpan& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::CharSpan& value); +} // namespace UniqueID + +namespace FeatureMap { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint32_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint32_t& value); +} // namespace FeatureMap + +namespace ClusterRevision { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); +} // namespace ClusterRevision + +} // namespace Attributes +} // Basic + +namespace OtaSoftwareUpdateProvider { +namespace Attributes { + +namespace FeatureMap { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint32_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint32_t& value); +} // namespace FeatureMap + +namespace ClusterRevision { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); +} // namespace ClusterRevision + +} // namespace Attributes +} // OtaSoftwareUpdateProvider + +namespace OtaSoftwareUpdateRequestor { +namespace Attributes { + +namespace UpdatePossible { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, bool& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const bool& value); +} // namespace UpdatePossible + +namespace UpdateState { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::Clusters::OtaSoftwareUpdateRequestor::OTAUpdateStateEnum& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::Clusters::OtaSoftwareUpdateRequestor::OTAUpdateStateEnum& value); +} // namespace UpdateState + +namespace UpdateStateProgress { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::DataModel::Nullable& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::DataModel::Nullable& value); +} // namespace UpdateStateProgress + +namespace FeatureMap { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint32_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint32_t& value); +} // namespace FeatureMap + +namespace ClusterRevision { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); +} // namespace ClusterRevision + +} // namespace Attributes +} // OtaSoftwareUpdateRequestor + +namespace LocalizationConfiguration { +namespace Attributes { + +namespace ActiveLocale { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::CharSpan& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::CharSpan& value); +} // namespace ActiveLocale + +namespace FeatureMap { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint32_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint32_t& value); +} // namespace FeatureMap + +namespace ClusterRevision { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); +} // namespace ClusterRevision + +} // namespace Attributes +} // LocalizationConfiguration + +namespace TimeFormatLocalization { +namespace Attributes { + +namespace HourFormat { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::Clusters::TimeFormatLocalization::HourFormat& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::Clusters::TimeFormatLocalization::HourFormat& value); +} // namespace HourFormat + +namespace ActiveCalendarType { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::Clusters::TimeFormatLocalization::CalendarType& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::Clusters::TimeFormatLocalization::CalendarType& value); +} // namespace ActiveCalendarType + +namespace FeatureMap { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint32_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint32_t& value); +} // namespace FeatureMap + +namespace ClusterRevision { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); +} // namespace ClusterRevision + +} // namespace Attributes +} // TimeFormatLocalization + +namespace UnitLocalization { +namespace Attributes { + +namespace TemperatureUnit { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::Clusters::UnitLocalization::TempUnit& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::Clusters::UnitLocalization::TempUnit& value); +} // namespace TemperatureUnit + +namespace FeatureMap { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint32_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint32_t& value); +} // namespace FeatureMap + +namespace ClusterRevision { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); +} // namespace ClusterRevision + +} // namespace Attributes +} // UnitLocalization + +namespace PowerSourceConfiguration { +namespace Attributes { + +namespace FeatureMap { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint32_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint32_t& value); +} // namespace FeatureMap + +namespace ClusterRevision { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); +} // namespace ClusterRevision + +} // namespace Attributes +} // PowerSourceConfiguration + +namespace PowerSource { +namespace Attributes { + +namespace Status { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::Clusters::PowerSource::PowerSourceStatus& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::Clusters::PowerSource::PowerSourceStatus& value); +} // namespace Status + +namespace Order { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint8_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint8_t& value); +} // namespace Order + +namespace Description { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::CharSpan& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::CharSpan& value); +} // namespace Description + +namespace WiredAssessedInputVoltage { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::DataModel::Nullable& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::DataModel::Nullable& value); +} // namespace WiredAssessedInputVoltage + +namespace WiredAssessedInputFrequency { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::DataModel::Nullable& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::DataModel::Nullable& value); +} // namespace WiredAssessedInputFrequency + +namespace WiredCurrentType { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::Clusters::PowerSource::WiredCurrentType& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::Clusters::PowerSource::WiredCurrentType& value); +} // namespace WiredCurrentType + +namespace WiredAssessedCurrent { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::DataModel::Nullable& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::DataModel::Nullable& value); +} // namespace WiredAssessedCurrent + +namespace WiredNominalVoltage { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint32_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint32_t& value); +} // namespace WiredNominalVoltage + +namespace WiredMaximumCurrent { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint32_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint32_t& value); +} // namespace WiredMaximumCurrent + +namespace WiredPresent { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, bool& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const bool& value); +} // namespace WiredPresent + +namespace BatVoltage { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::DataModel::Nullable& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::DataModel::Nullable& value); +} // namespace BatVoltage + +namespace BatPercentRemaining { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::DataModel::Nullable& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::DataModel::Nullable& value); +} // namespace BatPercentRemaining + +namespace BatTimeRemaining { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::DataModel::Nullable& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::DataModel::Nullable& value); +} // namespace BatTimeRemaining + +namespace BatChargeLevel { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::Clusters::PowerSource::BatChargeLevel& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::Clusters::PowerSource::BatChargeLevel& value); +} // namespace BatChargeLevel + +namespace BatReplacementNeeded { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, bool& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const bool& value); +} // namespace BatReplacementNeeded + +namespace BatReplaceability { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::Clusters::PowerSource::BatReplaceability& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::Clusters::PowerSource::BatReplaceability& value); +} // namespace BatReplaceability + +namespace BatPresent { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, bool& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const bool& value); +} // namespace BatPresent + +namespace BatReplacementDescription { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::CharSpan& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::CharSpan& value); +} // namespace BatReplacementDescription + +namespace BatCommonDesignation { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint32_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint32_t& value); +} // namespace BatCommonDesignation + +namespace BatANSIDesignation { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::CharSpan& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::CharSpan& value); +} // namespace BatANSIDesignation + +namespace BatIECDesignation { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::CharSpan& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::CharSpan& value); +} // namespace BatIECDesignation + +namespace BatApprovedChemistry { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint32_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint32_t& value); +} // namespace BatApprovedChemistry + +namespace BatCapacity { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint32_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint32_t& value); +} // namespace BatCapacity + +namespace BatQuantity { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint8_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint8_t& value); +} // namespace BatQuantity + +namespace BatChargeState { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::Clusters::PowerSource::BatChargeState& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::Clusters::PowerSource::BatChargeState& value); +} // namespace BatChargeState + +namespace BatTimeToFullCharge { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::DataModel::Nullable& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::DataModel::Nullable& value); +} // namespace BatTimeToFullCharge + +namespace BatFunctionalWhileCharging { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, bool& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const bool& value); +} // namespace BatFunctionalWhileCharging + +namespace BatChargingCurrent { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::DataModel::Nullable& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::DataModel::Nullable& value); +} // namespace BatChargingCurrent + +namespace FeatureMap { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint32_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint32_t& value); +} // namespace FeatureMap + +namespace ClusterRevision { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); +} // namespace ClusterRevision + +} // namespace Attributes +} // PowerSource + +namespace GeneralCommissioning { +namespace Attributes { + +namespace Breadcrumb { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint64_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint64_t& value); +} // namespace Breadcrumb + +namespace RegulatoryConfig { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::Clusters::GeneralCommissioning::RegulatoryLocationType& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::Clusters::GeneralCommissioning::RegulatoryLocationType& value); +} // namespace RegulatoryConfig + +namespace LocationCapability { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::Clusters::GeneralCommissioning::RegulatoryLocationType& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::Clusters::GeneralCommissioning::RegulatoryLocationType& value); +} // namespace LocationCapability + +namespace SupportsConcurrentConnection { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, bool& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const bool& value); +} // namespace SupportsConcurrentConnection + +namespace FeatureMap { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint32_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint32_t& value); +} // namespace FeatureMap + +namespace ClusterRevision { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); +} // namespace ClusterRevision + +} // namespace Attributes +} // GeneralCommissioning + +namespace NetworkCommissioning { +namespace Attributes { + +namespace MaxNetworks { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint8_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint8_t& value); +} // namespace MaxNetworks + +namespace ScanMaxTimeSeconds { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint8_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint8_t& value); +} // namespace ScanMaxTimeSeconds + +namespace ConnectMaxTimeSeconds { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint8_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint8_t& value); +} // namespace ConnectMaxTimeSeconds + +namespace InterfaceEnabled { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, bool& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const bool& value); +} // namespace InterfaceEnabled + +namespace LastNetworkingStatus { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::DataModel::Nullable& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::DataModel::Nullable& value); +} // namespace LastNetworkingStatus + +namespace LastNetworkID { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::DataModel::Nullable& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::DataModel::Nullable& value); +} // namespace LastNetworkID + +namespace LastConnectErrorValue { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::DataModel::Nullable& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::DataModel::Nullable& value); +} // namespace LastConnectErrorValue + +namespace FeatureMap { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint32_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint32_t& value); +} // namespace FeatureMap + +namespace ClusterRevision { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); +} // namespace ClusterRevision + +} // namespace Attributes +} // NetworkCommissioning + +namespace DiagnosticLogs { +namespace Attributes { + +namespace FeatureMap { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint32_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint32_t& value); +} // namespace FeatureMap + +namespace ClusterRevision { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); +} // namespace ClusterRevision + +} // namespace Attributes +} // DiagnosticLogs + +namespace GeneralDiagnostics { +namespace Attributes { + +namespace RebootCount { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); +} // namespace RebootCount + +namespace UpTime { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint64_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint64_t& value); +} // namespace UpTime + +namespace TotalOperationalHours { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint32_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint32_t& value); +} // namespace TotalOperationalHours + +namespace BootReasons { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint8_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint8_t& value); +} // namespace BootReasons + +namespace TestEventTriggersEnabled { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, bool& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const bool& value); +} // namespace TestEventTriggersEnabled + +namespace FeatureMap { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint32_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint32_t& value); +} // namespace FeatureMap + +namespace ClusterRevision { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); +} // namespace ClusterRevision + +} // namespace Attributes +} // GeneralDiagnostics + +namespace SoftwareDiagnostics { +namespace Attributes { + +namespace CurrentHeapFree { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint64_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint64_t& value); +} // namespace CurrentHeapFree + +namespace CurrentHeapUsed { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint64_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint64_t& value); +} // namespace CurrentHeapUsed + +namespace CurrentHeapHighWatermark { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint64_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint64_t& value); +} // namespace CurrentHeapHighWatermark + +namespace FeatureMap { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint32_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint32_t& value); +} // namespace FeatureMap + +namespace ClusterRevision { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); +} // namespace ClusterRevision + +} // namespace Attributes +} // SoftwareDiagnostics + +namespace ThreadNetworkDiagnostics { +namespace Attributes { + +namespace Channel { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::DataModel::Nullable& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::DataModel::Nullable& value); +} // namespace Channel + +namespace RoutingRole { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::DataModel::Nullable& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::DataModel::Nullable& value); +} // namespace RoutingRole + +namespace NetworkName { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::DataModel::Nullable& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::DataModel::Nullable& value); +} // namespace NetworkName + +namespace PanId { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::DataModel::Nullable& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::DataModel::Nullable& value); +} // namespace PanId + +namespace ExtendedPanId { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::DataModel::Nullable& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::DataModel::Nullable& value); +} // namespace ExtendedPanId + +namespace MeshLocalPrefix { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::DataModel::Nullable& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::DataModel::Nullable& value); +} // namespace MeshLocalPrefix + +namespace OverrunCount { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint64_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint64_t& value); +} // namespace OverrunCount + +namespace PartitionId { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::DataModel::Nullable& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::DataModel::Nullable& value); +} // namespace PartitionId + +namespace Weighting { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::DataModel::Nullable& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::DataModel::Nullable& value); +} // namespace Weighting + +namespace DataVersion { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::DataModel::Nullable& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::DataModel::Nullable& value); +} // namespace DataVersion + +namespace StableDataVersion { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::DataModel::Nullable& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::DataModel::Nullable& value); +} // namespace StableDataVersion + +namespace LeaderRouterId { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::DataModel::Nullable& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::DataModel::Nullable& value); +} // namespace LeaderRouterId + +namespace DetachedRoleCount { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); +} // namespace DetachedRoleCount + +namespace ChildRoleCount { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); +} // namespace ChildRoleCount + +namespace RouterRoleCount { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); +} // namespace RouterRoleCount + +namespace LeaderRoleCount { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); +} // namespace LeaderRoleCount + +namespace AttachAttemptCount { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); +} // namespace AttachAttemptCount + +namespace PartitionIdChangeCount { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); +} // namespace PartitionIdChangeCount + +namespace BetterPartitionAttachAttemptCount { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); +} // namespace BetterPartitionAttachAttemptCount + +namespace ParentChangeCount { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); +} // namespace ParentChangeCount + +namespace TxTotalCount { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint32_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint32_t& value); +} // namespace TxTotalCount + +namespace TxUnicastCount { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint32_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint32_t& value); +} // namespace TxUnicastCount + +namespace TxBroadcastCount { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint32_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint32_t& value); +} // namespace TxBroadcastCount + +namespace TxAckRequestedCount { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint32_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint32_t& value); +} // namespace TxAckRequestedCount + +namespace TxAckedCount { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint32_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint32_t& value); +} // namespace TxAckedCount + +namespace TxNoAckRequestedCount { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint32_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint32_t& value); +} // namespace TxNoAckRequestedCount + +namespace TxDataCount { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint32_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint32_t& value); +} // namespace TxDataCount + +namespace TxDataPollCount { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint32_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint32_t& value); +} // namespace TxDataPollCount + +namespace TxBeaconCount { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint32_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint32_t& value); +} // namespace TxBeaconCount + +namespace TxBeaconRequestCount { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint32_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint32_t& value); +} // namespace TxBeaconRequestCount + +namespace TxOtherCount { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint32_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint32_t& value); +} // namespace TxOtherCount + +namespace TxRetryCount { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint32_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint32_t& value); +} // namespace TxRetryCount + +namespace TxDirectMaxRetryExpiryCount { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint32_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint32_t& value); +} // namespace TxDirectMaxRetryExpiryCount + +namespace TxIndirectMaxRetryExpiryCount { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint32_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint32_t& value); +} // namespace TxIndirectMaxRetryExpiryCount + +namespace TxErrCcaCount { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint32_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint32_t& value); +} // namespace TxErrCcaCount + +namespace TxErrAbortCount { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint32_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint32_t& value); +} // namespace TxErrAbortCount + +namespace TxErrBusyChannelCount { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint32_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint32_t& value); +} // namespace TxErrBusyChannelCount + +namespace RxTotalCount { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint32_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint32_t& value); +} // namespace RxTotalCount + +namespace RxUnicastCount { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint32_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint32_t& value); +} // namespace RxUnicastCount + +namespace RxBroadcastCount { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint32_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint32_t& value); +} // namespace RxBroadcastCount + +namespace RxDataCount { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint32_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint32_t& value); +} // namespace RxDataCount + +namespace RxDataPollCount { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint32_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint32_t& value); +} // namespace RxDataPollCount + +namespace RxBeaconCount { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint32_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint32_t& value); +} // namespace RxBeaconCount + +namespace RxBeaconRequestCount { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint32_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint32_t& value); +} // namespace RxBeaconRequestCount + +namespace RxOtherCount { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint32_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint32_t& value); +} // namespace RxOtherCount + +namespace RxAddressFilteredCount { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint32_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint32_t& value); +} // namespace RxAddressFilteredCount + +namespace RxDestAddrFilteredCount { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint32_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint32_t& value); +} // namespace RxDestAddrFilteredCount + +namespace RxDuplicatedCount { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint32_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint32_t& value); +} // namespace RxDuplicatedCount + +namespace RxErrNoFrameCount { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint32_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint32_t& value); +} // namespace RxErrNoFrameCount + +namespace RxErrUnknownNeighborCount { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint32_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint32_t& value); +} // namespace RxErrUnknownNeighborCount + +namespace RxErrInvalidSrcAddrCount { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint32_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint32_t& value); +} // namespace RxErrInvalidSrcAddrCount + +namespace RxErrSecCount { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint32_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint32_t& value); +} // namespace RxErrSecCount + +namespace RxErrFcsCount { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint32_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint32_t& value); +} // namespace RxErrFcsCount + +namespace RxErrOtherCount { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint32_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint32_t& value); +} // namespace RxErrOtherCount + +namespace ActiveTimestamp { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::DataModel::Nullable& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::DataModel::Nullable& value); +} // namespace ActiveTimestamp + +namespace PendingTimestamp { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::DataModel::Nullable& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::DataModel::Nullable& value); +} // namespace PendingTimestamp + +namespace Delay { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::DataModel::Nullable& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::DataModel::Nullable& value); +} // namespace Delay + +namespace ChannelPage0Mask { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::DataModel::Nullable& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::DataModel::Nullable& value); +} // namespace ChannelPage0Mask + +namespace FeatureMap { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint32_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint32_t& value); +} // namespace FeatureMap + +namespace ClusterRevision { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); +} // namespace ClusterRevision + +} // namespace Attributes +} // ThreadNetworkDiagnostics + +namespace WiFiNetworkDiagnostics { +namespace Attributes { + +namespace Bssid { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::DataModel::Nullable& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::DataModel::Nullable& value); +} // namespace Bssid + +namespace SecurityType { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::DataModel::Nullable& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::DataModel::Nullable& value); +} // namespace SecurityType + +namespace WiFiVersion { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::DataModel::Nullable& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::DataModel::Nullable& value); +} // namespace WiFiVersion + +namespace ChannelNumber { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::DataModel::Nullable& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::DataModel::Nullable& value); +} // namespace ChannelNumber + +namespace Rssi { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::DataModel::Nullable& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::DataModel::Nullable& value); +} // namespace Rssi + +namespace BeaconLostCount { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::DataModel::Nullable& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::DataModel::Nullable& value); +} // namespace BeaconLostCount + +namespace BeaconRxCount { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::DataModel::Nullable& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::DataModel::Nullable& value); +} // namespace BeaconRxCount + +namespace PacketMulticastRxCount { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::DataModel::Nullable& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::DataModel::Nullable& value); +} // namespace PacketMulticastRxCount + +namespace PacketMulticastTxCount { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::DataModel::Nullable& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::DataModel::Nullable& value); +} // namespace PacketMulticastTxCount + +namespace PacketUnicastRxCount { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::DataModel::Nullable& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::DataModel::Nullable& value); +} // namespace PacketUnicastRxCount + +namespace PacketUnicastTxCount { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::DataModel::Nullable& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::DataModel::Nullable& value); +} // namespace PacketUnicastTxCount + +namespace CurrentMaxRate { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::DataModel::Nullable& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::DataModel::Nullable& value); +} // namespace CurrentMaxRate + +namespace OverrunCount { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::DataModel::Nullable& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::DataModel::Nullable& value); +} // namespace OverrunCount + +namespace FeatureMap { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint32_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint32_t& value); +} // namespace FeatureMap + +namespace ClusterRevision { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); +} // namespace ClusterRevision + +} // namespace Attributes +} // WiFiNetworkDiagnostics + +namespace EthernetNetworkDiagnostics { +namespace Attributes { + +namespace PHYRate { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::DataModel::Nullable& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::DataModel::Nullable& value); +} // namespace PHYRate + +namespace FullDuplex { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::DataModel::Nullable& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::DataModel::Nullable& value); +} // namespace FullDuplex + +namespace PacketRxCount { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint64_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint64_t& value); +} // namespace PacketRxCount + +namespace PacketTxCount { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint64_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint64_t& value); +} // namespace PacketTxCount + +namespace TxErrCount { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint64_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint64_t& value); +} // namespace TxErrCount + +namespace CollisionCount { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint64_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint64_t& value); +} // namespace CollisionCount + +namespace OverrunCount { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint64_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint64_t& value); +} // namespace OverrunCount + +namespace CarrierDetect { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::DataModel::Nullable& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::DataModel::Nullable& value); +} // namespace CarrierDetect + +namespace TimeSinceReset { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint64_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint64_t& value); +} // namespace TimeSinceReset + +namespace FeatureMap { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint32_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint32_t& value); +} // namespace FeatureMap + +namespace ClusterRevision { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); +} // namespace ClusterRevision + +} // namespace Attributes +} // EthernetNetworkDiagnostics + +namespace TimeSynchronization { +namespace Attributes { + +namespace UTCTime { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::DataModel::Nullable& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::DataModel::Nullable& value); +} // namespace UTCTime + +namespace Granularity { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::Clusters::TimeSynchronization::GranularityEnum& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::Clusters::TimeSynchronization::GranularityEnum& value); +} // namespace Granularity + +namespace TimeSource { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::Clusters::TimeSynchronization::TimeSourceEnum& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::Clusters::TimeSynchronization::TimeSourceEnum& value); +} // namespace TimeSource + +namespace TrustedTimeNodeId { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::DataModel::Nullable& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::DataModel::Nullable& value); +} // namespace TrustedTimeNodeId + +namespace DefaultNtp { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::DataModel::Nullable& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::DataModel::Nullable& value); +} // namespace DefaultNtp + +namespace LocalTime { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::DataModel::Nullable& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::DataModel::Nullable& value); +} // namespace LocalTime + +namespace TimeZoneDatabase { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, bool& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const bool& value); +} // namespace TimeZoneDatabase + +namespace NtpServerPort { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::DataModel::Nullable& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::DataModel::Nullable& value); +} // namespace NtpServerPort + +namespace FeatureMap { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint32_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint32_t& value); +} // namespace FeatureMap + +namespace ClusterRevision { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); +} // namespace ClusterRevision + +} // namespace Attributes +} // TimeSynchronization + +namespace BridgedDeviceBasic { +namespace Attributes { + +namespace VendorName { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::CharSpan& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::CharSpan& value); +} // namespace VendorName + +namespace VendorID { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::VendorId& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::VendorId& value); +} // namespace VendorID + +namespace ProductName { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::CharSpan& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::CharSpan& value); +} // namespace ProductName + +namespace NodeLabel { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::CharSpan& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::CharSpan& value); +} // namespace NodeLabel + +namespace HardwareVersion { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); +} // namespace HardwareVersion + +namespace HardwareVersionString { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::CharSpan& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::CharSpan& value); +} // namespace HardwareVersionString + +namespace SoftwareVersion { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint32_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint32_t& value); +} // namespace SoftwareVersion + +namespace SoftwareVersionString { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::CharSpan& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::CharSpan& value); +} // namespace SoftwareVersionString + +namespace ManufacturingDate { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::CharSpan& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::CharSpan& value); +} // namespace ManufacturingDate + +namespace PartNumber { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::CharSpan& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::CharSpan& value); +} // namespace PartNumber + +namespace ProductURL { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::CharSpan& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::CharSpan& value); +} // namespace ProductURL + +namespace ProductLabel { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::CharSpan& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::CharSpan& value); +} // namespace ProductLabel + +namespace SerialNumber { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::CharSpan& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::CharSpan& value); +} // namespace SerialNumber + +namespace Reachable { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, bool& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const bool& value); +} // namespace Reachable + +namespace UniqueID { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::CharSpan& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::CharSpan& value); +} // namespace UniqueID + +namespace FeatureMap { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint32_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint32_t& value); +} // namespace FeatureMap + +namespace ClusterRevision { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); +} // namespace ClusterRevision + +} // namespace Attributes +} // BridgedDeviceBasic + +namespace Switch { +namespace Attributes { + +namespace NumberOfPositions { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint8_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint8_t& value); +} // namespace NumberOfPositions + +namespace CurrentPosition { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint8_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint8_t& value); +} // namespace CurrentPosition + +namespace MultiPressMax { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint8_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint8_t& value); +} // namespace MultiPressMax + +namespace FeatureMap { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint32_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint32_t& value); +} // namespace FeatureMap + +namespace ClusterRevision { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); +} // namespace ClusterRevision + +} // namespace Attributes +} // Switch + +namespace AdministratorCommissioning { +namespace Attributes { + +namespace WindowStatus { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::Clusters::AdministratorCommissioning::CommissioningWindowStatus& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::Clusters::AdministratorCommissioning::CommissioningWindowStatus& value); +} // namespace WindowStatus + +namespace AdminFabricIndex { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::DataModel::Nullable& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::DataModel::Nullable& value); +} // namespace AdminFabricIndex + +namespace AdminVendorId { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::DataModel::Nullable& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::DataModel::Nullable& value); +} // namespace AdminVendorId + +namespace FeatureMap { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint32_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint32_t& value); +} // namespace FeatureMap + +namespace ClusterRevision { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); +} // namespace ClusterRevision + +} // namespace Attributes +} // AdministratorCommissioning + +namespace OperationalCredentials { +namespace Attributes { + +namespace SupportedFabrics { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint8_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint8_t& value); +} // namespace SupportedFabrics + +namespace CommissionedFabrics { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint8_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint8_t& value); +} // namespace CommissionedFabrics + +namespace CurrentFabricIndex { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint8_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint8_t& value); +} // namespace CurrentFabricIndex + +namespace FeatureMap { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint32_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint32_t& value); +} // namespace FeatureMap + +namespace ClusterRevision { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); +} // namespace ClusterRevision + +} // namespace Attributes +} // OperationalCredentials + +namespace GroupKeyManagement { +namespace Attributes { + +namespace MaxGroupsPerFabric { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); +} // namespace MaxGroupsPerFabric + +namespace MaxGroupKeysPerFabric { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); +} // namespace MaxGroupKeysPerFabric + +namespace FeatureMap { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint32_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint32_t& value); +} // namespace FeatureMap + +namespace ClusterRevision { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); +} // namespace ClusterRevision + +} // namespace Attributes +} // GroupKeyManagement + +namespace FixedLabel { +namespace Attributes { + +namespace FeatureMap { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint32_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint32_t& value); +} // namespace FeatureMap + +namespace ClusterRevision { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); +} // namespace ClusterRevision + +} // namespace Attributes +} // FixedLabel + +namespace UserLabel { +namespace Attributes { + +namespace FeatureMap { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint32_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint32_t& value); +} // namespace FeatureMap + +namespace ClusterRevision { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); +} // namespace ClusterRevision + +} // namespace Attributes +} // UserLabel + +namespace ProxyConfiguration { +namespace Attributes { + +namespace FeatureMap { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint32_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint32_t& value); +} // namespace FeatureMap + +namespace ClusterRevision { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); +} // namespace ClusterRevision + +} // namespace Attributes +} // ProxyConfiguration + +namespace ProxyDiscovery { +namespace Attributes { + +namespace FeatureMap { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint32_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint32_t& value); +} // namespace FeatureMap + +namespace ClusterRevision { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); +} // namespace ClusterRevision + +} // namespace Attributes +} // ProxyDiscovery + +namespace ProxyValid { +namespace Attributes { + +namespace FeatureMap { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint32_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint32_t& value); +} // namespace FeatureMap + +namespace ClusterRevision { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); +} // namespace ClusterRevision + +} // namespace Attributes +} // ProxyValid + +namespace BooleanState { +namespace Attributes { + +namespace StateValue { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, bool& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const bool& value); +} // namespace StateValue + +namespace FeatureMap { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint32_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint32_t& value); +} // namespace FeatureMap + +namespace ClusterRevision { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); +} // namespace ClusterRevision + +} // namespace Attributes +} // BooleanState + +namespace ModeSelect { +namespace Attributes { + +namespace Description { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::CharSpan& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::CharSpan& value); +} // namespace Description + +namespace StandardNamespace { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::DataModel::Nullable& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::DataModel::Nullable& value); +} // namespace StandardNamespace + +namespace CurrentMode { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint8_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint8_t& value); +} // namespace CurrentMode + +namespace StartUpMode { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::DataModel::Nullable& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::DataModel::Nullable& value); +} // namespace StartUpMode + +namespace OnMode { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::DataModel::Nullable& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::DataModel::Nullable& value); +} // namespace OnMode + +namespace FeatureMap { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint32_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint32_t& value); +} // namespace FeatureMap + +namespace ClusterRevision { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); +} // namespace ClusterRevision + +} // namespace Attributes +} // ModeSelect + +namespace DoorLock { +namespace Attributes { + +namespace LockState { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::DataModel::Nullable& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::DataModel::Nullable& value); +} // namespace LockState + +namespace LockType { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::Clusters::DoorLock::DlLockType& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::Clusters::DoorLock::DlLockType& value); +} // namespace LockType + +namespace ActuatorEnabled { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, bool& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const bool& value); +} // namespace ActuatorEnabled + +namespace DoorState { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::DataModel::Nullable& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::DataModel::Nullable& value); +} // namespace DoorState + +namespace DoorOpenEvents { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint32_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint32_t& value); +} // namespace DoorOpenEvents + +namespace DoorClosedEvents { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint32_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint32_t& value); +} // namespace DoorClosedEvents + +namespace OpenPeriod { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); +} // namespace OpenPeriod + +namespace NumberOfTotalUsersSupported { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); +} // namespace NumberOfTotalUsersSupported + +namespace NumberOfPINUsersSupported { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); +} // namespace NumberOfPINUsersSupported + +namespace NumberOfRFIDUsersSupported { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); +} // namespace NumberOfRFIDUsersSupported + +namespace NumberOfWeekDaySchedulesSupportedPerUser { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint8_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint8_t& value); +} // namespace NumberOfWeekDaySchedulesSupportedPerUser + +namespace NumberOfYearDaySchedulesSupportedPerUser { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint8_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint8_t& value); +} // namespace NumberOfYearDaySchedulesSupportedPerUser + +namespace NumberOfHolidaySchedulesSupported { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint8_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint8_t& value); +} // namespace NumberOfHolidaySchedulesSupported + +namespace MaxPINCodeLength { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint8_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint8_t& value); +} // namespace MaxPINCodeLength + +namespace MinPINCodeLength { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint8_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint8_t& value); +} // namespace MinPINCodeLength + +namespace MaxRFIDCodeLength { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint8_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint8_t& value); +} // namespace MaxRFIDCodeLength + +namespace MinRFIDCodeLength { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint8_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint8_t& value); +} // namespace MinRFIDCodeLength + +namespace CredentialRulesSupport { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::BitMask& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::BitMask& value); +} // namespace CredentialRulesSupport + +namespace NumberOfCredentialsSupportedPerUser { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint8_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint8_t& value); +} // namespace NumberOfCredentialsSupportedPerUser + +namespace Language { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::CharSpan& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::CharSpan& value); +} // namespace Language + +namespace LEDSettings { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint8_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint8_t& value); +} // namespace LEDSettings + +namespace AutoRelockTime { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint32_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint32_t& value); +} // namespace AutoRelockTime + +namespace SoundVolume { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint8_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint8_t& value); +} // namespace SoundVolume + +namespace OperatingMode { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::Clusters::DoorLock::DlOperatingMode& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::Clusters::DoorLock::DlOperatingMode& value); +} // namespace OperatingMode + +namespace SupportedOperatingModes { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::BitMask& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::BitMask& value); +} // namespace SupportedOperatingModes + +namespace DefaultConfigurationRegister { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::BitMask& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::BitMask& value); +} // namespace DefaultConfigurationRegister + +namespace EnableLocalProgramming { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, bool& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const bool& value); +} // namespace EnableLocalProgramming + +namespace EnableOneTouchLocking { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, bool& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const bool& value); +} // namespace EnableOneTouchLocking + +namespace EnableInsideStatusLED { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, bool& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const bool& value); +} // namespace EnableInsideStatusLED + +namespace EnablePrivacyModeButton { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, bool& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const bool& value); +} // namespace EnablePrivacyModeButton + +namespace LocalProgrammingFeatures { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::BitMask& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::BitMask& value); +} // namespace LocalProgrammingFeatures + +namespace WrongCodeEntryLimit { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint8_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint8_t& value); +} // namespace WrongCodeEntryLimit + +namespace UserCodeTemporaryDisableTime { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint8_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint8_t& value); +} // namespace UserCodeTemporaryDisableTime + +namespace SendPINOverTheAir { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, bool& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const bool& value); +} // namespace SendPINOverTheAir + +namespace RequirePINforRemoteOperation { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, bool& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const bool& value); +} // namespace RequirePINforRemoteOperation + +namespace ExpiringUserTimeout { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); +} // namespace ExpiringUserTimeout + +namespace FeatureMap { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint32_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint32_t& value); +} // namespace FeatureMap + +namespace ClusterRevision { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); +} // namespace ClusterRevision + +} // namespace Attributes +} // DoorLock + +namespace WindowCovering { +namespace Attributes { + +namespace Type { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::Clusters::WindowCovering::Type& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::Clusters::WindowCovering::Type& value); +} // namespace Type + +namespace PhysicalClosedLimitLift { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); +} // namespace PhysicalClosedLimitLift + +namespace PhysicalClosedLimitTilt { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); +} // namespace PhysicalClosedLimitTilt + +namespace CurrentPositionLift { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::DataModel::Nullable& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::DataModel::Nullable& value); +} // namespace CurrentPositionLift + +namespace CurrentPositionTilt { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::DataModel::Nullable& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::DataModel::Nullable& value); +} // namespace CurrentPositionTilt + +namespace NumberOfActuationsLift { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); +} // namespace NumberOfActuationsLift + +namespace NumberOfActuationsTilt { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); +} // namespace NumberOfActuationsTilt + +namespace ConfigStatus { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::BitMask& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::BitMask& value); +} // namespace ConfigStatus + +namespace CurrentPositionLiftPercentage { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::DataModel::Nullable& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::DataModel::Nullable& value); +} // namespace CurrentPositionLiftPercentage + +namespace CurrentPositionTiltPercentage { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::DataModel::Nullable& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::DataModel::Nullable& value); +} // namespace CurrentPositionTiltPercentage + +namespace OperationalStatus { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::BitMask& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::BitMask& value); +} // namespace OperationalStatus + +namespace TargetPositionLiftPercent100ths { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::DataModel::Nullable& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::DataModel::Nullable& value); +} // namespace TargetPositionLiftPercent100ths + +namespace TargetPositionTiltPercent100ths { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::DataModel::Nullable& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::DataModel::Nullable& value); +} // namespace TargetPositionTiltPercent100ths + +namespace EndProductType { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::Clusters::WindowCovering::EndProductType& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::Clusters::WindowCovering::EndProductType& value); +} // namespace EndProductType + +namespace CurrentPositionLiftPercent100ths { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::DataModel::Nullable& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::DataModel::Nullable& value); +} // namespace CurrentPositionLiftPercent100ths + +namespace CurrentPositionTiltPercent100ths { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::DataModel::Nullable& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::DataModel::Nullable& value); +} // namespace CurrentPositionTiltPercent100ths + +namespace InstalledOpenLimitLift { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); +} // namespace InstalledOpenLimitLift + +namespace InstalledClosedLimitLift { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); +} // namespace InstalledClosedLimitLift + +namespace InstalledOpenLimitTilt { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); +} // namespace InstalledOpenLimitTilt + +namespace InstalledClosedLimitTilt { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); +} // namespace InstalledClosedLimitTilt + +namespace Mode { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::BitMask& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::BitMask& value); +} // namespace Mode + +namespace SafetyStatus { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::BitMask& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::BitMask& value); +} // namespace SafetyStatus + +namespace FeatureMap { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint32_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint32_t& value); +} // namespace FeatureMap + +namespace ClusterRevision { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); +} // namespace ClusterRevision + +} // namespace Attributes +} // WindowCovering + +namespace BarrierControl { +namespace Attributes { + +namespace BarrierMovingState { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint8_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint8_t& value); +} // namespace BarrierMovingState + +namespace BarrierSafetyStatus { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); +} // namespace BarrierSafetyStatus + +namespace BarrierCapabilities { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint8_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint8_t& value); +} // namespace BarrierCapabilities + +namespace BarrierOpenEvents { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); +} // namespace BarrierOpenEvents + +namespace BarrierCloseEvents { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); +} // namespace BarrierCloseEvents + +namespace BarrierCommandOpenEvents { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); +} // namespace BarrierCommandOpenEvents + +namespace BarrierCommandCloseEvents { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); +} // namespace BarrierCommandCloseEvents + +namespace BarrierOpenPeriod { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); +} // namespace BarrierOpenPeriod + +namespace BarrierClosePeriod { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); +} // namespace BarrierClosePeriod + +namespace BarrierPosition { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint8_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint8_t& value); +} // namespace BarrierPosition + +namespace FeatureMap { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint32_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint32_t& value); +} // namespace FeatureMap + +namespace ClusterRevision { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); +} // namespace ClusterRevision + +} // namespace Attributes +} // BarrierControl + +namespace PumpConfigurationAndControl { +namespace Attributes { + +namespace MaxPressure { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::DataModel::Nullable& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::DataModel::Nullable& value); +} // namespace MaxPressure + +namespace MaxSpeed { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::DataModel::Nullable& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::DataModel::Nullable& value); +} // namespace MaxSpeed + +namespace MaxFlow { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::DataModel::Nullable& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::DataModel::Nullable& value); +} // namespace MaxFlow + +namespace MinConstPressure { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::DataModel::Nullable& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::DataModel::Nullable& value); +} // namespace MinConstPressure + +namespace MaxConstPressure { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::DataModel::Nullable& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::DataModel::Nullable& value); +} // namespace MaxConstPressure + +namespace MinCompPressure { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::DataModel::Nullable& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::DataModel::Nullable& value); +} // namespace MinCompPressure + +namespace MaxCompPressure { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::DataModel::Nullable& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::DataModel::Nullable& value); +} // namespace MaxCompPressure + +namespace MinConstSpeed { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::DataModel::Nullable& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::DataModel::Nullable& value); +} // namespace MinConstSpeed + +namespace MaxConstSpeed { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::DataModel::Nullable& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::DataModel::Nullable& value); +} // namespace MaxConstSpeed + +namespace MinConstFlow { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::DataModel::Nullable& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::DataModel::Nullable& value); +} // namespace MinConstFlow + +namespace MaxConstFlow { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::DataModel::Nullable& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::DataModel::Nullable& value); +} // namespace MaxConstFlow + +namespace MinConstTemp { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::DataModel::Nullable& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::DataModel::Nullable& value); +} // namespace MinConstTemp + +namespace MaxConstTemp { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::DataModel::Nullable& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::DataModel::Nullable& value); +} // namespace MaxConstTemp + +namespace PumpStatus { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::BitMask& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::BitMask& value); +} // namespace PumpStatus + +namespace EffectiveOperationMode { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::Clusters::PumpConfigurationAndControl::PumpOperationMode& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::Clusters::PumpConfigurationAndControl::PumpOperationMode& value); +} // namespace EffectiveOperationMode + +namespace EffectiveControlMode { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::Clusters::PumpConfigurationAndControl::PumpControlMode& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::Clusters::PumpConfigurationAndControl::PumpControlMode& value); +} // namespace EffectiveControlMode + +namespace Capacity { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::DataModel::Nullable& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::DataModel::Nullable& value); +} // namespace Capacity + +namespace Speed { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::DataModel::Nullable& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::DataModel::Nullable& value); +} // namespace Speed + +namespace LifetimeRunningHours { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::DataModel::Nullable& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::DataModel::Nullable& value); +} // namespace LifetimeRunningHours + +namespace Power { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::DataModel::Nullable& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::DataModel::Nullable& value); +} // namespace Power + +namespace LifetimeEnergyConsumed { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::DataModel::Nullable& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::DataModel::Nullable& value); +} // namespace LifetimeEnergyConsumed + +namespace OperationMode { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::Clusters::PumpConfigurationAndControl::PumpOperationMode& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::Clusters::PumpConfigurationAndControl::PumpOperationMode& value); +} // namespace OperationMode + +namespace ControlMode { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::Clusters::PumpConfigurationAndControl::PumpControlMode& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::Clusters::PumpConfigurationAndControl::PumpControlMode& value); +} // namespace ControlMode + +namespace FeatureMap { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint32_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint32_t& value); +} // namespace FeatureMap + +namespace ClusterRevision { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); +} // namespace ClusterRevision + +} // namespace Attributes +} // PumpConfigurationAndControl + +namespace Thermostat { +namespace Attributes { + +namespace LocalTemperature { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::DataModel::Nullable& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::DataModel::Nullable& value); +} // namespace LocalTemperature + +namespace OutdoorTemperature { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::DataModel::Nullable& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::DataModel::Nullable& value); +} // namespace OutdoorTemperature + +namespace Occupancy { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint8_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint8_t& value); +} // namespace Occupancy + +namespace AbsMinHeatSetpointLimit { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, int16_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const int16_t& value); +} // namespace AbsMinHeatSetpointLimit + +namespace AbsMaxHeatSetpointLimit { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, int16_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const int16_t& value); +} // namespace AbsMaxHeatSetpointLimit + +namespace AbsMinCoolSetpointLimit { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, int16_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const int16_t& value); +} // namespace AbsMinCoolSetpointLimit + +namespace AbsMaxCoolSetpointLimit { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, int16_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const int16_t& value); +} // namespace AbsMaxCoolSetpointLimit + +namespace PICoolingDemand { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint8_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint8_t& value); +} // namespace PICoolingDemand + +namespace PIHeatingDemand { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint8_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint8_t& value); +} // namespace PIHeatingDemand + +namespace HVACSystemTypeConfiguration { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint8_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint8_t& value); +} // namespace HVACSystemTypeConfiguration + +namespace LocalTemperatureCalibration { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, int8_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const int8_t& value); +} // namespace LocalTemperatureCalibration + +namespace OccupiedCoolingSetpoint { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, int16_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const int16_t& value); +} // namespace OccupiedCoolingSetpoint + +namespace OccupiedHeatingSetpoint { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, int16_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const int16_t& value); +} // namespace OccupiedHeatingSetpoint + +namespace UnoccupiedCoolingSetpoint { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, int16_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const int16_t& value); +} // namespace UnoccupiedCoolingSetpoint + +namespace UnoccupiedHeatingSetpoint { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, int16_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const int16_t& value); +} // namespace UnoccupiedHeatingSetpoint + +namespace MinHeatSetpointLimit { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, int16_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const int16_t& value); +} // namespace MinHeatSetpointLimit + +namespace MaxHeatSetpointLimit { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, int16_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const int16_t& value); +} // namespace MaxHeatSetpointLimit + +namespace MinCoolSetpointLimit { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, int16_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const int16_t& value); +} // namespace MinCoolSetpointLimit + +namespace MaxCoolSetpointLimit { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, int16_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const int16_t& value); +} // namespace MaxCoolSetpointLimit + +namespace MinSetpointDeadBand { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, int8_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const int8_t& value); +} // namespace MinSetpointDeadBand + +namespace RemoteSensing { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint8_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint8_t& value); +} // namespace RemoteSensing + +namespace ControlSequenceOfOperation { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::Clusters::Thermostat::ThermostatControlSequence& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::Clusters::Thermostat::ThermostatControlSequence& value); +} // namespace ControlSequenceOfOperation + +namespace SystemMode { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint8_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint8_t& value); +} // namespace SystemMode + +namespace ThermostatRunningMode { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint8_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint8_t& value); +} // namespace ThermostatRunningMode + +namespace StartOfWeek { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint8_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint8_t& value); +} // namespace StartOfWeek + +namespace NumberOfWeeklyTransitions { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint8_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint8_t& value); +} // namespace NumberOfWeeklyTransitions + +namespace NumberOfDailyTransitions { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint8_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint8_t& value); +} // namespace NumberOfDailyTransitions + +namespace TemperatureSetpointHold { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint8_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint8_t& value); +} // namespace TemperatureSetpointHold + +namespace TemperatureSetpointHoldDuration { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::DataModel::Nullable& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::DataModel::Nullable& value); +} // namespace TemperatureSetpointHoldDuration + +namespace ThermostatProgrammingOperationMode { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint8_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint8_t& value); +} // namespace ThermostatProgrammingOperationMode + +namespace ThermostatRunningState { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); +} // namespace ThermostatRunningState + +namespace SetpointChangeSource { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint8_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint8_t& value); +} // namespace SetpointChangeSource + +namespace SetpointChangeAmount { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::DataModel::Nullable& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::DataModel::Nullable& value); +} // namespace SetpointChangeAmount + +namespace SetpointChangeSourceTimestamp { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint32_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint32_t& value); +} // namespace SetpointChangeSourceTimestamp + +namespace OccupiedSetback { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::DataModel::Nullable& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::DataModel::Nullable& value); +} // namespace OccupiedSetback + +namespace OccupiedSetbackMin { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::DataModel::Nullable& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::DataModel::Nullable& value); +} // namespace OccupiedSetbackMin + +namespace OccupiedSetbackMax { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::DataModel::Nullable& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::DataModel::Nullable& value); +} // namespace OccupiedSetbackMax + +namespace UnoccupiedSetback { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::DataModel::Nullable& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::DataModel::Nullable& value); +} // namespace UnoccupiedSetback + +namespace UnoccupiedSetbackMin { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::DataModel::Nullable& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::DataModel::Nullable& value); +} // namespace UnoccupiedSetbackMin + +namespace UnoccupiedSetbackMax { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::DataModel::Nullable& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::DataModel::Nullable& value); +} // namespace UnoccupiedSetbackMax + +namespace EmergencyHeatDelta { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint8_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint8_t& value); +} // namespace EmergencyHeatDelta + +namespace ACType { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint8_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint8_t& value); +} // namespace ACType + +namespace ACCapacity { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); +} // namespace ACCapacity + +namespace ACRefrigerantType { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint8_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint8_t& value); +} // namespace ACRefrigerantType + +namespace ACCompressorType { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint8_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint8_t& value); +} // namespace ACCompressorType + +namespace ACErrorCode { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint32_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint32_t& value); +} // namespace ACErrorCode + +namespace ACLouverPosition { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint8_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint8_t& value); +} // namespace ACLouverPosition + +namespace ACCoilTemperature { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::DataModel::Nullable& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::DataModel::Nullable& value); +} // namespace ACCoilTemperature + +namespace ACCapacityformat { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint8_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint8_t& value); +} // namespace ACCapacityformat + +namespace FeatureMap { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint32_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint32_t& value); +} // namespace FeatureMap + +namespace ClusterRevision { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); +} // namespace ClusterRevision + +} // namespace Attributes +} // Thermostat + +namespace FanControl { +namespace Attributes { + +namespace FanMode { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::Clusters::FanControl::FanModeType& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::Clusters::FanControl::FanModeType& value); +} // namespace FanMode + +namespace FanModeSequence { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::Clusters::FanControl::FanModeSequenceType& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::Clusters::FanControl::FanModeSequenceType& value); +} // namespace FanModeSequence + +namespace PercentSetting { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::DataModel::Nullable& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::DataModel::Nullable& value); +} // namespace PercentSetting + +namespace PercentCurrent { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint8_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint8_t& value); +} // namespace PercentCurrent + +namespace SpeedMax { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint8_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint8_t& value); +} // namespace SpeedMax + +namespace SpeedSetting { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::DataModel::Nullable& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::DataModel::Nullable& value); +} // namespace SpeedSetting + +namespace SpeedCurrent { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint8_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint8_t& value); +} // namespace SpeedCurrent + +namespace RockSupport { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint8_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint8_t& value); +} // namespace RockSupport + +namespace RockSetting { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint8_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint8_t& value); +} // namespace RockSetting + +namespace WindSupport { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint8_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint8_t& value); +} // namespace WindSupport + +namespace WindSetting { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint8_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint8_t& value); +} // namespace WindSetting + +namespace FeatureMap { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint32_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint32_t& value); +} // namespace FeatureMap + +namespace ClusterRevision { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); +} // namespace ClusterRevision + +} // namespace Attributes +} // FanControl + +namespace ThermostatUserInterfaceConfiguration { +namespace Attributes { + +namespace TemperatureDisplayMode { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint8_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint8_t& value); +} // namespace TemperatureDisplayMode + +namespace KeypadLockout { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint8_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint8_t& value); +} // namespace KeypadLockout + +namespace ScheduleProgrammingVisibility { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint8_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint8_t& value); +} // namespace ScheduleProgrammingVisibility + +namespace FeatureMap { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint32_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint32_t& value); +} // namespace FeatureMap + +namespace ClusterRevision { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); +} // namespace ClusterRevision + +} // namespace Attributes +} // ThermostatUserInterfaceConfiguration + +namespace ColorControl { +namespace Attributes { + +namespace CurrentHue { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint8_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint8_t& value); +} // namespace CurrentHue + +namespace CurrentSaturation { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint8_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint8_t& value); +} // namespace CurrentSaturation + +namespace RemainingTime { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); +} // namespace RemainingTime + +namespace CurrentX { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); +} // namespace CurrentX + +namespace CurrentY { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); +} // namespace CurrentY + +namespace DriftCompensation { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint8_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint8_t& value); +} // namespace DriftCompensation + +namespace CompensationText { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::CharSpan& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::CharSpan& value); +} // namespace CompensationText + +namespace ColorTemperatureMireds { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); +} // namespace ColorTemperatureMireds + +namespace ColorMode { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint8_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint8_t& value); +} // namespace ColorMode + +namespace Options { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint8_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint8_t& value); +} // namespace Options + +namespace NumberOfPrimaries { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::DataModel::Nullable& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::DataModel::Nullable& value); +} // namespace NumberOfPrimaries + +namespace Primary1X { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); +} // namespace Primary1X + +namespace Primary1Y { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); +} // namespace Primary1Y + +namespace Primary1Intensity { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::DataModel::Nullable& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::DataModel::Nullable& value); +} // namespace Primary1Intensity + +namespace Primary2X { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); +} // namespace Primary2X + +namespace Primary2Y { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); +} // namespace Primary2Y + +namespace Primary2Intensity { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::DataModel::Nullable& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::DataModel::Nullable& value); +} // namespace Primary2Intensity + +namespace Primary3X { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); +} // namespace Primary3X + +namespace Primary3Y { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); +} // namespace Primary3Y + +namespace Primary3Intensity { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::DataModel::Nullable& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::DataModel::Nullable& value); +} // namespace Primary3Intensity + +namespace Primary4X { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); +} // namespace Primary4X + +namespace Primary4Y { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); +} // namespace Primary4Y + +namespace Primary4Intensity { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::DataModel::Nullable& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::DataModel::Nullable& value); +} // namespace Primary4Intensity + +namespace Primary5X { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); +} // namespace Primary5X + +namespace Primary5Y { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); +} // namespace Primary5Y + +namespace Primary5Intensity { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::DataModel::Nullable& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::DataModel::Nullable& value); +} // namespace Primary5Intensity + +namespace Primary6X { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); +} // namespace Primary6X + +namespace Primary6Y { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); +} // namespace Primary6Y + +namespace Primary6Intensity { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::DataModel::Nullable& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::DataModel::Nullable& value); +} // namespace Primary6Intensity + +namespace WhitePointX { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); +} // namespace WhitePointX + +namespace WhitePointY { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); +} // namespace WhitePointY + +namespace ColorPointRX { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); +} // namespace ColorPointRX + +namespace ColorPointRY { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); +} // namespace ColorPointRY + +namespace ColorPointRIntensity { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::DataModel::Nullable& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::DataModel::Nullable& value); +} // namespace ColorPointRIntensity + +namespace ColorPointGX { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); +} // namespace ColorPointGX + +namespace ColorPointGY { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); +} // namespace ColorPointGY + +namespace ColorPointGIntensity { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::DataModel::Nullable& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::DataModel::Nullable& value); +} // namespace ColorPointGIntensity + +namespace ColorPointBX { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); +} // namespace ColorPointBX + +namespace ColorPointBY { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); +} // namespace ColorPointBY + +namespace ColorPointBIntensity { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::DataModel::Nullable& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::DataModel::Nullable& value); +} // namespace ColorPointBIntensity + +namespace EnhancedCurrentHue { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); +} // namespace EnhancedCurrentHue + +namespace EnhancedColorMode { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint8_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint8_t& value); +} // namespace EnhancedColorMode + +namespace ColorLoopActive { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint8_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint8_t& value); +} // namespace ColorLoopActive + +namespace ColorLoopDirection { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint8_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint8_t& value); +} // namespace ColorLoopDirection + +namespace ColorLoopTime { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); +} // namespace ColorLoopTime + +namespace ColorLoopStartEnhancedHue { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); +} // namespace ColorLoopStartEnhancedHue + +namespace ColorLoopStoredEnhancedHue { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); +} // namespace ColorLoopStoredEnhancedHue + +namespace ColorCapabilities { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); +} // namespace ColorCapabilities + +namespace ColorTempPhysicalMinMireds { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); +} // namespace ColorTempPhysicalMinMireds + +namespace ColorTempPhysicalMaxMireds { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); +} // namespace ColorTempPhysicalMaxMireds + +namespace CoupleColorTempToLevelMinMireds { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); +} // namespace CoupleColorTempToLevelMinMireds + +namespace StartUpColorTemperatureMireds { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::DataModel::Nullable& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::DataModel::Nullable& value); +} // namespace StartUpColorTemperatureMireds + +namespace FeatureMap { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint32_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint32_t& value); +} // namespace FeatureMap + +namespace ClusterRevision { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); +} // namespace ClusterRevision + +} // namespace Attributes +} // ColorControl + +namespace BallastConfiguration { +namespace Attributes { + +namespace PhysicalMinLevel { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint8_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint8_t& value); +} // namespace PhysicalMinLevel + +namespace PhysicalMaxLevel { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint8_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint8_t& value); +} // namespace PhysicalMaxLevel + +namespace BallastStatus { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint8_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint8_t& value); +} // namespace BallastStatus + +namespace MinLevel { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint8_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint8_t& value); +} // namespace MinLevel + +namespace MaxLevel { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint8_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint8_t& value); +} // namespace MaxLevel + +namespace IntrinsicBalanceFactor { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::DataModel::Nullable& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::DataModel::Nullable& value); +} // namespace IntrinsicBalanceFactor + +namespace BallastFactorAdjustment { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::DataModel::Nullable& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::DataModel::Nullable& value); +} // namespace BallastFactorAdjustment + +namespace LampQuantity { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint8_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint8_t& value); +} // namespace LampQuantity + +namespace LampType { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::CharSpan& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::CharSpan& value); +} // namespace LampType + +namespace LampManufacturer { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::CharSpan& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::CharSpan& value); +} // namespace LampManufacturer + +namespace LampRatedHours { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::DataModel::Nullable& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::DataModel::Nullable& value); +} // namespace LampRatedHours + +namespace LampBurnHours { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::DataModel::Nullable& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::DataModel::Nullable& value); +} // namespace LampBurnHours + +namespace LampAlarmMode { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint8_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint8_t& value); +} // namespace LampAlarmMode + +namespace LampBurnHoursTripPoint { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::DataModel::Nullable& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::DataModel::Nullable& value); +} // namespace LampBurnHoursTripPoint + +namespace FeatureMap { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint32_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint32_t& value); +} // namespace FeatureMap + +namespace ClusterRevision { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); +} // namespace ClusterRevision + +} // namespace Attributes +} // BallastConfiguration + +namespace IlluminanceMeasurement { +namespace Attributes { + +namespace MeasuredValue { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::DataModel::Nullable& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::DataModel::Nullable& value); +} // namespace MeasuredValue + +namespace MinMeasuredValue { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::DataModel::Nullable& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::DataModel::Nullable& value); +} // namespace MinMeasuredValue + +namespace MaxMeasuredValue { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::DataModel::Nullable& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::DataModel::Nullable& value); +} // namespace MaxMeasuredValue + +namespace Tolerance { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); +} // namespace Tolerance + +namespace LightSensorType { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::DataModel::Nullable& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::DataModel::Nullable& value); +} // namespace LightSensorType + +namespace FeatureMap { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint32_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint32_t& value); +} // namespace FeatureMap + +namespace ClusterRevision { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); +} // namespace ClusterRevision + +} // namespace Attributes +} // IlluminanceMeasurement + +namespace TemperatureMeasurement { +namespace Attributes { + +namespace MeasuredValue { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::DataModel::Nullable& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::DataModel::Nullable& value); +} // namespace MeasuredValue + +namespace MinMeasuredValue { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::DataModel::Nullable& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::DataModel::Nullable& value); +} // namespace MinMeasuredValue + +namespace MaxMeasuredValue { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::DataModel::Nullable& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::DataModel::Nullable& value); +} // namespace MaxMeasuredValue + +namespace Tolerance { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); +} // namespace Tolerance + +namespace FeatureMap { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint32_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint32_t& value); +} // namespace FeatureMap + +namespace ClusterRevision { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); +} // namespace ClusterRevision + +} // namespace Attributes +} // TemperatureMeasurement + +namespace PressureMeasurement { +namespace Attributes { + +namespace MeasuredValue { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::DataModel::Nullable& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::DataModel::Nullable& value); +} // namespace MeasuredValue + +namespace MinMeasuredValue { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::DataModel::Nullable& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::DataModel::Nullable& value); +} // namespace MinMeasuredValue + +namespace MaxMeasuredValue { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::DataModel::Nullable& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::DataModel::Nullable& value); +} // namespace MaxMeasuredValue + +namespace Tolerance { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); +} // namespace Tolerance + +namespace ScaledValue { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::DataModel::Nullable& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::DataModel::Nullable& value); +} // namespace ScaledValue + +namespace MinScaledValue { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::DataModel::Nullable& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::DataModel::Nullable& value); +} // namespace MinScaledValue + +namespace MaxScaledValue { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::DataModel::Nullable& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::DataModel::Nullable& value); +} // namespace MaxScaledValue + +namespace ScaledTolerance { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); +} // namespace ScaledTolerance + +namespace Scale { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, int8_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const int8_t& value); +} // namespace Scale + +namespace FeatureMap { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint32_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint32_t& value); +} // namespace FeatureMap + +namespace ClusterRevision { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); +} // namespace ClusterRevision + +} // namespace Attributes +} // PressureMeasurement + +namespace FlowMeasurement { +namespace Attributes { + +namespace MeasuredValue { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::DataModel::Nullable& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::DataModel::Nullable& value); +} // namespace MeasuredValue + +namespace MinMeasuredValue { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::DataModel::Nullable& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::DataModel::Nullable& value); +} // namespace MinMeasuredValue + +namespace MaxMeasuredValue { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::DataModel::Nullable& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::DataModel::Nullable& value); +} // namespace MaxMeasuredValue + +namespace Tolerance { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); +} // namespace Tolerance + +namespace FeatureMap { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint32_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint32_t& value); +} // namespace FeatureMap + +namespace ClusterRevision { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); +} // namespace ClusterRevision + +} // namespace Attributes +} // FlowMeasurement + +namespace RelativeHumidityMeasurement { +namespace Attributes { + +namespace MeasuredValue { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::DataModel::Nullable& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::DataModel::Nullable& value); +} // namespace MeasuredValue + +namespace MinMeasuredValue { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::DataModel::Nullable& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::DataModel::Nullable& value); +} // namespace MinMeasuredValue + +namespace MaxMeasuredValue { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::DataModel::Nullable& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::DataModel::Nullable& value); +} // namespace MaxMeasuredValue + +namespace Tolerance { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); +} // namespace Tolerance + +namespace FeatureMap { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint32_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint32_t& value); +} // namespace FeatureMap + +namespace ClusterRevision { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); +} // namespace ClusterRevision + +} // namespace Attributes +} // RelativeHumidityMeasurement + +namespace OccupancySensing { +namespace Attributes { + +namespace Occupancy { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint8_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint8_t& value); +} // namespace Occupancy + +namespace OccupancySensorType { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint8_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint8_t& value); +} // namespace OccupancySensorType + +namespace OccupancySensorTypeBitmap { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint8_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint8_t& value); +} // namespace OccupancySensorTypeBitmap + +namespace PirOccupiedToUnoccupiedDelay { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); +} // namespace PirOccupiedToUnoccupiedDelay + +namespace PirUnoccupiedToOccupiedDelay { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); +} // namespace PirUnoccupiedToOccupiedDelay + +namespace PirUnoccupiedToOccupiedThreshold { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint8_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint8_t& value); +} // namespace PirUnoccupiedToOccupiedThreshold + +namespace UltrasonicOccupiedToUnoccupiedDelay { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); +} // namespace UltrasonicOccupiedToUnoccupiedDelay + +namespace UltrasonicUnoccupiedToOccupiedDelay { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); +} // namespace UltrasonicUnoccupiedToOccupiedDelay + +namespace UltrasonicUnoccupiedToOccupiedThreshold { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint8_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint8_t& value); +} // namespace UltrasonicUnoccupiedToOccupiedThreshold + +namespace PhysicalContactOccupiedToUnoccupiedDelay { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); +} // namespace PhysicalContactOccupiedToUnoccupiedDelay + +namespace PhysicalContactUnoccupiedToOccupiedDelay { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); +} // namespace PhysicalContactUnoccupiedToOccupiedDelay + +namespace PhysicalContactUnoccupiedToOccupiedThreshold { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint8_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint8_t& value); +} // namespace PhysicalContactUnoccupiedToOccupiedThreshold + +namespace FeatureMap { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint32_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint32_t& value); +} // namespace FeatureMap + +namespace ClusterRevision { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); +} // namespace ClusterRevision + +} // namespace Attributes +} // OccupancySensing + +namespace WakeOnLan { +namespace Attributes { + +namespace MACAddress { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::CharSpan& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::CharSpan& value); +} // namespace MACAddress + +namespace FeatureMap { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint32_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint32_t& value); +} // namespace FeatureMap + +namespace ClusterRevision { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); +} // namespace ClusterRevision + +} // namespace Attributes +} // WakeOnLan + +namespace Channel { +namespace Attributes { + +namespace FeatureMap { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint32_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint32_t& value); +} // namespace FeatureMap + +namespace ClusterRevision { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); +} // namespace ClusterRevision + +} // namespace Attributes +} // Channel + +namespace TargetNavigator { +namespace Attributes { + +namespace CurrentTarget { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint8_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint8_t& value); +} // namespace CurrentTarget + +namespace FeatureMap { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint32_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint32_t& value); +} // namespace FeatureMap + +namespace ClusterRevision { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); +} // namespace ClusterRevision + +} // namespace Attributes +} // TargetNavigator + +namespace MediaPlayback { +namespace Attributes { + +namespace CurrentState { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::Clusters::MediaPlayback::PlaybackStateEnum& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::Clusters::MediaPlayback::PlaybackStateEnum& value); +} // namespace CurrentState + +namespace StartTime { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::DataModel::Nullable& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::DataModel::Nullable& value); +} // namespace StartTime + +namespace Duration { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::DataModel::Nullable& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::DataModel::Nullable& value); +} // namespace Duration + +namespace PlaybackSpeed { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, float& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const float& value); +} // namespace PlaybackSpeed + +namespace SeekRangeEnd { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::DataModel::Nullable& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::DataModel::Nullable& value); +} // namespace SeekRangeEnd + +namespace SeekRangeStart { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::DataModel::Nullable& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::DataModel::Nullable& value); +} // namespace SeekRangeStart + +namespace FeatureMap { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint32_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint32_t& value); +} // namespace FeatureMap + +namespace ClusterRevision { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); +} // namespace ClusterRevision + +} // namespace Attributes +} // MediaPlayback + +namespace MediaInput { +namespace Attributes { + +namespace CurrentInput { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint8_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint8_t& value); +} // namespace CurrentInput + +namespace FeatureMap { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint32_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint32_t& value); +} // namespace FeatureMap + +namespace ClusterRevision { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); +} // namespace ClusterRevision + +} // namespace Attributes +} // MediaInput + +namespace LowPower { +namespace Attributes { + +namespace FeatureMap { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint32_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint32_t& value); +} // namespace FeatureMap + +namespace ClusterRevision { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); +} // namespace ClusterRevision + +} // namespace Attributes +} // LowPower + +namespace KeypadInput { +namespace Attributes { + +namespace FeatureMap { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint32_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint32_t& value); +} // namespace FeatureMap + +namespace ClusterRevision { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); +} // namespace ClusterRevision + +} // namespace Attributes +} // KeypadInput + +namespace ContentLauncher { +namespace Attributes { + +namespace SupportedStreamingProtocols { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint32_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint32_t& value); +} // namespace SupportedStreamingProtocols + +namespace FeatureMap { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint32_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint32_t& value); +} // namespace FeatureMap + +namespace ClusterRevision { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); +} // namespace ClusterRevision + +} // namespace Attributes +} // ContentLauncher + +namespace AudioOutput { +namespace Attributes { + +namespace CurrentOutput { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint8_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint8_t& value); +} // namespace CurrentOutput + +namespace FeatureMap { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint32_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint32_t& value); +} // namespace FeatureMap + +namespace ClusterRevision { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); +} // namespace ClusterRevision + +} // namespace Attributes +} // AudioOutput + +namespace ApplicationLauncher { +namespace Attributes { + +namespace FeatureMap { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint32_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint32_t& value); +} // namespace FeatureMap + +namespace ClusterRevision { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); +} // namespace ClusterRevision + +} // namespace Attributes +} // ApplicationLauncher + +namespace ApplicationBasic { +namespace Attributes { + +namespace VendorName { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::CharSpan& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::CharSpan& value); +} // namespace VendorName + +namespace VendorID { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::VendorId& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::VendorId& value); +} // namespace VendorID + +namespace ApplicationName { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::CharSpan& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::CharSpan& value); +} // namespace ApplicationName + +namespace ProductID { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); +} // namespace ProductID + +namespace Status { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::Clusters::ApplicationBasic::ApplicationStatusEnum& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::Clusters::ApplicationBasic::ApplicationStatusEnum& value); +} // namespace Status + +namespace ApplicationVersion { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::CharSpan& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::CharSpan& value); +} // namespace ApplicationVersion + +namespace FeatureMap { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint32_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint32_t& value); +} // namespace FeatureMap + +namespace ClusterRevision { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); +} // namespace ClusterRevision + +} // namespace Attributes +} // ApplicationBasic + +namespace AccountLogin { +namespace Attributes { + +namespace FeatureMap { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint32_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint32_t& value); +} // namespace FeatureMap + +namespace ClusterRevision { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); +} // namespace ClusterRevision + +} // namespace Attributes +} // AccountLogin + +namespace ElectricalMeasurement { +namespace Attributes { + +namespace MeasurementType { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint32_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint32_t& value); +} // namespace MeasurementType + +namespace DcVoltage { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, int16_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const int16_t& value); +} // namespace DcVoltage + +namespace DcVoltageMin { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, int16_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const int16_t& value); +} // namespace DcVoltageMin + +namespace DcVoltageMax { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, int16_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const int16_t& value); +} // namespace DcVoltageMax + +namespace DcCurrent { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, int16_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const int16_t& value); +} // namespace DcCurrent + +namespace DcCurrentMin { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, int16_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const int16_t& value); +} // namespace DcCurrentMin + +namespace DcCurrentMax { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, int16_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const int16_t& value); +} // namespace DcCurrentMax + +namespace DcPower { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, int16_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const int16_t& value); +} // namespace DcPower + +namespace DcPowerMin { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, int16_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const int16_t& value); +} // namespace DcPowerMin + +namespace DcPowerMax { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, int16_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const int16_t& value); +} // namespace DcPowerMax + +namespace DcVoltageMultiplier { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); +} // namespace DcVoltageMultiplier + +namespace DcVoltageDivisor { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); +} // namespace DcVoltageDivisor + +namespace DcCurrentMultiplier { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); +} // namespace DcCurrentMultiplier + +namespace DcCurrentDivisor { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); +} // namespace DcCurrentDivisor + +namespace DcPowerMultiplier { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); +} // namespace DcPowerMultiplier + +namespace DcPowerDivisor { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); +} // namespace DcPowerDivisor + +namespace AcFrequency { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); +} // namespace AcFrequency + +namespace AcFrequencyMin { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); +} // namespace AcFrequencyMin + +namespace AcFrequencyMax { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); +} // namespace AcFrequencyMax + +namespace NeutralCurrent { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); +} // namespace NeutralCurrent + +namespace TotalActivePower { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, int32_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const int32_t& value); +} // namespace TotalActivePower + +namespace TotalReactivePower { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, int32_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const int32_t& value); +} // namespace TotalReactivePower + +namespace TotalApparentPower { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint32_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint32_t& value); +} // namespace TotalApparentPower + +namespace Measured1stHarmonicCurrent { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, int16_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const int16_t& value); +} // namespace Measured1stHarmonicCurrent + +namespace Measured3rdHarmonicCurrent { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, int16_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const int16_t& value); +} // namespace Measured3rdHarmonicCurrent + +namespace Measured5thHarmonicCurrent { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, int16_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const int16_t& value); +} // namespace Measured5thHarmonicCurrent + +namespace Measured7thHarmonicCurrent { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, int16_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const int16_t& value); +} // namespace Measured7thHarmonicCurrent + +namespace Measured9thHarmonicCurrent { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, int16_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const int16_t& value); +} // namespace Measured9thHarmonicCurrent + +namespace Measured11thHarmonicCurrent { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, int16_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const int16_t& value); +} // namespace Measured11thHarmonicCurrent + +namespace MeasuredPhase1stHarmonicCurrent { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, int16_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const int16_t& value); +} // namespace MeasuredPhase1stHarmonicCurrent + +namespace MeasuredPhase3rdHarmonicCurrent { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, int16_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const int16_t& value); +} // namespace MeasuredPhase3rdHarmonicCurrent + +namespace MeasuredPhase5thHarmonicCurrent { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, int16_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const int16_t& value); +} // namespace MeasuredPhase5thHarmonicCurrent + +namespace MeasuredPhase7thHarmonicCurrent { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, int16_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const int16_t& value); +} // namespace MeasuredPhase7thHarmonicCurrent + +namespace MeasuredPhase9thHarmonicCurrent { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, int16_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const int16_t& value); +} // namespace MeasuredPhase9thHarmonicCurrent + +namespace MeasuredPhase11thHarmonicCurrent { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, int16_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const int16_t& value); +} // namespace MeasuredPhase11thHarmonicCurrent + +namespace AcFrequencyMultiplier { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); +} // namespace AcFrequencyMultiplier + +namespace AcFrequencyDivisor { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); +} // namespace AcFrequencyDivisor + +namespace PowerMultiplier { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint32_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint32_t& value); +} // namespace PowerMultiplier + +namespace PowerDivisor { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint32_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint32_t& value); +} // namespace PowerDivisor + +namespace HarmonicCurrentMultiplier { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, int8_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const int8_t& value); +} // namespace HarmonicCurrentMultiplier + +namespace PhaseHarmonicCurrentMultiplier { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, int8_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const int8_t& value); +} // namespace PhaseHarmonicCurrentMultiplier + +namespace InstantaneousVoltage { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, int16_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const int16_t& value); +} // namespace InstantaneousVoltage + +namespace InstantaneousLineCurrent { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); +} // namespace InstantaneousLineCurrent + +namespace InstantaneousActiveCurrent { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, int16_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const int16_t& value); +} // namespace InstantaneousActiveCurrent + +namespace InstantaneousReactiveCurrent { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, int16_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const int16_t& value); +} // namespace InstantaneousReactiveCurrent + +namespace InstantaneousPower { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, int16_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const int16_t& value); +} // namespace InstantaneousPower + +namespace RmsVoltage { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); +} // namespace RmsVoltage + +namespace RmsVoltageMin { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); +} // namespace RmsVoltageMin + +namespace RmsVoltageMax { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); +} // namespace RmsVoltageMax + +namespace RmsCurrent { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); +} // namespace RmsCurrent + +namespace RmsCurrentMin { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); +} // namespace RmsCurrentMin + +namespace RmsCurrentMax { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); +} // namespace RmsCurrentMax + +namespace ActivePower { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, int16_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const int16_t& value); +} // namespace ActivePower + +namespace ActivePowerMin { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, int16_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const int16_t& value); +} // namespace ActivePowerMin + +namespace ActivePowerMax { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, int16_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const int16_t& value); +} // namespace ActivePowerMax + +namespace ReactivePower { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, int16_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const int16_t& value); +} // namespace ReactivePower + +namespace ApparentPower { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); +} // namespace ApparentPower + +namespace PowerFactor { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, int8_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const int8_t& value); +} // namespace PowerFactor + +namespace AverageRmsVoltageMeasurementPeriod { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); +} // namespace AverageRmsVoltageMeasurementPeriod + +namespace AverageRmsUnderVoltageCounter { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); +} // namespace AverageRmsUnderVoltageCounter + +namespace RmsExtremeOverVoltagePeriod { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); +} // namespace RmsExtremeOverVoltagePeriod + +namespace RmsExtremeUnderVoltagePeriod { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); +} // namespace RmsExtremeUnderVoltagePeriod + +namespace RmsVoltageSagPeriod { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); +} // namespace RmsVoltageSagPeriod + +namespace RmsVoltageSwellPeriod { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); +} // namespace RmsVoltageSwellPeriod + +namespace AcVoltageMultiplier { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); +} // namespace AcVoltageMultiplier + +namespace AcVoltageDivisor { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); +} // namespace AcVoltageDivisor + +namespace AcCurrentMultiplier { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); +} // namespace AcCurrentMultiplier + +namespace AcCurrentDivisor { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); +} // namespace AcCurrentDivisor + +namespace AcPowerMultiplier { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); +} // namespace AcPowerMultiplier + +namespace AcPowerDivisor { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); +} // namespace AcPowerDivisor + +namespace OverloadAlarmsMask { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint8_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint8_t& value); +} // namespace OverloadAlarmsMask + +namespace VoltageOverload { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, int16_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const int16_t& value); +} // namespace VoltageOverload + +namespace CurrentOverload { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, int16_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const int16_t& value); +} // namespace CurrentOverload + +namespace AcOverloadAlarmsMask { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); +} // namespace AcOverloadAlarmsMask + +namespace AcVoltageOverload { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, int16_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const int16_t& value); +} // namespace AcVoltageOverload + +namespace AcCurrentOverload { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, int16_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const int16_t& value); +} // namespace AcCurrentOverload + +namespace AcActivePowerOverload { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, int16_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const int16_t& value); +} // namespace AcActivePowerOverload + +namespace AcReactivePowerOverload { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, int16_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const int16_t& value); +} // namespace AcReactivePowerOverload + +namespace AverageRmsOverVoltage { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, int16_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const int16_t& value); +} // namespace AverageRmsOverVoltage + +namespace AverageRmsUnderVoltage { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, int16_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const int16_t& value); +} // namespace AverageRmsUnderVoltage + +namespace RmsExtremeOverVoltage { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, int16_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const int16_t& value); +} // namespace RmsExtremeOverVoltage + +namespace RmsExtremeUnderVoltage { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, int16_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const int16_t& value); +} // namespace RmsExtremeUnderVoltage + +namespace RmsVoltageSag { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, int16_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const int16_t& value); +} // namespace RmsVoltageSag + +namespace RmsVoltageSwell { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, int16_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const int16_t& value); +} // namespace RmsVoltageSwell + +namespace LineCurrentPhaseB { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); +} // namespace LineCurrentPhaseB + +namespace ActiveCurrentPhaseB { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, int16_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const int16_t& value); +} // namespace ActiveCurrentPhaseB + +namespace ReactiveCurrentPhaseB { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, int16_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const int16_t& value); +} // namespace ReactiveCurrentPhaseB + +namespace RmsVoltagePhaseB { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); +} // namespace RmsVoltagePhaseB + +namespace RmsVoltageMinPhaseB { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); +} // namespace RmsVoltageMinPhaseB + +namespace RmsVoltageMaxPhaseB { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); +} // namespace RmsVoltageMaxPhaseB + +namespace RmsCurrentPhaseB { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); +} // namespace RmsCurrentPhaseB + +namespace RmsCurrentMinPhaseB { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); +} // namespace RmsCurrentMinPhaseB + +namespace RmsCurrentMaxPhaseB { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); +} // namespace RmsCurrentMaxPhaseB + +namespace ActivePowerPhaseB { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, int16_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const int16_t& value); +} // namespace ActivePowerPhaseB + +namespace ActivePowerMinPhaseB { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, int16_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const int16_t& value); +} // namespace ActivePowerMinPhaseB + +namespace ActivePowerMaxPhaseB { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, int16_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const int16_t& value); +} // namespace ActivePowerMaxPhaseB + +namespace ReactivePowerPhaseB { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, int16_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const int16_t& value); +} // namespace ReactivePowerPhaseB + +namespace ApparentPowerPhaseB { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); +} // namespace ApparentPowerPhaseB + +namespace PowerFactorPhaseB { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, int8_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const int8_t& value); +} // namespace PowerFactorPhaseB + +namespace AverageRmsVoltageMeasurementPeriodPhaseB { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); +} // namespace AverageRmsVoltageMeasurementPeriodPhaseB + +namespace AverageRmsOverVoltageCounterPhaseB { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); +} // namespace AverageRmsOverVoltageCounterPhaseB + +namespace AverageRmsUnderVoltageCounterPhaseB { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); +} // namespace AverageRmsUnderVoltageCounterPhaseB + +namespace RmsExtremeOverVoltagePeriodPhaseB { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); +} // namespace RmsExtremeOverVoltagePeriodPhaseB + +namespace RmsExtremeUnderVoltagePeriodPhaseB { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); +} // namespace RmsExtremeUnderVoltagePeriodPhaseB + +namespace RmsVoltageSagPeriodPhaseB { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); +} // namespace RmsVoltageSagPeriodPhaseB + +namespace RmsVoltageSwellPeriodPhaseB { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); +} // namespace RmsVoltageSwellPeriodPhaseB + +namespace LineCurrentPhaseC { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); +} // namespace LineCurrentPhaseC + +namespace ActiveCurrentPhaseC { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, int16_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const int16_t& value); +} // namespace ActiveCurrentPhaseC + +namespace ReactiveCurrentPhaseC { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, int16_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const int16_t& value); +} // namespace ReactiveCurrentPhaseC + +namespace RmsVoltagePhaseC { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); +} // namespace RmsVoltagePhaseC + +namespace RmsVoltageMinPhaseC { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); +} // namespace RmsVoltageMinPhaseC + +namespace RmsVoltageMaxPhaseC { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); +} // namespace RmsVoltageMaxPhaseC + +namespace RmsCurrentPhaseC { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); +} // namespace RmsCurrentPhaseC + +namespace RmsCurrentMinPhaseC { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); +} // namespace RmsCurrentMinPhaseC + +namespace RmsCurrentMaxPhaseC { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); +} // namespace RmsCurrentMaxPhaseC + +namespace ActivePowerPhaseC { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, int16_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const int16_t& value); +} // namespace ActivePowerPhaseC + +namespace ActivePowerMinPhaseC { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, int16_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const int16_t& value); +} // namespace ActivePowerMinPhaseC + +namespace ActivePowerMaxPhaseC { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, int16_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const int16_t& value); +} // namespace ActivePowerMaxPhaseC + +namespace ReactivePowerPhaseC { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, int16_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const int16_t& value); +} // namespace ReactivePowerPhaseC + +namespace ApparentPowerPhaseC { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); +} // namespace ApparentPowerPhaseC + +namespace PowerFactorPhaseC { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, int8_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const int8_t& value); +} // namespace PowerFactorPhaseC + +namespace AverageRmsVoltageMeasurementPeriodPhaseC { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); +} // namespace AverageRmsVoltageMeasurementPeriodPhaseC + +namespace AverageRmsOverVoltageCounterPhaseC { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); +} // namespace AverageRmsOverVoltageCounterPhaseC + +namespace AverageRmsUnderVoltageCounterPhaseC { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); +} // namespace AverageRmsUnderVoltageCounterPhaseC + +namespace RmsExtremeOverVoltagePeriodPhaseC { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); +} // namespace RmsExtremeOverVoltagePeriodPhaseC + +namespace RmsExtremeUnderVoltagePeriodPhaseC { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); +} // namespace RmsExtremeUnderVoltagePeriodPhaseC + +namespace RmsVoltageSagPeriodPhaseC { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); +} // namespace RmsVoltageSagPeriodPhaseC + +namespace RmsVoltageSwellPeriodPhaseC { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); +} // namespace RmsVoltageSwellPeriodPhaseC + +namespace FeatureMap { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint32_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint32_t& value); +} // namespace FeatureMap + +namespace ClusterRevision { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); +} // namespace ClusterRevision + +} // namespace Attributes +} // ElectricalMeasurement + +namespace ClientMonitoring { +namespace Attributes { + +namespace IdleModeInterval { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint32_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint32_t& value); +} // namespace IdleModeInterval + +namespace ActiveModeInterval { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint32_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint32_t& value); +} // namespace ActiveModeInterval + +namespace ActiveModeThreshold { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); +} // namespace ActiveModeThreshold + +namespace FeatureMap { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint32_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint32_t& value); +} // namespace FeatureMap + +namespace ClusterRevision { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); +} // namespace ClusterRevision + +} // namespace Attributes +} // ClientMonitoring + +namespace UnitTesting { +namespace Attributes { + +namespace Boolean { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, bool& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const bool& value); +} // namespace Boolean + +namespace Bitmap8 { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::BitMask& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::BitMask& value); +} // namespace Bitmap8 + +namespace Bitmap16 { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::BitMask& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::BitMask& value); +} // namespace Bitmap16 + +namespace Bitmap32 { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::BitMask& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::BitMask& value); +} // namespace Bitmap32 + +namespace Bitmap64 { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::BitMask& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::BitMask& value); +} // namespace Bitmap64 + +namespace Int8u { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint8_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint8_t& value); +} // namespace Int8u + +namespace Int16u { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); +} // namespace Int16u + +namespace Int24u { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint32_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint32_t& value); +} // namespace Int24u + +namespace Int32u { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint32_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint32_t& value); +} // namespace Int32u + +namespace Int40u { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint64_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint64_t& value); +} // namespace Int40u + +namespace Int48u { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint64_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint64_t& value); +} // namespace Int48u + +namespace Int56u { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint64_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint64_t& value); +} // namespace Int56u + +namespace Int64u { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint64_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint64_t& value); +} // namespace Int64u + +namespace Int8s { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, int8_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const int8_t& value); +} // namespace Int8s + +namespace Int16s { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, int16_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const int16_t& value); +} // namespace Int16s + +namespace Int24s { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, int32_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const int32_t& value); +} // namespace Int24s + +namespace Int32s { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, int32_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const int32_t& value); +} // namespace Int32s + +namespace Int40s { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, int64_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const int64_t& value); +} // namespace Int40s + +namespace Int48s { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, int64_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const int64_t& value); +} // namespace Int48s + +namespace Int56s { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, int64_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const int64_t& value); +} // namespace Int56s + +namespace Int64s { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, int64_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const int64_t& value); +} // namespace Int64s + +namespace Enum8 { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint8_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint8_t& value); +} // namespace Enum8 + +namespace Enum16 { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); +} // namespace Enum16 + +namespace FloatSingle { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, float& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const float& value); +} // namespace FloatSingle + +namespace FloatDouble { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, double& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const double& value); +} // namespace FloatDouble + +namespace OctetString { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::ByteSpan& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::ByteSpan& value); +} // namespace OctetString + +namespace LongOctetString { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::ByteSpan& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::ByteSpan& value); +} // namespace LongOctetString + +namespace CharString { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::CharSpan& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::CharSpan& value); +} // namespace CharString + +namespace LongCharString { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::CharSpan& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::CharSpan& value); +} // namespace LongCharString + +namespace EpochUs { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint64_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint64_t& value); +} // namespace EpochUs + +namespace EpochS { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint32_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint32_t& value); +} // namespace EpochS + +namespace VendorId { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::VendorId& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::VendorId& value); +} // namespace VendorId + +namespace EnumAttr { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::Clusters::UnitTesting::SimpleEnum& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::Clusters::UnitTesting::SimpleEnum& value); +} // namespace EnumAttr + +namespace RangeRestrictedInt8u { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint8_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint8_t& value); +} // namespace RangeRestrictedInt8u + +namespace RangeRestrictedInt8s { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, int8_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const int8_t& value); +} // namespace RangeRestrictedInt8s + +namespace RangeRestrictedInt16u { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); +} // namespace RangeRestrictedInt16u + +namespace RangeRestrictedInt16s { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, int16_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const int16_t& value); +} // namespace RangeRestrictedInt16s + +namespace TimedWriteBoolean { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, bool& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const bool& value); +} // namespace TimedWriteBoolean + +namespace GeneralErrorBoolean { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, bool& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const bool& value); +} // namespace GeneralErrorBoolean + +namespace ClusterErrorBoolean { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, bool& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const bool& value); +} // namespace ClusterErrorBoolean + +namespace Unsupported { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, bool& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const bool& value); +} // namespace Unsupported + +namespace NullableBoolean { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::DataModel::Nullable& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::DataModel::Nullable& value); +} // namespace NullableBoolean + +namespace NullableBitmap8 { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::DataModel::Nullable>& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::DataModel::Nullable>& value); +} // namespace NullableBitmap8 + +namespace NullableBitmap16 { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::DataModel::Nullable>& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::DataModel::Nullable>& value); +} // namespace NullableBitmap16 + +namespace NullableBitmap32 { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::DataModel::Nullable>& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::DataModel::Nullable>& value); +} // namespace NullableBitmap32 + +namespace NullableBitmap64 { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::DataModel::Nullable>& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::DataModel::Nullable>& value); +} // namespace NullableBitmap64 + +namespace NullableInt8u { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::DataModel::Nullable& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::DataModel::Nullable& value); +} // namespace NullableInt8u + +namespace NullableInt16u { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::DataModel::Nullable& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::DataModel::Nullable& value); +} // namespace NullableInt16u + +namespace NullableInt24u { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::DataModel::Nullable& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::DataModel::Nullable& value); +} // namespace NullableInt24u + +namespace NullableInt32u { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::DataModel::Nullable& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::DataModel::Nullable& value); +} // namespace NullableInt32u + +namespace NullableInt40u { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::DataModel::Nullable& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::DataModel::Nullable& value); +} // namespace NullableInt40u + +namespace NullableInt48u { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::DataModel::Nullable& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::DataModel::Nullable& value); +} // namespace NullableInt48u + +namespace NullableInt56u { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::DataModel::Nullable& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::DataModel::Nullable& value); +} // namespace NullableInt56u + +namespace NullableInt64u { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::DataModel::Nullable& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::DataModel::Nullable& value); +} // namespace NullableInt64u + +namespace NullableInt8s { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::DataModel::Nullable& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::DataModel::Nullable& value); +} // namespace NullableInt8s + +namespace NullableInt16s { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::DataModel::Nullable& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::DataModel::Nullable& value); +} // namespace NullableInt16s + +namespace NullableInt24s { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::DataModel::Nullable& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::DataModel::Nullable& value); +} // namespace NullableInt24s + +namespace NullableInt32s { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::DataModel::Nullable& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::DataModel::Nullable& value); +} // namespace NullableInt32s + +namespace NullableInt40s { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::DataModel::Nullable& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::DataModel::Nullable& value); +} // namespace NullableInt40s + +namespace NullableInt48s { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::DataModel::Nullable& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::DataModel::Nullable& value); +} // namespace NullableInt48s + +namespace NullableInt56s { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::DataModel::Nullable& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::DataModel::Nullable& value); +} // namespace NullableInt56s + +namespace NullableInt64s { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::DataModel::Nullable& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::DataModel::Nullable& value); +} // namespace NullableInt64s + +namespace NullableEnum8 { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::DataModel::Nullable& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::DataModel::Nullable& value); +} // namespace NullableEnum8 + +namespace NullableEnum16 { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::DataModel::Nullable& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::DataModel::Nullable& value); +} // namespace NullableEnum16 + +namespace NullableFloatSingle { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::DataModel::Nullable& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::DataModel::Nullable& value); +} // namespace NullableFloatSingle + +namespace NullableFloatDouble { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::DataModel::Nullable& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::DataModel::Nullable& value); +} // namespace NullableFloatDouble + +namespace NullableOctetString { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::DataModel::Nullable& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::DataModel::Nullable& value); +} // namespace NullableOctetString + +namespace NullableCharString { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::DataModel::Nullable& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::DataModel::Nullable& value); +} // namespace NullableCharString + +namespace NullableEnumAttr { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::DataModel::Nullable& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::DataModel::Nullable& value); +} // namespace NullableEnumAttr + +namespace NullableRangeRestrictedInt8u { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::DataModel::Nullable& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::DataModel::Nullable& value); +} // namespace NullableRangeRestrictedInt8u + +namespace NullableRangeRestrictedInt8s { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::DataModel::Nullable& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::DataModel::Nullable& value); +} // namespace NullableRangeRestrictedInt8s + +namespace NullableRangeRestrictedInt16u { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::DataModel::Nullable& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::DataModel::Nullable& value); +} // namespace NullableRangeRestrictedInt16u + +namespace NullableRangeRestrictedInt16s { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, chip::app::DataModel::Nullable& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const chip::app::DataModel::Nullable& value); +} // namespace NullableRangeRestrictedInt16s + +namespace WriteOnlyInt8u { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint8_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint8_t& value); +} // namespace WriteOnlyInt8u + +namespace FeatureMap { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint32_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint32_t& value); +} // namespace FeatureMap + +namespace ClusterRevision { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); +} // namespace ClusterRevision + +} // namespace Attributes +} // UnitTesting + +namespace FaultInjection { +namespace Attributes { + +namespace FeatureMap { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint32_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint32_t& value); +} // namespace FeatureMap + +namespace ClusterRevision { +EmberAfStatus Get(const chip::app::ConcreteAttributePath& endpoint, uint16_t& value); +EmberAfStatus Set(const chip::app::ConcreteAttributePath& endpoint, const uint16_t& value); +} // namespace ClusterRevision + +} // namespace Attributes +} // FaultInjection + + +} // matter_bridge +} // unify diff --git a/silabs_examples/unify-matter-bridge/linux/zap-generated/data_model_translator/zcl_global_types.hpp b/silabs_examples/unify-matter-bridge/linux/zap-generated/data_model_translator/zcl_global_types.hpp index 06805a8f0d1ff6..8fcadc3261902c 100644 --- a/silabs_examples/unify-matter-bridge/linux/zap-generated/data_model_translator/zcl_global_types.hpp +++ b/silabs_examples/unify-matter-bridge/linux/zap-generated/data_model_translator/zcl_global_types.hpp @@ -4,6 +4,169 @@ #define __ZCL_GLOBAL_TYPES__ // ZCL enums + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + // ZCL bitmaps #define ZCL_BITMAP_ALARM_MASK_GENERAL_HW_FAULT (1) diff --git a/silabs_examples/unify-matter-bridge/linux/zap-generated/unify-matter-bridge-common/zap-generated/CHIPClientCallbacks.h b/silabs_examples/unify-matter-bridge/linux/zap-generated/unify-matter-bridge-common/zap-generated/CHIPClientCallbacks.h index f106dd2c9092af..5bd50d4dbed0d0 100644 --- a/silabs_examples/unify-matter-bridge/linux/zap-generated/unify-matter-bridge-common/zap-generated/CHIPClientCallbacks.h +++ b/silabs_examples/unify-matter-bridge/linux/zap-generated/unify-matter-bridge-common/zap-generated/CHIPClientCallbacks.h @@ -19,9 +19,9 @@ #pragma once +#include #include #include -#include #include #include #include @@ -30,25 +30,13 @@ #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& - data); -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); +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 & data); +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/silabs_examples/unify-matter-bridge/linux/zap-generated/unify-matter-bridge-common/zap-generated/CHIPClusters.h b/silabs_examples/unify-matter-bridge/linux/zap-generated/unify-matter-bridge-common/zap-generated/CHIPClusters.h index 0ffc86a9f11862..5dda985702ad5e 100644 --- a/silabs_examples/unify-matter-bridge/linux/zap-generated/unify-matter-bridge-common/zap-generated/CHIPClusters.h +++ b/silabs_examples/unify-matter-bridge/linux/zap-generated/unify-matter-bridge-common/zap-generated/CHIPClusters.h @@ -30,23 +30,19 @@ namespace chip { namespace Controller { - class DLL_EXPORT BindingCluster : public ClusterBase { - public: - BindingCluster(Messaging::ExchangeManager& exchangeManager, const SessionHandle& session, EndpointId endpoint) - : ClusterBase(exchangeManager, session, app::Clusters::Binding::Id, endpoint) - { - } - ~BindingCluster() { } - }; - - class DLL_EXPORT AccessControlCluster : public ClusterBase { - public: - AccessControlCluster(Messaging::ExchangeManager& exchangeManager, const SessionHandle& session, EndpointId endpoint) - : ClusterBase(exchangeManager, session, app::Clusters::AccessControl::Id, endpoint) - { - } - ~AccessControlCluster() { } - }; +class DLL_EXPORT BindingCluster : public ClusterBase +{ +public: + BindingCluster(Messaging::ExchangeManager & exchangeManager, const SessionHandle & session, EndpointId endpoint) : ClusterBase(exchangeManager, session, app::Clusters::Binding::Id, endpoint) {} + ~BindingCluster() {} +}; + +class DLL_EXPORT AccessControlCluster : public ClusterBase +{ +public: + AccessControlCluster(Messaging::ExchangeManager & exchangeManager, const SessionHandle & session, EndpointId endpoint) : ClusterBase(exchangeManager, session, app::Clusters::AccessControl::Id, endpoint) {} + ~AccessControlCluster() {} +}; } // namespace Controller } // namespace chip diff --git a/silabs_examples/unify-matter-bridge/linux/zap-generated/unify-matter-bridge-common/zap-generated/IMClusterCommandHandler.cpp b/silabs_examples/unify-matter-bridge/linux/zap-generated/unify-matter-bridge-common/zap-generated/IMClusterCommandHandler.cpp index 144b1b29c600b9..a5b2b3ef1605b2 100644 --- a/silabs_examples/unify-matter-bridge/linux/zap-generated/unify-matter-bridge-common/zap-generated/IMClusterCommandHandler.cpp +++ b/silabs_examples/unify-matter-bridge/linux/zap-generated/unify-matter-bridge-common/zap-generated/IMClusterCommandHandler.cpp @@ -17,17 +17,17 @@ // THIS FILE IS GENERATED BY ZAP -#include #include +#include #include #include #include #include #include +#include #include #include -#include #include #include @@ -37,544 +37,556 @@ namespace chip { namespace app { - // Cluster specific command parsing - - namespace Clusters { - - namespace AdministratorCommissioning { - - void DispatchServerCommand(CommandHandler* apCommandObj, const ConcreteCommandPath& aCommandPath, TLV::TLVReader& aDataTlv) - { - CHIP_ERROR TLVError = CHIP_NO_ERROR; - bool wasHandled = false; - { - switch (aCommandPath.mCommandId) { - case Commands::OpenCommissioningWindow::Id: { - Commands::OpenCommissioningWindow::DecodableType commandData; - TLVError = DataModel::Decode(aDataTlv, commandData); - if (TLVError == CHIP_NO_ERROR) { - wasHandled = emberAfAdministratorCommissioningClusterOpenCommissioningWindowCallback(apCommandObj, aCommandPath, - commandData); - } - break; - } - case Commands::OpenBasicCommissioningWindow::Id: { - Commands::OpenBasicCommissioningWindow::DecodableType commandData; - TLVError = DataModel::Decode(aDataTlv, commandData); - if (TLVError == CHIP_NO_ERROR) { - wasHandled = emberAfAdministratorCommissioningClusterOpenBasicCommissioningWindowCallback( - apCommandObj, aCommandPath, commandData); - } - break; - } - case Commands::RevokeCommissioning::Id: { - Commands::RevokeCommissioning::DecodableType commandData; - TLVError = DataModel::Decode(aDataTlv, commandData); - if (TLVError == CHIP_NO_ERROR) { - wasHandled = emberAfAdministratorCommissioningClusterRevokeCommissioningCallback(apCommandObj, aCommandPath, commandData); - } - break; - } - default: { - // Unrecognized command ID, error status will apply. - apCommandObj->AddStatus(aCommandPath, Protocols::InteractionModel::Status::UnsupportedCommand); - ChipLogError(Zcl, "Unknown command " ChipLogFormatMEI " for cluster " ChipLogFormatMEI, - ChipLogValueMEI(aCommandPath.mCommandId), ChipLogValueMEI(aCommandPath.mClusterId)); - return; - } - } - } - - if (CHIP_NO_ERROR != TLVError || !wasHandled) { - apCommandObj->AddStatus(aCommandPath, Protocols::InteractionModel::Status::InvalidCommand); - ChipLogProgress(Zcl, "Failed to dispatch command, TLVError=%" CHIP_ERROR_FORMAT, TLVError.Format()); - } - } - - } // namespace AdministratorCommissioning - - namespace DiagnosticLogs { - - void DispatchServerCommand(CommandHandler* apCommandObj, const ConcreteCommandPath& aCommandPath, TLV::TLVReader& aDataTlv) - { - CHIP_ERROR TLVError = CHIP_NO_ERROR; - bool wasHandled = false; - { - switch (aCommandPath.mCommandId) { - case Commands::RetrieveLogsRequest::Id: { - Commands::RetrieveLogsRequest::DecodableType commandData; - TLVError = DataModel::Decode(aDataTlv, commandData); - if (TLVError == CHIP_NO_ERROR) { - wasHandled = emberAfDiagnosticLogsClusterRetrieveLogsRequestCallback(apCommandObj, aCommandPath, commandData); - } - break; - } - default: { - // Unrecognized command ID, error status will apply. - apCommandObj->AddStatus(aCommandPath, Protocols::InteractionModel::Status::UnsupportedCommand); - ChipLogError(Zcl, "Unknown command " ChipLogFormatMEI " for cluster " ChipLogFormatMEI, - ChipLogValueMEI(aCommandPath.mCommandId), ChipLogValueMEI(aCommandPath.mClusterId)); - return; - } - } - } - - if (CHIP_NO_ERROR != TLVError || !wasHandled) { - apCommandObj->AddStatus(aCommandPath, Protocols::InteractionModel::Status::InvalidCommand); - ChipLogProgress(Zcl, "Failed to dispatch command, TLVError=%" CHIP_ERROR_FORMAT, TLVError.Format()); - } - } - - } // namespace DiagnosticLogs - - namespace GeneralCommissioning { - - void DispatchServerCommand(CommandHandler* apCommandObj, const ConcreteCommandPath& aCommandPath, TLV::TLVReader& aDataTlv) - { - CHIP_ERROR TLVError = CHIP_NO_ERROR; - bool wasHandled = false; - { - switch (aCommandPath.mCommandId) { - case Commands::ArmFailSafe::Id: { - Commands::ArmFailSafe::DecodableType commandData; - TLVError = DataModel::Decode(aDataTlv, commandData); - if (TLVError == CHIP_NO_ERROR) { - wasHandled = emberAfGeneralCommissioningClusterArmFailSafeCallback(apCommandObj, aCommandPath, commandData); - } - break; - } - case Commands::SetRegulatoryConfig::Id: { - Commands::SetRegulatoryConfig::DecodableType commandData; - TLVError = DataModel::Decode(aDataTlv, commandData); - if (TLVError == CHIP_NO_ERROR) { - wasHandled = emberAfGeneralCommissioningClusterSetRegulatoryConfigCallback(apCommandObj, aCommandPath, commandData); - } - break; - } - case Commands::CommissioningComplete::Id: { - Commands::CommissioningComplete::DecodableType commandData; - TLVError = DataModel::Decode(aDataTlv, commandData); - if (TLVError == CHIP_NO_ERROR) { - wasHandled = emberAfGeneralCommissioningClusterCommissioningCompleteCallback(apCommandObj, aCommandPath, commandData); - } - break; - } - default: { - // Unrecognized command ID, error status will apply. - apCommandObj->AddStatus(aCommandPath, Protocols::InteractionModel::Status::UnsupportedCommand); - ChipLogError(Zcl, "Unknown command " ChipLogFormatMEI " for cluster " ChipLogFormatMEI, - ChipLogValueMEI(aCommandPath.mCommandId), ChipLogValueMEI(aCommandPath.mClusterId)); - return; - } - } - } - - if (CHIP_NO_ERROR != TLVError || !wasHandled) { - apCommandObj->AddStatus(aCommandPath, Protocols::InteractionModel::Status::InvalidCommand); - ChipLogProgress(Zcl, "Failed to dispatch command, TLVError=%" CHIP_ERROR_FORMAT, TLVError.Format()); - } - } - - } // namespace GeneralCommissioning - - namespace GeneralDiagnostics { - - void DispatchServerCommand(CommandHandler* apCommandObj, const ConcreteCommandPath& aCommandPath, TLV::TLVReader& aDataTlv) - { - CHIP_ERROR TLVError = CHIP_NO_ERROR; - bool wasHandled = false; - { - switch (aCommandPath.mCommandId) { - case Commands::TestEventTrigger::Id: { - Commands::TestEventTrigger::DecodableType commandData; - TLVError = DataModel::Decode(aDataTlv, commandData); - if (TLVError == CHIP_NO_ERROR) { - wasHandled = emberAfGeneralDiagnosticsClusterTestEventTriggerCallback(apCommandObj, aCommandPath, commandData); - } - break; - } - default: { - // Unrecognized command ID, error status will apply. - apCommandObj->AddStatus(aCommandPath, Protocols::InteractionModel::Status::UnsupportedCommand); - ChipLogError(Zcl, "Unknown command " ChipLogFormatMEI " for cluster " ChipLogFormatMEI, - ChipLogValueMEI(aCommandPath.mCommandId), ChipLogValueMEI(aCommandPath.mClusterId)); - return; - } - } - } - - if (CHIP_NO_ERROR != TLVError || !wasHandled) { - apCommandObj->AddStatus(aCommandPath, Protocols::InteractionModel::Status::InvalidCommand); - ChipLogProgress(Zcl, "Failed to dispatch command, TLVError=%" CHIP_ERROR_FORMAT, TLVError.Format()); - } - } - - } // namespace GeneralDiagnostics - - namespace GroupKeyManagement { - - void DispatchServerCommand(CommandHandler* apCommandObj, const ConcreteCommandPath& aCommandPath, TLV::TLVReader& aDataTlv) - { - CHIP_ERROR TLVError = CHIP_NO_ERROR; - bool wasHandled = false; - { - switch (aCommandPath.mCommandId) { - case Commands::KeySetWrite::Id: { - Commands::KeySetWrite::DecodableType commandData; - TLVError = DataModel::Decode(aDataTlv, commandData); - if (TLVError == CHIP_NO_ERROR) { - wasHandled = emberAfGroupKeyManagementClusterKeySetWriteCallback(apCommandObj, aCommandPath, commandData); - } - break; - } - case Commands::KeySetRead::Id: { - Commands::KeySetRead::DecodableType commandData; - TLVError = DataModel::Decode(aDataTlv, commandData); - if (TLVError == CHIP_NO_ERROR) { - wasHandled = emberAfGroupKeyManagementClusterKeySetReadCallback(apCommandObj, aCommandPath, commandData); - } - break; - } - case Commands::KeySetRemove::Id: { - Commands::KeySetRemove::DecodableType commandData; - TLVError = DataModel::Decode(aDataTlv, commandData); - if (TLVError == CHIP_NO_ERROR) { - wasHandled = emberAfGroupKeyManagementClusterKeySetRemoveCallback(apCommandObj, aCommandPath, commandData); - } - break; - } - case Commands::KeySetReadAllIndices::Id: { - Commands::KeySetReadAllIndices::DecodableType commandData; - TLVError = DataModel::Decode(aDataTlv, commandData); - if (TLVError == CHIP_NO_ERROR) { - wasHandled = emberAfGroupKeyManagementClusterKeySetReadAllIndicesCallback(apCommandObj, aCommandPath, commandData); - } - break; - } - default: { - // Unrecognized command ID, error status will apply. - apCommandObj->AddStatus(aCommandPath, Protocols::InteractionModel::Status::UnsupportedCommand); - ChipLogError(Zcl, "Unknown command " ChipLogFormatMEI " for cluster " ChipLogFormatMEI, - ChipLogValueMEI(aCommandPath.mCommandId), ChipLogValueMEI(aCommandPath.mClusterId)); - return; - } - } - } - - if (CHIP_NO_ERROR != TLVError || !wasHandled) { - apCommandObj->AddStatus(aCommandPath, Protocols::InteractionModel::Status::InvalidCommand); - ChipLogProgress(Zcl, "Failed to dispatch command, TLVError=%" CHIP_ERROR_FORMAT, TLVError.Format()); - } - } - - } // namespace GroupKeyManagement - - namespace Groups { - - void DispatchServerCommand(CommandHandler* apCommandObj, const ConcreteCommandPath& aCommandPath, TLV::TLVReader& aDataTlv) - { - CHIP_ERROR TLVError = CHIP_NO_ERROR; - bool wasHandled = false; - { - switch (aCommandPath.mCommandId) { - case Commands::AddGroup::Id: { - Commands::AddGroup::DecodableType commandData; - TLVError = DataModel::Decode(aDataTlv, commandData); - if (TLVError == CHIP_NO_ERROR) { - wasHandled = emberAfGroupsClusterAddGroupCallback(apCommandObj, aCommandPath, commandData); - } - break; - } - case Commands::ViewGroup::Id: { - Commands::ViewGroup::DecodableType commandData; - TLVError = DataModel::Decode(aDataTlv, commandData); - if (TLVError == CHIP_NO_ERROR) { - wasHandled = emberAfGroupsClusterViewGroupCallback(apCommandObj, aCommandPath, commandData); - } - break; - } - case Commands::GetGroupMembership::Id: { - Commands::GetGroupMembership::DecodableType commandData; - TLVError = DataModel::Decode(aDataTlv, commandData); - if (TLVError == CHIP_NO_ERROR) { - wasHandled = emberAfGroupsClusterGetGroupMembershipCallback(apCommandObj, aCommandPath, commandData); - } - break; - } - case Commands::RemoveGroup::Id: { - Commands::RemoveGroup::DecodableType commandData; - TLVError = DataModel::Decode(aDataTlv, commandData); - if (TLVError == CHIP_NO_ERROR) { - wasHandled = emberAfGroupsClusterRemoveGroupCallback(apCommandObj, aCommandPath, commandData); - } - break; - } - case Commands::RemoveAllGroups::Id: { - Commands::RemoveAllGroups::DecodableType commandData; - TLVError = DataModel::Decode(aDataTlv, commandData); - if (TLVError == CHIP_NO_ERROR) { - wasHandled = emberAfGroupsClusterRemoveAllGroupsCallback(apCommandObj, aCommandPath, commandData); - } - break; - } - case Commands::AddGroupIfIdentifying::Id: { - Commands::AddGroupIfIdentifying::DecodableType commandData; - TLVError = DataModel::Decode(aDataTlv, commandData); - if (TLVError == CHIP_NO_ERROR) { - wasHandled = emberAfGroupsClusterAddGroupIfIdentifyingCallback(apCommandObj, aCommandPath, commandData); - } - break; - } - default: { - // Unrecognized command ID, error status will apply. - apCommandObj->AddStatus(aCommandPath, Protocols::InteractionModel::Status::UnsupportedCommand); - ChipLogError(Zcl, "Unknown command " ChipLogFormatMEI " for cluster " ChipLogFormatMEI, - ChipLogValueMEI(aCommandPath.mCommandId), ChipLogValueMEI(aCommandPath.mClusterId)); - return; - } - } - } - - if (CHIP_NO_ERROR != TLVError || !wasHandled) { - apCommandObj->AddStatus(aCommandPath, Protocols::InteractionModel::Status::InvalidCommand); - ChipLogProgress(Zcl, "Failed to dispatch command, TLVError=%" CHIP_ERROR_FORMAT, TLVError.Format()); - } - } - - } // namespace Groups - - namespace Identify { - - void DispatchServerCommand(CommandHandler* apCommandObj, const ConcreteCommandPath& aCommandPath, TLV::TLVReader& aDataTlv) - { - CHIP_ERROR TLVError = CHIP_NO_ERROR; - bool wasHandled = false; - { - switch (aCommandPath.mCommandId) { - case Commands::Identify::Id: { - Commands::Identify::DecodableType commandData; - TLVError = DataModel::Decode(aDataTlv, commandData); - if (TLVError == CHIP_NO_ERROR) { - wasHandled = emberAfIdentifyClusterIdentifyCallback(apCommandObj, aCommandPath, commandData); - } - 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); - ChipLogError(Zcl, "Unknown command " ChipLogFormatMEI " for cluster " ChipLogFormatMEI, - ChipLogValueMEI(aCommandPath.mCommandId), ChipLogValueMEI(aCommandPath.mClusterId)); - return; - } - } - } - - if (CHIP_NO_ERROR != TLVError || !wasHandled) { - apCommandObj->AddStatus(aCommandPath, Protocols::InteractionModel::Status::InvalidCommand); - ChipLogProgress(Zcl, "Failed to dispatch command, TLVError=%" CHIP_ERROR_FORMAT, TLVError.Format()); - } - } - - } // namespace Identify - - namespace NetworkCommissioning { - - void DispatchServerCommand(CommandHandler* apCommandObj, const ConcreteCommandPath& aCommandPath, TLV::TLVReader& aDataTlv) - { - CHIP_ERROR TLVError = CHIP_NO_ERROR; - bool wasHandled = false; - { - switch (aCommandPath.mCommandId) { - case Commands::ScanNetworks::Id: { - Commands::ScanNetworks::DecodableType commandData; - TLVError = DataModel::Decode(aDataTlv, commandData); - if (TLVError == CHIP_NO_ERROR) { - wasHandled = emberAfNetworkCommissioningClusterScanNetworksCallback(apCommandObj, aCommandPath, commandData); - } - break; - } - case Commands::RemoveNetwork::Id: { - Commands::RemoveNetwork::DecodableType commandData; - TLVError = DataModel::Decode(aDataTlv, commandData); - if (TLVError == CHIP_NO_ERROR) { - wasHandled = emberAfNetworkCommissioningClusterRemoveNetworkCallback(apCommandObj, aCommandPath, commandData); - } - break; - } - case Commands::ConnectNetwork::Id: { - Commands::ConnectNetwork::DecodableType commandData; - TLVError = DataModel::Decode(aDataTlv, commandData); - if (TLVError == CHIP_NO_ERROR) { - wasHandled = emberAfNetworkCommissioningClusterConnectNetworkCallback(apCommandObj, aCommandPath, commandData); - } - break; - } - case Commands::ReorderNetwork::Id: { - Commands::ReorderNetwork::DecodableType commandData; - TLVError = DataModel::Decode(aDataTlv, commandData); - if (TLVError == CHIP_NO_ERROR) { - wasHandled = emberAfNetworkCommissioningClusterReorderNetworkCallback(apCommandObj, aCommandPath, commandData); - } - break; - } - default: { - // Unrecognized command ID, error status will apply. - apCommandObj->AddStatus(aCommandPath, Protocols::InteractionModel::Status::UnsupportedCommand); - ChipLogError(Zcl, "Unknown command " ChipLogFormatMEI " for cluster " ChipLogFormatMEI, - ChipLogValueMEI(aCommandPath.mCommandId), ChipLogValueMEI(aCommandPath.mClusterId)); - return; - } - } - } - - if (CHIP_NO_ERROR != TLVError || !wasHandled) { - apCommandObj->AddStatus(aCommandPath, Protocols::InteractionModel::Status::InvalidCommand); - ChipLogProgress(Zcl, "Failed to dispatch command, TLVError=%" CHIP_ERROR_FORMAT, TLVError.Format()); - } - } - - } // namespace NetworkCommissioning - - namespace OperationalCredentials { - - void DispatchServerCommand(CommandHandler* apCommandObj, const ConcreteCommandPath& aCommandPath, TLV::TLVReader& aDataTlv) - { - CHIP_ERROR TLVError = CHIP_NO_ERROR; - bool wasHandled = false; - { - switch (aCommandPath.mCommandId) { - case Commands::AttestationRequest::Id: { - Commands::AttestationRequest::DecodableType commandData; - TLVError = DataModel::Decode(aDataTlv, commandData); - if (TLVError == CHIP_NO_ERROR) { - wasHandled = emberAfOperationalCredentialsClusterAttestationRequestCallback(apCommandObj, aCommandPath, commandData); - } - break; - } - case Commands::CertificateChainRequest::Id: { - Commands::CertificateChainRequest::DecodableType commandData; - TLVError = DataModel::Decode(aDataTlv, commandData); - if (TLVError == CHIP_NO_ERROR) { - wasHandled = emberAfOperationalCredentialsClusterCertificateChainRequestCallback(apCommandObj, aCommandPath, commandData); - } - break; - } - case Commands::CSRRequest::Id: { - Commands::CSRRequest::DecodableType commandData; - TLVError = DataModel::Decode(aDataTlv, commandData); - if (TLVError == CHIP_NO_ERROR) { - wasHandled = emberAfOperationalCredentialsClusterCSRRequestCallback(apCommandObj, aCommandPath, commandData); - } - break; - } - case Commands::AddNOC::Id: { - Commands::AddNOC::DecodableType commandData; - TLVError = DataModel::Decode(aDataTlv, commandData); - if (TLVError == CHIP_NO_ERROR) { - wasHandled = emberAfOperationalCredentialsClusterAddNOCCallback(apCommandObj, aCommandPath, commandData); - } - break; - } - case Commands::UpdateNOC::Id: { - Commands::UpdateNOC::DecodableType commandData; - TLVError = DataModel::Decode(aDataTlv, commandData); - if (TLVError == CHIP_NO_ERROR) { - wasHandled = emberAfOperationalCredentialsClusterUpdateNOCCallback(apCommandObj, aCommandPath, commandData); - } - break; - } - case Commands::UpdateFabricLabel::Id: { - Commands::UpdateFabricLabel::DecodableType commandData; - TLVError = DataModel::Decode(aDataTlv, commandData); - if (TLVError == CHIP_NO_ERROR) { - wasHandled = emberAfOperationalCredentialsClusterUpdateFabricLabelCallback(apCommandObj, aCommandPath, commandData); - } - break; - } - case Commands::RemoveFabric::Id: { - Commands::RemoveFabric::DecodableType commandData; - TLVError = DataModel::Decode(aDataTlv, commandData); - if (TLVError == CHIP_NO_ERROR) { - wasHandled = emberAfOperationalCredentialsClusterRemoveFabricCallback(apCommandObj, aCommandPath, commandData); - } - break; - } - case Commands::AddTrustedRootCertificate::Id: { - Commands::AddTrustedRootCertificate::DecodableType commandData; - TLVError = DataModel::Decode(aDataTlv, commandData); - if (TLVError == CHIP_NO_ERROR) { - wasHandled = emberAfOperationalCredentialsClusterAddTrustedRootCertificateCallback(apCommandObj, aCommandPath, commandData); - } - break; - } - default: { - // Unrecognized command ID, error status will apply. - apCommandObj->AddStatus(aCommandPath, Protocols::InteractionModel::Status::UnsupportedCommand); - ChipLogError(Zcl, "Unknown command " ChipLogFormatMEI " for cluster " ChipLogFormatMEI, - ChipLogValueMEI(aCommandPath.mCommandId), ChipLogValueMEI(aCommandPath.mClusterId)); - return; - } - } - } - - if (CHIP_NO_ERROR != TLVError || !wasHandled) { - apCommandObj->AddStatus(aCommandPath, Protocols::InteractionModel::Status::InvalidCommand); - ChipLogProgress(Zcl, "Failed to dispatch command, TLVError=%" CHIP_ERROR_FORMAT, TLVError.Format()); - } - } - - } // namespace OperationalCredentials - - } // namespace Clusters - - void DispatchSingleClusterCommand(const ConcreteCommandPath& aCommandPath, TLV::TLVReader& aReader, CommandHandler* apCommandObj) +// Cluster specific command parsing + +namespace Clusters { + +namespace AdministratorCommissioning { + +void DispatchServerCommand(CommandHandler * apCommandObj, const ConcreteCommandPath & aCommandPath, TLV::TLVReader & aDataTlv) +{ + CHIP_ERROR TLVError = CHIP_NO_ERROR; + bool wasHandled = false; + { + switch (aCommandPath.mCommandId) + { + case Commands::OpenCommissioningWindow::Id: { + Commands::OpenCommissioningWindow::DecodableType commandData; + TLVError = DataModel::Decode(aDataTlv, commandData); + if (TLVError == CHIP_NO_ERROR) { + wasHandled = emberAfAdministratorCommissioningClusterOpenCommissioningWindowCallback(apCommandObj, aCommandPath, commandData); + } + break; + } + case Commands::OpenBasicCommissioningWindow::Id: { + Commands::OpenBasicCommissioningWindow::DecodableType commandData; + TLVError = DataModel::Decode(aDataTlv, commandData); + if (TLVError == CHIP_NO_ERROR) { + wasHandled = emberAfAdministratorCommissioningClusterOpenBasicCommissioningWindowCallback(apCommandObj, aCommandPath, commandData); + } + break; + } + case Commands::RevokeCommissioning::Id: { + Commands::RevokeCommissioning::DecodableType commandData; + TLVError = DataModel::Decode(aDataTlv, commandData); + if (TLVError == CHIP_NO_ERROR) { + wasHandled = emberAfAdministratorCommissioningClusterRevokeCommissioningCallback(apCommandObj, aCommandPath, commandData); + } + break; + } + default: { + // Unrecognized command ID, error status will apply. + apCommandObj->AddStatus(aCommandPath, Protocols::InteractionModel::Status::UnsupportedCommand); + ChipLogError(Zcl, "Unknown command " ChipLogFormatMEI " for cluster " ChipLogFormatMEI, ChipLogValueMEI(aCommandPath.mCommandId), ChipLogValueMEI(aCommandPath.mClusterId)); + return; + } + } + } + + if (CHIP_NO_ERROR != TLVError || !wasHandled) + { + apCommandObj->AddStatus(aCommandPath, Protocols::InteractionModel::Status::InvalidCommand); + ChipLogProgress(Zcl, "Failed to dispatch command, TLVError=%" CHIP_ERROR_FORMAT, TLVError.Format()); + } +} + +} + +namespace DiagnosticLogs { + +void DispatchServerCommand(CommandHandler * apCommandObj, const ConcreteCommandPath & aCommandPath, TLV::TLVReader & aDataTlv) +{ + CHIP_ERROR TLVError = CHIP_NO_ERROR; + bool wasHandled = false; + { + switch (aCommandPath.mCommandId) + { + case Commands::RetrieveLogsRequest::Id: { + Commands::RetrieveLogsRequest::DecodableType commandData; + TLVError = DataModel::Decode(aDataTlv, commandData); + if (TLVError == CHIP_NO_ERROR) { + wasHandled = emberAfDiagnosticLogsClusterRetrieveLogsRequestCallback(apCommandObj, aCommandPath, commandData); + } + break; + } + default: { + // Unrecognized command ID, error status will apply. + apCommandObj->AddStatus(aCommandPath, Protocols::InteractionModel::Status::UnsupportedCommand); + ChipLogError(Zcl, "Unknown command " ChipLogFormatMEI " for cluster " ChipLogFormatMEI, ChipLogValueMEI(aCommandPath.mCommandId), ChipLogValueMEI(aCommandPath.mClusterId)); + return; + } + } + } + + if (CHIP_NO_ERROR != TLVError || !wasHandled) { - Compatibility::SetupEmberAfCommandHandler(apCommandObj, aCommandPath); + apCommandObj->AddStatus(aCommandPath, Protocols::InteractionModel::Status::InvalidCommand); + ChipLogProgress(Zcl, "Failed to dispatch command, TLVError=%" CHIP_ERROR_FORMAT, TLVError.Format()); + } +} - switch (aCommandPath.mClusterId) { - case Clusters::AdministratorCommissioning::Id: - Clusters::AdministratorCommissioning::DispatchServerCommand(apCommandObj, aCommandPath, aReader); +} + +namespace GeneralCommissioning { + +void DispatchServerCommand(CommandHandler * apCommandObj, const ConcreteCommandPath & aCommandPath, TLV::TLVReader & aDataTlv) +{ + CHIP_ERROR TLVError = CHIP_NO_ERROR; + bool wasHandled = false; + { + switch (aCommandPath.mCommandId) + { + case Commands::ArmFailSafe::Id: { + Commands::ArmFailSafe::DecodableType commandData; + TLVError = DataModel::Decode(aDataTlv, commandData); + if (TLVError == CHIP_NO_ERROR) { + wasHandled = emberAfGeneralCommissioningClusterArmFailSafeCallback(apCommandObj, aCommandPath, commandData); + } break; - case Clusters::DiagnosticLogs::Id: - Clusters::DiagnosticLogs::DispatchServerCommand(apCommandObj, aCommandPath, aReader); + } + case Commands::SetRegulatoryConfig::Id: { + Commands::SetRegulatoryConfig::DecodableType commandData; + TLVError = DataModel::Decode(aDataTlv, commandData); + if (TLVError == CHIP_NO_ERROR) { + wasHandled = emberAfGeneralCommissioningClusterSetRegulatoryConfigCallback(apCommandObj, aCommandPath, commandData); + } break; - case Clusters::GeneralCommissioning::Id: - Clusters::GeneralCommissioning::DispatchServerCommand(apCommandObj, aCommandPath, aReader); + } + case Commands::CommissioningComplete::Id: { + Commands::CommissioningComplete::DecodableType commandData; + TLVError = DataModel::Decode(aDataTlv, commandData); + if (TLVError == CHIP_NO_ERROR) { + wasHandled = emberAfGeneralCommissioningClusterCommissioningCompleteCallback(apCommandObj, aCommandPath, commandData); + } + break; + } + default: { + // Unrecognized command ID, error status will apply. + apCommandObj->AddStatus(aCommandPath, Protocols::InteractionModel::Status::UnsupportedCommand); + ChipLogError(Zcl, "Unknown command " ChipLogFormatMEI " for cluster " ChipLogFormatMEI, ChipLogValueMEI(aCommandPath.mCommandId), ChipLogValueMEI(aCommandPath.mClusterId)); + return; + } + } + } + + if (CHIP_NO_ERROR != TLVError || !wasHandled) + { + apCommandObj->AddStatus(aCommandPath, Protocols::InteractionModel::Status::InvalidCommand); + ChipLogProgress(Zcl, "Failed to dispatch command, TLVError=%" CHIP_ERROR_FORMAT, TLVError.Format()); + } +} + +} + +namespace GeneralDiagnostics { + +void DispatchServerCommand(CommandHandler * apCommandObj, const ConcreteCommandPath & aCommandPath, TLV::TLVReader & aDataTlv) +{ + CHIP_ERROR TLVError = CHIP_NO_ERROR; + bool wasHandled = false; + { + switch (aCommandPath.mCommandId) + { + case Commands::TestEventTrigger::Id: { + Commands::TestEventTrigger::DecodableType commandData; + TLVError = DataModel::Decode(aDataTlv, commandData); + if (TLVError == CHIP_NO_ERROR) { + wasHandled = emberAfGeneralDiagnosticsClusterTestEventTriggerCallback(apCommandObj, aCommandPath, commandData); + } break; - case Clusters::GeneralDiagnostics::Id: - Clusters::GeneralDiagnostics::DispatchServerCommand(apCommandObj, aCommandPath, aReader); + } + default: { + // Unrecognized command ID, error status will apply. + apCommandObj->AddStatus(aCommandPath, Protocols::InteractionModel::Status::UnsupportedCommand); + ChipLogError(Zcl, "Unknown command " ChipLogFormatMEI " for cluster " ChipLogFormatMEI, ChipLogValueMEI(aCommandPath.mCommandId), ChipLogValueMEI(aCommandPath.mClusterId)); + return; + } + } + } + + if (CHIP_NO_ERROR != TLVError || !wasHandled) + { + apCommandObj->AddStatus(aCommandPath, Protocols::InteractionModel::Status::InvalidCommand); + ChipLogProgress(Zcl, "Failed to dispatch command, TLVError=%" CHIP_ERROR_FORMAT, TLVError.Format()); + } +} + +} + +namespace GroupKeyManagement { + +void DispatchServerCommand(CommandHandler * apCommandObj, const ConcreteCommandPath & aCommandPath, TLV::TLVReader & aDataTlv) +{ + CHIP_ERROR TLVError = CHIP_NO_ERROR; + bool wasHandled = false; + { + switch (aCommandPath.mCommandId) + { + case Commands::KeySetWrite::Id: { + Commands::KeySetWrite::DecodableType commandData; + TLVError = DataModel::Decode(aDataTlv, commandData); + if (TLVError == CHIP_NO_ERROR) { + wasHandled = emberAfGroupKeyManagementClusterKeySetWriteCallback(apCommandObj, aCommandPath, commandData); + } break; - case Clusters::GroupKeyManagement::Id: - Clusters::GroupKeyManagement::DispatchServerCommand(apCommandObj, aCommandPath, aReader); + } + case Commands::KeySetRead::Id: { + Commands::KeySetRead::DecodableType commandData; + TLVError = DataModel::Decode(aDataTlv, commandData); + if (TLVError == CHIP_NO_ERROR) { + wasHandled = emberAfGroupKeyManagementClusterKeySetReadCallback(apCommandObj, aCommandPath, commandData); + } break; - case Clusters::Groups::Id: - Clusters::Groups::DispatchServerCommand(apCommandObj, aCommandPath, aReader); + } + case Commands::KeySetRemove::Id: { + Commands::KeySetRemove::DecodableType commandData; + TLVError = DataModel::Decode(aDataTlv, commandData); + if (TLVError == CHIP_NO_ERROR) { + wasHandled = emberAfGroupKeyManagementClusterKeySetRemoveCallback(apCommandObj, aCommandPath, commandData); + } break; - case Clusters::Identify::Id: - Clusters::Identify::DispatchServerCommand(apCommandObj, aCommandPath, aReader); + } + case Commands::KeySetReadAllIndices::Id: { + Commands::KeySetReadAllIndices::DecodableType commandData; + TLVError = DataModel::Decode(aDataTlv, commandData); + if (TLVError == CHIP_NO_ERROR) { + wasHandled = emberAfGroupKeyManagementClusterKeySetReadAllIndicesCallback(apCommandObj, aCommandPath, commandData); + } break; - case Clusters::NetworkCommissioning::Id: - Clusters::NetworkCommissioning::DispatchServerCommand(apCommandObj, aCommandPath, aReader); + } + default: { + // Unrecognized command ID, error status will apply. + apCommandObj->AddStatus(aCommandPath, Protocols::InteractionModel::Status::UnsupportedCommand); + ChipLogError(Zcl, "Unknown command " ChipLogFormatMEI " for cluster " ChipLogFormatMEI, ChipLogValueMEI(aCommandPath.mCommandId), ChipLogValueMEI(aCommandPath.mClusterId)); + return; + } + } + } + + if (CHIP_NO_ERROR != TLVError || !wasHandled) + { + apCommandObj->AddStatus(aCommandPath, Protocols::InteractionModel::Status::InvalidCommand); + ChipLogProgress(Zcl, "Failed to dispatch command, TLVError=%" CHIP_ERROR_FORMAT, TLVError.Format()); + } +} + +} + +namespace Groups { + +void DispatchServerCommand(CommandHandler * apCommandObj, const ConcreteCommandPath & aCommandPath, TLV::TLVReader & aDataTlv) +{ + CHIP_ERROR TLVError = CHIP_NO_ERROR; + bool wasHandled = false; + { + switch (aCommandPath.mCommandId) + { + case Commands::AddGroup::Id: { + Commands::AddGroup::DecodableType commandData; + TLVError = DataModel::Decode(aDataTlv, commandData); + if (TLVError == CHIP_NO_ERROR) { + wasHandled = emberAfGroupsClusterAddGroupCallback(apCommandObj, aCommandPath, commandData); + } break; - case Clusters::OperationalCredentials::Id: - Clusters::OperationalCredentials::DispatchServerCommand(apCommandObj, aCommandPath, aReader); + } + case Commands::ViewGroup::Id: { + Commands::ViewGroup::DecodableType commandData; + TLVError = DataModel::Decode(aDataTlv, commandData); + if (TLVError == CHIP_NO_ERROR) { + wasHandled = emberAfGroupsClusterViewGroupCallback(apCommandObj, aCommandPath, commandData); + } break; - default: - ChipLogError(Zcl, "Unknown cluster " ChipLogFormatMEI, ChipLogValueMEI(aCommandPath.mClusterId)); - apCommandObj->AddStatus(aCommandPath, Protocols::InteractionModel::Status::UnsupportedCluster); + } + case Commands::GetGroupMembership::Id: { + Commands::GetGroupMembership::DecodableType commandData; + TLVError = DataModel::Decode(aDataTlv, commandData); + if (TLVError == CHIP_NO_ERROR) { + wasHandled = emberAfGroupsClusterGetGroupMembershipCallback(apCommandObj, aCommandPath, commandData); + } break; } + case Commands::RemoveGroup::Id: { + Commands::RemoveGroup::DecodableType commandData; + TLVError = DataModel::Decode(aDataTlv, commandData); + if (TLVError == CHIP_NO_ERROR) { + wasHandled = emberAfGroupsClusterRemoveGroupCallback(apCommandObj, aCommandPath, commandData); + } + break; + } + case Commands::RemoveAllGroups::Id: { + Commands::RemoveAllGroups::DecodableType commandData; + TLVError = DataModel::Decode(aDataTlv, commandData); + if (TLVError == CHIP_NO_ERROR) { + wasHandled = emberAfGroupsClusterRemoveAllGroupsCallback(apCommandObj, aCommandPath, commandData); + } + break; + } + case Commands::AddGroupIfIdentifying::Id: { + Commands::AddGroupIfIdentifying::DecodableType commandData; + TLVError = DataModel::Decode(aDataTlv, commandData); + if (TLVError == CHIP_NO_ERROR) { + wasHandled = emberAfGroupsClusterAddGroupIfIdentifyingCallback(apCommandObj, aCommandPath, commandData); + } + break; + } + default: { + // Unrecognized command ID, error status will apply. + apCommandObj->AddStatus(aCommandPath, Protocols::InteractionModel::Status::UnsupportedCommand); + ChipLogError(Zcl, "Unknown command " ChipLogFormatMEI " for cluster " ChipLogFormatMEI, ChipLogValueMEI(aCommandPath.mCommandId), ChipLogValueMEI(aCommandPath.mClusterId)); + return; + } + } + } + + if (CHIP_NO_ERROR != TLVError || !wasHandled) + { + apCommandObj->AddStatus(aCommandPath, Protocols::InteractionModel::Status::InvalidCommand); + ChipLogProgress(Zcl, "Failed to dispatch command, TLVError=%" CHIP_ERROR_FORMAT, TLVError.Format()); + } +} + +} + +namespace Identify { + +void DispatchServerCommand(CommandHandler * apCommandObj, const ConcreteCommandPath & aCommandPath, TLV::TLVReader & aDataTlv) +{ + CHIP_ERROR TLVError = CHIP_NO_ERROR; + bool wasHandled = false; + { + switch (aCommandPath.mCommandId) + { + case Commands::Identify::Id: { + Commands::Identify::DecodableType commandData; + TLVError = DataModel::Decode(aDataTlv, commandData); + if (TLVError == CHIP_NO_ERROR) { + wasHandled = emberAfIdentifyClusterIdentifyCallback(apCommandObj, aCommandPath, commandData); + } + 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); + ChipLogError(Zcl, "Unknown command " ChipLogFormatMEI " for cluster " ChipLogFormatMEI, ChipLogValueMEI(aCommandPath.mCommandId), ChipLogValueMEI(aCommandPath.mClusterId)); + return; + } + } + } + + if (CHIP_NO_ERROR != TLVError || !wasHandled) + { + apCommandObj->AddStatus(aCommandPath, Protocols::InteractionModel::Status::InvalidCommand); + ChipLogProgress(Zcl, "Failed to dispatch command, TLVError=%" CHIP_ERROR_FORMAT, TLVError.Format()); + } +} - Compatibility::ResetEmberAfObjects(); +} + +namespace NetworkCommissioning { + +void DispatchServerCommand(CommandHandler * apCommandObj, const ConcreteCommandPath & aCommandPath, TLV::TLVReader & aDataTlv) +{ + CHIP_ERROR TLVError = CHIP_NO_ERROR; + bool wasHandled = false; + { + switch (aCommandPath.mCommandId) + { + case Commands::ScanNetworks::Id: { + Commands::ScanNetworks::DecodableType commandData; + TLVError = DataModel::Decode(aDataTlv, commandData); + if (TLVError == CHIP_NO_ERROR) { + wasHandled = emberAfNetworkCommissioningClusterScanNetworksCallback(apCommandObj, aCommandPath, commandData); + } + break; + } + case Commands::RemoveNetwork::Id: { + Commands::RemoveNetwork::DecodableType commandData; + TLVError = DataModel::Decode(aDataTlv, commandData); + if (TLVError == CHIP_NO_ERROR) { + wasHandled = emberAfNetworkCommissioningClusterRemoveNetworkCallback(apCommandObj, aCommandPath, commandData); + } + break; + } + case Commands::ConnectNetwork::Id: { + Commands::ConnectNetwork::DecodableType commandData; + TLVError = DataModel::Decode(aDataTlv, commandData); + if (TLVError == CHIP_NO_ERROR) { + wasHandled = emberAfNetworkCommissioningClusterConnectNetworkCallback(apCommandObj, aCommandPath, commandData); + } + break; + } + case Commands::ReorderNetwork::Id: { + Commands::ReorderNetwork::DecodableType commandData; + TLVError = DataModel::Decode(aDataTlv, commandData); + if (TLVError == CHIP_NO_ERROR) { + wasHandled = emberAfNetworkCommissioningClusterReorderNetworkCallback(apCommandObj, aCommandPath, commandData); + } + break; + } + default: { + // Unrecognized command ID, error status will apply. + apCommandObj->AddStatus(aCommandPath, Protocols::InteractionModel::Status::UnsupportedCommand); + ChipLogError(Zcl, "Unknown command " ChipLogFormatMEI " for cluster " ChipLogFormatMEI, ChipLogValueMEI(aCommandPath.mCommandId), ChipLogValueMEI(aCommandPath.mClusterId)); + return; + } + } } + if (CHIP_NO_ERROR != TLVError || !wasHandled) + { + apCommandObj->AddStatus(aCommandPath, Protocols::InteractionModel::Status::InvalidCommand); + ChipLogProgress(Zcl, "Failed to dispatch command, TLVError=%" CHIP_ERROR_FORMAT, TLVError.Format()); + } +} + +} + +namespace OperationalCredentials { + +void DispatchServerCommand(CommandHandler * apCommandObj, const ConcreteCommandPath & aCommandPath, TLV::TLVReader & aDataTlv) +{ + CHIP_ERROR TLVError = CHIP_NO_ERROR; + bool wasHandled = false; + { + switch (aCommandPath.mCommandId) + { + case Commands::AttestationRequest::Id: { + Commands::AttestationRequest::DecodableType commandData; + TLVError = DataModel::Decode(aDataTlv, commandData); + if (TLVError == CHIP_NO_ERROR) { + wasHandled = emberAfOperationalCredentialsClusterAttestationRequestCallback(apCommandObj, aCommandPath, commandData); + } + break; + } + case Commands::CertificateChainRequest::Id: { + Commands::CertificateChainRequest::DecodableType commandData; + TLVError = DataModel::Decode(aDataTlv, commandData); + if (TLVError == CHIP_NO_ERROR) { + wasHandled = emberAfOperationalCredentialsClusterCertificateChainRequestCallback(apCommandObj, aCommandPath, commandData); + } + break; + } + case Commands::CSRRequest::Id: { + Commands::CSRRequest::DecodableType commandData; + TLVError = DataModel::Decode(aDataTlv, commandData); + if (TLVError == CHIP_NO_ERROR) { + wasHandled = emberAfOperationalCredentialsClusterCSRRequestCallback(apCommandObj, aCommandPath, commandData); + } + break; + } + case Commands::AddNOC::Id: { + Commands::AddNOC::DecodableType commandData; + TLVError = DataModel::Decode(aDataTlv, commandData); + if (TLVError == CHIP_NO_ERROR) { + wasHandled = emberAfOperationalCredentialsClusterAddNOCCallback(apCommandObj, aCommandPath, commandData); + } + break; + } + case Commands::UpdateNOC::Id: { + Commands::UpdateNOC::DecodableType commandData; + TLVError = DataModel::Decode(aDataTlv, commandData); + if (TLVError == CHIP_NO_ERROR) { + wasHandled = emberAfOperationalCredentialsClusterUpdateNOCCallback(apCommandObj, aCommandPath, commandData); + } + break; + } + case Commands::UpdateFabricLabel::Id: { + Commands::UpdateFabricLabel::DecodableType commandData; + TLVError = DataModel::Decode(aDataTlv, commandData); + if (TLVError == CHIP_NO_ERROR) { + wasHandled = emberAfOperationalCredentialsClusterUpdateFabricLabelCallback(apCommandObj, aCommandPath, commandData); + } + break; + } + case Commands::RemoveFabric::Id: { + Commands::RemoveFabric::DecodableType commandData; + TLVError = DataModel::Decode(aDataTlv, commandData); + if (TLVError == CHIP_NO_ERROR) { + wasHandled = emberAfOperationalCredentialsClusterRemoveFabricCallback(apCommandObj, aCommandPath, commandData); + } + break; + } + case Commands::AddTrustedRootCertificate::Id: { + Commands::AddTrustedRootCertificate::DecodableType commandData; + TLVError = DataModel::Decode(aDataTlv, commandData); + if (TLVError == CHIP_NO_ERROR) { + wasHandled = emberAfOperationalCredentialsClusterAddTrustedRootCertificateCallback(apCommandObj, aCommandPath, commandData); + } + break; + } + default: { + // Unrecognized command ID, error status will apply. + apCommandObj->AddStatus(aCommandPath, Protocols::InteractionModel::Status::UnsupportedCommand); + ChipLogError(Zcl, "Unknown command " ChipLogFormatMEI " for cluster " ChipLogFormatMEI, ChipLogValueMEI(aCommandPath.mCommandId), ChipLogValueMEI(aCommandPath.mClusterId)); + return; + } + } + } + + if (CHIP_NO_ERROR != TLVError || !wasHandled) + { + apCommandObj->AddStatus(aCommandPath, Protocols::InteractionModel::Status::InvalidCommand); + ChipLogProgress(Zcl, "Failed to dispatch command, TLVError=%" CHIP_ERROR_FORMAT, TLVError.Format()); + } +} + +} + + +} // namespace Clusters + +void DispatchSingleClusterCommand(const ConcreteCommandPath & aCommandPath, TLV::TLVReader & aReader, CommandHandler * apCommandObj) +{ + Compatibility::SetupEmberAfCommandHandler(apCommandObj, aCommandPath); + + switch (aCommandPath.mClusterId) + { + case Clusters::AdministratorCommissioning::Id: + Clusters::AdministratorCommissioning::DispatchServerCommand(apCommandObj, aCommandPath, aReader); + break; + case Clusters::DiagnosticLogs::Id: + Clusters::DiagnosticLogs::DispatchServerCommand(apCommandObj, aCommandPath, aReader); + break; + case Clusters::GeneralCommissioning::Id: + Clusters::GeneralCommissioning::DispatchServerCommand(apCommandObj, aCommandPath, aReader); + break; + case Clusters::GeneralDiagnostics::Id: + Clusters::GeneralDiagnostics::DispatchServerCommand(apCommandObj, aCommandPath, aReader); + break; + case Clusters::GroupKeyManagement::Id: + Clusters::GroupKeyManagement::DispatchServerCommand(apCommandObj, aCommandPath, aReader); + break; + case Clusters::Groups::Id: + Clusters::Groups::DispatchServerCommand(apCommandObj, aCommandPath, aReader); + break; + case Clusters::Identify::Id: + Clusters::Identify::DispatchServerCommand(apCommandObj, aCommandPath, aReader); + break; + case Clusters::NetworkCommissioning::Id: + Clusters::NetworkCommissioning::DispatchServerCommand(apCommandObj, aCommandPath, aReader); + break; + case Clusters::OperationalCredentials::Id: + Clusters::OperationalCredentials::DispatchServerCommand(apCommandObj, aCommandPath, aReader); + break; + default: + ChipLogError(Zcl, "Unknown cluster " ChipLogFormatMEI, ChipLogValueMEI(aCommandPath.mClusterId)); + apCommandObj->AddStatus( + aCommandPath, + Protocols::InteractionModel::Status::UnsupportedCluster + ); + break; + } + + Compatibility::ResetEmberAfObjects(); +} + } // namespace app } // namespace chip diff --git a/silabs_examples/unify-matter-bridge/linux/zap-generated/unify-matter-bridge-common/zap-generated/endpoint_config.h b/silabs_examples/unify-matter-bridge/linux/zap-generated/unify-matter-bridge-common/zap-generated/endpoint_config.h index 580786dbab589a..457a6dd69275e2 100644 --- a/silabs_examples/unify-matter-bridge/linux/zap-generated/unify-matter-bridge-common/zap-generated/endpoint_config.h +++ b/silabs_examples/unify-matter-bridge/linux/zap-generated/unify-matter-bridge-common/zap-generated/endpoint_config.h @@ -22,330 +22,269 @@ #include + // Default values for the attributes longer than a pointer, // in a form of a binary blob // Separate block is generated for big-endian and little-endian cases. #if BIGENDIAN_CPU -#define GENERATED_DEFAULTS \ - { \ - \ - /* Endpoint: 0, Cluster: Localization Configuration (server), big-endian */ \ - \ - /* 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, \ - } +#define GENERATED_DEFAULTS { \ +\ + /* Endpoint: 0, Cluster: Localization Configuration (server), big-endian */\ +\ + /* 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: Localization Configuration (server), little-endian */ \ - \ - /* 0 - ActiveLocale, */ \ - 5, 'e', 'n', '-', 'U', 'S', \ - \ - /* Endpoint: 0, Cluster: General Commissioning (server), little-endian */ \ - \ - /* 6 - Breadcrumb, */ \ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ - } +#define GENERATED_DEFAULTS { \ +\ + /* Endpoint: 0, Cluster: Localization Configuration (server), little-endian */\ +\ + /* 0 - ActiveLocale, */\ + 5, 'e', 'n', '-', 'U', 'S', \ +\ +\ + /* Endpoint: 0, Cluster: General Commissioning (server), little-endian */\ +\ + /* 6 - Breadcrumb, */\ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ +\ +} #endif // BIGENDIAN_CPU #define GENERATED_DEFAULTS_COUNT (2) -#define ZAP_TYPE(type) ZCL_##type##_ATTRIBUTE_TYPE -#define ZAP_LONG_DEFAULTS_INDEX(index) \ - { \ - &generatedDefaults[index] \ - } -#define ZAP_MIN_MAX_DEFAULTS_INDEX(index) \ - { \ - &minMaxDefaults[index] \ - } -#define ZAP_EMPTY_DEFAULT() \ - { \ - (uint32_t)0 \ - } -#define ZAP_SIMPLE_DEFAULT(x) \ - { \ - (uint32_t) x \ - } +#define ZAP_TYPE(type) ZCL_ ## type ## _ATTRIBUTE_TYPE +#define ZAP_LONG_DEFAULTS_INDEX(index) { &generatedDefaults[index] } +#define ZAP_MIN_MAX_DEFAULTS_INDEX(index) { &minMaxDefaults[index] } +#define ZAP_EMPTY_DEFAULT() {(uint32_t) 0} +#define ZAP_SIMPLE_DEFAULT(x) {(uint32_t) x} // This is an array of EmberAfAttributeMinMaxValue structures. #define GENERATED_MIN_MAX_DEFAULT_COUNT 2 -#define GENERATED_MIN_MAX_DEFAULTS \ - { \ - \ - /* Endpoint: 0, Cluster: Time Format Localization (server) */ \ - { (uint16_t)0x0, (uint16_t)0x0, (uint16_t)0x1 }, /* HourFormat */ \ - \ - /* Endpoint: 0, Cluster: Unit Localization (server) */ \ - { \ - (uint16_t)0x0, (uint16_t)0x0, (uint16_t)0x2 \ - } /* TemperatureUnit */ \ - } - -#define ZAP_ATTRIBUTE_MASK(mask) ATTRIBUTE_MASK_##mask +#define GENERATED_MIN_MAX_DEFAULTS { \ +\ + /* Endpoint: 0, Cluster: Time Format Localization (server) */ \ + { (uint16_t)0x0, (uint16_t)0x0, (uint16_t)0x1 }, /* HourFormat */ \ +\ + /* Endpoint: 0, Cluster: Unit Localization (server) */ \ + { (uint16_t)0x0, (uint16_t)0x0, (uint16_t)0x2 } /* TemperatureUnit */ \ +} + + +#define ZAP_ATTRIBUTE_MASK(mask) ATTRIBUTE_MASK_ ## mask // This is an array of EmberAfAttributeMetadata structures. #define GENERATED_ATTRIBUTE_COUNT 130 -#define GENERATED_ATTRIBUTES \ - { \ - \ - /* Endpoint: 0, 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, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* ClusterRevision */ \ - \ - /* Endpoint: 0, Cluster: Access Control (server) */ \ - { 0x00000000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_EMPTY_DEFAULT() }, /* ACL */ \ - { 0x00000001, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_EMPTY_DEFAULT() }, /* Extension */ \ - { 0x00000002, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ - ZAP_EMPTY_DEFAULT() }, /* SubjectsPerAccessControlEntry */ \ - { 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 */ \ - { 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), \ - ZAP_EMPTY_DEFAULT() }, /* DataModelRevision */ \ - { 0x00000001, ZAP_TYPE(CHAR_STRING), 33, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) | ZAP_ATTRIBUTE_MASK(SINGLETON), \ - ZAP_EMPTY_DEFAULT() }, /* VendorName */ \ - { 0x00000002, ZAP_TYPE(VENDOR_ID), 2, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) | ZAP_ATTRIBUTE_MASK(SINGLETON), \ - ZAP_EMPTY_DEFAULT() }, /* VendorID */ \ - { 0x00000003, ZAP_TYPE(CHAR_STRING), 33, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) | ZAP_ATTRIBUTE_MASK(SINGLETON), \ - ZAP_EMPTY_DEFAULT() }, /* ProductName */ \ - { 0x00000004, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) | ZAP_ATTRIBUTE_MASK(SINGLETON), \ - ZAP_EMPTY_DEFAULT() }, /* ProductID */ \ - { 0x00000005, ZAP_TYPE(CHAR_STRING), 33, \ - ZAP_ATTRIBUTE_MASK(TOKENIZE) | ZAP_ATTRIBUTE_MASK(SINGLETON) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_EMPTY_DEFAULT() }, /* NodeLabel */ \ - { 0x00000006, ZAP_TYPE(CHAR_STRING), 3, \ - ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) | ZAP_ATTRIBUTE_MASK(SINGLETON) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_EMPTY_DEFAULT() }, /* Location */ \ - { 0x00000007, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) | ZAP_ATTRIBUTE_MASK(SINGLETON), \ - ZAP_EMPTY_DEFAULT() }, /* HardwareVersion */ \ - { 0x00000008, ZAP_TYPE(CHAR_STRING), 65, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) | ZAP_ATTRIBUTE_MASK(SINGLETON), \ - ZAP_EMPTY_DEFAULT() }, /* HardwareVersionString */ \ - { 0x00000009, ZAP_TYPE(INT32U), 4, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) | ZAP_ATTRIBUTE_MASK(SINGLETON), \ - ZAP_EMPTY_DEFAULT() }, /* SoftwareVersion */ \ - { 0x0000000A, ZAP_TYPE(CHAR_STRING), 65, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) | ZAP_ATTRIBUTE_MASK(SINGLETON), \ - ZAP_EMPTY_DEFAULT() }, /* SoftwareVersionString */ \ - { 0x0000000B, ZAP_TYPE(CHAR_STRING), 17, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) | ZAP_ATTRIBUTE_MASK(SINGLETON), \ - ZAP_EMPTY_DEFAULT() }, /* ManufacturingDate */ \ - { 0x0000000C, ZAP_TYPE(CHAR_STRING), 33, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) | ZAP_ATTRIBUTE_MASK(SINGLETON), \ - ZAP_EMPTY_DEFAULT() }, /* PartNumber */ \ - { 0x0000000D, ZAP_TYPE(LONG_CHAR_STRING), 258, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) | ZAP_ATTRIBUTE_MASK(SINGLETON), \ - ZAP_EMPTY_DEFAULT() }, /* ProductURL */ \ - { 0x0000000E, ZAP_TYPE(CHAR_STRING), 65, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) | ZAP_ATTRIBUTE_MASK(SINGLETON), \ - ZAP_EMPTY_DEFAULT() }, /* ProductLabel */ \ - { 0x0000000F, ZAP_TYPE(CHAR_STRING), 33, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) | ZAP_ATTRIBUTE_MASK(SINGLETON), \ - ZAP_EMPTY_DEFAULT() }, /* SerialNumber */ \ - { 0x00000010, ZAP_TYPE(BOOLEAN), 1, \ - ZAP_ATTRIBUTE_MASK(TOKENIZE) | ZAP_ATTRIBUTE_MASK(SINGLETON) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_SIMPLE_DEFAULT(0) }, /* LocalConfigDisabled */ \ - { 0x00000011, ZAP_TYPE(BOOLEAN), 1, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_SIMPLE_DEFAULT(1) }, /* Reachable */ \ - { 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) */ \ - { 0x00000000, ZAP_TYPE(ENUM8), 1, \ - ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(TOKENIZE) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_MIN_MAX_DEFAULTS_INDEX(0) }, /* HourFormat */ \ - { 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 */ \ - { 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, \ - ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(TOKENIZE) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_MIN_MAX_DEFAULTS_INDEX(1) }, /* TemperatureUnit */ \ - { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_SIMPLE_DEFAULT(0x1) }, /* FeatureMap */ \ - { 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(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 */ \ - { 0x00000003, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ - ZAP_EMPTY_DEFAULT() }, /* LocationCapability */ \ - { 0x00000004, ZAP_TYPE(BOOLEAN), 1, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ - ZAP_EMPTY_DEFAULT() }, /* SupportsConcurrentConnection */ \ - { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_SIMPLE_DEFAULT(6) }, /* FeatureMap */ \ - { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ - \ - /* Endpoint: 0, Cluster: Network Commissioning (server) */ \ - { 0x00000000, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* MaxNetworks */ \ - { 0x00000001, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* Networks */ \ - { 0x00000002, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* ScanMaxTimeSeconds */ \ - { 0x00000003, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* ConnectMaxTimeSeconds */ \ - { 0x00000004, ZAP_TYPE(BOOLEAN), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* InterfaceEnabled */ \ - { 0x00000005, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(NULLABLE), ZAP_EMPTY_DEFAULT() }, /* LastNetworkingStatus */ \ - { 0x00000006, ZAP_TYPE(OCTET_STRING), 33, ZAP_ATTRIBUTE_MASK(NULLABLE), ZAP_EMPTY_DEFAULT() }, /* LastNetworkID */ \ - { 0x00000007, ZAP_TYPE(INT32S), 4, ZAP_ATTRIBUTE_MASK(NULLABLE), ZAP_EMPTY_DEFAULT() }, /* LastConnectErrorValue */ \ - { 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 */ \ - { 0x00000002, ZAP_TYPE(INT64U), 8, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* UpTime */ \ - { 0x00000003, ZAP_TYPE(INT32U), 4, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ - ZAP_EMPTY_DEFAULT() }, /* TotalOperationalHours */ \ - { 0x00000004, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* BootReasons */ \ - { 0x00000005, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ - ZAP_EMPTY_DEFAULT() }, /* ActiveHardwareFaults */ \ - { 0x00000006, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* ActiveRadioFaults */ \ - { 0x00000007, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ - ZAP_EMPTY_DEFAULT() }, /* ActiveNetworkFaults */ \ - { 0x00000008, ZAP_TYPE(BOOLEAN), 1, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ - ZAP_EMPTY_DEFAULT() }, /* TestEventTriggersEnabled */ \ - { 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: Software Diagnostics (server) */ \ - { 0x00000000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* ThreadMetrics */ \ - { 0x00000001, ZAP_TYPE(INT64U), 8, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* CurrentHeapFree */ \ - { 0x00000002, ZAP_TYPE(INT64U), 8, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* CurrentHeapUsed */ \ - { 0x00000003, ZAP_TYPE(INT64U), 8, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ - ZAP_EMPTY_DEFAULT() }, /* CurrentHeapHighWatermark */ \ - { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_SIMPLE_DEFAULT(1) }, /* FeatureMap */ \ - { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ - \ - /* Endpoint: 0, Cluster: Ethernet Network Diagnostics (server) */ \ - { 0x00000000, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ - ZAP_EMPTY_DEFAULT() }, /* PHYRate */ \ - { 0x00000001, ZAP_TYPE(BOOLEAN), 1, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ - ZAP_EMPTY_DEFAULT() }, /* FullDuplex */ \ - { 0x00000002, ZAP_TYPE(INT64U), 8, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* PacketRxCount */ \ - { 0x00000003, ZAP_TYPE(INT64U), 8, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* PacketTxCount */ \ - { 0x00000004, ZAP_TYPE(INT64U), 8, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* TxErrCount */ \ - { 0x00000005, ZAP_TYPE(INT64U), 8, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* CollisionCount */ \ - { 0x00000006, ZAP_TYPE(INT64U), 8, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* OverrunCount */ \ - { 0x00000007, ZAP_TYPE(BOOLEAN), 1, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ - ZAP_EMPTY_DEFAULT() }, /* CarrierDetect */ \ - { 0x00000008, ZAP_TYPE(INT64U), 8, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* TimeSinceReset */ \ - { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_SIMPLE_DEFAULT(3) }, /* FeatureMap */ \ - { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ - \ - /* Endpoint: 0, Cluster: AdministratorCommissioning (server) */ \ - { 0x00000000, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* WindowStatus */ \ - { 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 */ \ - { 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 */ \ - { 0x00000001, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* Fabrics */ \ - { 0x00000002, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* SupportedFabrics */ \ - { 0x00000003, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ - ZAP_EMPTY_DEFAULT() }, /* CommissionedFabrics */ \ - { 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 */ \ - { 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), \ - ZAP_EMPTY_DEFAULT() }, /* GroupKeyMap */ \ - { 0x00000001, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* GroupTable */ \ - { 0x00000002, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ - ZAP_EMPTY_DEFAULT() }, /* MaxGroupsPerFabric */ \ - { 0x00000003, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ - ZAP_EMPTY_DEFAULT() }, /* MaxGroupKeysPerFabric */ \ - { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ - \ - /* 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 */ \ - { 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: Groups (server) */ \ - { 0x00000000, ZAP_TYPE(BITMAP8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* NameSupport */ \ - { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(4) }, /* 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 */ \ - } +#define GENERATED_ATTRIBUTES { \ +\ + /* Endpoint: 0, 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, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* ClusterRevision */ \ +\ + /* Endpoint: 0, Cluster: Access Control (server) */ \ + { 0x00000000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) | ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* ACL */ \ + { 0x00000001, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) | ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* Extension */ \ + { 0x00000002, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* SubjectsPerAccessControlEntry */ \ + { 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 */ \ + { 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), ZAP_EMPTY_DEFAULT() }, /* DataModelRevision */ \ + { 0x00000001, ZAP_TYPE(CHAR_STRING), 33, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) | ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* VendorName */ \ + { 0x00000002, ZAP_TYPE(VENDOR_ID), 2, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) | ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* VendorID */ \ + { 0x00000003, ZAP_TYPE(CHAR_STRING), 33, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) | ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* ProductName */ \ + { 0x00000004, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) | ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* ProductID */ \ + { 0x00000005, ZAP_TYPE(CHAR_STRING), 33, ZAP_ATTRIBUTE_MASK(TOKENIZE) | ZAP_ATTRIBUTE_MASK(SINGLETON) | ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* NodeLabel */ \ + { 0x00000006, ZAP_TYPE(CHAR_STRING), 3, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) | ZAP_ATTRIBUTE_MASK(SINGLETON) | ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* Location */ \ + { 0x00000007, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) | ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* HardwareVersion */ \ + { 0x00000008, ZAP_TYPE(CHAR_STRING), 65, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) | ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* HardwareVersionString */ \ + { 0x00000009, ZAP_TYPE(INT32U), 4, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) | ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* SoftwareVersion */ \ + { 0x0000000A, ZAP_TYPE(CHAR_STRING), 65, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) | ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* SoftwareVersionString */ \ + { 0x0000000B, ZAP_TYPE(CHAR_STRING), 17, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) | ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* ManufacturingDate */ \ + { 0x0000000C, ZAP_TYPE(CHAR_STRING), 33, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) | ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* PartNumber */ \ + { 0x0000000D, ZAP_TYPE(LONG_CHAR_STRING), 258, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) | ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* ProductURL */ \ + { 0x0000000E, ZAP_TYPE(CHAR_STRING), 65, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) | ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* ProductLabel */ \ + { 0x0000000F, ZAP_TYPE(CHAR_STRING), 33, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) | ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_EMPTY_DEFAULT() }, /* SerialNumber */ \ + { 0x00000010, ZAP_TYPE(BOOLEAN), 1, ZAP_ATTRIBUTE_MASK(TOKENIZE) | ZAP_ATTRIBUTE_MASK(SINGLETON) | ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0) }, /* LocalConfigDisabled */ \ + { 0x00000011, ZAP_TYPE(BOOLEAN), 1, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_SIMPLE_DEFAULT(1) }, /* Reachable */ \ + { 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) */ \ + { 0x00000000, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(TOKENIZE) | ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_MIN_MAX_DEFAULTS_INDEX(0) }, /* HourFormat */ \ + { 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 */ \ + { 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, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(TOKENIZE) | ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_MIN_MAX_DEFAULTS_INDEX(1) }, /* TemperatureUnit */ \ + { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_SIMPLE_DEFAULT(0x1) }, /* FeatureMap */ \ + { 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(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 */ \ + { 0x00000003, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* LocationCapability */ \ + { 0x00000004, ZAP_TYPE(BOOLEAN), 1, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* SupportsConcurrentConnection */ \ + { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_SIMPLE_DEFAULT(6) }, /* FeatureMap */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ +\ + /* Endpoint: 0, Cluster: Network Commissioning (server) */ \ + { 0x00000000, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* MaxNetworks */ \ + { 0x00000001, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* Networks */ \ + { 0x00000002, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* ScanMaxTimeSeconds */ \ + { 0x00000003, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* ConnectMaxTimeSeconds */ \ + { 0x00000004, ZAP_TYPE(BOOLEAN), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* InterfaceEnabled */ \ + { 0x00000005, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(NULLABLE), ZAP_EMPTY_DEFAULT() }, /* LastNetworkingStatus */ \ + { 0x00000006, ZAP_TYPE(OCTET_STRING), 33, ZAP_ATTRIBUTE_MASK(NULLABLE), ZAP_EMPTY_DEFAULT() }, /* LastNetworkID */ \ + { 0x00000007, ZAP_TYPE(INT32S), 4, ZAP_ATTRIBUTE_MASK(NULLABLE), ZAP_EMPTY_DEFAULT() }, /* LastConnectErrorValue */ \ + { 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 */ \ + { 0x00000002, ZAP_TYPE(INT64U), 8, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* UpTime */ \ + { 0x00000003, ZAP_TYPE(INT32U), 4, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* TotalOperationalHours */ \ + { 0x00000004, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* BootReasons */ \ + { 0x00000005, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* ActiveHardwareFaults */ \ + { 0x00000006, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* ActiveRadioFaults */ \ + { 0x00000007, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* ActiveNetworkFaults */ \ + { 0x00000008, ZAP_TYPE(BOOLEAN), 1, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* TestEventTriggersEnabled */ \ + { 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: Software Diagnostics (server) */ \ + { 0x00000000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* ThreadMetrics */ \ + { 0x00000001, ZAP_TYPE(INT64U), 8, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* CurrentHeapFree */ \ + { 0x00000002, ZAP_TYPE(INT64U), 8, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* CurrentHeapUsed */ \ + { 0x00000003, ZAP_TYPE(INT64U), 8, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* CurrentHeapHighWatermark */ \ + { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_SIMPLE_DEFAULT(1) }, /* FeatureMap */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ +\ + /* Endpoint: 0, Cluster: Ethernet Network Diagnostics (server) */ \ + { 0x00000000, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) | ZAP_ATTRIBUTE_MASK(NULLABLE), ZAP_EMPTY_DEFAULT() }, /* PHYRate */ \ + { 0x00000001, ZAP_TYPE(BOOLEAN), 1, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) | ZAP_ATTRIBUTE_MASK(NULLABLE), ZAP_EMPTY_DEFAULT() }, /* FullDuplex */ \ + { 0x00000002, ZAP_TYPE(INT64U), 8, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* PacketRxCount */ \ + { 0x00000003, ZAP_TYPE(INT64U), 8, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* PacketTxCount */ \ + { 0x00000004, ZAP_TYPE(INT64U), 8, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* TxErrCount */ \ + { 0x00000005, ZAP_TYPE(INT64U), 8, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* CollisionCount */ \ + { 0x00000006, ZAP_TYPE(INT64U), 8, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* OverrunCount */ \ + { 0x00000007, ZAP_TYPE(BOOLEAN), 1, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) | ZAP_ATTRIBUTE_MASK(NULLABLE), ZAP_EMPTY_DEFAULT() }, /* CarrierDetect */ \ + { 0x00000008, ZAP_TYPE(INT64U), 8, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* TimeSinceReset */ \ + { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_SIMPLE_DEFAULT(3) }, /* FeatureMap */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ +\ + /* Endpoint: 0, Cluster: AdministratorCommissioning (server) */ \ + { 0x00000000, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* WindowStatus */ \ + { 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 */ \ + { 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 */ \ + { 0x00000001, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* Fabrics */ \ + { 0x00000002, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* SupportedFabrics */ \ + { 0x00000003, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* CommissionedFabrics */ \ + { 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 */ \ + { 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), ZAP_EMPTY_DEFAULT() }, /* GroupKeyMap */ \ + { 0x00000001, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* GroupTable */ \ + { 0x00000002, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* MaxGroupsPerFabric */ \ + { 0x00000003, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* MaxGroupKeysPerFabric */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ +\ + /* 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 */ \ + { 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(4) }, /* ClusterRevision */ \ +\ + /* Endpoint: 1, Cluster: Groups (server) */ \ + { 0x00000000, ZAP_TYPE(BITMAP8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* NameSupport */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(4) }, /* 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 */ \ +} + // This is an array of EmberAfCluster structures. #define ZAP_ATTRIBUTE_INDEX(index) (&generatedAttributes[index]) -#define ZAP_GENERATED_COMMANDS_INDEX(index) ((chip::CommandId*)(&generatedCommands[index])) +#define ZAP_GENERATED_COMMANDS_INDEX(index) ((chip::CommandId *) (&generatedCommands[index])) // Cluster function static arrays -#define GENERATED_FUNCTION_ARRAYS \ - const EmberAfGenericClusterFunction chipFuncArrayBasicServer[] = { \ - (EmberAfGenericClusterFunction)emberAfBasicClusterServerInitCallback, \ - }; \ - const EmberAfGenericClusterFunction chipFuncArrayLocalizationConfigurationServer[] = { \ - (EmberAfGenericClusterFunction)emberAfLocalizationConfigurationClusterServerInitCallback, \ - (EmberAfGenericClusterFunction)MatterLocalizationConfigurationClusterServerPreAttributeChangedCallback, \ - }; \ - const EmberAfGenericClusterFunction chipFuncArrayTimeFormatLocalizationServer[] = { \ - (EmberAfGenericClusterFunction)emberAfTimeFormatLocalizationClusterServerInitCallback, \ - (EmberAfGenericClusterFunction)MatterTimeFormatLocalizationClusterServerPreAttributeChangedCallback, \ - }; \ - const EmberAfGenericClusterFunction chipFuncArrayIdentifyServer[] = { \ - (EmberAfGenericClusterFunction)emberAfIdentifyClusterServerInitCallback, \ - (EmberAfGenericClusterFunction)MatterIdentifyClusterServerAttributeChangedCallback, \ - }; \ - const EmberAfGenericClusterFunction chipFuncArrayGroupsServer[] = { \ - (EmberAfGenericClusterFunction)emberAfGroupsClusterServerInitCallback, \ - }; +#define GENERATED_FUNCTION_ARRAYS \ +const EmberAfGenericClusterFunction chipFuncArrayBasicServer[] = {\ + (EmberAfGenericClusterFunction) emberAfBasicClusterServerInitCallback,\ +};\ +const EmberAfGenericClusterFunction chipFuncArrayLocalizationConfigurationServer[] = {\ + (EmberAfGenericClusterFunction) emberAfLocalizationConfigurationClusterServerInitCallback,\ + (EmberAfGenericClusterFunction) MatterLocalizationConfigurationClusterServerPreAttributeChangedCallback,\ +};\ +const EmberAfGenericClusterFunction chipFuncArrayTimeFormatLocalizationServer[] = {\ + (EmberAfGenericClusterFunction) emberAfTimeFormatLocalizationClusterServerInitCallback,\ + (EmberAfGenericClusterFunction) MatterTimeFormatLocalizationClusterServerPreAttributeChangedCallback,\ +};\ +const EmberAfGenericClusterFunction chipFuncArrayIdentifyServer[] = {\ + (EmberAfGenericClusterFunction) emberAfIdentifyClusterServerInitCallback,\ + (EmberAfGenericClusterFunction) MatterIdentifyClusterServerAttributeChangedCallback,\ +};\ +const EmberAfGenericClusterFunction chipFuncArrayGroupsServer[] = {\ + (EmberAfGenericClusterFunction) emberAfGroupsClusterServerInitCallback,\ +};\ + + // clang-format off #define GENERATED_COMMANDS { \ @@ -442,9 +381,10 @@ // clang-format on -#define ZAP_CLUSTER_MASK(mask) CLUSTER_MASK_##mask +#define ZAP_CLUSTER_MASK(mask) CLUSTER_MASK_ ## mask #define GENERATED_CLUSTER_COUNT 23 + // clang-format off #define GENERATED_CLUSTERS { \ { \ @@ -709,15 +649,18 @@ #define ZAP_FIXED_ENDPOINT_DATA_VERSION_COUNT 21 // This is an array of EmberAfEndpointType structures. -#define GENERATED_ENDPOINT_TYPES \ - { \ - { ZAP_CLUSTER_INDEX(0), 19, 220 }, { ZAP_CLUSTER_INDEX(19), 4, 18 }, \ - } +#define GENERATED_ENDPOINT_TYPES { \ + { ZAP_CLUSTER_INDEX(0), 19, 220 }, \ + { ZAP_CLUSTER_INDEX(19), 4, 18 }, \ +} + + // Largest attribute size is needed for various buffers #define ATTRIBUTE_LARGEST (259) -static_assert(ATTRIBUTE_LARGEST <= CHIP_CONFIG_MAX_ATTRIBUTE_STORE_ELEMENT_SIZE, "ATTRIBUTE_LARGEST larger than expected"); +static_assert(ATTRIBUTE_LARGEST <= CHIP_CONFIG_MAX_ATTRIBUTE_STORE_ELEMENT_SIZE, + "ATTRIBUTE_LARGEST larger than expected"); // Total size of singleton attributes #define ATTRIBUTE_SINGLETONS_SIZE (37) @@ -730,43 +673,23 @@ static_assert(ATTRIBUTE_LARGEST <= CHIP_CONFIG_MAX_ATTRIBUTE_STORE_ELEMENT_SIZE, // Array of endpoints that are supported, the data inside // the array is the endpoint number. -#define FIXED_ENDPOINT_ARRAY \ - { \ - 0x0000, 0x0001 \ - } +#define FIXED_ENDPOINT_ARRAY { 0x0000, 0x0001 } // Array of profile ids -#define FIXED_PROFILE_IDS \ - { \ - 0x0103, 0x0103 \ - } +#define FIXED_PROFILE_IDS { 0x0103, 0x0103 } // Array of device types -#define FIXED_DEVICE_TYPES \ - { \ - { 0x0016, 1 }, { 0x000E, 1 } \ - } +#define FIXED_DEVICE_TYPES {{0x0016,1},{0x000E,1}} // Array of device type offsets -#define FIXED_DEVICE_TYPE_OFFSETS \ - { \ - 0, 1 \ - } +#define FIXED_DEVICE_TYPE_OFFSETS { 0,1} // Array of device type lengths -#define FIXED_DEVICE_TYPE_LENGTHS \ - { \ - 1, 1 \ - } +#define FIXED_DEVICE_TYPE_LENGTHS { 1,1} // Array of endpoint types supported on each endpoint -#define FIXED_ENDPOINT_TYPES \ - { \ - 0, 1 \ - } +#define FIXED_ENDPOINT_TYPES { 0, 1 } // Array of networks supported on each endpoint -#define FIXED_NETWORKS \ - { \ - 0, 0 \ - } +#define FIXED_NETWORKS { 0, 0 } + diff --git a/silabs_examples/unify-matter-bridge/linux/zap-generated/unify-matter-bridge-common/zap-generated/gen_config.h b/silabs_examples/unify-matter-bridge/linux/zap-generated/unify-matter-bridge-common/zap-generated/gen_config.h index 78ec1e45fb6bf7..a25c504db2e669 100644 --- a/silabs_examples/unify-matter-bridge/linux/zap-generated/unify-matter-bridge-common/zap-generated/gen_config.h +++ b/silabs_examples/unify-matter-bridge/linux/zap-generated/unify-matter-bridge-common/zap-generated/gen_config.h @@ -26,6 +26,7 @@ /**** Network Section ****/ #define EMBER_SUPPORTED_NETWORKS (1) + #define EMBER_APS_UNICAST_MESSAGE_COUNT 10 /**** Cluster endpoint counts ****/ @@ -59,105 +60,127 @@ #define EMBER_AF_PLUGIN_IDENTIFY_SERVER #define EMBER_AF_PLUGIN_IDENTIFY + // Use this macro to check if the server side of the Groups cluster is included #define ZCL_USING_GROUPS_CLUSTER_SERVER #define EMBER_AF_PLUGIN_GROUPS_SERVER #define EMBER_AF_PLUGIN_GROUPS + // Use this macro to check if the server side of the Descriptor cluster is included #define ZCL_USING_DESCRIPTOR_CLUSTER_SERVER #define EMBER_AF_PLUGIN_DESCRIPTOR_SERVER #define EMBER_AF_PLUGIN_DESCRIPTOR + // Use this macro to check if the client side of the Binding cluster is included #define ZCL_USING_BINDING_CLUSTER_CLIENT #define EMBER_AF_PLUGIN_BINDING_CLIENT + // Use this macro to check if the server side of the Binding cluster is included #define ZCL_USING_BINDING_CLUSTER_SERVER #define EMBER_AF_PLUGIN_BINDING_SERVER #define EMBER_AF_PLUGIN_BINDING + // Use this macro to check if the client side of the Access Control cluster is included #define ZCL_USING_ACCESS_CONTROL_CLUSTER_CLIENT #define EMBER_AF_PLUGIN_ACCESS_CONTROL_CLIENT + // Use this macro to check if the server side of the Access Control cluster is included #define ZCL_USING_ACCESS_CONTROL_CLUSTER_SERVER #define EMBER_AF_PLUGIN_ACCESS_CONTROL_SERVER #define EMBER_AF_PLUGIN_ACCESS_CONTROL + // Use this macro to check if the server side of the Basic cluster is included #define ZCL_USING_BASIC_CLUSTER_SERVER #define EMBER_AF_PLUGIN_BASIC_SERVER #define EMBER_AF_PLUGIN_BASIC + // Use this macro to check if the server side of the Localization Configuration cluster is included #define ZCL_USING_LOCALIZATION_CONFIGURATION_CLUSTER_SERVER #define EMBER_AF_PLUGIN_LOCALIZATION_CONFIGURATION_SERVER #define EMBER_AF_PLUGIN_LOCALIZATION_CONFIGURATION + // Use this macro to check if the server side of the Time Format Localization cluster is included #define ZCL_USING_TIME_FORMAT_LOCALIZATION_CLUSTER_SERVER #define EMBER_AF_PLUGIN_TIME_FORMAT_LOCALIZATION_SERVER #define EMBER_AF_PLUGIN_TIME_FORMAT_LOCALIZATION + // Use this macro to check if the server side of the Unit Localization cluster is included #define ZCL_USING_UNIT_LOCALIZATION_CLUSTER_SERVER #define EMBER_AF_PLUGIN_UNIT_LOCALIZATION_SERVER #define EMBER_AF_PLUGIN_UNIT_LOCALIZATION + // Use this macro to check if the server side of the General Commissioning cluster is included #define ZCL_USING_GENERAL_COMMISSIONING_CLUSTER_SERVER #define EMBER_AF_PLUGIN_GENERAL_COMMISSIONING_SERVER #define EMBER_AF_PLUGIN_GENERAL_COMMISSIONING + // Use this macro to check if the server side of the Network Commissioning cluster is included #define ZCL_USING_NETWORK_COMMISSIONING_CLUSTER_SERVER #define EMBER_AF_PLUGIN_NETWORK_COMMISSIONING_SERVER #define EMBER_AF_PLUGIN_NETWORK_COMMISSIONING + // Use this macro to check if the server side of the Diagnostic Logs cluster is included #define ZCL_USING_DIAGNOSTIC_LOGS_CLUSTER_SERVER #define EMBER_AF_PLUGIN_DIAGNOSTIC_LOGS_SERVER #define EMBER_AF_PLUGIN_DIAGNOSTIC_LOGS + // Use this macro to check if the server side of the General Diagnostics cluster is included #define ZCL_USING_GENERAL_DIAGNOSTICS_CLUSTER_SERVER #define EMBER_AF_PLUGIN_GENERAL_DIAGNOSTICS_SERVER #define EMBER_AF_PLUGIN_GENERAL_DIAGNOSTICS + // Use this macro to check if the server side of the Software Diagnostics cluster is included #define ZCL_USING_SOFTWARE_DIAGNOSTICS_CLUSTER_SERVER #define EMBER_AF_PLUGIN_SOFTWARE_DIAGNOSTICS_SERVER #define EMBER_AF_PLUGIN_SOFTWARE_DIAGNOSTICS + // Use this macro to check if the server side of the Ethernet Network Diagnostics cluster is included #define ZCL_USING_ETHERNET_NETWORK_DIAGNOSTICS_CLUSTER_SERVER #define EMBER_AF_PLUGIN_ETHERNET_NETWORK_DIAGNOSTICS_SERVER #define EMBER_AF_PLUGIN_ETHERNET_NETWORK_DIAGNOSTICS + // Use this macro to check if the server side of the AdministratorCommissioning cluster is included #define ZCL_USING_ADMINISTRATOR_COMMISSIONING_CLUSTER_SERVER #define EMBER_AF_PLUGIN_ADMINISTRATOR_COMMISSIONING_SERVER #define EMBER_AF_PLUGIN_ADMINISTRATOR_COMMISSIONING + // Use this macro to check if the server side of the Operational Credentials cluster is included #define ZCL_USING_OPERATIONAL_CREDENTIALS_CLUSTER_SERVER #define EMBER_AF_PLUGIN_OPERATIONAL_CREDENTIALS_SERVER #define EMBER_AF_PLUGIN_OPERATIONAL_CREDENTIALS + // Use this macro to check if the server side of the Group Key Management cluster is included #define ZCL_USING_GROUP_KEY_MANAGEMENT_CLUSTER_SERVER #define EMBER_AF_PLUGIN_GROUP_KEY_MANAGEMENT_SERVER #define EMBER_AF_PLUGIN_GROUP_KEY_MANAGEMENT + // Use this macro to check if the server side of the Fixed Label cluster is included #define ZCL_USING_FIXED_LABEL_CLUSTER_SERVER #define EMBER_AF_PLUGIN_FIXED_LABEL_SERVER #define EMBER_AF_PLUGIN_FIXED_LABEL + // Use this macro to check if the server side of the User Label cluster is included #define ZCL_USING_USER_LABEL_CLUSTER_SERVER #define EMBER_AF_PLUGIN_USER_LABEL_SERVER #define EMBER_AF_PLUGIN_USER_LABEL + 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 f3d53bdd77f200..ac43878a0cb629 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 @@ -49,6 +49,13 @@ CHIP_ERROR if (aPath.mClusterId != Clusters::{{asUpperCamelCase label}}::Id) { return CHIP_ERROR_INVALID_ARGUMENT; } + // Do not handle Read for non-unify endpoints + auto unify_node = m_node_state_monitor.bridged_endpoint(aPath.mEndpointId); + + if (!unify_node) { + return CHIP_NO_ERROR; + } + ConcreteAttributePath atr_path = ConcreteAttributePath(aPath.mEndpointId, aPath.mClusterId, 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 485abdfa93ec45..e8fa37efa66008 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 @@ -1219,7 +1219,7 @@ endpoint 1 { callback attribute acceptedCommandList; callback attribute attributeList; ram attribute featureMap; - ram attribute clusterRevision default = 2; + ram attribute clusterRevision default = 4; } server cluster Groups { 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 4787af05e893e2..ff018a5ae5f8e5 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 @@ -5874,7 +5874,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "2", + "defaultValue": "4", "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -6592,4 +6592,4 @@ } ], "log": [] -} \ No newline at end of file +}