From 321ef76b4c13c773df678565dcb6fe8d221afd95 Mon Sep 17 00:00:00 2001 From: Andrei Litvin Date: Tue, 24 Oct 2023 10:18:23 -0400 Subject: [PATCH 01/18] Move AccountLogin cluster to match spec: - set "nullable" attribute to setup pin on reply for getting the setup pin - mark the Login and GetSetupPin requiring administer privileges. --- .../zcl/data-model/chip/account-login-cluster.xml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/app/zap-templates/zcl/data-model/chip/account-login-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/account-login-cluster.xml index 7e49682a8b1845..ed6a5ec2d9bd65 100644 --- a/src/app/zap-templates/zcl/data-model/chip/account-login-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/account-login-cluster.xml @@ -27,11 +27,13 @@ limitations under the License. Upon receipt, the Content App checks if the account associated with the client Temp Account Identifier Rotating ID is the same acount that is active on the given Content App. If the accounts are the same, then the Content App includes the Setup PIN in the GetSetupPIN Response. + Upon receipt, the Content App checks if the account associated with the client’s Temp Account Identifier (Rotating ID) has a current active Setup PIN with the given value. If the Setup PIN is valid for the user account associated with the Temp Account Identifier, then the Content App MAY make that user account active. + @@ -42,7 +44,7 @@ limitations under the License. This message is sent in response to the GetSetupPIN Request, and contains the Setup PIN code, or null when the accounts identified in the request does not match the active account of the running Content App. - + From 32744059612b9b74f56cc0c67e0e69c8cc316973 Mon Sep 17 00:00:00 2001 From: Andrei Litvin Date: Tue, 24 Oct 2023 10:20:40 -0400 Subject: [PATCH 02/18] Zap regen --- .../all-clusters-common/all-clusters-minimal-app.matter | 4 ++-- examples/placeholder/linux/apps/app1/config.matter | 8 ++++---- examples/placeholder/linux/apps/app2/config.matter | 8 ++++---- examples/tv-app/tv-common/tv-app.matter | 4 ++-- .../tv-casting-common/tv-casting-app.matter | 4 ++-- src/controller/data_model/controller-clusters.matter | 4 ++-- 6 files changed, 16 insertions(+), 16 deletions(-) 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 d8edc24a8e391d..8fb86387204a72 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 @@ -3648,8 +3648,8 @@ server cluster AccountLogin = 1294 { char_string setupPIN = 0; } - timed command GetSetupPIN(GetSetupPINRequest): GetSetupPINResponse = 0; - timed command Login(LoginRequest): DefaultSuccess = 2; + timed command access(invoke: administer) GetSetupPIN(GetSetupPINRequest): GetSetupPINResponse = 0; + timed command access(invoke: administer) Login(LoginRequest): DefaultSuccess = 2; timed command Logout(): DefaultSuccess = 3; } diff --git a/examples/placeholder/linux/apps/app1/config.matter b/examples/placeholder/linux/apps/app1/config.matter index bc62ad9ebc9c58..c0e05de6fa9a57 100644 --- a/examples/placeholder/linux/apps/app1/config.matter +++ b/examples/placeholder/linux/apps/app1/config.matter @@ -6458,9 +6458,9 @@ client cluster AccountLogin = 1294 { } /** Upon receipt, the Content App checks if the account associated with the client Temp Account Identifier Rotating ID is the same acount that is active on the given Content App. If the accounts are the same, then the Content App includes the Setup PIN in the GetSetupPIN Response. */ - timed command GetSetupPIN(GetSetupPINRequest): GetSetupPINResponse = 0; + timed command access(invoke: administer) GetSetupPIN(GetSetupPINRequest): GetSetupPINResponse = 0; /** Upon receipt, the Content App checks if the account associated with the client’s Temp Account Identifier (Rotating ID) has a current active Setup PIN with the given value. If the Setup PIN is valid for the user account associated with the Temp Account Identifier, then the Content App MAY make that user account active. */ - timed command Login(LoginRequest): DefaultSuccess = 2; + timed command access(invoke: administer) Login(LoginRequest): DefaultSuccess = 2; /** The purpose of this command is to instruct the Content App to clear the current user account. This command SHOULD be used by clients of a Content App to indicate the end of a user session. */ timed command Logout(): DefaultSuccess = 3; } @@ -6487,8 +6487,8 @@ server cluster AccountLogin = 1294 { char_string setupPIN = 0; } - timed command GetSetupPIN(GetSetupPINRequest): GetSetupPINResponse = 0; - timed command Login(LoginRequest): DefaultSuccess = 2; + timed command access(invoke: administer) GetSetupPIN(GetSetupPINRequest): GetSetupPINResponse = 0; + timed command access(invoke: administer) Login(LoginRequest): DefaultSuccess = 2; timed command Logout(): DefaultSuccess = 3; } diff --git a/examples/placeholder/linux/apps/app2/config.matter b/examples/placeholder/linux/apps/app2/config.matter index 689f75dbc008c8..12604a86c2c1c6 100644 --- a/examples/placeholder/linux/apps/app2/config.matter +++ b/examples/placeholder/linux/apps/app2/config.matter @@ -6417,9 +6417,9 @@ client cluster AccountLogin = 1294 { } /** Upon receipt, the Content App checks if the account associated with the client Temp Account Identifier Rotating ID is the same acount that is active on the given Content App. If the accounts are the same, then the Content App includes the Setup PIN in the GetSetupPIN Response. */ - timed command GetSetupPIN(GetSetupPINRequest): GetSetupPINResponse = 0; + timed command access(invoke: administer) GetSetupPIN(GetSetupPINRequest): GetSetupPINResponse = 0; /** Upon receipt, the Content App checks if the account associated with the client’s Temp Account Identifier (Rotating ID) has a current active Setup PIN with the given value. If the Setup PIN is valid for the user account associated with the Temp Account Identifier, then the Content App MAY make that user account active. */ - timed command Login(LoginRequest): DefaultSuccess = 2; + timed command access(invoke: administer) Login(LoginRequest): DefaultSuccess = 2; /** The purpose of this command is to instruct the Content App to clear the current user account. This command SHOULD be used by clients of a Content App to indicate the end of a user session. */ timed command Logout(): DefaultSuccess = 3; } @@ -6446,8 +6446,8 @@ server cluster AccountLogin = 1294 { char_string setupPIN = 0; } - timed command GetSetupPIN(GetSetupPINRequest): GetSetupPINResponse = 0; - timed command Login(LoginRequest): DefaultSuccess = 2; + timed command access(invoke: administer) GetSetupPIN(GetSetupPINRequest): GetSetupPINResponse = 0; + timed command access(invoke: administer) Login(LoginRequest): DefaultSuccess = 2; timed command Logout(): DefaultSuccess = 3; } diff --git a/examples/tv-app/tv-common/tv-app.matter b/examples/tv-app/tv-common/tv-app.matter index 23a0e2e8772ef1..eedcec2a996313 100644 --- a/examples/tv-app/tv-common/tv-app.matter +++ b/examples/tv-app/tv-common/tv-app.matter @@ -2419,8 +2419,8 @@ server cluster AccountLogin = 1294 { char_string setupPIN = 0; } - timed command GetSetupPIN(GetSetupPINRequest): GetSetupPINResponse = 0; - timed command Login(LoginRequest): DefaultSuccess = 2; + timed command access(invoke: administer) GetSetupPIN(GetSetupPINRequest): GetSetupPINResponse = 0; + timed command access(invoke: administer) Login(LoginRequest): DefaultSuccess = 2; timed command Logout(): DefaultSuccess = 3; } 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 78c2a6aca45cb0..907acb2e03874f 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 @@ -1978,9 +1978,9 @@ client cluster AccountLogin = 1294 { } /** Upon receipt, the Content App checks if the account associated with the client Temp Account Identifier Rotating ID is the same acount that is active on the given Content App. If the accounts are the same, then the Content App includes the Setup PIN in the GetSetupPIN Response. */ - timed command GetSetupPIN(GetSetupPINRequest): GetSetupPINResponse = 0; + timed command access(invoke: administer) GetSetupPIN(GetSetupPINRequest): GetSetupPINResponse = 0; /** Upon receipt, the Content App checks if the account associated with the client’s Temp Account Identifier (Rotating ID) has a current active Setup PIN with the given value. If the Setup PIN is valid for the user account associated with the Temp Account Identifier, then the Content App MAY make that user account active. */ - timed command Login(LoginRequest): DefaultSuccess = 2; + timed command access(invoke: administer) Login(LoginRequest): DefaultSuccess = 2; /** The purpose of this command is to instruct the Content App to clear the current user account. This command SHOULD be used by clients of a Content App to indicate the end of a user session. */ timed command Logout(): DefaultSuccess = 3; } diff --git a/src/controller/data_model/controller-clusters.matter b/src/controller/data_model/controller-clusters.matter index 3527172e57b436..74cd210da5275e 100644 --- a/src/controller/data_model/controller-clusters.matter +++ b/src/controller/data_model/controller-clusters.matter @@ -6401,9 +6401,9 @@ client cluster AccountLogin = 1294 { } /** Upon receipt, the Content App checks if the account associated with the client Temp Account Identifier Rotating ID is the same acount that is active on the given Content App. If the accounts are the same, then the Content App includes the Setup PIN in the GetSetupPIN Response. */ - timed command GetSetupPIN(GetSetupPINRequest): GetSetupPINResponse = 0; + timed command access(invoke: administer) GetSetupPIN(GetSetupPINRequest): GetSetupPINResponse = 0; /** Upon receipt, the Content App checks if the account associated with the client’s Temp Account Identifier (Rotating ID) has a current active Setup PIN with the given value. If the Setup PIN is valid for the user account associated with the Temp Account Identifier, then the Content App MAY make that user account active. */ - timed command Login(LoginRequest): DefaultSuccess = 2; + timed command access(invoke: administer) Login(LoginRequest): DefaultSuccess = 2; /** The purpose of this command is to instruct the Content App to clear the current user account. This command SHOULD be used by clients of a Content App to indicate the end of a user session. */ timed command Logout(): DefaultSuccess = 3; } From f5e83031eaad21377f0b748e2208c120d5109f9f Mon Sep 17 00:00:00 2001 From: Andrei Litvin Date: Tue, 24 Oct 2023 10:28:09 -0400 Subject: [PATCH 03/18] Fix typo in nullable --- .../zap-templates/zcl/data-model/chip/account-login-cluster.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/zap-templates/zcl/data-model/chip/account-login-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/account-login-cluster.xml index ed6a5ec2d9bd65..897f5fd7510285 100644 --- a/src/app/zap-templates/zcl/data-model/chip/account-login-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/account-login-cluster.xml @@ -44,7 +44,7 @@ limitations under the License. This message is sent in response to the GetSetupPIN Request, and contains the Setup PIN code, or null when the accounts identified in the request does not match the active account of the running Content App. - + From 82473d93ca677040d78812861dfe3bc6eef06b3c Mon Sep 17 00:00:00 2001 From: Andrei Litvin Date: Tue, 24 Oct 2023 10:29:22 -0400 Subject: [PATCH 04/18] Zap regen --- .../all-clusters-minimal-app.matter | 2 +- examples/placeholder/linux/apps/app1/config.matter | 4 ++-- examples/placeholder/linux/apps/app2/config.matter | 4 ++-- examples/tv-app/tv-common/tv-app.matter | 2 +- .../tv-casting-common/tv-casting-app.matter | 2 +- .../data_model/controller-clusters.matter | 2 +- .../java/chip/devicecontroller/ChipClusters.java | 2 +- .../chip/devicecontroller/ClusterInfoMapping.java | 2 +- .../java/zap-generated/CHIPInvokeCallbacks.cpp | 9 ++++++++- src/controller/python/chip/clusters/Objects.py | 4 ++-- .../CHIP/zap-generated/MTRCommandPayloadsObjc.h | 2 +- .../CHIP/zap-generated/MTRCommandPayloadsObjc.mm | 14 +++++++++----- .../app-common/zap-generated/cluster-objects.h | 4 ++-- .../zap-generated/test/Commands.h | 8 ++++++-- 14 files changed, 38 insertions(+), 23 deletions(-) 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 8fb86387204a72..92dc75b12ae631 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 @@ -3645,7 +3645,7 @@ server cluster AccountLogin = 1294 { } response struct GetSetupPINResponse = 1 { - char_string setupPIN = 0; + nullable char_string setupPIN = 0; } timed command access(invoke: administer) GetSetupPIN(GetSetupPINRequest): GetSetupPINResponse = 0; diff --git a/examples/placeholder/linux/apps/app1/config.matter b/examples/placeholder/linux/apps/app1/config.matter index c0e05de6fa9a57..6b610141d6c9da 100644 --- a/examples/placeholder/linux/apps/app1/config.matter +++ b/examples/placeholder/linux/apps/app1/config.matter @@ -6449,7 +6449,7 @@ client cluster AccountLogin = 1294 { } response struct GetSetupPINResponse = 1 { - char_string setupPIN = 0; + nullable char_string setupPIN = 0; } request struct LoginRequest { @@ -6484,7 +6484,7 @@ server cluster AccountLogin = 1294 { } response struct GetSetupPINResponse = 1 { - char_string setupPIN = 0; + nullable char_string setupPIN = 0; } timed command access(invoke: administer) GetSetupPIN(GetSetupPINRequest): GetSetupPINResponse = 0; diff --git a/examples/placeholder/linux/apps/app2/config.matter b/examples/placeholder/linux/apps/app2/config.matter index 12604a86c2c1c6..ef1cc88f9555dc 100644 --- a/examples/placeholder/linux/apps/app2/config.matter +++ b/examples/placeholder/linux/apps/app2/config.matter @@ -6408,7 +6408,7 @@ client cluster AccountLogin = 1294 { } response struct GetSetupPINResponse = 1 { - char_string setupPIN = 0; + nullable char_string setupPIN = 0; } request struct LoginRequest { @@ -6443,7 +6443,7 @@ server cluster AccountLogin = 1294 { } response struct GetSetupPINResponse = 1 { - char_string setupPIN = 0; + nullable char_string setupPIN = 0; } timed command access(invoke: administer) GetSetupPIN(GetSetupPINRequest): GetSetupPINResponse = 0; diff --git a/examples/tv-app/tv-common/tv-app.matter b/examples/tv-app/tv-common/tv-app.matter index eedcec2a996313..89ddefe9660626 100644 --- a/examples/tv-app/tv-common/tv-app.matter +++ b/examples/tv-app/tv-common/tv-app.matter @@ -2416,7 +2416,7 @@ server cluster AccountLogin = 1294 { } response struct GetSetupPINResponse = 1 { - char_string setupPIN = 0; + nullable char_string setupPIN = 0; } timed command access(invoke: administer) GetSetupPIN(GetSetupPINRequest): GetSetupPINResponse = 0; diff --git a/examples/tv-casting-app/tv-casting-common/tv-casting-app.matter b/examples/tv-casting-app/tv-casting-common/tv-casting-app.matter index 907acb2e03874f..edc5d779d817c4 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 @@ -1969,7 +1969,7 @@ client cluster AccountLogin = 1294 { } response struct GetSetupPINResponse = 1 { - char_string setupPIN = 0; + nullable char_string setupPIN = 0; } request struct LoginRequest { diff --git a/src/controller/data_model/controller-clusters.matter b/src/controller/data_model/controller-clusters.matter index 74cd210da5275e..e8e5d4a0f084f7 100644 --- a/src/controller/data_model/controller-clusters.matter +++ b/src/controller/data_model/controller-clusters.matter @@ -6392,7 +6392,7 @@ client cluster AccountLogin = 1294 { } response struct GetSetupPINResponse = 1 { - char_string setupPIN = 0; + nullable char_string setupPIN = 0; } request struct LoginRequest { diff --git a/src/controller/java/generated/java/chip/devicecontroller/ChipClusters.java b/src/controller/java/generated/java/chip/devicecontroller/ChipClusters.java index 296065e6083551..ef6ab5c2a3076f 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/ChipClusters.java +++ b/src/controller/java/generated/java/chip/devicecontroller/ChipClusters.java @@ -27245,7 +27245,7 @@ public void logout(DefaultClusterCallback callback, int timedInvokeTimeoutMs) { private native void logout(long chipClusterPtr, DefaultClusterCallback callback, @Nullable Integer timedInvokeTimeoutMs); public interface GetSetupPINResponseCallback { - void onSuccess(String setupPIN); + void onSuccess(@Nullable String setupPIN); void onError(Exception error); } diff --git a/src/controller/java/generated/java/chip/devicecontroller/ClusterInfoMapping.java b/src/controller/java/generated/java/chip/devicecontroller/ClusterInfoMapping.java index 76d01c7ae688d1..cb0a83e408ecb8 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/ClusterInfoMapping.java +++ b/src/controller/java/generated/java/chip/devicecontroller/ClusterInfoMapping.java @@ -15196,7 +15196,7 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(String setupPIN) { + public void onSuccess(@Nullable String setupPIN) { Map responseValues = new LinkedHashMap<>(); CommandResponseInfo setupPINResponseValue = new CommandResponseInfo("setupPIN", "String"); diff --git a/src/controller/java/zap-generated/CHIPInvokeCallbacks.cpp b/src/controller/java/zap-generated/CHIPInvokeCallbacks.cpp index d9d0c871ba082d..beb4125c7ff29d 100644 --- a/src/controller/java/zap-generated/CHIPInvokeCallbacks.cpp +++ b/src/controller/java/zap-generated/CHIPInvokeCallbacks.cpp @@ -4901,7 +4901,14 @@ void CHIPAccountLoginClusterGetSetupPINResponseCallback::CallbackFn( VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error invoking Java callback: %s", ErrorStr(err))); jobject SetupPIN; - LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(dataResponse.setupPIN, SetupPIN)); + if (dataResponse.setupPIN.IsNull()) + { + SetupPIN = nullptr; + } + else + { + LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(dataResponse.setupPIN.Value(), SetupPIN)); + } env->CallVoidMethod(javaCallbackRef, javaMethod, SetupPIN); } diff --git a/src/controller/python/chip/clusters/Objects.py b/src/controller/python/chip/clusters/Objects.py index 98a1a611ca54a5..a108cac3cd1582 100644 --- a/src/controller/python/chip/clusters/Objects.py +++ b/src/controller/python/chip/clusters/Objects.py @@ -35343,10 +35343,10 @@ class GetSetupPINResponse(ClusterCommand): def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields=[ - ClusterObjectFieldDescriptor(Label="setupPIN", Tag=0, Type=str), + ClusterObjectFieldDescriptor(Label="setupPIN", Tag=0, Type=typing.Union[Nullable, str]), ]) - setupPIN: 'str' = "" + setupPIN: 'typing.Union[Nullable, str]' = NullValue @dataclass class Login(ClusterCommand): diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.h b/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.h index 3f1e00bc19794b..d4563afe33b4a3 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.h @@ -8317,7 +8317,7 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @interface MTRAccountLoginClusterGetSetupPINResponseParams : NSObject -@property (nonatomic, copy) NSString * _Nonnull setupPIN MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +@property (nonatomic, copy) NSString * _Nullable setupPIN MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); /** * 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 6ffbc9daaa07ae..b5afd988ef9140 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.mm @@ -22638,7 +22638,7 @@ - (instancetype)init { if (self = [super init]) { - _setupPIN = @""; + _setupPIN = nil; _timedInvokeTimeoutMs = nil; } return self; @@ -22707,10 +22707,14 @@ @implementation MTRAccountLoginClusterGetSetupPINResponseParams (InternalMethods - (CHIP_ERROR)_setFieldsFromDecodableStruct:(const chip::app::Clusters::AccountLogin::Commands::GetSetupPINResponse::DecodableType &)decodableStruct { { - self.setupPIN = AsString(decodableStruct.setupPIN); - if (self.setupPIN == nil) { - CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; - return err; + if (decodableStruct.setupPIN.IsNull()) { + self.setupPIN = nil; + } else { + self.setupPIN = AsString(decodableStruct.setupPIN.Value()); + if (self.setupPIN == nil) { + CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; + return err; + } } } return CHIP_NO_ERROR; 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 6161d06777ce7c..0069b6c1bf6173 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 @@ -30497,7 +30497,7 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::GetSetupPINResponse::Id; } static constexpr ClusterId GetClusterId() { return Clusters::AccountLogin::Id; } - chip::CharSpan setupPIN; + DataModel::Nullable setupPIN; CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; @@ -30512,7 +30512,7 @@ struct DecodableType static constexpr CommandId GetCommandId() { return Commands::GetSetupPINResponse::Id; } static constexpr ClusterId GetClusterId() { return Clusters::AccountLogin::Id; } - chip::CharSpan setupPIN; + DataModel::Nullable setupPIN; CHIP_ERROR Decode(TLV::TLVReader & reader); }; }; // namespace GetSetupPINResponse diff --git a/zzz_generated/darwin-framework-tool/zap-generated/test/Commands.h b/zzz_generated/darwin-framework-tool/zap-generated/test/Commands.h index 7e1221dc650fd1..16defae241df4e 100644 --- a/zzz_generated/darwin-framework-tool/zap-generated/test/Commands.h +++ b/zzz_generated/darwin-framework-tool/zap-generated/test/Commands.h @@ -75720,7 +75720,7 @@ class Test_TC_ALOGIN_12_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - NSString * _Nonnull setupPIN; + NSString * _Nullable setupPIN; CHIP_ERROR TestStep1ThSendsAGetSetupPINCommandToTheDutWithTestValuesProvidedByTheProductMaker_2() { @@ -75737,7 +75737,10 @@ class Test_TC_ALOGIN_12_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintMinLength("setupPIN", values.setupPIN, 11)); + if (values.setupPIN != nil) { + + VerifyOrReturn(CheckConstraintMinLength("setupPIN", values.setupPIN, 11)); + } { setupPIN = values.setupPIN; } @@ -110707,6 +110710,7 @@ class TV_AccountLoginCluster : public TestCommandBridge { { id actualValue = values.setupPIN; + VerifyOrReturn(CheckValueNonNull("SetupPIN", actualValue)); VerifyOrReturn(CheckValueAsString("SetupPIN", actualValue, @"tempPin123")); } From ada62aa91722a392e65f346ae48a75a689d0ff1c Mon Sep 17 00:00:00 2001 From: Andrei Litvin Date: Tue, 24 Oct 2023 10:38:16 -0400 Subject: [PATCH 05/18] Minor change to re-kick CI --- src/app/zap-templates/zcl/data-model/chip/onoff-cluster.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/zap-templates/zcl/data-model/chip/onoff-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/onoff-cluster.xml index 20074f4728d8df..5af15eadeaff66 100644 --- a/src/app/zap-templates/zcl/data-model/chip/onoff-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/onoff-cluster.xml @@ -1,6 +1,6 @@