From 4c0dabcc12f45d6518ca5a09047068abe8189079 Mon Sep 17 00:00:00 2001 From: marcos <15697303+gmarcosb@users.noreply.github.com> Date: Mon, 3 Feb 2025 12:12:27 -0700 Subject: [PATCH 1/5] Fix compiler errors --- .../src/chime-instance.cpp | 5 ++- .../src/clusters/chime/chime-manager.cpp | 14 ++++---- .../clusters/chime-server/chime-server.cpp | 32 +++++++++---------- src/app/clusters/chime-server/chime-server.h | 12 +++---- 4 files changed, 31 insertions(+), 32 deletions(-) diff --git a/examples/all-clusters-app/all-clusters-common/src/chime-instance.cpp b/examples/all-clusters-app/all-clusters-common/src/chime-instance.cpp index 0bba22a09f2029..a9cc830361bd64 100644 --- a/examples/all-clusters-app/all-clusters-common/src/chime-instance.cpp +++ b/examples/all-clusters-app/all-clusters-common/src/chime-instance.cpp @@ -43,9 +43,8 @@ CHIP_ERROR ChimeCommandDelegate::GetChimeSoundByIndex(uint8_t chimeIndex, uint8_ return CHIP_ERROR_PROVIDER_LIST_EXHAUSTED; } auto & selectedChime = supportedChimes[chimeIndex]; - chip::CopyCharSpanToMutableCharSpan(selectedChime.name, name); - chimeID = selectedChime.chimeID; - return CHIP_NO_ERROR; + chimeID = selectedChime.chimeID; + return chip::CopyCharSpanToMutableCharSpan(selectedChime.name, name); } CHIP_ERROR ChimeCommandDelegate::GetChimeIDByIndex(uint8_t chimeIndex, uint8_t & chimeID) diff --git a/examples/camera-app/linux/src/clusters/chime/chime-manager.cpp b/examples/camera-app/linux/src/clusters/chime/chime-manager.cpp index eb7c9740e0bc7d..889fef66d25c9e 100644 --- a/examples/camera-app/linux/src/clusters/chime/chime-manager.cpp +++ b/examples/camera-app/linux/src/clusters/chime/chime-manager.cpp @@ -35,9 +35,9 @@ CHIP_ERROR ChimeManager::GetChimeSoundByIndex(uint8_t chimeIndex, uint8_t & chim { return CHIP_ERROR_PROVIDER_LIST_EXHAUSTED; } - chimeID = mChimeSounds[chimeIndex].chimeID; - - return CopyCharSpanToMutableCharSpan(mChimeSounds[chimeIndex].name, name); + auto & selectedChime = mChimeSounds[chimeIndex]; + chimeID = selectedChime.chimeID; + return chip::CopyCharSpanToMutableCharSpan(selectedChime.name, name); } CHIP_ERROR ChimeManager::GetChimeIDByIndex(uint8_t chimeIndex, uint8_t & chimeID) @@ -46,8 +46,8 @@ CHIP_ERROR ChimeManager::GetChimeIDByIndex(uint8_t chimeIndex, uint8_t & chimeID { return CHIP_ERROR_PROVIDER_LIST_EXHAUSTED; } - - chimeID = mChimeSounds[chimeIndex].chimeID; + auto & selectedChime = mChimeSounds[chimeIndex]; + chimeID = selectedChime.chimeID; return CHIP_NO_ERROR; } @@ -60,9 +60,9 @@ Protocols::InteractionModel::Status ChimeManager::PlayChimeSound() } // Get the Active Chime ID - auto activeChimeID = mChimeServer->GetActiveChimeID(); + auto selectedChime = mChimeServer->GetSelectedChime(); // Play chime sound - ChipLogDetail(Zcl, "Playing Chime with sound ID: %u", unsigned(activeChimeID)); + ChipLogDetail(Zcl, "Playing Chime with sound ID: %u", unsigned(selectedChime)); return Protocols::InteractionModel::Status::Success; } diff --git a/src/app/clusters/chime-server/chime-server.cpp b/src/app/clusters/chime-server/chime-server.cpp index 15e39f83b58b3c..d5a7ae989ecbe6 100644 --- a/src/app/clusters/chime-server/chime-server.cpp +++ b/src/app/clusters/chime-server/chime-server.cpp @@ -41,7 +41,7 @@ namespace Clusters { ChimeServer::ChimeServer(EndpointId endpointId, ChimeDelegate & delegate) : AttributeAccessInterface(MakeOptional(endpointId), Chime::Id), CommandHandlerInterface(MakeOptional(endpointId), Chime::Id), - mDelegate(delegate), mActiveChimeID(0), mEnabled(true) + mDelegate(delegate), mSelectedChime(0), mEnabled(true) { mDelegate.SetChimeServer(this); } @@ -68,17 +68,17 @@ CHIP_ERROR ChimeServer::Init() void ChimeServer::LoadPersistentAttributes() { // Load Active Chime ID - uint8_t storedActiveChimeID = 0; + uint8_t storedSelectedChime = 0; CHIP_ERROR err = GetSafeAttributePersistenceProvider()->ReadScalarValue( - ConcreteAttributePath(GetEndpointId(), Chime::Id, ActiveChimeID::Id), storedActiveChimeID); + ConcreteAttributePath(GetEndpointId(), Chime::Id, SelectedChime::Id), storedSelectedChime); if (err == CHIP_NO_ERROR) { - mActiveChimeID = storedActiveChimeID; + mSelectedChime = storedSelectedChime; } else { // otherwise defaults - ChipLogDetail(Zcl, "Chime: Unable to load the ActiveChimeID attribute from the KVS. Defaulting to %u", mActiveChimeID); + ChipLogDetail(Zcl, "Chime: Unable to load the SelectedChime attribute from the KVS. Defaulting to %u", mSelectedChime); } // Load Enabled @@ -103,8 +103,8 @@ CHIP_ERROR ChimeServer::Read(const ConcreteReadAttributePath & aPath, AttributeV switch (aPath.mAttributeId) { - case ActiveChimeID::Id: - ReturnErrorOnFailure(aEncoder.Encode(mActiveChimeID)); + case SelectedChime::Id: + ReturnErrorOnFailure(aEncoder.Encode(mSelectedChime)); break; case Enabled::Id: ReturnErrorOnFailure(aEncoder.Encode(mEnabled)); @@ -119,9 +119,9 @@ CHIP_ERROR ChimeServer::Read(const ConcreteReadAttributePath & aPath, AttributeV return CHIP_NO_ERROR; } -uint8_t ChimeServer::GetActiveChimeID() const +uint8_t ChimeServer::GetSelectedChime() const { - return mActiveChimeID; + return mSelectedChime; } bool ChimeServer::GetEnabled() const @@ -184,10 +184,10 @@ CHIP_ERROR ChimeServer::Write(const ConcreteDataAttributePath & aPath, Attribute switch (aPath.mAttributeId) { - case ActiveChimeID::Id: { + case SelectedChime::Id: { uint8_t newValue; ReturnErrorOnFailure(aDecoder.Decode(newValue)); - status = SetActiveChimeID(newValue); + status = SetSelectedChime(newValue); return StatusIB(status).ToChipError(); } case Enabled::Id: { @@ -203,22 +203,22 @@ CHIP_ERROR ChimeServer::Write(const ConcreteDataAttributePath & aPath, Attribute } } -Status ChimeServer::SetActiveChimeID(uint8_t chimeID) +Status ChimeServer::SetSelectedChime(uint8_t chimeID) { if (!IsSupportedChimeID(chimeID)) { return Protocols::InteractionModel::Status::ConstraintError; } - bool activeIDChanged = !(mActiveChimeID == chimeID); + bool activeIDChanged = !(mSelectedChime == chimeID); if (activeIDChanged) { - mActiveChimeID = chimeID; + mSelectedChime = chimeID; // Write new value to persistent storage. auto endpointId = GetEndpointId(); - ConcreteAttributePath path = ConcreteAttributePath(endpointId, Chime::Id, ActiveChimeID::Id); - GetSafeAttributePersistenceProvider()->WriteScalarValue(path, mActiveChimeID); + ConcreteAttributePath path = ConcreteAttributePath(endpointId, Chime::Id, SelectedChime::Id); + GetSafeAttributePersistenceProvider()->WriteScalarValue(path, mSelectedChime); // and mark as dirty MatterReportingAttributeChangeCallback(path); diff --git a/src/app/clusters/chime-server/chime-server.h b/src/app/clusters/chime-server/chime-server.h index 7e98f741987219..1a125cc591cfbe 100644 --- a/src/app/clusters/chime-server/chime-server.h +++ b/src/app/clusters/chime-server/chime-server.h @@ -53,11 +53,11 @@ class ChimeServer : private AttributeAccessInterface, private CommandHandlerInte // Attribute Setters /** - * Sets the ActiveChimeID attribute. Note, this also handles writing the new value into non-volatile storage. - * @param chimeSoundID The value to which the ActiveChimeID is to be set. + * Sets the SelectedChime attribute. Note, this also handles writing the new value into non-volatile storage. + * @param chimeSoundID The value to which the SelectedChime is to be set. * @return Returns a ConstraintError if the chimeSoundID value is not valid. Returns Success otherwise. */ - Protocols::InteractionModel::Status SetActiveChimeID(uint8_t chimeSoundID); + Protocols::InteractionModel::Status SetSelectedChime(uint8_t chimeSoundID); /** * Sets the Enabled attribute. Note, this also handles writing the new value into non-volatile storage. @@ -67,9 +67,9 @@ class ChimeServer : private AttributeAccessInterface, private CommandHandlerInte // Attribute Getters /** - * @return The Current ActiveChimeID. + * @return The Current SelectedChime. */ - uint8_t GetActiveChimeID() const; + uint8_t GetSelectedChime() const; /** * @return The Enabled attribute.. @@ -95,7 +95,7 @@ class ChimeServer : private AttributeAccessInterface, private CommandHandlerInte ChimeDelegate & mDelegate; // Attribute local storage - uint8_t mActiveChimeID; + uint8_t mSelectedChime; bool mEnabled; // AttributeAccessInterface From 6277afd5e16b2c9af67b6d302ad238ae54d6e5f1 Mon Sep 17 00:00:00 2001 From: marcos <15697303+gmarcosb@users.noreply.github.com> Date: Mon, 27 Jan 2025 14:55:21 -0700 Subject: [PATCH 2/5] Minor updates from spec PR https://github.com/CHIP-Specifications/connectedhomeip-spec/pull/10794 --- ...settings-user-level-management-cluster.xml | 16 ++-- .../zcl/data-model/chip/chime-cluster.xml | 10 +-- .../zcl/data-model/chip/global-enums.xml | 20 +++-- .../tls-certificate-management-cluster.xml | 80 +++++++++++-------- .../chip/zone-management-cluster.xml | 41 ++++++++-- .../zcl/zcl-with-test-extensions.json | 2 +- src/app/zap-templates/zcl/zcl.json | 2 +- 7 files changed, 106 insertions(+), 65 deletions(-) diff --git a/src/app/zap-templates/zcl/data-model/chip/camera-av-settings-user-level-management-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/camera-av-settings-user-level-management-cluster.xml index 660c2dfb58378b..5ffeab7f0fe4a3 100644 --- a/src/app/zap-templates/zcl/data-model/chip/camera-av-settings-user-level-management-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/camera-av-settings-user-level-management-cluster.xml @@ -1,6 +1,6 @@ @@ -33,7 +33,7 @@ Git: 1.4-444-g6d595e737 - + @@ -128,9 +128,9 @@ Git: 1.4-444-g6d595e737 This command SHALL set the values for the pan, tilt, and zoom in the mechanical PTZ. - - - + + + diff --git a/src/app/zap-templates/zcl/data-model/chip/chime-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/chime-cluster.xml index 379caa47ce6469..aecaa713ea09bf 100644 --- a/src/app/zap-templates/zcl/data-model/chip/chime-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/chime-cluster.xml @@ -1,6 +1,6 @@ - + - + Cameras Chime 0x0556 CHIME_CLUSTER @@ -38,7 +38,7 @@ Git: 0.9-fall2024-301-g4e2f0c1c4 true InstalledChimeSounds - ActiveChimeID + SelectedChime Enabled diff --git a/src/app/zap-templates/zcl/data-model/chip/global-enums.xml b/src/app/zap-templates/zcl/data-model/chip/global-enums.xml index 3cc20e25d12cc1..4d1a0c8cc521ae 100644 --- a/src/app/zap-templates/zcl/data-model/chip/global-enums.xml +++ b/src/app/zap-templates/zcl/data-model/chip/global-enums.xml @@ -1,6 +1,6 @@ + - + - @@ -29,10 +34,10 @@ TODO: Make these structures global rather than defining them for each cluster. - - - - + + + + @@ -45,7 +50,6 @@ TODO: Make these structures global rather than defining them for each cluster. - - + - + - + - - + + - + General TLS Certificate Management 0x0801 TLS_CERTIFICATE_MANAGEMENT_CLUSTER @@ -45,96 +45,106 @@ Git: 1.4-534-g3214b3502 true true - MaxRootCertificates - CurrentRootCertificates - MaxClientCertificates - CurrentClientCertificates - - This command SHALL provision the provided certificate for the passed in CAID. + MaxRootCertificates + ProvisionedRootCertificates + MaxClientCertificates + ProvisionedClientCertificates + + This command SHALL provision a newly provided certificate, or rotate an existing one, based on the contents of the CAID field. + This command SHALL be generated in response to a ProvisionRootCertificate command. + - - This command SHALL return the TLSCertStruct for the passed in CAID. + + This command SHALL return the specified TLS root certificate, or all TLS provisioned root certificates, based on the contents of the CAID field. + This command SHALL be generated in response to a FindRootCertificate command. - + + - + This command SHALL return the CAID for the passed in fingerprint. + This command SHALL be generated in response to a LookupRootCertificate command. + - + This command SHALL be generated to request the server removes the certificate provisioned to the provided Certificate Authority ID. + - + This command SHALL be generated to request the Node generates a Certificate Signing Request. + This command SHALL be generated in response to a TLSClientCSR command. + - - This command SHALL be generated to request the Node provisions the provided Client Certificate Details. + + This command SHALL be generated to request the Node provisions newly provided Client Certificate Details, or rotate an existing client certificate. + - - This command SHALL be generated in response to a ProvisionClientCertificate command. - - - - - This command SHALL return the TLSClientCertificateDetailStruct for the passed in CCDID. - + + This command SHALL return the TLSClientCertificateDetailStruct for the passed in CCDID, or all TLS client certificates, based on the contents of the CCDID field. + + - + This command SHALL be generated in response to a FindClientCertificate command. - + + - + This command SHALL return the CCDID for the passed in Fingerprint. + - + This command SHALL be generated in response to a LookupClientCertificate command. + - - This command SHALL be generated to request the Node removes the certificate provisioned to the provided Client Certificate Details ID. + + This command SHALL be used to request the Node removes all stored information for the provided CCDID. + diff --git a/src/app/zap-templates/zcl/data-model/chip/zone-management-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/zone-management-cluster.xml index 32e9a4b18ad4b0..346f88fc10e538 100644 --- a/src/app/zap-templates/zcl/data-model/chip/zone-management-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/zone-management-cluster.xml @@ -1,6 +1,6 @@ @@ -88,7 +88,7 @@ Git: 1.4-282-gad46b0990 - + Measurement & Sensing Zone Management 0x0550 ZONE_MANAGEMENT_CLUSTER @@ -96,7 +96,7 @@ Git: 1.4-282-gad46b0990 true - + @@ -105,18 +105,36 @@ Git: 1.4-282-gad46b0990 true SupportedZoneSources - Zones + + Zones + + + + Triggers - Sensitivity + + Sensitivity + + + + + + This command SHALL create and store a TwoD Cartesian Zone. + + + - + + + + @@ -124,17 +142,26 @@ Git: 1.4-282-gad46b0990 + + + The GetTwoDCartesianZone SHALL return the TwoD Cartesian Zone for the passed in ZoneID. + + + This command SHALL be generated in response to a GetTwoDCartesianZone command. + + + 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 43429ded05e994..ac5d374d2a7cc1 100644 --- a/src/app/zap-templates/zcl/zcl-with-test-extensions.json +++ b/src/app/zap-templates/zcl/zcl-with-test-extensions.json @@ -201,7 +201,7 @@ "MaxPathsPerInvoke" ], "Bridged Device Basic Information": ["ProductAppearance"], - "Chime": ["ActiveChimeID", "Enabled"], + "Chime": ["SelectedChime", "Enabled"], "Closure Control": ["OverallState", "OverallTarget"], "Descriptor": ["ClusterRevision", "FeatureMap"], "Device Energy Management": [ diff --git a/src/app/zap-templates/zcl/zcl.json b/src/app/zap-templates/zcl/zcl.json index 02bcefbb0cbac1..9735cc7f34b953 100644 --- a/src/app/zap-templates/zcl/zcl.json +++ b/src/app/zap-templates/zcl/zcl.json @@ -195,7 +195,7 @@ "MaxPathsPerInvoke" ], "Bridged Device Basic Information": ["ProductAppearance"], - "Chime": ["ActiveChimeID", "Enabled"], + "Chime": ["SelectedChime", "Enabled"], "Closure Control": ["OverallState", "OverallTarget"], "Descriptor": ["ClusterRevision", "FeatureMap"], "Device Energy Management": [ From fdff3e952abfc4fcd3447135032189da230a656c Mon Sep 17 00:00:00 2001 From: marcos <15697303+gmarcosb@users.noreply.github.com> Date: Tue, 4 Mar 2025 15:30:36 -0700 Subject: [PATCH 3/5] Run ZAP tool --- .../all-clusters-common/all-clusters-app.zap | 14 +++++++------- .../tools/zap/tests/inputs/all-clusters-app.zap | 14 +++++++------- 2 files changed, 14 insertions(+), 14 deletions(-) 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 f6d5b34380fb84..81c87093397979 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 @@ -20987,14 +20987,14 @@ "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "ActiveChimeID", + "name": "SelectedChime", "code": 1, "mfgCode": null, "side": "server", @@ -21003,7 +21003,7 @@ "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -21019,7 +21019,7 @@ "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -21035,7 +21035,7 @@ "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -21051,7 +21051,7 @@ "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -21067,7 +21067,7 @@ "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, diff --git a/scripts/tools/zap/tests/inputs/all-clusters-app.zap b/scripts/tools/zap/tests/inputs/all-clusters-app.zap index 0712185d6f8c99..9f9b8f7f64709d 100644 --- a/scripts/tools/zap/tests/inputs/all-clusters-app.zap +++ b/scripts/tools/zap/tests/inputs/all-clusters-app.zap @@ -20480,14 +20480,14 @@ "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "ActiveChimeID", + "name": "SelectedChime", "code": 1, "mfgCode": null, "side": "server", @@ -20496,7 +20496,7 @@ "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -20512,7 +20512,7 @@ "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -20528,7 +20528,7 @@ "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -20544,7 +20544,7 @@ "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -20560,7 +20560,7 @@ "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, From 20689bee1481b262cddd69feaadb5360a95d8592 Mon Sep 17 00:00:00 2001 From: marcos <15697303+gmarcosb@users.noreply.github.com> Date: Thu, 6 Mar 2025 10:30:37 -0700 Subject: [PATCH 4/5] Generated using ./scripts/tools/zap_regen_all.py --- .../air-purifier-app.matter | 8 +- .../air-quality-sensor-app.matter | 8 +- .../all-clusters-app.matter | 12 +- .../all-clusters-minimal-app.matter | 8 +- .../bridge-common/bridge-app.matter | 8 +- .../camera-common/camera-app.matter | 12 +- ...p_rootnode_dimmablelight_bCwGYSDpoe.matter | 8 +- .../rootnode_airpurifier_73a6fe2651.matter | 8 +- ...umiditysensor_thermostat_56de3d5f45.matter | 8 +- ...ootnode_airqualitysensor_e63187f6c9.matter | 8 +- ...ootnode_basicvideoplayer_0ff86e943b.matter | 8 +- ...de_colortemperaturelight_hbUnzYVeyn.matter | 8 +- .../rootnode_contactsensor_27f76aeaf5.matter | 8 +- .../rootnode_contactsensor_lFAGG1bfRO.matter | 8 +- ...ualitysensor_powersource_367e7cea91.matter | 8 +- .../rootnode_dimmablelight_bCwGYSDpoe.matter | 8 +- ...tnode_dimmablepluginunit_f8a9a0b9d4.matter | 8 +- .../rootnode_dishwasher_cc105034fe.matter | 8 +- .../rootnode_doorlock_aNKYAreMXE.matter | 8 +- ...tnode_extendedcolorlight_8lcaaYJVAa.matter | 8 +- .../devices/rootnode_fan_7N2TobIlOX.matter | 8 +- .../rootnode_flowsensor_1zVxHedlaV.matter | 8 +- .../rootnode_genericswitch_2dfff6e516.matter | 8 +- .../rootnode_genericswitch_9866e35d0b.matter | 8 +- ...tnode_heatingcoolingunit_ncdGai1E5a.matter | 8 +- .../rootnode_heatpump_87ivjRAECh.matter | 8 +- .../rootnode_humiditysensor_Xyj4gda6Hb.matter | 8 +- .../rootnode_laundrydryer_01796fe396.matter | 8 +- .../rootnode_laundrywasher_fb10d238c8.matter | 8 +- .../rootnode_lightsensor_lZQycTFcJK.matter | 8 +- ...rootnode_occupancysensor_iHyVgifZuo.matter | 8 +- .../rootnode_onofflight_bbs1b7IaOV.matter | 8 +- .../rootnode_onofflight_samplemei.matter | 8 +- ...ootnode_onofflightswitch_FsPlMr090Q.matter | 8 +- ...rootnode_onoffpluginunit_Wtf8ss5EBY.matter | 8 +- .../rootnode_pressuresensor_s0qC9wLH4k.matter | 8 +- .../devices/rootnode_pump_5f904818cc.matter | 8 +- .../devices/rootnode_pump_a811bb33a0.matter | 8 +- .../rootnode_rainsensor_a7aa5d7738.matter | 8 +- ...eraturecontrolledcabinet_ffdb696680.matter | 8 +- ...ode_roboticvacuumcleaner_1807ff0c49.matter | 8 +- ...tnode_roomairconditioner_9cf3607804.matter | 8 +- .../rootnode_smokecoalarm_686fe0dcb8.matter | 8 +- .../rootnode_speaker_RpzeXdimqA.matter | 8 +- ...otnode_temperaturesensor_Qy1zkNW7c3.matter | 8 +- .../rootnode_thermostat_bm3fb8dhYi.matter | 8 +- ...node_waterfreezedetector_dd94a13a16.matter | 8 +- ...otnode_waterleakdetector_0b067acfa3.matter | 8 +- .../rootnode_watervalve_6bb39f1f67.matter | 8 +- .../rootnode_windowcovering_RLCxaGi9Yx.matter | 8 +- .../closure-common/closure-app.matter | 8 +- .../data_model/contact-sensor-app.matter | 8 +- .../contact-sensor-app.matter | 8 +- .../nxp/zap-lit/contact-sensor-app.matter | 8 +- .../nxp/zap-sit/contact-sensor-app.matter | 8 +- .../dishwasher-common/dishwasher-app.matter | 8 +- .../data_model/dishwasher-thread-app.matter | 8 +- .../data_model/dishwasher-wifi-app.matter | 8 +- .../energy-management-app.matter | 8 +- .../fabric-bridge-app.matter | 8 +- .../fabric-sync/bridge/fabric-bridge.matter | 8 +- .../nxp/zap/laundry-washer-app.matter | 8 +- .../icd-lit-light-switch-app.matter | 8 +- .../light-switch-app.matter | 8 +- .../light-switch-app/qpg/zap/switch.matter | 8 +- .../lighting-common/lighting-app.matter | 8 +- .../data_model/lighting-app-ethernet.matter | 8 +- .../data_model/lighting-app-thread.matter | 8 +- .../data_model/lighting-app-wifi.matter | 8 +- .../lighting-common/lighting-app.matter | 8 +- .../nxp/zap/lighting-on-off.matter | 8 +- examples/lighting-app/qpg/zap/light.matter | 8 +- .../data_model/lighting-thread-app.matter | 8 +- .../data_model/lighting-wifi-app.matter | 8 +- .../lit-icd-common/lit-icd-server-app.matter | 8 +- examples/lock-app/lock-common/lock-app.matter | 8 +- examples/lock-app/nxp/zap/lock-app.matter | 8 +- examples/lock-app/qpg/zap/lock.matter | 8 +- .../silabs/data_model/lock-app.matter | 8 +- .../log-source-common/log-source-app.matter | 8 +- .../microwave-oven-app.matter | 8 +- .../network-manager-app.matter | 8 +- .../ota-provider-app.matter | 8 +- .../ota-requestor-app.matter | 8 +- .../placeholder/linux/apps/app1/config.matter | 8 +- .../placeholder/linux/apps/app2/config.matter | 8 +- examples/pump-app/pump-common/pump-app.matter | 8 +- .../silabs/data_model/pump-thread-app.matter | 8 +- .../silabs/data_model/pump-wifi-app.matter | 8 +- .../pump-controller-app.matter | 8 +- .../refrigerator-app.matter | 8 +- .../data_model/refrigerator-thread-app.matter | 8 +- .../data_model/refrigerator-wifi-app.matter | 8 +- examples/rvc-app/rvc-common/rvc-app.matter | 8 +- .../smoke-co-alarm-app.matter | 8 +- .../temperature-measurement.matter | 8 +- .../terms-and-conditions-app.matter | 8 +- .../nxp/zap/thermostat_matter_br.matter | 8 +- .../nxp/zap/thermostat_matter_thread.matter | 8 +- .../nxp/zap/thermostat_matter_wifi.matter | 8 +- .../qpg/zap/thermostaticRadiatorValve.matter | 8 +- .../thermostat-common/thermostat.matter | 8 +- .../thread-br-common/thread-br-app.matter | 8 +- examples/tv-app/tv-common/tv-app.matter | 8 +- .../tv-casting-common/tv-casting-app.matter | 8 +- .../virtual-device-app.matter | 8 +- .../water-leak-detector-app.matter | 8 +- examples/window-app/common/window-app.matter | 8 +- .../app-templates/endpoint_config.h | 4 +- .../data_model/controller-clusters.matter | 58 +++--- .../chip/devicecontroller/ChipClusters.java | 106 +++++----- .../chip/devicecontroller/ChipStructs.java | 34 ++-- .../devicecontroller/ClusterIDMapping.java | 12 +- .../devicecontroller/ClusterInfoMapping.java | 72 ++++--- .../devicecontroller/ClusterReadMapping.java | 38 ++-- .../devicecontroller/ClusterWriteMapping.java | 16 +- ...rtificateManagementClusterTLSCertStruct.kt | 18 +- ...ClusterTLSClientCertificateDetailStruct.kt | 46 +++-- .../cluster/clusters/ChimeCluster.kt | 10 +- .../TlsCertificateManagementCluster.kt | 150 ++++++++++----- ...rtificateManagementClusterTLSCertStruct.kt | 18 +- ...ClusterTLSClientCertificateDetailStruct.kt | 46 +++-- .../CHIPAttributeTLVValueDecoder.cpp | 170 ++++++++++++++-- .../python/chip/clusters/CHIPClusters.py | 22 +-- .../python/chip/clusters/Objects.py | 78 +++----- .../MTRAttributeSpecifiedCheck.mm | 6 +- .../MTRAttributeTLVValueDecoder.mm | 82 +++++++- .../CHIP/zap-generated/MTRBaseClusters.h | 50 ++--- .../CHIP/zap-generated/MTRBaseClusters.mm | 58 +++--- .../CHIP/zap-generated/MTRClusterConstants.h | 17 +- .../CHIP/zap-generated/MTRClusterNames.mm | 16 +- .../CHIP/zap-generated/MTRClusters.h | 12 +- .../CHIP/zap-generated/MTRClusters.mm | 26 +-- .../zap-generated/MTRCommandPayloadsObjc.h | 21 +- .../zap-generated/MTRCommandPayloadsObjc.mm | 174 ++++++----------- .../MTRCommandPayloads_Internal.h | 6 - .../CHIP/zap-generated/MTRStructsObjc.h | 6 +- .../CHIP/zap-generated/MTRStructsObjc.mm | 6 +- .../zap-generated/attributes/Accessors.cpp | 94 --------- .../zap-generated/attributes/Accessors.h | 12 -- .../zap-generated/cluster-enums-check.h | 2 +- .../app-common/zap-generated/cluster-enums.h | 8 +- .../zap-generated/cluster-objects.cpp | 137 +++++++++---- .../zap-generated/cluster-objects.h | 98 ++++------ .../app-common/zap-generated/ids/Attributes.h | 12 +- .../app-common/zap-generated/ids/Commands.h | 14 +- .../zap-generated/cluster/Commands.h | 46 +++-- .../cluster/ComplexArgumentParser.cpp | 30 +-- .../cluster/logging/DataModelLogger.cpp | 34 ++-- .../cluster/logging/DataModelLogger.h | 3 - .../cluster/logging/EntryToText.cpp | 14 +- .../zap-generated/cluster/Commands.h | 182 +++++++++--------- 152 files changed, 1529 insertions(+), 1407 deletions(-) diff --git a/examples/air-purifier-app/air-purifier-common/air-purifier-app.matter b/examples/air-purifier-app/air-purifier-common/air-purifier-app.matter index 595479d4f0cd07..f7960ccfe7fe20 100644 --- a/examples/air-purifier-app/air-purifier-common/air-purifier-app.matter +++ b/examples/air-purifier-app/air-purifier-common/air-purifier-app.matter @@ -213,10 +213,10 @@ enum TestGlobalEnum : enum8 { } enum ThreeLevelAutoEnum : enum8 { - kLow = 0; - kMedium = 1; - kHigh = 2; - kAutomatic = 3; + kAuto = 0; + kLow = 1; + kMedium = 2; + kHigh = 3; } bitmap TestGlobalBitmap : bitmap32 { diff --git a/examples/air-quality-sensor-app/air-quality-sensor-common/air-quality-sensor-app.matter b/examples/air-quality-sensor-app/air-quality-sensor-common/air-quality-sensor-app.matter index 657eb0dd3de8c7..bddd8222f8cf27 100644 --- a/examples/air-quality-sensor-app/air-quality-sensor-common/air-quality-sensor-app.matter +++ b/examples/air-quality-sensor-app/air-quality-sensor-common/air-quality-sensor-app.matter @@ -213,10 +213,10 @@ enum TestGlobalEnum : enum8 { } enum ThreeLevelAutoEnum : enum8 { - kLow = 0; - kMedium = 1; - kHigh = 2; - kAutomatic = 3; + kAuto = 0; + kLow = 1; + kMedium = 2; + kHigh = 3; } bitmap TestGlobalBitmap : bitmap32 { 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 1da37a2ac8a4cb..25926260acd84d 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 @@ -213,10 +213,10 @@ enum TestGlobalEnum : enum8 { } enum ThreeLevelAutoEnum : enum8 { - kLow = 0; - kMedium = 1; - kHigh = 2; - kAutomatic = 3; + kAuto = 0; + kLow = 1; + kMedium = 2; + kHigh = 3; } bitmap TestGlobalBitmap : bitmap32 { @@ -7024,7 +7024,7 @@ provisional cluster Chime = 1366 { } readonly attribute ChimeSoundStruct installedChimeSounds[] = 0; - attribute int8u activeChimeID = 1; + attribute int8u selectedChime = 1; attribute boolean enabled = 2; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; @@ -9315,7 +9315,7 @@ endpoint 1 { server cluster Chime { callback attribute installedChimeSounds; - callback attribute activeChimeID; + callback attribute selectedChime; callback attribute enabled; callback attribute generatedCommandList; callback attribute acceptedCommandList; 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 c12100f4b94ccf..55e5b3b0441bc6 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 @@ -213,10 +213,10 @@ enum TestGlobalEnum : enum8 { } enum ThreeLevelAutoEnum : enum8 { - kLow = 0; - kMedium = 1; - kHigh = 2; - kAutomatic = 3; + kAuto = 0; + kLow = 1; + kMedium = 2; + kHigh = 3; } bitmap TestGlobalBitmap : bitmap32 { diff --git a/examples/bridge-app/bridge-common/bridge-app.matter b/examples/bridge-app/bridge-common/bridge-app.matter index 0663c6a35ccca3..da5e5107d94ab5 100644 --- a/examples/bridge-app/bridge-common/bridge-app.matter +++ b/examples/bridge-app/bridge-common/bridge-app.matter @@ -213,10 +213,10 @@ enum TestGlobalEnum : enum8 { } enum ThreeLevelAutoEnum : enum8 { - kLow = 0; - kMedium = 1; - kHigh = 2; - kAutomatic = 3; + kAuto = 0; + kLow = 1; + kMedium = 2; + kHigh = 3; } bitmap TestGlobalBitmap : bitmap32 { diff --git a/examples/camera-app/camera-common/camera-app.matter b/examples/camera-app/camera-common/camera-app.matter index c9f84a61375cb7..9d44c5730189f2 100644 --- a/examples/camera-app/camera-common/camera-app.matter +++ b/examples/camera-app/camera-common/camera-app.matter @@ -213,10 +213,10 @@ enum TestGlobalEnum : enum8 { } enum ThreeLevelAutoEnum : enum8 { - kLow = 0; - kMedium = 1; - kHigh = 2; - kAutomatic = 3; + kAuto = 0; + kLow = 1; + kMedium = 2; + kHigh = 3; } bitmap TestGlobalBitmap : bitmap32 { @@ -2129,7 +2129,7 @@ provisional cluster Chime = 1366 { } readonly attribute ChimeSoundStruct installedChimeSounds[] = 0; - attribute int8u activeChimeID = 1; + attribute int8u selectedChime = 1; attribute boolean enabled = 2; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; @@ -2583,7 +2583,7 @@ endpoint 1 { server cluster Chime { callback attribute installedChimeSounds; - callback attribute activeChimeID; + callback attribute selectedChime; callback attribute enabled; callback attribute generatedCommandList; callback attribute acceptedCommandList; diff --git a/examples/chef/devices/noip_rootnode_dimmablelight_bCwGYSDpoe.matter b/examples/chef/devices/noip_rootnode_dimmablelight_bCwGYSDpoe.matter index 1d3d3a0e1c12f1..391c73a2c995e5 100644 --- a/examples/chef/devices/noip_rootnode_dimmablelight_bCwGYSDpoe.matter +++ b/examples/chef/devices/noip_rootnode_dimmablelight_bCwGYSDpoe.matter @@ -213,10 +213,10 @@ enum TestGlobalEnum : enum8 { } enum ThreeLevelAutoEnum : enum8 { - kLow = 0; - kMedium = 1; - kHigh = 2; - kAutomatic = 3; + kAuto = 0; + kLow = 1; + kMedium = 2; + kHigh = 3; } bitmap TestGlobalBitmap : bitmap32 { diff --git a/examples/chef/devices/rootnode_airpurifier_73a6fe2651.matter b/examples/chef/devices/rootnode_airpurifier_73a6fe2651.matter index 440fcd9a67f21e..e2d379f86c0bb0 100644 --- a/examples/chef/devices/rootnode_airpurifier_73a6fe2651.matter +++ b/examples/chef/devices/rootnode_airpurifier_73a6fe2651.matter @@ -213,10 +213,10 @@ enum TestGlobalEnum : enum8 { } enum ThreeLevelAutoEnum : enum8 { - kLow = 0; - kMedium = 1; - kHigh = 2; - kAutomatic = 3; + kAuto = 0; + kLow = 1; + kMedium = 2; + kHigh = 3; } bitmap TestGlobalBitmap : bitmap32 { diff --git a/examples/chef/devices/rootnode_airpurifier_airqualitysensor_temperaturesensor_humiditysensor_thermostat_56de3d5f45.matter b/examples/chef/devices/rootnode_airpurifier_airqualitysensor_temperaturesensor_humiditysensor_thermostat_56de3d5f45.matter index 42938c10e5d604..7cb95430a5d9c9 100644 --- a/examples/chef/devices/rootnode_airpurifier_airqualitysensor_temperaturesensor_humiditysensor_thermostat_56de3d5f45.matter +++ b/examples/chef/devices/rootnode_airpurifier_airqualitysensor_temperaturesensor_humiditysensor_thermostat_56de3d5f45.matter @@ -213,10 +213,10 @@ enum TestGlobalEnum : enum8 { } enum ThreeLevelAutoEnum : enum8 { - kLow = 0; - kMedium = 1; - kHigh = 2; - kAutomatic = 3; + kAuto = 0; + kLow = 1; + kMedium = 2; + kHigh = 3; } bitmap TestGlobalBitmap : bitmap32 { diff --git a/examples/chef/devices/rootnode_airqualitysensor_e63187f6c9.matter b/examples/chef/devices/rootnode_airqualitysensor_e63187f6c9.matter index 9a906bd15b300f..1419631bc58969 100644 --- a/examples/chef/devices/rootnode_airqualitysensor_e63187f6c9.matter +++ b/examples/chef/devices/rootnode_airqualitysensor_e63187f6c9.matter @@ -213,10 +213,10 @@ enum TestGlobalEnum : enum8 { } enum ThreeLevelAutoEnum : enum8 { - kLow = 0; - kMedium = 1; - kHigh = 2; - kAutomatic = 3; + kAuto = 0; + kLow = 1; + kMedium = 2; + kHigh = 3; } bitmap TestGlobalBitmap : bitmap32 { diff --git a/examples/chef/devices/rootnode_basicvideoplayer_0ff86e943b.matter b/examples/chef/devices/rootnode_basicvideoplayer_0ff86e943b.matter index 77bf67dbd57c34..a24ad5b84b9cae 100644 --- a/examples/chef/devices/rootnode_basicvideoplayer_0ff86e943b.matter +++ b/examples/chef/devices/rootnode_basicvideoplayer_0ff86e943b.matter @@ -213,10 +213,10 @@ enum TestGlobalEnum : enum8 { } enum ThreeLevelAutoEnum : enum8 { - kLow = 0; - kMedium = 1; - kHigh = 2; - kAutomatic = 3; + kAuto = 0; + kLow = 1; + kMedium = 2; + kHigh = 3; } bitmap TestGlobalBitmap : bitmap32 { diff --git a/examples/chef/devices/rootnode_colortemperaturelight_hbUnzYVeyn.matter b/examples/chef/devices/rootnode_colortemperaturelight_hbUnzYVeyn.matter index 5060c56a7aa2f1..4bb8b5d8e28832 100644 --- a/examples/chef/devices/rootnode_colortemperaturelight_hbUnzYVeyn.matter +++ b/examples/chef/devices/rootnode_colortemperaturelight_hbUnzYVeyn.matter @@ -213,10 +213,10 @@ enum TestGlobalEnum : enum8 { } enum ThreeLevelAutoEnum : enum8 { - kLow = 0; - kMedium = 1; - kHigh = 2; - kAutomatic = 3; + kAuto = 0; + kLow = 1; + kMedium = 2; + kHigh = 3; } bitmap TestGlobalBitmap : bitmap32 { diff --git a/examples/chef/devices/rootnode_contactsensor_27f76aeaf5.matter b/examples/chef/devices/rootnode_contactsensor_27f76aeaf5.matter index a81cddf497a3d1..284f75435366c3 100644 --- a/examples/chef/devices/rootnode_contactsensor_27f76aeaf5.matter +++ b/examples/chef/devices/rootnode_contactsensor_27f76aeaf5.matter @@ -213,10 +213,10 @@ enum TestGlobalEnum : enum8 { } enum ThreeLevelAutoEnum : enum8 { - kLow = 0; - kMedium = 1; - kHigh = 2; - kAutomatic = 3; + kAuto = 0; + kLow = 1; + kMedium = 2; + kHigh = 3; } bitmap TestGlobalBitmap : bitmap32 { diff --git a/examples/chef/devices/rootnode_contactsensor_lFAGG1bfRO.matter b/examples/chef/devices/rootnode_contactsensor_lFAGG1bfRO.matter index b12c00032847ad..66a3dd57e8c024 100644 --- a/examples/chef/devices/rootnode_contactsensor_lFAGG1bfRO.matter +++ b/examples/chef/devices/rootnode_contactsensor_lFAGG1bfRO.matter @@ -213,10 +213,10 @@ enum TestGlobalEnum : enum8 { } enum ThreeLevelAutoEnum : enum8 { - kLow = 0; - kMedium = 1; - kHigh = 2; - kAutomatic = 3; + kAuto = 0; + kLow = 1; + kMedium = 2; + kHigh = 3; } bitmap TestGlobalBitmap : bitmap32 { diff --git a/examples/chef/devices/rootnode_contactsensor_lightsensor_occupancysensor_temperaturesensor_pressuresensor_flowsensor_humiditysensor_airqualitysensor_powersource_367e7cea91.matter b/examples/chef/devices/rootnode_contactsensor_lightsensor_occupancysensor_temperaturesensor_pressuresensor_flowsensor_humiditysensor_airqualitysensor_powersource_367e7cea91.matter index cee1038f2cb80c..e2efdc50628aac 100644 --- a/examples/chef/devices/rootnode_contactsensor_lightsensor_occupancysensor_temperaturesensor_pressuresensor_flowsensor_humiditysensor_airqualitysensor_powersource_367e7cea91.matter +++ b/examples/chef/devices/rootnode_contactsensor_lightsensor_occupancysensor_temperaturesensor_pressuresensor_flowsensor_humiditysensor_airqualitysensor_powersource_367e7cea91.matter @@ -213,10 +213,10 @@ enum TestGlobalEnum : enum8 { } enum ThreeLevelAutoEnum : enum8 { - kLow = 0; - kMedium = 1; - kHigh = 2; - kAutomatic = 3; + kAuto = 0; + kLow = 1; + kMedium = 2; + kHigh = 3; } bitmap TestGlobalBitmap : bitmap32 { diff --git a/examples/chef/devices/rootnode_dimmablelight_bCwGYSDpoe.matter b/examples/chef/devices/rootnode_dimmablelight_bCwGYSDpoe.matter index 62ea79ca189dba..c4901e847b326a 100644 --- a/examples/chef/devices/rootnode_dimmablelight_bCwGYSDpoe.matter +++ b/examples/chef/devices/rootnode_dimmablelight_bCwGYSDpoe.matter @@ -213,10 +213,10 @@ enum TestGlobalEnum : enum8 { } enum ThreeLevelAutoEnum : enum8 { - kLow = 0; - kMedium = 1; - kHigh = 2; - kAutomatic = 3; + kAuto = 0; + kLow = 1; + kMedium = 2; + kHigh = 3; } bitmap TestGlobalBitmap : bitmap32 { diff --git a/examples/chef/devices/rootnode_dimmablepluginunit_f8a9a0b9d4.matter b/examples/chef/devices/rootnode_dimmablepluginunit_f8a9a0b9d4.matter index fb89da8108f26a..6395f513f93d44 100644 --- a/examples/chef/devices/rootnode_dimmablepluginunit_f8a9a0b9d4.matter +++ b/examples/chef/devices/rootnode_dimmablepluginunit_f8a9a0b9d4.matter @@ -213,10 +213,10 @@ enum TestGlobalEnum : enum8 { } enum ThreeLevelAutoEnum : enum8 { - kLow = 0; - kMedium = 1; - kHigh = 2; - kAutomatic = 3; + kAuto = 0; + kLow = 1; + kMedium = 2; + kHigh = 3; } bitmap TestGlobalBitmap : bitmap32 { diff --git a/examples/chef/devices/rootnode_dishwasher_cc105034fe.matter b/examples/chef/devices/rootnode_dishwasher_cc105034fe.matter index 989a4d0a5a8d18..aa95dae3186367 100644 --- a/examples/chef/devices/rootnode_dishwasher_cc105034fe.matter +++ b/examples/chef/devices/rootnode_dishwasher_cc105034fe.matter @@ -213,10 +213,10 @@ enum TestGlobalEnum : enum8 { } enum ThreeLevelAutoEnum : enum8 { - kLow = 0; - kMedium = 1; - kHigh = 2; - kAutomatic = 3; + kAuto = 0; + kLow = 1; + kMedium = 2; + kHigh = 3; } bitmap TestGlobalBitmap : bitmap32 { diff --git a/examples/chef/devices/rootnode_doorlock_aNKYAreMXE.matter b/examples/chef/devices/rootnode_doorlock_aNKYAreMXE.matter index 75f78a59789147..22d1f064688e9e 100644 --- a/examples/chef/devices/rootnode_doorlock_aNKYAreMXE.matter +++ b/examples/chef/devices/rootnode_doorlock_aNKYAreMXE.matter @@ -213,10 +213,10 @@ enum TestGlobalEnum : enum8 { } enum ThreeLevelAutoEnum : enum8 { - kLow = 0; - kMedium = 1; - kHigh = 2; - kAutomatic = 3; + kAuto = 0; + kLow = 1; + kMedium = 2; + kHigh = 3; } bitmap TestGlobalBitmap : bitmap32 { diff --git a/examples/chef/devices/rootnode_extendedcolorlight_8lcaaYJVAa.matter b/examples/chef/devices/rootnode_extendedcolorlight_8lcaaYJVAa.matter index a00fb1cf21124d..482715546279f9 100644 --- a/examples/chef/devices/rootnode_extendedcolorlight_8lcaaYJVAa.matter +++ b/examples/chef/devices/rootnode_extendedcolorlight_8lcaaYJVAa.matter @@ -213,10 +213,10 @@ enum TestGlobalEnum : enum8 { } enum ThreeLevelAutoEnum : enum8 { - kLow = 0; - kMedium = 1; - kHigh = 2; - kAutomatic = 3; + kAuto = 0; + kLow = 1; + kMedium = 2; + kHigh = 3; } bitmap TestGlobalBitmap : bitmap32 { diff --git a/examples/chef/devices/rootnode_fan_7N2TobIlOX.matter b/examples/chef/devices/rootnode_fan_7N2TobIlOX.matter index 7897235c8ae891..a88c720c33275f 100644 --- a/examples/chef/devices/rootnode_fan_7N2TobIlOX.matter +++ b/examples/chef/devices/rootnode_fan_7N2TobIlOX.matter @@ -213,10 +213,10 @@ enum TestGlobalEnum : enum8 { } enum ThreeLevelAutoEnum : enum8 { - kLow = 0; - kMedium = 1; - kHigh = 2; - kAutomatic = 3; + kAuto = 0; + kLow = 1; + kMedium = 2; + kHigh = 3; } bitmap TestGlobalBitmap : bitmap32 { diff --git a/examples/chef/devices/rootnode_flowsensor_1zVxHedlaV.matter b/examples/chef/devices/rootnode_flowsensor_1zVxHedlaV.matter index ff5eb4bd9956b8..f71eb3592481f2 100644 --- a/examples/chef/devices/rootnode_flowsensor_1zVxHedlaV.matter +++ b/examples/chef/devices/rootnode_flowsensor_1zVxHedlaV.matter @@ -213,10 +213,10 @@ enum TestGlobalEnum : enum8 { } enum ThreeLevelAutoEnum : enum8 { - kLow = 0; - kMedium = 1; - kHigh = 2; - kAutomatic = 3; + kAuto = 0; + kLow = 1; + kMedium = 2; + kHigh = 3; } bitmap TestGlobalBitmap : bitmap32 { diff --git a/examples/chef/devices/rootnode_genericswitch_2dfff6e516.matter b/examples/chef/devices/rootnode_genericswitch_2dfff6e516.matter index ce3f2f2fcc6470..23a0f88e79d85a 100644 --- a/examples/chef/devices/rootnode_genericswitch_2dfff6e516.matter +++ b/examples/chef/devices/rootnode_genericswitch_2dfff6e516.matter @@ -213,10 +213,10 @@ enum TestGlobalEnum : enum8 { } enum ThreeLevelAutoEnum : enum8 { - kLow = 0; - kMedium = 1; - kHigh = 2; - kAutomatic = 3; + kAuto = 0; + kLow = 1; + kMedium = 2; + kHigh = 3; } bitmap TestGlobalBitmap : bitmap32 { diff --git a/examples/chef/devices/rootnode_genericswitch_9866e35d0b.matter b/examples/chef/devices/rootnode_genericswitch_9866e35d0b.matter index aa01b0db05195c..ab47b3925cc59a 100644 --- a/examples/chef/devices/rootnode_genericswitch_9866e35d0b.matter +++ b/examples/chef/devices/rootnode_genericswitch_9866e35d0b.matter @@ -213,10 +213,10 @@ enum TestGlobalEnum : enum8 { } enum ThreeLevelAutoEnum : enum8 { - kLow = 0; - kMedium = 1; - kHigh = 2; - kAutomatic = 3; + kAuto = 0; + kLow = 1; + kMedium = 2; + kHigh = 3; } bitmap TestGlobalBitmap : bitmap32 { diff --git a/examples/chef/devices/rootnode_heatingcoolingunit_ncdGai1E5a.matter b/examples/chef/devices/rootnode_heatingcoolingunit_ncdGai1E5a.matter index 9663c2dbaac876..0cb9128f26971d 100644 --- a/examples/chef/devices/rootnode_heatingcoolingunit_ncdGai1E5a.matter +++ b/examples/chef/devices/rootnode_heatingcoolingunit_ncdGai1E5a.matter @@ -213,10 +213,10 @@ enum TestGlobalEnum : enum8 { } enum ThreeLevelAutoEnum : enum8 { - kLow = 0; - kMedium = 1; - kHigh = 2; - kAutomatic = 3; + kAuto = 0; + kLow = 1; + kMedium = 2; + kHigh = 3; } bitmap TestGlobalBitmap : bitmap32 { diff --git a/examples/chef/devices/rootnode_heatpump_87ivjRAECh.matter b/examples/chef/devices/rootnode_heatpump_87ivjRAECh.matter index 0f1a502da0c5e7..3ece660adfca3e 100644 --- a/examples/chef/devices/rootnode_heatpump_87ivjRAECh.matter +++ b/examples/chef/devices/rootnode_heatpump_87ivjRAECh.matter @@ -213,10 +213,10 @@ enum TestGlobalEnum : enum8 { } enum ThreeLevelAutoEnum : enum8 { - kLow = 0; - kMedium = 1; - kHigh = 2; - kAutomatic = 3; + kAuto = 0; + kLow = 1; + kMedium = 2; + kHigh = 3; } bitmap TestGlobalBitmap : bitmap32 { diff --git a/examples/chef/devices/rootnode_humiditysensor_Xyj4gda6Hb.matter b/examples/chef/devices/rootnode_humiditysensor_Xyj4gda6Hb.matter index 3137d781599f80..f689613e7db0e0 100644 --- a/examples/chef/devices/rootnode_humiditysensor_Xyj4gda6Hb.matter +++ b/examples/chef/devices/rootnode_humiditysensor_Xyj4gda6Hb.matter @@ -213,10 +213,10 @@ enum TestGlobalEnum : enum8 { } enum ThreeLevelAutoEnum : enum8 { - kLow = 0; - kMedium = 1; - kHigh = 2; - kAutomatic = 3; + kAuto = 0; + kLow = 1; + kMedium = 2; + kHigh = 3; } bitmap TestGlobalBitmap : bitmap32 { diff --git a/examples/chef/devices/rootnode_laundrydryer_01796fe396.matter b/examples/chef/devices/rootnode_laundrydryer_01796fe396.matter index 2bdcb8e8e2b19d..10d19da2a772e1 100644 --- a/examples/chef/devices/rootnode_laundrydryer_01796fe396.matter +++ b/examples/chef/devices/rootnode_laundrydryer_01796fe396.matter @@ -213,10 +213,10 @@ enum TestGlobalEnum : enum8 { } enum ThreeLevelAutoEnum : enum8 { - kLow = 0; - kMedium = 1; - kHigh = 2; - kAutomatic = 3; + kAuto = 0; + kLow = 1; + kMedium = 2; + kHigh = 3; } bitmap TestGlobalBitmap : bitmap32 { diff --git a/examples/chef/devices/rootnode_laundrywasher_fb10d238c8.matter b/examples/chef/devices/rootnode_laundrywasher_fb10d238c8.matter index c3af096ca25e06..10af26d38c8276 100644 --- a/examples/chef/devices/rootnode_laundrywasher_fb10d238c8.matter +++ b/examples/chef/devices/rootnode_laundrywasher_fb10d238c8.matter @@ -213,10 +213,10 @@ enum TestGlobalEnum : enum8 { } enum ThreeLevelAutoEnum : enum8 { - kLow = 0; - kMedium = 1; - kHigh = 2; - kAutomatic = 3; + kAuto = 0; + kLow = 1; + kMedium = 2; + kHigh = 3; } bitmap TestGlobalBitmap : bitmap32 { diff --git a/examples/chef/devices/rootnode_lightsensor_lZQycTFcJK.matter b/examples/chef/devices/rootnode_lightsensor_lZQycTFcJK.matter index 649b6e1348c740..cf7fa80e572b6f 100644 --- a/examples/chef/devices/rootnode_lightsensor_lZQycTFcJK.matter +++ b/examples/chef/devices/rootnode_lightsensor_lZQycTFcJK.matter @@ -213,10 +213,10 @@ enum TestGlobalEnum : enum8 { } enum ThreeLevelAutoEnum : enum8 { - kLow = 0; - kMedium = 1; - kHigh = 2; - kAutomatic = 3; + kAuto = 0; + kLow = 1; + kMedium = 2; + kHigh = 3; } bitmap TestGlobalBitmap : bitmap32 { diff --git a/examples/chef/devices/rootnode_occupancysensor_iHyVgifZuo.matter b/examples/chef/devices/rootnode_occupancysensor_iHyVgifZuo.matter index f488960339c933..9e48af26b42dfb 100644 --- a/examples/chef/devices/rootnode_occupancysensor_iHyVgifZuo.matter +++ b/examples/chef/devices/rootnode_occupancysensor_iHyVgifZuo.matter @@ -213,10 +213,10 @@ enum TestGlobalEnum : enum8 { } enum ThreeLevelAutoEnum : enum8 { - kLow = 0; - kMedium = 1; - kHigh = 2; - kAutomatic = 3; + kAuto = 0; + kLow = 1; + kMedium = 2; + kHigh = 3; } bitmap TestGlobalBitmap : bitmap32 { diff --git a/examples/chef/devices/rootnode_onofflight_bbs1b7IaOV.matter b/examples/chef/devices/rootnode_onofflight_bbs1b7IaOV.matter index b5869fc53eb40f..5ea09c93aeaa3f 100644 --- a/examples/chef/devices/rootnode_onofflight_bbs1b7IaOV.matter +++ b/examples/chef/devices/rootnode_onofflight_bbs1b7IaOV.matter @@ -213,10 +213,10 @@ enum TestGlobalEnum : enum8 { } enum ThreeLevelAutoEnum : enum8 { - kLow = 0; - kMedium = 1; - kHigh = 2; - kAutomatic = 3; + kAuto = 0; + kLow = 1; + kMedium = 2; + kHigh = 3; } bitmap TestGlobalBitmap : bitmap32 { diff --git a/examples/chef/devices/rootnode_onofflight_samplemei.matter b/examples/chef/devices/rootnode_onofflight_samplemei.matter index 21963e81a3bb11..fd59d60f4da13b 100644 --- a/examples/chef/devices/rootnode_onofflight_samplemei.matter +++ b/examples/chef/devices/rootnode_onofflight_samplemei.matter @@ -213,10 +213,10 @@ enum TestGlobalEnum : enum8 { } enum ThreeLevelAutoEnum : enum8 { - kLow = 0; - kMedium = 1; - kHigh = 2; - kAutomatic = 3; + kAuto = 0; + kLow = 1; + kMedium = 2; + kHigh = 3; } bitmap TestGlobalBitmap : bitmap32 { diff --git a/examples/chef/devices/rootnode_onofflightswitch_FsPlMr090Q.matter b/examples/chef/devices/rootnode_onofflightswitch_FsPlMr090Q.matter index aa85e87ed8abe2..eb220b3e15312c 100644 --- a/examples/chef/devices/rootnode_onofflightswitch_FsPlMr090Q.matter +++ b/examples/chef/devices/rootnode_onofflightswitch_FsPlMr090Q.matter @@ -213,10 +213,10 @@ enum TestGlobalEnum : enum8 { } enum ThreeLevelAutoEnum : enum8 { - kLow = 0; - kMedium = 1; - kHigh = 2; - kAutomatic = 3; + kAuto = 0; + kLow = 1; + kMedium = 2; + kHigh = 3; } bitmap TestGlobalBitmap : bitmap32 { diff --git a/examples/chef/devices/rootnode_onoffpluginunit_Wtf8ss5EBY.matter b/examples/chef/devices/rootnode_onoffpluginunit_Wtf8ss5EBY.matter index 8f8d48dc8e139c..25369fa9a10003 100644 --- a/examples/chef/devices/rootnode_onoffpluginunit_Wtf8ss5EBY.matter +++ b/examples/chef/devices/rootnode_onoffpluginunit_Wtf8ss5EBY.matter @@ -213,10 +213,10 @@ enum TestGlobalEnum : enum8 { } enum ThreeLevelAutoEnum : enum8 { - kLow = 0; - kMedium = 1; - kHigh = 2; - kAutomatic = 3; + kAuto = 0; + kLow = 1; + kMedium = 2; + kHigh = 3; } bitmap TestGlobalBitmap : bitmap32 { diff --git a/examples/chef/devices/rootnode_pressuresensor_s0qC9wLH4k.matter b/examples/chef/devices/rootnode_pressuresensor_s0qC9wLH4k.matter index 4a6257ad02f377..b6f88098b76fb0 100644 --- a/examples/chef/devices/rootnode_pressuresensor_s0qC9wLH4k.matter +++ b/examples/chef/devices/rootnode_pressuresensor_s0qC9wLH4k.matter @@ -213,10 +213,10 @@ enum TestGlobalEnum : enum8 { } enum ThreeLevelAutoEnum : enum8 { - kLow = 0; - kMedium = 1; - kHigh = 2; - kAutomatic = 3; + kAuto = 0; + kLow = 1; + kMedium = 2; + kHigh = 3; } bitmap TestGlobalBitmap : bitmap32 { diff --git a/examples/chef/devices/rootnode_pump_5f904818cc.matter b/examples/chef/devices/rootnode_pump_5f904818cc.matter index 77d966b425c96a..7360b37f4dcd9b 100644 --- a/examples/chef/devices/rootnode_pump_5f904818cc.matter +++ b/examples/chef/devices/rootnode_pump_5f904818cc.matter @@ -213,10 +213,10 @@ enum TestGlobalEnum : enum8 { } enum ThreeLevelAutoEnum : enum8 { - kLow = 0; - kMedium = 1; - kHigh = 2; - kAutomatic = 3; + kAuto = 0; + kLow = 1; + kMedium = 2; + kHigh = 3; } bitmap TestGlobalBitmap : bitmap32 { diff --git a/examples/chef/devices/rootnode_pump_a811bb33a0.matter b/examples/chef/devices/rootnode_pump_a811bb33a0.matter index d8d492a5fac623..dafa2e8aad0aae 100644 --- a/examples/chef/devices/rootnode_pump_a811bb33a0.matter +++ b/examples/chef/devices/rootnode_pump_a811bb33a0.matter @@ -213,10 +213,10 @@ enum TestGlobalEnum : enum8 { } enum ThreeLevelAutoEnum : enum8 { - kLow = 0; - kMedium = 1; - kHigh = 2; - kAutomatic = 3; + kAuto = 0; + kLow = 1; + kMedium = 2; + kHigh = 3; } bitmap TestGlobalBitmap : bitmap32 { diff --git a/examples/chef/devices/rootnode_rainsensor_a7aa5d7738.matter b/examples/chef/devices/rootnode_rainsensor_a7aa5d7738.matter index 1ff0f0572e8341..45c00b132a930f 100644 --- a/examples/chef/devices/rootnode_rainsensor_a7aa5d7738.matter +++ b/examples/chef/devices/rootnode_rainsensor_a7aa5d7738.matter @@ -213,10 +213,10 @@ enum TestGlobalEnum : enum8 { } enum ThreeLevelAutoEnum : enum8 { - kLow = 0; - kMedium = 1; - kHigh = 2; - kAutomatic = 3; + kAuto = 0; + kLow = 1; + kMedium = 2; + kHigh = 3; } bitmap TestGlobalBitmap : bitmap32 { diff --git a/examples/chef/devices/rootnode_refrigerator_temperaturecontrolledcabinet_temperaturecontrolledcabinet_ffdb696680.matter b/examples/chef/devices/rootnode_refrigerator_temperaturecontrolledcabinet_temperaturecontrolledcabinet_ffdb696680.matter index c0ec4386298152..5012f1c5a63421 100644 --- a/examples/chef/devices/rootnode_refrigerator_temperaturecontrolledcabinet_temperaturecontrolledcabinet_ffdb696680.matter +++ b/examples/chef/devices/rootnode_refrigerator_temperaturecontrolledcabinet_temperaturecontrolledcabinet_ffdb696680.matter @@ -213,10 +213,10 @@ enum TestGlobalEnum : enum8 { } enum ThreeLevelAutoEnum : enum8 { - kLow = 0; - kMedium = 1; - kHigh = 2; - kAutomatic = 3; + kAuto = 0; + kLow = 1; + kMedium = 2; + kHigh = 3; } bitmap TestGlobalBitmap : bitmap32 { diff --git a/examples/chef/devices/rootnode_roboticvacuumcleaner_1807ff0c49.matter b/examples/chef/devices/rootnode_roboticvacuumcleaner_1807ff0c49.matter index 5e99cb764505e6..ac9bc592c3945f 100644 --- a/examples/chef/devices/rootnode_roboticvacuumcleaner_1807ff0c49.matter +++ b/examples/chef/devices/rootnode_roboticvacuumcleaner_1807ff0c49.matter @@ -213,10 +213,10 @@ enum TestGlobalEnum : enum8 { } enum ThreeLevelAutoEnum : enum8 { - kLow = 0; - kMedium = 1; - kHigh = 2; - kAutomatic = 3; + kAuto = 0; + kLow = 1; + kMedium = 2; + kHigh = 3; } bitmap TestGlobalBitmap : bitmap32 { diff --git a/examples/chef/devices/rootnode_roomairconditioner_9cf3607804.matter b/examples/chef/devices/rootnode_roomairconditioner_9cf3607804.matter index 4d551647243a32..dcb88705d7f0d2 100644 --- a/examples/chef/devices/rootnode_roomairconditioner_9cf3607804.matter +++ b/examples/chef/devices/rootnode_roomairconditioner_9cf3607804.matter @@ -213,10 +213,10 @@ enum TestGlobalEnum : enum8 { } enum ThreeLevelAutoEnum : enum8 { - kLow = 0; - kMedium = 1; - kHigh = 2; - kAutomatic = 3; + kAuto = 0; + kLow = 1; + kMedium = 2; + kHigh = 3; } bitmap TestGlobalBitmap : bitmap32 { diff --git a/examples/chef/devices/rootnode_smokecoalarm_686fe0dcb8.matter b/examples/chef/devices/rootnode_smokecoalarm_686fe0dcb8.matter index ceef32de847f63..5255bc8de4c243 100644 --- a/examples/chef/devices/rootnode_smokecoalarm_686fe0dcb8.matter +++ b/examples/chef/devices/rootnode_smokecoalarm_686fe0dcb8.matter @@ -213,10 +213,10 @@ enum TestGlobalEnum : enum8 { } enum ThreeLevelAutoEnum : enum8 { - kLow = 0; - kMedium = 1; - kHigh = 2; - kAutomatic = 3; + kAuto = 0; + kLow = 1; + kMedium = 2; + kHigh = 3; } bitmap TestGlobalBitmap : bitmap32 { diff --git a/examples/chef/devices/rootnode_speaker_RpzeXdimqA.matter b/examples/chef/devices/rootnode_speaker_RpzeXdimqA.matter index a7c03f3acfbeea..8c8a6dc2d02af0 100644 --- a/examples/chef/devices/rootnode_speaker_RpzeXdimqA.matter +++ b/examples/chef/devices/rootnode_speaker_RpzeXdimqA.matter @@ -213,10 +213,10 @@ enum TestGlobalEnum : enum8 { } enum ThreeLevelAutoEnum : enum8 { - kLow = 0; - kMedium = 1; - kHigh = 2; - kAutomatic = 3; + kAuto = 0; + kLow = 1; + kMedium = 2; + kHigh = 3; } bitmap TestGlobalBitmap : bitmap32 { diff --git a/examples/chef/devices/rootnode_temperaturesensor_Qy1zkNW7c3.matter b/examples/chef/devices/rootnode_temperaturesensor_Qy1zkNW7c3.matter index ca6ee8e778eda6..f45c4f8260dfeb 100644 --- a/examples/chef/devices/rootnode_temperaturesensor_Qy1zkNW7c3.matter +++ b/examples/chef/devices/rootnode_temperaturesensor_Qy1zkNW7c3.matter @@ -213,10 +213,10 @@ enum TestGlobalEnum : enum8 { } enum ThreeLevelAutoEnum : enum8 { - kLow = 0; - kMedium = 1; - kHigh = 2; - kAutomatic = 3; + kAuto = 0; + kLow = 1; + kMedium = 2; + kHigh = 3; } bitmap TestGlobalBitmap : bitmap32 { diff --git a/examples/chef/devices/rootnode_thermostat_bm3fb8dhYi.matter b/examples/chef/devices/rootnode_thermostat_bm3fb8dhYi.matter index 9190f45a888283..4a01e4a4171e8a 100644 --- a/examples/chef/devices/rootnode_thermostat_bm3fb8dhYi.matter +++ b/examples/chef/devices/rootnode_thermostat_bm3fb8dhYi.matter @@ -213,10 +213,10 @@ enum TestGlobalEnum : enum8 { } enum ThreeLevelAutoEnum : enum8 { - kLow = 0; - kMedium = 1; - kHigh = 2; - kAutomatic = 3; + kAuto = 0; + kLow = 1; + kMedium = 2; + kHigh = 3; } bitmap TestGlobalBitmap : bitmap32 { diff --git a/examples/chef/devices/rootnode_waterfreezedetector_dd94a13a16.matter b/examples/chef/devices/rootnode_waterfreezedetector_dd94a13a16.matter index 910a50682a3f7f..b10c3021db3be3 100644 --- a/examples/chef/devices/rootnode_waterfreezedetector_dd94a13a16.matter +++ b/examples/chef/devices/rootnode_waterfreezedetector_dd94a13a16.matter @@ -213,10 +213,10 @@ enum TestGlobalEnum : enum8 { } enum ThreeLevelAutoEnum : enum8 { - kLow = 0; - kMedium = 1; - kHigh = 2; - kAutomatic = 3; + kAuto = 0; + kLow = 1; + kMedium = 2; + kHigh = 3; } bitmap TestGlobalBitmap : bitmap32 { diff --git a/examples/chef/devices/rootnode_waterleakdetector_0b067acfa3.matter b/examples/chef/devices/rootnode_waterleakdetector_0b067acfa3.matter index ff94acc11cd01c..2a05a812acea06 100644 --- a/examples/chef/devices/rootnode_waterleakdetector_0b067acfa3.matter +++ b/examples/chef/devices/rootnode_waterleakdetector_0b067acfa3.matter @@ -213,10 +213,10 @@ enum TestGlobalEnum : enum8 { } enum ThreeLevelAutoEnum : enum8 { - kLow = 0; - kMedium = 1; - kHigh = 2; - kAutomatic = 3; + kAuto = 0; + kLow = 1; + kMedium = 2; + kHigh = 3; } bitmap TestGlobalBitmap : bitmap32 { diff --git a/examples/chef/devices/rootnode_watervalve_6bb39f1f67.matter b/examples/chef/devices/rootnode_watervalve_6bb39f1f67.matter index 0a3e9b01a2f6b0..a25e889db896a5 100644 --- a/examples/chef/devices/rootnode_watervalve_6bb39f1f67.matter +++ b/examples/chef/devices/rootnode_watervalve_6bb39f1f67.matter @@ -213,10 +213,10 @@ enum TestGlobalEnum : enum8 { } enum ThreeLevelAutoEnum : enum8 { - kLow = 0; - kMedium = 1; - kHigh = 2; - kAutomatic = 3; + kAuto = 0; + kLow = 1; + kMedium = 2; + kHigh = 3; } bitmap TestGlobalBitmap : bitmap32 { diff --git a/examples/chef/devices/rootnode_windowcovering_RLCxaGi9Yx.matter b/examples/chef/devices/rootnode_windowcovering_RLCxaGi9Yx.matter index aa5b4e84afb216..d6d2bf8ef1c89b 100644 --- a/examples/chef/devices/rootnode_windowcovering_RLCxaGi9Yx.matter +++ b/examples/chef/devices/rootnode_windowcovering_RLCxaGi9Yx.matter @@ -213,10 +213,10 @@ enum TestGlobalEnum : enum8 { } enum ThreeLevelAutoEnum : enum8 { - kLow = 0; - kMedium = 1; - kHigh = 2; - kAutomatic = 3; + kAuto = 0; + kLow = 1; + kMedium = 2; + kHigh = 3; } bitmap TestGlobalBitmap : bitmap32 { diff --git a/examples/closure-app/closure-common/closure-app.matter b/examples/closure-app/closure-common/closure-app.matter index 5d735a869ec49c..a8726098cf00a5 100644 --- a/examples/closure-app/closure-common/closure-app.matter +++ b/examples/closure-app/closure-common/closure-app.matter @@ -213,10 +213,10 @@ enum TestGlobalEnum : enum8 { } enum ThreeLevelAutoEnum : enum8 { - kLow = 0; - kMedium = 1; - kHigh = 2; - kAutomatic = 3; + kAuto = 0; + kLow = 1; + kMedium = 2; + kHigh = 3; } bitmap TestGlobalBitmap : bitmap32 { diff --git a/examples/contact-sensor-app/bouffalolab/data_model/contact-sensor-app.matter b/examples/contact-sensor-app/bouffalolab/data_model/contact-sensor-app.matter index ed88efd02a8772..f48224fa5822aa 100644 --- a/examples/contact-sensor-app/bouffalolab/data_model/contact-sensor-app.matter +++ b/examples/contact-sensor-app/bouffalolab/data_model/contact-sensor-app.matter @@ -213,10 +213,10 @@ enum TestGlobalEnum : enum8 { } enum ThreeLevelAutoEnum : enum8 { - kLow = 0; - kMedium = 1; - kHigh = 2; - kAutomatic = 3; + kAuto = 0; + kLow = 1; + kMedium = 2; + kHigh = 3; } bitmap TestGlobalBitmap : bitmap32 { 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 512f8ece39fb5c..3762d9898fb4ce 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 @@ -213,10 +213,10 @@ enum TestGlobalEnum : enum8 { } enum ThreeLevelAutoEnum : enum8 { - kLow = 0; - kMedium = 1; - kHigh = 2; - kAutomatic = 3; + kAuto = 0; + kLow = 1; + kMedium = 2; + kHigh = 3; } bitmap TestGlobalBitmap : bitmap32 { diff --git a/examples/contact-sensor-app/nxp/zap-lit/contact-sensor-app.matter b/examples/contact-sensor-app/nxp/zap-lit/contact-sensor-app.matter index e006924078cf26..6bfb6ea59bae6a 100644 --- a/examples/contact-sensor-app/nxp/zap-lit/contact-sensor-app.matter +++ b/examples/contact-sensor-app/nxp/zap-lit/contact-sensor-app.matter @@ -213,10 +213,10 @@ enum TestGlobalEnum : enum8 { } enum ThreeLevelAutoEnum : enum8 { - kLow = 0; - kMedium = 1; - kHigh = 2; - kAutomatic = 3; + kAuto = 0; + kLow = 1; + kMedium = 2; + kHigh = 3; } bitmap TestGlobalBitmap : bitmap32 { diff --git a/examples/contact-sensor-app/nxp/zap-sit/contact-sensor-app.matter b/examples/contact-sensor-app/nxp/zap-sit/contact-sensor-app.matter index cc2e0e8ecab5d6..efc59d7c9aaf08 100644 --- a/examples/contact-sensor-app/nxp/zap-sit/contact-sensor-app.matter +++ b/examples/contact-sensor-app/nxp/zap-sit/contact-sensor-app.matter @@ -213,10 +213,10 @@ enum TestGlobalEnum : enum8 { } enum ThreeLevelAutoEnum : enum8 { - kLow = 0; - kMedium = 1; - kHigh = 2; - kAutomatic = 3; + kAuto = 0; + kLow = 1; + kMedium = 2; + kHigh = 3; } bitmap TestGlobalBitmap : bitmap32 { diff --git a/examples/dishwasher-app/dishwasher-common/dishwasher-app.matter b/examples/dishwasher-app/dishwasher-common/dishwasher-app.matter index a499ed96e0fbd0..2b8e28d51c0bab 100644 --- a/examples/dishwasher-app/dishwasher-common/dishwasher-app.matter +++ b/examples/dishwasher-app/dishwasher-common/dishwasher-app.matter @@ -213,10 +213,10 @@ enum TestGlobalEnum : enum8 { } enum ThreeLevelAutoEnum : enum8 { - kLow = 0; - kMedium = 1; - kHigh = 2; - kAutomatic = 3; + kAuto = 0; + kLow = 1; + kMedium = 2; + kHigh = 3; } bitmap TestGlobalBitmap : bitmap32 { diff --git a/examples/dishwasher-app/silabs/data_model/dishwasher-thread-app.matter b/examples/dishwasher-app/silabs/data_model/dishwasher-thread-app.matter index 0606fd0dae65f2..7f3f76b3d3441b 100644 --- a/examples/dishwasher-app/silabs/data_model/dishwasher-thread-app.matter +++ b/examples/dishwasher-app/silabs/data_model/dishwasher-thread-app.matter @@ -213,10 +213,10 @@ enum TestGlobalEnum : enum8 { } enum ThreeLevelAutoEnum : enum8 { - kLow = 0; - kMedium = 1; - kHigh = 2; - kAutomatic = 3; + kAuto = 0; + kLow = 1; + kMedium = 2; + kHigh = 3; } bitmap TestGlobalBitmap : bitmap32 { diff --git a/examples/dishwasher-app/silabs/data_model/dishwasher-wifi-app.matter b/examples/dishwasher-app/silabs/data_model/dishwasher-wifi-app.matter index 9c4c383815af94..3c3e11a8cdaa89 100644 --- a/examples/dishwasher-app/silabs/data_model/dishwasher-wifi-app.matter +++ b/examples/dishwasher-app/silabs/data_model/dishwasher-wifi-app.matter @@ -213,10 +213,10 @@ enum TestGlobalEnum : enum8 { } enum ThreeLevelAutoEnum : enum8 { - kLow = 0; - kMedium = 1; - kHigh = 2; - kAutomatic = 3; + kAuto = 0; + kLow = 1; + kMedium = 2; + kHigh = 3; } bitmap TestGlobalBitmap : bitmap32 { diff --git a/examples/energy-management-app/energy-management-common/energy-management-app.matter b/examples/energy-management-app/energy-management-common/energy-management-app.matter index 74736710ad237d..0576b6cfa6965e 100644 --- a/examples/energy-management-app/energy-management-common/energy-management-app.matter +++ b/examples/energy-management-app/energy-management-common/energy-management-app.matter @@ -213,10 +213,10 @@ enum TestGlobalEnum : enum8 { } enum ThreeLevelAutoEnum : enum8 { - kLow = 0; - kMedium = 1; - kHigh = 2; - kAutomatic = 3; + kAuto = 0; + kLow = 1; + kMedium = 2; + kHigh = 3; } bitmap TestGlobalBitmap : bitmap32 { diff --git a/examples/fabric-bridge-app/fabric-bridge-common/fabric-bridge-app.matter b/examples/fabric-bridge-app/fabric-bridge-common/fabric-bridge-app.matter index c108c8b099d831..70fa0d59a6d942 100644 --- a/examples/fabric-bridge-app/fabric-bridge-common/fabric-bridge-app.matter +++ b/examples/fabric-bridge-app/fabric-bridge-common/fabric-bridge-app.matter @@ -213,10 +213,10 @@ enum TestGlobalEnum : enum8 { } enum ThreeLevelAutoEnum : enum8 { - kLow = 0; - kMedium = 1; - kHigh = 2; - kAutomatic = 3; + kAuto = 0; + kLow = 1; + kMedium = 2; + kHigh = 3; } bitmap TestGlobalBitmap : bitmap32 { diff --git a/examples/fabric-sync/bridge/fabric-bridge.matter b/examples/fabric-sync/bridge/fabric-bridge.matter index c108c8b099d831..70fa0d59a6d942 100644 --- a/examples/fabric-sync/bridge/fabric-bridge.matter +++ b/examples/fabric-sync/bridge/fabric-bridge.matter @@ -213,10 +213,10 @@ enum TestGlobalEnum : enum8 { } enum ThreeLevelAutoEnum : enum8 { - kLow = 0; - kMedium = 1; - kHigh = 2; - kAutomatic = 3; + kAuto = 0; + kLow = 1; + kMedium = 2; + kHigh = 3; } bitmap TestGlobalBitmap : bitmap32 { diff --git a/examples/laundry-washer-app/nxp/zap/laundry-washer-app.matter b/examples/laundry-washer-app/nxp/zap/laundry-washer-app.matter index c41ab08f637e3e..714f60e1ab57c8 100644 --- a/examples/laundry-washer-app/nxp/zap/laundry-washer-app.matter +++ b/examples/laundry-washer-app/nxp/zap/laundry-washer-app.matter @@ -213,10 +213,10 @@ enum TestGlobalEnum : enum8 { } enum ThreeLevelAutoEnum : enum8 { - kLow = 0; - kMedium = 1; - kHigh = 2; - kAutomatic = 3; + kAuto = 0; + kLow = 1; + kMedium = 2; + kHigh = 3; } bitmap TestGlobalBitmap : bitmap32 { diff --git a/examples/light-switch-app/light-switch-common/icd-lit-light-switch-app.matter b/examples/light-switch-app/light-switch-common/icd-lit-light-switch-app.matter index dc4a474f6eb3d3..7b2016cd5e6d8c 100644 --- a/examples/light-switch-app/light-switch-common/icd-lit-light-switch-app.matter +++ b/examples/light-switch-app/light-switch-common/icd-lit-light-switch-app.matter @@ -213,10 +213,10 @@ enum TestGlobalEnum : enum8 { } enum ThreeLevelAutoEnum : enum8 { - kLow = 0; - kMedium = 1; - kHigh = 2; - kAutomatic = 3; + kAuto = 0; + kLow = 1; + kMedium = 2; + kHigh = 3; } bitmap TestGlobalBitmap : bitmap32 { 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 dc7d42bdc6ae3e..5c16ba9067c7cf 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 @@ -213,10 +213,10 @@ enum TestGlobalEnum : enum8 { } enum ThreeLevelAutoEnum : enum8 { - kLow = 0; - kMedium = 1; - kHigh = 2; - kAutomatic = 3; + kAuto = 0; + kLow = 1; + kMedium = 2; + kHigh = 3; } bitmap TestGlobalBitmap : bitmap32 { diff --git a/examples/light-switch-app/qpg/zap/switch.matter b/examples/light-switch-app/qpg/zap/switch.matter index 3f89dbd48a42ae..9619592c72726e 100644 --- a/examples/light-switch-app/qpg/zap/switch.matter +++ b/examples/light-switch-app/qpg/zap/switch.matter @@ -213,10 +213,10 @@ enum TestGlobalEnum : enum8 { } enum ThreeLevelAutoEnum : enum8 { - kLow = 0; - kMedium = 1; - kHigh = 2; - kAutomatic = 3; + kAuto = 0; + kLow = 1; + kMedium = 2; + kHigh = 3; } bitmap TestGlobalBitmap : bitmap32 { diff --git a/examples/lighting-app-data-mode-no-unique-id/lighting-common/lighting-app.matter b/examples/lighting-app-data-mode-no-unique-id/lighting-common/lighting-app.matter index 5a30af3fcc238d..10315204f3983c 100644 --- a/examples/lighting-app-data-mode-no-unique-id/lighting-common/lighting-app.matter +++ b/examples/lighting-app-data-mode-no-unique-id/lighting-common/lighting-app.matter @@ -213,10 +213,10 @@ enum TestGlobalEnum : enum8 { } enum ThreeLevelAutoEnum : enum8 { - kLow = 0; - kMedium = 1; - kHigh = 2; - kAutomatic = 3; + kAuto = 0; + kLow = 1; + kMedium = 2; + kHigh = 3; } bitmap TestGlobalBitmap : bitmap32 { diff --git a/examples/lighting-app/bouffalolab/data_model/lighting-app-ethernet.matter b/examples/lighting-app/bouffalolab/data_model/lighting-app-ethernet.matter index b6a9ac3745136b..d5a5df0e868a5f 100644 --- a/examples/lighting-app/bouffalolab/data_model/lighting-app-ethernet.matter +++ b/examples/lighting-app/bouffalolab/data_model/lighting-app-ethernet.matter @@ -213,10 +213,10 @@ enum TestGlobalEnum : enum8 { } enum ThreeLevelAutoEnum : enum8 { - kLow = 0; - kMedium = 1; - kHigh = 2; - kAutomatic = 3; + kAuto = 0; + kLow = 1; + kMedium = 2; + kHigh = 3; } bitmap TestGlobalBitmap : bitmap32 { 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 dc6874fbf025a4..b89fcabf2b10a0 100644 --- a/examples/lighting-app/bouffalolab/data_model/lighting-app-thread.matter +++ b/examples/lighting-app/bouffalolab/data_model/lighting-app-thread.matter @@ -213,10 +213,10 @@ enum TestGlobalEnum : enum8 { } enum ThreeLevelAutoEnum : enum8 { - kLow = 0; - kMedium = 1; - kHigh = 2; - kAutomatic = 3; + kAuto = 0; + kLow = 1; + kMedium = 2; + kHigh = 3; } bitmap TestGlobalBitmap : bitmap32 { 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 0ef081c8a5a944..05938f30759c57 100644 --- a/examples/lighting-app/bouffalolab/data_model/lighting-app-wifi.matter +++ b/examples/lighting-app/bouffalolab/data_model/lighting-app-wifi.matter @@ -213,10 +213,10 @@ enum TestGlobalEnum : enum8 { } enum ThreeLevelAutoEnum : enum8 { - kLow = 0; - kMedium = 1; - kHigh = 2; - kAutomatic = 3; + kAuto = 0; + kLow = 1; + kMedium = 2; + kHigh = 3; } bitmap TestGlobalBitmap : bitmap32 { diff --git a/examples/lighting-app/lighting-common/lighting-app.matter b/examples/lighting-app/lighting-common/lighting-app.matter index c60699d846ae39..96f50439028222 100644 --- a/examples/lighting-app/lighting-common/lighting-app.matter +++ b/examples/lighting-app/lighting-common/lighting-app.matter @@ -213,10 +213,10 @@ enum TestGlobalEnum : enum8 { } enum ThreeLevelAutoEnum : enum8 { - kLow = 0; - kMedium = 1; - kHigh = 2; - kAutomatic = 3; + kAuto = 0; + kLow = 1; + kMedium = 2; + kHigh = 3; } bitmap TestGlobalBitmap : bitmap32 { diff --git a/examples/lighting-app/nxp/zap/lighting-on-off.matter b/examples/lighting-app/nxp/zap/lighting-on-off.matter index b9ddd61f52708b..74d342e4a407f1 100644 --- a/examples/lighting-app/nxp/zap/lighting-on-off.matter +++ b/examples/lighting-app/nxp/zap/lighting-on-off.matter @@ -213,10 +213,10 @@ enum TestGlobalEnum : enum8 { } enum ThreeLevelAutoEnum : enum8 { - kLow = 0; - kMedium = 1; - kHigh = 2; - kAutomatic = 3; + kAuto = 0; + kLow = 1; + kMedium = 2; + kHigh = 3; } bitmap TestGlobalBitmap : bitmap32 { diff --git a/examples/lighting-app/qpg/zap/light.matter b/examples/lighting-app/qpg/zap/light.matter index cbb7aeea2194bc..126b4c1ab4c5c8 100644 --- a/examples/lighting-app/qpg/zap/light.matter +++ b/examples/lighting-app/qpg/zap/light.matter @@ -213,10 +213,10 @@ enum TestGlobalEnum : enum8 { } enum ThreeLevelAutoEnum : enum8 { - kLow = 0; - kMedium = 1; - kHigh = 2; - kAutomatic = 3; + kAuto = 0; + kLow = 1; + kMedium = 2; + kHigh = 3; } bitmap TestGlobalBitmap : bitmap32 { diff --git a/examples/lighting-app/silabs/data_model/lighting-thread-app.matter b/examples/lighting-app/silabs/data_model/lighting-thread-app.matter index cacaff24cbba8f..6f4f29166c9857 100644 --- a/examples/lighting-app/silabs/data_model/lighting-thread-app.matter +++ b/examples/lighting-app/silabs/data_model/lighting-thread-app.matter @@ -213,10 +213,10 @@ enum TestGlobalEnum : enum8 { } enum ThreeLevelAutoEnum : enum8 { - kLow = 0; - kMedium = 1; - kHigh = 2; - kAutomatic = 3; + kAuto = 0; + kLow = 1; + kMedium = 2; + kHigh = 3; } bitmap TestGlobalBitmap : bitmap32 { diff --git a/examples/lighting-app/silabs/data_model/lighting-wifi-app.matter b/examples/lighting-app/silabs/data_model/lighting-wifi-app.matter index 7c9cc1f2d40e6a..dc6ecd865b31ce 100644 --- a/examples/lighting-app/silabs/data_model/lighting-wifi-app.matter +++ b/examples/lighting-app/silabs/data_model/lighting-wifi-app.matter @@ -213,10 +213,10 @@ enum TestGlobalEnum : enum8 { } enum ThreeLevelAutoEnum : enum8 { - kLow = 0; - kMedium = 1; - kHigh = 2; - kAutomatic = 3; + kAuto = 0; + kLow = 1; + kMedium = 2; + kHigh = 3; } bitmap TestGlobalBitmap : bitmap32 { diff --git a/examples/lit-icd-app/lit-icd-common/lit-icd-server-app.matter b/examples/lit-icd-app/lit-icd-common/lit-icd-server-app.matter index 465ab9f083cc96..6801ff2bbc4a1d 100644 --- a/examples/lit-icd-app/lit-icd-common/lit-icd-server-app.matter +++ b/examples/lit-icd-app/lit-icd-common/lit-icd-server-app.matter @@ -213,10 +213,10 @@ enum TestGlobalEnum : enum8 { } enum ThreeLevelAutoEnum : enum8 { - kLow = 0; - kMedium = 1; - kHigh = 2; - kAutomatic = 3; + kAuto = 0; + kLow = 1; + kMedium = 2; + kHigh = 3; } bitmap TestGlobalBitmap : bitmap32 { diff --git a/examples/lock-app/lock-common/lock-app.matter b/examples/lock-app/lock-common/lock-app.matter index 8b4f2246f414b5..be36c3c5a4ac02 100644 --- a/examples/lock-app/lock-common/lock-app.matter +++ b/examples/lock-app/lock-common/lock-app.matter @@ -213,10 +213,10 @@ enum TestGlobalEnum : enum8 { } enum ThreeLevelAutoEnum : enum8 { - kLow = 0; - kMedium = 1; - kHigh = 2; - kAutomatic = 3; + kAuto = 0; + kLow = 1; + kMedium = 2; + kHigh = 3; } bitmap TestGlobalBitmap : bitmap32 { diff --git a/examples/lock-app/nxp/zap/lock-app.matter b/examples/lock-app/nxp/zap/lock-app.matter index 75d0264b1d8562..4a8d44e788b0ed 100644 --- a/examples/lock-app/nxp/zap/lock-app.matter +++ b/examples/lock-app/nxp/zap/lock-app.matter @@ -213,10 +213,10 @@ enum TestGlobalEnum : enum8 { } enum ThreeLevelAutoEnum : enum8 { - kLow = 0; - kMedium = 1; - kHigh = 2; - kAutomatic = 3; + kAuto = 0; + kLow = 1; + kMedium = 2; + kHigh = 3; } bitmap TestGlobalBitmap : bitmap32 { diff --git a/examples/lock-app/qpg/zap/lock.matter b/examples/lock-app/qpg/zap/lock.matter index 514542a316366c..24c7fc62618e81 100644 --- a/examples/lock-app/qpg/zap/lock.matter +++ b/examples/lock-app/qpg/zap/lock.matter @@ -213,10 +213,10 @@ enum TestGlobalEnum : enum8 { } enum ThreeLevelAutoEnum : enum8 { - kLow = 0; - kMedium = 1; - kHigh = 2; - kAutomatic = 3; + kAuto = 0; + kLow = 1; + kMedium = 2; + kHigh = 3; } bitmap TestGlobalBitmap : bitmap32 { diff --git a/examples/lock-app/silabs/data_model/lock-app.matter b/examples/lock-app/silabs/data_model/lock-app.matter index b046f0ff49fc14..6e0281d6f5aaf3 100644 --- a/examples/lock-app/silabs/data_model/lock-app.matter +++ b/examples/lock-app/silabs/data_model/lock-app.matter @@ -213,10 +213,10 @@ enum TestGlobalEnum : enum8 { } enum ThreeLevelAutoEnum : enum8 { - kLow = 0; - kMedium = 1; - kHigh = 2; - kAutomatic = 3; + kAuto = 0; + kLow = 1; + kMedium = 2; + kHigh = 3; } bitmap TestGlobalBitmap : bitmap32 { diff --git a/examples/log-source-app/log-source-common/log-source-app.matter b/examples/log-source-app/log-source-common/log-source-app.matter index 72110aafcd01b4..f94453a63572a1 100644 --- a/examples/log-source-app/log-source-common/log-source-app.matter +++ b/examples/log-source-app/log-source-common/log-source-app.matter @@ -213,10 +213,10 @@ enum TestGlobalEnum : enum8 { } enum ThreeLevelAutoEnum : enum8 { - kLow = 0; - kMedium = 1; - kHigh = 2; - kAutomatic = 3; + kAuto = 0; + kLow = 1; + kMedium = 2; + kHigh = 3; } bitmap TestGlobalBitmap : bitmap32 { diff --git a/examples/microwave-oven-app/microwave-oven-common/microwave-oven-app.matter b/examples/microwave-oven-app/microwave-oven-common/microwave-oven-app.matter index b8a5570d96d4ec..fe26c9611a033e 100644 --- a/examples/microwave-oven-app/microwave-oven-common/microwave-oven-app.matter +++ b/examples/microwave-oven-app/microwave-oven-common/microwave-oven-app.matter @@ -213,10 +213,10 @@ enum TestGlobalEnum : enum8 { } enum ThreeLevelAutoEnum : enum8 { - kLow = 0; - kMedium = 1; - kHigh = 2; - kAutomatic = 3; + kAuto = 0; + kLow = 1; + kMedium = 2; + kHigh = 3; } bitmap TestGlobalBitmap : bitmap32 { diff --git a/examples/network-manager-app/network-manager-common/network-manager-app.matter b/examples/network-manager-app/network-manager-common/network-manager-app.matter index 849c5dd324a18f..372b37842e774d 100644 --- a/examples/network-manager-app/network-manager-common/network-manager-app.matter +++ b/examples/network-manager-app/network-manager-common/network-manager-app.matter @@ -213,10 +213,10 @@ enum TestGlobalEnum : enum8 { } enum ThreeLevelAutoEnum : enum8 { - kLow = 0; - kMedium = 1; - kHigh = 2; - kAutomatic = 3; + kAuto = 0; + kLow = 1; + kMedium = 2; + kHigh = 3; } bitmap TestGlobalBitmap : bitmap32 { 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 4b0b2997c2b261..7525a1023b32e9 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 @@ -213,10 +213,10 @@ enum TestGlobalEnum : enum8 { } enum ThreeLevelAutoEnum : enum8 { - kLow = 0; - kMedium = 1; - kHigh = 2; - kAutomatic = 3; + kAuto = 0; + kLow = 1; + kMedium = 2; + kHigh = 3; } bitmap TestGlobalBitmap : bitmap32 { 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 95a8757cf8de5b..71b07c00a6402a 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 @@ -213,10 +213,10 @@ enum TestGlobalEnum : enum8 { } enum ThreeLevelAutoEnum : enum8 { - kLow = 0; - kMedium = 1; - kHigh = 2; - kAutomatic = 3; + kAuto = 0; + kLow = 1; + kMedium = 2; + kHigh = 3; } bitmap TestGlobalBitmap : bitmap32 { diff --git a/examples/placeholder/linux/apps/app1/config.matter b/examples/placeholder/linux/apps/app1/config.matter index 984b2be730bec4..397ee7ea703dfa 100644 --- a/examples/placeholder/linux/apps/app1/config.matter +++ b/examples/placeholder/linux/apps/app1/config.matter @@ -213,10 +213,10 @@ enum TestGlobalEnum : enum8 { } enum ThreeLevelAutoEnum : enum8 { - kLow = 0; - kMedium = 1; - kHigh = 2; - kAutomatic = 3; + kAuto = 0; + kLow = 1; + kMedium = 2; + kHigh = 3; } bitmap TestGlobalBitmap : bitmap32 { diff --git a/examples/placeholder/linux/apps/app2/config.matter b/examples/placeholder/linux/apps/app2/config.matter index 631c085f9859f0..8a873f04cdfce6 100644 --- a/examples/placeholder/linux/apps/app2/config.matter +++ b/examples/placeholder/linux/apps/app2/config.matter @@ -213,10 +213,10 @@ enum TestGlobalEnum : enum8 { } enum ThreeLevelAutoEnum : enum8 { - kLow = 0; - kMedium = 1; - kHigh = 2; - kAutomatic = 3; + kAuto = 0; + kLow = 1; + kMedium = 2; + kHigh = 3; } bitmap TestGlobalBitmap : bitmap32 { diff --git a/examples/pump-app/pump-common/pump-app.matter b/examples/pump-app/pump-common/pump-app.matter index 0eb8dfb172d6d0..a01ff7786c9c56 100644 --- a/examples/pump-app/pump-common/pump-app.matter +++ b/examples/pump-app/pump-common/pump-app.matter @@ -213,10 +213,10 @@ enum TestGlobalEnum : enum8 { } enum ThreeLevelAutoEnum : enum8 { - kLow = 0; - kMedium = 1; - kHigh = 2; - kAutomatic = 3; + kAuto = 0; + kLow = 1; + kMedium = 2; + kHigh = 3; } bitmap TestGlobalBitmap : bitmap32 { diff --git a/examples/pump-app/silabs/data_model/pump-thread-app.matter b/examples/pump-app/silabs/data_model/pump-thread-app.matter index 72f0ab1ad77047..59894821e5096c 100644 --- a/examples/pump-app/silabs/data_model/pump-thread-app.matter +++ b/examples/pump-app/silabs/data_model/pump-thread-app.matter @@ -213,10 +213,10 @@ enum TestGlobalEnum : enum8 { } enum ThreeLevelAutoEnum : enum8 { - kLow = 0; - kMedium = 1; - kHigh = 2; - kAutomatic = 3; + kAuto = 0; + kLow = 1; + kMedium = 2; + kHigh = 3; } bitmap TestGlobalBitmap : bitmap32 { diff --git a/examples/pump-app/silabs/data_model/pump-wifi-app.matter b/examples/pump-app/silabs/data_model/pump-wifi-app.matter index 72f0ab1ad77047..59894821e5096c 100644 --- a/examples/pump-app/silabs/data_model/pump-wifi-app.matter +++ b/examples/pump-app/silabs/data_model/pump-wifi-app.matter @@ -213,10 +213,10 @@ enum TestGlobalEnum : enum8 { } enum ThreeLevelAutoEnum : enum8 { - kLow = 0; - kMedium = 1; - kHigh = 2; - kAutomatic = 3; + kAuto = 0; + kLow = 1; + kMedium = 2; + kHigh = 3; } bitmap TestGlobalBitmap : bitmap32 { 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 2d8e863a9ded55..0749708198d225 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 @@ -213,10 +213,10 @@ enum TestGlobalEnum : enum8 { } enum ThreeLevelAutoEnum : enum8 { - kLow = 0; - kMedium = 1; - kHigh = 2; - kAutomatic = 3; + kAuto = 0; + kLow = 1; + kMedium = 2; + kHigh = 3; } bitmap TestGlobalBitmap : bitmap32 { diff --git a/examples/refrigerator-app/refrigerator-common/refrigerator-app.matter b/examples/refrigerator-app/refrigerator-common/refrigerator-app.matter index 7c54a7d9ac4788..d39e61808ee832 100644 --- a/examples/refrigerator-app/refrigerator-common/refrigerator-app.matter +++ b/examples/refrigerator-app/refrigerator-common/refrigerator-app.matter @@ -213,10 +213,10 @@ enum TestGlobalEnum : enum8 { } enum ThreeLevelAutoEnum : enum8 { - kLow = 0; - kMedium = 1; - kHigh = 2; - kAutomatic = 3; + kAuto = 0; + kLow = 1; + kMedium = 2; + kHigh = 3; } bitmap TestGlobalBitmap : bitmap32 { diff --git a/examples/refrigerator-app/silabs/data_model/refrigerator-thread-app.matter b/examples/refrigerator-app/silabs/data_model/refrigerator-thread-app.matter index a22c1899582403..f9dcc360151767 100644 --- a/examples/refrigerator-app/silabs/data_model/refrigerator-thread-app.matter +++ b/examples/refrigerator-app/silabs/data_model/refrigerator-thread-app.matter @@ -213,10 +213,10 @@ enum TestGlobalEnum : enum8 { } enum ThreeLevelAutoEnum : enum8 { - kLow = 0; - kMedium = 1; - kHigh = 2; - kAutomatic = 3; + kAuto = 0; + kLow = 1; + kMedium = 2; + kHigh = 3; } bitmap TestGlobalBitmap : bitmap32 { diff --git a/examples/refrigerator-app/silabs/data_model/refrigerator-wifi-app.matter b/examples/refrigerator-app/silabs/data_model/refrigerator-wifi-app.matter index 62b922990dab3d..50bd62e49664be 100644 --- a/examples/refrigerator-app/silabs/data_model/refrigerator-wifi-app.matter +++ b/examples/refrigerator-app/silabs/data_model/refrigerator-wifi-app.matter @@ -213,10 +213,10 @@ enum TestGlobalEnum : enum8 { } enum ThreeLevelAutoEnum : enum8 { - kLow = 0; - kMedium = 1; - kHigh = 2; - kAutomatic = 3; + kAuto = 0; + kLow = 1; + kMedium = 2; + kHigh = 3; } bitmap TestGlobalBitmap : bitmap32 { diff --git a/examples/rvc-app/rvc-common/rvc-app.matter b/examples/rvc-app/rvc-common/rvc-app.matter index 80b69915da1f4c..0ce5a1ff3e890b 100644 --- a/examples/rvc-app/rvc-common/rvc-app.matter +++ b/examples/rvc-app/rvc-common/rvc-app.matter @@ -213,10 +213,10 @@ enum TestGlobalEnum : enum8 { } enum ThreeLevelAutoEnum : enum8 { - kLow = 0; - kMedium = 1; - kHigh = 2; - kAutomatic = 3; + kAuto = 0; + kLow = 1; + kMedium = 2; + kHigh = 3; } bitmap TestGlobalBitmap : bitmap32 { diff --git a/examples/smoke-co-alarm-app/smoke-co-alarm-common/smoke-co-alarm-app.matter b/examples/smoke-co-alarm-app/smoke-co-alarm-common/smoke-co-alarm-app.matter index 42590b6289dd42..48996f43493e0e 100644 --- a/examples/smoke-co-alarm-app/smoke-co-alarm-common/smoke-co-alarm-app.matter +++ b/examples/smoke-co-alarm-app/smoke-co-alarm-common/smoke-co-alarm-app.matter @@ -213,10 +213,10 @@ enum TestGlobalEnum : enum8 { } enum ThreeLevelAutoEnum : enum8 { - kLow = 0; - kMedium = 1; - kHigh = 2; - kAutomatic = 3; + kAuto = 0; + kLow = 1; + kMedium = 2; + kHigh = 3; } bitmap TestGlobalBitmap : bitmap32 { 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 d6a82c11b9847d..68db11fb600da7 100644 --- a/examples/temperature-measurement-app/temperature-measurement-common/temperature-measurement.matter +++ b/examples/temperature-measurement-app/temperature-measurement-common/temperature-measurement.matter @@ -213,10 +213,10 @@ enum TestGlobalEnum : enum8 { } enum ThreeLevelAutoEnum : enum8 { - kLow = 0; - kMedium = 1; - kHigh = 2; - kAutomatic = 3; + kAuto = 0; + kLow = 1; + kMedium = 2; + kHigh = 3; } bitmap TestGlobalBitmap : bitmap32 { diff --git a/examples/terms-and-conditions-app/terms-and-conditions-common/terms-and-conditions-app.matter b/examples/terms-and-conditions-app/terms-and-conditions-common/terms-and-conditions-app.matter index b6b9da603bba47..841f4b129d4470 100644 --- a/examples/terms-and-conditions-app/terms-and-conditions-common/terms-and-conditions-app.matter +++ b/examples/terms-and-conditions-app/terms-and-conditions-common/terms-and-conditions-app.matter @@ -213,10 +213,10 @@ enum TestGlobalEnum : enum8 { } enum ThreeLevelAutoEnum : enum8 { - kLow = 0; - kMedium = 1; - kHigh = 2; - kAutomatic = 3; + kAuto = 0; + kLow = 1; + kMedium = 2; + kHigh = 3; } bitmap TestGlobalBitmap : bitmap32 { diff --git a/examples/thermostat/nxp/zap/thermostat_matter_br.matter b/examples/thermostat/nxp/zap/thermostat_matter_br.matter index ba5f578b175c32..49f6f1bb4e74f0 100644 --- a/examples/thermostat/nxp/zap/thermostat_matter_br.matter +++ b/examples/thermostat/nxp/zap/thermostat_matter_br.matter @@ -213,10 +213,10 @@ enum TestGlobalEnum : enum8 { } enum ThreeLevelAutoEnum : enum8 { - kLow = 0; - kMedium = 1; - kHigh = 2; - kAutomatic = 3; + kAuto = 0; + kLow = 1; + kMedium = 2; + kHigh = 3; } bitmap TestGlobalBitmap : bitmap32 { diff --git a/examples/thermostat/nxp/zap/thermostat_matter_thread.matter b/examples/thermostat/nxp/zap/thermostat_matter_thread.matter index 082a05a80905c5..8f74a3ba573b05 100644 --- a/examples/thermostat/nxp/zap/thermostat_matter_thread.matter +++ b/examples/thermostat/nxp/zap/thermostat_matter_thread.matter @@ -213,10 +213,10 @@ enum TestGlobalEnum : enum8 { } enum ThreeLevelAutoEnum : enum8 { - kLow = 0; - kMedium = 1; - kHigh = 2; - kAutomatic = 3; + kAuto = 0; + kLow = 1; + kMedium = 2; + kHigh = 3; } bitmap TestGlobalBitmap : bitmap32 { diff --git a/examples/thermostat/nxp/zap/thermostat_matter_wifi.matter b/examples/thermostat/nxp/zap/thermostat_matter_wifi.matter index 219be740e185b3..6230c430f8989e 100644 --- a/examples/thermostat/nxp/zap/thermostat_matter_wifi.matter +++ b/examples/thermostat/nxp/zap/thermostat_matter_wifi.matter @@ -213,10 +213,10 @@ enum TestGlobalEnum : enum8 { } enum ThreeLevelAutoEnum : enum8 { - kLow = 0; - kMedium = 1; - kHigh = 2; - kAutomatic = 3; + kAuto = 0; + kLow = 1; + kMedium = 2; + kHigh = 3; } bitmap TestGlobalBitmap : bitmap32 { diff --git a/examples/thermostat/qpg/zap/thermostaticRadiatorValve.matter b/examples/thermostat/qpg/zap/thermostaticRadiatorValve.matter index 0815e0ea559f55..1c18b43f391b8b 100644 --- a/examples/thermostat/qpg/zap/thermostaticRadiatorValve.matter +++ b/examples/thermostat/qpg/zap/thermostaticRadiatorValve.matter @@ -213,10 +213,10 @@ enum TestGlobalEnum : enum8 { } enum ThreeLevelAutoEnum : enum8 { - kLow = 0; - kMedium = 1; - kHigh = 2; - kAutomatic = 3; + kAuto = 0; + kLow = 1; + kMedium = 2; + kHigh = 3; } bitmap TestGlobalBitmap : bitmap32 { diff --git a/examples/thermostat/thermostat-common/thermostat.matter b/examples/thermostat/thermostat-common/thermostat.matter index 68cc219b8a2244..92599858019d17 100644 --- a/examples/thermostat/thermostat-common/thermostat.matter +++ b/examples/thermostat/thermostat-common/thermostat.matter @@ -213,10 +213,10 @@ enum TestGlobalEnum : enum8 { } enum ThreeLevelAutoEnum : enum8 { - kLow = 0; - kMedium = 1; - kHigh = 2; - kAutomatic = 3; + kAuto = 0; + kLow = 1; + kMedium = 2; + kHigh = 3; } bitmap TestGlobalBitmap : bitmap32 { diff --git a/examples/thread-br-app/thread-br-common/thread-br-app.matter b/examples/thread-br-app/thread-br-common/thread-br-app.matter index b3828664f65d19..035c36d52b2dab 100644 --- a/examples/thread-br-app/thread-br-common/thread-br-app.matter +++ b/examples/thread-br-app/thread-br-common/thread-br-app.matter @@ -213,10 +213,10 @@ enum TestGlobalEnum : enum8 { } enum ThreeLevelAutoEnum : enum8 { - kLow = 0; - kMedium = 1; - kHigh = 2; - kAutomatic = 3; + kAuto = 0; + kLow = 1; + kMedium = 2; + kHigh = 3; } bitmap TestGlobalBitmap : bitmap32 { diff --git a/examples/tv-app/tv-common/tv-app.matter b/examples/tv-app/tv-common/tv-app.matter index 94bce5db08efd6..eaccc1dd6f185b 100644 --- a/examples/tv-app/tv-common/tv-app.matter +++ b/examples/tv-app/tv-common/tv-app.matter @@ -213,10 +213,10 @@ enum TestGlobalEnum : enum8 { } enum ThreeLevelAutoEnum : enum8 { - kLow = 0; - kMedium = 1; - kHigh = 2; - kAutomatic = 3; + kAuto = 0; + kLow = 1; + kMedium = 2; + kHigh = 3; } bitmap TestGlobalBitmap : bitmap32 { 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 4f96676e05997d..9ad6cd0273f8fb 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 @@ -213,10 +213,10 @@ enum TestGlobalEnum : enum8 { } enum ThreeLevelAutoEnum : enum8 { - kLow = 0; - kMedium = 1; - kHigh = 2; - kAutomatic = 3; + kAuto = 0; + kLow = 1; + kMedium = 2; + kHigh = 3; } bitmap TestGlobalBitmap : bitmap32 { diff --git a/examples/virtual-device-app/virtual-device-common/virtual-device-app.matter b/examples/virtual-device-app/virtual-device-common/virtual-device-app.matter index abfa1d86518787..9f4f1c98d69473 100644 --- a/examples/virtual-device-app/virtual-device-common/virtual-device-app.matter +++ b/examples/virtual-device-app/virtual-device-common/virtual-device-app.matter @@ -213,10 +213,10 @@ enum TestGlobalEnum : enum8 { } enum ThreeLevelAutoEnum : enum8 { - kLow = 0; - kMedium = 1; - kHigh = 2; - kAutomatic = 3; + kAuto = 0; + kLow = 1; + kMedium = 2; + kHigh = 3; } bitmap TestGlobalBitmap : bitmap32 { diff --git a/examples/water-leak-detector-app/water-leak-detector-common/water-leak-detector-app.matter b/examples/water-leak-detector-app/water-leak-detector-common/water-leak-detector-app.matter index 44acb50778226e..e36fe727167004 100644 --- a/examples/water-leak-detector-app/water-leak-detector-common/water-leak-detector-app.matter +++ b/examples/water-leak-detector-app/water-leak-detector-common/water-leak-detector-app.matter @@ -213,10 +213,10 @@ enum TestGlobalEnum : enum8 { } enum ThreeLevelAutoEnum : enum8 { - kLow = 0; - kMedium = 1; - kHigh = 2; - kAutomatic = 3; + kAuto = 0; + kLow = 1; + kMedium = 2; + kHigh = 3; } bitmap TestGlobalBitmap : bitmap32 { diff --git a/examples/window-app/common/window-app.matter b/examples/window-app/common/window-app.matter index 3b5ec53473df8f..74da57387d723c 100644 --- a/examples/window-app/common/window-app.matter +++ b/examples/window-app/common/window-app.matter @@ -213,10 +213,10 @@ enum TestGlobalEnum : enum8 { } enum ThreeLevelAutoEnum : enum8 { - kLow = 0; - kMedium = 1; - kHigh = 2; - kAutomatic = 3; + kAuto = 0; + kLow = 1; + kMedium = 2; + kHigh = 3; } bitmap TestGlobalBitmap : bitmap32 { diff --git a/scripts/tools/zap/tests/outputs/all-clusters-app/app-templates/endpoint_config.h b/scripts/tools/zap/tests/outputs/all-clusters-app/app-templates/endpoint_config.h index a5c6c4fb1c461f..3f261447aa8efe 100644 --- a/scripts/tools/zap/tests/outputs/all-clusters-app/app-templates/endpoint_config.h +++ b/scripts/tools/zap/tests/outputs/all-clusters-app/app-templates/endpoint_config.h @@ -674,7 +674,7 @@ { (uint16_t) 0x0, (uint16_t) 0x0, (uint16_t) 0x1 }, /* LampAlarmMode */ \ \ /* Endpoint: 1, Cluster: Chime (server) */ \ - { (uint16_t) 0x0, (uint16_t) 0x0, (uint16_t) 0xFF }, /* ActiveChimeID */ \ + { (uint16_t) 0x0, (uint16_t) 0x0, (uint16_t) 0xFF }, /* SelectedChime */ \ \ /* Endpoint: 1, Cluster: Unit Testing (server) */ \ { (uint16_t) 0x46, (uint16_t) 0x14, (uint16_t) 0x64 }, /* range_restricted_int8u */ \ @@ -2079,7 +2079,7 @@ /* Endpoint: 1, Cluster: Chime (server) */ \ { ZAP_EMPTY_DEFAULT(), 0x00000000, 0, ZAP_TYPE(ARRAY), ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) }, /* InstalledChimeSounds */ \ { ZAP_MIN_MAX_DEFAULTS_INDEX(42), 0x00000001, 1, ZAP_TYPE(INT8U), \ - ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) | ZAP_ATTRIBUTE_MASK(WRITABLE) }, /* ActiveChimeID */ \ + ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) | ZAP_ATTRIBUTE_MASK(WRITABLE) }, /* SelectedChime */ \ { ZAP_EMPTY_DEFAULT(), 0x00000002, 1, ZAP_TYPE(BOOLEAN), \ ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) | ZAP_ATTRIBUTE_MASK(WRITABLE) }, /* Enabled */ \ { ZAP_SIMPLE_DEFAULT(0), 0x0000FFFC, 4, ZAP_TYPE(BITMAP32), 0 }, /* FeatureMap */ \ diff --git a/src/controller/data_model/controller-clusters.matter b/src/controller/data_model/controller-clusters.matter index 35aff551111182..d6949e17eca6ef 100644 --- a/src/controller/data_model/controller-clusters.matter +++ b/src/controller/data_model/controller-clusters.matter @@ -213,10 +213,10 @@ enum TestGlobalEnum : enum8 { } enum ThreeLevelAutoEnum : enum8 { - kLow = 0; - kMedium = 1; - kHigh = 2; - kAutomatic = 3; + kAuto = 0; + kLow = 1; + kMedium = 2; + kHigh = 3; } bitmap TestGlobalBitmap : bitmap32 { @@ -10483,7 +10483,7 @@ provisional cluster Chime = 1366 { } readonly attribute ChimeSoundStruct installedChimeSounds[] = 0; - attribute int8u activeChimeID = 1; + attribute int8u selectedChime = 1; attribute boolean enabled = 2; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; @@ -10588,19 +10588,19 @@ provisional cluster TlsCertificateManagement = 2049 { struct TLSCertStruct { int16u caid = 0; - long_octet_string<3000> certificate = 1; + optional long_octet_string<3000> certificate = 1; } struct TLSClientCertificateDetailStruct { int16u ccdid = 0; - long_octet_string<3000> clientCertificate = 1; - octet_string intermediateCertificates[] = 2; + optional long_octet_string<3000> clientCertificate = 1; + optional octet_string intermediateCertificates[] = 2; } readonly attribute int8u maxRootCertificates = 0; - readonly attribute int8u currentRootCertificates = 1; + readonly attribute TLSCertStruct provisionedRootCertificates[] = 1; readonly attribute int8u maxClientCertificates = 2; - readonly attribute int8u currentClientCertificates = 3; + readonly attribute TLSClientCertificateDetailStruct provisionedClientCertificates[] = 3; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -10652,15 +10652,11 @@ provisional cluster TlsCertificateManagement = 2049 { TLSClientCertificateDetailStruct clientCertificateDetails = 1; } - response struct ProvisionClientCertificateResponse = 10 { - int16u ccdid = 0; - } - request struct FindClientCertificateRequest { - int16u ccdid = 0; + nullable int16u ccdid = 0; } - response struct FindClientCertificateResponse = 12 { + response struct FindClientCertificateResponse = 11 { TLSClientCertificateDetailStruct certificateDetails[] = 0; } @@ -10668,7 +10664,7 @@ provisional cluster TlsCertificateManagement = 2049 { octet_string<64> fingerprint = 0; } - response struct LookupClientCertificateResponse = 14 { + response struct LookupClientCertificateResponse = 13 { int16u ccdid = 0; } @@ -10676,24 +10672,24 @@ provisional cluster TlsCertificateManagement = 2049 { int16u ccdid = 0; } - /** This command SHALL provision the provided certificate for the passed in CAID. */ - command access(invoke: administer) ProvisionRootCertificate(ProvisionRootCertificateRequest): ProvisionRootCertificateResponse = 0; - /** This command SHALL return the TLSCertStruct for the passed in CAID. */ - command FindRootCertificate(FindRootCertificateRequest): FindRootCertificateResponse = 2; + /** This command SHALL provision a newly provided certificate, or rotate an existing one, based on the contents of the CAID field. */ + fabric command access(invoke: administer) ProvisionRootCertificate(ProvisionRootCertificateRequest): ProvisionRootCertificateResponse = 0; + /** This command SHALL return the specified TLS root certificate, or all TLS provisioned root certificates, based on the contents of the CAID field. */ + fabric command FindRootCertificate(FindRootCertificateRequest): FindRootCertificateResponse = 2; /** This command SHALL return the CAID for the passed in fingerprint. */ - command LookupRootCertificate(LookupRootCertificateRequest): LookupRootCertificateResponse = 4; + fabric command LookupRootCertificate(LookupRootCertificateRequest): LookupRootCertificateResponse = 4; /** This command SHALL be generated to request the server removes the certificate provisioned to the provided Certificate Authority ID. */ - command access(invoke: administer) RemoveRootCertificate(RemoveRootCertificateRequest): DefaultSuccess = 6; + fabric command access(invoke: administer) RemoveRootCertificate(RemoveRootCertificateRequest): DefaultSuccess = 6; /** This command SHALL be generated to request the Node generates a Certificate Signing Request. */ - command access(invoke: administer) TLSClientCSR(TLSClientCSRRequest): TLSClientCSRResponse = 7; - /** This command SHALL be generated to request the Node provisions the provided Client Certificate Details. */ - command access(invoke: administer) ProvisionClientCertificate(ProvisionClientCertificateRequest): ProvisionClientCertificateResponse = 9; - /** This command SHALL return the TLSClientCertificateDetailStruct for the passed in CCDID. */ - command FindClientCertificate(FindClientCertificateRequest): FindClientCertificateResponse = 11; + fabric command access(invoke: administer) TLSClientCSR(TLSClientCSRRequest): TLSClientCSRResponse = 7; + /** This command SHALL be generated to request the Node provisions newly provided Client Certificate Details, or rotate an existing client certificate. */ + command access(invoke: administer) ProvisionClientCertificate(ProvisionClientCertificateRequest): DefaultSuccess = 9; + /** This command SHALL return the TLSClientCertificateDetailStruct for the passed in CCDID, or all TLS client certificates, based on the contents of the CCDID field. */ + fabric command FindClientCertificate(FindClientCertificateRequest): FindClientCertificateResponse = 10; /** This command SHALL return the CCDID for the passed in Fingerprint. */ - command LookupClientCertificate(LookupClientCertificateRequest): LookupClientCertificateResponse = 13; - /** This command SHALL be generated to request the Node removes the certificate provisioned to the provided Client Certificate Details ID. */ - command access(invoke: administer) RemoveClientCertificate(RemoveClientCertificateRequest): DefaultSuccess = 15; + fabric command LookupClientCertificate(LookupClientCertificateRequest): LookupClientCertificateResponse = 12; + /** This command SHALL be used to request the Node removes all stored information for the provided CCDID. */ + fabric command access(invoke: administer) RemoveClientCertificate(RemoveClientCertificateRequest): DefaultSuccess = 14; } /** This Cluster is used to provision TLS Endpoints with enough information to facilitate subsequent connection. */ diff --git a/src/controller/java/generated/java/chip/devicecontroller/ChipClusters.java b/src/controller/java/generated/java/chip/devicecontroller/ChipClusters.java index 6a7510d3067a42..d1f77aad4fe40c 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/ChipClusters.java +++ b/src/controller/java/generated/java/chip/devicecontroller/ChipClusters.java @@ -64153,7 +64153,7 @@ public static class ChimeCluster extends BaseChipCluster { public static final long CLUSTER_ID = 1366L; private static final long INSTALLED_CHIME_SOUNDS_ATTRIBUTE_ID = 0L; - private static final long ACTIVE_CHIME_ID_ATTRIBUTE_ID = 1L; + private static final long SELECTED_CHIME_ATTRIBUTE_ID = 1L; private static final long ENABLED_ATTRIBUTE_ID = 2L; private static final long GENERATED_COMMAND_LIST_ATTRIBUTE_ID = 65528L; private static final long ACCEPTED_COMMAND_LIST_ATTRIBUTE_ID = 65529L; @@ -64234,9 +64234,9 @@ public void onSuccess(byte[] tlv) { }, INSTALLED_CHIME_SOUNDS_ATTRIBUTE_ID, minInterval, maxInterval); } - public void readActiveChimeIDAttribute( + public void readSelectedChimeAttribute( IntegerAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ACTIVE_CHIME_ID_ATTRIBUTE_ID); + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, SELECTED_CHIME_ATTRIBUTE_ID); readAttribute(new ReportCallbackImpl(callback, path) { @Override @@ -64244,21 +64244,21 @@ public void onSuccess(byte[] tlv) { Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } - }, ACTIVE_CHIME_ID_ATTRIBUTE_ID, true); + }, SELECTED_CHIME_ATTRIBUTE_ID, true); } - public void writeActiveChimeIDAttribute(DefaultClusterCallback callback, Integer value) { - writeActiveChimeIDAttribute(callback, value, 0); + public void writeSelectedChimeAttribute(DefaultClusterCallback callback, Integer value) { + writeSelectedChimeAttribute(callback, value, 0); } - public void writeActiveChimeIDAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + public void writeSelectedChimeAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { BaseTLVType tlvValue = new UIntType(value); - writeAttribute(new WriteAttributesCallbackImpl(callback), ACTIVE_CHIME_ID_ATTRIBUTE_ID, tlvValue, timedWriteTimeoutMs); + writeAttribute(new WriteAttributesCallbackImpl(callback), SELECTED_CHIME_ATTRIBUTE_ID, tlvValue, timedWriteTimeoutMs); } - public void subscribeActiveChimeIDAttribute( + public void subscribeSelectedChimeAttribute( IntegerAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ACTIVE_CHIME_ID_ATTRIBUTE_ID); + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, SELECTED_CHIME_ATTRIBUTE_ID); subscribeAttribute(new ReportCallbackImpl(callback, path) { @Override @@ -64266,7 +64266,7 @@ public void onSuccess(byte[] tlv) { Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } - }, ACTIVE_CHIME_ID_ATTRIBUTE_ID, minInterval, maxInterval); + }, SELECTED_CHIME_ATTRIBUTE_ID, minInterval, maxInterval); } public void readEnabledAttribute( @@ -65048,9 +65048,9 @@ public static class TlsCertificateManagementCluster extends BaseChipCluster { public static final long CLUSTER_ID = 2049L; private static final long MAX_ROOT_CERTIFICATES_ATTRIBUTE_ID = 0L; - private static final long CURRENT_ROOT_CERTIFICATES_ATTRIBUTE_ID = 1L; + private static final long PROVISIONED_ROOT_CERTIFICATES_ATTRIBUTE_ID = 1L; private static final long MAX_CLIENT_CERTIFICATES_ATTRIBUTE_ID = 2L; - private static final long CURRENT_CLIENT_CERTIFICATES_ATTRIBUTE_ID = 3L; + private static final long PROVISIONED_CLIENT_CERTIFICATES_ATTRIBUTE_ID = 3L; private static final long GENERATED_COMMAND_LIST_ATTRIBUTE_ID = 65528L; private static final long ACCEPTED_COMMAND_LIST_ATTRIBUTE_ID = 65529L; private static final long EVENT_LIST_ATTRIBUTE_ID = 65530L; @@ -65226,11 +65226,11 @@ public void onResponse(StructType invokeStructValue) { }}, commandId, commandArgs, timedInvokeTimeoutMs); } - public void provisionClientCertificate(ProvisionClientCertificateResponseCallback callback, Integer ccdid, ChipStructs.TlsCertificateManagementClusterTLSClientCertificateDetailStruct clientCertificateDetails) { + public void provisionClientCertificate(DefaultClusterCallback callback, Integer ccdid, ChipStructs.TlsCertificateManagementClusterTLSClientCertificateDetailStruct clientCertificateDetails) { provisionClientCertificate(callback, ccdid, clientCertificateDetails, 0); } - public void provisionClientCertificate(ProvisionClientCertificateResponseCallback callback, Integer ccdid, ChipStructs.TlsCertificateManagementClusterTLSClientCertificateDetailStruct clientCertificateDetails, int timedInvokeTimeoutMs) { + public void provisionClientCertificate(DefaultClusterCallback callback, Integer ccdid, ChipStructs.TlsCertificateManagementClusterTLSClientCertificateDetailStruct clientCertificateDetails, int timedInvokeTimeoutMs) { final long commandId = 9L; ArrayList elements = new ArrayList<>(); @@ -65246,30 +65246,20 @@ public void provisionClientCertificate(ProvisionClientCertificateResponseCallbac invoke(new InvokeCallbackImpl(callback) { @Override public void onResponse(StructType invokeStructValue) { - final long ccdidFieldID = 0L; - Integer ccdid = null; - for (StructElement element: invokeStructValue.value()) { - if (element.contextTagNum() == ccdidFieldID) { - if (element.value(BaseTLVType.class).type() == TLVType.UInt) { - UIntType castingValue = element.value(UIntType.class); - ccdid = castingValue.value(Integer.class); - } - } - } - callback.onSuccess(ccdid); + callback.onSuccess(); }}, commandId, commandArgs, timedInvokeTimeoutMs); } - public void findClientCertificate(FindClientCertificateResponseCallback callback, Integer ccdid) { + public void findClientCertificate(FindClientCertificateResponseCallback callback, @Nullable Integer ccdid) { findClientCertificate(callback, ccdid, 0); } - public void findClientCertificate(FindClientCertificateResponseCallback callback, Integer ccdid, int timedInvokeTimeoutMs) { - final long commandId = 11L; + public void findClientCertificate(FindClientCertificateResponseCallback callback, @Nullable Integer ccdid, int timedInvokeTimeoutMs) { + final long commandId = 10L; ArrayList elements = new ArrayList<>(); final long ccdidFieldID = 0L; - BaseTLVType ccdidtlvValue = new UIntType(ccdid); + BaseTLVType ccdidtlvValue = ccdid != null ? new UIntType(ccdid) : new NullType(); elements.add(new StructElement(ccdidFieldID, ccdidtlvValue)); StructType commandArgs = new StructType(elements); @@ -65295,7 +65285,7 @@ public void lookupClientCertificate(LookupClientCertificateResponseCallback call } public void lookupClientCertificate(LookupClientCertificateResponseCallback callback, byte[] fingerprint, int timedInvokeTimeoutMs) { - final long commandId = 13L; + final long commandId = 12L; ArrayList elements = new ArrayList<>(); final long fingerprintFieldID = 0L; @@ -65325,7 +65315,7 @@ public void removeClientCertificate(DefaultClusterCallback callback, Integer ccd } public void removeClientCertificate(DefaultClusterCallback callback, Integer ccdid, int timedInvokeTimeoutMs) { - final long commandId = 15L; + final long commandId = 14L; ArrayList elements = new ArrayList<>(); final long ccdidFieldID = 0L; @@ -65356,10 +65346,6 @@ public interface TLSClientCSRResponseCallback extends BaseClusterCallback { void onSuccess(Integer ccdid, byte[] csr, byte[] nonce); } - public interface ProvisionClientCertificateResponseCallback extends BaseClusterCallback { - void onSuccess(Integer ccdid); - } - public interface FindClientCertificateResponseCallback extends BaseClusterCallback { void onSuccess(ArrayList certificateDetails); } @@ -65368,6 +65354,14 @@ public interface LookupClientCertificateResponseCallback extends BaseClusterCall void onSuccess(Integer ccdid); } + public interface ProvisionedRootCertificatesAttributeCallback extends BaseAttributeCallback { + void onSuccess(List value); + } + + public interface ProvisionedClientCertificatesAttributeCallback extends BaseAttributeCallback { + void onSuccess(List value); + } + public interface GeneratedCommandListAttributeCallback extends BaseAttributeCallback { void onSuccess(List value); } @@ -65410,30 +65404,30 @@ public void onSuccess(byte[] tlv) { }, MAX_ROOT_CERTIFICATES_ATTRIBUTE_ID, minInterval, maxInterval); } - public void readCurrentRootCertificatesAttribute( - IntegerAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, CURRENT_ROOT_CERTIFICATES_ATTRIBUTE_ID); + public void readProvisionedRootCertificatesAttribute( + ProvisionedRootCertificatesAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, PROVISIONED_ROOT_CERTIFICATES_ATTRIBUTE_ID); readAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } - }, CURRENT_ROOT_CERTIFICATES_ATTRIBUTE_ID, true); + }, PROVISIONED_ROOT_CERTIFICATES_ATTRIBUTE_ID, true); } - public void subscribeCurrentRootCertificatesAttribute( - IntegerAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, CURRENT_ROOT_CERTIFICATES_ATTRIBUTE_ID); + public void subscribeProvisionedRootCertificatesAttribute( + ProvisionedRootCertificatesAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, PROVISIONED_ROOT_CERTIFICATES_ATTRIBUTE_ID); subscribeAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } - }, CURRENT_ROOT_CERTIFICATES_ATTRIBUTE_ID, minInterval, maxInterval); + }, PROVISIONED_ROOT_CERTIFICATES_ATTRIBUTE_ID, minInterval, maxInterval); } public void readMaxClientCertificatesAttribute( @@ -65462,30 +65456,30 @@ public void onSuccess(byte[] tlv) { }, MAX_CLIENT_CERTIFICATES_ATTRIBUTE_ID, minInterval, maxInterval); } - public void readCurrentClientCertificatesAttribute( - IntegerAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, CURRENT_CLIENT_CERTIFICATES_ATTRIBUTE_ID); + public void readProvisionedClientCertificatesAttribute( + ProvisionedClientCertificatesAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, PROVISIONED_CLIENT_CERTIFICATES_ATTRIBUTE_ID); readAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } - }, CURRENT_CLIENT_CERTIFICATES_ATTRIBUTE_ID, true); + }, PROVISIONED_CLIENT_CERTIFICATES_ATTRIBUTE_ID, true); } - public void subscribeCurrentClientCertificatesAttribute( - IntegerAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, CURRENT_CLIENT_CERTIFICATES_ATTRIBUTE_ID); + public void subscribeProvisionedClientCertificatesAttribute( + ProvisionedClientCertificatesAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, PROVISIONED_CLIENT_CERTIFICATES_ATTRIBUTE_ID); subscribeAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } - }, CURRENT_CLIENT_CERTIFICATES_ATTRIBUTE_ID, minInterval, maxInterval); + }, PROVISIONED_CLIENT_CERTIFICATES_ATTRIBUTE_ID, minInterval, maxInterval); } public void readGeneratedCommandListAttribute( diff --git a/src/controller/java/generated/java/chip/devicecontroller/ChipStructs.java b/src/controller/java/generated/java/chip/devicecontroller/ChipStructs.java index 91b5db8167600c..1d143d06981fa0 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/ChipStructs.java +++ b/src/controller/java/generated/java/chip/devicecontroller/ChipStructs.java @@ -16151,13 +16151,13 @@ public String toString() { } public static class TlsCertificateManagementClusterTLSCertStruct { public Integer caid; - public byte[] certificate; + public Optional certificate; private static final long CAID_ID = 0L; private static final long CERTIFICATE_ID = 1L; public TlsCertificateManagementClusterTLSCertStruct( Integer caid, - byte[] certificate + Optional certificate ) { this.caid = caid; this.certificate = certificate; @@ -16166,7 +16166,7 @@ public TlsCertificateManagementClusterTLSCertStruct( public StructType encodeTlv() { ArrayList values = new ArrayList<>(); values.add(new StructElement(CAID_ID, new UIntType(caid))); - values.add(new StructElement(CERTIFICATE_ID, new ByteArrayType(certificate))); + values.add(new StructElement(CERTIFICATE_ID, certificate.map((nonOptionalcertificate) -> new ByteArrayType(nonOptionalcertificate)).orElse(new EmptyType()))); return new StructType(values); } @@ -16176,7 +16176,7 @@ public static TlsCertificateManagementClusterTLSCertStruct decodeTlv(BaseTLVType return null; } Integer caid = null; - byte[] certificate = null; + Optional certificate = Optional.empty(); for (StructElement element: ((StructType)tlvValue).value()) { if (element.contextTagNum() == CAID_ID) { if (element.value(BaseTLVType.class).type() == TLVType.UInt) { @@ -16186,7 +16186,7 @@ public static TlsCertificateManagementClusterTLSCertStruct decodeTlv(BaseTLVType } else if (element.contextTagNum() == CERTIFICATE_ID) { if (element.value(BaseTLVType.class).type() == TLVType.ByteArray) { ByteArrayType castingValue = element.value(ByteArrayType.class); - certificate = castingValue.value(byte[].class); + certificate = Optional.of(castingValue.value(byte[].class)); } } } @@ -16204,7 +16204,7 @@ public String toString() { output.append(caid); output.append("\n"); output.append("\tcertificate: "); - output.append(Arrays.toString(certificate)); + output.append(certificate.isPresent() ? Arrays.toString(certificate.get()) : ""); output.append("\n"); output.append("}\n"); return output.toString(); @@ -16212,16 +16212,16 @@ public String toString() { } public static class TlsCertificateManagementClusterTLSClientCertificateDetailStruct { public Integer ccdid; - public byte[] clientCertificate; - public ArrayList intermediateCertificates; + public Optional clientCertificate; + public Optional> intermediateCertificates; private static final long CCDID_ID = 0L; private static final long CLIENT_CERTIFICATE_ID = 1L; private static final long INTERMEDIATE_CERTIFICATES_ID = 2L; public TlsCertificateManagementClusterTLSClientCertificateDetailStruct( Integer ccdid, - byte[] clientCertificate, - ArrayList intermediateCertificates + Optional clientCertificate, + Optional> intermediateCertificates ) { this.ccdid = ccdid; this.clientCertificate = clientCertificate; @@ -16231,8 +16231,8 @@ public TlsCertificateManagementClusterTLSClientCertificateDetailStruct( public StructType encodeTlv() { ArrayList values = new ArrayList<>(); values.add(new StructElement(CCDID_ID, new UIntType(ccdid))); - values.add(new StructElement(CLIENT_CERTIFICATE_ID, new ByteArrayType(clientCertificate))); - values.add(new StructElement(INTERMEDIATE_CERTIFICATES_ID, ArrayType.generateArrayType(intermediateCertificates, (elementintermediateCertificates) -> new ByteArrayType(elementintermediateCertificates)))); + values.add(new StructElement(CLIENT_CERTIFICATE_ID, clientCertificate.map((nonOptionalclientCertificate) -> new ByteArrayType(nonOptionalclientCertificate)).orElse(new EmptyType()))); + values.add(new StructElement(INTERMEDIATE_CERTIFICATES_ID, intermediateCertificates.map((nonOptionalintermediateCertificates) -> ArrayType.generateArrayType(nonOptionalintermediateCertificates, (elementnonOptionalintermediateCertificates) -> new ByteArrayType(elementnonOptionalintermediateCertificates))).orElse(new EmptyType()))); return new StructType(values); } @@ -16242,8 +16242,8 @@ public static TlsCertificateManagementClusterTLSClientCertificateDetailStruct de return null; } Integer ccdid = null; - byte[] clientCertificate = null; - ArrayList intermediateCertificates = null; + Optional clientCertificate = Optional.empty(); + Optional> intermediateCertificates = Optional.empty(); for (StructElement element: ((StructType)tlvValue).value()) { if (element.contextTagNum() == CCDID_ID) { if (element.value(BaseTLVType.class).type() == TLVType.UInt) { @@ -16253,12 +16253,12 @@ public static TlsCertificateManagementClusterTLSClientCertificateDetailStruct de } else if (element.contextTagNum() == CLIENT_CERTIFICATE_ID) { if (element.value(BaseTLVType.class).type() == TLVType.ByteArray) { ByteArrayType castingValue = element.value(ByteArrayType.class); - clientCertificate = castingValue.value(byte[].class); + clientCertificate = Optional.of(castingValue.value(byte[].class)); } } else if (element.contextTagNum() == INTERMEDIATE_CERTIFICATES_ID) { if (element.value(BaseTLVType.class).type() == TLVType.Array) { ArrayType castingValue = element.value(ArrayType.class); - intermediateCertificates = castingValue.map((elementcastingValue) -> elementcastingValue.value(byte[].class)); + intermediateCertificates = Optional.of(castingValue.map((elementcastingValue) -> elementcastingValue.value(byte[].class))); } } } @@ -16277,7 +16277,7 @@ public String toString() { output.append(ccdid); output.append("\n"); output.append("\tclientCertificate: "); - output.append(Arrays.toString(clientCertificate)); + output.append(clientCertificate.isPresent() ? Arrays.toString(clientCertificate.get()) : ""); output.append("\n"); output.append("\tintermediateCertificates: "); output.append(intermediateCertificates); diff --git a/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping.java b/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping.java index 6ba48f150a700b..aa5da082e6449a 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping.java +++ b/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping.java @@ -18407,7 +18407,7 @@ public long getID() { public enum Attribute { InstalledChimeSounds(0L), - ActiveChimeID(1L), + SelectedChime(1L), Enabled(2L), GeneratedCommandList(65528L), AcceptedCommandList(65529L), @@ -18751,9 +18751,9 @@ public long getID() { public enum Attribute { MaxRootCertificates(0L), - CurrentRootCertificates(1L), + ProvisionedRootCertificates(1L), MaxClientCertificates(2L), - CurrentClientCertificates(3L), + ProvisionedClientCertificates(3L), GeneratedCommandList(65528L), AcceptedCommandList(65529L), EventList(65530L), @@ -18806,9 +18806,9 @@ public enum Command { RemoveRootCertificate(6L), TLSClientCSR(7L), ProvisionClientCertificate(9L), - FindClientCertificate(11L), - LookupClientCertificate(13L), - RemoveClientCertificate(15L),; + FindClientCertificate(10L), + LookupClientCertificate(12L), + RemoveClientCertificate(14L),; private final long id; Command(long id) { this.id = id; diff --git a/src/controller/java/generated/java/chip/devicecontroller/ClusterInfoMapping.java b/src/controller/java/generated/java/chip/devicecontroller/ClusterInfoMapping.java index dd9e9f87ed6622..113194d569af5c 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/ClusterInfoMapping.java +++ b/src/controller/java/generated/java/chip/devicecontroller/ClusterInfoMapping.java @@ -21707,7 +21707,7 @@ public void onError(Exception error) { } } - public static class DelegatedTlsCertificateManagementClusterProvisionClientCertificateResponseCallback implements ChipClusters.TlsCertificateManagementCluster.ProvisionClientCertificateResponseCallback, DelegatedClusterCallback { + public static class DelegatedTlsCertificateManagementClusterFindClientCertificateResponseCallback implements ChipClusters.TlsCertificateManagementCluster.FindClientCertificateResponseCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -21715,11 +21715,12 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(Integer ccdid) { + public void onSuccess(ArrayList certificateDetails) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo ccdidResponseValue = new CommandResponseInfo("ccdid", "Integer"); - responseValues.put(ccdidResponseValue, ccdid); + // certificateDetails: TLSClientCertificateDetailStruct + // Conversion from this type to Java is not properly implemented yet + callback.onSuccess(responseValues); } @@ -21729,7 +21730,7 @@ public void onError(Exception error) { } } - public static class DelegatedTlsCertificateManagementClusterFindClientCertificateResponseCallback implements ChipClusters.TlsCertificateManagementCluster.FindClientCertificateResponseCallback, DelegatedClusterCallback { + public static class DelegatedTlsCertificateManagementClusterLookupClientCertificateResponseCallback implements ChipClusters.TlsCertificateManagementCluster.LookupClientCertificateResponseCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -21737,12 +21738,11 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(ArrayList certificateDetails) { + public void onSuccess(Integer ccdid) { Map responseValues = new LinkedHashMap<>(); - // certificateDetails: TLSClientCertificateDetailStruct - // Conversion from this type to Java is not properly implemented yet - + CommandResponseInfo ccdidResponseValue = new CommandResponseInfo("ccdid", "Integer"); + responseValues.put(ccdidResponseValue, ccdid); callback.onSuccess(responseValues); } @@ -21751,8 +21751,7 @@ public void onError(Exception error) { callback.onFailure(error); } } - - public static class DelegatedTlsCertificateManagementClusterLookupClientCertificateResponseCallback implements ChipClusters.TlsCertificateManagementCluster.LookupClientCertificateResponseCallback, DelegatedClusterCallback { + public static class DelegatedTlsCertificateManagementClusterProvisionedRootCertificatesAttributeCallback implements ChipClusters.TlsCertificateManagementCluster.ProvisionedRootCertificatesAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -21760,19 +21759,40 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(Integer ccdid) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + responseValues.put(commandResponseInfo, valueList); + callback.onSuccess(responseValues); + } - CommandResponseInfo ccdidResponseValue = new CommandResponseInfo("ccdid", "Integer"); - responseValues.put(ccdidResponseValue, ccdid); + @Override + public void onError(Exception ex) { + callback.onFailure(ex); + } + } + + public static class DelegatedTlsCertificateManagementClusterProvisionedClientCertificatesAttributeCallback implements ChipClusters.TlsCertificateManagementCluster.ProvisionedClientCertificatesAttributeCallback, DelegatedClusterCallback { + private ClusterCommandCallback callback; + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } + + @Override + public void onSuccess(List valueList) { + Map responseValues = new LinkedHashMap<>(); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @Override - public void onError(Exception error) { - callback.onFailure(error); + public void onError(Exception ex) { + callback.onFailure(ex); } } + public static class DelegatedTlsCertificateManagementClusterGeneratedCommandListAttributeCallback implements ChipClusters.TlsCertificateManagementCluster.GeneratedCommandListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override @@ -31756,18 +31776,16 @@ public Map> getCommandMap() { InteractionInfo tlsCertificateManagementprovisionClientCertificateInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { ((ChipClusters.TlsCertificateManagementCluster) cluster) - .provisionClientCertificate((ChipClusters.TlsCertificateManagementCluster.ProvisionClientCertificateResponseCallback) callback - , (Integer) - commandArguments.get("ccdid") - - , (ChipStructs.TlsCertificateManagementClusterTLSClientCertificateDetailStruct) - commandArguments.get("clientCertificateDetails") - - ); - }, - () -> new DelegatedTlsCertificateManagementClusterProvisionClientCertificateResponseCallback(), + .provisionClientCertificate((DefaultClusterCallback) callback + , (Integer) + commandArguments.get("ccdid") + , (ChipStructs.TlsCertificateManagementClusterTLSClientCertificateDetailStruct) + commandArguments.get("clientCertificateDetails") + ); + }, + () -> new DelegatedDefaultClusterCallback(), tlsCertificateManagementprovisionClientCertificateCommandParams - ); + ); tlsCertificateManagementClusterInteractionInfoMap.put("provisionClientCertificate", tlsCertificateManagementprovisionClientCertificateInteractionInfo); Map tlsCertificateManagementfindClientCertificateCommandParams = new LinkedHashMap(); diff --git a/src/controller/java/generated/java/chip/devicecontroller/ClusterReadMapping.java b/src/controller/java/generated/java/chip/devicecontroller/ClusterReadMapping.java index ca0d380d35138d..8a8be3a220d8d1 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/ClusterReadMapping.java +++ b/src/controller/java/generated/java/chip/devicecontroller/ClusterReadMapping.java @@ -19354,17 +19354,17 @@ private static Map readChimeInteractionInfo() { readChimeInstalledChimeSoundsCommandParams ); result.put("readInstalledChimeSoundsAttribute", readChimeInstalledChimeSoundsAttributeInteractionInfo); - Map readChimeActiveChimeIDCommandParams = new LinkedHashMap(); - InteractionInfo readChimeActiveChimeIDAttributeInteractionInfo = new InteractionInfo( + Map readChimeSelectedChimeCommandParams = new LinkedHashMap(); + InteractionInfo readChimeSelectedChimeAttributeInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { - ((ChipClusters.ChimeCluster) cluster).readActiveChimeIDAttribute( + ((ChipClusters.ChimeCluster) cluster).readSelectedChimeAttribute( (ChipClusters.IntegerAttributeCallback) callback ); }, () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), - readChimeActiveChimeIDCommandParams + readChimeSelectedChimeCommandParams ); - result.put("readActiveChimeIDAttribute", readChimeActiveChimeIDAttributeInteractionInfo); + result.put("readSelectedChimeAttribute", readChimeSelectedChimeAttributeInteractionInfo); Map readChimeEnabledCommandParams = new LinkedHashMap(); InteractionInfo readChimeEnabledAttributeInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { @@ -19630,17 +19630,17 @@ private static Map readTlsCertificateManagementInteract readTlsCertificateManagementMaxRootCertificatesCommandParams ); result.put("readMaxRootCertificatesAttribute", readTlsCertificateManagementMaxRootCertificatesAttributeInteractionInfo); - Map readTlsCertificateManagementCurrentRootCertificatesCommandParams = new LinkedHashMap(); - InteractionInfo readTlsCertificateManagementCurrentRootCertificatesAttributeInteractionInfo = new InteractionInfo( + Map readTlsCertificateManagementProvisionedRootCertificatesCommandParams = new LinkedHashMap(); + InteractionInfo readTlsCertificateManagementProvisionedRootCertificatesAttributeInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { - ((ChipClusters.TlsCertificateManagementCluster) cluster).readCurrentRootCertificatesAttribute( - (ChipClusters.IntegerAttributeCallback) callback + ((ChipClusters.TlsCertificateManagementCluster) cluster).readProvisionedRootCertificatesAttribute( + (ChipClusters.TlsCertificateManagementCluster.ProvisionedRootCertificatesAttributeCallback) callback ); }, - () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), - readTlsCertificateManagementCurrentRootCertificatesCommandParams + () -> new ClusterInfoMapping.DelegatedTlsCertificateManagementClusterProvisionedRootCertificatesAttributeCallback(), + readTlsCertificateManagementProvisionedRootCertificatesCommandParams ); - result.put("readCurrentRootCertificatesAttribute", readTlsCertificateManagementCurrentRootCertificatesAttributeInteractionInfo); + result.put("readProvisionedRootCertificatesAttribute", readTlsCertificateManagementProvisionedRootCertificatesAttributeInteractionInfo); Map readTlsCertificateManagementMaxClientCertificatesCommandParams = new LinkedHashMap(); InteractionInfo readTlsCertificateManagementMaxClientCertificatesAttributeInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { @@ -19652,17 +19652,17 @@ private static Map readTlsCertificateManagementInteract readTlsCertificateManagementMaxClientCertificatesCommandParams ); result.put("readMaxClientCertificatesAttribute", readTlsCertificateManagementMaxClientCertificatesAttributeInteractionInfo); - Map readTlsCertificateManagementCurrentClientCertificatesCommandParams = new LinkedHashMap(); - InteractionInfo readTlsCertificateManagementCurrentClientCertificatesAttributeInteractionInfo = new InteractionInfo( + Map readTlsCertificateManagementProvisionedClientCertificatesCommandParams = new LinkedHashMap(); + InteractionInfo readTlsCertificateManagementProvisionedClientCertificatesAttributeInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { - ((ChipClusters.TlsCertificateManagementCluster) cluster).readCurrentClientCertificatesAttribute( - (ChipClusters.IntegerAttributeCallback) callback + ((ChipClusters.TlsCertificateManagementCluster) cluster).readProvisionedClientCertificatesAttribute( + (ChipClusters.TlsCertificateManagementCluster.ProvisionedClientCertificatesAttributeCallback) callback ); }, - () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), - readTlsCertificateManagementCurrentClientCertificatesCommandParams + () -> new ClusterInfoMapping.DelegatedTlsCertificateManagementClusterProvisionedClientCertificatesAttributeCallback(), + readTlsCertificateManagementProvisionedClientCertificatesCommandParams ); - result.put("readCurrentClientCertificatesAttribute", readTlsCertificateManagementCurrentClientCertificatesAttributeInteractionInfo); + result.put("readProvisionedClientCertificatesAttribute", readTlsCertificateManagementProvisionedClientCertificatesAttributeInteractionInfo); Map readTlsCertificateManagementGeneratedCommandListCommandParams = new LinkedHashMap(); InteractionInfo readTlsCertificateManagementGeneratedCommandListAttributeInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { diff --git a/src/controller/java/generated/java/chip/devicecontroller/ClusterWriteMapping.java b/src/controller/java/generated/java/chip/devicecontroller/ClusterWriteMapping.java index ed5b6bc846b30e..40a1f7c428e471 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/ClusterWriteMapping.java +++ b/src/controller/java/generated/java/chip/devicecontroller/ClusterWriteMapping.java @@ -3751,28 +3751,28 @@ public Map> getWriteAttributeMap() { Map writePushAvStreamTransportInteractionInfo = new LinkedHashMap<>(); writeAttributeMap.put("pushAvStreamTransport", writePushAvStreamTransportInteractionInfo); Map writeChimeInteractionInfo = new LinkedHashMap<>(); - Map writeChimeActiveChimeIDCommandParams = new LinkedHashMap(); - CommandParameterInfo chimeactiveChimeIDCommandParameterInfo = + Map writeChimeSelectedChimeCommandParams = new LinkedHashMap(); + CommandParameterInfo chimeselectedChimeCommandParameterInfo = new CommandParameterInfo( "value", Integer.class, Integer.class ); - writeChimeActiveChimeIDCommandParams.put( + writeChimeSelectedChimeCommandParams.put( "value", - chimeactiveChimeIDCommandParameterInfo + chimeselectedChimeCommandParameterInfo ); - InteractionInfo writeChimeActiveChimeIDAttributeInteractionInfo = new InteractionInfo( + InteractionInfo writeChimeSelectedChimeAttributeInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { - ((ChipClusters.ChimeCluster) cluster).writeActiveChimeIDAttribute( + ((ChipClusters.ChimeCluster) cluster).writeSelectedChimeAttribute( (DefaultClusterCallback) callback, (Integer) commandArguments.get("value") ); }, () -> new ClusterInfoMapping.DelegatedDefaultClusterCallback(), - writeChimeActiveChimeIDCommandParams + writeChimeSelectedChimeCommandParams ); - writeChimeInteractionInfo.put("writeActiveChimeIDAttribute", writeChimeActiveChimeIDAttributeInteractionInfo); + writeChimeInteractionInfo.put("writeSelectedChimeAttribute", writeChimeSelectedChimeAttributeInteractionInfo); Map writeChimeEnabledCommandParams = new LinkedHashMap(); CommandParameterInfo chimeenabledCommandParameterInfo = new CommandParameterInfo( diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/TlsCertificateManagementClusterTLSCertStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/TlsCertificateManagementClusterTLSCertStruct.kt index 304c1e9eee6bef..82772e3f62a17e 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/TlsCertificateManagementClusterTLSCertStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/TlsCertificateManagementClusterTLSCertStruct.kt @@ -17,12 +17,16 @@ package chip.devicecontroller.cluster.structs import chip.devicecontroller.cluster.* +import java.util.Optional import matter.tlv.ContextSpecificTag import matter.tlv.Tag import matter.tlv.TlvReader import matter.tlv.TlvWriter -class TlsCertificateManagementClusterTLSCertStruct(val caid: UInt, val certificate: ByteArray) { +class TlsCertificateManagementClusterTLSCertStruct( + val caid: UInt, + val certificate: Optional, +) { override fun toString(): String = buildString { append("TlsCertificateManagementClusterTLSCertStruct {\n") append("\tcaid : $caid\n") @@ -34,7 +38,10 @@ class TlsCertificateManagementClusterTLSCertStruct(val caid: UInt, val certifica tlvWriter.apply { startStructure(tlvTag) put(ContextSpecificTag(TAG_CAID), caid) - put(ContextSpecificTag(TAG_CERTIFICATE), certificate) + if (certificate.isPresent) { + val optcertificate = certificate.get() + put(ContextSpecificTag(TAG_CERTIFICATE), optcertificate) + } endStructure() } } @@ -46,7 +53,12 @@ class TlsCertificateManagementClusterTLSCertStruct(val caid: UInt, val certifica fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): TlsCertificateManagementClusterTLSCertStruct { tlvReader.enterStructure(tlvTag) val caid = tlvReader.getUInt(ContextSpecificTag(TAG_CAID)) - val certificate = tlvReader.getByteArray(ContextSpecificTag(TAG_CERTIFICATE)) + val certificate = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_CERTIFICATE))) { + Optional.of(tlvReader.getByteArray(ContextSpecificTag(TAG_CERTIFICATE))) + } else { + Optional.empty() + } tlvReader.exitContainer() diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/TlsCertificateManagementClusterTLSClientCertificateDetailStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/TlsCertificateManagementClusterTLSClientCertificateDetailStruct.kt index eb53f1ebc03d66..c4c7aa852f50d5 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/TlsCertificateManagementClusterTLSClientCertificateDetailStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/TlsCertificateManagementClusterTLSClientCertificateDetailStruct.kt @@ -17,6 +17,7 @@ package chip.devicecontroller.cluster.structs import chip.devicecontroller.cluster.* +import java.util.Optional import matter.tlv.AnonymousTag import matter.tlv.ContextSpecificTag import matter.tlv.Tag @@ -25,8 +26,8 @@ import matter.tlv.TlvWriter class TlsCertificateManagementClusterTLSClientCertificateDetailStruct( val ccdid: UInt, - val clientCertificate: ByteArray, - val intermediateCertificates: List, + val clientCertificate: Optional, + val intermediateCertificates: Optional>, ) { override fun toString(): String = buildString { append("TlsCertificateManagementClusterTLSClientCertificateDetailStruct {\n") @@ -40,12 +41,18 @@ class TlsCertificateManagementClusterTLSClientCertificateDetailStruct( tlvWriter.apply { startStructure(tlvTag) put(ContextSpecificTag(TAG_CCDID), ccdid) - put(ContextSpecificTag(TAG_CLIENT_CERTIFICATE), clientCertificate) - startArray(ContextSpecificTag(TAG_INTERMEDIATE_CERTIFICATES)) - for (item in intermediateCertificates.iterator()) { - put(AnonymousTag, item) + if (clientCertificate.isPresent) { + val optclientCertificate = clientCertificate.get() + put(ContextSpecificTag(TAG_CLIENT_CERTIFICATE), optclientCertificate) + } + if (intermediateCertificates.isPresent) { + val optintermediateCertificates = intermediateCertificates.get() + startArray(ContextSpecificTag(TAG_INTERMEDIATE_CERTIFICATES)) + for (item in optintermediateCertificates.iterator()) { + put(AnonymousTag, item) + } + endArray() } - endArray() endStructure() } } @@ -61,14 +68,25 @@ class TlsCertificateManagementClusterTLSClientCertificateDetailStruct( ): TlsCertificateManagementClusterTLSClientCertificateDetailStruct { tlvReader.enterStructure(tlvTag) val ccdid = tlvReader.getUInt(ContextSpecificTag(TAG_CCDID)) - val clientCertificate = tlvReader.getByteArray(ContextSpecificTag(TAG_CLIENT_CERTIFICATE)) + val clientCertificate = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_CLIENT_CERTIFICATE))) { + Optional.of(tlvReader.getByteArray(ContextSpecificTag(TAG_CLIENT_CERTIFICATE))) + } else { + Optional.empty() + } val intermediateCertificates = - buildList { - tlvReader.enterArray(ContextSpecificTag(TAG_INTERMEDIATE_CERTIFICATES)) - while (!tlvReader.isEndOfContainer()) { - add(tlvReader.getByteArray(AnonymousTag)) - } - tlvReader.exitContainer() + if (tlvReader.isNextTag(ContextSpecificTag(TAG_INTERMEDIATE_CERTIFICATES))) { + Optional.of( + buildList { + tlvReader.enterArray(ContextSpecificTag(TAG_INTERMEDIATE_CERTIFICATES)) + while (!tlvReader.isEndOfContainer()) { + add(tlvReader.getByteArray(AnonymousTag)) + } + tlvReader.exitContainer() + } + ) + } else { + Optional.empty() } tlvReader.exitContainer() diff --git a/src/controller/java/generated/java/matter/controller/cluster/clusters/ChimeCluster.kt b/src/controller/java/generated/java/matter/controller/cluster/clusters/ChimeCluster.kt index cd23c6d3598064..716cd7d03b3b46 100644 --- a/src/controller/java/generated/java/matter/controller/cluster/clusters/ChimeCluster.kt +++ b/src/controller/java/generated/java/matter/controller/cluster/clusters/ChimeCluster.kt @@ -210,7 +210,7 @@ class ChimeCluster(private val controller: MatterController, private val endpoin } } - suspend fun readActiveChimeIDAttribute(): UByte { + suspend fun readSelectedChimeAttribute(): UByte { val ATTRIBUTE_ID: UInt = 1u val attributePath = @@ -232,7 +232,7 @@ class ChimeCluster(private val controller: MatterController, private val endpoin it.path.attributeId == ATTRIBUTE_ID } - requireNotNull(attributeData) { "Activechimeid attribute not found in response" } + requireNotNull(attributeData) { "Selectedchime attribute not found in response" } // Decode the TLV data into the appropriate type val tlvReader = TlvReader(attributeData.data) @@ -241,7 +241,7 @@ class ChimeCluster(private val controller: MatterController, private val endpoin return decodedValue } - suspend fun writeActiveChimeIDAttribute(value: UByte, timedWriteTimeout: Duration? = null) { + suspend fun writeSelectedChimeAttribute(value: UByte, timedWriteTimeout: Duration? = null) { val ATTRIBUTE_ID: UInt = 1u val tlvWriter = TlvWriter() @@ -281,7 +281,7 @@ class ChimeCluster(private val controller: MatterController, private val endpoin } } - suspend fun subscribeActiveChimeIDAttribute( + suspend fun subscribeSelectedChimeAttribute( minInterval: Int, maxInterval: Int, ): Flow { @@ -316,7 +316,7 @@ class ChimeCluster(private val controller: MatterController, private val endpoin .filterIsInstance() .firstOrNull { it.path.attributeId == ATTRIBUTE_ID } - requireNotNull(attributeData) { "Activechimeid attribute not found in Node State update" } + requireNotNull(attributeData) { "Selectedchime attribute not found in Node State update" } // Decode the TLV data into the appropriate type val tlvReader = TlvReader(attributeData.data) diff --git a/src/controller/java/generated/java/matter/controller/cluster/clusters/TlsCertificateManagementCluster.kt b/src/controller/java/generated/java/matter/controller/cluster/clusters/TlsCertificateManagementCluster.kt index e4329039707422..d38e706fd09fca 100644 --- a/src/controller/java/generated/java/matter/controller/cluster/clusters/TlsCertificateManagementCluster.kt +++ b/src/controller/java/generated/java/matter/controller/cluster/clusters/TlsCertificateManagementCluster.kt @@ -54,14 +54,41 @@ class TlsCertificateManagementCluster( class TLSClientCSRResponse(val ccdid: UShort, val csr: ByteArray, val nonce: ByteArray) - class ProvisionClientCertificateResponse(val ccdid: UShort) - class FindClientCertificateResponse( val certificateDetails: List ) class LookupClientCertificateResponse(val ccdid: UShort) + class ProvisionedRootCertificatesAttribute( + val value: List + ) + + sealed class ProvisionedRootCertificatesAttributeSubscriptionState { + data class Success(val value: List) : + ProvisionedRootCertificatesAttributeSubscriptionState() + + data class Error(val exception: Exception) : + ProvisionedRootCertificatesAttributeSubscriptionState() + + object SubscriptionEstablished : ProvisionedRootCertificatesAttributeSubscriptionState() + } + + class ProvisionedClientCertificatesAttribute( + val value: List + ) + + sealed class ProvisionedClientCertificatesAttributeSubscriptionState { + data class Success( + val value: List + ) : ProvisionedClientCertificatesAttributeSubscriptionState() + + data class Error(val exception: Exception) : + ProvisionedClientCertificatesAttributeSubscriptionState() + + object SubscriptionEstablished : ProvisionedClientCertificatesAttributeSubscriptionState() + } + class GeneratedCommandListAttribute(val value: List) sealed class GeneratedCommandListAttributeSubscriptionState { @@ -348,7 +375,7 @@ class TlsCertificateManagementCluster( ccdid: UShort, clientCertificateDetails: TlsCertificateManagementClusterTLSClientCertificateDetailStruct, timedInvokeTimeout: Duration? = null, - ): ProvisionClientCertificateResponse { + ) { val commandId: UInt = 9u val tlvWriter = TlvWriter() @@ -373,42 +400,19 @@ class TlsCertificateManagementCluster( val response: InvokeResponse = controller.invoke(request) logger.log(Level.FINE, "Invoke command succeeded: ${response}") - - val tlvReader = TlvReader(response.payload) - tlvReader.enterStructure(AnonymousTag) - val TAG_CCDID: Int = 0 - var ccdid_decoded: UShort? = null - - while (!tlvReader.isEndOfContainer()) { - val tag = tlvReader.peekElement().tag - - if (tag == ContextSpecificTag(TAG_CCDID)) { - ccdid_decoded = tlvReader.getUShort(tag) - } else { - tlvReader.skipElement() - } - } - - if (ccdid_decoded == null) { - throw IllegalStateException("ccdid not found in TLV") - } - - tlvReader.exitContainer() - - return ProvisionClientCertificateResponse(ccdid_decoded) } suspend fun findClientCertificate( - ccdid: UShort, + ccdid: UShort?, timedInvokeTimeout: Duration? = null, ): FindClientCertificateResponse { - val commandId: UInt = 11u + val commandId: UInt = 10u val tlvWriter = TlvWriter() tlvWriter.startStructure(AnonymousTag) val TAG_CCDID_REQ: Int = 0 - tlvWriter.put(ContextSpecificTag(TAG_CCDID_REQ), ccdid) + ccdid?.let { tlvWriter.put(ContextSpecificTag(TAG_CCDID_REQ), ccdid) } tlvWriter.endStructure() val request: InvokeRequest = @@ -463,7 +467,7 @@ class TlsCertificateManagementCluster( fingerprint: ByteArray, timedInvokeTimeout: Duration? = null, ): LookupClientCertificateResponse { - val commandId: UInt = 13u + val commandId: UInt = 12u val tlvWriter = TlvWriter() tlvWriter.startStructure(AnonymousTag) @@ -507,7 +511,7 @@ class TlsCertificateManagementCluster( } suspend fun removeClientCertificate(ccdid: UShort, timedInvokeTimeout: Duration? = null) { - val commandId: UInt = 15u + val commandId: UInt = 14u val tlvWriter = TlvWriter() tlvWriter.startStructure(AnonymousTag) @@ -610,7 +614,7 @@ class TlsCertificateManagementCluster( } } - suspend fun readCurrentRootCertificatesAttribute(): UByte { + suspend fun readProvisionedRootCertificatesAttribute(): ProvisionedRootCertificatesAttribute { val ATTRIBUTE_ID: UInt = 1u val attributePath = @@ -632,19 +636,26 @@ class TlsCertificateManagementCluster( it.path.attributeId == ATTRIBUTE_ID } - requireNotNull(attributeData) { "Currentrootcertificates attribute not found in response" } + requireNotNull(attributeData) { "Provisionedrootcertificates attribute not found in response" } // Decode the TLV data into the appropriate type val tlvReader = TlvReader(attributeData.data) - val decodedValue: UByte = tlvReader.getUByte(AnonymousTag) + val decodedValue: List = + buildList { + tlvReader.enterArray(AnonymousTag) + while (!tlvReader.isEndOfContainer()) { + add(TlsCertificateManagementClusterTLSCertStruct.fromTlv(AnonymousTag, tlvReader)) + } + tlvReader.exitContainer() + } - return decodedValue + return ProvisionedRootCertificatesAttribute(decodedValue) } - suspend fun subscribeCurrentRootCertificatesAttribute( + suspend fun subscribeProvisionedRootCertificatesAttribute( minInterval: Int, maxInterval: Int, - ): Flow { + ): Flow { val ATTRIBUTE_ID: UInt = 1u val attributePaths = listOf( @@ -663,7 +674,7 @@ class TlsCertificateManagementCluster( when (subscriptionState) { is SubscriptionState.SubscriptionErrorNotification -> { emit( - UByteSubscriptionState.Error( + ProvisionedRootCertificatesAttributeSubscriptionState.Error( Exception( "Subscription terminated with error code: ${subscriptionState.terminationCause}" ) @@ -677,17 +688,24 @@ class TlsCertificateManagementCluster( .firstOrNull { it.path.attributeId == ATTRIBUTE_ID } requireNotNull(attributeData) { - "Currentrootcertificates attribute not found in Node State update" + "Provisionedrootcertificates attribute not found in Node State update" } // Decode the TLV data into the appropriate type val tlvReader = TlvReader(attributeData.data) - val decodedValue: UByte = tlvReader.getUByte(AnonymousTag) + val decodedValue: List = + buildList { + tlvReader.enterArray(AnonymousTag) + while (!tlvReader.isEndOfContainer()) { + add(TlsCertificateManagementClusterTLSCertStruct.fromTlv(AnonymousTag, tlvReader)) + } + tlvReader.exitContainer() + } - emit(UByteSubscriptionState.Success(decodedValue)) + emit(ProvisionedRootCertificatesAttributeSubscriptionState.Success(decodedValue)) } SubscriptionState.SubscriptionEstablished -> { - emit(UByteSubscriptionState.SubscriptionEstablished) + emit(ProvisionedRootCertificatesAttributeSubscriptionState.SubscriptionEstablished) } } } @@ -776,7 +794,7 @@ class TlsCertificateManagementCluster( } } - suspend fun readCurrentClientCertificatesAttribute(): UByte { + suspend fun readProvisionedClientCertificatesAttribute(): ProvisionedClientCertificatesAttribute { val ATTRIBUTE_ID: UInt = 3u val attributePath = @@ -798,19 +816,33 @@ class TlsCertificateManagementCluster( it.path.attributeId == ATTRIBUTE_ID } - requireNotNull(attributeData) { "Currentclientcertificates attribute not found in response" } + requireNotNull(attributeData) { + "Provisionedclientcertificates attribute not found in response" + } // Decode the TLV data into the appropriate type val tlvReader = TlvReader(attributeData.data) - val decodedValue: UByte = tlvReader.getUByte(AnonymousTag) + val decodedValue: List = + buildList { + tlvReader.enterArray(AnonymousTag) + while (!tlvReader.isEndOfContainer()) { + add( + TlsCertificateManagementClusterTLSClientCertificateDetailStruct.fromTlv( + AnonymousTag, + tlvReader, + ) + ) + } + tlvReader.exitContainer() + } - return decodedValue + return ProvisionedClientCertificatesAttribute(decodedValue) } - suspend fun subscribeCurrentClientCertificatesAttribute( + suspend fun subscribeProvisionedClientCertificatesAttribute( minInterval: Int, maxInterval: Int, - ): Flow { + ): Flow { val ATTRIBUTE_ID: UInt = 3u val attributePaths = listOf( @@ -829,7 +861,7 @@ class TlsCertificateManagementCluster( when (subscriptionState) { is SubscriptionState.SubscriptionErrorNotification -> { emit( - UByteSubscriptionState.Error( + ProvisionedClientCertificatesAttributeSubscriptionState.Error( Exception( "Subscription terminated with error code: ${subscriptionState.terminationCause}" ) @@ -843,17 +875,29 @@ class TlsCertificateManagementCluster( .firstOrNull { it.path.attributeId == ATTRIBUTE_ID } requireNotNull(attributeData) { - "Currentclientcertificates attribute not found in Node State update" + "Provisionedclientcertificates attribute not found in Node State update" } // Decode the TLV data into the appropriate type val tlvReader = TlvReader(attributeData.data) - val decodedValue: UByte = tlvReader.getUByte(AnonymousTag) + val decodedValue: List = + buildList { + tlvReader.enterArray(AnonymousTag) + while (!tlvReader.isEndOfContainer()) { + add( + TlsCertificateManagementClusterTLSClientCertificateDetailStruct.fromTlv( + AnonymousTag, + tlvReader, + ) + ) + } + tlvReader.exitContainer() + } - emit(UByteSubscriptionState.Success(decodedValue)) + emit(ProvisionedClientCertificatesAttributeSubscriptionState.Success(decodedValue)) } SubscriptionState.SubscriptionEstablished -> { - emit(UByteSubscriptionState.SubscriptionEstablished) + emit(ProvisionedClientCertificatesAttributeSubscriptionState.SubscriptionEstablished) } } } diff --git a/src/controller/java/generated/java/matter/controller/cluster/structs/TlsCertificateManagementClusterTLSCertStruct.kt b/src/controller/java/generated/java/matter/controller/cluster/structs/TlsCertificateManagementClusterTLSCertStruct.kt index ff9d9f02cb12c4..b220751f656bb9 100644 --- a/src/controller/java/generated/java/matter/controller/cluster/structs/TlsCertificateManagementClusterTLSCertStruct.kt +++ b/src/controller/java/generated/java/matter/controller/cluster/structs/TlsCertificateManagementClusterTLSCertStruct.kt @@ -16,13 +16,17 @@ */ package matter.controller.cluster.structs +import java.util.Optional import matter.controller.cluster.* import matter.tlv.ContextSpecificTag import matter.tlv.Tag import matter.tlv.TlvReader import matter.tlv.TlvWriter -class TlsCertificateManagementClusterTLSCertStruct(val caid: UShort, val certificate: ByteArray) { +class TlsCertificateManagementClusterTLSCertStruct( + val caid: UShort, + val certificate: Optional, +) { override fun toString(): String = buildString { append("TlsCertificateManagementClusterTLSCertStruct {\n") append("\tcaid : $caid\n") @@ -34,7 +38,10 @@ class TlsCertificateManagementClusterTLSCertStruct(val caid: UShort, val certifi tlvWriter.apply { startStructure(tlvTag) put(ContextSpecificTag(TAG_CAID), caid) - put(ContextSpecificTag(TAG_CERTIFICATE), certificate) + if (certificate.isPresent) { + val optcertificate = certificate.get() + put(ContextSpecificTag(TAG_CERTIFICATE), optcertificate) + } endStructure() } } @@ -46,7 +53,12 @@ class TlsCertificateManagementClusterTLSCertStruct(val caid: UShort, val certifi fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): TlsCertificateManagementClusterTLSCertStruct { tlvReader.enterStructure(tlvTag) val caid = tlvReader.getUShort(ContextSpecificTag(TAG_CAID)) - val certificate = tlvReader.getByteArray(ContextSpecificTag(TAG_CERTIFICATE)) + val certificate = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_CERTIFICATE))) { + Optional.of(tlvReader.getByteArray(ContextSpecificTag(TAG_CERTIFICATE))) + } else { + Optional.empty() + } tlvReader.exitContainer() diff --git a/src/controller/java/generated/java/matter/controller/cluster/structs/TlsCertificateManagementClusterTLSClientCertificateDetailStruct.kt b/src/controller/java/generated/java/matter/controller/cluster/structs/TlsCertificateManagementClusterTLSClientCertificateDetailStruct.kt index 17382492b9260b..ee58cf5c8f1813 100644 --- a/src/controller/java/generated/java/matter/controller/cluster/structs/TlsCertificateManagementClusterTLSClientCertificateDetailStruct.kt +++ b/src/controller/java/generated/java/matter/controller/cluster/structs/TlsCertificateManagementClusterTLSClientCertificateDetailStruct.kt @@ -16,6 +16,7 @@ */ package matter.controller.cluster.structs +import java.util.Optional import matter.controller.cluster.* import matter.tlv.AnonymousTag import matter.tlv.ContextSpecificTag @@ -25,8 +26,8 @@ import matter.tlv.TlvWriter class TlsCertificateManagementClusterTLSClientCertificateDetailStruct( val ccdid: UShort, - val clientCertificate: ByteArray, - val intermediateCertificates: List, + val clientCertificate: Optional, + val intermediateCertificates: Optional>, ) { override fun toString(): String = buildString { append("TlsCertificateManagementClusterTLSClientCertificateDetailStruct {\n") @@ -40,12 +41,18 @@ class TlsCertificateManagementClusterTLSClientCertificateDetailStruct( tlvWriter.apply { startStructure(tlvTag) put(ContextSpecificTag(TAG_CCDID), ccdid) - put(ContextSpecificTag(TAG_CLIENT_CERTIFICATE), clientCertificate) - startArray(ContextSpecificTag(TAG_INTERMEDIATE_CERTIFICATES)) - for (item in intermediateCertificates.iterator()) { - put(AnonymousTag, item) + if (clientCertificate.isPresent) { + val optclientCertificate = clientCertificate.get() + put(ContextSpecificTag(TAG_CLIENT_CERTIFICATE), optclientCertificate) + } + if (intermediateCertificates.isPresent) { + val optintermediateCertificates = intermediateCertificates.get() + startArray(ContextSpecificTag(TAG_INTERMEDIATE_CERTIFICATES)) + for (item in optintermediateCertificates.iterator()) { + put(AnonymousTag, item) + } + endArray() } - endArray() endStructure() } } @@ -61,14 +68,25 @@ class TlsCertificateManagementClusterTLSClientCertificateDetailStruct( ): TlsCertificateManagementClusterTLSClientCertificateDetailStruct { tlvReader.enterStructure(tlvTag) val ccdid = tlvReader.getUShort(ContextSpecificTag(TAG_CCDID)) - val clientCertificate = tlvReader.getByteArray(ContextSpecificTag(TAG_CLIENT_CERTIFICATE)) + val clientCertificate = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_CLIENT_CERTIFICATE))) { + Optional.of(tlvReader.getByteArray(ContextSpecificTag(TAG_CLIENT_CERTIFICATE))) + } else { + Optional.empty() + } val intermediateCertificates = - buildList { - tlvReader.enterArray(ContextSpecificTag(TAG_INTERMEDIATE_CERTIFICATES)) - while (!tlvReader.isEndOfContainer()) { - add(tlvReader.getByteArray(AnonymousTag)) - } - tlvReader.exitContainer() + if (tlvReader.isNextTag(ContextSpecificTag(TAG_INTERMEDIATE_CERTIFICATES))) { + Optional.of( + buildList { + tlvReader.enterArray(ContextSpecificTag(TAG_INTERMEDIATE_CERTIFICATES)) + while (!tlvReader.isEndOfContainer()) { + add(tlvReader.getByteArray(AnonymousTag)) + } + tlvReader.exitContainer() + } + ) + } else { + Optional.empty() } tlvReader.exitContainer() diff --git a/src/controller/java/zap-generated/CHIPAttributeTLVValueDecoder.cpp b/src/controller/java/zap-generated/CHIPAttributeTLVValueDecoder.cpp index b67bf81575c603..8e04a580a8f8ca 100644 --- a/src/controller/java/zap-generated/CHIPAttributeTLVValueDecoder.cpp +++ b/src/controller/java/zap-generated/CHIPAttributeTLVValueDecoder.cpp @@ -43240,8 +43240,8 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR } return value; } - case Attributes::ActiveChimeID::Id: { - using TypeInfo = Attributes::ActiveChimeID::TypeInfo; + case Attributes::SelectedChime::Id: { + using TypeInfo = Attributes::SelectedChime::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) @@ -43957,8 +43957,8 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR value); return value; } - case Attributes::CurrentRootCertificates::Id: { - using TypeInfo = Attributes::CurrentRootCertificates::TypeInfo; + case Attributes::ProvisionedRootCertificates::Id: { + using TypeInfo = Attributes::ProvisionedRootCertificates::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) @@ -43966,11 +43966,64 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR return nullptr; } jobject value; - std::string valueClassName = "java/lang/Integer"; - std::string valueCtorSignature = "(I)V"; - jint jnivalue = static_cast(cppValue); - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, - value); + chip::JniReferences::GetInstance().CreateArrayList(value); + + auto iter_value_0 = cppValue.begin(); + while (iter_value_0.Next()) + { + auto & entry_0 = iter_value_0.GetValue(); + jobject newElement_0; + jobject newElement_0_caid; + std::string newElement_0_caidClassName = "java/lang/Integer"; + std::string newElement_0_caidCtorSignature = "(I)V"; + jint jninewElement_0_caid = static_cast(entry_0.caid); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_caidClassName.c_str(), + newElement_0_caidCtorSignature.c_str(), + jninewElement_0_caid, newElement_0_caid); + jobject newElement_0_certificate; + if (!entry_0.certificate.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_0_certificate); + } + else + { + jobject newElement_0_certificateInsideOptional; + jbyteArray newElement_0_certificateInsideOptionalByteArray = + env->NewByteArray(static_cast(entry_0.certificate.Value().size())); + env->SetByteArrayRegion(newElement_0_certificateInsideOptionalByteArray, 0, + static_cast(entry_0.certificate.Value().size()), + reinterpret_cast(entry_0.certificate.Value().data())); + newElement_0_certificateInsideOptional = newElement_0_certificateInsideOptionalByteArray; + chip::JniReferences::GetInstance().CreateOptional(newElement_0_certificateInsideOptional, + newElement_0_certificate); + } + + { + jclass TLSCertStructStructClass_1; + err = chip::JniReferences::GetInstance().GetLocalClassRef( + env, "chip/devicecontroller/ChipStructs$TlsCertificateManagementClusterTLSCertStruct", + TLSCertStructStructClass_1); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipStructs$TlsCertificateManagementClusterTLSCertStruct"); + return nullptr; + } + + jmethodID TLSCertStructStructCtor_1; + err = chip::JniReferences::GetInstance().FindMethod(env, TLSCertStructStructClass_1, "", + "(Ljava/lang/Integer;Ljava/util/Optional;)V", + &TLSCertStructStructCtor_1); + if (err != CHIP_NO_ERROR || TLSCertStructStructCtor_1 == nullptr) + { + ChipLogError(Zcl, "Could not find ChipStructs$TlsCertificateManagementClusterTLSCertStruct constructor"); + return nullptr; + } + + newElement_0 = env->NewObject(TLSCertStructStructClass_1, TLSCertStructStructCtor_1, newElement_0_caid, + newElement_0_certificate); + } + chip::JniReferences::GetInstance().AddToList(value, newElement_0); + } return value; } case Attributes::MaxClientCertificates::Id: { @@ -43989,8 +44042,8 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR value); return value; } - case Attributes::CurrentClientCertificates::Id: { - using TypeInfo = Attributes::CurrentClientCertificates::TypeInfo; + case Attributes::ProvisionedClientCertificates::Id: { + using TypeInfo = Attributes::ProvisionedClientCertificates::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) @@ -43998,11 +44051,96 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR return nullptr; } jobject value; - std::string valueClassName = "java/lang/Integer"; - std::string valueCtorSignature = "(I)V"; - jint jnivalue = static_cast(cppValue); - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, - value); + chip::JniReferences::GetInstance().CreateArrayList(value); + + auto iter_value_0 = cppValue.begin(); + while (iter_value_0.Next()) + { + auto & entry_0 = iter_value_0.GetValue(); + jobject newElement_0; + jobject newElement_0_ccdid; + std::string newElement_0_ccdidClassName = "java/lang/Integer"; + std::string newElement_0_ccdidCtorSignature = "(I)V"; + jint jninewElement_0_ccdid = static_cast(entry_0.ccdid); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_ccdidClassName.c_str(), + newElement_0_ccdidCtorSignature.c_str(), + jninewElement_0_ccdid, newElement_0_ccdid); + jobject newElement_0_clientCertificate; + if (!entry_0.clientCertificate.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_0_clientCertificate); + } + else + { + jobject newElement_0_clientCertificateInsideOptional; + jbyteArray newElement_0_clientCertificateInsideOptionalByteArray = + env->NewByteArray(static_cast(entry_0.clientCertificate.Value().size())); + env->SetByteArrayRegion(newElement_0_clientCertificateInsideOptionalByteArray, 0, + static_cast(entry_0.clientCertificate.Value().size()), + reinterpret_cast(entry_0.clientCertificate.Value().data())); + newElement_0_clientCertificateInsideOptional = newElement_0_clientCertificateInsideOptionalByteArray; + chip::JniReferences::GetInstance().CreateOptional(newElement_0_clientCertificateInsideOptional, + newElement_0_clientCertificate); + } + jobject newElement_0_intermediateCertificates; + if (!entry_0.intermediateCertificates.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_0_intermediateCertificates); + } + else + { + jobject newElement_0_intermediateCertificatesInsideOptional; + chip::JniReferences::GetInstance().CreateArrayList(newElement_0_intermediateCertificatesInsideOptional); + + auto iter_newElement_0_intermediateCertificatesInsideOptional_3 = + entry_0.intermediateCertificates.Value().begin(); + while (iter_newElement_0_intermediateCertificatesInsideOptional_3.Next()) + { + auto & entry_3 = iter_newElement_0_intermediateCertificatesInsideOptional_3.GetValue(); + jobject newElement_3; + jbyteArray newElement_3ByteArray = env->NewByteArray(static_cast(entry_3.size())); + env->SetByteArrayRegion(newElement_3ByteArray, 0, static_cast(entry_3.size()), + reinterpret_cast(entry_3.data())); + newElement_3 = newElement_3ByteArray; + chip::JniReferences::GetInstance().AddToList(newElement_0_intermediateCertificatesInsideOptional, + newElement_3); + } + chip::JniReferences::GetInstance().CreateOptional(newElement_0_intermediateCertificatesInsideOptional, + newElement_0_intermediateCertificates); + } + + { + jclass TLSClientCertificateDetailStructStructClass_1; + err = chip::JniReferences::GetInstance().GetLocalClassRef( + env, "chip/devicecontroller/ChipStructs$TlsCertificateManagementClusterTLSClientCertificateDetailStruct", + TLSClientCertificateDetailStructStructClass_1); + if (err != CHIP_NO_ERROR) + { + ChipLogError( + Zcl, + "Could not find class ChipStructs$TlsCertificateManagementClusterTLSClientCertificateDetailStruct"); + return nullptr; + } + + jmethodID TLSClientCertificateDetailStructStructCtor_1; + err = chip::JniReferences::GetInstance().FindMethod( + env, TLSClientCertificateDetailStructStructClass_1, "", + "(Ljava/lang/Integer;Ljava/util/Optional;Ljava/util/Optional;)V", + &TLSClientCertificateDetailStructStructCtor_1); + if (err != CHIP_NO_ERROR || TLSClientCertificateDetailStructStructCtor_1 == nullptr) + { + ChipLogError(Zcl, + "Could not find ChipStructs$TlsCertificateManagementClusterTLSClientCertificateDetailStruct " + "constructor"); + return nullptr; + } + + newElement_0 = + env->NewObject(TLSClientCertificateDetailStructStructClass_1, TLSClientCertificateDetailStructStructCtor_1, + newElement_0_ccdid, newElement_0_clientCertificate, newElement_0_intermediateCertificates); + } + chip::JniReferences::GetInstance().AddToList(value, newElement_0); + } return value; } case Attributes::GeneratedCommandList::Id: { diff --git a/src/controller/python/chip/clusters/CHIPClusters.py b/src/controller/python/chip/clusters/CHIPClusters.py index a2ee54404afd67..214af92f9ea548 100644 --- a/src/controller/python/chip/clusters/CHIPClusters.py +++ b/src/controller/python/chip/clusters/CHIPClusters.py @@ -13379,7 +13379,7 @@ class ChipClusters: "reportable": True, }, 0x00000001: { - "attributeName": "ActiveChimeID", + "attributeName": "SelectedChime", "attributeId": 0x00000001, "type": "int", "reportable": True, @@ -13584,22 +13584,22 @@ class ChipClusters: "clientCertificateDetails": "TLSClientCertificateDetailStruct", }, }, - 0x0000000B: { - "commandId": 0x0000000B, + 0x0000000A: { + "commandId": 0x0000000A, "commandName": "FindClientCertificate", "args": { "ccdid": "int", }, }, - 0x0000000D: { - "commandId": 0x0000000D, + 0x0000000C: { + "commandId": 0x0000000C, "commandName": "LookupClientCertificate", "args": { "fingerprint": "bytes", }, }, - 0x0000000F: { - "commandId": 0x0000000F, + 0x0000000E: { + "commandId": 0x0000000E, "commandName": "RemoveClientCertificate", "args": { "ccdid": "int", @@ -13614,9 +13614,9 @@ class ChipClusters: "reportable": True, }, 0x00000001: { - "attributeName": "CurrentRootCertificates", + "attributeName": "ProvisionedRootCertificates", "attributeId": 0x00000001, - "type": "int", + "type": "", "reportable": True, }, 0x00000002: { @@ -13626,9 +13626,9 @@ class ChipClusters: "reportable": True, }, 0x00000003: { - "attributeName": "CurrentClientCertificates", + "attributeName": "ProvisionedClientCertificates", "attributeId": 0x00000003, - "type": "int", + "type": "", "reportable": True, }, 0x0000FFF8: { diff --git a/src/controller/python/chip/clusters/Objects.py b/src/controller/python/chip/clusters/Objects.py index 38fdf15e4a128d..7ec98b19a06d89 100644 --- a/src/controller/python/chip/clusters/Objects.py +++ b/src/controller/python/chip/clusters/Objects.py @@ -417,10 +417,10 @@ class TestGlobalEnum(MatterIntEnum): kUnknownEnumValue = 3 class ThreeLevelAutoEnum(MatterIntEnum): - kLow = 0x00 - kMedium = 0x01 - kHigh = 0x02 - kAutomatic = 0x03 + kAuto = 0x00 + kLow = 0x01 + kMedium = 0x02 + kHigh = 0x03 # 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 an unknown @@ -48391,7 +48391,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields=[ ClusterObjectFieldDescriptor(Label="installedChimeSounds", Tag=0x00000000, Type=typing.List[Chime.Structs.ChimeSoundStruct]), - ClusterObjectFieldDescriptor(Label="activeChimeID", Tag=0x00000001, Type=uint), + ClusterObjectFieldDescriptor(Label="selectedChime", Tag=0x00000001, Type=uint), ClusterObjectFieldDescriptor(Label="enabled", Tag=0x00000002, Type=bool), ClusterObjectFieldDescriptor(Label="generatedCommandList", Tag=0x0000FFF8, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="acceptedCommandList", Tag=0x0000FFF9, Type=typing.List[uint]), @@ -48401,7 +48401,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: ]) installedChimeSounds: typing.List[Chime.Structs.ChimeSoundStruct] = field(default_factory=lambda: []) - activeChimeID: uint = 0 + selectedChime: uint = 0 enabled: bool = False generatedCommandList: typing.List[uint] = field(default_factory=lambda: []) acceptedCommandList: typing.List[uint] = field(default_factory=lambda: []) @@ -48455,7 +48455,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: value: typing.List[Chime.Structs.ChimeSoundStruct] = field(default_factory=lambda: []) @dataclass - class ActiveChimeID(ClusterAttributeDescriptor): + class SelectedChime(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: return 0x00000556 @@ -48987,9 +48987,9 @@ def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields=[ ClusterObjectFieldDescriptor(Label="maxRootCertificates", Tag=0x00000000, Type=uint), - ClusterObjectFieldDescriptor(Label="currentRootCertificates", Tag=0x00000001, Type=uint), + ClusterObjectFieldDescriptor(Label="provisionedRootCertificates", Tag=0x00000001, Type=typing.List[TlsCertificateManagement.Structs.TLSCertStruct]), ClusterObjectFieldDescriptor(Label="maxClientCertificates", Tag=0x00000002, Type=uint), - ClusterObjectFieldDescriptor(Label="currentClientCertificates", Tag=0x00000003, Type=uint), + ClusterObjectFieldDescriptor(Label="provisionedClientCertificates", Tag=0x00000003, Type=typing.List[TlsCertificateManagement.Structs.TLSClientCertificateDetailStruct]), ClusterObjectFieldDescriptor(Label="generatedCommandList", Tag=0x0000FFF8, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="acceptedCommandList", Tag=0x0000FFF9, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="attributeList", Tag=0x0000FFFB, Type=typing.List[uint]), @@ -48998,9 +48998,9 @@ def descriptor(cls) -> ClusterObjectDescriptor: ]) maxRootCertificates: uint = 0 - currentRootCertificates: uint = 0 + provisionedRootCertificates: typing.List[TlsCertificateManagement.Structs.TLSCertStruct] = field(default_factory=lambda: []) maxClientCertificates: uint = 0 - currentClientCertificates: uint = 0 + provisionedClientCertificates: typing.List[TlsCertificateManagement.Structs.TLSClientCertificateDetailStruct] = field(default_factory=lambda: []) generatedCommandList: typing.List[uint] = field(default_factory=lambda: []) acceptedCommandList: typing.List[uint] = field(default_factory=lambda: []) attributeList: typing.List[uint] = field(default_factory=lambda: []) @@ -49015,11 +49015,11 @@ def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields=[ ClusterObjectFieldDescriptor(Label="caid", Tag=0, Type=uint), - ClusterObjectFieldDescriptor(Label="certificate", Tag=1, Type=bytes), + ClusterObjectFieldDescriptor(Label="certificate", Tag=1, Type=typing.Optional[bytes]), ]) caid: 'uint' = 0 - certificate: 'bytes' = b"" + certificate: 'typing.Optional[bytes]' = None @dataclass class TLSClientCertificateDetailStruct(ClusterObject): @@ -49028,13 +49028,13 @@ def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields=[ ClusterObjectFieldDescriptor(Label="ccdid", Tag=0, Type=uint), - ClusterObjectFieldDescriptor(Label="clientCertificate", Tag=1, Type=bytes), - ClusterObjectFieldDescriptor(Label="intermediateCertificates", Tag=2, Type=typing.List[bytes]), + ClusterObjectFieldDescriptor(Label="clientCertificate", Tag=1, Type=typing.Optional[bytes]), + ClusterObjectFieldDescriptor(Label="intermediateCertificates", Tag=2, Type=typing.Optional[typing.List[bytes]]), ]) ccdid: 'uint' = 0 - clientCertificate: 'bytes' = b"" - intermediateCertificates: 'typing.List[bytes]' = field(default_factory=lambda: []) + clientCertificate: 'typing.Optional[bytes]' = None + intermediateCertificates: 'typing.Optional[typing.List[bytes]]' = None class Commands: @dataclass @@ -49192,7 +49192,7 @@ class ProvisionClientCertificate(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x00000801 command_id: typing.ClassVar[int] = 0x00000009 is_client: typing.ClassVar[bool] = True - response_type: typing.ClassVar[str] = 'ProvisionClientCertificateResponse' + response_type: typing.ClassVar[typing.Optional[str]] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -49205,26 +49205,10 @@ def descriptor(cls) -> ClusterObjectDescriptor: ccdid: uint = 0 clientCertificateDetails: TlsCertificateManagement.Structs.TLSClientCertificateDetailStruct = field(default_factory=lambda: TlsCertificateManagement.Structs.TLSClientCertificateDetailStruct()) - @dataclass - class ProvisionClientCertificateResponse(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x00000801 - command_id: typing.ClassVar[int] = 0x0000000A - is_client: typing.ClassVar[bool] = False - response_type: typing.ClassVar[typing.Optional[str]] = None - - @ChipUtility.classproperty - def descriptor(cls) -> ClusterObjectDescriptor: - return ClusterObjectDescriptor( - Fields=[ - ClusterObjectFieldDescriptor(Label="ccdid", Tag=0, Type=uint), - ]) - - ccdid: uint = 0 - @dataclass class FindClientCertificate(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x00000801 - command_id: typing.ClassVar[int] = 0x0000000B + command_id: typing.ClassVar[int] = 0x0000000A is_client: typing.ClassVar[bool] = True response_type: typing.ClassVar[str] = 'FindClientCertificateResponse' @@ -49232,15 +49216,15 @@ class FindClientCertificate(ClusterCommand): def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields=[ - ClusterObjectFieldDescriptor(Label="ccdid", Tag=0, Type=uint), + ClusterObjectFieldDescriptor(Label="ccdid", Tag=0, Type=typing.Union[Nullable, uint]), ]) - ccdid: uint = 0 + ccdid: typing.Union[Nullable, uint] = NullValue @dataclass class FindClientCertificateResponse(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x00000801 - command_id: typing.ClassVar[int] = 0x0000000C + command_id: typing.ClassVar[int] = 0x0000000B is_client: typing.ClassVar[bool] = False response_type: typing.ClassVar[typing.Optional[str]] = None @@ -49256,7 +49240,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: @dataclass class LookupClientCertificate(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x00000801 - command_id: typing.ClassVar[int] = 0x0000000D + command_id: typing.ClassVar[int] = 0x0000000C is_client: typing.ClassVar[bool] = True response_type: typing.ClassVar[str] = 'LookupClientCertificateResponse' @@ -49272,7 +49256,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: @dataclass class LookupClientCertificateResponse(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x00000801 - command_id: typing.ClassVar[int] = 0x0000000E + command_id: typing.ClassVar[int] = 0x0000000D is_client: typing.ClassVar[bool] = False response_type: typing.ClassVar[typing.Optional[str]] = None @@ -49288,7 +49272,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: @dataclass class RemoveClientCertificate(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x00000801 - command_id: typing.ClassVar[int] = 0x0000000F + command_id: typing.ClassVar[int] = 0x0000000E is_client: typing.ClassVar[bool] = True response_type: typing.ClassVar[typing.Optional[str]] = None @@ -49319,7 +49303,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: value: uint = 0 @dataclass - class CurrentRootCertificates(ClusterAttributeDescriptor): + class ProvisionedRootCertificates(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: return 0x00000801 @@ -49330,9 +49314,9 @@ def attribute_id(cls) -> int: @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=uint) + return ClusterObjectFieldDescriptor(Type=typing.List[TlsCertificateManagement.Structs.TLSCertStruct]) - value: uint = 0 + value: typing.List[TlsCertificateManagement.Structs.TLSCertStruct] = field(default_factory=lambda: []) @dataclass class MaxClientCertificates(ClusterAttributeDescriptor): @@ -49351,7 +49335,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: value: uint = 0 @dataclass - class CurrentClientCertificates(ClusterAttributeDescriptor): + class ProvisionedClientCertificates(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: return 0x00000801 @@ -49362,9 +49346,9 @@ def attribute_id(cls) -> int: @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=uint) + return ClusterObjectFieldDescriptor(Type=typing.List[TlsCertificateManagement.Structs.TLSClientCertificateDetailStruct]) - value: uint = 0 + value: typing.List[TlsCertificateManagement.Structs.TLSClientCertificateDetailStruct] = field(default_factory=lambda: []) @dataclass class GeneratedCommandList(ClusterAttributeDescriptor): diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRAttributeSpecifiedCheck.mm b/src/darwin/Framework/CHIP/zap-generated/MTRAttributeSpecifiedCheck.mm index 85cdd0e98c31cd..d0c8dd1d7609f6 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRAttributeSpecifiedCheck.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRAttributeSpecifiedCheck.mm @@ -5913,7 +5913,7 @@ static BOOL AttributeIsSpecifiedInChimeCluster(AttributeId aAttributeId) case Attributes::InstalledChimeSounds::Id: { return YES; } - case Attributes::ActiveChimeID::Id: { + case Attributes::SelectedChime::Id: { return YES; } case Attributes::Enabled::Id: { @@ -6003,13 +6003,13 @@ static BOOL AttributeIsSpecifiedInTLSCertificateManagementCluster(AttributeId aA case Attributes::MaxRootCertificates::Id: { return YES; } - case Attributes::CurrentRootCertificates::Id: { + case Attributes::ProvisionedRootCertificates::Id: { return YES; } case Attributes::MaxClientCertificates::Id: { return YES; } - case Attributes::CurrentClientCertificates::Id: { + case Attributes::ProvisionedClientCertificates::Id: { return YES; } case Attributes::GeneratedCommandList::Id: { diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRAttributeTLVValueDecoder.mm b/src/darwin/Framework/CHIP/zap-generated/MTRAttributeTLVValueDecoder.mm index 89ca6abceccf53..03eb7e5d094c75 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRAttributeTLVValueDecoder.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRAttributeTLVValueDecoder.mm @@ -18103,8 +18103,8 @@ static id _Nullable DecodeAttributeValueForChimeCluster(AttributeId aAttributeId } return value; } - case Attributes::ActiveChimeID::Id: { - using TypeInfo = Attributes::ActiveChimeID::TypeInfo; + case Attributes::SelectedChime::Id: { + using TypeInfo = Attributes::SelectedChime::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { @@ -18318,15 +18318,36 @@ static id _Nullable DecodeAttributeValueForTLSCertificateManagementCluster(Attri value = [NSNumber numberWithUnsignedChar:cppValue]; return value; } - case Attributes::CurrentRootCertificates::Id: { - using TypeInfo = Attributes::CurrentRootCertificates::TypeInfo; + case Attributes::ProvisionedRootCertificates::Id: { + using TypeInfo = Attributes::ProvisionedRootCertificates::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:cppValue]; + NSArray * _Nonnull value; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = cppValue.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + MTRTLSCertificateManagementClusterTLSCertStruct * newElement_0; + newElement_0 = [MTRTLSCertificateManagementClusterTLSCertStruct new]; + newElement_0.caid = [NSNumber numberWithUnsignedShort:entry_0.caid]; + if (entry_0.certificate.HasValue()) { + newElement_0.certificate = AsData(entry_0.certificate.Value()); + } else { + newElement_0.certificate = nil; + } + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + *aError = err; + return nil; + } + value = array_0; + } return value; } case Attributes::MaxClientCertificates::Id: { @@ -18340,15 +18361,56 @@ static id _Nullable DecodeAttributeValueForTLSCertificateManagementCluster(Attri value = [NSNumber numberWithUnsignedChar:cppValue]; return value; } - case Attributes::CurrentClientCertificates::Id: { - using TypeInfo = Attributes::CurrentClientCertificates::TypeInfo; + case Attributes::ProvisionedClientCertificates::Id: { + using TypeInfo = Attributes::ProvisionedClientCertificates::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:cppValue]; + NSArray * _Nonnull value; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = cppValue.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + MTRTLSCertificateManagementClusterTLSClientCertificateDetailStruct * newElement_0; + newElement_0 = [MTRTLSCertificateManagementClusterTLSClientCertificateDetailStruct new]; + newElement_0.ccdid = [NSNumber numberWithUnsignedShort:entry_0.ccdid]; + if (entry_0.clientCertificate.HasValue()) { + newElement_0.clientCertificate = AsData(entry_0.clientCertificate.Value()); + } else { + newElement_0.clientCertificate = nil; + } + if (entry_0.intermediateCertificates.HasValue()) { + { // Scope for our temporary variables + auto * array_3 = [NSMutableArray new]; + auto iter_3 = entry_0.intermediateCertificates.Value().begin(); + while (iter_3.Next()) { + auto & entry_3 = iter_3.GetValue(); + NSData * newElement_3; + newElement_3 = AsData(entry_3); + [array_3 addObject:newElement_3]; + } + CHIP_ERROR err = iter_3.GetStatus(); + if (err != CHIP_NO_ERROR) { + *aError = err; + return nil; + } + newElement_0.intermediateCertificates = array_3; + } + } else { + newElement_0.intermediateCertificates = nil; + } + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + *aError = err; + return nil; + } + value = array_0; + } return value; } default: { diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h index 011b18948a9571..c63a0e7f63e2c9 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h @@ -15094,13 +15094,13 @@ MTR_PROVISIONALLY_AVAILABLE reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; + (void)readAttributeInstalledChimeSoundsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; -- (void)readAttributeActiveChimeIDWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; -- (void)writeAttributeActiveChimeIDWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; -- (void)writeAttributeActiveChimeIDWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; -- (void)subscribeAttributeActiveChimeIDWithParams:(MTRSubscribeParams *)params +- (void)readAttributeSelectedChimeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)writeAttributeSelectedChimeWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; +- (void)writeAttributeSelectedChimeWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeSelectedChimeWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; -+ (void)readAttributeActiveChimeIDWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeSelectedChimeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; - (void)readAttributeEnabledWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; - (void)writeAttributeEnabledWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; @@ -15310,13 +15310,13 @@ MTR_PROVISIONALLY_AVAILABLE /** * Command ProvisionRootCertificate * - * This command SHALL provision the provided certificate for the passed in CAID. + * This command SHALL provision a newly provided certificate, or rotate an existing one, based on the contents of the CAID field. */ - (void)provisionRootCertificateWithParams:(MTRTLSCertificateManagementClusterProvisionRootCertificateParams *)params completion:(void (^)(MTRTLSCertificateManagementClusterProvisionRootCertificateResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; /** * Command FindRootCertificate * - * This command SHALL return the TLSCertStruct for the passed in CAID. + * This command SHALL return the specified TLS root certificate, or all TLS provisioned root certificates, based on the contents of the CAID field. */ - (void)findRootCertificateWithParams:(MTRTLSCertificateManagementClusterFindRootCertificateParams *)params completion:(void (^)(MTRTLSCertificateManagementClusterFindRootCertificateResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; /** @@ -15340,13 +15340,13 @@ MTR_PROVISIONALLY_AVAILABLE /** * Command ProvisionClientCertificate * - * This command SHALL be generated to request the Node provisions the provided Client Certificate Details. + * This command SHALL be generated to request the Node provisions newly provided Client Certificate Details, or rotate an existing client certificate. */ -- (void)provisionClientCertificateWithParams:(MTRTLSCertificateManagementClusterProvisionClientCertificateParams *)params completion:(void (^)(MTRTLSCertificateManagementClusterProvisionClientCertificateResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)provisionClientCertificateWithParams:(MTRTLSCertificateManagementClusterProvisionClientCertificateParams *)params completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; /** * Command FindClientCertificate * - * This command SHALL return the TLSClientCertificateDetailStruct for the passed in CCDID. + * This command SHALL return the TLSClientCertificateDetailStruct for the passed in CCDID, or all TLS client certificates, based on the contents of the CCDID field. */ - (void)findClientCertificateWithParams:(MTRTLSCertificateManagementClusterFindClientCertificateParams *)params completion:(void (^)(MTRTLSCertificateManagementClusterFindClientCertificateResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; /** @@ -15358,7 +15358,7 @@ MTR_PROVISIONALLY_AVAILABLE /** * Command RemoveClientCertificate * - * This command SHALL be generated to request the Node removes the certificate provisioned to the provided Client Certificate Details ID. + * This command SHALL be used to request the Node removes all stored information for the provided CCDID. */ - (void)removeClientCertificateWithParams:(MTRTLSCertificateManagementClusterRemoveClientCertificateParams *)params completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; @@ -15368,11 +15368,11 @@ MTR_PROVISIONALLY_AVAILABLE reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; + (void)readAttributeMaxRootCertificatesWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; -- (void)readAttributeCurrentRootCertificatesWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; -- (void)subscribeAttributeCurrentRootCertificatesWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; -+ (void)readAttributeCurrentRootCertificatesWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)readAttributeProvisionedRootCertificatesWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeProvisionedRootCertificatesWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeProvisionedRootCertificatesWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; - (void)readAttributeMaxClientCertificatesWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; - (void)subscribeAttributeMaxClientCertificatesWithParams:(MTRSubscribeParams *)params @@ -15380,11 +15380,11 @@ MTR_PROVISIONALLY_AVAILABLE reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; + (void)readAttributeMaxClientCertificatesWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; -- (void)readAttributeCurrentClientCertificatesWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; -- (void)subscribeAttributeCurrentClientCertificatesWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; -+ (void)readAttributeCurrentClientCertificatesWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)readAttributeProvisionedClientCertificatesWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeProvisionedClientCertificatesWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeProvisionedClientCertificatesWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams *)params @@ -16802,10 +16802,10 @@ typedef NS_ENUM(uint8_t, MTRDataTypeTestGlobalEnum) { } MTR_PROVISIONALLY_AVAILABLE; typedef NS_ENUM(uint8_t, MTRDataTypeThreeLevelAutoEnum) { - MTRDataTypeThreeLevelAutoEnumLow MTR_PROVISIONALLY_AVAILABLE = 0x00, - MTRDataTypeThreeLevelAutoEnumMedium MTR_PROVISIONALLY_AVAILABLE = 0x01, - MTRDataTypeThreeLevelAutoEnumHigh MTR_PROVISIONALLY_AVAILABLE = 0x02, - MTRDataTypeThreeLevelAutoEnumAutomatic MTR_PROVISIONALLY_AVAILABLE = 0x03, + MTRDataTypeThreeLevelAutoEnumAuto MTR_PROVISIONALLY_AVAILABLE = 0x00, + MTRDataTypeThreeLevelAutoEnumLow MTR_PROVISIONALLY_AVAILABLE = 0x01, + MTRDataTypeThreeLevelAutoEnumMedium MTR_PROVISIONALLY_AVAILABLE = 0x02, + MTRDataTypeThreeLevelAutoEnumHigh MTR_PROVISIONALLY_AVAILABLE = 0x03, } MTR_PROVISIONALLY_AVAILABLE; typedef NS_ENUM(uint8_t, MTRIdentifyEffectIdentifier) { diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm index 7592de9c996673..870f40768e0c16 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm @@ -102517,9 +102517,9 @@ + (void)readAttributeInstalledChimeSoundsWithClusterStateCache:(MTRClusterStateC completion:completion]; } -- (void)readAttributeActiveChimeIDWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeSelectedChimeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = Chime::Attributes::ActiveChimeID::TypeInfo; + using TypeInfo = Chime::Attributes::SelectedChime::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -102528,11 +102528,11 @@ - (void)readAttributeActiveChimeIDWithCompletion:(void (^)(NSNumber * _Nullable completion:completion]; } -- (void)writeAttributeActiveChimeIDWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +- (void)writeAttributeSelectedChimeWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion { - [self writeAttributeActiveChimeIDWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; + [self writeAttributeSelectedChimeWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; } -- (void)writeAttributeActiveChimeIDWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion +- (void)writeAttributeSelectedChimeWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. params = [params copy]; @@ -102547,7 +102547,7 @@ - (void)writeAttributeActiveChimeIDWithValue:(NSNumber * _Nonnull)value params:( } ListFreer listFreer; - using TypeInfo = Chime::Attributes::ActiveChimeID::TypeInfo; + using TypeInfo = Chime::Attributes::SelectedChime::TypeInfo; TypeInfo::Type cppValue; cppValue = value.unsignedCharValue; @@ -102556,11 +102556,11 @@ - (void)writeAttributeActiveChimeIDWithValue:(NSNumber * _Nonnull)value params:( std::move(*bridge).DispatchAction(self.device); } -- (void)subscribeAttributeActiveChimeIDWithParams:(MTRSubscribeParams * _Nonnull)params +- (void)subscribeAttributeSelectedChimeWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = Chime::Attributes::ActiveChimeID::TypeInfo; + using TypeInfo = Chime::Attributes::SelectedChime::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -102570,9 +102570,9 @@ - (void)subscribeAttributeActiveChimeIDWithParams:(MTRSubscribeParams * _Nonnull subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeActiveChimeIDWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeSelectedChimeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = Chime::Attributes::ActiveChimeID::TypeInfo; + using TypeInfo = Chime::Attributes::SelectedChime::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -103474,7 +103474,7 @@ - (void)TLSClientCSRWithParams:(MTRTLSCertificateManagementClusterTLSClientCSRPa queue:self.callbackQueue completion:responseHandler]; } -- (void)provisionClientCertificateWithParams:(MTRTLSCertificateManagementClusterProvisionClientCertificateParams *)params completion:(void (^)(MTRTLSCertificateManagementClusterProvisionClientCertificateResponseParams * _Nullable data, NSError * _Nullable error))completion +- (void)provisionClientCertificateWithParams:(MTRTLSCertificateManagementClusterProvisionClientCertificateParams *)params completion:(MTRStatusCompletion)completion { if (params == nil) { params = [[MTRTLSCertificateManagementClusterProvisionClientCertificateParams @@ -103482,7 +103482,7 @@ - (void)provisionClientCertificateWithParams:(MTRTLSCertificateManagementCluster } auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(response, error); + completion(error); }; auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; @@ -103494,7 +103494,7 @@ - (void)provisionClientCertificateWithParams:(MTRTLSCertificateManagementCluster commandPayload:params timedInvokeTimeout:timedInvokeTimeoutMs serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:MTRTLSCertificateManagementClusterProvisionClientCertificateResponseParams.class + responseClass:nil queue:self.callbackQueue completion:responseHandler]; } @@ -103607,9 +103607,9 @@ + (void)readAttributeMaxRootCertificatesWithClusterStateCache:(MTRClusterStateCa completion:completion]; } -- (void)readAttributeCurrentRootCertificatesWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeProvisionedRootCertificatesWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = TlsCertificateManagement::Attributes::CurrentRootCertificates::TypeInfo; + using TypeInfo = TlsCertificateManagement::Attributes::ProvisionedRootCertificates::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -103618,11 +103618,11 @@ - (void)readAttributeCurrentRootCertificatesWithCompletion:(void (^)(NSNumber * completion:completion]; } -- (void)subscribeAttributeCurrentRootCertificatesWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeProvisionedRootCertificatesWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = TlsCertificateManagement::Attributes::CurrentRootCertificates::TypeInfo; + using TypeInfo = TlsCertificateManagement::Attributes::ProvisionedRootCertificates::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -103632,9 +103632,9 @@ - (void)subscribeAttributeCurrentRootCertificatesWithParams:(MTRSubscribeParams subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeCurrentRootCertificatesWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeProvisionedRootCertificatesWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = TlsCertificateManagement::Attributes::CurrentRootCertificates::TypeInfo; + using TypeInfo = TlsCertificateManagement::Attributes::ProvisionedRootCertificates::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -103679,9 +103679,9 @@ + (void)readAttributeMaxClientCertificatesWithClusterStateCache:(MTRClusterState completion:completion]; } -- (void)readAttributeCurrentClientCertificatesWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeProvisionedClientCertificatesWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = TlsCertificateManagement::Attributes::CurrentClientCertificates::TypeInfo; + using TypeInfo = TlsCertificateManagement::Attributes::ProvisionedClientCertificates::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -103690,11 +103690,11 @@ - (void)readAttributeCurrentClientCertificatesWithCompletion:(void (^)(NSNumber completion:completion]; } -- (void)subscribeAttributeCurrentClientCertificatesWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeProvisionedClientCertificatesWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = TlsCertificateManagement::Attributes::CurrentClientCertificates::TypeInfo; + using TypeInfo = TlsCertificateManagement::Attributes::ProvisionedClientCertificates::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -103704,9 +103704,9 @@ - (void)subscribeAttributeCurrentClientCertificatesWithParams:(MTRSubscribeParam subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeCurrentClientCertificatesWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeProvisionedClientCertificatesWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = TlsCertificateManagement::Attributes::CurrentClientCertificates::TypeInfo; + using TypeInfo = TlsCertificateManagement::Attributes::ProvisionedClientCertificates::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRClusterConstants.h b/src/darwin/Framework/CHIP/zap-generated/MTRClusterConstants.h index d0f618d9b95286..f493dcdf03fba7 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRClusterConstants.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRClusterConstants.h @@ -4740,7 +4740,7 @@ typedef NS_ENUM(uint32_t, MTRAttributeIDType) { // Cluster Chime attributes MTRAttributeIDTypeClusterChimeAttributeInstalledChimeSoundsID MTR_PROVISIONALLY_AVAILABLE = 0x00000000, - MTRAttributeIDTypeClusterChimeAttributeActiveChimeIDID MTR_PROVISIONALLY_AVAILABLE = 0x00000001, + MTRAttributeIDTypeClusterChimeAttributeSelectedChimeID MTR_PROVISIONALLY_AVAILABLE = 0x00000001, MTRAttributeIDTypeClusterChimeAttributeEnabledID MTR_PROVISIONALLY_AVAILABLE = 0x00000002, MTRAttributeIDTypeClusterChimeAttributeGeneratedCommandListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, MTRAttributeIDTypeClusterChimeAttributeAcceptedCommandListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, @@ -4767,9 +4767,9 @@ typedef NS_ENUM(uint32_t, MTRAttributeIDType) { // Cluster TLSCertificateManagement attributes MTRAttributeIDTypeClusterTLSCertificateManagementAttributeMaxRootCertificatesID MTR_PROVISIONALLY_AVAILABLE = 0x00000000, - MTRAttributeIDTypeClusterTLSCertificateManagementAttributeCurrentRootCertificatesID MTR_PROVISIONALLY_AVAILABLE = 0x00000001, + MTRAttributeIDTypeClusterTLSCertificateManagementAttributeProvisionedRootCertificatesID MTR_PROVISIONALLY_AVAILABLE = 0x00000001, MTRAttributeIDTypeClusterTLSCertificateManagementAttributeMaxClientCertificatesID MTR_PROVISIONALLY_AVAILABLE = 0x00000002, - MTRAttributeIDTypeClusterTLSCertificateManagementAttributeCurrentClientCertificatesID MTR_PROVISIONALLY_AVAILABLE = 0x00000003, + MTRAttributeIDTypeClusterTLSCertificateManagementAttributeProvisionedClientCertificatesID MTR_PROVISIONALLY_AVAILABLE = 0x00000003, MTRAttributeIDTypeClusterTLSCertificateManagementAttributeGeneratedCommandListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, MTRAttributeIDTypeClusterTLSCertificateManagementAttributeAcceptedCommandListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, MTRAttributeIDTypeClusterTLSCertificateManagementAttributeAttributeListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeAttributeListID, @@ -7042,12 +7042,11 @@ typedef NS_ENUM(uint32_t, MTRCommandIDType) { MTRCommandIDTypeClusterTLSCertificateManagementCommandTLSClientCSRID MTR_PROVISIONALLY_AVAILABLE = 0x00000007, MTRCommandIDTypeClusterTLSCertificateManagementCommandTLSClientCSRResponseID MTR_PROVISIONALLY_AVAILABLE = 0x00000008, MTRCommandIDTypeClusterTLSCertificateManagementCommandProvisionClientCertificateID MTR_PROVISIONALLY_AVAILABLE = 0x00000009, - MTRCommandIDTypeClusterTLSCertificateManagementCommandProvisionClientCertificateResponseID MTR_PROVISIONALLY_AVAILABLE = 0x0000000A, - MTRCommandIDTypeClusterTLSCertificateManagementCommandFindClientCertificateID MTR_PROVISIONALLY_AVAILABLE = 0x0000000B, - MTRCommandIDTypeClusterTLSCertificateManagementCommandFindClientCertificateResponseID MTR_PROVISIONALLY_AVAILABLE = 0x0000000C, - MTRCommandIDTypeClusterTLSCertificateManagementCommandLookupClientCertificateID MTR_PROVISIONALLY_AVAILABLE = 0x0000000D, - MTRCommandIDTypeClusterTLSCertificateManagementCommandLookupClientCertificateResponseID MTR_PROVISIONALLY_AVAILABLE = 0x0000000E, - MTRCommandIDTypeClusterTLSCertificateManagementCommandRemoveClientCertificateID MTR_PROVISIONALLY_AVAILABLE = 0x0000000F, + MTRCommandIDTypeClusterTLSCertificateManagementCommandFindClientCertificateID MTR_PROVISIONALLY_AVAILABLE = 0x0000000A, + MTRCommandIDTypeClusterTLSCertificateManagementCommandFindClientCertificateResponseID MTR_PROVISIONALLY_AVAILABLE = 0x0000000B, + MTRCommandIDTypeClusterTLSCertificateManagementCommandLookupClientCertificateID MTR_PROVISIONALLY_AVAILABLE = 0x0000000C, + MTRCommandIDTypeClusterTLSCertificateManagementCommandLookupClientCertificateResponseID MTR_PROVISIONALLY_AVAILABLE = 0x0000000D, + MTRCommandIDTypeClusterTLSCertificateManagementCommandRemoveClientCertificateID MTR_PROVISIONALLY_AVAILABLE = 0x0000000E, // Cluster TLSClientManagement commands MTRCommandIDTypeClusterTLSClientManagementCommandProvisionEndpointID MTR_PROVISIONALLY_AVAILABLE = 0x00000000, diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRClusterNames.mm b/src/darwin/Framework/CHIP/zap-generated/MTRClusterNames.mm index 14843c3ca05d7d..9e2653571e303d 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRClusterNames.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRClusterNames.mm @@ -8160,8 +8160,8 @@ result = @"InstalledChimeSounds"; break; - case MTRAttributeIDTypeClusterChimeAttributeActiveChimeIDID: - result = @"ActiveChimeID"; + case MTRAttributeIDTypeClusterChimeAttributeSelectedChimeID: + result = @"SelectedChime"; break; case MTRAttributeIDTypeClusterChimeAttributeEnabledID: @@ -8277,16 +8277,16 @@ result = @"MaxRootCertificates"; break; - case MTRAttributeIDTypeClusterTLSCertificateManagementAttributeCurrentRootCertificatesID: - result = @"CurrentRootCertificates"; + case MTRAttributeIDTypeClusterTLSCertificateManagementAttributeProvisionedRootCertificatesID: + result = @"ProvisionedRootCertificates"; break; case MTRAttributeIDTypeClusterTLSCertificateManagementAttributeMaxClientCertificatesID: result = @"MaxClientCertificates"; break; - case MTRAttributeIDTypeClusterTLSCertificateManagementAttributeCurrentClientCertificatesID: - result = @"CurrentClientCertificates"; + case MTRAttributeIDTypeClusterTLSCertificateManagementAttributeProvisionedClientCertificatesID: + result = @"ProvisionedClientCertificates"; break; case MTRAttributeIDTypeClusterTLSCertificateManagementAttributeGeneratedCommandListID: @@ -13074,10 +13074,6 @@ result = @"TLSClientCSRResponse"; break; - case MTRCommandIDTypeClusterTLSCertificateManagementCommandProvisionClientCertificateResponseID: - result = @"ProvisionClientCertificateResponse"; - break; - case MTRCommandIDTypeClusterTLSCertificateManagementCommandFindClientCertificateResponseID: result = @"FindClientCertificateResponse"; break; diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRClusters.h b/src/darwin/Framework/CHIP/zap-generated/MTRClusters.h index 919d080d099cbd..53732f76a0a3c0 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRClusters.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRClusters.h @@ -7035,9 +7035,9 @@ MTR_PROVISIONALLY_AVAILABLE - (NSDictionary * _Nullable)readAttributeInstalledChimeSoundsWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; -- (NSDictionary * _Nullable)readAttributeActiveChimeIDWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; -- (void)writeAttributeActiveChimeIDWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs MTR_PROVISIONALLY_AVAILABLE; -- (void)writeAttributeActiveChimeIDWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs params:(MTRWriteParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; +- (NSDictionary * _Nullable)readAttributeSelectedChimeWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; +- (void)writeAttributeSelectedChimeWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs MTR_PROVISIONALLY_AVAILABLE; +- (void)writeAttributeSelectedChimeWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs params:(MTRWriteParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; - (NSDictionary * _Nullable)readAttributeEnabledWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; - (void)writeAttributeEnabledWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs MTR_PROVISIONALLY_AVAILABLE; @@ -7160,18 +7160,18 @@ MTR_PROVISIONALLY_AVAILABLE - (void)lookupRootCertificateWithParams:(MTRTLSCertificateManagementClusterLookupRootCertificateParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTRTLSCertificateManagementClusterLookupRootCertificateResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; - (void)removeRootCertificateWithParams:(MTRTLSCertificateManagementClusterRemoveRootCertificateParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; - (void)TLSClientCSRWithParams:(MTRTLSCertificateManagementClusterTLSClientCSRParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTRTLSCertificateManagementClusterTLSClientCSRResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; -- (void)provisionClientCertificateWithParams:(MTRTLSCertificateManagementClusterProvisionClientCertificateParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTRTLSCertificateManagementClusterProvisionClientCertificateResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)provisionClientCertificateWithParams:(MTRTLSCertificateManagementClusterProvisionClientCertificateParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; - (void)findClientCertificateWithParams:(MTRTLSCertificateManagementClusterFindClientCertificateParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTRTLSCertificateManagementClusterFindClientCertificateResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; - (void)lookupClientCertificateWithParams:(MTRTLSCertificateManagementClusterLookupClientCertificateParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTRTLSCertificateManagementClusterLookupClientCertificateResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; - (void)removeClientCertificateWithParams:(MTRTLSCertificateManagementClusterRemoveClientCertificateParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; - (NSDictionary * _Nullable)readAttributeMaxRootCertificatesWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; -- (NSDictionary * _Nullable)readAttributeCurrentRootCertificatesWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; +- (NSDictionary * _Nullable)readAttributeProvisionedRootCertificatesWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; - (NSDictionary * _Nullable)readAttributeMaxClientCertificatesWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; -- (NSDictionary * _Nullable)readAttributeCurrentClientCertificatesWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; +- (NSDictionary * _Nullable)readAttributeProvisionedClientCertificatesWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; - (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRClusters.mm b/src/darwin/Framework/CHIP/zap-generated/MTRClusters.mm index de42c358f3ee77..a5077ab2810558 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRClusters.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRClusters.mm @@ -20705,20 +20705,20 @@ - (void)playChimeSoundWithParams:(MTRChimeClusterPlayChimeSoundParams * _Nullabl return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeChimeID) attributeID:@(MTRAttributeIDTypeClusterChimeAttributeInstalledChimeSoundsID) params:params]; } -- (NSDictionary * _Nullable)readAttributeActiveChimeIDWithParams:(MTRReadParams * _Nullable)params +- (NSDictionary * _Nullable)readAttributeSelectedChimeWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeChimeID) attributeID:@(MTRAttributeIDTypeClusterChimeAttributeActiveChimeIDID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeChimeID) attributeID:@(MTRAttributeIDTypeClusterChimeAttributeSelectedChimeID) params:params]; } -- (void)writeAttributeActiveChimeIDWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs +- (void)writeAttributeSelectedChimeWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs { - [self writeAttributeActiveChimeIDWithValue:dataValueDictionary expectedValueInterval:expectedValueIntervalMs params:nil]; + [self writeAttributeSelectedChimeWithValue:dataValueDictionary expectedValueInterval:expectedValueIntervalMs params:nil]; } -- (void)writeAttributeActiveChimeIDWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs params:(MTRWriteParams * _Nullable)params +- (void)writeAttributeSelectedChimeWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs params:(MTRWriteParams * _Nullable)params { NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeChimeID) attributeID:@(MTRAttributeIDTypeClusterChimeAttributeActiveChimeIDID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; + [self.device writeAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeChimeID) attributeID:@(MTRAttributeIDTypeClusterChimeAttributeSelectedChimeID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; } - (NSDictionary * _Nullable)readAttributeEnabledWithParams:(MTRReadParams * _Nullable)params @@ -21028,7 +21028,7 @@ - (void)TLSClientCSRWithParams:(MTRTLSCertificateManagementClusterTLSClientCSRPa completion:responseHandler]; } -- (void)provisionClientCertificateWithParams:(MTRTLSCertificateManagementClusterProvisionClientCertificateParams *)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTRTLSCertificateManagementClusterProvisionClientCertificateResponseParams * _Nullable data, NSError * _Nullable error))completion +- (void)provisionClientCertificateWithParams:(MTRTLSCertificateManagementClusterProvisionClientCertificateParams *)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion { if (params == nil) { params = [[MTRTLSCertificateManagementClusterProvisionClientCertificateParams @@ -21036,7 +21036,7 @@ - (void)provisionClientCertificateWithParams:(MTRTLSCertificateManagementCluster } auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(response, error); + completion(error); }; auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; @@ -21050,7 +21050,7 @@ - (void)provisionClientCertificateWithParams:(MTRTLSCertificateManagementCluster expectedValueInterval:expectedValueIntervalMs timedInvokeTimeout:timedInvokeTimeoutMs serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:MTRTLSCertificateManagementClusterProvisionClientCertificateResponseParams.class + responseClass:nil queue:self.callbackQueue completion:responseHandler]; } @@ -21141,9 +21141,9 @@ - (void)removeClientCertificateWithParams:(MTRTLSCertificateManagementClusterRem return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeTLSCertificateManagementID) attributeID:@(MTRAttributeIDTypeClusterTLSCertificateManagementAttributeMaxRootCertificatesID) params:params]; } -- (NSDictionary * _Nullable)readAttributeCurrentRootCertificatesWithParams:(MTRReadParams * _Nullable)params +- (NSDictionary * _Nullable)readAttributeProvisionedRootCertificatesWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeTLSCertificateManagementID) attributeID:@(MTRAttributeIDTypeClusterTLSCertificateManagementAttributeCurrentRootCertificatesID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeTLSCertificateManagementID) attributeID:@(MTRAttributeIDTypeClusterTLSCertificateManagementAttributeProvisionedRootCertificatesID) params:params]; } - (NSDictionary * _Nullable)readAttributeMaxClientCertificatesWithParams:(MTRReadParams * _Nullable)params @@ -21151,9 +21151,9 @@ - (void)removeClientCertificateWithParams:(MTRTLSCertificateManagementClusterRem return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeTLSCertificateManagementID) attributeID:@(MTRAttributeIDTypeClusterTLSCertificateManagementAttributeMaxClientCertificatesID) params:params]; } -- (NSDictionary * _Nullable)readAttributeCurrentClientCertificatesWithParams:(MTRReadParams * _Nullable)params +- (NSDictionary * _Nullable)readAttributeProvisionedClientCertificatesWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeTLSCertificateManagementID) attributeID:@(MTRAttributeIDTypeClusterTLSCertificateManagementAttributeCurrentClientCertificatesID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeTLSCertificateManagementID) attributeID:@(MTRAttributeIDTypeClusterTLSCertificateManagementAttributeProvisionedClientCertificatesID) params:params]; } - (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.h b/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.h index 7337541d3f1ca7..bb8ea43efdc89f 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.h @@ -12823,29 +12823,10 @@ MTR_PROVISIONALLY_AVAILABLE @property (nonatomic, copy, nullable) NSNumber * serverSideProcessingTimeout; @end -MTR_PROVISIONALLY_AVAILABLE -@interface MTRTLSCertificateManagementClusterProvisionClientCertificateResponseParams : NSObject - -@property (nonatomic, copy) NSNumber * _Nonnull ccdid MTR_PROVISIONALLY_AVAILABLE; - -/** - * Initialize an MTRTLSCertificateManagementClusterProvisionClientCertificateResponseParams with a response-value dictionary - * of the sort that MTRDeviceResponseHandler would receive. - * - * Will return nil and hand out an error if the response-value dictionary is not - * a command data response or is not the right command response. - * - * Will return nil and hand out an error if the data response does not match the known - * schema for this command. - */ -- (nullable instancetype)initWithResponseValue:(NSDictionary *)responseValue - error:(NSError * __autoreleasing *)error MTR_PROVISIONALLY_AVAILABLE; -@end - MTR_PROVISIONALLY_AVAILABLE @interface MTRTLSCertificateManagementClusterFindClientCertificateParams : NSObject -@property (nonatomic, copy) NSNumber * _Nonnull ccdid MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nullable ccdid MTR_PROVISIONALLY_AVAILABLE; /** * Controls whether the command is a timed command (using Timed Invoke). * diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.mm b/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.mm index 29608fd940b68b..4aebb9b57232b3 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.mm @@ -37607,7 +37607,11 @@ - (CHIP_ERROR)_setFieldsFromDecodableStruct:(const chip::app::Clusters::TlsCerti MTRTLSCertificateManagementClusterTLSCertStruct * newElement_0; newElement_0 = [MTRTLSCertificateManagementClusterTLSCertStruct new]; newElement_0.caid = [NSNumber numberWithUnsignedShort:entry_0.caid]; - newElement_0.certificate = AsData(entry_0.certificate); + if (entry_0.certificate.HasValue()) { + newElement_0.certificate = AsData(entry_0.certificate.Value()); + } else { + newElement_0.certificate = nil; + } [array_0 addObject:newElement_0]; } CHIP_ERROR err = iter_0.GetStatus(); @@ -38074,28 +38078,34 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader } { encodableStruct.clientCertificateDetails.ccdid = self.clientCertificateDetails.ccdid.unsignedShortValue; - encodableStruct.clientCertificateDetails.clientCertificate = AsByteSpan(self.clientCertificateDetails.clientCertificate); - { - using ListType_1 = std::remove_reference_t; - using ListMemberType_1 = ListMemberTypeGetter::Type; - if (self.clientCertificateDetails.intermediateCertificates.count != 0) { - auto * listHolder_1 = new ListHolder(self.clientCertificateDetails.intermediateCertificates.count); - if (listHolder_1 == nullptr || listHolder_1->mList == nullptr) { - return CHIP_ERROR_INVALID_ARGUMENT; - } - listFreer.add(listHolder_1); - for (size_t i_1 = 0; i_1 < self.clientCertificateDetails.intermediateCertificates.count; ++i_1) { - auto element_1 = MTR_SAFE_CAST(self.clientCertificateDetails.intermediateCertificates[i_1], NSData); - if (!element_1) { - // Wrong kind of value. - MTR_LOG_ERROR("%@ incorrectly present in list of %@", self.clientCertificateDetails.intermediateCertificates[i_1], NSStringFromClass(NSData.class)); + if (self.clientCertificateDetails.clientCertificate != nil) { + auto & definedValue_1 = encodableStruct.clientCertificateDetails.clientCertificate.Emplace(); + definedValue_1 = AsByteSpan(self.clientCertificateDetails.clientCertificate); + } + if (self.clientCertificateDetails.intermediateCertificates != nil) { + auto & definedValue_1 = encodableStruct.clientCertificateDetails.intermediateCertificates.Emplace(); + { + using ListType_2 = std::remove_reference_t; + using ListMemberType_2 = ListMemberTypeGetter::Type; + if (self.clientCertificateDetails.intermediateCertificates.count != 0) { + auto * listHolder_2 = new ListHolder(self.clientCertificateDetails.intermediateCertificates.count); + if (listHolder_2 == nullptr || listHolder_2->mList == nullptr) { return CHIP_ERROR_INVALID_ARGUMENT; } - listHolder_1->mList[i_1] = AsByteSpan(element_1); + listFreer.add(listHolder_2); + for (size_t i_2 = 0; i_2 < self.clientCertificateDetails.intermediateCertificates.count; ++i_2) { + auto element_2 = MTR_SAFE_CAST(self.clientCertificateDetails.intermediateCertificates[i_2], NSData); + if (!element_2) { + // Wrong kind of value. + MTR_LOG_ERROR("%@ incorrectly present in list of %@", self.clientCertificateDetails.intermediateCertificates[i_2], NSStringFromClass(NSData.class)); + return CHIP_ERROR_INVALID_ARGUMENT; + } + listHolder_2->mList[i_2] = AsByteSpan(element_2); + } + definedValue_1 = ListType_2(listHolder_2->mList, self.clientCertificateDetails.intermediateCertificates.count); + } else { + definedValue_1 = ListType_2(); } - encodableStruct.clientCertificateDetails.intermediateCertificates = ListType_1(listHolder_1->mList, self.clientCertificateDetails.intermediateCertificates.count); - } else { - encodableStruct.clientCertificateDetails.intermediateCertificates = ListType_1(); } } } @@ -38138,91 +38148,12 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader } @end -@implementation MTRTLSCertificateManagementClusterProvisionClientCertificateResponseParams -- (instancetype)init -{ - if (self = [super init]) { - - _ccdid = @(0); - } - return self; -} - -- (id)copyWithZone:(NSZone * _Nullable)zone; -{ - auto other = [[MTRTLSCertificateManagementClusterProvisionClientCertificateResponseParams alloc] init]; - - other.ccdid = self.ccdid; - - return other; -} - -- (NSString *)description -{ - NSString * descriptionString = [NSString stringWithFormat:@"<%@: ccdid:%@; >", NSStringFromClass([self class]), _ccdid]; - return descriptionString; -} - -- (nullable instancetype)initWithResponseValue:(NSDictionary *)responseValue - error:(NSError * __autoreleasing *)error -{ - if (!(self = [super init])) { - return nil; - } - - using DecodableType = chip::app::Clusters::TlsCertificateManagement::Commands::ProvisionClientCertificateResponse::DecodableType; - chip::System::PacketBufferHandle buffer = [MTRBaseDevice _responseDataForCommand:responseValue - clusterID:DecodableType::GetClusterId() - commandID:DecodableType::GetCommandId() - error:error]; - if (buffer.IsNull()) { - return nil; - } - - chip::TLV::TLVReader reader; - reader.Init(buffer->Start(), buffer->DataLength()); - - CHIP_ERROR err = reader.Next(chip::TLV::AnonymousTag()); - if (err == CHIP_NO_ERROR) { - DecodableType decodedStruct; - err = chip::app::DataModel::Decode(reader, decodedStruct); - if (err == CHIP_NO_ERROR) { - err = [self _setFieldsFromDecodableStruct:decodedStruct]; - if (err == CHIP_NO_ERROR) { - return self; - } - } - } - - NSString * errorStr = [NSString stringWithFormat:@"Command payload decoding failed: %s", err.AsString()]; - MTR_LOG_ERROR("%s", errorStr.UTF8String); - if (error != nil) { - NSDictionary * userInfo = @{ NSLocalizedFailureReasonErrorKey : NSLocalizedString(errorStr, nil) }; - *error = [NSError errorWithDomain:MTRErrorDomain code:MTRErrorCodeSchemaMismatch userInfo:userInfo]; - } - return nil; -} - -@end - -@implementation MTRTLSCertificateManagementClusterProvisionClientCertificateResponseParams (InternalMethods) - -- (CHIP_ERROR)_setFieldsFromDecodableStruct:(const chip::app::Clusters::TlsCertificateManagement::Commands::ProvisionClientCertificateResponse::DecodableType &)decodableStruct -{ - { - self.ccdid = [NSNumber numberWithUnsignedShort:decodableStruct.ccdid]; - } - return CHIP_NO_ERROR; -} - -@end - @implementation MTRTLSCertificateManagementClusterFindClientCertificateParams - (instancetype)init { if (self = [super init]) { - _ccdid = @(0); + _ccdid = nil; _timedInvokeTimeoutMs = nil; _serverSideProcessingTimeout = nil; } @@ -38255,7 +38186,12 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader chip::app::Clusters::TlsCertificateManagement::Commands::FindClientCertificate::Type encodableStruct; ListFreer listFreer; { - encodableStruct.ccdid = self.ccdid.unsignedShortValue; + if (self.ccdid == nil) { + encodableStruct.ccdid.SetNull(); + } else { + auto & nonNullValue_0 = encodableStruct.ccdid.SetNonNull(); + nonNullValue_0 = self.ccdid.unsignedShortValue; + } } auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); @@ -38376,21 +38312,29 @@ - (CHIP_ERROR)_setFieldsFromDecodableStruct:(const chip::app::Clusters::TlsCerti MTRTLSCertificateManagementClusterTLSClientCertificateDetailStruct * newElement_0; newElement_0 = [MTRTLSCertificateManagementClusterTLSClientCertificateDetailStruct new]; newElement_0.ccdid = [NSNumber numberWithUnsignedShort:entry_0.ccdid]; - newElement_0.clientCertificate = AsData(entry_0.clientCertificate); - { // Scope for our temporary variables - auto * array_2 = [NSMutableArray new]; - auto iter_2 = entry_0.intermediateCertificates.begin(); - while (iter_2.Next()) { - auto & entry_2 = iter_2.GetValue(); - NSData * newElement_2; - newElement_2 = AsData(entry_2); - [array_2 addObject:newElement_2]; - } - CHIP_ERROR err = iter_2.GetStatus(); - if (err != CHIP_NO_ERROR) { - return err; + if (entry_0.clientCertificate.HasValue()) { + newElement_0.clientCertificate = AsData(entry_0.clientCertificate.Value()); + } else { + newElement_0.clientCertificate = nil; + } + if (entry_0.intermediateCertificates.HasValue()) { + { // Scope for our temporary variables + auto * array_3 = [NSMutableArray new]; + auto iter_3 = entry_0.intermediateCertificates.Value().begin(); + while (iter_3.Next()) { + auto & entry_3 = iter_3.GetValue(); + NSData * newElement_3; + newElement_3 = AsData(entry_3); + [array_3 addObject:newElement_3]; + } + CHIP_ERROR err = iter_3.GetStatus(); + if (err != CHIP_NO_ERROR) { + return err; + } + newElement_0.intermediateCertificates = array_3; } - newElement_0.intermediateCertificates = array_2; + } else { + newElement_0.intermediateCertificates = nil; } [array_0 addObject:newElement_0]; } diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloads_Internal.h b/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloads_Internal.h index 930b61a36f6adb..b186ab5b0daad6 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloads_Internal.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloads_Internal.h @@ -2428,12 +2428,6 @@ NS_ASSUME_NONNULL_BEGIN @end -@interface MTRTLSCertificateManagementClusterProvisionClientCertificateResponseParams (InternalMethods) - -- (CHIP_ERROR)_setFieldsFromDecodableStruct:(const chip::app::Clusters::TlsCertificateManagement::Commands::ProvisionClientCertificateResponse::DecodableType &)decodableStruct; - -@end - @interface MTRTLSCertificateManagementClusterFindClientCertificateParams (InternalMethods) - (NSDictionary * _Nullable)_encodeAsDataValue:(NSError * __autoreleasing *)error; diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.h b/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.h index 93209c8606d081..a0d83d1940f84f 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.h @@ -2443,14 +2443,14 @@ MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) MTR_PROVISIONALLY_AVAILABLE @interface MTRTLSCertificateManagementClusterTLSCertStruct : NSObject @property (nonatomic, copy) NSNumber * _Nonnull caid MTR_PROVISIONALLY_AVAILABLE; -@property (nonatomic, copy) NSData * _Nonnull certificate MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSData * _Nullable certificate MTR_PROVISIONALLY_AVAILABLE; @end MTR_PROVISIONALLY_AVAILABLE @interface MTRTLSCertificateManagementClusterTLSClientCertificateDetailStruct : NSObject @property (nonatomic, copy) NSNumber * _Nonnull ccdid MTR_PROVISIONALLY_AVAILABLE; -@property (nonatomic, copy) NSData * _Nonnull clientCertificate MTR_PROVISIONALLY_AVAILABLE; -@property (nonatomic, copy) NSArray * _Nonnull intermediateCertificates MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSData * _Nullable clientCertificate MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSArray * _Nullable intermediateCertificates MTR_PROVISIONALLY_AVAILABLE; @end MTR_PROVISIONALLY_AVAILABLE diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.mm b/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.mm index 0b0d5c509fb4af..694c25a4e9a594 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.mm @@ -10212,7 +10212,7 @@ - (instancetype)init _caid = @(0); - _certificate = [NSData data]; + _certificate = nil; } return self; } @@ -10242,9 +10242,9 @@ - (instancetype)init _ccdid = @(0); - _clientCertificate = [NSData data]; + _clientCertificate = nil; - _intermediateCertificates = [NSArray array]; + _intermediateCertificates = nil; } return self; } diff --git a/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.cpp b/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.cpp index ef2fec803c778a..798e2399891db7 100644 --- a/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.cpp +++ b/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.cpp @@ -39815,53 +39815,6 @@ Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value) } // namespace MaxRootCertificates -namespace CurrentRootCertificates { - -Protocols::InteractionModel::Status Get(EndpointId endpoint, uint8_t * value) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType temp; - uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - Protocols::InteractionModel::Status status = - emberAfReadAttribute(endpoint, Clusters::TlsCertificateManagement::Id, Id, readable, sizeof(temp)); - VerifyOrReturnError(Protocols::InteractionModel::Status::Success == status, status); - if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) - { - return Protocols::InteractionModel::Status::ConstraintError; - } - *value = Traits::StorageToWorking(temp); - return status; -} - -Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) -{ - using Traits = NumericAttributeTraits; - if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) - { - return Protocols::InteractionModel::Status::ConstraintError; - } - Traits::StorageType storageValue; - Traits::WorkingToStorage(value, storageValue); - uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::TlsCertificateManagement::Id, Id), - EmberAfWriteDataInput(writable, ZCL_INT8U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); -} - -Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value) -{ - using Traits = NumericAttributeTraits; - if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) - { - return Protocols::InteractionModel::Status::ConstraintError; - } - Traits::StorageType storageValue; - Traits::WorkingToStorage(value, storageValue); - uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::TlsCertificateManagement::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); -} - -} // namespace CurrentRootCertificates - namespace MaxClientCertificates { Protocols::InteractionModel::Status Get(EndpointId endpoint, uint8_t * value) @@ -39909,53 +39862,6 @@ Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value) } // namespace MaxClientCertificates -namespace CurrentClientCertificates { - -Protocols::InteractionModel::Status Get(EndpointId endpoint, uint8_t * value) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType temp; - uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - Protocols::InteractionModel::Status status = - emberAfReadAttribute(endpoint, Clusters::TlsCertificateManagement::Id, Id, readable, sizeof(temp)); - VerifyOrReturnError(Protocols::InteractionModel::Status::Success == status, status); - if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) - { - return Protocols::InteractionModel::Status::ConstraintError; - } - *value = Traits::StorageToWorking(temp); - return status; -} - -Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) -{ - using Traits = NumericAttributeTraits; - if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) - { - return Protocols::InteractionModel::Status::ConstraintError; - } - Traits::StorageType storageValue; - Traits::WorkingToStorage(value, storageValue); - uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::TlsCertificateManagement::Id, Id), - EmberAfWriteDataInput(writable, ZCL_INT8U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); -} - -Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value) -{ - using Traits = NumericAttributeTraits; - if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) - { - return Protocols::InteractionModel::Status::ConstraintError; - } - Traits::StorageType storageValue; - Traits::WorkingToStorage(value, storageValue); - uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::TlsCertificateManagement::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); -} - -} // namespace CurrentClientCertificates - namespace FeatureMap { Protocols::InteractionModel::Status Get(EndpointId endpoint, uint32_t * value) diff --git a/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.h b/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.h index d3e70c0d97daa0..7f0a512f619aaf 100644 --- a/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.h +++ b/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.h @@ -6045,24 +6045,12 @@ Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value); Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); } // namespace MaxRootCertificates -namespace CurrentRootCertificates { -Protocols::InteractionModel::Status Get(EndpointId endpoint, uint8_t * value); // int8u -Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value); -Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); -} // namespace CurrentRootCertificates - namespace MaxClientCertificates { Protocols::InteractionModel::Status Get(EndpointId endpoint, uint8_t * value); // int8u Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value); Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); } // namespace MaxClientCertificates -namespace CurrentClientCertificates { -Protocols::InteractionModel::Status Get(EndpointId endpoint, uint8_t * value); // int8u -Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value); -Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); -} // namespace CurrentClientCertificates - namespace FeatureMap { Protocols::InteractionModel::Status Get(EndpointId endpoint, uint32_t * value); // bitmap32 Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value); 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 c5f63c82ac3f78..d7dee64ce43025 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 @@ -421,10 +421,10 @@ static auto __attribute__((unused)) EnsureKnownEnumValue(Globals::ThreeLevelAuto using EnumType = Globals::ThreeLevelAutoEnum; switch (val) { + case EnumType::kAuto: case EnumType::kLow: case EnumType::kMedium: case EnumType::kHigh: - case EnumType::kAutomatic: return val; default: return EnumType::kUnknownEnumValue; 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 4aa9af0ee9c93a..d85756468ae614 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 @@ -451,10 +451,10 @@ enum class TestGlobalEnum : uint8_t // Enum for ThreeLevelAutoEnum enum class ThreeLevelAutoEnum : uint8_t { - kLow = 0x00, - kMedium = 0x01, - kHigh = 0x02, - kAutomatic = 0x03, + kAuto = 0x00, + kLow = 0x01, + kMedium = 0x02, + kHigh = 0x03, // 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 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 5b213fc24d6d3d..99fdb553b58858 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 @@ -32492,8 +32492,8 @@ CHIP_ERROR TypeInfo::DecodableType::Decode(TLV::TLVReader & reader, const Concre { case Attributes::InstalledChimeSounds::TypeInfo::GetAttributeId(): return DataModel::Decode(reader, installedChimeSounds); - case Attributes::ActiveChimeID::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, activeChimeID); + case Attributes::SelectedChime::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, selectedChime); case Attributes::Enabled::TypeInfo::GetAttributeId(): return DataModel::Decode(reader, enabled); case Attributes::GeneratedCommandList::TypeInfo::GetAttributeId(): @@ -33411,40 +33411,6 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } } } // namespace ProvisionClientCertificate. -namespace ProvisionClientCertificateResponse { -CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const -{ - DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; - encoder.Encode(to_underlying(Fields::kCcdid), ccdid); - return encoder.Finalize(); -} - -CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) -{ - detail::StructDecodeIterator __iterator(reader); - while (true) - { - auto __element = __iterator.Next(); - if (std::holds_alternative(__element)) - { - return std::get(__element); - } - - CHIP_ERROR err = CHIP_NO_ERROR; - const uint8_t __context_tag = std::get(__element); - - if (__context_tag == to_underlying(Fields::kCcdid)) - { - err = DataModel::Decode(reader, ccdid); - } - else - { - } - - ReturnErrorOnFailure(err); - } -} -} // namespace ProvisionClientCertificateResponse. namespace FindClientCertificate { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { @@ -33624,12 +33590,12 @@ CHIP_ERROR TypeInfo::DecodableType::Decode(TLV::TLVReader & reader, const Concre { case Attributes::MaxRootCertificates::TypeInfo::GetAttributeId(): return DataModel::Decode(reader, maxRootCertificates); - case Attributes::CurrentRootCertificates::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, currentRootCertificates); + case Attributes::ProvisionedRootCertificates::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, provisionedRootCertificates); case Attributes::MaxClientCertificates::TypeInfo::GetAttributeId(): return DataModel::Decode(reader, maxClientCertificates); - case Attributes::CurrentClientCertificates::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, currentClientCertificates); + case Attributes::ProvisionedClientCertificates::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, provisionedClientCertificates); case Attributes::GeneratedCommandList::TypeInfo::GetAttributeId(): return DataModel::Decode(reader, generatedCommandList); case Attributes::AcceptedCommandList::TypeInfo::GetAttributeId(): @@ -37482,6 +37448,22 @@ bool CommandIsFabricScoped(ClusterId aCluster, CommandId aCommand) case Clusters::TlsCertificateManagement::Id: { switch (aCommand) { + case Clusters::TlsCertificateManagement::Commands::ProvisionRootCertificate::Id: + return true; + case Clusters::TlsCertificateManagement::Commands::FindRootCertificate::Id: + return true; + case Clusters::TlsCertificateManagement::Commands::LookupRootCertificate::Id: + return true; + case Clusters::TlsCertificateManagement::Commands::RemoveRootCertificate::Id: + return true; + case Clusters::TlsCertificateManagement::Commands::TLSClientCSR::Id: + return true; + case Clusters::TlsCertificateManagement::Commands::FindClientCertificate::Id: + return true; + case Clusters::TlsCertificateManagement::Commands::LookupClientCertificate::Id: + return true; + case Clusters::TlsCertificateManagement::Commands::RemoveClientCertificate::Id: + return true; default: return false; } @@ -37610,6 +37592,81 @@ bool CommandHasLargePayload(ClusterId aCluster, CommandId aCommand) { return true; } + if ((aCluster == Clusters::TlsCertificateManagement::Id) && + (aCommand == Clusters::TlsCertificateManagement::Commands::ProvisionRootCertificate::Id)) + { + return true; + } + if ((aCluster == Clusters::TlsCertificateManagement::Id) && + (aCommand == Clusters::TlsCertificateManagement::Commands::ProvisionRootCertificateResponse::Id)) + { + return true; + } + if ((aCluster == Clusters::TlsCertificateManagement::Id) && + (aCommand == Clusters::TlsCertificateManagement::Commands::FindRootCertificate::Id)) + { + return true; + } + if ((aCluster == Clusters::TlsCertificateManagement::Id) && + (aCommand == Clusters::TlsCertificateManagement::Commands::FindRootCertificateResponse::Id)) + { + return true; + } + if ((aCluster == Clusters::TlsCertificateManagement::Id) && + (aCommand == Clusters::TlsCertificateManagement::Commands::LookupRootCertificate::Id)) + { + return true; + } + if ((aCluster == Clusters::TlsCertificateManagement::Id) && + (aCommand == Clusters::TlsCertificateManagement::Commands::LookupRootCertificateResponse::Id)) + { + return true; + } + if ((aCluster == Clusters::TlsCertificateManagement::Id) && + (aCommand == Clusters::TlsCertificateManagement::Commands::RemoveRootCertificate::Id)) + { + return true; + } + if ((aCluster == Clusters::TlsCertificateManagement::Id) && + (aCommand == Clusters::TlsCertificateManagement::Commands::TLSClientCSR::Id)) + { + return true; + } + if ((aCluster == Clusters::TlsCertificateManagement::Id) && + (aCommand == Clusters::TlsCertificateManagement::Commands::TLSClientCSRResponse::Id)) + { + return true; + } + if ((aCluster == Clusters::TlsCertificateManagement::Id) && + (aCommand == Clusters::TlsCertificateManagement::Commands::ProvisionClientCertificate::Id)) + { + return true; + } + if ((aCluster == Clusters::TlsCertificateManagement::Id) && + (aCommand == Clusters::TlsCertificateManagement::Commands::FindClientCertificate::Id)) + { + return true; + } + if ((aCluster == Clusters::TlsCertificateManagement::Id) && + (aCommand == Clusters::TlsCertificateManagement::Commands::FindClientCertificateResponse::Id)) + { + return true; + } + if ((aCluster == Clusters::TlsCertificateManagement::Id) && + (aCommand == Clusters::TlsCertificateManagement::Commands::LookupClientCertificate::Id)) + { + return true; + } + if ((aCluster == Clusters::TlsCertificateManagement::Id) && + (aCommand == Clusters::TlsCertificateManagement::Commands::LookupClientCertificateResponse::Id)) + { + return true; + } + if ((aCluster == Clusters::TlsCertificateManagement::Id) && + (aCommand == Clusters::TlsCertificateManagement::Commands::RemoveClientCertificate::Id)) + { + return true; + } if ((aCluster == Clusters::TlsClientManagement::Id) && (aCommand == Clusters::TlsClientManagement::Commands::ProvisionEndpoint::Id)) { 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 1a78a7489f2a77..29ab08927ce611 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 @@ -44974,7 +44974,7 @@ struct TypeInfo static constexpr bool MustUseTimedWrite() { return false; } }; } // namespace InstalledChimeSounds -namespace ActiveChimeID { +namespace SelectedChime { struct TypeInfo { using Type = uint8_t; @@ -44982,10 +44982,10 @@ struct TypeInfo using DecodableArgType = uint8_t; static constexpr ClusterId GetClusterId() { return Clusters::Chime::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::ActiveChimeID::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::SelectedChime::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace ActiveChimeID +} // namespace SelectedChime namespace Enabled { struct TypeInfo { @@ -45038,7 +45038,7 @@ struct TypeInfo CHIP_ERROR Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path); Attributes::InstalledChimeSounds::TypeInfo::DecodableType installedChimeSounds; - Attributes::ActiveChimeID::TypeInfo::DecodableType activeChimeID = static_cast(0); + Attributes::SelectedChime::TypeInfo::DecodableType selectedChime = static_cast(0); Attributes::Enabled::TypeInfo::DecodableType enabled = static_cast(0); Attributes::GeneratedCommandList::TypeInfo::DecodableType generatedCommandList; Attributes::AcceptedCommandList::TypeInfo::DecodableType acceptedCommandList; @@ -45498,7 +45498,7 @@ struct Type { public: uint16_t caid = static_cast(0); - chip::ByteSpan certificate; + Optional certificate; CHIP_ERROR Decode(TLV::TLVReader & reader); @@ -45522,8 +45522,8 @@ struct Type { public: uint16_t ccdid = static_cast(0); - chip::ByteSpan clientCertificate; - DataModel::List intermediateCertificates; + Optional clientCertificate; + Optional> intermediateCertificates; static constexpr bool kIsFabricScoped = false; @@ -45534,8 +45534,8 @@ struct DecodableType { public: uint16_t ccdid = static_cast(0); - chip::ByteSpan clientCertificate; - DataModel::DecodableList intermediateCertificates; + Optional clientCertificate; + Optional> intermediateCertificates; CHIP_ERROR Decode(TLV::TLVReader & reader); @@ -45598,11 +45598,6 @@ struct Type; struct DecodableType; } // namespace ProvisionClientCertificate -namespace ProvisionClientCertificateResponse { -struct Type; -struct DecodableType; -} // namespace ProvisionClientCertificateResponse - namespace FindClientCertificate { struct Type; struct DecodableType; @@ -45947,7 +45942,7 @@ struct Type CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; - using ResponseType = Clusters::TlsCertificateManagement::Commands::ProvisionClientCertificateResponse::DecodableType; + using ResponseType = DataModel::NullObjectType; static constexpr bool MustUseTimedInvoke() { return false; } }; @@ -45963,38 +45958,6 @@ struct DecodableType CHIP_ERROR Decode(TLV::TLVReader & reader); }; }; // namespace ProvisionClientCertificate -namespace ProvisionClientCertificateResponse { -enum class Fields : uint8_t -{ - kCcdid = 0, -}; - -struct Type -{ -public: - // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand - static constexpr CommandId GetCommandId() { return Commands::ProvisionClientCertificateResponse::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::TlsCertificateManagement::Id; } - - uint16_t ccdid = static_cast(0); - - CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; - - using ResponseType = DataModel::NullObjectType; - - static constexpr bool MustUseTimedInvoke() { return false; } -}; - -struct DecodableType -{ -public: - static constexpr CommandId GetCommandId() { return Commands::ProvisionClientCertificateResponse::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::TlsCertificateManagement::Id; } - - uint16_t ccdid = static_cast(0); - CHIP_ERROR Decode(TLV::TLVReader & reader); -}; -}; // namespace ProvisionClientCertificateResponse namespace FindClientCertificate { enum class Fields : uint8_t { @@ -46008,7 +45971,7 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::FindClientCertificate::Id; } static constexpr ClusterId GetClusterId() { return Clusters::TlsCertificateManagement::Id; } - uint16_t ccdid = static_cast(0); + DataModel::Nullable ccdid; CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; @@ -46023,7 +45986,7 @@ struct DecodableType static constexpr CommandId GetCommandId() { return Commands::FindClientCertificate::Id; } static constexpr ClusterId GetClusterId() { return Clusters::TlsCertificateManagement::Id; } - uint16_t ccdid = static_cast(0); + DataModel::Nullable ccdid; CHIP_ERROR Decode(TLV::TLVReader & reader); }; }; // namespace FindClientCertificate @@ -46171,18 +46134,20 @@ struct TypeInfo static constexpr bool MustUseTimedWrite() { return false; } }; } // namespace MaxRootCertificates -namespace CurrentRootCertificates { +namespace ProvisionedRootCertificates { struct TypeInfo { - using Type = uint8_t; - using DecodableType = uint8_t; - using DecodableArgType = uint8_t; + using Type = chip::app::DataModel::List; + using DecodableType = + chip::app::DataModel::DecodableList; + using DecodableArgType = const chip::app::DataModel::DecodableList< + chip::app::Clusters::TlsCertificateManagement::Structs::TLSCertStruct::DecodableType> &; static constexpr ClusterId GetClusterId() { return Clusters::TlsCertificateManagement::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::CurrentRootCertificates::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::ProvisionedRootCertificates::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace CurrentRootCertificates +} // namespace ProvisionedRootCertificates namespace MaxClientCertificates { struct TypeInfo { @@ -46195,18 +46160,21 @@ struct TypeInfo static constexpr bool MustUseTimedWrite() { return false; } }; } // namespace MaxClientCertificates -namespace CurrentClientCertificates { +namespace ProvisionedClientCertificates { struct TypeInfo { - using Type = uint8_t; - using DecodableType = uint8_t; - using DecodableArgType = uint8_t; + using Type = chip::app::DataModel::List< + const chip::app::Clusters::TlsCertificateManagement::Structs::TLSClientCertificateDetailStruct::Type>; + using DecodableType = chip::app::DataModel::DecodableList< + chip::app::Clusters::TlsCertificateManagement::Structs::TLSClientCertificateDetailStruct::DecodableType>; + using DecodableArgType = const chip::app::DataModel::DecodableList< + chip::app::Clusters::TlsCertificateManagement::Structs::TLSClientCertificateDetailStruct::DecodableType> &; static constexpr ClusterId GetClusterId() { return Clusters::TlsCertificateManagement::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::CurrentClientCertificates::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::ProvisionedClientCertificates::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace CurrentClientCertificates +} // namespace ProvisionedClientCertificates namespace GeneratedCommandList { struct TypeInfo : public Clusters::Globals::Attributes::GeneratedCommandList::TypeInfo { @@ -46246,10 +46214,10 @@ struct TypeInfo CHIP_ERROR Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path); - Attributes::MaxRootCertificates::TypeInfo::DecodableType maxRootCertificates = static_cast(0); - Attributes::CurrentRootCertificates::TypeInfo::DecodableType currentRootCertificates = static_cast(0); - Attributes::MaxClientCertificates::TypeInfo::DecodableType maxClientCertificates = static_cast(0); - Attributes::CurrentClientCertificates::TypeInfo::DecodableType currentClientCertificates = static_cast(0); + Attributes::MaxRootCertificates::TypeInfo::DecodableType maxRootCertificates = static_cast(0); + Attributes::ProvisionedRootCertificates::TypeInfo::DecodableType provisionedRootCertificates; + Attributes::MaxClientCertificates::TypeInfo::DecodableType maxClientCertificates = static_cast(0); + Attributes::ProvisionedClientCertificates::TypeInfo::DecodableType provisionedClientCertificates; Attributes::GeneratedCommandList::TypeInfo::DecodableType generatedCommandList; Attributes::AcceptedCommandList::TypeInfo::DecodableType acceptedCommandList; Attributes::AttributeList::TypeInfo::DecodableType attributeList; 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 7eb8b8de851f8f..0e82227dd2f57b 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 @@ -7286,9 +7286,9 @@ namespace InstalledChimeSounds { static constexpr AttributeId Id = 0x00000000; } // namespace InstalledChimeSounds -namespace ActiveChimeID { +namespace SelectedChime { static constexpr AttributeId Id = 0x00000001; -} // namespace ActiveChimeID +} // namespace SelectedChime namespace Enabled { static constexpr AttributeId Id = 0x00000002; @@ -7388,17 +7388,17 @@ namespace MaxRootCertificates { static constexpr AttributeId Id = 0x00000000; } // namespace MaxRootCertificates -namespace CurrentRootCertificates { +namespace ProvisionedRootCertificates { static constexpr AttributeId Id = 0x00000001; -} // namespace CurrentRootCertificates +} // namespace ProvisionedRootCertificates namespace MaxClientCertificates { static constexpr AttributeId Id = 0x00000002; } // namespace MaxClientCertificates -namespace CurrentClientCertificates { +namespace ProvisionedClientCertificates { static constexpr AttributeId Id = 0x00000003; -} // namespace CurrentClientCertificates +} // namespace ProvisionedClientCertificates namespace GeneratedCommandList { static constexpr AttributeId Id = Globals::Attributes::GeneratedCommandList::Id; diff --git a/zzz_generated/app-common/app-common/zap-generated/ids/Commands.h b/zzz_generated/app-common/app-common/zap-generated/ids/Commands.h index 5ebfcea60cff9a..fab08815cdf529 100644 --- a/zzz_generated/app-common/app-common/zap-generated/ids/Commands.h +++ b/zzz_generated/app-common/app-common/zap-generated/ids/Commands.h @@ -2132,28 +2132,24 @@ namespace ProvisionClientCertificate { static constexpr CommandId Id = 0x00000009; } // namespace ProvisionClientCertificate -namespace ProvisionClientCertificateResponse { -static constexpr CommandId Id = 0x0000000A; -} // namespace ProvisionClientCertificateResponse - namespace FindClientCertificate { -static constexpr CommandId Id = 0x0000000B; +static constexpr CommandId Id = 0x0000000A; } // namespace FindClientCertificate namespace FindClientCertificateResponse { -static constexpr CommandId Id = 0x0000000C; +static constexpr CommandId Id = 0x0000000B; } // namespace FindClientCertificateResponse namespace LookupClientCertificate { -static constexpr CommandId Id = 0x0000000D; +static constexpr CommandId Id = 0x0000000C; } // namespace LookupClientCertificate namespace LookupClientCertificateResponse { -static constexpr CommandId Id = 0x0000000E; +static constexpr CommandId Id = 0x0000000D; } // namespace LookupClientCertificateResponse namespace RemoveClientCertificate { -static constexpr CommandId Id = 0x0000000F; +static constexpr CommandId Id = 0x0000000E; } // namespace RemoveClientCertificate } // namespace Commands diff --git a/zzz_generated/chip-tool/zap-generated/cluster/Commands.h b/zzz_generated/chip-tool/zap-generated/cluster/Commands.h index 38ce1d3e7a2768..a4e142fee41587 100644 --- a/zzz_generated/chip-tool/zap-generated/cluster/Commands.h +++ b/zzz_generated/chip-tool/zap-generated/cluster/Commands.h @@ -15509,7 +15509,7 @@ class PushAvStreamTransportFindTransport : public ClusterCommand |------------------------------------------------------------------------------| | Attributes: | | | * InstalledChimeSounds | 0x0000 | -| * ActiveChimeID | 0x0001 | +| * SelectedChime | 0x0001 | | * Enabled | 0x0002 | | * GeneratedCommandList | 0xFFF8 | | * AcceptedCommandList | 0xFFF9 | @@ -15682,15 +15682,15 @@ class CommissionerControlCommissionNode : public ClusterCommand | * RemoveRootCertificate | 0x06 | | * TLSClientCSR | 0x07 | | * ProvisionClientCertificate | 0x09 | -| * FindClientCertificate | 0x0B | -| * LookupClientCertificate | 0x0D | -| * RemoveClientCertificate | 0x0F | +| * FindClientCertificate | 0x0A | +| * LookupClientCertificate | 0x0C | +| * RemoveClientCertificate | 0x0E | |------------------------------------------------------------------------------| | Attributes: | | | * MaxRootCertificates | 0x0000 | -| * CurrentRootCertificates | 0x0001 | +| * ProvisionedRootCertificates | 0x0001 | | * MaxClientCertificates | 0x0002 | -| * CurrentClientCertificates | 0x0003 | +| * ProvisionedClientCertificates | 0x0003 | | * GeneratedCommandList | 0xFFF8 | | * AcceptedCommandList | 0xFFF9 | | * AttributeList | 0xFFFB | @@ -28831,7 +28831,7 @@ void registerClusterChime(Commands & commands, CredentialIssuerCommands * credsI // make_unique(Id, credsIssuerConfig), // make_unique(Id, "installed-chime-sounds", Attributes::InstalledChimeSounds::Id, credsIssuerConfig), // - make_unique(Id, "active-chime-id", Attributes::ActiveChimeID::Id, credsIssuerConfig), // + make_unique(Id, "selected-chime", Attributes::SelectedChime::Id, credsIssuerConfig), // make_unique(Id, "enabled", Attributes::Enabled::Id, credsIssuerConfig), // make_unique(Id, "generated-command-list", Attributes::GeneratedCommandList::Id, credsIssuerConfig), // make_unique(Id, "accepted-command-list", Attributes::AcceptedCommandList::Id, credsIssuerConfig), // @@ -28843,7 +28843,7 @@ void registerClusterChime(Commands & commands, CredentialIssuerCommands * credsI WriteAttributeAsComplex>>( Id, "installed-chime-sounds", Attributes::InstalledChimeSounds::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>(Id, "active-chime-id", 0, UINT8_MAX, Attributes::ActiveChimeID::Id, + make_unique>(Id, "selected-chime", 0, UINT8_MAX, Attributes::SelectedChime::Id, WriteCommandType::kWrite, credsIssuerConfig), // make_unique>(Id, "enabled", 0, 1, Attributes::Enabled::Id, WriteCommandType::kWrite, credsIssuerConfig), // @@ -28860,7 +28860,7 @@ void registerClusterChime(Commands & commands, CredentialIssuerCommands * credsI WriteCommandType::kForceWrite, credsIssuerConfig), // make_unique(Id, credsIssuerConfig), // make_unique(Id, "installed-chime-sounds", Attributes::InstalledChimeSounds::Id, credsIssuerConfig), // - make_unique(Id, "active-chime-id", Attributes::ActiveChimeID::Id, credsIssuerConfig), // + make_unique(Id, "selected-chime", Attributes::SelectedChime::Id, credsIssuerConfig), // make_unique(Id, "enabled", Attributes::Enabled::Id, credsIssuerConfig), // make_unique(Id, "generated-command-list", Attributes::GeneratedCommandList::Id, credsIssuerConfig), // make_unique(Id, "accepted-command-list", Attributes::AcceptedCommandList::Id, credsIssuerConfig), // @@ -29015,11 +29015,12 @@ void registerClusterTlsCertificateManagement(Commands & commands, CredentialIssu // // Attributes // - make_unique(Id, credsIssuerConfig), // - make_unique(Id, "max-root-certificates", Attributes::MaxRootCertificates::Id, credsIssuerConfig), // - make_unique(Id, "current-root-certificates", Attributes::CurrentRootCertificates::Id, credsIssuerConfig), // - make_unique(Id, "max-client-certificates", Attributes::MaxClientCertificates::Id, credsIssuerConfig), // - make_unique(Id, "current-client-certificates", Attributes::CurrentClientCertificates::Id, + make_unique(Id, credsIssuerConfig), // + make_unique(Id, "max-root-certificates", Attributes::MaxRootCertificates::Id, credsIssuerConfig), // + make_unique(Id, "provisioned-root-certificates", Attributes::ProvisionedRootCertificates::Id, + credsIssuerConfig), // + make_unique(Id, "max-client-certificates", Attributes::MaxClientCertificates::Id, credsIssuerConfig), // + make_unique(Id, "provisioned-client-certificates", Attributes::ProvisionedClientCertificates::Id, credsIssuerConfig), // make_unique(Id, "generated-command-list", Attributes::GeneratedCommandList::Id, credsIssuerConfig), // make_unique(Id, "accepted-command-list", Attributes::AcceptedCommandList::Id, credsIssuerConfig), // @@ -29029,13 +29030,16 @@ void registerClusterTlsCertificateManagement(Commands & commands, CredentialIssu make_unique>(Id, credsIssuerConfig), // make_unique>(Id, "max-root-certificates", 0, UINT8_MAX, Attributes::MaxRootCertificates::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>(Id, "current-root-certificates", 0, UINT8_MAX, Attributes::CurrentRootCertificates::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>>( + Id, "provisioned-root-certificates", Attributes::ProvisionedRootCertificates::Id, WriteCommandType::kForceWrite, + credsIssuerConfig), // make_unique>(Id, "max-client-certificates", 0, UINT8_MAX, Attributes::MaxClientCertificates::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>(Id, "current-client-certificates", 0, UINT8_MAX, - Attributes::CurrentClientCertificates::Id, WriteCommandType::kForceWrite, - credsIssuerConfig), // + make_unique>>( + Id, "provisioned-client-certificates", Attributes::ProvisionedClientCertificates::Id, WriteCommandType::kForceWrite, + credsIssuerConfig), // make_unique>>( Id, "generated-command-list", Attributes::GeneratedCommandList::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // @@ -29049,10 +29053,10 @@ void registerClusterTlsCertificateManagement(Commands & commands, CredentialIssu WriteCommandType::kForceWrite, credsIssuerConfig), // make_unique(Id, credsIssuerConfig), // make_unique(Id, "max-root-certificates", Attributes::MaxRootCertificates::Id, credsIssuerConfig), // - make_unique(Id, "current-root-certificates", Attributes::CurrentRootCertificates::Id, + make_unique(Id, "provisioned-root-certificates", Attributes::ProvisionedRootCertificates::Id, credsIssuerConfig), // make_unique(Id, "max-client-certificates", Attributes::MaxClientCertificates::Id, credsIssuerConfig), // - make_unique(Id, "current-client-certificates", Attributes::CurrentClientCertificates::Id, + make_unique(Id, "provisioned-client-certificates", Attributes::ProvisionedClientCertificates::Id, credsIssuerConfig), // make_unique(Id, "generated-command-list", Attributes::GeneratedCommandList::Id, credsIssuerConfig), // make_unique(Id, "accepted-command-list", Attributes::AcceptedCommandList::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 b75969b11d59bd..de9b6c1110b158 100644 --- a/zzz_generated/chip-tool/zap-generated/cluster/ComplexArgumentParser.cpp +++ b/zzz_generated/chip-tool/zap-generated/cluster/ComplexArgumentParser.cpp @@ -7222,16 +7222,17 @@ CHIP_ERROR ComplexArgumentParser::Setup(const char * label, Json::Value valueCopy(value); ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("TLSCertStruct.caid", "caid", value.isMember("caid"))); - ReturnErrorOnFailure( - ComplexArgumentParser::EnsureMemberExist("TLSCertStruct.certificate", "certificate", value.isMember("certificate"))); char labelWithMember[kMaxLabelLength]; snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "caid"); ReturnErrorOnFailure(ComplexArgumentParser::Setup(labelWithMember, request.caid, value["caid"])); valueCopy.removeMember("caid"); - snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "certificate"); - ReturnErrorOnFailure(ComplexArgumentParser::Setup(labelWithMember, request.certificate, value["certificate"])); + if (value.isMember("certificate")) + { + snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "certificate"); + ReturnErrorOnFailure(ComplexArgumentParser::Setup(labelWithMember, request.certificate, value["certificate"])); + } valueCopy.removeMember("certificate"); return ComplexArgumentParser::EnsureNoMembersRemaining(label, valueCopy); @@ -7254,24 +7255,25 @@ CHIP_ERROR ComplexArgumentParser::Setup( ReturnErrorOnFailure( ComplexArgumentParser::EnsureMemberExist("TLSClientCertificateDetailStruct.ccdid", "ccdid", value.isMember("ccdid"))); - ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("TLSClientCertificateDetailStruct.clientCertificate", - "clientCertificate", value.isMember("clientCertificate"))); - ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("TLSClientCertificateDetailStruct.intermediateCertificates", - "intermediateCertificates", - value.isMember("intermediateCertificates"))); char labelWithMember[kMaxLabelLength]; snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "ccdid"); ReturnErrorOnFailure(ComplexArgumentParser::Setup(labelWithMember, request.ccdid, value["ccdid"])); valueCopy.removeMember("ccdid"); - snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "clientCertificate"); - ReturnErrorOnFailure(ComplexArgumentParser::Setup(labelWithMember, request.clientCertificate, value["clientCertificate"])); + if (value.isMember("clientCertificate")) + { + snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "clientCertificate"); + ReturnErrorOnFailure(ComplexArgumentParser::Setup(labelWithMember, request.clientCertificate, value["clientCertificate"])); + } valueCopy.removeMember("clientCertificate"); - snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "intermediateCertificates"); - ReturnErrorOnFailure( - ComplexArgumentParser::Setup(labelWithMember, request.intermediateCertificates, value["intermediateCertificates"])); + if (value.isMember("intermediateCertificates")) + { + snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "intermediateCertificates"); + ReturnErrorOnFailure( + ComplexArgumentParser::Setup(labelWithMember, request.intermediateCertificates, value["intermediateCertificates"])); + } valueCopy.removeMember("intermediateCertificates"); return ComplexArgumentParser::EnsureNoMembersRemaining(label, valueCopy); 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 db9a1bb14b3b68..a8f9a53a2e2d1c 100644 --- a/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.cpp +++ b/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.cpp @@ -10359,15 +10359,6 @@ CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, DataModelLogger::LogString(indent, "}"); return CHIP_NO_ERROR; } -CHIP_ERROR -DataModelLogger::LogValue(const char * label, size_t indent, - const TlsCertificateManagement::Commands::ProvisionClientCertificateResponse::DecodableType & value) -{ - DataModelLogger::LogString(label, indent, "{"); - ReturnErrorOnFailure(DataModelLogger::LogValue("ccdid", indent + 1, value.ccdid)); - DataModelLogger::LogString(indent, "}"); - return CHIP_NO_ERROR; -} CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, const TlsCertificateManagement::Commands::FindClientCertificateResponse::DecodableType & value) { @@ -19571,10 +19562,10 @@ CHIP_ERROR DataModelLogger::LogAttribute(const chip::app::ConcreteDataAttributeP ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("InstalledChimeSounds", 1, value); } - case Chime::Attributes::ActiveChimeID::Id: { + case Chime::Attributes::SelectedChime::Id: { uint8_t value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("ActiveChimeID", 1, value); + return DataModelLogger::LogValue("SelectedChime", 1, value); } case Chime::Attributes::Enabled::Id: { bool value; @@ -19698,20 +19689,24 @@ CHIP_ERROR DataModelLogger::LogAttribute(const chip::app::ConcreteDataAttributeP ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("MaxRootCertificates", 1, value); } - case TlsCertificateManagement::Attributes::CurrentRootCertificates::Id: { - uint8_t value; + case TlsCertificateManagement::Attributes::ProvisionedRootCertificates::Id: { + chip::app::DataModel::DecodableList< + chip::app::Clusters::TlsCertificateManagement::Structs::TLSCertStruct::DecodableType> + value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("CurrentRootCertificates", 1, value); + return DataModelLogger::LogValue("ProvisionedRootCertificates", 1, value); } case TlsCertificateManagement::Attributes::MaxClientCertificates::Id: { uint8_t value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("MaxClientCertificates", 1, value); } - case TlsCertificateManagement::Attributes::CurrentClientCertificates::Id: { - uint8_t value; + case TlsCertificateManagement::Attributes::ProvisionedClientCertificates::Id: { + chip::app::DataModel::DecodableList< + chip::app::Clusters::TlsCertificateManagement::Structs::TLSClientCertificateDetailStruct::DecodableType> + value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("CurrentClientCertificates", 1, value); + return DataModelLogger::LogValue("ProvisionedClientCertificates", 1, value); } case TlsCertificateManagement::Attributes::GeneratedCommandList::Id: { chip::app::DataModel::DecodableList value; @@ -21046,11 +21041,6 @@ CHIP_ERROR DataModelLogger::LogCommand(const chip::app::ConcreteCommandPath & pa ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("TLSClientCSRResponse", 1, value); } - case TlsCertificateManagement::Commands::ProvisionClientCertificateResponse::Id: { - TlsCertificateManagement::Commands::ProvisionClientCertificateResponse::DecodableType value; - ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("ProvisionClientCertificateResponse", 1, value); - } case TlsCertificateManagement::Commands::FindClientCertificateResponse::Id: { TlsCertificateManagement::Commands::FindClientCertificateResponse::DecodableType 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 0342cf3132c2f7..dca4a0bbec80ba 100644 --- a/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.h +++ b/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.h @@ -1010,9 +1010,6 @@ static CHIP_ERROR LogValue(const char * label, size_t indent, const chip::app::Clusters::TlsCertificateManagement::Commands::TLSClientCSRResponse::DecodableType & value); static CHIP_ERROR -LogValue(const char * label, size_t indent, - const chip::app::Clusters::TlsCertificateManagement::Commands::ProvisionClientCertificateResponse::DecodableType & value); -static CHIP_ERROR LogValue(const char * label, size_t indent, const chip::app::Clusters::TlsCertificateManagement::Commands::FindClientCertificateResponse::DecodableType & value); static CHIP_ERROR diff --git a/zzz_generated/chip-tool/zap-generated/cluster/logging/EntryToText.cpp b/zzz_generated/chip-tool/zap-generated/cluster/logging/EntryToText.cpp index 736bd9a8459b00..d7d97915eaef80 100644 --- a/zzz_generated/chip-tool/zap-generated/cluster/logging/EntryToText.cpp +++ b/zzz_generated/chip-tool/zap-generated/cluster/logging/EntryToText.cpp @@ -4413,8 +4413,8 @@ char const * AttributeIdToText(chip::ClusterId cluster, chip::AttributeId id) { case chip::app::Clusters::Chime::Attributes::InstalledChimeSounds::Id: return "InstalledChimeSounds"; - case chip::app::Clusters::Chime::Attributes::ActiveChimeID::Id: - return "ActiveChimeID"; + case chip::app::Clusters::Chime::Attributes::SelectedChime::Id: + return "SelectedChime"; case chip::app::Clusters::Chime::Attributes::Enabled::Id: return "Enabled"; case chip::app::Clusters::Chime::Attributes::GeneratedCommandList::Id: @@ -4476,12 +4476,12 @@ char const * AttributeIdToText(chip::ClusterId cluster, chip::AttributeId id) { case chip::app::Clusters::TlsCertificateManagement::Attributes::MaxRootCertificates::Id: return "MaxRootCertificates"; - case chip::app::Clusters::TlsCertificateManagement::Attributes::CurrentRootCertificates::Id: - return "CurrentRootCertificates"; + case chip::app::Clusters::TlsCertificateManagement::Attributes::ProvisionedRootCertificates::Id: + return "ProvisionedRootCertificates"; case chip::app::Clusters::TlsCertificateManagement::Attributes::MaxClientCertificates::Id: return "MaxClientCertificates"; - case chip::app::Clusters::TlsCertificateManagement::Attributes::CurrentClientCertificates::Id: - return "CurrentClientCertificates"; + case chip::app::Clusters::TlsCertificateManagement::Attributes::ProvisionedClientCertificates::Id: + return "ProvisionedClientCertificates"; case chip::app::Clusters::TlsCertificateManagement::Attributes::GeneratedCommandList::Id: return "GeneratedCommandList"; case chip::app::Clusters::TlsCertificateManagement::Attributes::AcceptedCommandList::Id: @@ -6568,8 +6568,6 @@ char const * GeneratedCommandIdToText(chip::ClusterId cluster, chip::CommandId i return "LookupRootCertificateResponse"; case chip::app::Clusters::TlsCertificateManagement::Commands::TLSClientCSRResponse::Id: return "TLSClientCSRResponse"; - case chip::app::Clusters::TlsCertificateManagement::Commands::ProvisionClientCertificateResponse::Id: - return "ProvisionClientCertificateResponse"; case chip::app::Clusters::TlsCertificateManagement::Commands::FindClientCertificateResponse::Id: return "FindClientCertificateResponse"; case chip::app::Clusters::TlsCertificateManagement::Commands::LookupClientCertificateResponse::Id: 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 a37aa5654d832e..c10f47653a2ffe 100644 --- a/zzz_generated/darwin-framework-tool/zap-generated/cluster/Commands.h +++ b/zzz_generated/darwin-framework-tool/zap-generated/cluster/Commands.h @@ -160130,7 +160130,7 @@ class SubscribeAttributePushAvStreamTransportClusterRevision : public SubscribeA |------------------------------------------------------------------------------| | Attributes: | | | * InstalledChimeSounds | 0x0000 | -| * ActiveChimeID | 0x0001 | +| * SelectedChime | 0x0001 | | * Enabled | 0x0002 | | * GeneratedCommandList | 0xFFF8 | | * AcceptedCommandList | 0xFFF9 | @@ -160276,34 +160276,34 @@ class SubscribeAttributeChimeInstalledChimeSounds : public SubscribeAttribute { #if MTR_ENABLE_PROVISIONAL /* - * Attribute ActiveChimeID + * Attribute SelectedChime */ -class ReadChimeActiveChimeID : public ReadAttribute { +class ReadChimeSelectedChime : public ReadAttribute { public: - ReadChimeActiveChimeID() - : ReadAttribute("active-chime-id") + ReadChimeSelectedChime() + : ReadAttribute("selected-chime") { } - ~ReadChimeActiveChimeID() + ~ReadChimeSelectedChime() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::Chime::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Chime::Attributes::ActiveChimeID::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Chime::Attributes::SelectedChime::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL_WITH_AUTORELEASE_POOL); __auto_type * cluster = [[MTRBaseClusterChime alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeActiveChimeIDWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Chime.ActiveChimeID response %@", [value description]); + [cluster readAttributeSelectedChimeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Chime.SelectedChime response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("Chime ActiveChimeID read Error", error); + LogNSError("Chime SelectedChime read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -160312,24 +160312,24 @@ class ReadChimeActiveChimeID : public ReadAttribute { } }; -class WriteChimeActiveChimeID : public WriteAttribute { +class WriteChimeSelectedChime : public WriteAttribute { public: - WriteChimeActiveChimeID() - : WriteAttribute("active-chime-id") + WriteChimeSelectedChime() + : WriteAttribute("selected-chime") { - AddArgument("attr-name", "active-chime-id"); + AddArgument("attr-name", "selected-chime"); AddArgument("attr-value", 0, UINT8_MAX, &mValue); WriteAttribute::AddArguments(); } - ~WriteChimeActiveChimeID() + ~WriteChimeSelectedChime() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::Chime::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Chime::Attributes::ActiveChimeID::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Chime::Attributes::SelectedChime::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL_WITH_AUTORELEASE_POOL); @@ -160339,9 +160339,9 @@ class WriteChimeActiveChimeID : public WriteAttribute { params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; NSNumber * _Nonnull value = [NSNumber numberWithUnsignedChar:mValue]; - [cluster writeAttributeActiveChimeIDWithValue:value params:params completion:^(NSError * _Nullable error) { + [cluster writeAttributeSelectedChimeWithValue:value params:params completion:^(NSError * _Nullable error) { if (error != nil) { - LogNSError("Chime ActiveChimeID write Error", error); + LogNSError("Chime SelectedChime write Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -160353,21 +160353,21 @@ class WriteChimeActiveChimeID : public WriteAttribute { uint8_t mValue; }; -class SubscribeAttributeChimeActiveChimeID : public SubscribeAttribute { +class SubscribeAttributeChimeSelectedChime : public SubscribeAttribute { public: - SubscribeAttributeChimeActiveChimeID() - : SubscribeAttribute("active-chime-id") + SubscribeAttributeChimeSelectedChime() + : SubscribeAttribute("selected-chime") { } - ~SubscribeAttributeChimeActiveChimeID() + ~SubscribeAttributeChimeSelectedChime() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::Chime::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Chime::Attributes::ActiveChimeID::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Chime::Attributes::SelectedChime::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL_WITH_AUTORELEASE_POOL); @@ -160382,10 +160382,10 @@ class SubscribeAttributeChimeActiveChimeID : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeActiveChimeIDWithParams:params + [cluster subscribeAttributeSelectedChimeWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Chime.ActiveChimeID response %@", [value description]); + NSLog(@"Chime.SelectedChime response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -162207,15 +162207,15 @@ class SubscribeAttributeCommissionerControlClusterRevision : public SubscribeAtt | * RemoveRootCertificate | 0x06 | | * TLSClientCSR | 0x07 | | * ProvisionClientCertificate | 0x09 | -| * FindClientCertificate | 0x0B | -| * LookupClientCertificate | 0x0D | -| * RemoveClientCertificate | 0x0F | +| * FindClientCertificate | 0x0A | +| * LookupClientCertificate | 0x0C | +| * RemoveClientCertificate | 0x0E | |------------------------------------------------------------------------------| | Attributes: | | | * MaxRootCertificates | 0x0000 | -| * CurrentRootCertificates | 0x0001 | +| * ProvisionedRootCertificates | 0x0001 | | * MaxClientCertificates | 0x0002 | -| * CurrentClientCertificates | 0x0003 | +| * ProvisionedClientCertificates | 0x0003 | | * GeneratedCommandList | 0xFFF8 | | * AcceptedCommandList | 0xFFF9 | | * AttributeList | 0xFFFB | @@ -162564,33 +162564,35 @@ class TlsCertificateManagementProvisionClientCertificate : public ClusterCommand #if MTR_ENABLE_PROVISIONAL params.clientCertificateDetails = [MTRTLSCertificateManagementClusterTLSClientCertificateDetailStruct new]; params.clientCertificateDetails.ccdid = [NSNumber numberWithUnsignedShort:mRequest.clientCertificateDetails.ccdid]; - params.clientCertificateDetails.clientCertificate = [NSData dataWithBytes:mRequest.clientCertificateDetails.clientCertificate.data() length:mRequest.clientCertificateDetails.clientCertificate.size()]; - { // Scope for our temporary variables - auto * array_1 = [NSMutableArray new]; - for (auto & entry_1 : mRequest.clientCertificateDetails.intermediateCertificates) { - NSData * newElement_1; - newElement_1 = [NSData dataWithBytes:entry_1.data() length:entry_1.size()]; - [array_1 addObject:newElement_1]; + if (mRequest.clientCertificateDetails.clientCertificate.HasValue()) { + params.clientCertificateDetails.clientCertificate = [NSData dataWithBytes:mRequest.clientCertificateDetails.clientCertificate.Value().data() length:mRequest.clientCertificateDetails.clientCertificate.Value().size()]; + } else { + params.clientCertificateDetails.clientCertificate = nil; + } + if (mRequest.clientCertificateDetails.intermediateCertificates.HasValue()) { + { // Scope for our temporary variables + auto * array_2 = [NSMutableArray new]; + for (auto & entry_2 : mRequest.clientCertificateDetails.intermediateCertificates.Value()) { + NSData * newElement_2; + newElement_2 = [NSData dataWithBytes:entry_2.data() length:entry_2.size()]; + [array_2 addObject:newElement_2]; + } + params.clientCertificateDetails.intermediateCertificates = array_2; } - params.clientCertificateDetails.intermediateCertificates = array_1; + } else { + params.clientCertificateDetails.intermediateCertificates = nil; } #endif // MTR_ENABLE_PROVISIONAL uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster provisionClientCertificateWithParams:params completion: - ^(MTRTLSCertificateManagementClusterProvisionClientCertificateResponseParams * _Nullable values, NSError * _Nullable error) { - NSLog(@"Values: %@", values); - if (error == nil) { - constexpr chip::CommandId responseId = chip::app::Clusters::TlsCertificateManagement::Commands::ProvisionClientCertificateResponse::Id; - RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); - } + ^(NSError * _Nullable error) { responsesNeeded--; if (error != nil) { mError = error; LogNSError("Error", error); - constexpr chip::CommandId responseId = chip::app::Clusters::TlsCertificateManagement::Commands::ProvisionClientCertificateResponse::Id; - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); } if (responsesNeeded == 0) { SetCommandExitStatus(mError); @@ -162633,7 +162635,11 @@ class TlsCertificateManagementFindClientCertificate : public ClusterCommand { __auto_type * params = [[MTRTLSCertificateManagementClusterFindClientCertificateParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; #if MTR_ENABLE_PROVISIONAL - params.ccdid = [NSNumber numberWithUnsignedShort:mRequest.ccdid]; + if (mRequest.ccdid.IsNull()) { + params.ccdid = nil; + } else { + params.ccdid = [NSNumber numberWithUnsignedShort:mRequest.ccdid.Value()]; + } #endif // MTR_ENABLE_PROVISIONAL uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; @@ -162866,34 +162872,34 @@ class SubscribeAttributeTlsCertificateManagementMaxRootCertificates : public Sub #if MTR_ENABLE_PROVISIONAL /* - * Attribute CurrentRootCertificates + * Attribute ProvisionedRootCertificates */ -class ReadTlsCertificateManagementCurrentRootCertificates : public ReadAttribute { +class ReadTlsCertificateManagementProvisionedRootCertificates : public ReadAttribute { public: - ReadTlsCertificateManagementCurrentRootCertificates() - : ReadAttribute("current-root-certificates") + ReadTlsCertificateManagementProvisionedRootCertificates() + : ReadAttribute("provisioned-root-certificates") { } - ~ReadTlsCertificateManagementCurrentRootCertificates() + ~ReadTlsCertificateManagementProvisionedRootCertificates() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::TlsCertificateManagement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::TlsCertificateManagement::Attributes::CurrentRootCertificates::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::TlsCertificateManagement::Attributes::ProvisionedRootCertificates::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL_WITH_AUTORELEASE_POOL); __auto_type * cluster = [[MTRBaseClusterTLSCertificateManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeCurrentRootCertificatesWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"TLSCertificateManagement.CurrentRootCertificates response %@", [value description]); + [cluster readAttributeProvisionedRootCertificatesWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"TLSCertificateManagement.ProvisionedRootCertificates response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("TLSCertificateManagement CurrentRootCertificates read Error", error); + LogNSError("TLSCertificateManagement ProvisionedRootCertificates read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -162902,21 +162908,21 @@ class ReadTlsCertificateManagementCurrentRootCertificates : public ReadAttribute } }; -class SubscribeAttributeTlsCertificateManagementCurrentRootCertificates : public SubscribeAttribute { +class SubscribeAttributeTlsCertificateManagementProvisionedRootCertificates : public SubscribeAttribute { public: - SubscribeAttributeTlsCertificateManagementCurrentRootCertificates() - : SubscribeAttribute("current-root-certificates") + SubscribeAttributeTlsCertificateManagementProvisionedRootCertificates() + : SubscribeAttribute("provisioned-root-certificates") { } - ~SubscribeAttributeTlsCertificateManagementCurrentRootCertificates() + ~SubscribeAttributeTlsCertificateManagementProvisionedRootCertificates() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::TlsCertificateManagement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::TlsCertificateManagement::Attributes::CurrentRootCertificates::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::TlsCertificateManagement::Attributes::ProvisionedRootCertificates::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL_WITH_AUTORELEASE_POOL); @@ -162931,10 +162937,10 @@ class SubscribeAttributeTlsCertificateManagementCurrentRootCertificates : public if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeCurrentRootCertificatesWithParams:params + [cluster subscribeAttributeProvisionedRootCertificatesWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"TLSCertificateManagement.CurrentRootCertificates response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"TLSCertificateManagement.ProvisionedRootCertificates response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -163036,34 +163042,34 @@ class SubscribeAttributeTlsCertificateManagementMaxClientCertificates : public S #if MTR_ENABLE_PROVISIONAL /* - * Attribute CurrentClientCertificates + * Attribute ProvisionedClientCertificates */ -class ReadTlsCertificateManagementCurrentClientCertificates : public ReadAttribute { +class ReadTlsCertificateManagementProvisionedClientCertificates : public ReadAttribute { public: - ReadTlsCertificateManagementCurrentClientCertificates() - : ReadAttribute("current-client-certificates") + ReadTlsCertificateManagementProvisionedClientCertificates() + : ReadAttribute("provisioned-client-certificates") { } - ~ReadTlsCertificateManagementCurrentClientCertificates() + ~ReadTlsCertificateManagementProvisionedClientCertificates() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::TlsCertificateManagement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::TlsCertificateManagement::Attributes::CurrentClientCertificates::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::TlsCertificateManagement::Attributes::ProvisionedClientCertificates::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL_WITH_AUTORELEASE_POOL); __auto_type * cluster = [[MTRBaseClusterTLSCertificateManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeCurrentClientCertificatesWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"TLSCertificateManagement.CurrentClientCertificates response %@", [value description]); + [cluster readAttributeProvisionedClientCertificatesWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"TLSCertificateManagement.ProvisionedClientCertificates response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("TLSCertificateManagement CurrentClientCertificates read Error", error); + LogNSError("TLSCertificateManagement ProvisionedClientCertificates read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -163072,21 +163078,21 @@ class ReadTlsCertificateManagementCurrentClientCertificates : public ReadAttribu } }; -class SubscribeAttributeTlsCertificateManagementCurrentClientCertificates : public SubscribeAttribute { +class SubscribeAttributeTlsCertificateManagementProvisionedClientCertificates : public SubscribeAttribute { public: - SubscribeAttributeTlsCertificateManagementCurrentClientCertificates() - : SubscribeAttribute("current-client-certificates") + SubscribeAttributeTlsCertificateManagementProvisionedClientCertificates() + : SubscribeAttribute("provisioned-client-certificates") { } - ~SubscribeAttributeTlsCertificateManagementCurrentClientCertificates() + ~SubscribeAttributeTlsCertificateManagementProvisionedClientCertificates() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::TlsCertificateManagement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::TlsCertificateManagement::Attributes::CurrentClientCertificates::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::TlsCertificateManagement::Attributes::ProvisionedClientCertificates::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL_WITH_AUTORELEASE_POOL); @@ -163101,10 +163107,10 @@ class SubscribeAttributeTlsCertificateManagementCurrentClientCertificates : publ if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeCurrentClientCertificatesWithParams:params + [cluster subscribeAttributeProvisionedClientCertificatesWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"TLSCertificateManagement.CurrentClientCertificates response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"TLSCertificateManagement.ProvisionedClientCertificates response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -185130,9 +185136,9 @@ void registerClusterChime(Commands & commands) make_unique(), // #endif // MTR_ENABLE_PROVISIONAL #if MTR_ENABLE_PROVISIONAL - make_unique(), // - make_unique(), // - make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // #endif // MTR_ENABLE_PROVISIONAL #if MTR_ENABLE_PROVISIONAL make_unique(), // @@ -185284,16 +185290,16 @@ void registerClusterTlsCertificateManagement(Commands & commands) make_unique(), // #endif // MTR_ENABLE_PROVISIONAL #if MTR_ENABLE_PROVISIONAL - make_unique(), // - make_unique(), // + make_unique(), // + make_unique(), // #endif // MTR_ENABLE_PROVISIONAL #if MTR_ENABLE_PROVISIONAL make_unique(), // make_unique(), // #endif // MTR_ENABLE_PROVISIONAL #if MTR_ENABLE_PROVISIONAL - make_unique(), // - make_unique(), // + make_unique(), // + make_unique(), // #endif // MTR_ENABLE_PROVISIONAL #if MTR_ENABLE_PROVISIONAL make_unique(), // From 8b7489060950cce1e49740a3b61c6742d1d72321 Mon Sep 17 00:00:00 2001 From: marcos <15697303+gmarcosb@users.noreply.github.com> Date: Thu, 6 Mar 2025 14:59:05 -0700 Subject: [PATCH 5/5] Workaround for https://github.com/project-chip/zap/issues/1255 --- .../data-model/chip/tls-certificate-management-cluster.xml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/app/zap-templates/zcl/data-model/chip/tls-certificate-management-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/tls-certificate-management-cluster.xml index 30566cec7dc635..ee0b7f274b6c0f 100644 --- a/src/app/zap-templates/zcl/data-model/chip/tls-certificate-management-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/tls-certificate-management-cluster.xml @@ -22,13 +22,13 @@ Git: 0.7-summer-2025-308-g2f23be841 --> - + - + @@ -109,7 +109,7 @@ Git: 0.7-summer-2025-308-g2f23be841 - + This command SHALL be generated to request the Node provisions newly provided Client Certificate Details, or rotate an existing client certificate.