From 481ac72508b3d48282fcc7e0f5bcb63641f7705b Mon Sep 17 00:00:00 2001 From: Boris Zbarsky Date: Tue, 2 May 2023 10:45:44 -0400 Subject: [PATCH] Add ProductAppearance attribute support. (#25742) * Add ProductAppearance attribute support. * Regenerate generated code. --- .../all-clusters-app.matter | 42 +- .../all-clusters-common/all-clusters-app.zap | 21 +- .../all-clusters-app/linux/main-common.cpp | 63 +++ .../all-clusters-minimal-app.matter | 38 ++ .../bridge-common/bridge-app.matter | 38 ++ ...p_rootnode_dimmablelight_bCwGYSDpoe.matter | 38 ++ ...de_colortemperaturelight_hbUnzYVeyn.matter | 38 ++ .../rootnode_contactsensor_lFAGG1bfRO.matter | 38 ++ .../rootnode_dimmablelight_bCwGYSDpoe.matter | 38 ++ .../rootnode_doorlock_aNKYAreMXE.matter | 38 ++ ...tnode_extendedcolorlight_8lcaaYJVAa.matter | 38 ++ .../devices/rootnode_fan_7N2TobIlOX.matter | 38 ++ .../rootnode_flowsensor_1zVxHedlaV.matter | 38 ++ ...tnode_heatingcoolingunit_ncdGai1E5a.matter | 38 ++ .../rootnode_humiditysensor_Xyj4gda6Hb.matter | 38 ++ .../rootnode_lightsensor_lZQycTFcJK.matter | 38 ++ ...rootnode_occupancysensor_iHyVgifZuo.matter | 38 ++ .../rootnode_onofflight_bbs1b7IaOV.matter | 38 ++ ...ootnode_onofflightswitch_FsPlMr090Q.matter | 38 ++ ...rootnode_onoffpluginunit_Wtf8ss5EBY.matter | 38 ++ .../rootnode_pressuresensor_s0qC9wLH4k.matter | 38 ++ .../rootnode_speaker_RpzeXdimqA.matter | 38 ++ ...otnode_temperaturesensor_Qy1zkNW7c3.matter | 38 ++ .../rootnode_thermostat_bm3fb8dhYi.matter | 38 ++ .../rootnode_windowcovering_RLCxaGi9Yx.matter | 38 ++ .../contact-sensor-app.matter | 38 ++ .../bridge-common/bridge-app.matter | 38 ++ .../light-switch-app.matter | 38 ++ .../data_model/lighting-app-thread.matter | 38 ++ .../data_model/lighting-app-wifi.matter | 38 ++ .../lighting-common/lighting-app.matter | 38 ++ .../nxp/zap/lighting-on-off.matter | 38 ++ examples/lighting-app/qpg/zap/light.matter | 38 ++ .../data_model/lighting-wifi-app.matter | 38 ++ .../data_model/lighting-thread-app.matter | 38 ++ .../efr32/data_model/lighting-wifi-app.matter | 38 ++ examples/lock-app/lock-common/lock-app.matter | 38 ++ examples/lock-app/nxp/zap/lock-app.matter | 38 ++ examples/lock-app/qpg/zap/lock.matter | 38 ++ .../ota-provider-app.matter | 38 ++ .../ota-requestor-app.matter | 38 ++ .../placeholder/linux/apps/app1/config.matter | 38 ++ .../placeholder/linux/apps/app2/config.matter | 38 ++ examples/pump-app/pump-common/pump-app.matter | 38 ++ .../pump-controller-app.matter | 38 ++ .../temperature-measurement.matter | 38 ++ .../thermostat-common/thermostat.matter | 38 ++ examples/tv-app/tv-common/tv-app.matter | 38 ++ .../tv-casting-common/tv-casting-app.matter | 38 ++ examples/window-app/common/window-app.matter | 38 ++ .../basic-information/basic-information.cpp | 33 ++ .../tests/suites/TestBasicInformation.yaml | 8 + .../certification/Test_TC_BINFO_1_1.yaml | 2 +- .../chip/basic-information-cluster.xml | 44 ++- .../chip/bridged-device-basic-information.xml | 43 ++ .../zcl/zcl-with-test-extensions.json | 3 +- src/app/zap-templates/zcl/zcl.json | 3 +- .../data_model/controller-clusters.matter | 78 ++++ .../data_model/controller-clusters.zap | 16 + .../CHIPAttributeTLVValueDecoder.cpp | 101 +++++ .../chip/devicecontroller/ChipIdLookup.java | 6 + .../chip/devicecontroller/ChipStructs.java | 50 +++ .../python/chip/clusters/CHIPClusters.py | 12 + .../python/chip/clusters/Objects.py | 147 +++++++ .../CHIP/templates/availability.yaml | 111 ++++++ .../MTRAttributeTLVValueDecoder.mm | 34 ++ .../CHIP/zap-generated/MTRBaseClusters.h | 97 +++++ .../CHIP/zap-generated/MTRBaseClusters.mm | 101 +++++ .../CHIP/zap-generated/MTRCallbackBridge.h | 368 ++++++++++++++++++ .../CHIP/zap-generated/MTRCallbackBridge.mm | 259 ++++++++++++ .../CHIP/zap-generated/MTRClusterConstants.h | 2 + .../CHIP/zap-generated/MTRClusters.h | 4 + .../CHIP/zap-generated/MTRClusters.mm | 17 + .../CHIP/zap-generated/MTRStructsObjc.h | 11 + .../CHIP/zap-generated/MTRStructsObjc.mm | 62 +++ .../platform/DeviceInstanceInfoProvider.h | 25 ++ .../zap-generated/cluster-enums-check.h | 96 +++++ .../app-common/zap-generated/cluster-enums.h | 100 ++++- .../zap-generated/cluster-objects.cpp | 96 +++++ .../zap-generated/cluster-objects.h | 75 ++++ .../app-common/zap-generated/ids/Attributes.h | 8 + .../zap-generated/cluster/Commands.h | 11 + .../cluster/ComplexArgumentParser.cpp | 66 ++++ .../cluster/ComplexArgumentParser.h | 11 + .../cluster/logging/DataModelLogger.cpp | 62 +++ .../cluster/logging/DataModelLogger.h | 7 + .../chip-tool/zap-generated/test/Commands.h | 33 +- .../zap-generated/cluster/Commands.h | 149 +++++++ .../zap-generated/test/Commands.h | 53 ++- 89 files changed, 4291 insertions(+), 25 deletions(-) diff --git a/examples/all-clusters-app/all-clusters-common/all-clusters-app.matter b/examples/all-clusters-app/all-clusters-common/all-clusters-app.matter index 7d5c990db66e81..0cf14341ac4d1f 100644 --- a/examples/all-clusters-app/all-clusters-common/all-clusters-app.matter +++ b/examples/all-clusters-app/all-clusters-common/all-clusters-app.matter @@ -702,11 +702,49 @@ server cluster Actions = 37 { Commissioning and operational determination of Node characteristics, such as Vendor ID, Product ID and serial number, which apply to the whole Node. Also allows setting user device information such as location. */ server cluster BasicInformation = 40 { + enum ColorEnum : ENUM8 { + kBlack = 0; + kNavy = 1; + kGreen = 2; + kTeal = 3; + kMaroon = 4; + kPurple = 5; + kOlive = 6; + kGray = 7; + kBlue = 8; + kLime = 9; + kAqua = 10; + kRed = 11; + kFuchsia = 12; + kYellow = 13; + kWhite = 14; + kNickel = 15; + kChrome = 16; + kBrass = 17; + kCopper = 18; + kSilver = 19; + kGold = 20; + } + + enum ProductFinishEnum : ENUM8 { + kOther = 0; + kMatte = 1; + kSatin = 2; + kPolished = 3; + kRugged = 4; + kFabric = 5; + } + struct CapabilityMinimaStruct { int16u caseSessionsPerFabric = 0; int16u subscriptionsPerFabric = 1; } + struct ProductAppearanceStruct { + ProductFinishEnum finish = 0; + nullable ColorEnum primaryColor = 1; + } + critical event StartUp = 0 { INT32U softwareVersion = 0; } @@ -742,6 +780,7 @@ server cluster BasicInformation = 40 { readonly attribute boolean reachable = 17; readonly attribute char_string<32> uniqueID = 18; readonly attribute CapabilityMinimaStruct capabilityMinima = 19; + readonly attribute ProductAppearanceStruct productAppearance = 20; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -4644,8 +4683,9 @@ endpoint 0 { ram attribute reachable default = 1; callback attribute uniqueID; callback attribute capabilityMinima; + callback attribute productAppearance; ram attribute featureMap default = 0; - ram attribute clusterRevision default = 1; + ram attribute clusterRevision default = 2; } server cluster OtaSoftwareUpdateRequestor { diff --git a/examples/all-clusters-app/all-clusters-common/all-clusters-app.zap b/examples/all-clusters-app/all-clusters-common/all-clusters-app.zap index 7bdd60bf91a82f..8c645de17c904b 100644 --- a/examples/all-clusters-app/all-clusters-common/all-clusters-app.zap +++ b/examples/all-clusters-app/all-clusters-common/all-clusters-app.zap @@ -1508,6 +1508,22 @@ "maxInterval": 65534, "reportableChange": 0 }, + { + "name": "ProductAppearance", + "code": 20, + "mfgCode": null, + "side": "server", + "type": "ProductAppearanceStruct", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "FeatureMap", "code": 65532, @@ -1534,7 +1550,7 @@ "storageOption": "RAM", "singleton": 1, "bounded": 0, - "defaultValue": "1", + "defaultValue": "2", "reportable": 1, "minInterval": 0, "maxInterval": 65344, @@ -25498,5 +25514,6 @@ "endpointVersion": 1, "deviceIdentifier": 61442 } - ] + ], + "log": [] } \ No newline at end of file diff --git a/examples/all-clusters-app/linux/main-common.cpp b/examples/all-clusters-app/linux/main-common.cpp index b4724ad6f7cb45..39a4bf381a710b 100644 --- a/examples/all-clusters-app/linux/main-common.cpp +++ b/examples/all-clusters-app/linux/main-common.cpp @@ -29,6 +29,7 @@ #include #include #include +#include #include #include #include @@ -138,6 +139,61 @@ Clusters::NetworkCommissioning::Instance sWiFiNetworkCommissioningInstance(kNetw #endif Clusters::NetworkCommissioning::Instance sEthernetNetworkCommissioningInstance(kNetworkCommissioningEndpointMain, &sEthernetDriver); + +class ExampleDeviceInstanceInfoProvider : public DeviceInstanceInfoProvider +{ +public: + void Init(DeviceInstanceInfoProvider * defaultProvider) { mDefaultProvider = defaultProvider; } + + CHIP_ERROR GetVendorName(char * buf, size_t bufSize) override { return mDefaultProvider->GetVendorName(buf, bufSize); } + CHIP_ERROR GetVendorId(uint16_t & vendorId) override { return mDefaultProvider->GetVendorId(vendorId); } + CHIP_ERROR GetProductName(char * buf, size_t bufSize) override { return mDefaultProvider->GetProductName(buf, bufSize); } + CHIP_ERROR GetProductId(uint16_t & productId) override { return mDefaultProvider->GetProductId(productId); } + CHIP_ERROR GetPartNumber(char * buf, size_t bufSize) override { return mDefaultProvider->GetPartNumber(buf, bufSize); } + CHIP_ERROR GetProductURL(char * buf, size_t bufSize) override { return mDefaultProvider->GetPartNumber(buf, bufSize); } + CHIP_ERROR GetProductLabel(char * buf, size_t bufSize) override { return mDefaultProvider->GetProductLabel(buf, bufSize); } + CHIP_ERROR GetSerialNumber(char * buf, size_t bufSize) override { return mDefaultProvider->GetSerialNumber(buf, bufSize); } + CHIP_ERROR GetManufacturingDate(uint16_t & year, uint8_t & month, uint8_t & day) override + { + return mDefaultProvider->GetManufacturingDate(year, month, day); + } + CHIP_ERROR GetHardwareVersion(uint16_t & hardwareVersion) override + { + return mDefaultProvider->GetHardwareVersion(hardwareVersion); + } + CHIP_ERROR GetHardwareVersionString(char * buf, size_t bufSize) override + { + return mDefaultProvider->GetHardwareVersionString(buf, bufSize); + } + CHIP_ERROR GetRotatingDeviceIdUniqueId(MutableByteSpan & uniqueIdSpan) override + { + return mDefaultProvider->GetRotatingDeviceIdUniqueId(uniqueIdSpan); + } + CHIP_ERROR GetProductFinish(Clusters::BasicInformation::ProductFinishEnum * finish) override; + CHIP_ERROR GetProductPrimaryColor(Clusters::BasicInformation::ColorEnum * primaryColor) override; + +private: + DeviceInstanceInfoProvider * mDefaultProvider; +}; + +CHIP_ERROR ExampleDeviceInstanceInfoProvider::GetProductFinish(Clusters::BasicInformation::ProductFinishEnum * finish) +{ + // Our example device claims to have a Satin finish for now. We can make + // this configurable as needed. + *finish = Clusters::BasicInformation::ProductFinishEnum::kSatin; + return CHIP_NO_ERROR; +} + +CHIP_ERROR ExampleDeviceInstanceInfoProvider::GetProductPrimaryColor(Clusters::BasicInformation::ColorEnum * primaryColor) +{ + // Our example device claims to have a nice purple color for now. We can + // make this configurable as needed. + *primaryColor = Clusters::BasicInformation::ColorEnum::kPurple; + return CHIP_NO_ERROR; +} + +ExampleDeviceInstanceInfoProvider gExampleDeviceInstanceInfoProvider; + } // namespace void ApplicationInit() @@ -201,6 +257,13 @@ void ApplicationInit() ChipLogError(NotSpecified, "Failed to start CHIP NamedPipeCommands"); sChipNamedPipeCommands.Stop(); } + + auto * defaultProvider = GetDeviceInstanceInfoProvider(); + if (defaultProvider != &gExampleDeviceInstanceInfoProvider) + { + gExampleDeviceInstanceInfoProvider.Init(defaultProvider); + SetDeviceInstanceInfoProvider(&gExampleDeviceInstanceInfoProvider); + } } void ApplicationExit() diff --git a/examples/all-clusters-minimal-app/all-clusters-common/all-clusters-minimal-app.matter b/examples/all-clusters-minimal-app/all-clusters-common/all-clusters-minimal-app.matter index 059bdeae17cece..c5a85c03abaadb 100644 --- a/examples/all-clusters-minimal-app/all-clusters-common/all-clusters-minimal-app.matter +++ b/examples/all-clusters-minimal-app/all-clusters-common/all-clusters-minimal-app.matter @@ -572,11 +572,49 @@ server cluster Actions = 37 { Commissioning and operational determination of Node characteristics, such as Vendor ID, Product ID and serial number, which apply to the whole Node. Also allows setting user device information such as location. */ server cluster BasicInformation = 40 { + enum ColorEnum : ENUM8 { + kBlack = 0; + kNavy = 1; + kGreen = 2; + kTeal = 3; + kMaroon = 4; + kPurple = 5; + kOlive = 6; + kGray = 7; + kBlue = 8; + kLime = 9; + kAqua = 10; + kRed = 11; + kFuchsia = 12; + kYellow = 13; + kWhite = 14; + kNickel = 15; + kChrome = 16; + kBrass = 17; + kCopper = 18; + kSilver = 19; + kGold = 20; + } + + enum ProductFinishEnum : ENUM8 { + kOther = 0; + kMatte = 1; + kSatin = 2; + kPolished = 3; + kRugged = 4; + kFabric = 5; + } + struct CapabilityMinimaStruct { int16u caseSessionsPerFabric = 0; int16u subscriptionsPerFabric = 1; } + struct ProductAppearanceStruct { + ProductFinishEnum finish = 0; + nullable ColorEnum primaryColor = 1; + } + critical event StartUp = 0 { INT32U softwareVersion = 0; } diff --git a/examples/bridge-app/bridge-common/bridge-app.matter b/examples/bridge-app/bridge-common/bridge-app.matter index daba86d8bc6f4d..93733fa58ac7ad 100644 --- a/examples/bridge-app/bridge-common/bridge-app.matter +++ b/examples/bridge-app/bridge-common/bridge-app.matter @@ -489,11 +489,49 @@ server cluster Actions = 37 { Commissioning and operational determination of Node characteristics, such as Vendor ID, Product ID and serial number, which apply to the whole Node. Also allows setting user device information such as location. */ server cluster BasicInformation = 40 { + enum ColorEnum : ENUM8 { + kBlack = 0; + kNavy = 1; + kGreen = 2; + kTeal = 3; + kMaroon = 4; + kPurple = 5; + kOlive = 6; + kGray = 7; + kBlue = 8; + kLime = 9; + kAqua = 10; + kRed = 11; + kFuchsia = 12; + kYellow = 13; + kWhite = 14; + kNickel = 15; + kChrome = 16; + kBrass = 17; + kCopper = 18; + kSilver = 19; + kGold = 20; + } + + enum ProductFinishEnum : ENUM8 { + kOther = 0; + kMatte = 1; + kSatin = 2; + kPolished = 3; + kRugged = 4; + kFabric = 5; + } + struct CapabilityMinimaStruct { int16u caseSessionsPerFabric = 0; int16u subscriptionsPerFabric = 1; } + struct ProductAppearanceStruct { + ProductFinishEnum finish = 0; + nullable ColorEnum primaryColor = 1; + } + critical event StartUp = 0 { INT32U softwareVersion = 0; } diff --git a/examples/chef/devices/noip_rootnode_dimmablelight_bCwGYSDpoe.matter b/examples/chef/devices/noip_rootnode_dimmablelight_bCwGYSDpoe.matter index ebfed65a08b58a..6a4d8ddd2f6e67 100644 --- a/examples/chef/devices/noip_rootnode_dimmablelight_bCwGYSDpoe.matter +++ b/examples/chef/devices/noip_rootnode_dimmablelight_bCwGYSDpoe.matter @@ -380,11 +380,49 @@ server cluster AccessControl = 31 { Commissioning and operational determination of Node characteristics, such as Vendor ID, Product ID and serial number, which apply to the whole Node. Also allows setting user device information such as location. */ server cluster BasicInformation = 40 { + enum ColorEnum : ENUM8 { + kBlack = 0; + kNavy = 1; + kGreen = 2; + kTeal = 3; + kMaroon = 4; + kPurple = 5; + kOlive = 6; + kGray = 7; + kBlue = 8; + kLime = 9; + kAqua = 10; + kRed = 11; + kFuchsia = 12; + kYellow = 13; + kWhite = 14; + kNickel = 15; + kChrome = 16; + kBrass = 17; + kCopper = 18; + kSilver = 19; + kGold = 20; + } + + enum ProductFinishEnum : ENUM8 { + kOther = 0; + kMatte = 1; + kSatin = 2; + kPolished = 3; + kRugged = 4; + kFabric = 5; + } + struct CapabilityMinimaStruct { int16u caseSessionsPerFabric = 0; int16u subscriptionsPerFabric = 1; } + struct ProductAppearanceStruct { + ProductFinishEnum finish = 0; + nullable ColorEnum primaryColor = 1; + } + critical event StartUp = 0 { INT32U softwareVersion = 0; } diff --git a/examples/chef/devices/rootnode_colortemperaturelight_hbUnzYVeyn.matter b/examples/chef/devices/rootnode_colortemperaturelight_hbUnzYVeyn.matter index 91b0651858b406..d3e2e4f1d767a7 100644 --- a/examples/chef/devices/rootnode_colortemperaturelight_hbUnzYVeyn.matter +++ b/examples/chef/devices/rootnode_colortemperaturelight_hbUnzYVeyn.matter @@ -379,11 +379,49 @@ server cluster AccessControl = 31 { Commissioning and operational determination of Node characteristics, such as Vendor ID, Product ID and serial number, which apply to the whole Node. Also allows setting user device information such as location. */ server cluster BasicInformation = 40 { + enum ColorEnum : ENUM8 { + kBlack = 0; + kNavy = 1; + kGreen = 2; + kTeal = 3; + kMaroon = 4; + kPurple = 5; + kOlive = 6; + kGray = 7; + kBlue = 8; + kLime = 9; + kAqua = 10; + kRed = 11; + kFuchsia = 12; + kYellow = 13; + kWhite = 14; + kNickel = 15; + kChrome = 16; + kBrass = 17; + kCopper = 18; + kSilver = 19; + kGold = 20; + } + + enum ProductFinishEnum : ENUM8 { + kOther = 0; + kMatte = 1; + kSatin = 2; + kPolished = 3; + kRugged = 4; + kFabric = 5; + } + struct CapabilityMinimaStruct { int16u caseSessionsPerFabric = 0; int16u subscriptionsPerFabric = 1; } + struct ProductAppearanceStruct { + ProductFinishEnum finish = 0; + nullable ColorEnum primaryColor = 1; + } + critical event StartUp = 0 { INT32U softwareVersion = 0; } diff --git a/examples/chef/devices/rootnode_contactsensor_lFAGG1bfRO.matter b/examples/chef/devices/rootnode_contactsensor_lFAGG1bfRO.matter index 498da4410bed50..67a9957cc7e5c9 100644 --- a/examples/chef/devices/rootnode_contactsensor_lFAGG1bfRO.matter +++ b/examples/chef/devices/rootnode_contactsensor_lFAGG1bfRO.matter @@ -228,11 +228,49 @@ server cluster AccessControl = 31 { Commissioning and operational determination of Node characteristics, such as Vendor ID, Product ID and serial number, which apply to the whole Node. Also allows setting user device information such as location. */ server cluster BasicInformation = 40 { + enum ColorEnum : ENUM8 { + kBlack = 0; + kNavy = 1; + kGreen = 2; + kTeal = 3; + kMaroon = 4; + kPurple = 5; + kOlive = 6; + kGray = 7; + kBlue = 8; + kLime = 9; + kAqua = 10; + kRed = 11; + kFuchsia = 12; + kYellow = 13; + kWhite = 14; + kNickel = 15; + kChrome = 16; + kBrass = 17; + kCopper = 18; + kSilver = 19; + kGold = 20; + } + + enum ProductFinishEnum : ENUM8 { + kOther = 0; + kMatte = 1; + kSatin = 2; + kPolished = 3; + kRugged = 4; + kFabric = 5; + } + struct CapabilityMinimaStruct { int16u caseSessionsPerFabric = 0; int16u subscriptionsPerFabric = 1; } + struct ProductAppearanceStruct { + ProductFinishEnum finish = 0; + nullable ColorEnum primaryColor = 1; + } + critical event StartUp = 0 { INT32U softwareVersion = 0; } diff --git a/examples/chef/devices/rootnode_dimmablelight_bCwGYSDpoe.matter b/examples/chef/devices/rootnode_dimmablelight_bCwGYSDpoe.matter index 9aa81192def114..b02fd871ece659 100644 --- a/examples/chef/devices/rootnode_dimmablelight_bCwGYSDpoe.matter +++ b/examples/chef/devices/rootnode_dimmablelight_bCwGYSDpoe.matter @@ -380,11 +380,49 @@ server cluster AccessControl = 31 { Commissioning and operational determination of Node characteristics, such as Vendor ID, Product ID and serial number, which apply to the whole Node. Also allows setting user device information such as location. */ server cluster BasicInformation = 40 { + enum ColorEnum : ENUM8 { + kBlack = 0; + kNavy = 1; + kGreen = 2; + kTeal = 3; + kMaroon = 4; + kPurple = 5; + kOlive = 6; + kGray = 7; + kBlue = 8; + kLime = 9; + kAqua = 10; + kRed = 11; + kFuchsia = 12; + kYellow = 13; + kWhite = 14; + kNickel = 15; + kChrome = 16; + kBrass = 17; + kCopper = 18; + kSilver = 19; + kGold = 20; + } + + enum ProductFinishEnum : ENUM8 { + kOther = 0; + kMatte = 1; + kSatin = 2; + kPolished = 3; + kRugged = 4; + kFabric = 5; + } + struct CapabilityMinimaStruct { int16u caseSessionsPerFabric = 0; int16u subscriptionsPerFabric = 1; } + struct ProductAppearanceStruct { + ProductFinishEnum finish = 0; + nullable ColorEnum primaryColor = 1; + } + critical event StartUp = 0 { INT32U softwareVersion = 0; } diff --git a/examples/chef/devices/rootnode_doorlock_aNKYAreMXE.matter b/examples/chef/devices/rootnode_doorlock_aNKYAreMXE.matter index 22dcc0bda58b39..4a65b6ec23dd33 100644 --- a/examples/chef/devices/rootnode_doorlock_aNKYAreMXE.matter +++ b/examples/chef/devices/rootnode_doorlock_aNKYAreMXE.matter @@ -228,11 +228,49 @@ server cluster AccessControl = 31 { Commissioning and operational determination of Node characteristics, such as Vendor ID, Product ID and serial number, which apply to the whole Node. Also allows setting user device information such as location. */ server cluster BasicInformation = 40 { + enum ColorEnum : ENUM8 { + kBlack = 0; + kNavy = 1; + kGreen = 2; + kTeal = 3; + kMaroon = 4; + kPurple = 5; + kOlive = 6; + kGray = 7; + kBlue = 8; + kLime = 9; + kAqua = 10; + kRed = 11; + kFuchsia = 12; + kYellow = 13; + kWhite = 14; + kNickel = 15; + kChrome = 16; + kBrass = 17; + kCopper = 18; + kSilver = 19; + kGold = 20; + } + + enum ProductFinishEnum : ENUM8 { + kOther = 0; + kMatte = 1; + kSatin = 2; + kPolished = 3; + kRugged = 4; + kFabric = 5; + } + struct CapabilityMinimaStruct { int16u caseSessionsPerFabric = 0; int16u subscriptionsPerFabric = 1; } + struct ProductAppearanceStruct { + ProductFinishEnum finish = 0; + nullable ColorEnum primaryColor = 1; + } + critical event StartUp = 0 { INT32U softwareVersion = 0; } diff --git a/examples/chef/devices/rootnode_extendedcolorlight_8lcaaYJVAa.matter b/examples/chef/devices/rootnode_extendedcolorlight_8lcaaYJVAa.matter index f2032ab4d31d43..b930a77109fdd0 100644 --- a/examples/chef/devices/rootnode_extendedcolorlight_8lcaaYJVAa.matter +++ b/examples/chef/devices/rootnode_extendedcolorlight_8lcaaYJVAa.matter @@ -377,11 +377,49 @@ server cluster AccessControl = 31 { Commissioning and operational determination of Node characteristics, such as Vendor ID, Product ID and serial number, which apply to the whole Node. Also allows setting user device information such as location. */ server cluster BasicInformation = 40 { + enum ColorEnum : ENUM8 { + kBlack = 0; + kNavy = 1; + kGreen = 2; + kTeal = 3; + kMaroon = 4; + kPurple = 5; + kOlive = 6; + kGray = 7; + kBlue = 8; + kLime = 9; + kAqua = 10; + kRed = 11; + kFuchsia = 12; + kYellow = 13; + kWhite = 14; + kNickel = 15; + kChrome = 16; + kBrass = 17; + kCopper = 18; + kSilver = 19; + kGold = 20; + } + + enum ProductFinishEnum : ENUM8 { + kOther = 0; + kMatte = 1; + kSatin = 2; + kPolished = 3; + kRugged = 4; + kFabric = 5; + } + struct CapabilityMinimaStruct { int16u caseSessionsPerFabric = 0; int16u subscriptionsPerFabric = 1; } + struct ProductAppearanceStruct { + ProductFinishEnum finish = 0; + nullable ColorEnum primaryColor = 1; + } + critical event StartUp = 0 { INT32U softwareVersion = 0; } diff --git a/examples/chef/devices/rootnode_fan_7N2TobIlOX.matter b/examples/chef/devices/rootnode_fan_7N2TobIlOX.matter index 4368aa72bdd833..0184f55ea7dc1d 100644 --- a/examples/chef/devices/rootnode_fan_7N2TobIlOX.matter +++ b/examples/chef/devices/rootnode_fan_7N2TobIlOX.matter @@ -218,11 +218,49 @@ server cluster AccessControl = 31 { Commissioning and operational determination of Node characteristics, such as Vendor ID, Product ID and serial number, which apply to the whole Node. Also allows setting user device information such as location. */ server cluster BasicInformation = 40 { + enum ColorEnum : ENUM8 { + kBlack = 0; + kNavy = 1; + kGreen = 2; + kTeal = 3; + kMaroon = 4; + kPurple = 5; + kOlive = 6; + kGray = 7; + kBlue = 8; + kLime = 9; + kAqua = 10; + kRed = 11; + kFuchsia = 12; + kYellow = 13; + kWhite = 14; + kNickel = 15; + kChrome = 16; + kBrass = 17; + kCopper = 18; + kSilver = 19; + kGold = 20; + } + + enum ProductFinishEnum : ENUM8 { + kOther = 0; + kMatte = 1; + kSatin = 2; + kPolished = 3; + kRugged = 4; + kFabric = 5; + } + struct CapabilityMinimaStruct { int16u caseSessionsPerFabric = 0; int16u subscriptionsPerFabric = 1; } + struct ProductAppearanceStruct { + ProductFinishEnum finish = 0; + nullable ColorEnum primaryColor = 1; + } + critical event StartUp = 0 { INT32U softwareVersion = 0; } diff --git a/examples/chef/devices/rootnode_flowsensor_1zVxHedlaV.matter b/examples/chef/devices/rootnode_flowsensor_1zVxHedlaV.matter index 24758353832c93..5a6ce98fdf76a1 100644 --- a/examples/chef/devices/rootnode_flowsensor_1zVxHedlaV.matter +++ b/examples/chef/devices/rootnode_flowsensor_1zVxHedlaV.matter @@ -299,11 +299,49 @@ server cluster AccessControl = 31 { Commissioning and operational determination of Node characteristics, such as Vendor ID, Product ID and serial number, which apply to the whole Node. Also allows setting user device information such as location. */ server cluster BasicInformation = 40 { + enum ColorEnum : ENUM8 { + kBlack = 0; + kNavy = 1; + kGreen = 2; + kTeal = 3; + kMaroon = 4; + kPurple = 5; + kOlive = 6; + kGray = 7; + kBlue = 8; + kLime = 9; + kAqua = 10; + kRed = 11; + kFuchsia = 12; + kYellow = 13; + kWhite = 14; + kNickel = 15; + kChrome = 16; + kBrass = 17; + kCopper = 18; + kSilver = 19; + kGold = 20; + } + + enum ProductFinishEnum : ENUM8 { + kOther = 0; + kMatte = 1; + kSatin = 2; + kPolished = 3; + kRugged = 4; + kFabric = 5; + } + struct CapabilityMinimaStruct { int16u caseSessionsPerFabric = 0; int16u subscriptionsPerFabric = 1; } + struct ProductAppearanceStruct { + ProductFinishEnum finish = 0; + nullable ColorEnum primaryColor = 1; + } + critical event StartUp = 0 { INT32U softwareVersion = 0; } diff --git a/examples/chef/devices/rootnode_heatingcoolingunit_ncdGai1E5a.matter b/examples/chef/devices/rootnode_heatingcoolingunit_ncdGai1E5a.matter index e1fc1b04c861bf..5645faafec18e9 100644 --- a/examples/chef/devices/rootnode_heatingcoolingunit_ncdGai1E5a.matter +++ b/examples/chef/devices/rootnode_heatingcoolingunit_ncdGai1E5a.matter @@ -370,11 +370,49 @@ server cluster AccessControl = 31 { Commissioning and operational determination of Node characteristics, such as Vendor ID, Product ID and serial number, which apply to the whole Node. Also allows setting user device information such as location. */ server cluster BasicInformation = 40 { + enum ColorEnum : ENUM8 { + kBlack = 0; + kNavy = 1; + kGreen = 2; + kTeal = 3; + kMaroon = 4; + kPurple = 5; + kOlive = 6; + kGray = 7; + kBlue = 8; + kLime = 9; + kAqua = 10; + kRed = 11; + kFuchsia = 12; + kYellow = 13; + kWhite = 14; + kNickel = 15; + kChrome = 16; + kBrass = 17; + kCopper = 18; + kSilver = 19; + kGold = 20; + } + + enum ProductFinishEnum : ENUM8 { + kOther = 0; + kMatte = 1; + kSatin = 2; + kPolished = 3; + kRugged = 4; + kFabric = 5; + } + struct CapabilityMinimaStruct { int16u caseSessionsPerFabric = 0; int16u subscriptionsPerFabric = 1; } + struct ProductAppearanceStruct { + ProductFinishEnum finish = 0; + nullable ColorEnum primaryColor = 1; + } + critical event StartUp = 0 { INT32U softwareVersion = 0; } diff --git a/examples/chef/devices/rootnode_humiditysensor_Xyj4gda6Hb.matter b/examples/chef/devices/rootnode_humiditysensor_Xyj4gda6Hb.matter index df557981fbdbc7..85c29d39db7e2e 100644 --- a/examples/chef/devices/rootnode_humiditysensor_Xyj4gda6Hb.matter +++ b/examples/chef/devices/rootnode_humiditysensor_Xyj4gda6Hb.matter @@ -299,11 +299,49 @@ server cluster AccessControl = 31 { Commissioning and operational determination of Node characteristics, such as Vendor ID, Product ID and serial number, which apply to the whole Node. Also allows setting user device information such as location. */ server cluster BasicInformation = 40 { + enum ColorEnum : ENUM8 { + kBlack = 0; + kNavy = 1; + kGreen = 2; + kTeal = 3; + kMaroon = 4; + kPurple = 5; + kOlive = 6; + kGray = 7; + kBlue = 8; + kLime = 9; + kAqua = 10; + kRed = 11; + kFuchsia = 12; + kYellow = 13; + kWhite = 14; + kNickel = 15; + kChrome = 16; + kBrass = 17; + kCopper = 18; + kSilver = 19; + kGold = 20; + } + + enum ProductFinishEnum : ENUM8 { + kOther = 0; + kMatte = 1; + kSatin = 2; + kPolished = 3; + kRugged = 4; + kFabric = 5; + } + struct CapabilityMinimaStruct { int16u caseSessionsPerFabric = 0; int16u subscriptionsPerFabric = 1; } + struct ProductAppearanceStruct { + ProductFinishEnum finish = 0; + nullable ColorEnum primaryColor = 1; + } + critical event StartUp = 0 { INT32U softwareVersion = 0; } diff --git a/examples/chef/devices/rootnode_lightsensor_lZQycTFcJK.matter b/examples/chef/devices/rootnode_lightsensor_lZQycTFcJK.matter index 6ed3b14735881e..914ff39853f2c1 100644 --- a/examples/chef/devices/rootnode_lightsensor_lZQycTFcJK.matter +++ b/examples/chef/devices/rootnode_lightsensor_lZQycTFcJK.matter @@ -299,11 +299,49 @@ server cluster AccessControl = 31 { Commissioning and operational determination of Node characteristics, such as Vendor ID, Product ID and serial number, which apply to the whole Node. Also allows setting user device information such as location. */ server cluster BasicInformation = 40 { + enum ColorEnum : ENUM8 { + kBlack = 0; + kNavy = 1; + kGreen = 2; + kTeal = 3; + kMaroon = 4; + kPurple = 5; + kOlive = 6; + kGray = 7; + kBlue = 8; + kLime = 9; + kAqua = 10; + kRed = 11; + kFuchsia = 12; + kYellow = 13; + kWhite = 14; + kNickel = 15; + kChrome = 16; + kBrass = 17; + kCopper = 18; + kSilver = 19; + kGold = 20; + } + + enum ProductFinishEnum : ENUM8 { + kOther = 0; + kMatte = 1; + kSatin = 2; + kPolished = 3; + kRugged = 4; + kFabric = 5; + } + struct CapabilityMinimaStruct { int16u caseSessionsPerFabric = 0; int16u subscriptionsPerFabric = 1; } + struct ProductAppearanceStruct { + ProductFinishEnum finish = 0; + nullable ColorEnum primaryColor = 1; + } + critical event StartUp = 0 { INT32U softwareVersion = 0; } diff --git a/examples/chef/devices/rootnode_occupancysensor_iHyVgifZuo.matter b/examples/chef/devices/rootnode_occupancysensor_iHyVgifZuo.matter index 3f67b78294ded4..7fb1b7d3fee8c5 100644 --- a/examples/chef/devices/rootnode_occupancysensor_iHyVgifZuo.matter +++ b/examples/chef/devices/rootnode_occupancysensor_iHyVgifZuo.matter @@ -299,11 +299,49 @@ server cluster AccessControl = 31 { Commissioning and operational determination of Node characteristics, such as Vendor ID, Product ID and serial number, which apply to the whole Node. Also allows setting user device information such as location. */ server cluster BasicInformation = 40 { + enum ColorEnum : ENUM8 { + kBlack = 0; + kNavy = 1; + kGreen = 2; + kTeal = 3; + kMaroon = 4; + kPurple = 5; + kOlive = 6; + kGray = 7; + kBlue = 8; + kLime = 9; + kAqua = 10; + kRed = 11; + kFuchsia = 12; + kYellow = 13; + kWhite = 14; + kNickel = 15; + kChrome = 16; + kBrass = 17; + kCopper = 18; + kSilver = 19; + kGold = 20; + } + + enum ProductFinishEnum : ENUM8 { + kOther = 0; + kMatte = 1; + kSatin = 2; + kPolished = 3; + kRugged = 4; + kFabric = 5; + } + struct CapabilityMinimaStruct { int16u caseSessionsPerFabric = 0; int16u subscriptionsPerFabric = 1; } + struct ProductAppearanceStruct { + ProductFinishEnum finish = 0; + nullable ColorEnum primaryColor = 1; + } + critical event StartUp = 0 { INT32U softwareVersion = 0; } diff --git a/examples/chef/devices/rootnode_onofflight_bbs1b7IaOV.matter b/examples/chef/devices/rootnode_onofflight_bbs1b7IaOV.matter index 877a4c644963f9..6d224d2d25837f 100644 --- a/examples/chef/devices/rootnode_onofflight_bbs1b7IaOV.matter +++ b/examples/chef/devices/rootnode_onofflight_bbs1b7IaOV.matter @@ -377,11 +377,49 @@ server cluster AccessControl = 31 { Commissioning and operational determination of Node characteristics, such as Vendor ID, Product ID and serial number, which apply to the whole Node. Also allows setting user device information such as location. */ server cluster BasicInformation = 40 { + enum ColorEnum : ENUM8 { + kBlack = 0; + kNavy = 1; + kGreen = 2; + kTeal = 3; + kMaroon = 4; + kPurple = 5; + kOlive = 6; + kGray = 7; + kBlue = 8; + kLime = 9; + kAqua = 10; + kRed = 11; + kFuchsia = 12; + kYellow = 13; + kWhite = 14; + kNickel = 15; + kChrome = 16; + kBrass = 17; + kCopper = 18; + kSilver = 19; + kGold = 20; + } + + enum ProductFinishEnum : ENUM8 { + kOther = 0; + kMatte = 1; + kSatin = 2; + kPolished = 3; + kRugged = 4; + kFabric = 5; + } + struct CapabilityMinimaStruct { int16u caseSessionsPerFabric = 0; int16u subscriptionsPerFabric = 1; } + struct ProductAppearanceStruct { + ProductFinishEnum finish = 0; + nullable ColorEnum primaryColor = 1; + } + critical event StartUp = 0 { INT32U softwareVersion = 0; } diff --git a/examples/chef/devices/rootnode_onofflightswitch_FsPlMr090Q.matter b/examples/chef/devices/rootnode_onofflightswitch_FsPlMr090Q.matter index 5e4c5884675454..55bf7b8a647c60 100644 --- a/examples/chef/devices/rootnode_onofflightswitch_FsPlMr090Q.matter +++ b/examples/chef/devices/rootnode_onofflightswitch_FsPlMr090Q.matter @@ -340,11 +340,49 @@ server cluster AccessControl = 31 { Commissioning and operational determination of Node characteristics, such as Vendor ID, Product ID and serial number, which apply to the whole Node. Also allows setting user device information such as location. */ server cluster BasicInformation = 40 { + enum ColorEnum : ENUM8 { + kBlack = 0; + kNavy = 1; + kGreen = 2; + kTeal = 3; + kMaroon = 4; + kPurple = 5; + kOlive = 6; + kGray = 7; + kBlue = 8; + kLime = 9; + kAqua = 10; + kRed = 11; + kFuchsia = 12; + kYellow = 13; + kWhite = 14; + kNickel = 15; + kChrome = 16; + kBrass = 17; + kCopper = 18; + kSilver = 19; + kGold = 20; + } + + enum ProductFinishEnum : ENUM8 { + kOther = 0; + kMatte = 1; + kSatin = 2; + kPolished = 3; + kRugged = 4; + kFabric = 5; + } + struct CapabilityMinimaStruct { int16u caseSessionsPerFabric = 0; int16u subscriptionsPerFabric = 1; } + struct ProductAppearanceStruct { + ProductFinishEnum finish = 0; + nullable ColorEnum primaryColor = 1; + } + critical event StartUp = 0 { INT32U softwareVersion = 0; } diff --git a/examples/chef/devices/rootnode_onoffpluginunit_Wtf8ss5EBY.matter b/examples/chef/devices/rootnode_onoffpluginunit_Wtf8ss5EBY.matter index 0ebc72edbb5e36..50878d3fd877d6 100644 --- a/examples/chef/devices/rootnode_onoffpluginunit_Wtf8ss5EBY.matter +++ b/examples/chef/devices/rootnode_onoffpluginunit_Wtf8ss5EBY.matter @@ -276,11 +276,49 @@ server cluster AccessControl = 31 { Commissioning and operational determination of Node characteristics, such as Vendor ID, Product ID and serial number, which apply to the whole Node. Also allows setting user device information such as location. */ server cluster BasicInformation = 40 { + enum ColorEnum : ENUM8 { + kBlack = 0; + kNavy = 1; + kGreen = 2; + kTeal = 3; + kMaroon = 4; + kPurple = 5; + kOlive = 6; + kGray = 7; + kBlue = 8; + kLime = 9; + kAqua = 10; + kRed = 11; + kFuchsia = 12; + kYellow = 13; + kWhite = 14; + kNickel = 15; + kChrome = 16; + kBrass = 17; + kCopper = 18; + kSilver = 19; + kGold = 20; + } + + enum ProductFinishEnum : ENUM8 { + kOther = 0; + kMatte = 1; + kSatin = 2; + kPolished = 3; + kRugged = 4; + kFabric = 5; + } + struct CapabilityMinimaStruct { int16u caseSessionsPerFabric = 0; int16u subscriptionsPerFabric = 1; } + struct ProductAppearanceStruct { + ProductFinishEnum finish = 0; + nullable ColorEnum primaryColor = 1; + } + critical event StartUp = 0 { INT32U softwareVersion = 0; } diff --git a/examples/chef/devices/rootnode_pressuresensor_s0qC9wLH4k.matter b/examples/chef/devices/rootnode_pressuresensor_s0qC9wLH4k.matter index 039cd18e0d056f..21db6a5ffb2314 100644 --- a/examples/chef/devices/rootnode_pressuresensor_s0qC9wLH4k.matter +++ b/examples/chef/devices/rootnode_pressuresensor_s0qC9wLH4k.matter @@ -299,11 +299,49 @@ server cluster AccessControl = 31 { Commissioning and operational determination of Node characteristics, such as Vendor ID, Product ID and serial number, which apply to the whole Node. Also allows setting user device information such as location. */ server cluster BasicInformation = 40 { + enum ColorEnum : ENUM8 { + kBlack = 0; + kNavy = 1; + kGreen = 2; + kTeal = 3; + kMaroon = 4; + kPurple = 5; + kOlive = 6; + kGray = 7; + kBlue = 8; + kLime = 9; + kAqua = 10; + kRed = 11; + kFuchsia = 12; + kYellow = 13; + kWhite = 14; + kNickel = 15; + kChrome = 16; + kBrass = 17; + kCopper = 18; + kSilver = 19; + kGold = 20; + } + + enum ProductFinishEnum : ENUM8 { + kOther = 0; + kMatte = 1; + kSatin = 2; + kPolished = 3; + kRugged = 4; + kFabric = 5; + } + struct CapabilityMinimaStruct { int16u caseSessionsPerFabric = 0; int16u subscriptionsPerFabric = 1; } + struct ProductAppearanceStruct { + ProductFinishEnum finish = 0; + nullable ColorEnum primaryColor = 1; + } + critical event StartUp = 0 { INT32U softwareVersion = 0; } diff --git a/examples/chef/devices/rootnode_speaker_RpzeXdimqA.matter b/examples/chef/devices/rootnode_speaker_RpzeXdimqA.matter index 4e9566c593ea0e..35e6efc6ffd53c 100644 --- a/examples/chef/devices/rootnode_speaker_RpzeXdimqA.matter +++ b/examples/chef/devices/rootnode_speaker_RpzeXdimqA.matter @@ -371,11 +371,49 @@ server cluster AccessControl = 31 { Commissioning and operational determination of Node characteristics, such as Vendor ID, Product ID and serial number, which apply to the whole Node. Also allows setting user device information such as location. */ server cluster BasicInformation = 40 { + enum ColorEnum : ENUM8 { + kBlack = 0; + kNavy = 1; + kGreen = 2; + kTeal = 3; + kMaroon = 4; + kPurple = 5; + kOlive = 6; + kGray = 7; + kBlue = 8; + kLime = 9; + kAqua = 10; + kRed = 11; + kFuchsia = 12; + kYellow = 13; + kWhite = 14; + kNickel = 15; + kChrome = 16; + kBrass = 17; + kCopper = 18; + kSilver = 19; + kGold = 20; + } + + enum ProductFinishEnum : ENUM8 { + kOther = 0; + kMatte = 1; + kSatin = 2; + kPolished = 3; + kRugged = 4; + kFabric = 5; + } + struct CapabilityMinimaStruct { int16u caseSessionsPerFabric = 0; int16u subscriptionsPerFabric = 1; } + struct ProductAppearanceStruct { + ProductFinishEnum finish = 0; + nullable ColorEnum primaryColor = 1; + } + critical event StartUp = 0 { INT32U softwareVersion = 0; } diff --git a/examples/chef/devices/rootnode_temperaturesensor_Qy1zkNW7c3.matter b/examples/chef/devices/rootnode_temperaturesensor_Qy1zkNW7c3.matter index 938c70b6e55d79..d1ed28a7454369 100644 --- a/examples/chef/devices/rootnode_temperaturesensor_Qy1zkNW7c3.matter +++ b/examples/chef/devices/rootnode_temperaturesensor_Qy1zkNW7c3.matter @@ -299,11 +299,49 @@ server cluster AccessControl = 31 { Commissioning and operational determination of Node characteristics, such as Vendor ID, Product ID and serial number, which apply to the whole Node. Also allows setting user device information such as location. */ server cluster BasicInformation = 40 { + enum ColorEnum : ENUM8 { + kBlack = 0; + kNavy = 1; + kGreen = 2; + kTeal = 3; + kMaroon = 4; + kPurple = 5; + kOlive = 6; + kGray = 7; + kBlue = 8; + kLime = 9; + kAqua = 10; + kRed = 11; + kFuchsia = 12; + kYellow = 13; + kWhite = 14; + kNickel = 15; + kChrome = 16; + kBrass = 17; + kCopper = 18; + kSilver = 19; + kGold = 20; + } + + enum ProductFinishEnum : ENUM8 { + kOther = 0; + kMatte = 1; + kSatin = 2; + kPolished = 3; + kRugged = 4; + kFabric = 5; + } + struct CapabilityMinimaStruct { int16u caseSessionsPerFabric = 0; int16u subscriptionsPerFabric = 1; } + struct ProductAppearanceStruct { + ProductFinishEnum finish = 0; + nullable ColorEnum primaryColor = 1; + } + critical event StartUp = 0 { INT32U softwareVersion = 0; } diff --git a/examples/chef/devices/rootnode_thermostat_bm3fb8dhYi.matter b/examples/chef/devices/rootnode_thermostat_bm3fb8dhYi.matter index bd7919c6893af6..322bfa30fe6fcf 100644 --- a/examples/chef/devices/rootnode_thermostat_bm3fb8dhYi.matter +++ b/examples/chef/devices/rootnode_thermostat_bm3fb8dhYi.matter @@ -228,11 +228,49 @@ server cluster AccessControl = 31 { Commissioning and operational determination of Node characteristics, such as Vendor ID, Product ID and serial number, which apply to the whole Node. Also allows setting user device information such as location. */ server cluster BasicInformation = 40 { + enum ColorEnum : ENUM8 { + kBlack = 0; + kNavy = 1; + kGreen = 2; + kTeal = 3; + kMaroon = 4; + kPurple = 5; + kOlive = 6; + kGray = 7; + kBlue = 8; + kLime = 9; + kAqua = 10; + kRed = 11; + kFuchsia = 12; + kYellow = 13; + kWhite = 14; + kNickel = 15; + kChrome = 16; + kBrass = 17; + kCopper = 18; + kSilver = 19; + kGold = 20; + } + + enum ProductFinishEnum : ENUM8 { + kOther = 0; + kMatte = 1; + kSatin = 2; + kPolished = 3; + kRugged = 4; + kFabric = 5; + } + struct CapabilityMinimaStruct { int16u caseSessionsPerFabric = 0; int16u subscriptionsPerFabric = 1; } + struct ProductAppearanceStruct { + ProductFinishEnum finish = 0; + nullable ColorEnum primaryColor = 1; + } + critical event StartUp = 0 { INT32U softwareVersion = 0; } diff --git a/examples/chef/devices/rootnode_windowcovering_RLCxaGi9Yx.matter b/examples/chef/devices/rootnode_windowcovering_RLCxaGi9Yx.matter index 6ff843421b7718..df34979e9d7eaa 100644 --- a/examples/chef/devices/rootnode_windowcovering_RLCxaGi9Yx.matter +++ b/examples/chef/devices/rootnode_windowcovering_RLCxaGi9Yx.matter @@ -228,11 +228,49 @@ server cluster AccessControl = 31 { Commissioning and operational determination of Node characteristics, such as Vendor ID, Product ID and serial number, which apply to the whole Node. Also allows setting user device information such as location. */ server cluster BasicInformation = 40 { + enum ColorEnum : ENUM8 { + kBlack = 0; + kNavy = 1; + kGreen = 2; + kTeal = 3; + kMaroon = 4; + kPurple = 5; + kOlive = 6; + kGray = 7; + kBlue = 8; + kLime = 9; + kAqua = 10; + kRed = 11; + kFuchsia = 12; + kYellow = 13; + kWhite = 14; + kNickel = 15; + kChrome = 16; + kBrass = 17; + kCopper = 18; + kSilver = 19; + kGold = 20; + } + + enum ProductFinishEnum : ENUM8 { + kOther = 0; + kMatte = 1; + kSatin = 2; + kPolished = 3; + kRugged = 4; + kFabric = 5; + } + struct CapabilityMinimaStruct { int16u caseSessionsPerFabric = 0; int16u subscriptionsPerFabric = 1; } + struct ProductAppearanceStruct { + ProductFinishEnum finish = 0; + nullable ColorEnum primaryColor = 1; + } + critical event StartUp = 0 { INT32U softwareVersion = 0; } diff --git a/examples/contact-sensor-app/contact-sensor-common/contact-sensor-app.matter b/examples/contact-sensor-app/contact-sensor-common/contact-sensor-app.matter index f2a6f825f3d187..041ffa8bb9ef2c 100644 --- a/examples/contact-sensor-app/contact-sensor-common/contact-sensor-app.matter +++ b/examples/contact-sensor-app/contact-sensor-common/contact-sensor-app.matter @@ -218,11 +218,49 @@ server cluster AccessControl = 31 { Commissioning and operational determination of Node characteristics, such as Vendor ID, Product ID and serial number, which apply to the whole Node. Also allows setting user device information such as location. */ server cluster BasicInformation = 40 { + enum ColorEnum : ENUM8 { + kBlack = 0; + kNavy = 1; + kGreen = 2; + kTeal = 3; + kMaroon = 4; + kPurple = 5; + kOlive = 6; + kGray = 7; + kBlue = 8; + kLime = 9; + kAqua = 10; + kRed = 11; + kFuchsia = 12; + kYellow = 13; + kWhite = 14; + kNickel = 15; + kChrome = 16; + kBrass = 17; + kCopper = 18; + kSilver = 19; + kGold = 20; + } + + enum ProductFinishEnum : ENUM8 { + kOther = 0; + kMatte = 1; + kSatin = 2; + kPolished = 3; + kRugged = 4; + kFabric = 5; + } + struct CapabilityMinimaStruct { int16u caseSessionsPerFabric = 0; int16u subscriptionsPerFabric = 1; } + struct ProductAppearanceStruct { + ProductFinishEnum finish = 0; + nullable ColorEnum primaryColor = 1; + } + critical event StartUp = 0 { INT32U softwareVersion = 0; } diff --git a/examples/dynamic-bridge-app/bridge-common/bridge-app.matter b/examples/dynamic-bridge-app/bridge-common/bridge-app.matter index d553e9435e7aeb..c9b18b9e0f0a40 100644 --- a/examples/dynamic-bridge-app/bridge-common/bridge-app.matter +++ b/examples/dynamic-bridge-app/bridge-common/bridge-app.matter @@ -489,11 +489,49 @@ server cluster Actions = 37 { Commissioning and operational determination of Node characteristics, such as Vendor ID, Product ID and serial number, which apply to the whole Node. Also allows setting user device information such as location. */ server cluster BasicInformation = 40 { + enum ColorEnum : ENUM8 { + kBlack = 0; + kNavy = 1; + kGreen = 2; + kTeal = 3; + kMaroon = 4; + kPurple = 5; + kOlive = 6; + kGray = 7; + kBlue = 8; + kLime = 9; + kAqua = 10; + kRed = 11; + kFuchsia = 12; + kYellow = 13; + kWhite = 14; + kNickel = 15; + kChrome = 16; + kBrass = 17; + kCopper = 18; + kSilver = 19; + kGold = 20; + } + + enum ProductFinishEnum : ENUM8 { + kOther = 0; + kMatte = 1; + kSatin = 2; + kPolished = 3; + kRugged = 4; + kFabric = 5; + } + struct CapabilityMinimaStruct { int16u caseSessionsPerFabric = 0; int16u subscriptionsPerFabric = 1; } + struct ProductAppearanceStruct { + ProductFinishEnum finish = 0; + nullable ColorEnum primaryColor = 1; + } + critical event StartUp = 0 { INT32U softwareVersion = 0; } diff --git a/examples/light-switch-app/light-switch-common/light-switch-app.matter b/examples/light-switch-app/light-switch-common/light-switch-app.matter index cba838c3007d9b..c807d33312b042 100644 --- a/examples/light-switch-app/light-switch-common/light-switch-app.matter +++ b/examples/light-switch-app/light-switch-common/light-switch-app.matter @@ -526,11 +526,49 @@ server cluster AccessControl = 31 { Commissioning and operational determination of Node characteristics, such as Vendor ID, Product ID and serial number, which apply to the whole Node. Also allows setting user device information such as location. */ server cluster BasicInformation = 40 { + enum ColorEnum : ENUM8 { + kBlack = 0; + kNavy = 1; + kGreen = 2; + kTeal = 3; + kMaroon = 4; + kPurple = 5; + kOlive = 6; + kGray = 7; + kBlue = 8; + kLime = 9; + kAqua = 10; + kRed = 11; + kFuchsia = 12; + kYellow = 13; + kWhite = 14; + kNickel = 15; + kChrome = 16; + kBrass = 17; + kCopper = 18; + kSilver = 19; + kGold = 20; + } + + enum ProductFinishEnum : ENUM8 { + kOther = 0; + kMatte = 1; + kSatin = 2; + kPolished = 3; + kRugged = 4; + kFabric = 5; + } + struct CapabilityMinimaStruct { int16u caseSessionsPerFabric = 0; int16u subscriptionsPerFabric = 1; } + struct ProductAppearanceStruct { + ProductFinishEnum finish = 0; + nullable ColorEnum primaryColor = 1; + } + critical event StartUp = 0 { INT32U softwareVersion = 0; } diff --git a/examples/lighting-app/bouffalolab/data_model/lighting-app-thread.matter b/examples/lighting-app/bouffalolab/data_model/lighting-app-thread.matter index b900049325d2cf..10d41625f70b25 100644 --- a/examples/lighting-app/bouffalolab/data_model/lighting-app-thread.matter +++ b/examples/lighting-app/bouffalolab/data_model/lighting-app-thread.matter @@ -388,11 +388,49 @@ server cluster AccessControl = 31 { Commissioning and operational determination of Node characteristics, such as Vendor ID, Product ID and serial number, which apply to the whole Node. Also allows setting user device information such as location. */ server cluster BasicInformation = 40 { + enum ColorEnum : ENUM8 { + kBlack = 0; + kNavy = 1; + kGreen = 2; + kTeal = 3; + kMaroon = 4; + kPurple = 5; + kOlive = 6; + kGray = 7; + kBlue = 8; + kLime = 9; + kAqua = 10; + kRed = 11; + kFuchsia = 12; + kYellow = 13; + kWhite = 14; + kNickel = 15; + kChrome = 16; + kBrass = 17; + kCopper = 18; + kSilver = 19; + kGold = 20; + } + + enum ProductFinishEnum : ENUM8 { + kOther = 0; + kMatte = 1; + kSatin = 2; + kPolished = 3; + kRugged = 4; + kFabric = 5; + } + struct CapabilityMinimaStruct { int16u caseSessionsPerFabric = 0; int16u subscriptionsPerFabric = 1; } + struct ProductAppearanceStruct { + ProductFinishEnum finish = 0; + nullable ColorEnum primaryColor = 1; + } + critical event StartUp = 0 { INT32U softwareVersion = 0; } diff --git a/examples/lighting-app/bouffalolab/data_model/lighting-app-wifi.matter b/examples/lighting-app/bouffalolab/data_model/lighting-app-wifi.matter index 7cc2012ef8c2c4..cd4d0833e0f95d 100644 --- a/examples/lighting-app/bouffalolab/data_model/lighting-app-wifi.matter +++ b/examples/lighting-app/bouffalolab/data_model/lighting-app-wifi.matter @@ -388,11 +388,49 @@ server cluster AccessControl = 31 { Commissioning and operational determination of Node characteristics, such as Vendor ID, Product ID and serial number, which apply to the whole Node. Also allows setting user device information such as location. */ server cluster BasicInformation = 40 { + enum ColorEnum : ENUM8 { + kBlack = 0; + kNavy = 1; + kGreen = 2; + kTeal = 3; + kMaroon = 4; + kPurple = 5; + kOlive = 6; + kGray = 7; + kBlue = 8; + kLime = 9; + kAqua = 10; + kRed = 11; + kFuchsia = 12; + kYellow = 13; + kWhite = 14; + kNickel = 15; + kChrome = 16; + kBrass = 17; + kCopper = 18; + kSilver = 19; + kGold = 20; + } + + enum ProductFinishEnum : ENUM8 { + kOther = 0; + kMatte = 1; + kSatin = 2; + kPolished = 3; + kRugged = 4; + kFabric = 5; + } + struct CapabilityMinimaStruct { int16u caseSessionsPerFabric = 0; int16u subscriptionsPerFabric = 1; } + struct ProductAppearanceStruct { + ProductFinishEnum finish = 0; + nullable ColorEnum primaryColor = 1; + } + critical event StartUp = 0 { INT32U softwareVersion = 0; } diff --git a/examples/lighting-app/lighting-common/lighting-app.matter b/examples/lighting-app/lighting-common/lighting-app.matter index 1bf9cb4b9dc21b..ac3941ed0da579 100644 --- a/examples/lighting-app/lighting-common/lighting-app.matter +++ b/examples/lighting-app/lighting-common/lighting-app.matter @@ -388,11 +388,49 @@ server cluster AccessControl = 31 { Commissioning and operational determination of Node characteristics, such as Vendor ID, Product ID and serial number, which apply to the whole Node. Also allows setting user device information such as location. */ server cluster BasicInformation = 40 { + enum ColorEnum : ENUM8 { + kBlack = 0; + kNavy = 1; + kGreen = 2; + kTeal = 3; + kMaroon = 4; + kPurple = 5; + kOlive = 6; + kGray = 7; + kBlue = 8; + kLime = 9; + kAqua = 10; + kRed = 11; + kFuchsia = 12; + kYellow = 13; + kWhite = 14; + kNickel = 15; + kChrome = 16; + kBrass = 17; + kCopper = 18; + kSilver = 19; + kGold = 20; + } + + enum ProductFinishEnum : ENUM8 { + kOther = 0; + kMatte = 1; + kSatin = 2; + kPolished = 3; + kRugged = 4; + kFabric = 5; + } + struct CapabilityMinimaStruct { int16u caseSessionsPerFabric = 0; int16u subscriptionsPerFabric = 1; } + struct ProductAppearanceStruct { + ProductFinishEnum finish = 0; + nullable ColorEnum primaryColor = 1; + } + critical event StartUp = 0 { INT32U softwareVersion = 0; } diff --git a/examples/lighting-app/nxp/zap/lighting-on-off.matter b/examples/lighting-app/nxp/zap/lighting-on-off.matter index 1b6e340cb799b3..b3228bd4b1f59c 100644 --- a/examples/lighting-app/nxp/zap/lighting-on-off.matter +++ b/examples/lighting-app/nxp/zap/lighting-on-off.matter @@ -380,11 +380,49 @@ server cluster AccessControl = 31 { Commissioning and operational determination of Node characteristics, such as Vendor ID, Product ID and serial number, which apply to the whole Node. Also allows setting user device information such as location. */ server cluster BasicInformation = 40 { + enum ColorEnum : ENUM8 { + kBlack = 0; + kNavy = 1; + kGreen = 2; + kTeal = 3; + kMaroon = 4; + kPurple = 5; + kOlive = 6; + kGray = 7; + kBlue = 8; + kLime = 9; + kAqua = 10; + kRed = 11; + kFuchsia = 12; + kYellow = 13; + kWhite = 14; + kNickel = 15; + kChrome = 16; + kBrass = 17; + kCopper = 18; + kSilver = 19; + kGold = 20; + } + + enum ProductFinishEnum : ENUM8 { + kOther = 0; + kMatte = 1; + kSatin = 2; + kPolished = 3; + kRugged = 4; + kFabric = 5; + } + struct CapabilityMinimaStruct { int16u caseSessionsPerFabric = 0; int16u subscriptionsPerFabric = 1; } + struct ProductAppearanceStruct { + ProductFinishEnum finish = 0; + nullable ColorEnum primaryColor = 1; + } + critical event StartUp = 0 { INT32U softwareVersion = 0; } diff --git a/examples/lighting-app/qpg/zap/light.matter b/examples/lighting-app/qpg/zap/light.matter index b6b9cb244c744b..690c1ef00c3472 100644 --- a/examples/lighting-app/qpg/zap/light.matter +++ b/examples/lighting-app/qpg/zap/light.matter @@ -383,11 +383,49 @@ server cluster AccessControl = 31 { Commissioning and operational determination of Node characteristics, such as Vendor ID, Product ID and serial number, which apply to the whole Node. Also allows setting user device information such as location. */ server cluster BasicInformation = 40 { + enum ColorEnum : ENUM8 { + kBlack = 0; + kNavy = 1; + kGreen = 2; + kTeal = 3; + kMaroon = 4; + kPurple = 5; + kOlive = 6; + kGray = 7; + kBlue = 8; + kLime = 9; + kAqua = 10; + kRed = 11; + kFuchsia = 12; + kYellow = 13; + kWhite = 14; + kNickel = 15; + kChrome = 16; + kBrass = 17; + kCopper = 18; + kSilver = 19; + kGold = 20; + } + + enum ProductFinishEnum : ENUM8 { + kOther = 0; + kMatte = 1; + kSatin = 2; + kPolished = 3; + kRugged = 4; + kFabric = 5; + } + struct CapabilityMinimaStruct { int16u caseSessionsPerFabric = 0; int16u subscriptionsPerFabric = 1; } + struct ProductAppearanceStruct { + ProductFinishEnum finish = 0; + nullable ColorEnum primaryColor = 1; + } + critical event StartUp = 0 { INT32U softwareVersion = 0; } diff --git a/examples/lighting-app/silabs/SiWx917/data_model/lighting-wifi-app.matter b/examples/lighting-app/silabs/SiWx917/data_model/lighting-wifi-app.matter index 08811edf0b16d4..10f515bf7763a1 100644 --- a/examples/lighting-app/silabs/SiWx917/data_model/lighting-wifi-app.matter +++ b/examples/lighting-app/silabs/SiWx917/data_model/lighting-wifi-app.matter @@ -388,11 +388,49 @@ server cluster AccessControl = 31 { Commissioning and operational determination of Node characteristics, such as Vendor ID, Product ID and serial number, which apply to the whole Node. Also allows setting user device information such as location. */ server cluster BasicInformation = 40 { + enum ColorEnum : ENUM8 { + kBlack = 0; + kNavy = 1; + kGreen = 2; + kTeal = 3; + kMaroon = 4; + kPurple = 5; + kOlive = 6; + kGray = 7; + kBlue = 8; + kLime = 9; + kAqua = 10; + kRed = 11; + kFuchsia = 12; + kYellow = 13; + kWhite = 14; + kNickel = 15; + kChrome = 16; + kBrass = 17; + kCopper = 18; + kSilver = 19; + kGold = 20; + } + + enum ProductFinishEnum : ENUM8 { + kOther = 0; + kMatte = 1; + kSatin = 2; + kPolished = 3; + kRugged = 4; + kFabric = 5; + } + struct CapabilityMinimaStruct { int16u caseSessionsPerFabric = 0; int16u subscriptionsPerFabric = 1; } + struct ProductAppearanceStruct { + ProductFinishEnum finish = 0; + nullable ColorEnum primaryColor = 1; + } + critical event StartUp = 0 { INT32U softwareVersion = 0; } diff --git a/examples/lighting-app/silabs/efr32/data_model/lighting-thread-app.matter b/examples/lighting-app/silabs/efr32/data_model/lighting-thread-app.matter index 25f2346c1139d2..4ed286292677b3 100644 --- a/examples/lighting-app/silabs/efr32/data_model/lighting-thread-app.matter +++ b/examples/lighting-app/silabs/efr32/data_model/lighting-thread-app.matter @@ -388,11 +388,49 @@ server cluster AccessControl = 31 { Commissioning and operational determination of Node characteristics, such as Vendor ID, Product ID and serial number, which apply to the whole Node. Also allows setting user device information such as location. */ server cluster BasicInformation = 40 { + enum ColorEnum : ENUM8 { + kBlack = 0; + kNavy = 1; + kGreen = 2; + kTeal = 3; + kMaroon = 4; + kPurple = 5; + kOlive = 6; + kGray = 7; + kBlue = 8; + kLime = 9; + kAqua = 10; + kRed = 11; + kFuchsia = 12; + kYellow = 13; + kWhite = 14; + kNickel = 15; + kChrome = 16; + kBrass = 17; + kCopper = 18; + kSilver = 19; + kGold = 20; + } + + enum ProductFinishEnum : ENUM8 { + kOther = 0; + kMatte = 1; + kSatin = 2; + kPolished = 3; + kRugged = 4; + kFabric = 5; + } + struct CapabilityMinimaStruct { int16u caseSessionsPerFabric = 0; int16u subscriptionsPerFabric = 1; } + struct ProductAppearanceStruct { + ProductFinishEnum finish = 0; + nullable ColorEnum primaryColor = 1; + } + critical event StartUp = 0 { INT32U softwareVersion = 0; } diff --git a/examples/lighting-app/silabs/efr32/data_model/lighting-wifi-app.matter b/examples/lighting-app/silabs/efr32/data_model/lighting-wifi-app.matter index 08811edf0b16d4..10f515bf7763a1 100644 --- a/examples/lighting-app/silabs/efr32/data_model/lighting-wifi-app.matter +++ b/examples/lighting-app/silabs/efr32/data_model/lighting-wifi-app.matter @@ -388,11 +388,49 @@ server cluster AccessControl = 31 { Commissioning and operational determination of Node characteristics, such as Vendor ID, Product ID and serial number, which apply to the whole Node. Also allows setting user device information such as location. */ server cluster BasicInformation = 40 { + enum ColorEnum : ENUM8 { + kBlack = 0; + kNavy = 1; + kGreen = 2; + kTeal = 3; + kMaroon = 4; + kPurple = 5; + kOlive = 6; + kGray = 7; + kBlue = 8; + kLime = 9; + kAqua = 10; + kRed = 11; + kFuchsia = 12; + kYellow = 13; + kWhite = 14; + kNickel = 15; + kChrome = 16; + kBrass = 17; + kCopper = 18; + kSilver = 19; + kGold = 20; + } + + enum ProductFinishEnum : ENUM8 { + kOther = 0; + kMatte = 1; + kSatin = 2; + kPolished = 3; + kRugged = 4; + kFabric = 5; + } + struct CapabilityMinimaStruct { int16u caseSessionsPerFabric = 0; int16u subscriptionsPerFabric = 1; } + struct ProductAppearanceStruct { + ProductFinishEnum finish = 0; + nullable ColorEnum primaryColor = 1; + } + critical event StartUp = 0 { INT32U softwareVersion = 0; } diff --git a/examples/lock-app/lock-common/lock-app.matter b/examples/lock-app/lock-common/lock-app.matter index 81abd19965fe32..d3d4f7f68bbdb8 100644 --- a/examples/lock-app/lock-common/lock-app.matter +++ b/examples/lock-app/lock-common/lock-app.matter @@ -195,11 +195,49 @@ server cluster AccessControl = 31 { Commissioning and operational determination of Node characteristics, such as Vendor ID, Product ID and serial number, which apply to the whole Node. Also allows setting user device information such as location. */ server cluster BasicInformation = 40 { + enum ColorEnum : ENUM8 { + kBlack = 0; + kNavy = 1; + kGreen = 2; + kTeal = 3; + kMaroon = 4; + kPurple = 5; + kOlive = 6; + kGray = 7; + kBlue = 8; + kLime = 9; + kAqua = 10; + kRed = 11; + kFuchsia = 12; + kYellow = 13; + kWhite = 14; + kNickel = 15; + kChrome = 16; + kBrass = 17; + kCopper = 18; + kSilver = 19; + kGold = 20; + } + + enum ProductFinishEnum : ENUM8 { + kOther = 0; + kMatte = 1; + kSatin = 2; + kPolished = 3; + kRugged = 4; + kFabric = 5; + } + struct CapabilityMinimaStruct { int16u caseSessionsPerFabric = 0; int16u subscriptionsPerFabric = 1; } + struct ProductAppearanceStruct { + ProductFinishEnum finish = 0; + nullable ColorEnum primaryColor = 1; + } + critical event StartUp = 0 { INT32U softwareVersion = 0; } diff --git a/examples/lock-app/nxp/zap/lock-app.matter b/examples/lock-app/nxp/zap/lock-app.matter index b09e5a23a74e92..cbe34d3abc1db1 100644 --- a/examples/lock-app/nxp/zap/lock-app.matter +++ b/examples/lock-app/nxp/zap/lock-app.matter @@ -152,11 +152,49 @@ server cluster AccessControl = 31 { Commissioning and operational determination of Node characteristics, such as Vendor ID, Product ID and serial number, which apply to the whole Node. Also allows setting user device information such as location. */ server cluster BasicInformation = 40 { + enum ColorEnum : ENUM8 { + kBlack = 0; + kNavy = 1; + kGreen = 2; + kTeal = 3; + kMaroon = 4; + kPurple = 5; + kOlive = 6; + kGray = 7; + kBlue = 8; + kLime = 9; + kAqua = 10; + kRed = 11; + kFuchsia = 12; + kYellow = 13; + kWhite = 14; + kNickel = 15; + kChrome = 16; + kBrass = 17; + kCopper = 18; + kSilver = 19; + kGold = 20; + } + + enum ProductFinishEnum : ENUM8 { + kOther = 0; + kMatte = 1; + kSatin = 2; + kPolished = 3; + kRugged = 4; + kFabric = 5; + } + struct CapabilityMinimaStruct { int16u caseSessionsPerFabric = 0; int16u subscriptionsPerFabric = 1; } + struct ProductAppearanceStruct { + ProductFinishEnum finish = 0; + nullable ColorEnum primaryColor = 1; + } + critical event StartUp = 0 { INT32U softwareVersion = 0; } diff --git a/examples/lock-app/qpg/zap/lock.matter b/examples/lock-app/qpg/zap/lock.matter index 2d46c41f4051a2..4466f92a12e4a7 100644 --- a/examples/lock-app/qpg/zap/lock.matter +++ b/examples/lock-app/qpg/zap/lock.matter @@ -217,11 +217,49 @@ server cluster AccessControl = 31 { Commissioning and operational determination of Node characteristics, such as Vendor ID, Product ID and serial number, which apply to the whole Node. Also allows setting user device information such as location. */ server cluster BasicInformation = 40 { + enum ColorEnum : ENUM8 { + kBlack = 0; + kNavy = 1; + kGreen = 2; + kTeal = 3; + kMaroon = 4; + kPurple = 5; + kOlive = 6; + kGray = 7; + kBlue = 8; + kLime = 9; + kAqua = 10; + kRed = 11; + kFuchsia = 12; + kYellow = 13; + kWhite = 14; + kNickel = 15; + kChrome = 16; + kBrass = 17; + kCopper = 18; + kSilver = 19; + kGold = 20; + } + + enum ProductFinishEnum : ENUM8 { + kOther = 0; + kMatte = 1; + kSatin = 2; + kPolished = 3; + kRugged = 4; + kFabric = 5; + } + struct CapabilityMinimaStruct { int16u caseSessionsPerFabric = 0; int16u subscriptionsPerFabric = 1; } + struct ProductAppearanceStruct { + ProductFinishEnum finish = 0; + nullable ColorEnum primaryColor = 1; + } + critical event StartUp = 0 { INT32U softwareVersion = 0; } diff --git a/examples/ota-provider-app/ota-provider-common/ota-provider-app.matter b/examples/ota-provider-app/ota-provider-common/ota-provider-app.matter index 1482f14797d7e0..af44c58c246f4c 100644 --- a/examples/ota-provider-app/ota-provider-common/ota-provider-app.matter +++ b/examples/ota-provider-app/ota-provider-common/ota-provider-app.matter @@ -180,11 +180,49 @@ server cluster AccessControl = 31 { Commissioning and operational determination of Node characteristics, such as Vendor ID, Product ID and serial number, which apply to the whole Node. Also allows setting user device information such as location. */ server cluster BasicInformation = 40 { + enum ColorEnum : ENUM8 { + kBlack = 0; + kNavy = 1; + kGreen = 2; + kTeal = 3; + kMaroon = 4; + kPurple = 5; + kOlive = 6; + kGray = 7; + kBlue = 8; + kLime = 9; + kAqua = 10; + kRed = 11; + kFuchsia = 12; + kYellow = 13; + kWhite = 14; + kNickel = 15; + kChrome = 16; + kBrass = 17; + kCopper = 18; + kSilver = 19; + kGold = 20; + } + + enum ProductFinishEnum : ENUM8 { + kOther = 0; + kMatte = 1; + kSatin = 2; + kPolished = 3; + kRugged = 4; + kFabric = 5; + } + struct CapabilityMinimaStruct { int16u caseSessionsPerFabric = 0; int16u subscriptionsPerFabric = 1; } + struct ProductAppearanceStruct { + ProductFinishEnum finish = 0; + nullable ColorEnum primaryColor = 1; + } + critical event StartUp = 0 { INT32U softwareVersion = 0; } diff --git a/examples/ota-requestor-app/ota-requestor-common/ota-requestor-app.matter b/examples/ota-requestor-app/ota-requestor-common/ota-requestor-app.matter index b806568768bd64..1d69db27f6a3ec 100644 --- a/examples/ota-requestor-app/ota-requestor-common/ota-requestor-app.matter +++ b/examples/ota-requestor-app/ota-requestor-common/ota-requestor-app.matter @@ -280,11 +280,49 @@ server cluster AccessControl = 31 { Commissioning and operational determination of Node characteristics, such as Vendor ID, Product ID and serial number, which apply to the whole Node. Also allows setting user device information such as location. */ server cluster BasicInformation = 40 { + enum ColorEnum : ENUM8 { + kBlack = 0; + kNavy = 1; + kGreen = 2; + kTeal = 3; + kMaroon = 4; + kPurple = 5; + kOlive = 6; + kGray = 7; + kBlue = 8; + kLime = 9; + kAqua = 10; + kRed = 11; + kFuchsia = 12; + kYellow = 13; + kWhite = 14; + kNickel = 15; + kChrome = 16; + kBrass = 17; + kCopper = 18; + kSilver = 19; + kGold = 20; + } + + enum ProductFinishEnum : ENUM8 { + kOther = 0; + kMatte = 1; + kSatin = 2; + kPolished = 3; + kRugged = 4; + kFabric = 5; + } + struct CapabilityMinimaStruct { int16u caseSessionsPerFabric = 0; int16u subscriptionsPerFabric = 1; } + struct ProductAppearanceStruct { + ProductFinishEnum finish = 0; + nullable ColorEnum primaryColor = 1; + } + critical event StartUp = 0 { INT32U softwareVersion = 0; } diff --git a/examples/placeholder/linux/apps/app1/config.matter b/examples/placeholder/linux/apps/app1/config.matter index 1ed428f54b89a9..368ed130bfe1c9 100644 --- a/examples/placeholder/linux/apps/app1/config.matter +++ b/examples/placeholder/linux/apps/app1/config.matter @@ -648,11 +648,49 @@ server cluster Actions = 37 { Commissioning and operational determination of Node characteristics, such as Vendor ID, Product ID and serial number, which apply to the whole Node. Also allows setting user device information such as location. */ server cluster BasicInformation = 40 { + enum ColorEnum : ENUM8 { + kBlack = 0; + kNavy = 1; + kGreen = 2; + kTeal = 3; + kMaroon = 4; + kPurple = 5; + kOlive = 6; + kGray = 7; + kBlue = 8; + kLime = 9; + kAqua = 10; + kRed = 11; + kFuchsia = 12; + kYellow = 13; + kWhite = 14; + kNickel = 15; + kChrome = 16; + kBrass = 17; + kCopper = 18; + kSilver = 19; + kGold = 20; + } + + enum ProductFinishEnum : ENUM8 { + kOther = 0; + kMatte = 1; + kSatin = 2; + kPolished = 3; + kRugged = 4; + kFabric = 5; + } + struct CapabilityMinimaStruct { int16u caseSessionsPerFabric = 0; int16u subscriptionsPerFabric = 1; } + struct ProductAppearanceStruct { + ProductFinishEnum finish = 0; + nullable ColorEnum primaryColor = 1; + } + critical event StartUp = 0 { INT32U softwareVersion = 0; } diff --git a/examples/placeholder/linux/apps/app2/config.matter b/examples/placeholder/linux/apps/app2/config.matter index cb867628e21df7..71f3160070bad4 100644 --- a/examples/placeholder/linux/apps/app2/config.matter +++ b/examples/placeholder/linux/apps/app2/config.matter @@ -648,11 +648,49 @@ server cluster Actions = 37 { Commissioning and operational determination of Node characteristics, such as Vendor ID, Product ID and serial number, which apply to the whole Node. Also allows setting user device information such as location. */ server cluster BasicInformation = 40 { + enum ColorEnum : ENUM8 { + kBlack = 0; + kNavy = 1; + kGreen = 2; + kTeal = 3; + kMaroon = 4; + kPurple = 5; + kOlive = 6; + kGray = 7; + kBlue = 8; + kLime = 9; + kAqua = 10; + kRed = 11; + kFuchsia = 12; + kYellow = 13; + kWhite = 14; + kNickel = 15; + kChrome = 16; + kBrass = 17; + kCopper = 18; + kSilver = 19; + kGold = 20; + } + + enum ProductFinishEnum : ENUM8 { + kOther = 0; + kMatte = 1; + kSatin = 2; + kPolished = 3; + kRugged = 4; + kFabric = 5; + } + struct CapabilityMinimaStruct { int16u caseSessionsPerFabric = 0; int16u subscriptionsPerFabric = 1; } + struct ProductAppearanceStruct { + ProductFinishEnum finish = 0; + nullable ColorEnum primaryColor = 1; + } + critical event StartUp = 0 { INT32U softwareVersion = 0; } diff --git a/examples/pump-app/pump-common/pump-app.matter b/examples/pump-app/pump-common/pump-app.matter index 68f06b0fe512c3..0f01768c57a550 100644 --- a/examples/pump-app/pump-common/pump-app.matter +++ b/examples/pump-app/pump-common/pump-app.matter @@ -309,11 +309,49 @@ server cluster AccessControl = 31 { Commissioning and operational determination of Node characteristics, such as Vendor ID, Product ID and serial number, which apply to the whole Node. Also allows setting user device information such as location. */ server cluster BasicInformation = 40 { + enum ColorEnum : ENUM8 { + kBlack = 0; + kNavy = 1; + kGreen = 2; + kTeal = 3; + kMaroon = 4; + kPurple = 5; + kOlive = 6; + kGray = 7; + kBlue = 8; + kLime = 9; + kAqua = 10; + kRed = 11; + kFuchsia = 12; + kYellow = 13; + kWhite = 14; + kNickel = 15; + kChrome = 16; + kBrass = 17; + kCopper = 18; + kSilver = 19; + kGold = 20; + } + + enum ProductFinishEnum : ENUM8 { + kOther = 0; + kMatte = 1; + kSatin = 2; + kPolished = 3; + kRugged = 4; + kFabric = 5; + } + struct CapabilityMinimaStruct { int16u caseSessionsPerFabric = 0; int16u subscriptionsPerFabric = 1; } + struct ProductAppearanceStruct { + ProductFinishEnum finish = 0; + nullable ColorEnum primaryColor = 1; + } + critical event StartUp = 0 { INT32U softwareVersion = 0; } diff --git a/examples/pump-controller-app/pump-controller-common/pump-controller-app.matter b/examples/pump-controller-app/pump-controller-common/pump-controller-app.matter index ec9f7cbefecf59..197a8f44784a43 100644 --- a/examples/pump-controller-app/pump-controller-common/pump-controller-app.matter +++ b/examples/pump-controller-app/pump-controller-common/pump-controller-app.matter @@ -234,11 +234,49 @@ server cluster AccessControl = 31 { Commissioning and operational determination of Node characteristics, such as Vendor ID, Product ID and serial number, which apply to the whole Node. Also allows setting user device information such as location. */ server cluster BasicInformation = 40 { + enum ColorEnum : ENUM8 { + kBlack = 0; + kNavy = 1; + kGreen = 2; + kTeal = 3; + kMaroon = 4; + kPurple = 5; + kOlive = 6; + kGray = 7; + kBlue = 8; + kLime = 9; + kAqua = 10; + kRed = 11; + kFuchsia = 12; + kYellow = 13; + kWhite = 14; + kNickel = 15; + kChrome = 16; + kBrass = 17; + kCopper = 18; + kSilver = 19; + kGold = 20; + } + + enum ProductFinishEnum : ENUM8 { + kOther = 0; + kMatte = 1; + kSatin = 2; + kPolished = 3; + kRugged = 4; + kFabric = 5; + } + struct CapabilityMinimaStruct { int16u caseSessionsPerFabric = 0; int16u subscriptionsPerFabric = 1; } + struct ProductAppearanceStruct { + ProductFinishEnum finish = 0; + nullable ColorEnum primaryColor = 1; + } + critical event StartUp = 0 { INT32U softwareVersion = 0; } diff --git a/examples/temperature-measurement-app/temperature-measurement-common/temperature-measurement.matter b/examples/temperature-measurement-app/temperature-measurement-common/temperature-measurement.matter index f8bd756cfc8cdd..5d113b5e8d9693 100644 --- a/examples/temperature-measurement-app/temperature-measurement-common/temperature-measurement.matter +++ b/examples/temperature-measurement-app/temperature-measurement-common/temperature-measurement.matter @@ -107,11 +107,49 @@ server cluster AccessControl = 31 { Commissioning and operational determination of Node characteristics, such as Vendor ID, Product ID and serial number, which apply to the whole Node. Also allows setting user device information such as location. */ server cluster BasicInformation = 40 { + enum ColorEnum : ENUM8 { + kBlack = 0; + kNavy = 1; + kGreen = 2; + kTeal = 3; + kMaroon = 4; + kPurple = 5; + kOlive = 6; + kGray = 7; + kBlue = 8; + kLime = 9; + kAqua = 10; + kRed = 11; + kFuchsia = 12; + kYellow = 13; + kWhite = 14; + kNickel = 15; + kChrome = 16; + kBrass = 17; + kCopper = 18; + kSilver = 19; + kGold = 20; + } + + enum ProductFinishEnum : ENUM8 { + kOther = 0; + kMatte = 1; + kSatin = 2; + kPolished = 3; + kRugged = 4; + kFabric = 5; + } + struct CapabilityMinimaStruct { int16u caseSessionsPerFabric = 0; int16u subscriptionsPerFabric = 1; } + struct ProductAppearanceStruct { + ProductFinishEnum finish = 0; + nullable ColorEnum primaryColor = 1; + } + critical event StartUp = 0 { INT32U softwareVersion = 0; } diff --git a/examples/thermostat/thermostat-common/thermostat.matter b/examples/thermostat/thermostat-common/thermostat.matter index 5711a58d2c24d8..9779243ed3b287 100644 --- a/examples/thermostat/thermostat-common/thermostat.matter +++ b/examples/thermostat/thermostat-common/thermostat.matter @@ -402,11 +402,49 @@ server cluster AccessControl = 31 { Commissioning and operational determination of Node characteristics, such as Vendor ID, Product ID and serial number, which apply to the whole Node. Also allows setting user device information such as location. */ server cluster BasicInformation = 40 { + enum ColorEnum : ENUM8 { + kBlack = 0; + kNavy = 1; + kGreen = 2; + kTeal = 3; + kMaroon = 4; + kPurple = 5; + kOlive = 6; + kGray = 7; + kBlue = 8; + kLime = 9; + kAqua = 10; + kRed = 11; + kFuchsia = 12; + kYellow = 13; + kWhite = 14; + kNickel = 15; + kChrome = 16; + kBrass = 17; + kCopper = 18; + kSilver = 19; + kGold = 20; + } + + enum ProductFinishEnum : ENUM8 { + kOther = 0; + kMatte = 1; + kSatin = 2; + kPolished = 3; + kRugged = 4; + kFabric = 5; + } + struct CapabilityMinimaStruct { int16u caseSessionsPerFabric = 0; int16u subscriptionsPerFabric = 1; } + struct ProductAppearanceStruct { + ProductFinishEnum finish = 0; + nullable ColorEnum primaryColor = 1; + } + critical event StartUp = 0 { INT32U softwareVersion = 0; } diff --git a/examples/tv-app/tv-common/tv-app.matter b/examples/tv-app/tv-common/tv-app.matter index 38684c4cb92787..db232108fbddd7 100644 --- a/examples/tv-app/tv-common/tv-app.matter +++ b/examples/tv-app/tv-common/tv-app.matter @@ -297,11 +297,49 @@ server cluster AccessControl = 31 { Commissioning and operational determination of Node characteristics, such as Vendor ID, Product ID and serial number, which apply to the whole Node. Also allows setting user device information such as location. */ server cluster BasicInformation = 40 { + enum ColorEnum : ENUM8 { + kBlack = 0; + kNavy = 1; + kGreen = 2; + kTeal = 3; + kMaroon = 4; + kPurple = 5; + kOlive = 6; + kGray = 7; + kBlue = 8; + kLime = 9; + kAqua = 10; + kRed = 11; + kFuchsia = 12; + kYellow = 13; + kWhite = 14; + kNickel = 15; + kChrome = 16; + kBrass = 17; + kCopper = 18; + kSilver = 19; + kGold = 20; + } + + enum ProductFinishEnum : ENUM8 { + kOther = 0; + kMatte = 1; + kSatin = 2; + kPolished = 3; + kRugged = 4; + kFabric = 5; + } + struct CapabilityMinimaStruct { int16u caseSessionsPerFabric = 0; int16u subscriptionsPerFabric = 1; } + struct ProductAppearanceStruct { + ProductFinishEnum finish = 0; + nullable ColorEnum primaryColor = 1; + } + critical event StartUp = 0 { INT32U softwareVersion = 0; } diff --git a/examples/tv-casting-app/tv-casting-common/tv-casting-app.matter b/examples/tv-casting-app/tv-casting-common/tv-casting-app.matter index 15be98246b7b73..abb8e9f1edb116 100644 --- a/examples/tv-casting-app/tv-casting-common/tv-casting-app.matter +++ b/examples/tv-casting-app/tv-casting-common/tv-casting-app.matter @@ -454,11 +454,49 @@ server cluster AccessControl = 31 { Commissioning and operational determination of Node characteristics, such as Vendor ID, Product ID and serial number, which apply to the whole Node. Also allows setting user device information such as location. */ server cluster BasicInformation = 40 { + enum ColorEnum : ENUM8 { + kBlack = 0; + kNavy = 1; + kGreen = 2; + kTeal = 3; + kMaroon = 4; + kPurple = 5; + kOlive = 6; + kGray = 7; + kBlue = 8; + kLime = 9; + kAqua = 10; + kRed = 11; + kFuchsia = 12; + kYellow = 13; + kWhite = 14; + kNickel = 15; + kChrome = 16; + kBrass = 17; + kCopper = 18; + kSilver = 19; + kGold = 20; + } + + enum ProductFinishEnum : ENUM8 { + kOther = 0; + kMatte = 1; + kSatin = 2; + kPolished = 3; + kRugged = 4; + kFabric = 5; + } + struct CapabilityMinimaStruct { int16u caseSessionsPerFabric = 0; int16u subscriptionsPerFabric = 1; } + struct ProductAppearanceStruct { + ProductFinishEnum finish = 0; + nullable ColorEnum primaryColor = 1; + } + critical event StartUp = 0 { INT32U softwareVersion = 0; } diff --git a/examples/window-app/common/window-app.matter b/examples/window-app/common/window-app.matter index 0ac80a3916d20e..20956c32c6ab69 100644 --- a/examples/window-app/common/window-app.matter +++ b/examples/window-app/common/window-app.matter @@ -335,11 +335,49 @@ server cluster AccessControl = 31 { Commissioning and operational determination of Node characteristics, such as Vendor ID, Product ID and serial number, which apply to the whole Node. Also allows setting user device information such as location. */ server cluster BasicInformation = 40 { + enum ColorEnum : ENUM8 { + kBlack = 0; + kNavy = 1; + kGreen = 2; + kTeal = 3; + kMaroon = 4; + kPurple = 5; + kOlive = 6; + kGray = 7; + kBlue = 8; + kLime = 9; + kAqua = 10; + kRed = 11; + kFuchsia = 12; + kYellow = 13; + kWhite = 14; + kNickel = 15; + kChrome = 16; + kBrass = 17; + kCopper = 18; + kSilver = 19; + kGold = 20; + } + + enum ProductFinishEnum : ENUM8 { + kOther = 0; + kMatte = 1; + kSatin = 2; + kPolished = 3; + kRugged = 4; + kFabric = 5; + } + struct CapabilityMinimaStruct { int16u caseSessionsPerFabric = 0; int16u subscriptionsPerFabric = 1; } + struct ProductAppearanceStruct { + ProductFinishEnum finish = 0; + nullable ColorEnum primaryColor = 1; + } + critical event StartUp = 0 { INT32U softwareVersion = 0; } diff --git a/src/app/clusters/basic-information/basic-information.cpp b/src/app/clusters/basic-information/basic-information.cpp index 3e98375670d513..57f297f1e1c4ad 100644 --- a/src/app/clusters/basic-information/basic-information.cpp +++ b/src/app/clusters/basic-information/basic-information.cpp @@ -58,6 +58,7 @@ class BasicAttrAccess : public AttributeAccessInterface CHIP_ERROR ReadDataModelRevision(AttributeValueEncoder & aEncoder); CHIP_ERROR ReadLocation(AttributeValueEncoder & aEncoder); CHIP_ERROR WriteLocation(AttributeValueDecoder & aDecoder); + CHIP_ERROR ReadProductAppearance(AttributeValueEncoder & aEncoder); }; BasicAttrAccess gAttrAccess; @@ -281,6 +282,11 @@ CHIP_ERROR BasicAttrAccess::Read(const ConcreteReadAttributePath & aPath, Attrib break; } + case ProductAppearance::Id: { + status = ReadProductAppearance(aEncoder); + break; + } + default: // We did not find a processing path, the caller will delegate elsewhere. break; @@ -343,6 +349,33 @@ CHIP_ERROR BasicAttrAccess::WriteLocation(AttributeValueDecoder & aDecoder) return DeviceLayer::ConfigurationMgr().StoreCountryCode(location.data(), location.size()); } +CHIP_ERROR BasicAttrAccess::ReadProductAppearance(AttributeValueEncoder & aEncoder) +{ + auto * provider = GetDeviceInstanceInfoProvider(); + ProductFinishEnum finish; + ReturnErrorOnFailure(provider->GetProductFinish(&finish)); + + ColorEnum color; + CHIP_ERROR colorStatus = provider->GetProductPrimaryColor(&color); + if (colorStatus != CHIP_NO_ERROR && colorStatus != CHIP_ERROR_NOT_IMPLEMENTED) + { + return colorStatus; + } + + Structs::ProductAppearanceStruct::Type productAppearance; + productAppearance.finish = finish; + if (colorStatus == CHIP_NO_ERROR) + { + productAppearance.primaryColor.SetNonNull(color); + } + else + { + productAppearance.primaryColor.SetNull(); + } + + return aEncoder.Encode(productAppearance); +} + class PlatformMgrDelegate : public DeviceLayer::PlatformManagerDelegate { void OnStartUp(uint32_t softwareVersion) override diff --git a/src/app/tests/suites/TestBasicInformation.yaml b/src/app/tests/suites/TestBasicInformation.yaml index 8dce39f49b6d89..19f1af3cb2ec53 100644 --- a/src/app/tests/suites/TestBasicInformation.yaml +++ b/src/app/tests/suites/TestBasicInformation.yaml @@ -77,6 +77,7 @@ tests: 17, 18, 19, + 20, 0xFFF8, # GeneratedCommandList 0xFFF9, # AcceptedCommandList 0xFFFB, # AttributeList @@ -155,3 +156,10 @@ tests: attribute: "LocalConfigDisabled" arguments: value: false + + - label: "Read the ProductApppearance value" + command: "readAttribute" + attribute: "ProductAppearance" + response: + # For now all-clusters-app is a satin purple. + value: { Finish: 2, PrimaryColor: 5 } diff --git a/src/app/tests/suites/certification/Test_TC_BINFO_1_1.yaml b/src/app/tests/suites/certification/Test_TC_BINFO_1_1.yaml index c21058ce983913..670f5e2972122e 100644 --- a/src/app/tests/suites/certification/Test_TC_BINFO_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_BINFO_1_1.yaml @@ -38,7 +38,7 @@ tests: command: "readAttribute" attribute: "ClusterRevision" response: - value: 1 + value: 2 constraints: type: int16u diff --git a/src/app/zap-templates/zcl/data-model/chip/basic-information-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/basic-information-cluster.xml index cfe5e82dca20fa..4c9cd6cbd55d46 100644 --- a/src/app/zap-templates/zcl/data-model/chip/basic-information-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/basic-information-cluster.xml @@ -23,6 +23,47 @@ limitations under the License. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Basic Information CHIP @@ -31,7 +72,7 @@ limitations under the License. This cluster provides attributes and events for determining basic information about Nodes, which supports both Commissioning and operational determination of Node characteristics, such as Vendor ID, Product ID and serial number, which apply to the whole Node. Also allows setting user device information such as location. - + DataModelRevision VendorName @@ -65,6 +106,7 @@ limitations under the License. Reachable UniqueID CapabilityMinima + ProductAppearance The StartUp event SHALL be emitted by a Node as soon as reasonable after completing a boot or reboot process. diff --git a/src/app/zap-templates/zcl/data-model/chip/bridged-device-basic-information.xml b/src/app/zap-templates/zcl/data-model/chip/bridged-device-basic-information.xml index 61e0cc011ad8d7..1179eb9ec5d44d 100644 --- a/src/app/zap-templates/zcl/data-model/chip/bridged-device-basic-information.xml +++ b/src/app/zap-templates/zcl/data-model/chip/bridged-device-basic-information.xml @@ -16,6 +16,48 @@ limitations under the License. --> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Bridged Device Basic Information CHIP @@ -44,6 +86,7 @@ limitations under the License. SerialNumber Reachable UniqueID + ProductAppearance The StartUp event SHALL be emitted by a Node as soon as reasonable after completing a boot or reboot process. diff --git a/src/app/zap-templates/zcl/zcl-with-test-extensions.json b/src/app/zap-templates/zcl/zcl-with-test-extensions.json index 31c0bdafb533bb..0630b770710483 100644 --- a/src/app/zap-templates/zcl/zcl-with-test-extensions.json +++ b/src/app/zap-templates/zcl/zcl-with-test-extensions.json @@ -139,7 +139,8 @@ "ProductLabel", "SerialNumber", "UniqueID", - "CapabilityMinima" + "CapabilityMinima", + "ProductAppearance" ], "Descriptor": ["ClusterRevision"], "Ethernet Network Diagnostics": [ diff --git a/src/app/zap-templates/zcl/zcl.json b/src/app/zap-templates/zcl/zcl.json index 989130f2ab0c88..a4908975f74213 100644 --- a/src/app/zap-templates/zcl/zcl.json +++ b/src/app/zap-templates/zcl/zcl.json @@ -137,7 +137,8 @@ "ProductLabel", "SerialNumber", "UniqueID", - "CapabilityMinima" + "CapabilityMinima", + "ProductAppearance" ], "Descriptor": ["ClusterRevision"], "Ethernet Network Diagnostics": [ diff --git a/src/controller/data_model/controller-clusters.matter b/src/controller/data_model/controller-clusters.matter index a77f66684da4c4..cf47d784ff7407 100644 --- a/src/controller/data_model/controller-clusters.matter +++ b/src/controller/data_model/controller-clusters.matter @@ -815,11 +815,49 @@ client cluster Actions = 37 { Commissioning and operational determination of Node characteristics, such as Vendor ID, Product ID and serial number, which apply to the whole Node. Also allows setting user device information such as location. */ client cluster BasicInformation = 40 { + enum ColorEnum : ENUM8 { + kBlack = 0; + kNavy = 1; + kGreen = 2; + kTeal = 3; + kMaroon = 4; + kPurple = 5; + kOlive = 6; + kGray = 7; + kBlue = 8; + kLime = 9; + kAqua = 10; + kRed = 11; + kFuchsia = 12; + kYellow = 13; + kWhite = 14; + kNickel = 15; + kChrome = 16; + kBrass = 17; + kCopper = 18; + kSilver = 19; + kGold = 20; + } + + enum ProductFinishEnum : ENUM8 { + kOther = 0; + kMatte = 1; + kSatin = 2; + kPolished = 3; + kRugged = 4; + kFabric = 5; + } + struct CapabilityMinimaStruct { int16u caseSessionsPerFabric = 0; int16u subscriptionsPerFabric = 1; } + struct ProductAppearanceStruct { + ProductFinishEnum finish = 0; + nullable ColorEnum primaryColor = 1; + } + critical event StartUp = 0 { INT32U softwareVersion = 0; } @@ -855,6 +893,7 @@ client cluster BasicInformation = 40 { readonly attribute optional boolean reachable = 17; readonly attribute optional char_string<32> uniqueID = 18; readonly attribute CapabilityMinimaStruct capabilityMinima = 19; + readonly attribute optional ProductAppearanceStruct productAppearance = 20; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -2038,6 +2077,44 @@ client cluster EthernetNetworkDiagnostics = 55 { collection of attributes that the Node MAY collect to aid in conveying information regarding the Bridged Device to a user, such as the vendor name, the model name, or user-assigned name. */ client cluster BridgedDeviceBasicInformation = 57 { + enum ColorEnum : ENUM8 { + kBlack = 0; + kNavy = 1; + kGreen = 2; + kTeal = 3; + kMaroon = 4; + kPurple = 5; + kOlive = 6; + kGray = 7; + kBlue = 8; + kLime = 9; + kAqua = 10; + kRed = 11; + kFuchsia = 12; + kYellow = 13; + kWhite = 14; + kNickel = 15; + kChrome = 16; + kBrass = 17; + kCopper = 18; + kSilver = 19; + kGold = 20; + } + + enum ProductFinishEnum : ENUM8 { + kOther = 0; + kMatte = 1; + kSatin = 2; + kPolished = 3; + kRugged = 4; + kFabric = 5; + } + + struct ProductAppearanceStruct { + ProductFinishEnum finish = 0; + nullable ColorEnum primaryColor = 1; + } + critical event StartUp = 0 { INT32U softwareVersion = 0; } @@ -2067,6 +2144,7 @@ client cluster BridgedDeviceBasicInformation = 57 { readonly attribute optional char_string<32> serialNumber = 15; readonly attribute boolean reachable = 17; readonly attribute optional char_string<32> uniqueID = 18; + readonly attribute optional ProductAppearanceStruct productAppearance = 20; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; diff --git a/src/controller/data_model/controller-clusters.zap b/src/controller/data_model/controller-clusters.zap index b9da13cdd78caf..841e8579296d87 100644 --- a/src/controller/data_model/controller-clusters.zap +++ b/src/controller/data_model/controller-clusters.zap @@ -3132,6 +3132,22 @@ "maxInterval": 65534, "reportableChange": 0 }, + { + "name": "ProductAppearance", + "code": 20, + "mfgCode": null, + "side": "server", + "type": "ProductAppearanceStruct", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "GeneratedCommandList", "code": 65528, diff --git a/src/controller/java/zap-generated/CHIPAttributeTLVValueDecoder.cpp b/src/controller/java/zap-generated/CHIPAttributeTLVValueDecoder.cpp index 4e02a196cc0db1..e4586c7b7a6a83 100644 --- a/src/controller/java/zap-generated/CHIPAttributeTLVValueDecoder.cpp +++ b/src/controller/java/zap-generated/CHIPAttributeTLVValueDecoder.cpp @@ -3100,6 +3100,56 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR value_caseSessionsPerFabric, value_subscriptionsPerFabric); return value; } + case Attributes::ProductAppearance::Id: { + using TypeInfo = Attributes::ProductAppearance::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + jobject value_finish; + std::string value_finishClassName = "java/lang/Integer"; + std::string value_finishCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(value_finishClassName.c_str(), + value_finishCtorSignature.c_str(), + static_cast(cppValue.finish), value_finish); + jobject value_primaryColor; + if (cppValue.primaryColor.IsNull()) + { + value_primaryColor = nullptr; + } + else + { + std::string value_primaryColorClassName = "java/lang/Integer"; + std::string value_primaryColorCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject( + value_primaryColorClassName.c_str(), value_primaryColorCtorSignature.c_str(), + static_cast(cppValue.primaryColor.Value()), value_primaryColor); + } + + jclass productAppearanceStructStructClass_0; + err = chip::JniReferences::GetInstance().GetClassRef( + env, "chip/devicecontroller/ChipStructs$BasicInformationClusterProductAppearanceStruct", + productAppearanceStructStructClass_0); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipStructs$BasicInformationClusterProductAppearanceStruct"); + return nullptr; + } + jmethodID productAppearanceStructStructCtor_0 = + env->GetMethodID(productAppearanceStructStructClass_0, "", "(Ljava/lang/Integer;Ljava/lang/Integer;)V"); + if (productAppearanceStructStructCtor_0 == nullptr) + { + ChipLogError(Zcl, "Could not find ChipStructs$BasicInformationClusterProductAppearanceStruct constructor"); + return nullptr; + } + + value = env->NewObject(productAppearanceStructStructClass_0, productAppearanceStructStructCtor_0, value_finish, + value_primaryColor); + return value; + } case Attributes::GeneratedCommandList::Id: { using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; @@ -8789,6 +8839,57 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(cppValue, value)); return value; } + case Attributes::ProductAppearance::Id: { + using TypeInfo = Attributes::ProductAppearance::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + jobject value_finish; + std::string value_finishClassName = "java/lang/Integer"; + std::string value_finishCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(value_finishClassName.c_str(), + value_finishCtorSignature.c_str(), + static_cast(cppValue.finish), value_finish); + jobject value_primaryColor; + if (cppValue.primaryColor.IsNull()) + { + value_primaryColor = nullptr; + } + else + { + std::string value_primaryColorClassName = "java/lang/Integer"; + std::string value_primaryColorCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject( + value_primaryColorClassName.c_str(), value_primaryColorCtorSignature.c_str(), + static_cast(cppValue.primaryColor.Value()), value_primaryColor); + } + + jclass productAppearanceStructStructClass_0; + err = chip::JniReferences::GetInstance().GetClassRef( + env, "chip/devicecontroller/ChipStructs$BridgedDeviceBasicInformationClusterProductAppearanceStruct", + productAppearanceStructStructClass_0); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipStructs$BridgedDeviceBasicInformationClusterProductAppearanceStruct"); + return nullptr; + } + jmethodID productAppearanceStructStructCtor_0 = + env->GetMethodID(productAppearanceStructStructClass_0, "", "(Ljava/lang/Integer;Ljava/lang/Integer;)V"); + if (productAppearanceStructStructCtor_0 == nullptr) + { + ChipLogError(Zcl, + "Could not find ChipStructs$BridgedDeviceBasicInformationClusterProductAppearanceStruct constructor"); + return nullptr; + } + + value = env->NewObject(productAppearanceStructStructClass_0, productAppearanceStructStructCtor_0, value_finish, + value_primaryColor); + return value; + } case Attributes::GeneratedCommandList::Id: { using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; diff --git a/src/controller/java/zap-generated/chip/devicecontroller/ChipIdLookup.java b/src/controller/java/zap-generated/chip/devicecontroller/ChipIdLookup.java index 3ec024468a2f3d..3a707bb8a5bad4 100644 --- a/src/controller/java/zap-generated/chip/devicecontroller/ChipIdLookup.java +++ b/src/controller/java/zap-generated/chip/devicecontroller/ChipIdLookup.java @@ -679,6 +679,9 @@ public static String attributeIdToName(long clusterId, long attributeId) { if (attributeId == 19L) { return "CapabilityMinima"; } + if (attributeId == 20L) { + return "ProductAppearance"; + } if (attributeId == 65528L) { return "GeneratedCommandList"; } @@ -1519,6 +1522,9 @@ public static String attributeIdToName(long clusterId, long attributeId) { if (attributeId == 18L) { return "UniqueID"; } + if (attributeId == 20L) { + return "ProductAppearance"; + } if (attributeId == 65528L) { return "GeneratedCommandList"; } diff --git a/src/controller/java/zap-generated/chip/devicecontroller/ChipStructs.java b/src/controller/java/zap-generated/chip/devicecontroller/ChipStructs.java index 56810ab1fb2871..e78e5c00913076 100644 --- a/src/controller/java/zap-generated/chip/devicecontroller/ChipStructs.java +++ b/src/controller/java/zap-generated/chip/devicecontroller/ChipStructs.java @@ -350,6 +350,31 @@ public String toString() { } } + public static class BasicInformationClusterProductAppearanceStruct { + public Integer finish; + public @Nullable Integer primaryColor; + + public BasicInformationClusterProductAppearanceStruct( + Integer finish, @Nullable Integer primaryColor) { + this.finish = finish; + this.primaryColor = primaryColor; + } + + @Override + public String toString() { + StringBuilder output = new StringBuilder(); + output.append("BasicInformationClusterProductAppearanceStruct {\n"); + output.append("\tfinish: "); + output.append(finish); + output.append("\n"); + output.append("\tprimaryColor: "); + output.append(primaryColor); + output.append("\n"); + output.append("}\n"); + return output.toString(); + } + } + public static class OtaSoftwareUpdateRequestorClusterProviderLocation { public Long providerNodeID; public Integer endpoint; @@ -1004,6 +1029,31 @@ public String toString() { } } + public static class BridgedDeviceBasicInformationClusterProductAppearanceStruct { + public Integer finish; + public @Nullable Integer primaryColor; + + public BridgedDeviceBasicInformationClusterProductAppearanceStruct( + Integer finish, @Nullable Integer primaryColor) { + this.finish = finish; + this.primaryColor = primaryColor; + } + + @Override + public String toString() { + StringBuilder output = new StringBuilder(); + output.append("BridgedDeviceBasicInformationClusterProductAppearanceStruct {\n"); + output.append("\tfinish: "); + output.append(finish); + output.append("\n"); + output.append("\tprimaryColor: "); + output.append(primaryColor); + output.append("\n"); + output.append("}\n"); + return output.toString(); + } + } + public static class OperationalCredentialsClusterFabricDescriptorStruct { public byte[] rootPublicKey; public Integer vendorID; diff --git a/src/controller/python/chip/clusters/CHIPClusters.py b/src/controller/python/chip/clusters/CHIPClusters.py index 63da4fe4764472..647fa2721d6ebb 100644 --- a/src/controller/python/chip/clusters/CHIPClusters.py +++ b/src/controller/python/chip/clusters/CHIPClusters.py @@ -1313,6 +1313,12 @@ class ChipClusters: "type": "", "reportable": True, }, + 0x00000014: { + "attributeName": "ProductAppearance", + "attributeId": 0x00000014, + "type": "", + "reportable": True, + }, 0x0000FFF8: { "attributeName": "GeneratedCommandList", "attributeId": 0x0000FFF8, @@ -3188,6 +3194,12 @@ class ChipClusters: "type": "str", "reportable": True, }, + 0x00000014: { + "attributeName": "ProductAppearance", + "attributeId": 0x00000014, + "type": "", + "reportable": True, + }, 0x0000FFF8: { "attributeName": "GeneratedCommandList", "attributeId": 0x0000FFF8, diff --git a/src/controller/python/chip/clusters/Objects.py b/src/controller/python/chip/clusters/Objects.py index 951c635ea4ebfa..224ef39d7564eb 100644 --- a/src/controller/python/chip/clusters/Objects.py +++ b/src/controller/python/chip/clusters/Objects.py @@ -4021,6 +4021,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="reachable", Tag=0x00000011, Type=typing.Optional[bool]), ClusterObjectFieldDescriptor(Label="uniqueID", Tag=0x00000012, Type=typing.Optional[str]), ClusterObjectFieldDescriptor(Label="capabilityMinima", Tag=0x00000013, Type=BasicInformation.Structs.CapabilityMinimaStruct), + ClusterObjectFieldDescriptor(Label="productAppearance", Tag=0x00000014, Type=typing.Optional[BasicInformation.Structs.ProductAppearanceStruct]), ClusterObjectFieldDescriptor(Label="generatedCommandList", Tag=0x0000FFF8, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="acceptedCommandList", Tag=0x0000FFF9, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="eventList", Tag=0x0000FFFA, Type=typing.List[uint]), @@ -4049,6 +4050,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: reachable: 'typing.Optional[bool]' = None uniqueID: 'typing.Optional[str]' = None capabilityMinima: 'BasicInformation.Structs.CapabilityMinimaStruct' = None + productAppearance: 'typing.Optional[BasicInformation.Structs.ProductAppearanceStruct]' = None generatedCommandList: 'typing.List[uint]' = None acceptedCommandList: 'typing.List[uint]' = None eventList: 'typing.List[uint]' = None @@ -4056,6 +4058,48 @@ def descriptor(cls) -> ClusterObjectDescriptor: featureMap: 'uint' = None clusterRevision: 'uint' = None + class Enums: + class ColorEnum(MatterIntEnum): + kBlack = 0x00 + kNavy = 0x01 + kGreen = 0x02 + kTeal = 0x03 + kMaroon = 0x04 + kPurple = 0x05 + kOlive = 0x06 + kGray = 0x07 + kBlue = 0x08 + kLime = 0x09 + kAqua = 0x0A + kRed = 0x0B + kFuchsia = 0x0C + kYellow = 0x0D + kWhite = 0x0E + kNickel = 0x0F + kChrome = 0x10 + kBrass = 0x11 + kCopper = 0x12 + kSilver = 0x13 + kGold = 0x14 + # All received enum values that are not listed above will be mapped + # to kUnknownEnumValue. This is a helper enum value that should only + # be used by code to process how it handles receiving and unknown + # enum value. This specific should never be transmitted. + kUnknownEnumValue = 21, + + class ProductFinishEnum(MatterIntEnum): + kOther = 0x00 + kMatte = 0x01 + kSatin = 0x02 + kPolished = 0x03 + kRugged = 0x04 + kFabric = 0x05 + # All received enum values that are not listed above will be mapped + # to kUnknownEnumValue. This is a helper enum value that should only + # be used by code to process how it handles receiving and unknown + # enum value. This specific should never be transmitted. + kUnknownEnumValue = 6, + class Structs: @dataclass class CapabilityMinimaStruct(ClusterObject): @@ -4070,6 +4114,19 @@ def descriptor(cls) -> ClusterObjectDescriptor: caseSessionsPerFabric: 'uint' = 0 subscriptionsPerFabric: 'uint' = 0 + @dataclass + class ProductAppearanceStruct(ClusterObject): + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="finish", Tag=0, Type=BasicInformation.Enums.ProductFinishEnum), + ClusterObjectFieldDescriptor(Label="primaryColor", Tag=1, Type=typing.Union[Nullable, BasicInformation.Enums.ColorEnum]), + ]) + + finish: 'BasicInformation.Enums.ProductFinishEnum' = 0 + primaryColor: 'typing.Union[Nullable, BasicInformation.Enums.ColorEnum]' = NullValue + class Commands: @dataclass class MfgSpecificPing(ClusterCommand): @@ -4405,6 +4462,22 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: value: 'BasicInformation.Structs.CapabilityMinimaStruct' = field(default_factory=lambda: BasicInformation.Structs.CapabilityMinimaStruct()) + @dataclass + class ProductAppearance(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x0028 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x00000014 + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.Optional[BasicInformation.Structs.ProductAppearanceStruct]) + + value: 'typing.Optional[BasicInformation.Structs.ProductAppearanceStruct]' = None + @dataclass class GeneratedCommandList(ClusterAttributeDescriptor): @ChipUtility.classproperty @@ -11364,6 +11437,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="serialNumber", Tag=0x0000000F, Type=typing.Optional[str]), ClusterObjectFieldDescriptor(Label="reachable", Tag=0x00000011, Type=bool), ClusterObjectFieldDescriptor(Label="uniqueID", Tag=0x00000012, Type=typing.Optional[str]), + ClusterObjectFieldDescriptor(Label="productAppearance", Tag=0x00000014, Type=typing.Optional[BridgedDeviceBasicInformation.Structs.ProductAppearanceStruct]), ClusterObjectFieldDescriptor(Label="generatedCommandList", Tag=0x0000FFF8, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="acceptedCommandList", Tag=0x0000FFF9, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="eventList", Tag=0x0000FFFA, Type=typing.List[uint]), @@ -11387,6 +11461,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: serialNumber: 'typing.Optional[str]' = None reachable: 'bool' = None uniqueID: 'typing.Optional[str]' = None + productAppearance: 'typing.Optional[BridgedDeviceBasicInformation.Structs.ProductAppearanceStruct]' = None generatedCommandList: 'typing.List[uint]' = None acceptedCommandList: 'typing.List[uint]' = None eventList: 'typing.List[uint]' = None @@ -11394,6 +11469,62 @@ def descriptor(cls) -> ClusterObjectDescriptor: featureMap: 'uint' = None clusterRevision: 'uint' = None + class Enums: + class ColorEnum(MatterIntEnum): + kBlack = 0x00 + kNavy = 0x01 + kGreen = 0x02 + kTeal = 0x03 + kMaroon = 0x04 + kPurple = 0x05 + kOlive = 0x06 + kGray = 0x07 + kBlue = 0x08 + kLime = 0x09 + kAqua = 0x0A + kRed = 0x0B + kFuchsia = 0x0C + kYellow = 0x0D + kWhite = 0x0E + kNickel = 0x0F + kChrome = 0x10 + kBrass = 0x11 + kCopper = 0x12 + kSilver = 0x13 + kGold = 0x14 + # All received enum values that are not listed above will be mapped + # to kUnknownEnumValue. This is a helper enum value that should only + # be used by code to process how it handles receiving and unknown + # enum value. This specific should never be transmitted. + kUnknownEnumValue = 21, + + class ProductFinishEnum(MatterIntEnum): + kOther = 0x00 + kMatte = 0x01 + kSatin = 0x02 + kPolished = 0x03 + kRugged = 0x04 + kFabric = 0x05 + # All received enum values that are not listed above will be mapped + # to kUnknownEnumValue. This is a helper enum value that should only + # be used by code to process how it handles receiving and unknown + # enum value. This specific should never be transmitted. + kUnknownEnumValue = 6, + + class Structs: + @dataclass + class ProductAppearanceStruct(ClusterObject): + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="finish", Tag=0, Type=BridgedDeviceBasicInformation.Enums.ProductFinishEnum), + ClusterObjectFieldDescriptor(Label="primaryColor", Tag=1, Type=typing.Union[Nullable, BridgedDeviceBasicInformation.Enums.ColorEnum]), + ]) + + finish: 'BridgedDeviceBasicInformation.Enums.ProductFinishEnum' = 0 + primaryColor: 'typing.Union[Nullable, BridgedDeviceBasicInformation.Enums.ColorEnum]' = NullValue + class Attributes: @dataclass class VendorName(ClusterAttributeDescriptor): @@ -11635,6 +11766,22 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: value: 'typing.Optional[str]' = None + @dataclass + class ProductAppearance(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x0039 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x00000014 + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.Optional[BridgedDeviceBasicInformation.Structs.ProductAppearanceStruct]) + + value: 'typing.Optional[BridgedDeviceBasicInformation.Structs.ProductAppearanceStruct]' = None + @dataclass class GeneratedCommandList(ClusterAttributeDescriptor): @ChipUtility.classproperty diff --git a/src/darwin/Framework/CHIP/templates/availability.yaml b/src/darwin/Framework/CHIP/templates/availability.yaml index 6727e5bff1861b..33e51e15d8e722 100644 --- a/src/darwin/Framework/CHIP/templates/availability.yaml +++ b/src/darwin/Framework/CHIP/templates/availability.yaml @@ -7024,6 +7024,93 @@ - release: "TBD" versions: "future" introduced: + attributes: + BasicInformation: + - ProductAppearance + BridgedDeviceBasicInformation: + - ProductAppearance + structs: + BasicInformation: + - ProductAppearanceStruct + BridgedDeviceBasicInformation: + - ProductAppearanceStruct + struct fields: + BasicInformation: + ProductAppearanceStruct: + - finish + - primaryColor + BridgedDeviceBasicInformation: + ProductAppearanceStruct: + - finish + - primaryColor + enums: + BasicInformation: + - ColorEnum + - ProductFinishEnum + BridgedDeviceBasicInformation: + - ColorEnum + - ProductFinishEnum + enum values: + BasicInformation: + ColorEnum: + - Black + - Navy + - Green + - Teal + - Maroon + - Purple + - Olive + - Gray + - Blue + - Lime + - Aqua + - Red + - Fuchsia + - Yellow + - White + - Nickel + - Chrome + - Brass + - Copper + - Silver + - Gold + ProductFinishEnum: + - Matte + - Satin + - Polished + - Rugged + - Fabric + - Other + BridgedDeviceBasicInformation: + ColorEnum: + - Black + - Navy + - Green + - Teal + - Maroon + - Purple + - Olive + - Gray + - Blue + - Lime + - Aqua + - Red + - Fuchsia + - Yellow + - White + - Nickel + - Chrome + - Brass + - Copper + - Silver + - Gold + ProductFinishEnum: + - Matte + - Satin + - Polished + - Rugged + - Fabric + - Other bitmaps: Groups: - GroupsFeature @@ -7060,6 +7147,30 @@ - PressureFeature PumpConfigurationAndControl: - PumpFeature + removed: + attributes: + # The ProductAppearance bits never happened for the old Basic and + # BridgedDeviceBasic cluster names. + Basic: + - ProductAppearance + BridgedDeviceBasic: + - ProductAppearance + structs: + # The ProductAppearance bits never happened for the old Basic and + # BridgedDeviceBasic cluster names. + Basic: + - ProductAppearanceStruct + BridgedDeviceBasic: + - ProductAppearanceStruct + enums: + # The ProductAppearance bits never happened for the old Basic and + # BridgedDeviceBasic cluster names. + Basic: + - ProductFinishEnum + - ColorEnum + BridgedDeviceBasic: + - ProductFinishEnum + - ColorEnum renames: bitmaps: Groups: diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRAttributeTLVValueDecoder.mm b/src/darwin/Framework/CHIP/zap-generated/MTRAttributeTLVValueDecoder.mm index 568ea996ca72d5..c656e1f7c89e5d 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRAttributeTLVValueDecoder.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRAttributeTLVValueDecoder.mm @@ -2307,6 +2307,23 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & value.subscriptionsPerFabric = [NSNumber numberWithUnsignedShort:cppValue.subscriptionsPerFabric]; return value; } + case Attributes::ProductAppearance::Id: { + using TypeInfo = Attributes::ProductAppearance::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + MTRBasicInformationClusterProductAppearanceStruct * _Nonnull value; + value = [MTRBasicInformationClusterProductAppearanceStruct new]; + value.finish = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue.finish)]; + if (cppValue.primaryColor.IsNull()) { + value.primaryColor = nil; + } else { + value.primaryColor = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue.primaryColor.Value())]; + } + return value; + } case Attributes::GeneratedCommandList::Id: { using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; @@ -6450,6 +6467,23 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & value = [[NSString alloc] initWithBytes:cppValue.data() length:cppValue.size() encoding:NSUTF8StringEncoding]; return value; } + case Attributes::ProductAppearance::Id: { + using TypeInfo = Attributes::ProductAppearance::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + MTRBridgedDeviceBasicInformationClusterProductAppearanceStruct * _Nonnull value; + value = [MTRBridgedDeviceBasicInformationClusterProductAppearanceStruct new]; + value.finish = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue.finish)]; + if (cppValue.primaryColor.IsNull()) { + value.primaryColor = nil; + } else { + value.primaryColor = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue.primaryColor.Value())]; + } + return value; + } case Attributes::GeneratedCommandList::Id: { using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h index c2960dafd0aad1..f55d7231050d42 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h @@ -2400,6 +2400,19 @@ API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)readAttributeProductAppearanceWithCompletion:(void (^)(MTRBasicInformationClusterProductAppearanceStruct * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; +- (void)subscribeAttributeProductAppearanceWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(MTRBasicInformationClusterProductAppearanceStruct * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; ++ (void)readAttributeProductAppearanceWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(MTRBasicInformationClusterProductAppearanceStruct * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; + - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams *)params @@ -6174,6 +6187,24 @@ API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) completion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)readAttributeProductAppearanceWithCompletion: + (void (^)(MTRBridgedDeviceBasicInformationClusterProductAppearanceStruct * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; +- (void)subscribeAttributeProductAppearanceWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)( + MTRBridgedDeviceBasicInformationClusterProductAppearanceStruct * _Nullable value, + NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; ++ (void) + readAttributeProductAppearanceWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)( + MTRBridgedDeviceBasicInformationClusterProductAppearanceStruct * _Nullable value, + NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; + - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams *)params @@ -18985,6 +19016,39 @@ typedef NS_OPTIONS(uint16_t, MTRActionsCommandBits) { MTRActionsCommandBitsDisableActionWithDuration API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x800, } API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +typedef NS_ENUM(uint8_t, MTRBasicInformationColor) { + MTRBasicInformationColorBlack MTR_NEWLY_AVAILABLE = 0x00, + MTRBasicInformationColorNavy MTR_NEWLY_AVAILABLE = 0x01, + MTRBasicInformationColorGreen MTR_NEWLY_AVAILABLE = 0x02, + MTRBasicInformationColorTeal MTR_NEWLY_AVAILABLE = 0x03, + MTRBasicInformationColorMaroon MTR_NEWLY_AVAILABLE = 0x04, + MTRBasicInformationColorPurple MTR_NEWLY_AVAILABLE = 0x05, + MTRBasicInformationColorOlive MTR_NEWLY_AVAILABLE = 0x06, + MTRBasicInformationColorGray MTR_NEWLY_AVAILABLE = 0x07, + MTRBasicInformationColorBlue MTR_NEWLY_AVAILABLE = 0x08, + MTRBasicInformationColorLime MTR_NEWLY_AVAILABLE = 0x09, + MTRBasicInformationColorAqua MTR_NEWLY_AVAILABLE = 0x0A, + MTRBasicInformationColorRed MTR_NEWLY_AVAILABLE = 0x0B, + MTRBasicInformationColorFuchsia MTR_NEWLY_AVAILABLE = 0x0C, + MTRBasicInformationColorYellow MTR_NEWLY_AVAILABLE = 0x0D, + MTRBasicInformationColorWhite MTR_NEWLY_AVAILABLE = 0x0E, + MTRBasicInformationColorNickel MTR_NEWLY_AVAILABLE = 0x0F, + MTRBasicInformationColorChrome MTR_NEWLY_AVAILABLE = 0x10, + MTRBasicInformationColorBrass MTR_NEWLY_AVAILABLE = 0x11, + MTRBasicInformationColorCopper MTR_NEWLY_AVAILABLE = 0x12, + MTRBasicInformationColorSilver MTR_NEWLY_AVAILABLE = 0x13, + MTRBasicInformationColorGold MTR_NEWLY_AVAILABLE = 0x14, +} MTR_NEWLY_AVAILABLE; + +typedef NS_ENUM(uint8_t, MTRBasicInformationProductFinish) { + MTRBasicInformationProductFinishOther MTR_NEWLY_AVAILABLE = 0x00, + MTRBasicInformationProductFinishMatte MTR_NEWLY_AVAILABLE = 0x01, + MTRBasicInformationProductFinishSatin MTR_NEWLY_AVAILABLE = 0x02, + MTRBasicInformationProductFinishPolished MTR_NEWLY_AVAILABLE = 0x03, + MTRBasicInformationProductFinishRugged MTR_NEWLY_AVAILABLE = 0x04, + MTRBasicInformationProductFinishFabric MTR_NEWLY_AVAILABLE = 0x05, +} MTR_NEWLY_AVAILABLE; + typedef NS_ENUM(uint8_t, MTROTASoftwareUpdateProviderOTAApplyUpdateAction) { MTROTASoftwareUpdateProviderOTAApplyUpdateActionProceed API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00, MTROTASoftwareUpdateProviderOTAApplyUpdateActionAwaitNextAction API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) @@ -19926,6 +19990,39 @@ typedef NS_ENUM(uint8_t, MTRTimeSynchronizationTimeSource) { MTRTimeSynchronizationTimeSourceGnss API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x10, } API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +typedef NS_ENUM(uint8_t, MTRBridgedDeviceBasicInformationColor) { + MTRBridgedDeviceBasicInformationColorBlack MTR_NEWLY_AVAILABLE = 0x00, + MTRBridgedDeviceBasicInformationColorNavy MTR_NEWLY_AVAILABLE = 0x01, + MTRBridgedDeviceBasicInformationColorGreen MTR_NEWLY_AVAILABLE = 0x02, + MTRBridgedDeviceBasicInformationColorTeal MTR_NEWLY_AVAILABLE = 0x03, + MTRBridgedDeviceBasicInformationColorMaroon MTR_NEWLY_AVAILABLE = 0x04, + MTRBridgedDeviceBasicInformationColorPurple MTR_NEWLY_AVAILABLE = 0x05, + MTRBridgedDeviceBasicInformationColorOlive MTR_NEWLY_AVAILABLE = 0x06, + MTRBridgedDeviceBasicInformationColorGray MTR_NEWLY_AVAILABLE = 0x07, + MTRBridgedDeviceBasicInformationColorBlue MTR_NEWLY_AVAILABLE = 0x08, + MTRBridgedDeviceBasicInformationColorLime MTR_NEWLY_AVAILABLE = 0x09, + MTRBridgedDeviceBasicInformationColorAqua MTR_NEWLY_AVAILABLE = 0x0A, + MTRBridgedDeviceBasicInformationColorRed MTR_NEWLY_AVAILABLE = 0x0B, + MTRBridgedDeviceBasicInformationColorFuchsia MTR_NEWLY_AVAILABLE = 0x0C, + MTRBridgedDeviceBasicInformationColorYellow MTR_NEWLY_AVAILABLE = 0x0D, + MTRBridgedDeviceBasicInformationColorWhite MTR_NEWLY_AVAILABLE = 0x0E, + MTRBridgedDeviceBasicInformationColorNickel MTR_NEWLY_AVAILABLE = 0x0F, + MTRBridgedDeviceBasicInformationColorChrome MTR_NEWLY_AVAILABLE = 0x10, + MTRBridgedDeviceBasicInformationColorBrass MTR_NEWLY_AVAILABLE = 0x11, + MTRBridgedDeviceBasicInformationColorCopper MTR_NEWLY_AVAILABLE = 0x12, + MTRBridgedDeviceBasicInformationColorSilver MTR_NEWLY_AVAILABLE = 0x13, + MTRBridgedDeviceBasicInformationColorGold MTR_NEWLY_AVAILABLE = 0x14, +} MTR_NEWLY_AVAILABLE; + +typedef NS_ENUM(uint8_t, MTRBridgedDeviceBasicInformationProductFinish) { + MTRBridgedDeviceBasicInformationProductFinishOther MTR_NEWLY_AVAILABLE = 0x00, + MTRBridgedDeviceBasicInformationProductFinishMatte MTR_NEWLY_AVAILABLE = 0x01, + MTRBridgedDeviceBasicInformationProductFinishSatin MTR_NEWLY_AVAILABLE = 0x02, + MTRBridgedDeviceBasicInformationProductFinishPolished MTR_NEWLY_AVAILABLE = 0x03, + MTRBridgedDeviceBasicInformationProductFinishRugged MTR_NEWLY_AVAILABLE = 0x04, + MTRBridgedDeviceBasicInformationProductFinishFabric MTR_NEWLY_AVAILABLE = 0x05, +} MTR_NEWLY_AVAILABLE; + typedef NS_OPTIONS(uint32_t, MTRSwitchFeature) { MTRSwitchFeatureLatchingSwitch API_AVAILABLE(ios(16.2), macos(13.1), watchos(9.2), tvos(16.2)) = 0x1, MTRSwitchFeatureMomentarySwitch API_AVAILABLE(ios(16.2), macos(13.1), watchos(9.2), tvos(16.2)) = 0x2, diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm index 86a9e2d3c69d75..9feecb955c4311 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm @@ -14127,6 +14127,54 @@ + (void)readAttributeCapabilityMinimaWithClusterStateCache:(MTRClusterStateCache }); } +- (void)readAttributeProductAppearanceWithCompletion:(void (^)(MTRBasicInformationClusterProductAppearanceStruct * _Nullable value, + NSError * _Nullable error))completion +{ + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = BasicInformation::Attributes::ProductAppearance::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); +} + +- (void)subscribeAttributeProductAppearanceWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(MTRBasicInformationClusterProductAppearanceStruct * _Nullable value, + NSError * _Nullable error))reportHandler +{ + using TypeInfo = BasicInformation::Attributes::ProductAppearance::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, + self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); +} + ++ (void)readAttributeProductAppearanceWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(MTRBasicInformationClusterProductAppearanceStruct * _Nullable value, + NSError * _Nullable error))completion +{ + auto * bridge = new MTRBasicInformationProductAppearanceStructAttributeCallbackBridge(queue, completion); + std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, + ^(BasicInformationProductAppearanceStructAttributeCallback successCb, MTRErrorCallback failureCb) { + if (clusterStateCacheContainer.cppClusterStateCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = BasicInformation::Attributes::ProductAppearance::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + if (err == CHIP_NO_ERROR) { + successCb(bridge, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; @@ -38083,6 +38131,59 @@ + (void)readAttributeUniqueIDWithClusterStateCache:(MTRClusterStateCacheContaine }); } +- (void)readAttributeProductAppearanceWithCompletion: + (void (^)( + MTRBridgedDeviceBasicInformationClusterProductAppearanceStruct * _Nullable value, NSError * _Nullable error))completion +{ + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = BridgedDeviceBasicInformation::Attributes::ProductAppearance::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); +} + +- (void)subscribeAttributeProductAppearanceWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)( + MTRBridgedDeviceBasicInformationClusterProductAppearanceStruct * _Nullable value, + NSError * _Nullable error))reportHandler +{ + using TypeInfo = BridgedDeviceBasicInformation::Attributes::ProductAppearance::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, + reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); +} + ++ (void) + readAttributeProductAppearanceWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)( + MTRBridgedDeviceBasicInformationClusterProductAppearanceStruct * _Nullable value, + NSError * _Nullable error))completion +{ + auto * bridge = new MTRBridgedDeviceBasicInformationProductAppearanceStructAttributeCallbackBridge(queue, completion); + std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, + ^(BridgedDeviceBasicInformationProductAppearanceStructAttributeCallback successCb, MTRErrorCallback failureCb) { + if (clusterStateCacheContainer.cppClusterStateCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = BridgedDeviceBasicInformation::Attributes::ProductAppearance::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + if (err == CHIP_NO_ERROR) { + successCb(bridge, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRCallbackBridge.h b/src/darwin/Framework/CHIP/zap-generated/MTRCallbackBridge.h index f3a7deead776d0..ac61e7fc8f2ddb 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRCallbackBridge.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRCallbackBridge.h @@ -191,6 +191,13 @@ typedef void (*NullableActionsClusterActionTypeEnumAttributeCallback)( typedef void (*ActionsClusterEndpointListTypeEnumAttributeCallback)(void *, chip::app::Clusters::Actions::EndpointListTypeEnum); typedef void (*NullableActionsClusterEndpointListTypeEnumAttributeCallback)( void *, const chip::app::DataModel::Nullable &); +typedef void (*BasicInformationClusterColorEnumAttributeCallback)(void *, chip::app::Clusters::BasicInformation::ColorEnum); +typedef void (*NullableBasicInformationClusterColorEnumAttributeCallback)( + void *, const chip::app::DataModel::Nullable &); +typedef void (*BasicInformationClusterProductFinishEnumAttributeCallback)(void *, + chip::app::Clusters::BasicInformation::ProductFinishEnum); +typedef void (*NullableBasicInformationClusterProductFinishEnumAttributeCallback)( + void *, const chip::app::DataModel::Nullable &); typedef void (*OTASoftwareUpdateProviderClusterOTAApplyUpdateActionAttributeCallback)( void *, chip::app::Clusters::OtaSoftwareUpdateProvider::OTAApplyUpdateAction); typedef void (*NullableOTASoftwareUpdateProviderClusterOTAApplyUpdateActionAttributeCallback)( @@ -346,6 +353,14 @@ typedef void (*TimeSynchronizationClusterTimeSourceEnumAttributeCallback)(void * chip::app::Clusters::TimeSynchronization::TimeSourceEnum); typedef void (*NullableTimeSynchronizationClusterTimeSourceEnumAttributeCallback)( void *, const chip::app::DataModel::Nullable &); +typedef void (*BridgedDeviceBasicInformationClusterColorEnumAttributeCallback)( + void *, chip::app::Clusters::BridgedDeviceBasicInformation::ColorEnum); +typedef void (*NullableBridgedDeviceBasicInformationClusterColorEnumAttributeCallback)( + void *, const chip::app::DataModel::Nullable &); +typedef void (*BridgedDeviceBasicInformationClusterProductFinishEnumAttributeCallback)( + void *, chip::app::Clusters::BridgedDeviceBasicInformation::ProductFinishEnum); +typedef void (*NullableBridgedDeviceBasicInformationClusterProductFinishEnumAttributeCallback)( + void *, const chip::app::DataModel::Nullable &); typedef void (*AdministratorCommissioningClusterCommissioningWindowStatusEnumAttributeCallback)( void *, chip::app::Clusters::AdministratorCommissioning::CommissioningWindowStatusEnum); typedef void (*NullableAdministratorCommissioningClusterCommissioningWindowStatusEnumAttributeCallback)( @@ -644,6 +659,8 @@ typedef void (*ActionsAttributeListListAttributeCallback)(void * context, const chip::app::DataModel::DecodableList & data); typedef void (*BasicInformationCapabilityMinimaStructAttributeCallback)( void *, const chip::app::Clusters::BasicInformation::Structs::CapabilityMinimaStruct::DecodableType &); +typedef void (*BasicInformationProductAppearanceStructAttributeCallback)( + void *, const chip::app::Clusters::BasicInformation::Structs::ProductAppearanceStruct::DecodableType &); typedef void (*BasicInformationGeneratedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); typedef void (*BasicInformationAcceptedCommandListListAttributeCallback)( @@ -794,6 +811,8 @@ typedef void (*EthernetNetworkDiagnosticsAcceptedCommandListListAttributeCallbac void * context, const chip::app::DataModel::DecodableList & data); typedef void (*EthernetNetworkDiagnosticsAttributeListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); +typedef void (*BridgedDeviceBasicInformationProductAppearanceStructAttributeCallback)( + void *, const chip::app::Clusters::BridgedDeviceBasicInformation::Structs::ProductAppearanceStruct::DecodableType &); typedef void (*BridgedDeviceBasicInformationGeneratedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); typedef void (*BridgedDeviceBasicInformationAcceptedCommandListListAttributeCallback)( @@ -3389,6 +3408,40 @@ class MTRBasicInformationCapabilityMinimaStructAttributeCallbackSubscriptionBrid MTRSubscriptionEstablishedHandler mEstablishedHandler; }; +class MTRBasicInformationProductAppearanceStructAttributeCallbackBridge + : public MTRCallbackBridge +{ +public: + MTRBasicInformationProductAppearanceStructAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; + + MTRBasicInformationProductAppearanceStructAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + + static void OnSuccessFn(void * context, + const chip::app::Clusters::BasicInformation::Structs::ProductAppearanceStruct::DecodableType & value); +}; + +class MTRBasicInformationProductAppearanceStructAttributeCallbackSubscriptionBridge + : public MTRBasicInformationProductAppearanceStructAttributeCallbackBridge +{ +public: + MTRBasicInformationProductAppearanceStructAttributeCallbackSubscriptionBridge( + dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : + MTRBasicInformationProductAppearanceStructAttributeCallbackBridge(queue, handler, action), + mEstablishedHandler(establishedHandler) + {} + + void OnSubscriptionEstablished(); + using MTRBasicInformationProductAppearanceStructAttributeCallbackBridge::KeepAliveOnCallback; + using MTRBasicInformationProductAppearanceStructAttributeCallbackBridge::OnDone; + +private: + MTRSubscriptionEstablishedHandler mEstablishedHandler; +}; + class MTRBasicInformationGeneratedCommandListListAttributeCallbackBridge : public MTRCallbackBridge { @@ -5645,6 +5698,43 @@ class MTREthernetNetworkDiagnosticsAttributeListListAttributeCallbackSubscriptio MTRSubscriptionEstablishedHandler mEstablishedHandler; }; +class MTRBridgedDeviceBasicInformationProductAppearanceStructAttributeCallbackBridge + : public MTRCallbackBridge +{ +public: + MTRBridgedDeviceBasicInformationProductAppearanceStructAttributeCallbackBridge(dispatch_queue_t queue, + ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; + + MTRBridgedDeviceBasicInformationProductAppearanceStructAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, + OnSuccessFn){}; + + static void + OnSuccessFn(void * context, + const chip::app::Clusters::BridgedDeviceBasicInformation::Structs::ProductAppearanceStruct::DecodableType & value); +}; + +class MTRBridgedDeviceBasicInformationProductAppearanceStructAttributeCallbackSubscriptionBridge + : public MTRBridgedDeviceBasicInformationProductAppearanceStructAttributeCallbackBridge +{ +public: + MTRBridgedDeviceBasicInformationProductAppearanceStructAttributeCallbackSubscriptionBridge( + dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : + MTRBridgedDeviceBasicInformationProductAppearanceStructAttributeCallbackBridge(queue, handler, action), + mEstablishedHandler(establishedHandler) + {} + + void OnSubscriptionEstablished(); + using MTRBridgedDeviceBasicInformationProductAppearanceStructAttributeCallbackBridge::KeepAliveOnCallback; + using MTRBridgedDeviceBasicInformationProductAppearanceStructAttributeCallbackBridge::OnDone; + +private: + MTRSubscriptionEstablishedHandler mEstablishedHandler; +}; + class MTRBridgedDeviceBasicInformationGeneratedCommandListListAttributeCallbackBridge : public MTRCallbackBridge { @@ -12811,6 +12901,140 @@ class MTRNullableActionsClusterEndpointListTypeEnumAttributeCallbackSubscription MTRSubscriptionEstablishedHandler mEstablishedHandler; }; +class MTRBasicInformationClusterColorEnumAttributeCallbackBridge + : public MTRCallbackBridge +{ +public: + MTRBasicInformationClusterColorEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; + + MTRBasicInformationClusterColorEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + + static void OnSuccessFn(void * context, chip::app::Clusters::BasicInformation::ColorEnum value); +}; + +class MTRBasicInformationClusterColorEnumAttributeCallbackSubscriptionBridge + : public MTRBasicInformationClusterColorEnumAttributeCallbackBridge +{ +public: + MTRBasicInformationClusterColorEnumAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : + MTRBasicInformationClusterColorEnumAttributeCallbackBridge(queue, handler, action), + mEstablishedHandler(establishedHandler) + {} + + void OnSubscriptionEstablished(); + using MTRBasicInformationClusterColorEnumAttributeCallbackBridge::KeepAliveOnCallback; + using MTRBasicInformationClusterColorEnumAttributeCallbackBridge::OnDone; + +private: + MTRSubscriptionEstablishedHandler mEstablishedHandler; +}; + +class MTRNullableBasicInformationClusterColorEnumAttributeCallbackBridge + : public MTRCallbackBridge +{ +public: + MTRNullableBasicInformationClusterColorEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; + + MTRNullableBasicInformationClusterColorEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + + static void OnSuccessFn(void * context, + const chip::app::DataModel::Nullable & value); +}; + +class MTRNullableBasicInformationClusterColorEnumAttributeCallbackSubscriptionBridge + : public MTRNullableBasicInformationClusterColorEnumAttributeCallbackBridge +{ +public: + MTRNullableBasicInformationClusterColorEnumAttributeCallbackSubscriptionBridge( + dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : + MTRNullableBasicInformationClusterColorEnumAttributeCallbackBridge(queue, handler, action), + mEstablishedHandler(establishedHandler) + {} + + void OnSubscriptionEstablished(); + using MTRNullableBasicInformationClusterColorEnumAttributeCallbackBridge::KeepAliveOnCallback; + using MTRNullableBasicInformationClusterColorEnumAttributeCallbackBridge::OnDone; + +private: + MTRSubscriptionEstablishedHandler mEstablishedHandler; +}; + +class MTRBasicInformationClusterProductFinishEnumAttributeCallbackBridge + : public MTRCallbackBridge +{ +public: + MTRBasicInformationClusterProductFinishEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; + + MTRBasicInformationClusterProductFinishEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + + static void OnSuccessFn(void * context, chip::app::Clusters::BasicInformation::ProductFinishEnum value); +}; + +class MTRBasicInformationClusterProductFinishEnumAttributeCallbackSubscriptionBridge + : public MTRBasicInformationClusterProductFinishEnumAttributeCallbackBridge +{ +public: + MTRBasicInformationClusterProductFinishEnumAttributeCallbackSubscriptionBridge( + dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : + MTRBasicInformationClusterProductFinishEnumAttributeCallbackBridge(queue, handler, action), + mEstablishedHandler(establishedHandler) + {} + + void OnSubscriptionEstablished(); + using MTRBasicInformationClusterProductFinishEnumAttributeCallbackBridge::KeepAliveOnCallback; + using MTRBasicInformationClusterProductFinishEnumAttributeCallbackBridge::OnDone; + +private: + MTRSubscriptionEstablishedHandler mEstablishedHandler; +}; + +class MTRNullableBasicInformationClusterProductFinishEnumAttributeCallbackBridge + : public MTRCallbackBridge +{ +public: + MTRNullableBasicInformationClusterProductFinishEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; + + MTRNullableBasicInformationClusterProductFinishEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + + static void OnSuccessFn(void * context, + const chip::app::DataModel::Nullable & value); +}; + +class MTRNullableBasicInformationClusterProductFinishEnumAttributeCallbackSubscriptionBridge + : public MTRNullableBasicInformationClusterProductFinishEnumAttributeCallbackBridge +{ +public: + MTRNullableBasicInformationClusterProductFinishEnumAttributeCallbackSubscriptionBridge( + dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : + MTRNullableBasicInformationClusterProductFinishEnumAttributeCallbackBridge(queue, handler, action), + mEstablishedHandler(establishedHandler) + {} + + void OnSubscriptionEstablished(); + using MTRNullableBasicInformationClusterProductFinishEnumAttributeCallbackBridge::KeepAliveOnCallback; + using MTRNullableBasicInformationClusterProductFinishEnumAttributeCallbackBridge::OnDone; + +private: + MTRSubscriptionEstablishedHandler mEstablishedHandler; +}; + class MTROTASoftwareUpdateProviderClusterOTAApplyUpdateActionAttributeCallbackBridge : public MTRCallbackBridge { @@ -15664,6 +15888,150 @@ class MTRNullableTimeSynchronizationClusterTimeSourceEnumAttributeCallbackSubscr MTRSubscriptionEstablishedHandler mEstablishedHandler; }; +class MTRBridgedDeviceBasicInformationClusterColorEnumAttributeCallbackBridge + : public MTRCallbackBridge +{ +public: + MTRBridgedDeviceBasicInformationClusterColorEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; + + MTRBridgedDeviceBasicInformationClusterColorEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + + static void OnSuccessFn(void * context, chip::app::Clusters::BridgedDeviceBasicInformation::ColorEnum value); +}; + +class MTRBridgedDeviceBasicInformationClusterColorEnumAttributeCallbackSubscriptionBridge + : public MTRBridgedDeviceBasicInformationClusterColorEnumAttributeCallbackBridge +{ +public: + MTRBridgedDeviceBasicInformationClusterColorEnumAttributeCallbackSubscriptionBridge( + dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : + MTRBridgedDeviceBasicInformationClusterColorEnumAttributeCallbackBridge(queue, handler, action), + mEstablishedHandler(establishedHandler) + {} + + void OnSubscriptionEstablished(); + using MTRBridgedDeviceBasicInformationClusterColorEnumAttributeCallbackBridge::KeepAliveOnCallback; + using MTRBridgedDeviceBasicInformationClusterColorEnumAttributeCallbackBridge::OnDone; + +private: + MTRSubscriptionEstablishedHandler mEstablishedHandler; +}; + +class MTRNullableBridgedDeviceBasicInformationClusterColorEnumAttributeCallbackBridge + : public MTRCallbackBridge +{ +public: + MTRNullableBridgedDeviceBasicInformationClusterColorEnumAttributeCallbackBridge(dispatch_queue_t queue, + ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; + + MTRNullableBridgedDeviceBasicInformationClusterColorEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, + OnSuccessFn){}; + + static void + OnSuccessFn(void * context, + const chip::app::DataModel::Nullable & value); +}; + +class MTRNullableBridgedDeviceBasicInformationClusterColorEnumAttributeCallbackSubscriptionBridge + : public MTRNullableBridgedDeviceBasicInformationClusterColorEnumAttributeCallbackBridge +{ +public: + MTRNullableBridgedDeviceBasicInformationClusterColorEnumAttributeCallbackSubscriptionBridge( + dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : + MTRNullableBridgedDeviceBasicInformationClusterColorEnumAttributeCallbackBridge(queue, handler, action), + mEstablishedHandler(establishedHandler) + {} + + void OnSubscriptionEstablished(); + using MTRNullableBridgedDeviceBasicInformationClusterColorEnumAttributeCallbackBridge::KeepAliveOnCallback; + using MTRNullableBridgedDeviceBasicInformationClusterColorEnumAttributeCallbackBridge::OnDone; + +private: + MTRSubscriptionEstablishedHandler mEstablishedHandler; +}; + +class MTRBridgedDeviceBasicInformationClusterProductFinishEnumAttributeCallbackBridge + : public MTRCallbackBridge +{ +public: + MTRBridgedDeviceBasicInformationClusterProductFinishEnumAttributeCallbackBridge(dispatch_queue_t queue, + ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; + + MTRBridgedDeviceBasicInformationClusterProductFinishEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, + OnSuccessFn){}; + + static void OnSuccessFn(void * context, chip::app::Clusters::BridgedDeviceBasicInformation::ProductFinishEnum value); +}; + +class MTRBridgedDeviceBasicInformationClusterProductFinishEnumAttributeCallbackSubscriptionBridge + : public MTRBridgedDeviceBasicInformationClusterProductFinishEnumAttributeCallbackBridge +{ +public: + MTRBridgedDeviceBasicInformationClusterProductFinishEnumAttributeCallbackSubscriptionBridge( + dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : + MTRBridgedDeviceBasicInformationClusterProductFinishEnumAttributeCallbackBridge(queue, handler, action), + mEstablishedHandler(establishedHandler) + {} + + void OnSubscriptionEstablished(); + using MTRBridgedDeviceBasicInformationClusterProductFinishEnumAttributeCallbackBridge::KeepAliveOnCallback; + using MTRBridgedDeviceBasicInformationClusterProductFinishEnumAttributeCallbackBridge::OnDone; + +private: + MTRSubscriptionEstablishedHandler mEstablishedHandler; +}; + +class MTRNullableBridgedDeviceBasicInformationClusterProductFinishEnumAttributeCallbackBridge + : public MTRCallbackBridge +{ +public: + MTRNullableBridgedDeviceBasicInformationClusterProductFinishEnumAttributeCallbackBridge(dispatch_queue_t queue, + ResponseHandler handler) : + MTRCallbackBridge(queue, handler, + OnSuccessFn){}; + + MTRNullableBridgedDeviceBasicInformationClusterProductFinishEnumAttributeCallbackBridge(dispatch_queue_t queue, + ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, + OnSuccessFn){}; + + static void OnSuccessFn( + void * context, + const chip::app::DataModel::Nullable & value); +}; + +class MTRNullableBridgedDeviceBasicInformationClusterProductFinishEnumAttributeCallbackSubscriptionBridge + : public MTRNullableBridgedDeviceBasicInformationClusterProductFinishEnumAttributeCallbackBridge +{ +public: + MTRNullableBridgedDeviceBasicInformationClusterProductFinishEnumAttributeCallbackSubscriptionBridge( + dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : + MTRNullableBridgedDeviceBasicInformationClusterProductFinishEnumAttributeCallbackBridge(queue, handler, action), + mEstablishedHandler(establishedHandler) + {} + + void OnSubscriptionEstablished(); + using MTRNullableBridgedDeviceBasicInformationClusterProductFinishEnumAttributeCallbackBridge::KeepAliveOnCallback; + using MTRNullableBridgedDeviceBasicInformationClusterProductFinishEnumAttributeCallbackBridge::OnDone; + +private: + MTRSubscriptionEstablishedHandler mEstablishedHandler; +}; + class MTRAdministratorCommissioningClusterCommissioningWindowStatusEnumAttributeCallbackBridge : public MTRCallbackBridge { diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRCallbackBridge.mm b/src/darwin/Framework/CHIP/zap-generated/MTRCallbackBridge.mm index 2dd1e11290d64c..0fecca0312771c 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRCallbackBridge.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRCallbackBridge.mm @@ -2461,6 +2461,35 @@ } } +void MTRBasicInformationProductAppearanceStructAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::Clusters::BasicInformation::Structs::ProductAppearanceStruct::DecodableType & value) +{ + MTRBasicInformationClusterProductAppearanceStruct * _Nonnull objCValue; + objCValue = [MTRBasicInformationClusterProductAppearanceStruct new]; + objCValue.finish = [NSNumber numberWithUnsignedChar:chip::to_underlying(value.finish)]; + if (value.primaryColor.IsNull()) { + objCValue.primaryColor = nil; + } else { + objCValue.primaryColor = [NSNumber numberWithUnsignedChar:chip::to_underlying(value.primaryColor.Value())]; + } + DispatchSuccess(context, objCValue); +}; + +void MTRBasicInformationProductAppearanceStructAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +{ + if (!mQueue) { + return; + } + + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); + // On failure, mEstablishedHandler will be cleaned up by our destructor, + // but we can clean it up earlier on successful subscription + // establishment. + mEstablishedHandler = nil; + } +} + void MTRBasicInformationGeneratedCommandListListAttributeCallbackBridge::OnSuccessFn( void * context, const chip::app::DataModel::DecodableList & value) { @@ -5105,6 +5134,35 @@ } } +void MTRBridgedDeviceBasicInformationProductAppearanceStructAttributeCallbackBridge::OnSuccessFn(void * context, + const chip::app::Clusters::BridgedDeviceBasicInformation::Structs::ProductAppearanceStruct::DecodableType & value) +{ + MTRBridgedDeviceBasicInformationClusterProductAppearanceStruct * _Nonnull objCValue; + objCValue = [MTRBridgedDeviceBasicInformationClusterProductAppearanceStruct new]; + objCValue.finish = [NSNumber numberWithUnsignedChar:chip::to_underlying(value.finish)]; + if (value.primaryColor.IsNull()) { + objCValue.primaryColor = nil; + } else { + objCValue.primaryColor = [NSNumber numberWithUnsignedChar:chip::to_underlying(value.primaryColor.Value())]; + } + DispatchSuccess(context, objCValue); +}; + +void MTRBridgedDeviceBasicInformationProductAppearanceStructAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +{ + if (!mQueue) { + return; + } + + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); + // On failure, mEstablishedHandler will be cleaned up by our destructor, + // but we can clean it up earlier on successful subscription + // establishment. + mEstablishedHandler = nil; + } +} + void MTRBridgedDeviceBasicInformationGeneratedCommandListListAttributeCallbackBridge::OnSuccessFn( void * context, const chip::app::DataModel::DecodableList & value) { @@ -13919,6 +13977,106 @@ } } +void MTRBasicInformationClusterColorEnumAttributeCallbackBridge::OnSuccessFn( + void * context, chip::app::Clusters::BasicInformation::ColorEnum value) +{ + NSNumber * _Nonnull objCValue; + objCValue = [NSNumber numberWithUnsignedChar:chip::to_underlying(value)]; + DispatchSuccess(context, objCValue); +}; + +void MTRBasicInformationClusterColorEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +{ + if (!mQueue) { + return; + } + + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); + // On failure, mEstablishedHandler will be cleaned up by our destructor, + // but we can clean it up earlier on successful subscription + // establishment. + mEstablishedHandler = nil; + } +} + +void MTRNullableBasicInformationClusterColorEnumAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::Nullable & value) +{ + NSNumber * _Nullable objCValue; + if (value.IsNull()) { + objCValue = nil; + } else { + objCValue = [NSNumber numberWithUnsignedChar:chip::to_underlying(value.Value())]; + } + DispatchSuccess(context, objCValue); +}; + +void MTRNullableBasicInformationClusterColorEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +{ + if (!mQueue) { + return; + } + + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); + // On failure, mEstablishedHandler will be cleaned up by our destructor, + // but we can clean it up earlier on successful subscription + // establishment. + mEstablishedHandler = nil; + } +} + +void MTRBasicInformationClusterProductFinishEnumAttributeCallbackBridge::OnSuccessFn( + void * context, chip::app::Clusters::BasicInformation::ProductFinishEnum value) +{ + NSNumber * _Nonnull objCValue; + objCValue = [NSNumber numberWithUnsignedChar:chip::to_underlying(value)]; + DispatchSuccess(context, objCValue); +}; + +void MTRBasicInformationClusterProductFinishEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +{ + if (!mQueue) { + return; + } + + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); + // On failure, mEstablishedHandler will be cleaned up by our destructor, + // but we can clean it up earlier on successful subscription + // establishment. + mEstablishedHandler = nil; + } +} + +void MTRNullableBasicInformationClusterProductFinishEnumAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::Nullable & value) +{ + NSNumber * _Nullable objCValue; + if (value.IsNull()) { + objCValue = nil; + } else { + objCValue = [NSNumber numberWithUnsignedChar:chip::to_underlying(value.Value())]; + } + DispatchSuccess(context, objCValue); +}; + +void MTRNullableBasicInformationClusterProductFinishEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +{ + if (!mQueue) { + return; + } + + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); + // On failure, mEstablishedHandler will be cleaned up by our destructor, + // but we can clean it up earlier on successful subscription + // establishment. + mEstablishedHandler = nil; + } +} + void MTROTASoftwareUpdateProviderClusterOTAApplyUpdateActionAttributeCallbackBridge::OnSuccessFn( void * context, chip::app::Clusters::OtaSoftwareUpdateProvider::OTAApplyUpdateAction value) { @@ -15972,6 +16130,107 @@ } } +void MTRBridgedDeviceBasicInformationClusterColorEnumAttributeCallbackBridge::OnSuccessFn( + void * context, chip::app::Clusters::BridgedDeviceBasicInformation::ColorEnum value) +{ + NSNumber * _Nonnull objCValue; + objCValue = [NSNumber numberWithUnsignedChar:chip::to_underlying(value)]; + DispatchSuccess(context, objCValue); +}; + +void MTRBridgedDeviceBasicInformationClusterColorEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +{ + if (!mQueue) { + return; + } + + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); + // On failure, mEstablishedHandler will be cleaned up by our destructor, + // but we can clean it up earlier on successful subscription + // establishment. + mEstablishedHandler = nil; + } +} + +void MTRNullableBridgedDeviceBasicInformationClusterColorEnumAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::Nullable & value) +{ + NSNumber * _Nullable objCValue; + if (value.IsNull()) { + objCValue = nil; + } else { + objCValue = [NSNumber numberWithUnsignedChar:chip::to_underlying(value.Value())]; + } + DispatchSuccess(context, objCValue); +}; + +void MTRNullableBridgedDeviceBasicInformationClusterColorEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +{ + if (!mQueue) { + return; + } + + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); + // On failure, mEstablishedHandler will be cleaned up by our destructor, + // but we can clean it up earlier on successful subscription + // establishment. + mEstablishedHandler = nil; + } +} + +void MTRBridgedDeviceBasicInformationClusterProductFinishEnumAttributeCallbackBridge::OnSuccessFn( + void * context, chip::app::Clusters::BridgedDeviceBasicInformation::ProductFinishEnum value) +{ + NSNumber * _Nonnull objCValue; + objCValue = [NSNumber numberWithUnsignedChar:chip::to_underlying(value)]; + DispatchSuccess(context, objCValue); +}; + +void MTRBridgedDeviceBasicInformationClusterProductFinishEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +{ + if (!mQueue) { + return; + } + + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); + // On failure, mEstablishedHandler will be cleaned up by our destructor, + // but we can clean it up earlier on successful subscription + // establishment. + mEstablishedHandler = nil; + } +} + +void MTRNullableBridgedDeviceBasicInformationClusterProductFinishEnumAttributeCallbackBridge::OnSuccessFn(void * context, + const chip::app::DataModel::Nullable & value) +{ + NSNumber * _Nullable objCValue; + if (value.IsNull()) { + objCValue = nil; + } else { + objCValue = [NSNumber numberWithUnsignedChar:chip::to_underlying(value.Value())]; + } + DispatchSuccess(context, objCValue); +}; + +void MTRNullableBridgedDeviceBasicInformationClusterProductFinishEnumAttributeCallbackSubscriptionBridge:: + OnSubscriptionEstablished() +{ + if (!mQueue) { + return; + } + + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); + // On failure, mEstablishedHandler will be cleaned up by our destructor, + // but we can clean it up earlier on successful subscription + // establishment. + mEstablishedHandler = nil; + } +} + void MTRAdministratorCommissioningClusterCommissioningWindowStatusEnumAttributeCallbackBridge::OnSuccessFn( void * context, chip::app::Clusters::AdministratorCommissioning::CommissioningWindowStatusEnum value) { diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRClusterConstants.h b/src/darwin/Framework/CHIP/zap-generated/MTRClusterConstants.h index 03490e7005d0de..5d5fbcead09a84 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRClusterConstants.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRClusterConstants.h @@ -1194,6 +1194,7 @@ typedef NS_ENUM(uint32_t, MTRAttributeIDType) { MTRAttributeIDTypeClusterBasicInformationAttributeCapabilityMinimaID API_AVAILABLE( ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000013, + MTRAttributeIDTypeClusterBasicInformationAttributeProductAppearanceID MTR_NEWLY_AVAILABLE = 0x00000014, MTRAttributeIDTypeClusterBasicInformationAttributeGeneratedCommandListID API_AVAILABLE( ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, @@ -3072,6 +3073,7 @@ typedef NS_ENUM(uint32_t, MTRAttributeIDType) { MTRAttributeIDTypeClusterBridgedDeviceBasicInformationAttributeUniqueIDID API_AVAILABLE( ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000012, + MTRAttributeIDTypeClusterBridgedDeviceBasicInformationAttributeProductAppearanceID MTR_NEWLY_AVAILABLE = 0x00000014, MTRAttributeIDTypeClusterBridgedDeviceBasicInformationAttributeGeneratedCommandListID API_AVAILABLE( ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRClusters.h b/src/darwin/Framework/CHIP/zap-generated/MTRClusters.h index 9d1d401fe294aa..d3e350a7701cf6 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRClusters.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRClusters.h @@ -1013,6 +1013,8 @@ API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) - (NSDictionary *)readAttributeCapabilityMinimaWithParams:(MTRReadParams * _Nullable)params API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (NSDictionary *)readAttributeProductAppearanceWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; + - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); @@ -2239,6 +2241,8 @@ API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) - (NSDictionary *)readAttributeUniqueIDWithParams:(MTRReadParams * _Nullable)params API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (NSDictionary *)readAttributeProductAppearanceWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; + - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRClusters.mm b/src/darwin/Framework/CHIP/zap-generated/MTRClusters.mm index e13f27f1464c38..1e2ea16be32dfd 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRClusters.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRClusters.mm @@ -5919,6 +5919,14 @@ - (void)writeAttributeLocalConfigDisabledWithValue:(NSDictionary params:params]; } +- (NSDictionary *)readAttributeProductAppearanceWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterIDTypeBasicInformationID) + attributeID:@(MTRAttributeIDTypeClusterBasicInformationAttributeProductAppearanceID) + params:params]; +} + - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) @@ -10346,6 +10354,15 @@ - (void)writeAttributeNodeLabelWithValue:(NSDictionary *)dataVal params:params]; } +- (NSDictionary *)readAttributeProductAppearanceWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device + readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterIDTypeBridgedDeviceBasicInformationID) + attributeID:@(MTRAttributeIDTypeClusterBridgedDeviceBasicInformationAttributeProductAppearanceID) + params:params]; +} + - (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { return [self.device diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.h b/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.h index ad2c33f3483205..f0711c27592b29 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.h @@ -155,6 +155,11 @@ MTR_DEPRECATED("Please use MTRBasicInformationClusterCapabilityMinimaStruct", io tvos(16.1, 16.4)) @interface MTRBasicClusterCapabilityMinimaStruct : MTRBasicInformationClusterCapabilityMinimaStruct @end +MTR_NEWLY_AVAILABLE +@interface MTRBasicInformationClusterProductAppearanceStruct : NSObject +@property (nonatomic, copy) NSNumber * _Nonnull finish MTR_NEWLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nullable primaryColor MTR_NEWLY_AVAILABLE; +@end API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) @interface MTRBasicInformationClusterStartUpEvent : NSObject @@ -496,6 +501,12 @@ MTR_DEPRECATED("Please use MTRTimeSynchronizationClusterTimeZoneStruct", ios(16. @interface MTRTimeSynchronizationClusterTimeZoneType : MTRTimeSynchronizationClusterTimeZoneStruct @end +MTR_NEWLY_AVAILABLE +@interface MTRBridgedDeviceBasicInformationClusterProductAppearanceStruct : NSObject +@property (nonatomic, copy) NSNumber * _Nonnull finish MTR_NEWLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nullable primaryColor MTR_NEWLY_AVAILABLE; +@end + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) @interface MTRBridgedDeviceBasicInformationClusterStartUpEvent : NSObject @property (nonatomic, copy) NSNumber * _Nonnull softwareVersion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.mm b/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.mm index f1022f235eaede..d079a7173770b8 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.mm @@ -565,6 +565,37 @@ - (NSString *)description @implementation MTRBasicClusterCapabilityMinimaStruct : MTRBasicInformationClusterCapabilityMinimaStruct @end +@implementation MTRBasicInformationClusterProductAppearanceStruct +- (instancetype)init +{ + if (self = [super init]) { + + _finish = @(0); + + _primaryColor = nil; + } + return self; +} + +- (id)copyWithZone:(NSZone * _Nullable)zone +{ + auto other = [[MTRBasicInformationClusterProductAppearanceStruct alloc] init]; + + other.finish = self.finish; + other.primaryColor = self.primaryColor; + + return other; +} + +- (NSString *)description +{ + NSString * descriptionString = + [NSString stringWithFormat:@"<%@: finish:%@; primaryColor:%@; >", NSStringFromClass([self class]), _finish, _primaryColor]; + return descriptionString; +} + +@end + @implementation MTRBasicInformationClusterStartUpEvent - (instancetype)init { @@ -1885,6 +1916,37 @@ - (NSString *)description @implementation MTRTimeSynchronizationClusterTimeZoneType : MTRTimeSynchronizationClusterTimeZoneStruct @end +@implementation MTRBridgedDeviceBasicInformationClusterProductAppearanceStruct +- (instancetype)init +{ + if (self = [super init]) { + + _finish = @(0); + + _primaryColor = nil; + } + return self; +} + +- (id)copyWithZone:(NSZone * _Nullable)zone +{ + auto other = [[MTRBridgedDeviceBasicInformationClusterProductAppearanceStruct alloc] init]; + + other.finish = self.finish; + other.primaryColor = self.primaryColor; + + return other; +} + +- (NSString *)description +{ + NSString * descriptionString = + [NSString stringWithFormat:@"<%@: finish:%@; primaryColor:%@; >", NSStringFromClass([self class]), _finish, _primaryColor]; + return descriptionString; +} + +@end + @implementation MTRBridgedDeviceBasicInformationClusterStartUpEvent - (instancetype)init { diff --git a/src/include/platform/DeviceInstanceInfoProvider.h b/src/include/platform/DeviceInstanceInfoProvider.h index 16e431ae432fff..c072df6b55a999 100644 --- a/src/include/platform/DeviceInstanceInfoProvider.h +++ b/src/include/platform/DeviceInstanceInfoProvider.h @@ -17,6 +17,7 @@ #pragma once #include +#include #include namespace chip { @@ -169,6 +170,30 @@ class DeviceInstanceInfoProvider * if access fails. */ virtual CHIP_ERROR GetRotatingDeviceIdUniqueId(MutableByteSpan & uniqueIdSpan) = 0; + + /** + * @brief Obtain the product's finish from the device's factory data. + * + * If the product finish is not available, this should return + * CHIP_ERROR_NOT_IMPLEMENTED, and the Basic Information ProductAppearance attribute should + * not be implemented for the device. + */ + virtual CHIP_ERROR GetProductFinish(app::Clusters::BasicInformation::ProductFinishEnum * finish) + { + return CHIP_ERROR_NOT_IMPLEMENTED; + } + + /** + * @brief Obtain the product's primary color from the device's factory data. + * + * If the primary color finish is not available or does not exist (e.g. the + * device wants to return null for the color in the Basic Information + * ProductAppearance attribute), this should return CHIP_ERROR_NOT_IMPLEMENTED. + */ + virtual CHIP_ERROR GetProductPrimaryColor(app::Clusters::BasicInformation::ColorEnum * primaryColor) + { + return CHIP_ERROR_NOT_IMPLEMENTED; + } }; /** diff --git a/zzz_generated/app-common/app-common/zap-generated/cluster-enums-check.h b/zzz_generated/app-common/app-common/zap-generated/cluster-enums-check.h index d401935344cecb..dd8a0282fdab6d 100644 --- a/zzz_generated/app-common/app-common/zap-generated/cluster-enums-check.h +++ b/zzz_generated/app-common/app-common/zap-generated/cluster-enums-check.h @@ -284,6 +284,54 @@ static auto __attribute__((unused)) EnsureKnownEnumValue(Actions::EndpointListTy } } +static auto __attribute__((unused)) EnsureKnownEnumValue(BasicInformation::ColorEnum val) +{ + using EnumType = BasicInformation::ColorEnum; + switch (val) + { + case EnumType::kBlack: + case EnumType::kNavy: + case EnumType::kGreen: + case EnumType::kTeal: + case EnumType::kMaroon: + case EnumType::kPurple: + case EnumType::kOlive: + case EnumType::kGray: + case EnumType::kBlue: + case EnumType::kLime: + case EnumType::kAqua: + case EnumType::kRed: + case EnumType::kFuchsia: + case EnumType::kYellow: + case EnumType::kWhite: + case EnumType::kNickel: + case EnumType::kChrome: + case EnumType::kBrass: + case EnumType::kCopper: + case EnumType::kSilver: + case EnumType::kGold: + return val; + default: + return static_cast(21); + } +} +static auto __attribute__((unused)) EnsureKnownEnumValue(BasicInformation::ProductFinishEnum val) +{ + using EnumType = BasicInformation::ProductFinishEnum; + switch (val) + { + case EnumType::kOther: + case EnumType::kMatte: + case EnumType::kSatin: + case EnumType::kPolished: + case EnumType::kRugged: + case EnumType::kFabric: + return val; + default: + return static_cast(6); + } +} + static auto __attribute__((unused)) EnsureKnownEnumValue(OtaSoftwareUpdateProvider::OTAApplyUpdateAction val) { using EnumType = OtaSoftwareUpdateProvider::OTAApplyUpdateAction; @@ -1091,6 +1139,54 @@ static auto __attribute__((unused)) EnsureKnownEnumValue(TimeSynchronization::Ti } } +static auto __attribute__((unused)) EnsureKnownEnumValue(BridgedDeviceBasicInformation::ColorEnum val) +{ + using EnumType = BridgedDeviceBasicInformation::ColorEnum; + switch (val) + { + case EnumType::kBlack: + case EnumType::kNavy: + case EnumType::kGreen: + case EnumType::kTeal: + case EnumType::kMaroon: + case EnumType::kPurple: + case EnumType::kOlive: + case EnumType::kGray: + case EnumType::kBlue: + case EnumType::kLime: + case EnumType::kAqua: + case EnumType::kRed: + case EnumType::kFuchsia: + case EnumType::kYellow: + case EnumType::kWhite: + case EnumType::kNickel: + case EnumType::kChrome: + case EnumType::kBrass: + case EnumType::kCopper: + case EnumType::kSilver: + case EnumType::kGold: + return val; + default: + return static_cast(21); + } +} +static auto __attribute__((unused)) EnsureKnownEnumValue(BridgedDeviceBasicInformation::ProductFinishEnum val) +{ + using EnumType = BridgedDeviceBasicInformation::ProductFinishEnum; + switch (val) + { + case EnumType::kOther: + case EnumType::kMatte: + case EnumType::kSatin: + case EnumType::kPolished: + case EnumType::kRugged: + case EnumType::kFabric: + return val; + default: + return static_cast(6); + } +} + static auto __attribute__((unused)) EnsureKnownEnumValue(AdministratorCommissioning::CommissioningWindowStatusEnum val) { using EnumType = AdministratorCommissioning::CommissioningWindowStatusEnum; diff --git a/zzz_generated/app-common/app-common/zap-generated/cluster-enums.h b/zzz_generated/app-common/app-common/zap-generated/cluster-enums.h index d9f35548eedd69..9b423e822a7e64 100644 --- a/zzz_generated/app-common/app-common/zap-generated/cluster-enums.h +++ b/zzz_generated/app-common/app-common/zap-generated/cluster-enums.h @@ -370,7 +370,55 @@ enum class CommandBits : uint16_t }; } // namespace Actions -namespace BasicInformation {} // namespace BasicInformation +namespace BasicInformation { + +// Enum for ColorEnum +enum class ColorEnum : uint8_t +{ + kBlack = 0x00, + kNavy = 0x01, + kGreen = 0x02, + kTeal = 0x03, + kMaroon = 0x04, + kPurple = 0x05, + kOlive = 0x06, + kGray = 0x07, + kBlue = 0x08, + kLime = 0x09, + kAqua = 0x0A, + kRed = 0x0B, + kFuchsia = 0x0C, + kYellow = 0x0D, + kWhite = 0x0E, + kNickel = 0x0F, + kChrome = 0x10, + kBrass = 0x11, + kCopper = 0x12, + kSilver = 0x13, + kGold = 0x14, + // All received enum values that are not listed above will be mapped + // to kUnknownEnumValue. This is a helper enum value that should only + // be used by code to process how it handles receiving and unknown + // enum value. This specific should never be transmitted. + kUnknownEnumValue = 21, +}; + +// Enum for ProductFinishEnum +enum class ProductFinishEnum : uint8_t +{ + kOther = 0x00, + kMatte = 0x01, + kSatin = 0x02, + kPolished = 0x03, + kRugged = 0x04, + kFabric = 0x05, + // All received enum values that are not listed above will be mapped + // to kUnknownEnumValue. This is a helper enum value that should only + // be used by code to process how it handles receiving and unknown + // enum value. This specific should never be transmitted. + kUnknownEnumValue = 6, +}; +} // namespace BasicInformation namespace OtaSoftwareUpdateProvider { @@ -1251,7 +1299,55 @@ enum class TimeSourceEnum : uint8_t }; } // namespace TimeSynchronization -namespace BridgedDeviceBasicInformation {} // namespace BridgedDeviceBasicInformation +namespace BridgedDeviceBasicInformation { + +// Enum for ColorEnum +enum class ColorEnum : uint8_t +{ + kBlack = 0x00, + kNavy = 0x01, + kGreen = 0x02, + kTeal = 0x03, + kMaroon = 0x04, + kPurple = 0x05, + kOlive = 0x06, + kGray = 0x07, + kBlue = 0x08, + kLime = 0x09, + kAqua = 0x0A, + kRed = 0x0B, + kFuchsia = 0x0C, + kYellow = 0x0D, + kWhite = 0x0E, + kNickel = 0x0F, + kChrome = 0x10, + kBrass = 0x11, + kCopper = 0x12, + kSilver = 0x13, + kGold = 0x14, + // All received enum values that are not listed above will be mapped + // to kUnknownEnumValue. This is a helper enum value that should only + // be used by code to process how it handles receiving and unknown + // enum value. This specific should never be transmitted. + kUnknownEnumValue = 21, +}; + +// Enum for ProductFinishEnum +enum class ProductFinishEnum : uint8_t +{ + kOther = 0x00, + kMatte = 0x01, + kSatin = 0x02, + kPolished = 0x03, + kRugged = 0x04, + kFabric = 0x05, + // All received enum values that are not listed above will be mapped + // to kUnknownEnumValue. This is a helper enum value that should only + // be used by code to process how it handles receiving and unknown + // enum value. This specific should never be transmitted. + kUnknownEnumValue = 6, +}; +} // namespace BridgedDeviceBasicInformation namespace Switch { diff --git a/zzz_generated/app-common/app-common/zap-generated/cluster-objects.cpp b/zzz_generated/app-common/app-common/zap-generated/cluster-objects.cpp index a37e57cacbc576..d7d8ea5bb57a79 100644 --- a/zzz_generated/app-common/app-common/zap-generated/cluster-objects.cpp +++ b/zzz_generated/app-common/app-common/zap-generated/cluster-objects.cpp @@ -3991,6 +3991,50 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } } // namespace CapabilityMinimaStruct +namespace ProductAppearanceStruct { +CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +{ + TLV::TLVType outer; + ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kFinish), finish)); + ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kPrimaryColor), primaryColor)); + ReturnErrorOnFailure(writer.EndContainer(outer)); + return CHIP_NO_ERROR; +} + +CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) +{ + CHIP_ERROR err = CHIP_NO_ERROR; + TLV::TLVType outer; + VerifyOrReturnError(TLV::kTLVType_Structure == reader.GetType(), CHIP_ERROR_WRONG_TLV_TYPE); + err = reader.EnterContainer(outer); + ReturnErrorOnFailure(err); + while ((err = reader.Next()) == CHIP_NO_ERROR) + { + if (!TLV::IsContextTag(reader.GetTag())) + { + continue; + } + switch (TLV::TagNumFromTag(reader.GetTag())) + { + case to_underlying(Fields::kFinish): + ReturnErrorOnFailure(DataModel::Decode(reader, finish)); + break; + case to_underlying(Fields::kPrimaryColor): + ReturnErrorOnFailure(DataModel::Decode(reader, primaryColor)); + break; + default: + break; + } + } + + VerifyOrReturnError(err == CHIP_END_OF_TLV, err); + ReturnErrorOnFailure(reader.ExitContainer(outer)); + + return CHIP_NO_ERROR; +} + +} // namespace ProductAppearanceStruct } // namespace Structs namespace Commands { @@ -4094,6 +4138,9 @@ CHIP_ERROR TypeInfo::DecodableType::Decode(TLV::TLVReader & reader, const Concre case Attributes::CapabilityMinima::TypeInfo::GetAttributeId(): ReturnErrorOnFailure(DataModel::Decode(reader, capabilityMinima)); break; + case Attributes::ProductAppearance::TypeInfo::GetAttributeId(): + ReturnErrorOnFailure(DataModel::Decode(reader, productAppearance)); + break; case Attributes::GeneratedCommandList::TypeInfo::GetAttributeId(): ReturnErrorOnFailure(DataModel::Decode(reader, generatedCommandList)); break; @@ -8241,6 +8288,52 @@ namespace Events {} // namespace Events } // namespace TimeSynchronization namespace BridgedDeviceBasicInformation { +namespace Structs { +namespace ProductAppearanceStruct { +CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +{ + TLV::TLVType outer; + ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kFinish), finish)); + ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kPrimaryColor), primaryColor)); + ReturnErrorOnFailure(writer.EndContainer(outer)); + return CHIP_NO_ERROR; +} + +CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) +{ + CHIP_ERROR err = CHIP_NO_ERROR; + TLV::TLVType outer; + VerifyOrReturnError(TLV::kTLVType_Structure == reader.GetType(), CHIP_ERROR_WRONG_TLV_TYPE); + err = reader.EnterContainer(outer); + ReturnErrorOnFailure(err); + while ((err = reader.Next()) == CHIP_NO_ERROR) + { + if (!TLV::IsContextTag(reader.GetTag())) + { + continue; + } + switch (TLV::TagNumFromTag(reader.GetTag())) + { + case to_underlying(Fields::kFinish): + ReturnErrorOnFailure(DataModel::Decode(reader, finish)); + break; + case to_underlying(Fields::kPrimaryColor): + ReturnErrorOnFailure(DataModel::Decode(reader, primaryColor)); + break; + default: + break; + } + } + + VerifyOrReturnError(err == CHIP_END_OF_TLV, err); + ReturnErrorOnFailure(reader.ExitContainer(outer)); + + return CHIP_NO_ERROR; +} + +} // namespace ProductAppearanceStruct +} // namespace Structs namespace Commands {} // namespace Commands @@ -8294,6 +8387,9 @@ CHIP_ERROR TypeInfo::DecodableType::Decode(TLV::TLVReader & reader, const Concre case Attributes::UniqueID::TypeInfo::GetAttributeId(): ReturnErrorOnFailure(DataModel::Decode(reader, uniqueID)); break; + case Attributes::ProductAppearance::TypeInfo::GetAttributeId(): + ReturnErrorOnFailure(DataModel::Decode(reader, productAppearance)); + break; case Attributes::GeneratedCommandList::TypeInfo::GetAttributeId(): ReturnErrorOnFailure(DataModel::Decode(reader, generatedCommandList)); break; diff --git a/zzz_generated/app-common/app-common/zap-generated/cluster-objects.h b/zzz_generated/app-common/app-common/zap-generated/cluster-objects.h index 076c4097b13647..68ee013cd179aa 100644 --- a/zzz_generated/app-common/app-common/zap-generated/cluster-objects.h +++ b/zzz_generated/app-common/app-common/zap-generated/cluster-objects.h @@ -4526,6 +4526,29 @@ struct Type using DecodableType = Type; } // namespace CapabilityMinimaStruct +namespace ProductAppearanceStruct { +enum class Fields : uint8_t +{ + kFinish = 0, + kPrimaryColor = 1, +}; + +struct Type +{ +public: + ProductFinishEnum finish = static_cast(0); + DataModel::Nullable primaryColor; + + CHIP_ERROR Decode(TLV::TLVReader & reader); + + static constexpr bool kIsFabricScoped = false; + + CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; +}; + +using DecodableType = Type; + +} // namespace ProductAppearanceStruct } // namespace Structs namespace Commands { @@ -4823,6 +4846,18 @@ struct TypeInfo static constexpr bool MustUseTimedWrite() { return false; } }; } // namespace CapabilityMinima +namespace ProductAppearance { +struct TypeInfo +{ + using Type = chip::app::Clusters::BasicInformation::Structs::ProductAppearanceStruct::Type; + using DecodableType = chip::app::Clusters::BasicInformation::Structs::ProductAppearanceStruct::DecodableType; + using DecodableArgType = const chip::app::Clusters::BasicInformation::Structs::ProductAppearanceStruct::DecodableType &; + + static constexpr ClusterId GetClusterId() { return Clusters::BasicInformation::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::ProductAppearance::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace ProductAppearance namespace GeneratedCommandList { struct TypeInfo : public Clusters::Globals::Attributes::GeneratedCommandList::TypeInfo { @@ -4888,6 +4923,7 @@ struct TypeInfo Attributes::Reachable::TypeInfo::DecodableType reachable = static_cast(0); Attributes::UniqueID::TypeInfo::DecodableType uniqueID; Attributes::CapabilityMinima::TypeInfo::DecodableType capabilityMinima; + Attributes::ProductAppearance::TypeInfo::DecodableType productAppearance; Attributes::GeneratedCommandList::TypeInfo::DecodableType generatedCommandList; Attributes::AcceptedCommandList::TypeInfo::DecodableType acceptedCommandList; Attributes::EventList::TypeInfo::DecodableType eventList; @@ -10556,6 +10592,31 @@ struct TypeInfo } // namespace Attributes } // namespace TimeSynchronization namespace BridgedDeviceBasicInformation { +namespace Structs { +namespace ProductAppearanceStruct { +enum class Fields : uint8_t +{ + kFinish = 0, + kPrimaryColor = 1, +}; + +struct Type +{ +public: + ProductFinishEnum finish = static_cast(0); + DataModel::Nullable primaryColor; + + CHIP_ERROR Decode(TLV::TLVReader & reader); + + static constexpr bool kIsFabricScoped = false; + + CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; +}; + +using DecodableType = Type; + +} // namespace ProductAppearanceStruct +} // namespace Structs namespace Attributes { @@ -10750,6 +10811,19 @@ struct TypeInfo static constexpr size_t MaxLength() { return 32; } }; } // namespace UniqueID +namespace ProductAppearance { +struct TypeInfo +{ + using Type = chip::app::Clusters::BridgedDeviceBasicInformation::Structs::ProductAppearanceStruct::Type; + using DecodableType = chip::app::Clusters::BridgedDeviceBasicInformation::Structs::ProductAppearanceStruct::DecodableType; + using DecodableArgType = + const chip::app::Clusters::BridgedDeviceBasicInformation::Structs::ProductAppearanceStruct::DecodableType &; + + static constexpr ClusterId GetClusterId() { return Clusters::BridgedDeviceBasicInformation::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::ProductAppearance::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace ProductAppearance namespace GeneratedCommandList { struct TypeInfo : public Clusters::Globals::Attributes::GeneratedCommandList::TypeInfo { @@ -10810,6 +10884,7 @@ struct TypeInfo Attributes::SerialNumber::TypeInfo::DecodableType serialNumber; Attributes::Reachable::TypeInfo::DecodableType reachable = static_cast(0); Attributes::UniqueID::TypeInfo::DecodableType uniqueID; + Attributes::ProductAppearance::TypeInfo::DecodableType productAppearance; Attributes::GeneratedCommandList::TypeInfo::DecodableType generatedCommandList; Attributes::AcceptedCommandList::TypeInfo::DecodableType acceptedCommandList; Attributes::EventList::TypeInfo::DecodableType eventList; diff --git a/zzz_generated/app-common/app-common/zap-generated/ids/Attributes.h b/zzz_generated/app-common/app-common/zap-generated/ids/Attributes.h index 62102d5fed1e5f..d141f4e3d8fedf 100644 --- a/zzz_generated/app-common/app-common/zap-generated/ids/Attributes.h +++ b/zzz_generated/app-common/app-common/zap-generated/ids/Attributes.h @@ -706,6 +706,10 @@ namespace CapabilityMinima { static constexpr AttributeId Id = 0x00000013; } // namespace CapabilityMinima +namespace ProductAppearance { +static constexpr AttributeId Id = 0x00000014; +} // namespace ProductAppearance + namespace GeneratedCommandList { static constexpr AttributeId Id = Globals::Attributes::GeneratedCommandList::Id; } // namespace GeneratedCommandList @@ -1928,6 +1932,10 @@ namespace UniqueID { static constexpr AttributeId Id = 0x00000012; } // namespace UniqueID +namespace ProductAppearance { +static constexpr AttributeId Id = 0x00000014; +} // namespace ProductAppearance + namespace GeneratedCommandList { static constexpr AttributeId Id = Globals::Attributes::GeneratedCommandList::Id; } // namespace GeneratedCommandList diff --git a/zzz_generated/chip-tool/zap-generated/cluster/Commands.h b/zzz_generated/chip-tool/zap-generated/cluster/Commands.h index 98e822796ecc4a..8a0226fa4c76bb 100644 --- a/zzz_generated/chip-tool/zap-generated/cluster/Commands.h +++ b/zzz_generated/chip-tool/zap-generated/cluster/Commands.h @@ -1853,6 +1853,7 @@ class ActionsDisableActionWithDuration : public ClusterCommand | * Reachable | 0x0011 | | * UniqueID | 0x0012 | | * CapabilityMinima | 0x0013 | +| * ProductAppearance | 0x0014 | | * GeneratedCommandList | 0xFFF8 | | * AcceptedCommandList | 0xFFF9 | | * EventList | 0xFFFA | @@ -3018,6 +3019,7 @@ class TimeSynchronizationSetUtcTime : public ClusterCommand | * SerialNumber | 0x000F | | * Reachable | 0x0011 | | * UniqueID | 0x0012 | +| * ProductAppearance | 0x0014 | | * GeneratedCommandList | 0xFFF8 | | * AcceptedCommandList | 0xFFF9 | | * EventList | 0xFFFA | @@ -9359,6 +9361,7 @@ void registerClusterBasicInformation(Commands & commands, CredentialIssuerComman make_unique(Id, "reachable", Attributes::Reachable::Id, credsIssuerConfig), // make_unique(Id, "unique-id", Attributes::UniqueID::Id, credsIssuerConfig), // make_unique(Id, "capability-minima", Attributes::CapabilityMinima::Id, credsIssuerConfig), // + make_unique(Id, "product-appearance", Attributes::ProductAppearance::Id, credsIssuerConfig), // make_unique(Id, "generated-command-list", Attributes::GeneratedCommandList::Id, credsIssuerConfig), // make_unique(Id, "accepted-command-list", Attributes::AcceptedCommandList::Id, credsIssuerConfig), // make_unique(Id, "event-list", Attributes::EventList::Id, credsIssuerConfig), // @@ -9406,6 +9409,8 @@ void registerClusterBasicInformation(Commands & commands, CredentialIssuerComman credsIssuerConfig), // make_unique>( Id, "capability-minima", Attributes::CapabilityMinima::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>( + Id, "product-appearance", Attributes::ProductAppearance::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // make_unique>>( Id, "generated-command-list", Attributes::GeneratedCommandList::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // @@ -9440,6 +9445,7 @@ void registerClusterBasicInformation(Commands & commands, CredentialIssuerComman make_unique(Id, "reachable", Attributes::Reachable::Id, credsIssuerConfig), // make_unique(Id, "unique-id", Attributes::UniqueID::Id, credsIssuerConfig), // make_unique(Id, "capability-minima", Attributes::CapabilityMinima::Id, credsIssuerConfig), // + make_unique(Id, "product-appearance", Attributes::ProductAppearance::Id, credsIssuerConfig), // make_unique(Id, "generated-command-list", Attributes::GeneratedCommandList::Id, credsIssuerConfig), // make_unique(Id, "accepted-command-list", Attributes::AcceptedCommandList::Id, credsIssuerConfig), // make_unique(Id, "event-list", Attributes::EventList::Id, credsIssuerConfig), // @@ -11119,6 +11125,7 @@ void registerClusterBridgedDeviceBasicInformation(Commands & commands, Credentia make_unique(Id, "serial-number", Attributes::SerialNumber::Id, credsIssuerConfig), // make_unique(Id, "reachable", Attributes::Reachable::Id, credsIssuerConfig), // make_unique(Id, "unique-id", Attributes::UniqueID::Id, credsIssuerConfig), // + make_unique(Id, "product-appearance", Attributes::ProductAppearance::Id, credsIssuerConfig), // make_unique(Id, "generated-command-list", Attributes::GeneratedCommandList::Id, credsIssuerConfig), // make_unique(Id, "accepted-command-list", Attributes::AcceptedCommandList::Id, credsIssuerConfig), // make_unique(Id, "event-list", Attributes::EventList::Id, credsIssuerConfig), // @@ -11156,6 +11163,9 @@ void registerClusterBridgedDeviceBasicInformation(Commands & commands, Credentia credsIssuerConfig), // make_unique>(Id, "unique-id", Attributes::UniqueID::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique< + WriteAttributeAsComplex>( + Id, "product-appearance", Attributes::ProductAppearance::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // make_unique>>( Id, "generated-command-list", Attributes::GeneratedCommandList::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // @@ -11185,6 +11195,7 @@ void registerClusterBridgedDeviceBasicInformation(Commands & commands, Credentia make_unique(Id, "serial-number", Attributes::SerialNumber::Id, credsIssuerConfig), // make_unique(Id, "reachable", Attributes::Reachable::Id, credsIssuerConfig), // make_unique(Id, "unique-id", Attributes::UniqueID::Id, credsIssuerConfig), // + make_unique(Id, "product-appearance", Attributes::ProductAppearance::Id, credsIssuerConfig), // make_unique(Id, "generated-command-list", Attributes::GeneratedCommandList::Id, credsIssuerConfig), // make_unique(Id, "accepted-command-list", Attributes::AcceptedCommandList::Id, credsIssuerConfig), // make_unique(Id, "event-list", Attributes::EventList::Id, credsIssuerConfig), // diff --git a/zzz_generated/chip-tool/zap-generated/cluster/ComplexArgumentParser.cpp b/zzz_generated/chip-tool/zap-generated/cluster/ComplexArgumentParser.cpp index 3d128bfb24f2e8..5594ef89c48bf2 100644 --- a/zzz_generated/chip-tool/zap-generated/cluster/ComplexArgumentParser.cpp +++ b/zzz_generated/chip-tool/zap-generated/cluster/ComplexArgumentParser.cpp @@ -486,6 +486,38 @@ void ComplexArgumentParser::Finalize(chip::app::Clusters::BasicInformation::Stru ComplexArgumentParser::Finalize(request.subscriptionsPerFabric); } +CHIP_ERROR ComplexArgumentParser::Setup(const char * label, + chip::app::Clusters::BasicInformation::Structs::ProductAppearanceStruct::Type & request, + Json::Value & value) +{ + VerifyOrReturnError(value.isObject(), CHIP_ERROR_INVALID_ARGUMENT); + + // Copy to track which members we already processed. + Json::Value valueCopy(value); + + ReturnErrorOnFailure( + ComplexArgumentParser::EnsureMemberExist("ProductAppearanceStruct.finish", "finish", value.isMember("finish"))); + ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("ProductAppearanceStruct.primaryColor", "primaryColor", + value.isMember("primaryColor"))); + + char labelWithMember[kMaxLabelLength]; + snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "finish"); + ReturnErrorOnFailure(ComplexArgumentParser::Setup(labelWithMember, request.finish, value["finish"])); + valueCopy.removeMember("finish"); + + snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "primaryColor"); + ReturnErrorOnFailure(ComplexArgumentParser::Setup(labelWithMember, request.primaryColor, value["primaryColor"])); + valueCopy.removeMember("primaryColor"); + + return ComplexArgumentParser::EnsureNoMembersRemaining(label, valueCopy); +} + +void ComplexArgumentParser::Finalize(chip::app::Clusters::BasicInformation::Structs::ProductAppearanceStruct::Type & request) +{ + ComplexArgumentParser::Finalize(request.finish); + ComplexArgumentParser::Finalize(request.primaryColor); +} + CHIP_ERROR ComplexArgumentParser::Setup(const char * label, chip::app::Clusters::OtaSoftwareUpdateRequestor::Structs::ProviderLocation::Type & request, Json::Value & value) @@ -1364,6 +1396,40 @@ void ComplexArgumentParser::Finalize(chip::app::Clusters::TimeSynchronization::S ComplexArgumentParser::Finalize(request.name); } +CHIP_ERROR +ComplexArgumentParser::Setup(const char * label, + chip::app::Clusters::BridgedDeviceBasicInformation::Structs::ProductAppearanceStruct::Type & request, + Json::Value & value) +{ + VerifyOrReturnError(value.isObject(), CHIP_ERROR_INVALID_ARGUMENT); + + // Copy to track which members we already processed. + Json::Value valueCopy(value); + + ReturnErrorOnFailure( + ComplexArgumentParser::EnsureMemberExist("ProductAppearanceStruct.finish", "finish", value.isMember("finish"))); + ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("ProductAppearanceStruct.primaryColor", "primaryColor", + value.isMember("primaryColor"))); + + char labelWithMember[kMaxLabelLength]; + snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "finish"); + ReturnErrorOnFailure(ComplexArgumentParser::Setup(labelWithMember, request.finish, value["finish"])); + valueCopy.removeMember("finish"); + + snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "primaryColor"); + ReturnErrorOnFailure(ComplexArgumentParser::Setup(labelWithMember, request.primaryColor, value["primaryColor"])); + valueCopy.removeMember("primaryColor"); + + return ComplexArgumentParser::EnsureNoMembersRemaining(label, valueCopy); +} + +void ComplexArgumentParser::Finalize( + chip::app::Clusters::BridgedDeviceBasicInformation::Structs::ProductAppearanceStruct::Type & request) +{ + ComplexArgumentParser::Finalize(request.finish); + ComplexArgumentParser::Finalize(request.primaryColor); +} + CHIP_ERROR ComplexArgumentParser::Setup(const char * label, chip::app::Clusters::OperationalCredentials::Structs::FabricDescriptorStruct::Type & request, diff --git a/zzz_generated/chip-tool/zap-generated/cluster/ComplexArgumentParser.h b/zzz_generated/chip-tool/zap-generated/cluster/ComplexArgumentParser.h index 990126cbc87187..1827e5cbb930fa 100644 --- a/zzz_generated/chip-tool/zap-generated/cluster/ComplexArgumentParser.h +++ b/zzz_generated/chip-tool/zap-generated/cluster/ComplexArgumentParser.h @@ -82,6 +82,11 @@ static CHIP_ERROR Setup(const char * label, chip::app::Clusters::BasicInformatio static void Finalize(chip::app::Clusters::BasicInformation::Structs::CapabilityMinimaStruct::Type & request); +static CHIP_ERROR Setup(const char * label, chip::app::Clusters::BasicInformation::Structs::ProductAppearanceStruct::Type & request, + Json::Value & value); + +static void Finalize(chip::app::Clusters::BasicInformation::Structs::ProductAppearanceStruct::Type & request); + static CHIP_ERROR Setup(const char * label, chip::app::Clusters::OtaSoftwareUpdateRequestor::Structs::ProviderLocation::Type & request, Json::Value & value); @@ -167,6 +172,12 @@ static CHIP_ERROR Setup(const char * label, chip::app::Clusters::TimeSynchroniza static void Finalize(chip::app::Clusters::TimeSynchronization::Structs::TimeZoneStruct::Type & request); +static CHIP_ERROR Setup(const char * label, + chip::app::Clusters::BridgedDeviceBasicInformation::Structs::ProductAppearanceStruct::Type & request, + Json::Value & value); + +static void Finalize(chip::app::Clusters::BridgedDeviceBasicInformation::Structs::ProductAppearanceStruct::Type & request); + static CHIP_ERROR Setup(const char * label, chip::app::Clusters::OperationalCredentials::Structs::FabricDescriptorStruct::Type & request, Json::Value & value); diff --git a/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.cpp b/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.cpp index e85d4920b846c2..210e152050a010 100644 --- a/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.cpp +++ b/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.cpp @@ -428,6 +428,32 @@ DataModelLogger::LogValue(const char * label, size_t indent, return CHIP_NO_ERROR; } +CHIP_ERROR +DataModelLogger::LogValue(const char * label, size_t indent, + const chip::app::Clusters::BasicInformation::Structs::ProductAppearanceStruct::DecodableType & value) +{ + DataModelLogger::LogString(label, indent, "{"); + { + CHIP_ERROR err = LogValue("Finish", indent + 1, value.finish); + if (err != CHIP_NO_ERROR) + { + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'Finish'"); + return err; + } + } + { + CHIP_ERROR err = LogValue("PrimaryColor", indent + 1, value.primaryColor); + if (err != CHIP_NO_ERROR) + { + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'PrimaryColor'"); + return err; + } + } + DataModelLogger::LogString(indent, "}"); + + return CHIP_NO_ERROR; +} + CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, const chip::app::Clusters::OtaSoftwareUpdateRequestor::Structs::ProviderLocation::DecodableType & value) @@ -1256,6 +1282,32 @@ CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, return CHIP_NO_ERROR; } +CHIP_ERROR DataModelLogger::LogValue( + const char * label, size_t indent, + const chip::app::Clusters::BridgedDeviceBasicInformation::Structs::ProductAppearanceStruct::DecodableType & value) +{ + DataModelLogger::LogString(label, indent, "{"); + { + CHIP_ERROR err = LogValue("Finish", indent + 1, value.finish); + if (err != CHIP_NO_ERROR) + { + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'Finish'"); + return err; + } + } + { + CHIP_ERROR err = LogValue("PrimaryColor", indent + 1, value.primaryColor); + if (err != CHIP_NO_ERROR) + { + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'PrimaryColor'"); + return err; + } + } + DataModelLogger::LogString(indent, "}"); + + return CHIP_NO_ERROR; +} + CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, const chip::app::Clusters::OperationalCredentials::Structs::FabricDescriptorStruct::DecodableType & value) @@ -5074,6 +5126,11 @@ CHIP_ERROR DataModelLogger::LogAttribute(const chip::app::ConcreteDataAttributeP ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("CapabilityMinima", 1, value); } + case BasicInformation::Attributes::ProductAppearance::Id: { + chip::app::Clusters::BasicInformation::Structs::ProductAppearanceStruct::DecodableType value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("ProductAppearance", 1, value); + } case BasicInformation::Attributes::GeneratedCommandList::Id: { chip::app::DataModel::DecodableList value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); @@ -6502,6 +6559,11 @@ CHIP_ERROR DataModelLogger::LogAttribute(const chip::app::ConcreteDataAttributeP ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("UniqueID", 1, value); } + case BridgedDeviceBasicInformation::Attributes::ProductAppearance::Id: { + chip::app::Clusters::BridgedDeviceBasicInformation::Structs::ProductAppearanceStruct::DecodableType value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("ProductAppearance", 1, value); + } case BridgedDeviceBasicInformation::Attributes::GeneratedCommandList::Id: { chip::app::DataModel::DecodableList value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); diff --git a/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.h b/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.h index 368f75af3cfc10..459c2c13f31cb7 100644 --- a/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.h +++ b/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.h @@ -56,6 +56,9 @@ static CHIP_ERROR LogValue(const char * label, size_t indent, static CHIP_ERROR LogValue(const char * label, size_t indent, const chip::app::Clusters::BasicInformation::Structs::CapabilityMinimaStruct::DecodableType & value); +static CHIP_ERROR LogValue(const char * label, size_t indent, + const chip::app::Clusters::BasicInformation::Structs::ProductAppearanceStruct::DecodableType & value); + static CHIP_ERROR LogValue(const char * label, size_t indent, const chip::app::Clusters::OtaSoftwareUpdateRequestor::Structs::ProviderLocation::DecodableType & value); @@ -107,6 +110,10 @@ static CHIP_ERROR LogValue(const char * label, size_t indent, static CHIP_ERROR LogValue(const char * label, size_t indent, const chip::app::Clusters::TimeSynchronization::Structs::TimeZoneStruct::DecodableType & value); +static CHIP_ERROR +LogValue(const char * label, size_t indent, + const chip::app::Clusters::BridgedDeviceBasicInformation::Structs::ProductAppearanceStruct::DecodableType & value); + static CHIP_ERROR LogValue(const char * label, size_t indent, const chip::app::Clusters::OperationalCredentials::Structs::FabricDescriptorStruct::DecodableType & value); diff --git a/zzz_generated/chip-tool/zap-generated/test/Commands.h b/zzz_generated/chip-tool/zap-generated/test/Commands.h index 74fe8807e0ca3a..a0ab20c57b930e 100644 --- a/zzz_generated/chip-tool/zap-generated/test/Commands.h +++ b/zzz_generated/chip-tool/zap-generated/test/Commands.h @@ -20497,7 +20497,7 @@ class Test_TC_BINFO_1_1Suite : public TestCommand { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("clusterRevision", value, 1U)); + VerifyOrReturn(CheckValue("clusterRevision", value, 2U)); VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); } break; @@ -68841,7 +68841,7 @@ class TestBasicInformationSuite : public TestCommand { public: TestBasicInformationSuite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("TestBasicInformation", 18, credsIssuerConfig) + TestCommand("TestBasicInformation", 19, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -68948,16 +68948,18 @@ class TestBasicInformationSuite : public TestCommand VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 19)); VerifyOrReturn(CheckValue("attributeList[19]", iter_0.GetValue(), 19UL)); VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 20)); - VerifyOrReturn(CheckValue("attributeList[20]", iter_0.GetValue(), 65528UL)); + VerifyOrReturn(CheckValue("attributeList[20]", iter_0.GetValue(), 20UL)); VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 21)); - VerifyOrReturn(CheckValue("attributeList[21]", iter_0.GetValue(), 65529UL)); + VerifyOrReturn(CheckValue("attributeList[21]", iter_0.GetValue(), 65528UL)); VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 22)); - VerifyOrReturn(CheckValue("attributeList[22]", iter_0.GetValue(), 65531UL)); + VerifyOrReturn(CheckValue("attributeList[22]", iter_0.GetValue(), 65529UL)); VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 23)); - VerifyOrReturn(CheckValue("attributeList[23]", iter_0.GetValue(), 65532UL)); + VerifyOrReturn(CheckValue("attributeList[23]", iter_0.GetValue(), 65531UL)); VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 24)); - VerifyOrReturn(CheckValue("attributeList[24]", iter_0.GetValue(), 65533UL)); - VerifyOrReturn(CheckNoMoreListItems("attributeList", iter_0, 25)); + VerifyOrReturn(CheckValue("attributeList[24]", iter_0.GetValue(), 65532UL)); + VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 25)); + VerifyOrReturn(CheckValue("attributeList[25]", iter_0.GetValue(), 65533UL)); + VerifyOrReturn(CheckNoMoreListItems("attributeList", iter_0, 26)); } } break; @@ -69029,6 +69031,16 @@ class TestBasicInformationSuite : public TestCommand case 17: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; + case 18: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::Clusters::BasicInformation::Structs::ProductAppearanceStruct::DecodableType value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("productAppearance.finish", value.finish, 2U)); + VerifyOrReturn(CheckValueNonNull("productAppearance.primaryColor", value.primaryColor)); + VerifyOrReturn(CheckValue("productAppearance.primaryColor.Value()", value.primaryColor.Value(), 5U)); + } + break; default: LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); } @@ -69159,6 +69171,11 @@ class TestBasicInformationSuite : public TestCommand BasicInformation::Attributes::LocalConfigDisabled::Id, value, chip::NullOptional, chip::NullOptional); } + case 18: { + LogStep(18, "Read the ProductApppearance value"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), BasicInformation::Id, + BasicInformation::Attributes::ProductAppearance::Id, true, chip::NullOptional); + } } return CHIP_NO_ERROR; } diff --git a/zzz_generated/darwin-framework-tool/zap-generated/cluster/Commands.h b/zzz_generated/darwin-framework-tool/zap-generated/cluster/Commands.h index 3c52df46823049..fec7a5add44c0c 100644 --- a/zzz_generated/darwin-framework-tool/zap-generated/cluster/Commands.h +++ b/zzz_generated/darwin-framework-tool/zap-generated/cluster/Commands.h @@ -10964,6 +10964,7 @@ class SubscribeAttributeActionsClusterRevision : public SubscribeAttribute { | * Reachable | 0x0011 | | * UniqueID | 0x0012 | | * CapabilityMinima | 0x0013 | +| * ProductAppearance | 0x0014 | | * GeneratedCommandList | 0xFFF8 | | * AcceptedCommandList | 0xFFF9 | | * EventList | 0xFFFA | @@ -12503,6 +12504,77 @@ class SubscribeAttributeBasicInformationCapabilityMinima : public SubscribeAttri } }; +/* + * Attribute ProductAppearance + */ +class ReadBasicInformationProductAppearance : public ReadAttribute { +public: + ReadBasicInformationProductAppearance() + : ReadAttribute("product-appearance") + { + } + + ~ReadBasicInformationProductAppearance() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000028) ReadAttribute (0x00000014) on endpoint %u", endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterBasicInformation alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeProductAppearanceWithCompletion:^( + MTRBasicInformationClusterProductAppearanceStruct * _Nullable value, NSError * _Nullable error) { + NSLog(@"BasicInformation.ProductAppearance response %@", [value description]); + if (error != nil) { + LogNSError("BasicInformation ProductAppearance read Error", error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeBasicInformationProductAppearance : public SubscribeAttribute { +public: + SubscribeAttributeBasicInformationProductAppearance() + : SubscribeAttribute("product-appearance") + { + } + + ~SubscribeAttributeBasicInformationProductAppearance() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000028) ReportAttribute (0x00000014) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterBasicInformation alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.filterByFabric = mFabricFiltered.Value(); + } + if (mAutoResubscribe.HasValue()) { + params.resubscribeAutomatically = mAutoResubscribe.Value(); + } + [cluster subscribeAttributeProductAppearanceWithParams:params + subscriptionEstablished:^() { + mSubscriptionEstablished = YES; + } + reportHandler:^(MTRBasicInformationClusterProductAppearanceStruct * _Nullable value, NSError * _Nullable error) { + NSLog(@"BasicInformation.ProductAppearance response %@", [value description]); + SetCommandExitStatus(error); + }]; + + return CHIP_NO_ERROR; + } +}; + /* * Attribute GeneratedCommandList */ @@ -30591,6 +30663,7 @@ class SubscribeAttributeEthernetNetworkDiagnosticsClusterRevision : public Subsc | * SerialNumber | 0x000F | | * Reachable | 0x0011 | | * UniqueID | 0x0012 | +| * ProductAppearance | 0x0014 | | * GeneratedCommandList | 0xFFF8 | | * AcceptedCommandList | 0xFFF9 | | * EventList | 0xFFFA | @@ -31697,6 +31770,78 @@ class SubscribeAttributeBridgedDeviceBasicInformationUniqueID : public Subscribe } }; +/* + * Attribute ProductAppearance + */ +class ReadBridgedDeviceBasicInformationProductAppearance : public ReadAttribute { +public: + ReadBridgedDeviceBasicInformationProductAppearance() + : ReadAttribute("product-appearance") + { + } + + ~ReadBridgedDeviceBasicInformationProductAppearance() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000039) ReadAttribute (0x00000014) on endpoint %u", endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterBridgedDeviceBasicInformation alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeProductAppearanceWithCompletion:^( + MTRBridgedDeviceBasicInformationClusterProductAppearanceStruct * _Nullable value, NSError * _Nullable error) { + NSLog(@"BridgedDeviceBasicInformation.ProductAppearance response %@", [value description]); + if (error != nil) { + LogNSError("BridgedDeviceBasicInformation ProductAppearance read Error", error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeBridgedDeviceBasicInformationProductAppearance : public SubscribeAttribute { +public: + SubscribeAttributeBridgedDeviceBasicInformationProductAppearance() + : SubscribeAttribute("product-appearance") + { + } + + ~SubscribeAttributeBridgedDeviceBasicInformationProductAppearance() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000039) ReportAttribute (0x00000014) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterBridgedDeviceBasicInformation alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.filterByFabric = mFabricFiltered.Value(); + } + if (mAutoResubscribe.HasValue()) { + params.resubscribeAutomatically = mAutoResubscribe.Value(); + } + [cluster subscribeAttributeProductAppearanceWithParams:params + subscriptionEstablished:^() { + mSubscriptionEstablished = YES; + } + reportHandler:^( + MTRBridgedDeviceBasicInformationClusterProductAppearanceStruct * _Nullable value, NSError * _Nullable error) { + NSLog(@"BridgedDeviceBasicInformation.ProductAppearance response %@", [value description]); + SetCommandExitStatus(error); + }]; + + return CHIP_NO_ERROR; + } +}; + /* * Attribute GeneratedCommandList */ @@ -98029,6 +98174,8 @@ void registerClusterBasicInformation(Commands & commands) make_unique(), // make_unique(), // make_unique(), // + make_unique(), // + make_unique(), // make_unique(), // make_unique(), // make_unique(), // @@ -98806,6 +98953,8 @@ void registerClusterBridgedDeviceBasicInformation(Commands & commands) make_unique(), // make_unique(), // make_unique(), // + make_unique(), // + make_unique(), // make_unique(), // make_unique(), // make_unique(), // diff --git a/zzz_generated/darwin-framework-tool/zap-generated/test/Commands.h b/zzz_generated/darwin-framework-tool/zap-generated/test/Commands.h index 217820fc3a6d98..2ac0dea95d5047 100644 --- a/zzz_generated/darwin-framework-tool/zap-generated/test/Commands.h +++ b/zzz_generated/darwin-framework-tool/zap-generated/test/Commands.h @@ -24524,7 +24524,7 @@ class Test_TC_BINFO_1_1 : public TestCommandBridge { { id actualValue = value; - VerifyOrReturn(CheckValue("ClusterRevision", actualValue, 1U)); + VerifyOrReturn(CheckValue("ClusterRevision", actualValue, 2U)); } VerifyOrReturn(CheckConstraintType("clusterRevision", "int16u", "int16u")); @@ -101033,6 +101033,10 @@ class TestBasicInformation : public TestCommandBridge { ChipLogProgress(chipTool, " ***** Test Step 17 : Restore initial LocalConfigDisabled value\n"); err = TestRestoreInitialLocalConfigDisabledValue_17(); break; + case 18: + ChipLogProgress(chipTool, " ***** Test Step 18 : Read the ProductApppearance value\n"); + err = TestReadTheProductApppearanceValue_18(); + break; } if (CHIP_NO_ERROR != err) { @@ -101098,6 +101102,9 @@ class TestBasicInformation : public TestCommandBridge { case 17: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; + case 18: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; } // Go on to the next test. @@ -101111,7 +101118,7 @@ class TestBasicInformation : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 18; + const uint16_t mTestCount = 19; chip::Optional mNodeId; chip::Optional mCluster; @@ -101228,7 +101235,7 @@ class TestBasicInformation : public TestCommandBridge { { id actualValue = value; - VerifyOrReturn(CheckValue("AttributeList", [actualValue count], static_cast(25))); + VerifyOrReturn(CheckValue("AttributeList", [actualValue count], static_cast(26))); VerifyOrReturn(CheckValue("", actualValue[0], 0UL)); VerifyOrReturn(CheckValue("", actualValue[1], 1UL)); VerifyOrReturn(CheckValue("", actualValue[2], 2UL)); @@ -101249,11 +101256,12 @@ class TestBasicInformation : public TestCommandBridge { VerifyOrReturn(CheckValue("", actualValue[17], 17UL)); VerifyOrReturn(CheckValue("", actualValue[18], 18UL)); VerifyOrReturn(CheckValue("", actualValue[19], 19UL)); - VerifyOrReturn(CheckValue("", actualValue[20], 65528UL)); - VerifyOrReturn(CheckValue("", actualValue[21], 65529UL)); - VerifyOrReturn(CheckValue("", actualValue[22], 65531UL)); - VerifyOrReturn(CheckValue("", actualValue[23], 65532UL)); - VerifyOrReturn(CheckValue("", actualValue[24], 65533UL)); + VerifyOrReturn(CheckValue("", actualValue[20], 20UL)); + VerifyOrReturn(CheckValue("", actualValue[21], 65528UL)); + VerifyOrReturn(CheckValue("", actualValue[22], 65529UL)); + VerifyOrReturn(CheckValue("", actualValue[23], 65531UL)); + VerifyOrReturn(CheckValue("", actualValue[24], 65532UL)); + VerifyOrReturn(CheckValue("", actualValue[25], 65533UL)); } NextTest(); @@ -101498,6 +101506,35 @@ class TestBasicInformation : public TestCommandBridge { return CHIP_NO_ERROR; } + + CHIP_ERROR TestReadTheProductApppearanceValue_18() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterBasicInformation alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeProductAppearanceWithCompletion:^( + MTRBasicInformationClusterProductAppearanceStruct * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the ProductApppearance value Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = value; + VerifyOrReturn( + CheckValue("Finish", ((MTRBasicInformationClusterProductAppearanceStruct *) actualValue).finish, 2U)); + VerifyOrReturn(CheckValueNonNull( + "PrimaryColor", ((MTRBasicInformationClusterProductAppearanceStruct *) actualValue).primaryColor)); + VerifyOrReturn(CheckValue( + "PrimaryColor", ((MTRBasicInformationClusterProductAppearanceStruct *) actualValue).primaryColor, 5U)); + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } }; class TestFabricRemovalWhileSubscribed : public TestCommandBridge {