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 9dc395e4720836..02ae11d78f68f4 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 @@ -898,6 +898,7 @@ server cluster DoorLock = 257 { kDuplicate = 2; kOccupied = 3; kInvalidField = 133; + kResourceExhausted = 137; kNotFound = 139; } @@ -1179,6 +1180,7 @@ server cluster DoorLock = 257 { readonly attribute int8u maxRFIDCodeLength = 25; readonly attribute int8u minRFIDCodeLength = 26; readonly attribute DlCredentialRuleMask credentialRulesSupport = 27; + readonly attribute int8u numberOfCredentialsSupportedPerUser = 28; attribute access(write: manage) char_string<3> language = 33; attribute access(write: manage) int32u autoRelockTime = 35; attribute access(write: manage) int8u soundVolume = 36; @@ -1296,7 +1298,9 @@ server cluster DoorLock = 257 { response struct GetCredentialStatusResponse = 37 { boolean credentialExists = 0; nullable INT16U userIndex = 1; - nullable INT16U nextCredentialIndex = 2; + nullable fabric_idx creatorFabricIndex = 2; + nullable fabric_idx lastModifiedFabricIndex = 3; + nullable INT16U nextCredentialIndex = 4; } timed command LockDoor(LockDoorRequest): DefaultSuccess = 0; @@ -4199,6 +4203,7 @@ endpoint 1 { ram attribute maxRFIDCodeLength default = 20; ram attribute minRFIDCodeLength default = 10; ram attribute credentialRulesSupport default = 1; + ram attribute numberOfCredentialsSupportedPerUser default = 5; ram attribute language default = "en"; ram attribute autoRelockTime default = 60; ram attribute soundVolume; diff --git a/examples/lock-app/lock-common/lock-app.matter b/examples/lock-app/lock-common/lock-app.matter index d851d8b5faad19..fe684555f76520 100644 --- a/examples/lock-app/lock-common/lock-app.matter +++ b/examples/lock-app/lock-common/lock-app.matter @@ -308,6 +308,7 @@ server cluster DoorLock = 257 { kDuplicate = 2; kOccupied = 3; kInvalidField = 133; + kResourceExhausted = 137; kNotFound = 139; } @@ -585,6 +586,7 @@ server cluster DoorLock = 257 { readonly attribute int8u maxRFIDCodeLength = 25; readonly attribute int8u minRFIDCodeLength = 26; readonly attribute DlCredentialRuleMask credentialRulesSupport = 27; + readonly attribute int8u numberOfCredentialsSupportedPerUser = 28; attribute access(write: manage) char_string<3> language = 33; attribute access(write: manage) int32u autoRelockTime = 35; attribute access(write: manage) int8u soundVolume = 36; @@ -724,7 +726,9 @@ server cluster DoorLock = 257 { response struct GetCredentialStatusResponse = 37 { boolean credentialExists = 0; nullable INT16U userIndex = 1; - nullable INT16U nextCredentialIndex = 2; + nullable fabric_idx creatorFabricIndex = 2; + nullable fabric_idx lastModifiedFabricIndex = 3; + nullable INT16U nextCredentialIndex = 4; } timed command LockDoor(LockDoorRequest): DefaultSuccess = 0; @@ -2113,6 +2117,7 @@ endpoint 1 { ram attribute maxRFIDCodeLength default = 20; ram attribute minRFIDCodeLength default = 10; ram attribute credentialRulesSupport default = 1; + ram attribute numberOfCredentialsSupportedPerUser default = 5; ram attribute language default = "en"; ram attribute autoRelockTime default = 60; ram attribute soundVolume; diff --git a/src/controller/data_model/controller-clusters.matter b/src/controller/data_model/controller-clusters.matter index 9ffa786aa2ae44..2b5800bfe9fafe 100644 --- a/src/controller/data_model/controller-clusters.matter +++ b/src/controller/data_model/controller-clusters.matter @@ -1183,6 +1183,7 @@ client cluster DoorLock = 257 { kDuplicate = 2; kOccupied = 3; kInvalidField = 133; + kResourceExhausted = 137; kNotFound = 139; } @@ -1460,6 +1461,7 @@ client cluster DoorLock = 257 { readonly attribute int8u minPINCodeLength = 24; readonly attribute int8u maxRFIDCodeLength = 25; readonly attribute int8u minRFIDCodeLength = 26; + readonly attribute int8u numberOfCredentialsSupportedPerUser = 28; attribute access(write: manage) char_string<3> language = 33; attribute access(write: manage) int32u autoRelockTime = 35; attribute access(write: manage) int8u soundVolume = 36; @@ -1629,7 +1631,9 @@ client cluster DoorLock = 257 { response struct GetCredentialStatusResponse = 37 { boolean credentialExists = 0; nullable INT16U userIndex = 1; - nullable INT16U nextCredentialIndex = 2; + nullable fabric_idx creatorFabricIndex = 2; + nullable fabric_idx lastModifiedFabricIndex = 3; + nullable INT16U nextCredentialIndex = 4; } timed command LockDoor(LockDoorRequest): DefaultSuccess = 0; diff --git a/src/controller/java/zap-generated/CHIPAttributeTLVValueDecoder.cpp b/src/controller/java/zap-generated/CHIPAttributeTLVValueDecoder.cpp index cad410356049a9..98a15cb82729dc 100644 --- a/src/controller/java/zap-generated/CHIPAttributeTLVValueDecoder.cpp +++ b/src/controller/java/zap-generated/CHIPAttributeTLVValueDecoder.cpp @@ -4665,6 +4665,21 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR cppValue, value); return value; } + case Attributes::NumberOfCredentialsSupportedPerUser::Id: { + using TypeInfo = Attributes::NumberOfCredentialsSupportedPerUser::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + std::string valueClassName = "java/lang/Integer"; + std::string valueCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + cppValue, value); + return value; + } case Attributes::Language::Id: { using TypeInfo = Attributes::Language::TypeInfo; TypeInfo::DecodableType cppValue; diff --git a/src/controller/java/zap-generated/CHIPCallbackTypes.h b/src/controller/java/zap-generated/CHIPCallbackTypes.h index a3bd9e35777dd5..faf0938382c81d 100644 --- a/src/controller/java/zap-generated/CHIPCallbackTypes.h +++ b/src/controller/java/zap-generated/CHIPCallbackTypes.h @@ -489,6 +489,8 @@ typedef void (*CHIPDoorLockClusterMaxRFIDCodeLengthAttributeCallbackType)( void *, chip::app::Clusters::DoorLock::Attributes::MaxRFIDCodeLength::TypeInfo::DecodableArgType); typedef void (*CHIPDoorLockClusterMinRFIDCodeLengthAttributeCallbackType)( void *, chip::app::Clusters::DoorLock::Attributes::MinRFIDCodeLength::TypeInfo::DecodableArgType); +typedef void (*CHIPDoorLockClusterNumberOfCredentialsSupportedPerUserAttributeCallbackType)( + void *, chip::app::Clusters::DoorLock::Attributes::NumberOfCredentialsSupportedPerUser::TypeInfo::DecodableArgType); typedef void (*CHIPDoorLockClusterLanguageAttributeCallbackType)( void *, chip::app::Clusters::DoorLock::Attributes::Language::TypeInfo::DecodableArgType); typedef void (*CHIPDoorLockClusterAutoRelockTimeAttributeCallbackType)( diff --git a/src/controller/java/zap-generated/CHIPInvokeCallbacks.cpp b/src/controller/java/zap-generated/CHIPInvokeCallbacks.cpp index 61111bd89a91be..26a5f3a9c98474 100644 --- a/src/controller/java/zap-generated/CHIPInvokeCallbacks.cpp +++ b/src/controller/java/zap-generated/CHIPInvokeCallbacks.cpp @@ -422,8 +422,9 @@ void CHIPDoorLockClusterGetCredentialStatusResponseCallback::CallbackFn( // Java callback is allowed to be null, exit early if this is the case. VerifyOrReturn(javaCallbackRef != nullptr); - err = JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", - "(Ljava/lang/Boolean;Ljava/lang/Integer;Ljava/lang/Integer;)V", &javaMethod); + err = JniReferences::GetInstance().FindMethod( + env, javaCallbackRef, "onSuccess", + "(Ljava/lang/Boolean;Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Integer;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error invoking Java callback: %s", ErrorStr(err))); jobject credentialExists; @@ -443,6 +444,32 @@ void CHIPDoorLockClusterGetCredentialStatusResponseCallback::CallbackFn( chip::JniReferences::GetInstance().CreateBoxedObject(userIndexClassName.c_str(), userIndexCtorSignature.c_str(), dataResponse.userIndex.Value(), userIndex); } + jobject creatorFabricIndex; + if (dataResponse.creatorFabricIndex.IsNull()) + { + creatorFabricIndex = nullptr; + } + else + { + std::string creatorFabricIndexClassName = "java/lang/Integer"; + std::string creatorFabricIndexCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(creatorFabricIndexClassName.c_str(), + creatorFabricIndexCtorSignature.c_str(), + dataResponse.creatorFabricIndex.Value(), creatorFabricIndex); + } + jobject lastModifiedFabricIndex; + if (dataResponse.lastModifiedFabricIndex.IsNull()) + { + lastModifiedFabricIndex = nullptr; + } + else + { + std::string lastModifiedFabricIndexClassName = "java/lang/Integer"; + std::string lastModifiedFabricIndexCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject( + lastModifiedFabricIndexClassName.c_str(), lastModifiedFabricIndexCtorSignature.c_str(), + dataResponse.lastModifiedFabricIndex.Value(), lastModifiedFabricIndex); + } jobject nextCredentialIndex; if (dataResponse.nextCredentialIndex.IsNull()) { @@ -457,7 +484,8 @@ void CHIPDoorLockClusterGetCredentialStatusResponseCallback::CallbackFn( dataResponse.nextCredentialIndex.Value(), nextCredentialIndex); } - env->CallVoidMethod(javaCallbackRef, javaMethod, credentialExists, userIndex, nextCredentialIndex); + env->CallVoidMethod(javaCallbackRef, javaMethod, credentialExists, userIndex, creatorFabricIndex, lastModifiedFabricIndex, + nextCredentialIndex); } CHIPDoorLockClusterGetHolidayScheduleResponseCallback::CHIPDoorLockClusterGetHolidayScheduleResponseCallback(jobject javaCallback) : Callback::Callback(CallbackFn, this) diff --git a/src/controller/java/zap-generated/chip/devicecontroller/ChipClusters.java b/src/controller/java/zap-generated/chip/devicecontroller/ChipClusters.java index f37efa633fb75b..763ac19fcab110 100644 --- a/src/controller/java/zap-generated/chip/devicecontroller/ChipClusters.java +++ b/src/controller/java/zap-generated/chip/devicecontroller/ChipClusters.java @@ -6321,6 +6321,8 @@ public interface GetCredentialStatusResponseCallback { void onSuccess( Boolean credentialExists, @Nullable Integer userIndex, + @Nullable Integer creatorFabricIndex, + @Nullable Integer lastModifiedFabricIndex, @Nullable Integer nextCredentialIndex); void onError(Exception error); @@ -6559,6 +6561,17 @@ public void subscribeMinRFIDCodeLengthAttribute( subscribeMinRFIDCodeLengthAttribute(chipClusterPtr, callback, minInterval, maxInterval); } + public void readNumberOfCredentialsSupportedPerUserAttribute( + IntegerAttributeCallback callback) { + readNumberOfCredentialsSupportedPerUserAttribute(chipClusterPtr, callback); + } + + public void subscribeNumberOfCredentialsSupportedPerUserAttribute( + IntegerAttributeCallback callback, int minInterval, int maxInterval) { + subscribeNumberOfCredentialsSupportedPerUserAttribute( + chipClusterPtr, callback, minInterval, maxInterval); + } + public void readLanguageAttribute(CharStringAttributeCallback callback) { readLanguageAttribute(chipClusterPtr, callback); } @@ -6852,6 +6865,12 @@ private native void readMinRFIDCodeLengthAttribute( private native void subscribeMinRFIDCodeLengthAttribute( long chipClusterPtr, IntegerAttributeCallback callback, int minInterval, int maxInterval); + private native void readNumberOfCredentialsSupportedPerUserAttribute( + long chipClusterPtr, IntegerAttributeCallback callback); + + private native void subscribeNumberOfCredentialsSupportedPerUserAttribute( + long chipClusterPtr, IntegerAttributeCallback callback, int minInterval, int maxInterval); + private native void readLanguageAttribute( long chipClusterPtr, CharStringAttributeCallback callback); diff --git a/src/controller/java/zap-generated/chip/devicecontroller/ChipIdLookup.java b/src/controller/java/zap-generated/chip/devicecontroller/ChipIdLookup.java index f3fdffaa90f5ae..22e22936d8600d 100644 --- a/src/controller/java/zap-generated/chip/devicecontroller/ChipIdLookup.java +++ b/src/controller/java/zap-generated/chip/devicecontroller/ChipIdLookup.java @@ -919,6 +919,9 @@ public static String attributeIdToName(long clusterId, long attributeId) { if (attributeId == 26L) { return "MinRFIDCodeLength"; } + if (attributeId == 28L) { + return "NumberOfCredentialsSupportedPerUser"; + } if (attributeId == 33L) { return "Language"; } diff --git a/src/controller/java/zap-generated/chip/devicecontroller/ClusterInfoMapping.java b/src/controller/java/zap-generated/chip/devicecontroller/ClusterInfoMapping.java index b4ae15ef4fb6c2..0c8c80cf65fd79 100644 --- a/src/controller/java/zap-generated/chip/devicecontroller/ClusterInfoMapping.java +++ b/src/controller/java/zap-generated/chip/devicecontroller/ClusterInfoMapping.java @@ -2018,6 +2018,8 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { public void onSuccess( Boolean credentialExists, @Nullable Integer userIndex, + @Nullable Integer creatorFabricIndex, + @Nullable Integer lastModifiedFabricIndex, @Nullable Integer nextCredentialIndex) { Map responseValues = new LinkedHashMap<>(); CommandResponseInfo credentialExistsResponseValue = @@ -2025,6 +2027,12 @@ public void onSuccess( responseValues.put(credentialExistsResponseValue, credentialExists); CommandResponseInfo userIndexResponseValue = new CommandResponseInfo("userIndex", "Integer"); responseValues.put(userIndexResponseValue, userIndex); + CommandResponseInfo creatorFabricIndexResponseValue = + new CommandResponseInfo("creatorFabricIndex", "Integer"); + responseValues.put(creatorFabricIndexResponseValue, creatorFabricIndex); + CommandResponseInfo lastModifiedFabricIndexResponseValue = + new CommandResponseInfo("lastModifiedFabricIndex", "Integer"); + responseValues.put(lastModifiedFabricIndexResponseValue, lastModifiedFabricIndex); CommandResponseInfo nextCredentialIndexResponseValue = new CommandResponseInfo("nextCredentialIndex", "Integer"); responseValues.put(nextCredentialIndexResponseValue, nextCredentialIndex); diff --git a/src/controller/java/zap-generated/chip/devicecontroller/ClusterReadMapping.java b/src/controller/java/zap-generated/chip/devicecontroller/ClusterReadMapping.java index 08984c7c335d86..382a9aaec91352 100644 --- a/src/controller/java/zap-generated/chip/devicecontroller/ClusterReadMapping.java +++ b/src/controller/java/zap-generated/chip/devicecontroller/ClusterReadMapping.java @@ -2910,6 +2910,20 @@ public Map> getReadAttributeMap() { readDoorLockMinRFIDCodeLengthCommandParams); readDoorLockInteractionInfo.put( "readMinRFIDCodeLengthAttribute", readDoorLockMinRFIDCodeLengthAttributeInteractionInfo); + Map readDoorLockNumberOfCredentialsSupportedPerUserCommandParams = + new LinkedHashMap(); + InteractionInfo readDoorLockNumberOfCredentialsSupportedPerUserAttributeInteractionInfo = + new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.DoorLockCluster) cluster) + .readNumberOfCredentialsSupportedPerUserAttribute( + (ChipClusters.IntegerAttributeCallback) callback); + }, + () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), + readDoorLockNumberOfCredentialsSupportedPerUserCommandParams); + readDoorLockInteractionInfo.put( + "readNumberOfCredentialsSupportedPerUserAttribute", + readDoorLockNumberOfCredentialsSupportedPerUserAttributeInteractionInfo); Map readDoorLockLanguageCommandParams = new LinkedHashMap(); InteractionInfo readDoorLockLanguageAttributeInteractionInfo = diff --git a/src/controller/python/chip/clusters/CHIPClusters.py b/src/controller/python/chip/clusters/CHIPClusters.py index c15a0ea54f85ae..483b060c9b45e4 100644 --- a/src/controller/python/chip/clusters/CHIPClusters.py +++ b/src/controller/python/chip/clusters/CHIPClusters.py @@ -2096,6 +2096,12 @@ class ChipClusters: "type": "int", "reportable": True, }, + 0x0000001C: { + "attributeName": "NumberOfCredentialsSupportedPerUser", + "attributeId": 0x0000001C, + "type": "int", + "reportable": True, + }, 0x00000021: { "attributeName": "Language", "attributeId": 0x00000021, diff --git a/src/controller/python/chip/clusters/Objects.py b/src/controller/python/chip/clusters/Objects.py index 0d10f97f0ed423..f8bea1b677e4e0 100644 --- a/src/controller/python/chip/clusters/Objects.py +++ b/src/controller/python/chip/clusters/Objects.py @@ -16186,6 +16186,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="maxRFIDCodeLength", Tag=0x00000019, Type=typing.Optional[uint]), ClusterObjectFieldDescriptor(Label="minRFIDCodeLength", Tag=0x0000001A, Type=typing.Optional[uint]), ClusterObjectFieldDescriptor(Label="credentialRulesSupport", Tag=0x0000001B, Type=typing.Optional[uint]), + ClusterObjectFieldDescriptor(Label="numberOfCredentialsSupportedPerUser", Tag=0x0000001C, Type=typing.Optional[uint]), ClusterObjectFieldDescriptor(Label="enableLogging", Tag=0x00000020, Type=typing.Optional[bool]), ClusterObjectFieldDescriptor(Label="language", Tag=0x00000021, Type=typing.Optional[str]), ClusterObjectFieldDescriptor(Label="LEDSettings", Tag=0x00000022, Type=typing.Optional[uint]), @@ -16238,6 +16239,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: maxRFIDCodeLength: 'typing.Optional[uint]' = None minRFIDCodeLength: 'typing.Optional[uint]' = None credentialRulesSupport: 'typing.Optional[uint]' = None + numberOfCredentialsSupportedPerUser: 'typing.Optional[uint]' = None enableLogging: 'typing.Optional[bool]' = None language: 'typing.Optional[str]' = None LEDSettings: 'typing.Optional[uint]' = None @@ -16374,6 +16376,7 @@ class DlStatus(IntEnum): kDuplicate = 0x02 kOccupied = 0x03 kInvalidField = 0x85 + kResourceExhausted = 0x89 kNotFound = 0x8B class DlUserStatus(IntEnum): @@ -17319,11 +17322,15 @@ def descriptor(cls) -> ClusterObjectDescriptor: Fields = [ ClusterObjectFieldDescriptor(Label="credentialExists", Tag=0, Type=bool), ClusterObjectFieldDescriptor(Label="userIndex", Tag=1, Type=typing.Union[Nullable, uint]), - ClusterObjectFieldDescriptor(Label="nextCredentialIndex", Tag=2, Type=typing.Union[Nullable, uint]), + ClusterObjectFieldDescriptor(Label="creatorFabricIndex", Tag=2, Type=typing.Union[Nullable, uint]), + ClusterObjectFieldDescriptor(Label="lastModifiedFabricIndex", Tag=3, Type=typing.Union[Nullable, uint]), + ClusterObjectFieldDescriptor(Label="nextCredentialIndex", Tag=4, Type=typing.Union[Nullable, uint]), ]) credentialExists: 'bool' = False userIndex: 'typing.Union[Nullable, uint]' = NullValue + creatorFabricIndex: 'typing.Union[Nullable, uint]' = NullValue + lastModifiedFabricIndex: 'typing.Union[Nullable, uint]' = NullValue nextCredentialIndex: 'typing.Union[Nullable, uint]' = NullValue @dataclass @@ -17651,6 +17658,22 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: value: 'typing.Optional[uint]' = None + @dataclass + class NumberOfCredentialsSupportedPerUser(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x0101 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x0000001C + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) + + value: 'typing.Optional[uint]' = None + @dataclass class EnableLogging(ClusterAttributeDescriptor): @ChipUtility.classproperty diff --git a/src/darwin/Framework/CHIP/zap-generated/CHIPAttributeTLVValueDecoder.mm b/src/darwin/Framework/CHIP/zap-generated/CHIPAttributeTLVValueDecoder.mm index 44e2b1fa71d82e..483de5942c055e 100644 --- a/src/darwin/Framework/CHIP/zap-generated/CHIPAttributeTLVValueDecoder.mm +++ b/src/darwin/Framework/CHIP/zap-generated/CHIPAttributeTLVValueDecoder.mm @@ -4177,6 +4177,17 @@ id CHIPDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader value = [NSNumber numberWithUnsignedChar:cppValue.Raw()]; return value; } + case Attributes::NumberOfCredentialsSupportedPerUser::Id: { + using TypeInfo = Attributes::NumberOfCredentialsSupportedPerUser::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedChar:cppValue]; + return value; + } case Attributes::EnableLogging::Id: { using TypeInfo = Attributes::EnableLogging::TypeInfo; TypeInfo::DecodableType cppValue; diff --git a/src/darwin/Framework/CHIP/zap-generated/CHIPCallbackBridge.mm b/src/darwin/Framework/CHIP/zap-generated/CHIPCallbackBridge.mm index 817d2392560743..2d1b2d81a365c3 100644 --- a/src/darwin/Framework/CHIP/zap-generated/CHIPCallbackBridge.mm +++ b/src/darwin/Framework/CHIP/zap-generated/CHIPCallbackBridge.mm @@ -12001,6 +12001,20 @@ response.userIndex = [NSNumber numberWithUnsignedShort:data.userIndex.Value()]; } } + { + if (data.creatorFabricIndex.IsNull()) { + response.creatorFabricIndex = nil; + } else { + response.creatorFabricIndex = [NSNumber numberWithUnsignedChar:data.creatorFabricIndex.Value()]; + } + } + { + if (data.lastModifiedFabricIndex.IsNull()) { + response.lastModifiedFabricIndex = nil; + } else { + response.lastModifiedFabricIndex = [NSNumber numberWithUnsignedChar:data.lastModifiedFabricIndex.Value()]; + } + } { if (data.nextCredentialIndex.IsNull()) { response.nextCredentialIndex = nil; @@ -12788,178 +12802,183 @@ void * context, const chip::app::Clusters::TestCluster::Commands::TestStructArrayArgumentResponse::DecodableType & data) { auto * response = [CHIPTestClusterClusterTestStructArrayArgumentResponseParams new]; - { { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = data.arg1.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - CHIPTestClusterClusterNestedStructList * newElement_0; - newElement_0 = [CHIPTestClusterClusterNestedStructList new]; - newElement_0.a = [NSNumber numberWithUnsignedChar:entry_0.a]; - newElement_0.b = [NSNumber numberWithBool:entry_0.b]; - newElement_0.c = [CHIPTestClusterClusterSimpleStruct new]; - newElement_0.c.a = [NSNumber numberWithUnsignedChar:entry_0.c.a]; - newElement_0.c.b = [NSNumber numberWithBool:entry_0.c.b]; - newElement_0.c.c = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_0.c.c)]; - newElement_0.c.d = [NSData dataWithBytes:entry_0.c.d.data() length:entry_0.c.d.size()]; - newElement_0.c.e = [[NSString alloc] initWithBytes:entry_0.c.e.data() - length:entry_0.c.e.size() - encoding:NSUTF8StringEncoding]; - newElement_0.c.f = [NSNumber numberWithUnsignedChar:entry_0.c.f.Raw()]; - newElement_0.c.g = [NSNumber numberWithFloat:entry_0.c.g]; - newElement_0.c.h = [NSNumber numberWithDouble:entry_0.c.h]; + { { // Scope for our temporary variables - auto * array_2 = [NSMutableArray new]; - auto iter_2 = entry_0.d.begin(); - while (iter_2.Next()) { - auto & entry_2 = iter_2.GetValue(); - CHIPTestClusterClusterSimpleStruct * newElement_2; - newElement_2 = [CHIPTestClusterClusterSimpleStruct new]; - newElement_2.a = [NSNumber numberWithUnsignedChar:entry_2.a]; - newElement_2.b = [NSNumber numberWithBool:entry_2.b]; - newElement_2.c = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_2.c)]; - newElement_2.d = [NSData dataWithBytes:entry_2.d.data() length:entry_2.d.size()]; - newElement_2.e = [[NSString alloc] initWithBytes:entry_2.e.data() - length:entry_2.e.size() - encoding:NSUTF8StringEncoding]; - newElement_2.f = [NSNumber numberWithUnsignedChar:entry_2.f.Raw()]; - newElement_2.g = [NSNumber numberWithFloat:entry_2.g]; - newElement_2.h = [NSNumber numberWithDouble:entry_2.h]; - [array_2 addObject:newElement_2]; + auto * array_0 = [NSMutableArray new]; + auto iter_0 = data.arg1.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + CHIPTestClusterClusterNestedStructList * newElement_0; + newElement_0 = [CHIPTestClusterClusterNestedStructList new]; + newElement_0.a = [NSNumber numberWithUnsignedChar:entry_0.a]; + newElement_0.b = [NSNumber numberWithBool:entry_0.b]; + newElement_0.c = [CHIPTestClusterClusterSimpleStruct new]; + newElement_0.c.a = [NSNumber numberWithUnsignedChar:entry_0.c.a]; + newElement_0.c.b = [NSNumber numberWithBool:entry_0.c.b]; + newElement_0.c.c = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_0.c.c)]; + newElement_0.c.d = [NSData dataWithBytes:entry_0.c.d.data() length:entry_0.c.d.size()]; + newElement_0.c.e = [[NSString alloc] initWithBytes:entry_0.c.e.data() + length:entry_0.c.e.size() + encoding:NSUTF8StringEncoding]; + newElement_0.c.f = [NSNumber numberWithUnsignedChar:entry_0.c.f.Raw()]; + newElement_0.c.g = [NSNumber numberWithFloat:entry_0.c.g]; + newElement_0.c.h = [NSNumber numberWithDouble:entry_0.c.h]; + { // Scope for our temporary variables + auto * array_2 = [NSMutableArray new]; + auto iter_2 = entry_0.d.begin(); + while (iter_2.Next()) { + auto & entry_2 = iter_2.GetValue(); + CHIPTestClusterClusterSimpleStruct * newElement_2; + newElement_2 = [CHIPTestClusterClusterSimpleStruct new]; + newElement_2.a = [NSNumber numberWithUnsignedChar:entry_2.a]; + newElement_2.b = [NSNumber numberWithBool:entry_2.b]; + newElement_2.c = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_2.c)]; + newElement_2.d = [NSData dataWithBytes:entry_2.d.data() length:entry_2.d.size()]; + newElement_2.e = [[NSString alloc] initWithBytes:entry_2.e.data() + length:entry_2.e.size() + encoding:NSUTF8StringEncoding]; + newElement_2.f = [NSNumber numberWithUnsignedChar:entry_2.f.Raw()]; + newElement_2.g = [NSNumber numberWithFloat:entry_2.g]; + newElement_2.h = [NSNumber numberWithDouble:entry_2.h]; + [array_2 addObject:newElement_2]; + } + CHIP_ERROR err = iter_2.GetStatus(); + if (err != CHIP_NO_ERROR) { + OnFailureFn(context, err); + return; + } + newElement_0.d = array_2; + } + { // Scope for our temporary variables + auto * array_2 = [NSMutableArray new]; + auto iter_2 = entry_0.e.begin(); + while (iter_2.Next()) { + auto & entry_2 = iter_2.GetValue(); + NSNumber * newElement_2; + newElement_2 = [NSNumber numberWithUnsignedInt:entry_2]; + [array_2 addObject:newElement_2]; + } + CHIP_ERROR err = iter_2.GetStatus(); + if (err != CHIP_NO_ERROR) { + OnFailureFn(context, err); + return; + } + newElement_0.e = array_2; + } + { // Scope for our temporary variables + auto * array_2 = [NSMutableArray new]; + auto iter_2 = entry_0.f.begin(); + while (iter_2.Next()) { + auto & entry_2 = iter_2.GetValue(); + NSData * newElement_2; + newElement_2 = [NSData dataWithBytes:entry_2.data() length:entry_2.size()]; + [array_2 addObject:newElement_2]; + } + CHIP_ERROR err = iter_2.GetStatus(); + if (err != CHIP_NO_ERROR) { + OnFailureFn(context, err); + return; + } + newElement_0.f = array_2; + } + { // Scope for our temporary variables + auto * array_2 = [NSMutableArray new]; + auto iter_2 = entry_0.g.begin(); + while (iter_2.Next()) { + auto & entry_2 = iter_2.GetValue(); + NSNumber * newElement_2; + newElement_2 = [NSNumber numberWithUnsignedChar:entry_2]; + [array_2 addObject:newElement_2]; + } + CHIP_ERROR err = iter_2.GetStatus(); + if (err != CHIP_NO_ERROR) { + OnFailureFn(context, err); + return; + } + newElement_0.g = array_2; + } + [array_0 addObject:newElement_0]; } - CHIP_ERROR err = iter_2.GetStatus(); + CHIP_ERROR err = iter_0.GetStatus(); if (err != CHIP_NO_ERROR) { OnFailureFn(context, err); return; } - newElement_0.d = array_2; + response.arg1 = array_0; } + } + { { // Scope for our temporary variables - auto * array_2 = [NSMutableArray new]; - auto iter_2 = entry_0.e.begin(); - while (iter_2.Next()) { - auto & entry_2 = iter_2.GetValue(); - NSNumber * newElement_2; - newElement_2 = [NSNumber numberWithUnsignedInt:entry_2]; - [array_2 addObject:newElement_2]; + auto * array_0 = [NSMutableArray new]; + auto iter_0 = data.arg2.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + CHIPTestClusterClusterSimpleStruct * newElement_0; + newElement_0 = [CHIPTestClusterClusterSimpleStruct new]; + newElement_0.a = [NSNumber numberWithUnsignedChar:entry_0.a]; + newElement_0.b = [NSNumber numberWithBool:entry_0.b]; + newElement_0.c = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_0.c)]; + newElement_0.d = [NSData dataWithBytes:entry_0.d.data() length:entry_0.d.size()]; + newElement_0.e = [[NSString alloc] initWithBytes:entry_0.e.data() + length:entry_0.e.size() + encoding:NSUTF8StringEncoding]; + newElement_0.f = [NSNumber numberWithUnsignedChar:entry_0.f.Raw()]; + newElement_0.g = [NSNumber numberWithFloat:entry_0.g]; + newElement_0.h = [NSNumber numberWithDouble:entry_0.h]; + [array_0 addObject:newElement_0]; } - CHIP_ERROR err = iter_2.GetStatus(); + CHIP_ERROR err = iter_0.GetStatus(); if (err != CHIP_NO_ERROR) { OnFailureFn(context, err); return; } - newElement_0.e = array_2; + response.arg2 = array_0; } + } + { { // Scope for our temporary variables - auto * array_2 = [NSMutableArray new]; - auto iter_2 = entry_0.f.begin(); - while (iter_2.Next()) { - auto & entry_2 = iter_2.GetValue(); - NSData * newElement_2; - newElement_2 = [NSData dataWithBytes:entry_2.data() length:entry_2.size()]; - [array_2 addObject:newElement_2]; + auto * array_0 = [NSMutableArray new]; + auto iter_0 = data.arg3.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_0)]; + [array_0 addObject:newElement_0]; } - CHIP_ERROR err = iter_2.GetStatus(); + CHIP_ERROR err = iter_0.GetStatus(); if (err != CHIP_NO_ERROR) { OnFailureFn(context, err); return; } - newElement_0.f = array_2; + response.arg3 = array_0; } + } + { { // Scope for our temporary variables - auto * array_2 = [NSMutableArray new]; - auto iter_2 = entry_0.g.begin(); - while (iter_2.Next()) { - auto & entry_2 = iter_2.GetValue(); - NSNumber * newElement_2; - newElement_2 = [NSNumber numberWithUnsignedChar:entry_2]; - [array_2 addObject:newElement_2]; + auto * array_0 = [NSMutableArray new]; + auto iter_0 = data.arg4.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithBool:entry_0]; + [array_0 addObject:newElement_0]; } - CHIP_ERROR err = iter_2.GetStatus(); + CHIP_ERROR err = iter_0.GetStatus(); if (err != CHIP_NO_ERROR) { OnFailureFn(context, err); return; } - newElement_0.g = array_2; + response.arg4 = array_0; } - [array_0 addObject:newElement_0]; } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - OnFailureFn(context, err); - return; + { + response.arg5 = [NSNumber numberWithUnsignedChar:chip::to_underlying(data.arg5)]; } - response.arg1 = array_0; -} -} -{ { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; -auto iter_0 = data.arg2.begin(); -while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - CHIPTestClusterClusterSimpleStruct * newElement_0; - newElement_0 = [CHIPTestClusterClusterSimpleStruct new]; - newElement_0.a = [NSNumber numberWithUnsignedChar:entry_0.a]; - newElement_0.b = [NSNumber numberWithBool:entry_0.b]; - newElement_0.c = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_0.c)]; - newElement_0.d = [NSData dataWithBytes:entry_0.d.data() length:entry_0.d.size()]; - newElement_0.e = [[NSString alloc] initWithBytes:entry_0.e.data() length:entry_0.e.size() encoding:NSUTF8StringEncoding]; - newElement_0.f = [NSNumber numberWithUnsignedChar:entry_0.f.Raw()]; - newElement_0.g = [NSNumber numberWithFloat:entry_0.g]; - newElement_0.h = [NSNumber numberWithDouble:entry_0.h]; - [array_0 addObject:newElement_0]; -} -CHIP_ERROR err = iter_0.GetStatus(); -if (err != CHIP_NO_ERROR) { - OnFailureFn(context, err); - return; -} -response.arg2 = array_0; -} -} -{ { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; -auto iter_0 = data.arg3.begin(); -while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_0)]; - [array_0 addObject:newElement_0]; -} -CHIP_ERROR err = iter_0.GetStatus(); -if (err != CHIP_NO_ERROR) { - OnFailureFn(context, err); - return; -} -response.arg3 = array_0; -} -} -{ { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; -auto iter_0 = data.arg4.begin(); -while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithBool:entry_0]; - [array_0 addObject:newElement_0]; -} -CHIP_ERROR err = iter_0.GetStatus(); -if (err != CHIP_NO_ERROR) { - OnFailureFn(context, err); - return; -} -response.arg4 = array_0; -} -} -{ - response.arg5 = [NSNumber numberWithUnsignedChar:chip::to_underlying(data.arg5)]; -} -{ - response.arg6 = [NSNumber numberWithBool:data.arg6]; -} -DispatchSuccess(context, response); -} -; + { + response.arg6 = [NSNumber numberWithBool:data.arg6]; + } + DispatchSuccess(context, response); +}; void CHIPTestClusterClusterTestListInt8UReverseResponseCallbackBridge::OnSuccessFn( void * context, const chip::app::Clusters::TestCluster::Commands::TestListInt8UReverseResponse::DecodableType & data) diff --git a/src/darwin/Framework/CHIP/zap-generated/CHIPClustersObjc.h b/src/darwin/Framework/CHIP/zap-generated/CHIPClustersObjc.h index f1dab3c740d003..e1a4dd097c2b03 100644 --- a/src/darwin/Framework/CHIP/zap-generated/CHIPClustersObjc.h +++ b/src/darwin/Framework/CHIP/zap-generated/CHIPClustersObjc.h @@ -4961,6 +4961,25 @@ NS_ASSUME_NONNULL_BEGIN completionHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeNumberOfCredentialsSupportedPerUserWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +/** + * This API does not support setting autoResubscribe to NO in the + * CHIPSubscribeParams. + */ +- (void)subscribeAttributeNumberOfCredentialsSupportedPerUserWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler; ++ (void)readAttributeNumberOfCredentialsSupportedPerUserWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; + - (void)readAttributeEnableLoggingWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; - (void)writeAttributeEnableLoggingWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; @@ -21946,6 +21965,7 @@ typedef NS_ENUM(uint8_t, CHIPDoorLockDlStatus) { CHIPDoorLockDlStatusDuplicate = 0x02, CHIPDoorLockDlStatusOccupied = 0x03, CHIPDoorLockDlStatusInvalidField = 0x85, + CHIPDoorLockDlStatusResourceExhausted = 0x89, CHIPDoorLockDlStatusNotFound = 0x8B, }; diff --git a/src/darwin/Framework/CHIP/zap-generated/CHIPClustersObjc.mm b/src/darwin/Framework/CHIP/zap-generated/CHIPClustersObjc.mm index bc89c0ca1e6ecd..285eea4599b044 100644 --- a/src/darwin/Framework/CHIP/zap-generated/CHIPClustersObjc.mm +++ b/src/darwin/Framework/CHIP/zap-generated/CHIPClustersObjc.mm @@ -19672,6 +19672,69 @@ new CHIPDoorLockCredentialRulesSupportAttributeCallbackBridge( }); } +- (void)readAttributeNumberOfCredentialsSupportedPerUserWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + new CHIPInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = DoorLock::Attributes::NumberOfCredentialsSupportedPerUser::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)subscribeAttributeNumberOfCredentialsSupportedPerUserWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler +{ + new CHIPInt8uAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = DoorLock::Attributes::NumberOfCredentialsSupportedPerUser::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + CHIPInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + }, + subscriptionEstablishedHandler); +} + ++ (void)readAttributeNumberOfCredentialsSupportedPerUserWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + new CHIPInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = DoorLock::Attributes::NumberOfCredentialsSupportedPerUser::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + - (void)readAttributeEnableLoggingWithCompletionHandler:(void (^)( NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { diff --git a/src/darwin/Framework/CHIP/zap-generated/CHIPCommandPayloadsObjc.h b/src/darwin/Framework/CHIP/zap-generated/CHIPCommandPayloadsObjc.h index 3502942201ed46..b6c7b12d29b08d 100644 --- a/src/darwin/Framework/CHIP/zap-generated/CHIPCommandPayloadsObjc.h +++ b/src/darwin/Framework/CHIP/zap-generated/CHIPCommandPayloadsObjc.h @@ -4563,6 +4563,10 @@ NS_ASSUME_NONNULL_BEGIN @property (strong, nonatomic) NSNumber * _Nullable userIndex; +@property (strong, nonatomic) NSNumber * _Nullable creatorFabricIndex; + +@property (strong, nonatomic) NSNumber * _Nullable lastModifiedFabricIndex; + @property (strong, nonatomic) NSNumber * _Nullable nextCredentialIndex; /** * Controls whether the command is a timed command (using Timed Invoke). diff --git a/src/darwin/Framework/CHIP/zap-generated/CHIPCommandPayloadsObjc.mm b/src/darwin/Framework/CHIP/zap-generated/CHIPCommandPayloadsObjc.mm index 50a521fcc819f5..1c49bbc4a213f6 100644 --- a/src/darwin/Framework/CHIP/zap-generated/CHIPCommandPayloadsObjc.mm +++ b/src/darwin/Framework/CHIP/zap-generated/CHIPCommandPayloadsObjc.mm @@ -2642,6 +2642,10 @@ - (instancetype)init _userIndex = nil; + _creatorFabricIndex = nil; + + _lastModifiedFabricIndex = nil; + _nextCredentialIndex = nil; _timedInvokeTimeoutMs = nil; } diff --git a/zzz_generated/all-clusters-app/zap-generated/endpoint_config.h b/zzz_generated/all-clusters-app/zap-generated/endpoint_config.h index 4a06756f344352..2ebe66e31c5102 100644 --- a/zzz_generated/all-clusters-app/zap-generated/endpoint_config.h +++ b/zzz_generated/all-clusters-app/zap-generated/endpoint_config.h @@ -964,7 +964,7 @@ #define ZAP_ATTRIBUTE_MASK(mask) ATTRIBUTE_MASK_##mask // This is an array of EmberAfAttributeMetadata structures. -#define GENERATED_ATTRIBUTE_COUNT 663 +#define GENERATED_ATTRIBUTE_COUNT 664 #define GENERATED_ATTRIBUTES \ { \ \ @@ -1445,6 +1445,7 @@ { 0x00000019, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(20) }, /* MaxRFIDCodeLength */ \ { 0x0000001A, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(10) }, /* MinRFIDCodeLength */ \ { 0x0000001B, ZAP_TYPE(BITMAP8), 1, 0, ZAP_SIMPLE_DEFAULT(1) }, /* CredentialRulesSupport */ \ + { 0x0000001C, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(5) }, /* NumberOfCredentialsSupportedPerUser */ \ { 0x00000021, ZAP_TYPE(CHAR_STRING), 4, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(276) }, /* Language */ \ { 0x00000023, ZAP_TYPE(INT32U), 4, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(279) }, /* AutoRelockTime */ \ { 0x00000024, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ @@ -2927,8 +2928,8 @@ /* Endpoint: 1, Cluster: Door Lock (server) */ \ .clusterId = 0x00000101, \ .attributes = ZAP_ATTRIBUTE_INDEX(290), \ - .attributeCount = 32, \ - .clusterSize = 54, \ + .attributeCount = 33, \ + .clusterSize = 55, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(ATTRIBUTE_CHANGED_FUNCTION) | ZAP_CLUSTER_MASK(PRE_ATTRIBUTE_CHANGED_FUNCTION), \ .functions = chipFuncArrayDoorLockServer, \ .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 131 ) ,\ @@ -2937,7 +2938,7 @@ { \ /* Endpoint: 1, Cluster: Window Covering (server) */ \ .clusterId = 0x00000102, \ - .attributes = ZAP_ATTRIBUTE_INDEX(322), \ + .attributes = ZAP_ATTRIBUTE_INDEX(323), \ .attributeCount = 20, \ .clusterSize = 35, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(ATTRIBUTE_CHANGED_FUNCTION), \ @@ -2948,7 +2949,7 @@ { \ /* Endpoint: 1, Cluster: Barrier Control (server) */ \ .clusterId = 0x00000103, \ - .attributes = ZAP_ATTRIBUTE_INDEX(342), \ + .attributes = ZAP_ATTRIBUTE_INDEX(343), \ .attributeCount = 5, \ .clusterSize = 7, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -2959,7 +2960,7 @@ { \ /* Endpoint: 1, Cluster: Pump Configuration and Control (server) */ \ .clusterId = 0x00000200, \ - .attributes = ZAP_ATTRIBUTE_INDEX(347), \ + .attributes = ZAP_ATTRIBUTE_INDEX(348), \ .attributeCount = 26, \ .clusterSize = 54, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION) | ZAP_CLUSTER_MASK(ATTRIBUTE_CHANGED_FUNCTION), \ @@ -2970,7 +2971,7 @@ { \ /* Endpoint: 1, Cluster: Thermostat (server) */ \ .clusterId = 0x00000201, \ - .attributes = ZAP_ATTRIBUTE_INDEX(373), \ + .attributes = ZAP_ATTRIBUTE_INDEX(374), \ .attributeCount = 19, \ .clusterSize = 34, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ @@ -2981,7 +2982,7 @@ { \ /* Endpoint: 1, Cluster: Fan Control (server) */ \ .clusterId = 0x00000202, \ - .attributes = ZAP_ATTRIBUTE_INDEX(392), \ + .attributes = ZAP_ATTRIBUTE_INDEX(393), \ .attributeCount = 13, \ .clusterSize = 17, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -2992,7 +2993,7 @@ { \ /* Endpoint: 1, Cluster: Thermostat User Interface Configuration (server) */ \ .clusterId = 0x00000204, \ - .attributes = ZAP_ATTRIBUTE_INDEX(405), \ + .attributes = ZAP_ATTRIBUTE_INDEX(406), \ .attributeCount = 4, \ .clusterSize = 5, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(PRE_ATTRIBUTE_CHANGED_FUNCTION), \ @@ -3003,7 +3004,7 @@ { \ /* Endpoint: 1, Cluster: Color Control (server) */ \ .clusterId = 0x00000300, \ - .attributes = ZAP_ATTRIBUTE_INDEX(409), \ + .attributes = ZAP_ATTRIBUTE_INDEX(410), \ .attributeCount = 54, \ .clusterSize = 345, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ @@ -3014,7 +3015,7 @@ { \ /* Endpoint: 1, Cluster: Illuminance Measurement (server) */ \ .clusterId = 0x00000400, \ - .attributes = ZAP_ATTRIBUTE_INDEX(463), \ + .attributes = ZAP_ATTRIBUTE_INDEX(464), \ .attributeCount = 6, \ .clusterSize = 11, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -3025,7 +3026,7 @@ { \ /* Endpoint: 1, Cluster: Temperature Measurement (server) */ \ .clusterId = 0x00000402, \ - .attributes = ZAP_ATTRIBUTE_INDEX(469), \ + .attributes = ZAP_ATTRIBUTE_INDEX(470), \ .attributeCount = 5, \ .clusterSize = 10, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -3036,7 +3037,7 @@ { \ /* Endpoint: 1, Cluster: Pressure Measurement (server) */ \ .clusterId = 0x00000403, \ - .attributes = ZAP_ATTRIBUTE_INDEX(474), \ + .attributes = ZAP_ATTRIBUTE_INDEX(475), \ .attributeCount = 4, \ .clusterSize = 8, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -3047,7 +3048,7 @@ { \ /* Endpoint: 1, Cluster: Flow Measurement (server) */ \ .clusterId = 0x00000404, \ - .attributes = ZAP_ATTRIBUTE_INDEX(478), \ + .attributes = ZAP_ATTRIBUTE_INDEX(479), \ .attributeCount = 5, \ .clusterSize = 10, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -3058,7 +3059,7 @@ { \ /* Endpoint: 1, Cluster: Relative Humidity Measurement (server) */ \ .clusterId = 0x00000405, \ - .attributes = ZAP_ATTRIBUTE_INDEX(483), \ + .attributes = ZAP_ATTRIBUTE_INDEX(484), \ .attributeCount = 5, \ .clusterSize = 10, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -3069,7 +3070,7 @@ { \ /* Endpoint: 1, Cluster: Occupancy Sensing (server) */ \ .clusterId = 0x00000406, \ - .attributes = ZAP_ATTRIBUTE_INDEX(488), \ + .attributes = ZAP_ATTRIBUTE_INDEX(489), \ .attributeCount = 4, \ .clusterSize = 5, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ @@ -3080,7 +3081,7 @@ { \ /* Endpoint: 1, Cluster: IAS Zone (server) */ \ .clusterId = 0x00000500, \ - .attributes = ZAP_ATTRIBUTE_INDEX(492), \ + .attributes = ZAP_ATTRIBUTE_INDEX(493), \ .attributeCount = 6, \ .clusterSize = 16, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION) | ZAP_CLUSTER_MASK(PRE_ATTRIBUTE_CHANGED_FUNCTION) | ZAP_CLUSTER_MASK(MESSAGE_SENT_FUNCTION), \ @@ -3091,7 +3092,7 @@ { \ /* Endpoint: 1, Cluster: Wake on LAN (server) */ \ .clusterId = 0x00000503, \ - .attributes = ZAP_ATTRIBUTE_INDEX(498), \ + .attributes = ZAP_ATTRIBUTE_INDEX(499), \ .attributeCount = 2, \ .clusterSize = 35, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -3102,7 +3103,7 @@ { \ /* Endpoint: 1, Cluster: Channel (server) */ \ .clusterId = 0x00000504, \ - .attributes = ZAP_ATTRIBUTE_INDEX(500), \ + .attributes = ZAP_ATTRIBUTE_INDEX(501), \ .attributeCount = 2, \ .clusterSize = 2, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -3113,7 +3114,7 @@ { \ /* Endpoint: 1, Cluster: Target Navigator (server) */ \ .clusterId = 0x00000505, \ - .attributes = ZAP_ATTRIBUTE_INDEX(502), \ + .attributes = ZAP_ATTRIBUTE_INDEX(503), \ .attributeCount = 3, \ .clusterSize = 3, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -3124,7 +3125,7 @@ { \ /* Endpoint: 1, Cluster: Media Playback (server) */ \ .clusterId = 0x00000506, \ - .attributes = ZAP_ATTRIBUTE_INDEX(505), \ + .attributes = ZAP_ATTRIBUTE_INDEX(506), \ .attributeCount = 7, \ .clusterSize = 39, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -3135,7 +3136,7 @@ { \ /* Endpoint: 1, Cluster: Media Input (server) */ \ .clusterId = 0x00000507, \ - .attributes = ZAP_ATTRIBUTE_INDEX(512), \ + .attributes = ZAP_ATTRIBUTE_INDEX(513), \ .attributeCount = 3, \ .clusterSize = 3, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -3146,7 +3147,7 @@ { \ /* Endpoint: 1, Cluster: Low Power (server) */ \ .clusterId = 0x00000508, \ - .attributes = ZAP_ATTRIBUTE_INDEX(515), \ + .attributes = ZAP_ATTRIBUTE_INDEX(516), \ .attributeCount = 1, \ .clusterSize = 2, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -3157,7 +3158,7 @@ { \ /* Endpoint: 1, Cluster: Keypad Input (server) */ \ .clusterId = 0x00000509, \ - .attributes = ZAP_ATTRIBUTE_INDEX(516), \ + .attributes = ZAP_ATTRIBUTE_INDEX(517), \ .attributeCount = 1, \ .clusterSize = 2, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -3168,7 +3169,7 @@ { \ /* Endpoint: 1, Cluster: Content Launcher (server) */ \ .clusterId = 0x0000050A, \ - .attributes = ZAP_ATTRIBUTE_INDEX(517), \ + .attributes = ZAP_ATTRIBUTE_INDEX(518), \ .attributeCount = 3, \ .clusterSize = 6, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -3179,7 +3180,7 @@ { \ /* Endpoint: 1, Cluster: Audio Output (server) */ \ .clusterId = 0x0000050B, \ - .attributes = ZAP_ATTRIBUTE_INDEX(520), \ + .attributes = ZAP_ATTRIBUTE_INDEX(521), \ .attributeCount = 3, \ .clusterSize = 3, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -3190,7 +3191,7 @@ { \ /* Endpoint: 1, Cluster: Application Launcher (server) */ \ .clusterId = 0x0000050C, \ - .attributes = ZAP_ATTRIBUTE_INDEX(523), \ + .attributes = ZAP_ATTRIBUTE_INDEX(524), \ .attributeCount = 2, \ .clusterSize = 2, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -3201,7 +3202,7 @@ { \ /* Endpoint: 1, Cluster: Application Basic (server) */ \ .clusterId = 0x0000050D, \ - .attributes = ZAP_ATTRIBUTE_INDEX(525), \ + .attributes = ZAP_ATTRIBUTE_INDEX(526), \ .attributeCount = 8, \ .clusterSize = 106, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -3212,7 +3213,7 @@ { \ /* Endpoint: 1, Cluster: Account Login (server) */ \ .clusterId = 0x0000050E, \ - .attributes = ZAP_ATTRIBUTE_INDEX(533), \ + .attributes = ZAP_ATTRIBUTE_INDEX(534), \ .attributeCount = 1, \ .clusterSize = 2, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -3223,7 +3224,7 @@ { \ /* Endpoint: 1, Cluster: Test Cluster (server) */ \ .clusterId = 0x0000050F, \ - .attributes = ZAP_ATTRIBUTE_INDEX(534), \ + .attributes = ZAP_ATTRIBUTE_INDEX(535), \ .attributeCount = 81, \ .clusterSize = 2285, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -3234,7 +3235,7 @@ { \ /* Endpoint: 1, Cluster: Electrical Measurement (server) */ \ .clusterId = 0x00000B04, \ - .attributes = ZAP_ATTRIBUTE_INDEX(615), \ + .attributes = ZAP_ATTRIBUTE_INDEX(616), \ .attributeCount = 12, \ .clusterSize = 28, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -3245,7 +3246,7 @@ { \ /* Endpoint: 2, Cluster: Groups (server) */ \ .clusterId = 0x00000004, \ - .attributes = ZAP_ATTRIBUTE_INDEX(627), \ + .attributes = ZAP_ATTRIBUTE_INDEX(628), \ .attributeCount = 2, \ .clusterSize = 3, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ @@ -3256,7 +3257,7 @@ { \ /* Endpoint: 2, Cluster: On/Off (server) */ \ .clusterId = 0x00000006, \ - .attributes = ZAP_ATTRIBUTE_INDEX(629), \ + .attributes = ZAP_ATTRIBUTE_INDEX(630), \ .attributeCount = 7, \ .clusterSize = 13, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ @@ -3267,7 +3268,7 @@ { \ /* Endpoint: 2, Cluster: Descriptor (server) */ \ .clusterId = 0x0000001D, \ - .attributes = ZAP_ATTRIBUTE_INDEX(636), \ + .attributes = ZAP_ATTRIBUTE_INDEX(637), \ .attributeCount = 5, \ .clusterSize = 0, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -3278,7 +3279,7 @@ { \ /* Endpoint: 2, Cluster: Power Source (server) */ \ .clusterId = 0x0000002F, \ - .attributes = ZAP_ATTRIBUTE_INDEX(641), \ + .attributes = ZAP_ATTRIBUTE_INDEX(642), \ .attributeCount = 8, \ .clusterSize = 72, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -3289,7 +3290,7 @@ { \ /* Endpoint: 2, Cluster: Occupancy Sensing (server) */ \ .clusterId = 0x00000406, \ - .attributes = ZAP_ATTRIBUTE_INDEX(649), \ + .attributes = ZAP_ATTRIBUTE_INDEX(650), \ .attributeCount = 4, \ .clusterSize = 5, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ @@ -3300,7 +3301,7 @@ { \ /* Endpoint: 65534, Cluster: Network Commissioning (server) */ \ .clusterId = 0x00000031, \ - .attributes = ZAP_ATTRIBUTE_INDEX(653), \ + .attributes = ZAP_ATTRIBUTE_INDEX(654), \ .attributeCount = 10, \ .clusterSize = 0, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -3319,7 +3320,7 @@ // This is an array of EmberAfEndpointType structures. #define GENERATED_ENDPOINT_TYPES \ { \ - { ZAP_CLUSTER_INDEX(0), 27, 522 }, { ZAP_CLUSTER_INDEX(27), 45, 3338 }, { ZAP_CLUSTER_INDEX(72), 5, 93 }, \ + { ZAP_CLUSTER_INDEX(0), 27, 522 }, { ZAP_CLUSTER_INDEX(27), 45, 3339 }, { ZAP_CLUSTER_INDEX(72), 5, 93 }, \ { ZAP_CLUSTER_INDEX(77), 1, 0 }, \ } @@ -3332,7 +3333,7 @@ static_assert(ATTRIBUTE_LARGEST <= CHIP_CONFIG_MAX_ATTRIBUTE_STORE_ELEMENT_SIZE, #define ATTRIBUTE_SINGLETONS_SIZE (37) // Total size of attribute storage -#define ATTRIBUTE_MAX_SIZE (3953) +#define ATTRIBUTE_MAX_SIZE (3954) // Number of fixed endpoints #define FIXED_ENDPOINT_COUNT (4) diff --git a/zzz_generated/app-common/app-common/zap-generated/attribute-id.h b/zzz_generated/app-common/app-common/zap-generated/attribute-id.h index 099f517886e0e0..4213e07e24487b 100644 --- a/zzz_generated/app-common/app-common/zap-generated/attribute-id.h +++ b/zzz_generated/app-common/app-common/zap-generated/attribute-id.h @@ -708,6 +708,7 @@ #define ZCL_MAX_RFID_CODE_LENGTH_ATTRIBUTE_ID (0x0019) #define ZCL_MIN_RFID_CODE_LENGTH_ATTRIBUTE_ID (0x001A) #define ZCL_CREDENTIAL_RULES_SUPPORT_ATTRIBUTE_ID (0x001B) +#define ZCL_NUM_CREDENTIALS_SUPPORTED_PER_USER_ATTRIBUTE_ID (0x001C) #define ZCL_ENABLE_LOGGING_ATTRIBUTE_ID (0x0020) #define ZCL_LANGUAGE_ATTRIBUTE_ID (0x0021) #define ZCL_LED_SETTINGS_ATTRIBUTE_ID (0x0022) 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 9c0090caf84cbd..07cc2a2c187fba 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 @@ -14544,6 +14544,37 @@ EmberAfStatus Set(chip::EndpointId endpoint, chip::BitFlags; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); + EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::DoorLock::Id, Id, readable, sizeof(temp)); + VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = Traits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::DoorLock::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); +} + +} // namespace NumberOfCredentialsSupportedPerUser + namespace EnableLogging { EmberAfStatus Get(chip::EndpointId endpoint, bool * 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 7af5e3a658fea8..9db09920be08bc 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 @@ -2601,6 +2601,11 @@ EmberAfStatus Get(chip::EndpointId endpoint, EmberAfStatus Set(chip::EndpointId endpoint, chip::BitFlags value); } // namespace CredentialRulesSupport +namespace NumberOfCredentialsSupportedPerUser { +EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value); // int8u +EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value); +} // namespace NumberOfCredentialsSupportedPerUser + namespace EnableLogging { EmberAfStatus Get(chip::EndpointId endpoint, bool * value); // boolean EmberAfStatus Set(chip::EndpointId endpoint, bool value); diff --git a/zzz_generated/app-common/app-common/zap-generated/callback.h b/zzz_generated/app-common/app-common/zap-generated/callback.h index 35a697a3b01e62..c8b83639ad4d29 100644 --- a/zzz_generated/app-common/app-common/zap-generated/callback.h +++ b/zzz_generated/app-common/app-common/zap-generated/callback.h @@ -13433,6 +13433,8 @@ bool emberAfDoorLockClusterGetCredentialStatusCallback( */ bool emberAfDoorLockClusterGetCredentialStatusResponseCallback(chip::EndpointId endpoint, chip::app::CommandSender * commandObj, bool credentialExists, uint16_t userIndex, + chip::FabricIndex creatorFabricIndex, + chip::FabricIndex lastModifiedFabricIndex, uint16_t nextCredentialIndex); /** * @brief Door Lock Cluster ClearCredential Command callback (from client) 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 8309fe4d0a0b22..6d9ea9c1c60861 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 @@ -1104,12 +1104,13 @@ enum class DlOperationSource : uint8_t // Enum for DlStatus enum class DlStatus : uint8_t { - kSuccess = 0x00, - kFailure = 0x01, - kDuplicate = 0x02, - kOccupied = 0x03, - kInvalidField = 0x85, - kNotFound = 0x8B, + kSuccess = 0x00, + kFailure = 0x01, + kDuplicate = 0x02, + kOccupied = 0x03, + kInvalidField = 0x85, + kResourceExhausted = 0x89, + kNotFound = 0x8B, }; // Enum for DlUserStatus 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 4602c3c8be6bfa..82aa5fe51d7806 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 @@ -14466,6 +14466,10 @@ CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kCredentialExists)), credentialExists)); ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kUserIndex)), userIndex)); + ReturnErrorOnFailure( + DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kCreatorFabricIndex)), creatorFabricIndex)); + ReturnErrorOnFailure( + DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kLastModifiedFabricIndex)), lastModifiedFabricIndex)); ReturnErrorOnFailure( DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kNextCredentialIndex)), nextCredentialIndex)); ReturnErrorOnFailure(writer.EndContainer(outer)); @@ -14492,6 +14496,12 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) case to_underlying(Fields::kUserIndex): ReturnErrorOnFailure(DataModel::Decode(reader, userIndex)); break; + case to_underlying(Fields::kCreatorFabricIndex): + ReturnErrorOnFailure(DataModel::Decode(reader, creatorFabricIndex)); + break; + case to_underlying(Fields::kLastModifiedFabricIndex): + ReturnErrorOnFailure(DataModel::Decode(reader, lastModifiedFabricIndex)); + break; case to_underlying(Fields::kNextCredentialIndex): ReturnErrorOnFailure(DataModel::Decode(reader, nextCredentialIndex)); break; @@ -14606,6 +14616,9 @@ CHIP_ERROR TypeInfo::DecodableType::Decode(TLV::TLVReader & reader, const Concre case Attributes::CredentialRulesSupport::TypeInfo::GetAttributeId(): ReturnErrorOnFailure(DataModel::Decode(reader, credentialRulesSupport)); break; + case Attributes::NumberOfCredentialsSupportedPerUser::TypeInfo::GetAttributeId(): + ReturnErrorOnFailure(DataModel::Decode(reader, numberOfCredentialsSupportedPerUser)); + break; case Attributes::EnableLogging::TypeInfo::GetAttributeId(): ReturnErrorOnFailure(DataModel::Decode(reader, enableLogging)); break; diff --git a/zzz_generated/app-common/app-common/zap-generated/cluster-objects.h b/zzz_generated/app-common/app-common/zap-generated/cluster-objects.h index c452fefa9a7934..6841bfbebc2569 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 @@ -19207,9 +19207,11 @@ struct DecodableType namespace GetCredentialStatusResponse { enum class Fields { - kCredentialExists = 0, - kUserIndex = 1, - kNextCredentialIndex = 2, + kCredentialExists = 0, + kUserIndex = 1, + kCreatorFabricIndex = 2, + kLastModifiedFabricIndex = 3, + kNextCredentialIndex = 4, }; struct Type @@ -19221,6 +19223,8 @@ struct Type bool credentialExists = static_cast(0); DataModel::Nullable userIndex; + DataModel::Nullable creatorFabricIndex; + DataModel::Nullable lastModifiedFabricIndex; DataModel::Nullable nextCredentialIndex; CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -19238,6 +19242,8 @@ struct DecodableType bool credentialExists = static_cast(0); DataModel::Nullable userIndex; + DataModel::Nullable creatorFabricIndex; + DataModel::Nullable lastModifiedFabricIndex; DataModel::Nullable nextCredentialIndex; CHIP_ERROR Decode(TLV::TLVReader & reader); }; @@ -19506,6 +19512,18 @@ struct TypeInfo static constexpr bool MustUseTimedWrite() { return false; } }; } // namespace CredentialRulesSupport +namespace NumberOfCredentialsSupportedPerUser { +struct TypeInfo +{ + using Type = uint8_t; + using DecodableType = uint8_t; + using DecodableArgType = uint8_t; + + static constexpr ClusterId GetClusterId() { return Clusters::DoorLock::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::NumberOfCredentialsSupportedPerUser::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace NumberOfCredentialsSupportedPerUser namespace EnableLogging { struct TypeInfo { @@ -19911,6 +19929,8 @@ struct TypeInfo Attributes::MinRFIDCodeLength::TypeInfo::DecodableType minRFIDCodeLength = static_cast(0); Attributes::CredentialRulesSupport::TypeInfo::DecodableType credentialRulesSupport = static_cast>(0); + Attributes::NumberOfCredentialsSupportedPerUser::TypeInfo::DecodableType numberOfCredentialsSupportedPerUser = + static_cast(0); Attributes::EnableLogging::TypeInfo::DecodableType enableLogging = static_cast(0); Attributes::Language::TypeInfo::DecodableType language; Attributes::LEDSettings::TypeInfo::DecodableType LEDSettings = static_cast(0); 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 07b9b339badc4f..456e420447ce9d 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 @@ -2848,6 +2848,10 @@ namespace CredentialRulesSupport { static constexpr AttributeId Id = 0x0000001B; } // namespace CredentialRulesSupport +namespace NumberOfCredentialsSupportedPerUser { +static constexpr AttributeId Id = 0x0000001C; +} // namespace NumberOfCredentialsSupportedPerUser + namespace EnableLogging { static constexpr AttributeId Id = 0x00000020; } // namespace EnableLogging diff --git a/zzz_generated/chip-tool-darwin/zap-generated/cluster/CHIPTestClustersObjc.h b/zzz_generated/chip-tool-darwin/zap-generated/cluster/CHIPTestClustersObjc.h index 5c7d8f195de51d..a6a23ce869bbbb 100644 --- a/zzz_generated/chip-tool-darwin/zap-generated/cluster/CHIPTestClustersObjc.h +++ b/zzz_generated/chip-tool-darwin/zap-generated/cluster/CHIPTestClustersObjc.h @@ -427,6 +427,8 @@ NS_ASSUME_NONNULL_BEGIN - (void)writeAttributeMinRFIDCodeLengthWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; - (void)writeAttributeCredentialRulesSupportWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeNumberOfCredentialsSupportedPerUserWithValue:(NSNumber * _Nonnull)value + completionHandler:(StatusCompletion)completionHandler; - (void)writeAttributeSupportedOperatingModesWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; - (void)writeAttributeDefaultConfigurationRegisterWithValue:(NSNumber * _Nonnull)value diff --git a/zzz_generated/chip-tool-darwin/zap-generated/cluster/CHIPTestClustersObjc.mm b/zzz_generated/chip-tool-darwin/zap-generated/cluster/CHIPTestClustersObjc.mm index cf1df2d741dbfc..2452c5c2a9ba5d 100644 --- a/zzz_generated/chip-tool-darwin/zap-generated/cluster/CHIPTestClustersObjc.mm +++ b/zzz_generated/chip-tool-darwin/zap-generated/cluster/CHIPTestClustersObjc.mm @@ -5580,6 +5580,25 @@ new CHIPDefaultSuccessCallbackBridge( }); } +- (void)writeAttributeNumberOfCredentialsSupportedPerUserWithValue:(NSNumber * _Nonnull)value + completionHandler:(StatusCompletion)completionHandler +{ + new CHIPDefaultSuccessCallbackBridge( + self.callbackQueue, + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = DoorLock::Attributes::NumberOfCredentialsSupportedPerUser::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedCharValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + - (void)writeAttributeSupportedOperatingModesWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { diff --git a/zzz_generated/chip-tool-darwin/zap-generated/cluster/Commands.h b/zzz_generated/chip-tool-darwin/zap-generated/cluster/Commands.h index b02f250525fc52..850025a6bb084d 100644 --- a/zzz_generated/chip-tool-darwin/zap-generated/cluster/Commands.h +++ b/zzz_generated/chip-tool-darwin/zap-generated/cluster/Commands.h @@ -21692,6 +21692,7 @@ class SubscribeAttributeDiagnosticLogsClusterRevision : public SubscribeAttribut | * MaxRFIDCodeLength | 0x0019 | | * MinRFIDCodeLength | 0x001A | | * CredentialRulesSupport | 0x001B | +| * NumberOfCredentialsSupportedPerUser | 0x001C | | * EnableLogging | 0x0020 | | * Language | 0x0021 | | * LEDSettings | 0x0022 | @@ -24986,6 +24987,81 @@ class SubscribeAttributeDoorLockCredentialRulesSupport : public SubscribeAttribu } }; +/* + * Attribute NumberOfCredentialsSupportedPerUser + */ +class ReadDoorLockNumberOfCredentialsSupportedPerUser : public ReadAttribute { +public: + ReadDoorLockNumberOfCredentialsSupportedPerUser() + : ReadAttribute("number-of-credentials-supported-per-user") + { + } + + ~ReadDoorLockNumberOfCredentialsSupportedPerUser() {} + + CHIP_ERROR SendCommand(CHIPDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReadAttribute (0x0000001C) on endpoint %u", endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + CHIPDoorLock * cluster = [[CHIPDoorLock alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + CHIP_ERROR __block err = CHIP_NO_ERROR; + [cluster readAttributeNumberOfCredentialsSupportedPerUserWithCompletionHandler:^( + NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"DoorLock.NumberOfCredentialsSupportedPerUser response %@", [value description]); + err = [CHIPError errorToCHIPErrorCode:error]; + + if (error != nil) { + ChipLogError(chipTool, "DoorLock NumberOfCredentialsSupportedPerUser read Error: %s", chip::ErrorStr(err)); + } + SetCommandExitStatus(err); + }]; + return err; + } +}; + +class SubscribeAttributeDoorLockNumberOfCredentialsSupportedPerUser : public SubscribeAttribute { +public: + SubscribeAttributeDoorLockNumberOfCredentialsSupportedPerUser() + : SubscribeAttribute("number-of-credentials-supported-per-user") + { + } + + ~SubscribeAttributeDoorLockNumberOfCredentialsSupportedPerUser() {} + + CHIP_ERROR SendCommand(CHIPDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReportAttribute (0x0000001C) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + CHIPDoorLock * cluster = [[CHIPDoorLock alloc] initWithDevice:device endpoint:endpointId queue:callbackQueue]; + CHIPSubscribeParams * params = [[CHIPSubscribeParams alloc] init]; + params.keepPreviousSubscriptions + = mKeepSubscriptions.HasValue() ? [NSNumber numberWithBool:mKeepSubscriptions.Value()] : nil; + params.fabricFiltered = mFabricFiltered.HasValue() ? [NSNumber numberWithBool:mFabricFiltered.Value()] : nil; + [cluster subscribeAttributeNumberOfCredentialsSupportedPerUserWithMinInterval:[NSNumber numberWithUnsignedInt:mMinInterval] + maxInterval:[NSNumber numberWithUnsignedInt:mMaxInterval] + params:params + subscriptionEstablished:nullptr + reportHandler:^( + NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"DoorLock.NumberOfCredentialsSupportedPerUser " + @"response %@", + [value description]); + if (error || !mWait) { + SetCommandExitStatus( + [CHIPError errorToCHIPErrorCode:error]); + } + }]; + + return CHIP_NO_ERROR; + } + + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mWait ? UINT16_MAX : 10); + } +}; + /* * Attribute EnableLogging */ @@ -101730,6 +101806,8 @@ void registerClusterDoorLock(Commands & commands) make_unique(), // make_unique(), // make_unique(), // + make_unique(), // + make_unique(), // make_unique(), // make_unique(), // make_unique(), // diff --git a/zzz_generated/chip-tool-darwin/zap-generated/test/Commands.h b/zzz_generated/chip-tool-darwin/zap-generated/test/Commands.h index 68fa4e6597cc5e..c8b8f3eecc26f2 100644 --- a/zzz_generated/chip-tool-darwin/zap-generated/test/Commands.h +++ b/zzz_generated/chip-tool-darwin/zap-generated/test/Commands.h @@ -94609,207 +94609,252 @@ class DL_UsersAndCredentials : public TestCommandBridge { err = TestCreateNewRfidCredentialAndUserWithOutOfBoundsIndexFails_52(); break; case 53: - ChipLogProgress(chipTool, " ***** Test Step 53 : Create new PIN credential and try to add it to existing user\n"); - err = TestCreateNewPinCredentialAndTryToAddItToExistingUser_53(); + ChipLogProgress(chipTool, " ***** Test Step 53 : Create new credential and try to add it to 0 user\n"); + err = TestCreateNewCredentialAndTryToAddItTo0User_53(); break; case 54: - ChipLogProgress(chipTool, " ***** Test Step 54 : Create new credential and try to add it to 0 user\n"); - err = TestCreateNewCredentialAndTryToAddItTo0User_54(); + ChipLogProgress(chipTool, " ***** Test Step 54 : Create new credential and try to add it to out-of-bounds user\n"); + err = TestCreateNewCredentialAndTryToAddItToOutOfBoundsUser_54(); break; case 55: - ChipLogProgress(chipTool, " ***** Test Step 55 : Create new credential and try to add it to out-of-bounds user\n"); - err = TestCreateNewCredentialAndTryToAddItToOutOfBoundsUser_55(); + ChipLogProgress(chipTool, " ***** Test Step 55 : Create new PIN with too short data\n"); + err = TestCreateNewPinWithTooShortData_55(); break; case 56: - ChipLogProgress(chipTool, " ***** Test Step 56 : Create new PIN with too short data\n"); - err = TestCreateNewPinWithTooShortData_56(); + ChipLogProgress(chipTool, " ***** Test Step 56 : Create new PIN with too long data\n"); + err = TestCreateNewPinWithTooLongData_56(); break; case 57: - ChipLogProgress(chipTool, " ***** Test Step 57 : Create new PIN with too long data\n"); - err = TestCreateNewPinWithTooLongData_57(); + ChipLogProgress(chipTool, " ***** Test Step 57 : Create new RFID with too short data\n"); + err = TestCreateNewRfidWithTooShortData_57(); break; case 58: - ChipLogProgress(chipTool, " ***** Test Step 58 : Create new RFID with too short data\n"); - err = TestCreateNewRfidWithTooShortData_58(); + ChipLogProgress(chipTool, " ***** Test Step 58 : Create new PIN with Programming user type fails\n"); + err = TestCreateNewPinWithProgrammingUserTypeFails_58(); break; case 59: - ChipLogProgress(chipTool, " ***** Test Step 59 : Create new PIN with Programming user type fails\n"); - err = TestCreateNewPinWithProgrammingUserTypeFails_59(); + ChipLogProgress(chipTool, " ***** Test Step 59 : Create new RFID with too short data\n"); + err = TestCreateNewRfidWithTooShortData_59(); break; case 60: - ChipLogProgress(chipTool, " ***** Test Step 60 : Create new RFID with too short data\n"); - err = TestCreateNewRfidWithTooShortData_60(); + ChipLogProgress(chipTool, " ***** Test Step 60 : Create new PIN credential with data the would cause duplicate\n"); + err = TestCreateNewPinCredentialWithDataTheWouldCauseDuplicate_60(); break; case 61: - ChipLogProgress(chipTool, " ***** Test Step 61 : Create new PIN credential with data the would cause duplicate\n"); - err = TestCreateNewPinCredentialWithDataTheWouldCauseDuplicate_61(); + ChipLogProgress(chipTool, " ***** Test Step 61 : Create new RFID credential with data the would cause duplicate\n"); + err = TestCreateNewRfidCredentialWithDataTheWouldCauseDuplicate_61(); break; case 62: - ChipLogProgress(chipTool, " ***** Test Step 62 : Create new RFID credential with data the would cause duplicate\n"); - err = TestCreateNewRfidCredentialWithDataTheWouldCauseDuplicate_62(); + ChipLogProgress(chipTool, " ***** Test Step 62 : Modify credentialData of existing PIN credential\n"); + err = TestModifyCredentialDataOfExistingPinCredential_62(); break; case 63: - ChipLogProgress(chipTool, " ***** Test Step 63 : Modify credentialData of existing PIN credential\n"); - err = TestModifyCredentialDataOfExistingPinCredential_63(); + ChipLogProgress( + chipTool, " ***** Test Step 63 : Verify that credential was changed by creating new credential with old data\n"); + err = TestVerifyThatCredentialWasChangedByCreatingNewCredentialWithOldData_63(); break; case 64: ChipLogProgress( - chipTool, " ***** Test Step 64 : Verify that credential was changed by creating new credential with old data\n"); - err = TestVerifyThatCredentialWasChangedByCreatingNewCredentialWithOldData_64(); + chipTool, " ***** Test Step 64 : Verify that credential was changed by creating new credential with new data\n"); + err = TestVerifyThatCredentialWasChangedByCreatingNewCredentialWithNewData_64(); break; case 65: - ChipLogProgress( - chipTool, " ***** Test Step 65 : Verify that credential was changed by creating new credential with new data\n"); - err = TestVerifyThatCredentialWasChangedByCreatingNewCredentialWithNewData_65(); + ChipLogProgress(chipTool, " ***** Test Step 65 : Create new RFID credential and add it to existing user\n"); + err = TestCreateNewRfidCredentialAndAddItToExistingUser_65(); break; case 66: - ChipLogProgress(chipTool, " ***** Test Step 66 : Clear first PIN credential\n"); - err = TestClearFirstPinCredential_66(); + ChipLogProgress(chipTool, " ***** Test Step 66 : Verify modified user\n"); + err = TestVerifyModifiedUser_66(); break; case 67: - ChipLogProgress(chipTool, " ***** Test Step 67 : Read back the credential and make sure it is deleted\n"); - err = TestReadBackTheCredentialAndMakeSureItIsDeleted_67(); + ChipLogProgress(chipTool, " ***** Test Step 67 : Create new RFID credential and add it to existing user\n"); + err = TestCreateNewRfidCredentialAndAddItToExistingUser_67(); break; case 68: - ChipLogProgress(chipTool, " ***** Test Step 68 : Read the user back and make sure PIN credential is deleted\n"); - err = TestReadTheUserBackAndMakeSurePinCredentialIsDeleted_68(); + ChipLogProgress(chipTool, " ***** Test Step 68 : Verify modified user\n"); + err = TestVerifyModifiedUser_68(); break; case 69: - ChipLogProgress(chipTool, " ***** Test Step 69 : Clear the second PIN credential\n"); - err = TestClearTheSecondPinCredential_69(); + ChipLogProgress(chipTool, " ***** Test Step 69 : Clear first PIN credential\n"); + err = TestClearFirstPinCredential_69(); break; case 70: ChipLogProgress(chipTool, " ***** Test Step 70 : Read back the credential and make sure it is deleted\n"); err = TestReadBackTheCredentialAndMakeSureItIsDeleted_70(); break; case 71: - ChipLogProgress(chipTool, " ***** Test Step 71 : Read the user back and make sure related user is deleted\n"); - err = TestReadTheUserBackAndMakeSureRelatedUserIsDeleted_71(); + ChipLogProgress(chipTool, " ***** Test Step 71 : Read the user back and make sure PIN credential is deleted\n"); + err = TestReadTheUserBackAndMakeSurePinCredentialIsDeleted_71(); break; case 72: - ChipLogProgress(chipTool, " ***** Test Step 72 : Create new RFID credential with user\n"); - err = TestCreateNewRfidCredentialWithUser_72(); + ChipLogProgress(chipTool, " ***** Test Step 72 : Clear the second PIN credential\n"); + err = TestClearTheSecondPinCredential_72(); break; case 73: - ChipLogProgress(chipTool, " ***** Test Step 73 : Clear all the RFID credentials\n"); - err = TestClearAllTheRfidCredentials_73(); + ChipLogProgress(chipTool, " ***** Test Step 73 : Read back the credential and make sure it is deleted\n"); + err = TestReadBackTheCredentialAndMakeSureItIsDeleted_73(); break; case 74: - ChipLogProgress(chipTool, " ***** Test Step 74 : Read back the fist RFID credential and make sure it is deleted\n"); - err = TestReadBackTheFistRfidCredentialAndMakeSureItIsDeleted_74(); + ChipLogProgress(chipTool, " ***** Test Step 74 : Read the user back and make sure related user is deleted\n"); + err = TestReadTheUserBackAndMakeSureRelatedUserIsDeleted_74(); break; case 75: - ChipLogProgress(chipTool, " ***** Test Step 75 : Read back the second RFID credential and make sure it is deleted\n"); - err = TestReadBackTheSecondRfidCredentialAndMakeSureItIsDeleted_75(); + ChipLogProgress(chipTool, " ***** Test Step 75 : Create new RFID credential with user\n"); + err = TestCreateNewRfidCredentialWithUser_75(); break; case 76: - ChipLogProgress( - chipTool, " ***** Test Step 76 : Read the user related with first RFID back and make sure it is deleted\n"); - err = TestReadTheUserRelatedWithFirstRfidBackAndMakeSureItIsDeleted_76(); + ChipLogProgress(chipTool, " ***** Test Step 76 : Clear all the RFID credentials\n"); + err = TestClearAllTheRfidCredentials_76(); break; case 77: - ChipLogProgress( - chipTool, " ***** Test Step 77 : Read the user related with second RFID back and make sure it is deleted\n"); - err = TestReadTheUserRelatedWithSecondRfidBackAndMakeSureItIsDeleted_77(); + ChipLogProgress(chipTool, " ***** Test Step 77 : Read back the fist RFID credential and make sure it is deleted\n"); + err = TestReadBackTheFistRfidCredentialAndMakeSureItIsDeleted_77(); break; case 78: - ChipLogProgress(chipTool, " ***** Test Step 78 : Create new PIN credential with user\n"); - err = TestCreateNewPinCredentialWithUser_78(); + ChipLogProgress(chipTool, " ***** Test Step 78 : Read back the second RFID credential and make sure it is deleted\n"); + err = TestReadBackTheSecondRfidCredentialAndMakeSureItIsDeleted_78(); break; case 79: - ChipLogProgress(chipTool, " ***** Test Step 79 : Create new RFID credential with user\n"); - err = TestCreateNewRfidCredentialWithUser_79(); + ChipLogProgress(chipTool, " ***** Test Step 79 : Read back the third RFID credential and make sure it is deleted\n"); + err = TestReadBackTheThirdRfidCredentialAndMakeSureItIsDeleted_79(); break; case 80: - ChipLogProgress(chipTool, " ***** Test Step 80 : Create another RFID credential with user\n"); - err = TestCreateAnotherRfidCredentialWithUser_80(); + ChipLogProgress(chipTool, + " ***** Test Step 80 : Read the user related with first RFID back and make sure it has only PIN credential\n"); + err = TestReadTheUserRelatedWithFirstRfidBackAndMakeSureItHasOnlyPinCredential_80(); break; case 81: - ChipLogProgress(chipTool, " ***** Test Step 81 : Clear all the credentials\n"); - err = TestClearAllTheCredentials_81(); + ChipLogProgress( + chipTool, " ***** Test Step 81 : Read the user related with second RFID back and make sure it is deleted\n"); + err = TestReadTheUserRelatedWithSecondRfidBackAndMakeSureItIsDeleted_81(); break; case 82: - ChipLogProgress(chipTool, " ***** Test Step 82 : Read back the first PIN credential and make sure it is deleted\n"); - err = TestReadBackTheFirstPinCredentialAndMakeSureItIsDeleted_82(); + ChipLogProgress(chipTool, " ***** Test Step 82 : Create new PIN credential with user\n"); + err = TestCreateNewPinCredentialWithUser_82(); break; case 83: - ChipLogProgress(chipTool, " ***** Test Step 83 : Read back the first RFID credential and make sure it is deleted\n"); - err = TestReadBackTheFirstRfidCredentialAndMakeSureItIsDeleted_83(); + ChipLogProgress(chipTool, " ***** Test Step 83 : Create new RFID credential with user\n"); + err = TestCreateNewRfidCredentialWithUser_83(); break; case 84: - ChipLogProgress(chipTool, " ***** Test Step 84 : Read back the second PIN credential and make sure it is deleted\n"); - err = TestReadBackTheSecondPinCredentialAndMakeSureItIsDeleted_84(); + ChipLogProgress(chipTool, " ***** Test Step 84 : Create another RFID credential with user\n"); + err = TestCreateAnotherRfidCredentialWithUser_84(); break; case 85: - ChipLogProgress( - chipTool, " ***** Test Step 85 : Read the user related with first PIN back and make sure it is deleted\n"); - err = TestReadTheUserRelatedWithFirstPinBackAndMakeSureItIsDeleted_85(); + ChipLogProgress(chipTool, " ***** Test Step 85 : Clear all the credentials\n"); + err = TestClearAllTheCredentials_85(); break; case 86: - ChipLogProgress( - chipTool, " ***** Test Step 86 : Read the user related with first RFID back and make sure it is deleted\n"); - err = TestReadTheUserRelatedWithFirstRfidBackAndMakeSureItIsDeleted_86(); + ChipLogProgress(chipTool, " ***** Test Step 86 : Read back the first PIN credential and make sure it is deleted\n"); + err = TestReadBackTheFirstPinCredentialAndMakeSureItIsDeleted_86(); break; case 87: - ChipLogProgress( - chipTool, " ***** Test Step 87 : Read the user related with second PIN back and make sure it is deleted\n"); - err = TestReadTheUserRelatedWithSecondPinBackAndMakeSureItIsDeleted_87(); + ChipLogProgress(chipTool, " ***** Test Step 87 : Read back the first RFID credential and make sure it is deleted\n"); + err = TestReadBackTheFirstRfidCredentialAndMakeSureItIsDeleted_87(); break; case 88: - ChipLogProgress(chipTool, " ***** Test Step 88 : Create new Programming PIN credential with invalid index\n"); - err = TestCreateNewProgrammingPinCredentialWithInvalidIndex_88(); + ChipLogProgress(chipTool, " ***** Test Step 88 : Read back the second PIN credential and make sure it is deleted\n"); + err = TestReadBackTheSecondPinCredentialAndMakeSureItIsDeleted_88(); break; case 89: - ChipLogProgress(chipTool, " ***** Test Step 89 : Create new Programming PIN credential with valid index\n"); - err = TestCreateNewProgrammingPinCredentialWithValidIndex_89(); + ChipLogProgress( + chipTool, " ***** Test Step 89 : Read the user related with first PIN back and make sure it is deleted\n"); + err = TestReadTheUserRelatedWithFirstPinBackAndMakeSureItIsDeleted_89(); break; case 90: - ChipLogProgress(chipTool, " ***** Test Step 90 : Verify created user\n"); - err = TestVerifyCreatedUser_90(); + ChipLogProgress( + chipTool, " ***** Test Step 90 : Read the user related with first RFID back and make sure it is deleted\n"); + err = TestReadTheUserRelatedWithFirstRfidBackAndMakeSureItIsDeleted_90(); break; case 91: - ChipLogProgress(chipTool, " ***** Test Step 91 : Verify created programming PIN credential\n"); - err = TestVerifyCreatedProgrammingPinCredential_91(); + ChipLogProgress( + chipTool, " ***** Test Step 91 : Read the user related with second PIN back and make sure it is deleted\n"); + err = TestReadTheUserRelatedWithSecondPinBackAndMakeSureItIsDeleted_91(); break; case 92: - ChipLogProgress(chipTool, " ***** Test Step 92 : Modify the Programming PIN credential\n"); - err = TestModifyTheProgrammingPinCredential_92(); + ChipLogProgress( + chipTool, " ***** Test Step 92 : Read the user related with last RFID back and make sure it is deleted\n"); + err = TestReadTheUserRelatedWithLastRfidBackAndMakeSureItIsDeleted_92(); break; case 93: - ChipLogProgress(chipTool, " ***** Test Step 93 : Clearing Programming PIN fails\n"); - err = TestClearingProgrammingPinFails_93(); + ChipLogProgress(chipTool, " ***** Test Step 93 : Create new Programming PIN credential with invalid index\n"); + err = TestCreateNewProgrammingPinCredentialWithInvalidIndex_93(); break; case 94: - ChipLogProgress(chipTool, " ***** Test Step 94 : Clearing Programming PIN with invalid index fails\n"); - err = TestClearingProgrammingPinWithInvalidIndexFails_94(); + ChipLogProgress(chipTool, " ***** Test Step 94 : Create new Programming PIN credential with valid index\n"); + err = TestCreateNewProgrammingPinCredentialWithValidIndex_94(); break; case 95: - ChipLogProgress(chipTool, " ***** Test Step 95 : Clearing PIN credential with zero index fails\n"); - err = TestClearingPinCredentialWithZeroIndexFails_95(); + ChipLogProgress(chipTool, " ***** Test Step 95 : Verify created user\n"); + err = TestVerifyCreatedUser_95(); break; case 96: - ChipLogProgress(chipTool, " ***** Test Step 96 : Clearing PIN credential with out-of-bound index fails\n"); - err = TestClearingPinCredentialWithOutOfBoundIndexFails_96(); + ChipLogProgress(chipTool, " ***** Test Step 96 : Verify created programming PIN credential\n"); + err = TestVerifyCreatedProgrammingPinCredential_96(); break; case 97: - ChipLogProgress(chipTool, " ***** Test Step 97 : Clearing RFID credential with zero index fails\n"); - err = TestClearingRfidCredentialWithZeroIndexFails_97(); + ChipLogProgress(chipTool, " ***** Test Step 97 : Modify the Programming PIN credential\n"); + err = TestModifyTheProgrammingPinCredential_97(); break; case 98: - ChipLogProgress(chipTool, " ***** Test Step 98 : Clearing RFID credential with out-of-bound index fails\n"); - err = TestClearingRfidCredentialWithOutOfBoundIndexFails_98(); + ChipLogProgress(chipTool, " ***** Test Step 98 : Clearing Programming PIN fails\n"); + err = TestClearingProgrammingPinFails_98(); break; case 99: - ChipLogProgress(chipTool, " ***** Test Step 99 : Clear the Programming PIN user\n"); - err = TestClearTheProgrammingPinUser_99(); + ChipLogProgress(chipTool, " ***** Test Step 99 : Clearing Programming PIN with invalid index fails\n"); + err = TestClearingProgrammingPinWithInvalidIndexFails_99(); break; case 100: - ChipLogProgress(chipTool, " ***** Test Step 100 : Make sure Programming PIN user is deleted\n"); - err = TestMakeSureProgrammingPinUserIsDeleted_100(); + ChipLogProgress(chipTool, " ***** Test Step 100 : Clearing PIN credential with zero index fails\n"); + err = TestClearingPinCredentialWithZeroIndexFails_100(); break; case 101: - ChipLogProgress(chipTool, " ***** Test Step 101 : Make sure programming PIN credential is deleted\n"); - err = TestMakeSureProgrammingPinCredentialIsDeleted_101(); + ChipLogProgress(chipTool, " ***** Test Step 101 : Clearing PIN credential with out-of-bound index fails\n"); + err = TestClearingPinCredentialWithOutOfBoundIndexFails_101(); + break; + case 102: + ChipLogProgress(chipTool, " ***** Test Step 102 : Clearing RFID credential with zero index fails\n"); + err = TestClearingRfidCredentialWithZeroIndexFails_102(); + break; + case 103: + ChipLogProgress(chipTool, " ***** Test Step 103 : Clearing RFID credential with out-of-bound index fails\n"); + err = TestClearingRfidCredentialWithOutOfBoundIndexFails_103(); + break; + case 104: + ChipLogProgress(chipTool, " ***** Test Step 104 : Clear the Programming PIN user\n"); + err = TestClearTheProgrammingPinUser_104(); + break; + case 105: + ChipLogProgress(chipTool, " ***** Test Step 105 : Make sure Programming PIN user is deleted\n"); + err = TestMakeSureProgrammingPinUserIsDeleted_105(); + break; + case 106: + ChipLogProgress(chipTool, " ***** Test Step 106 : Make sure programming PIN credential is deleted\n"); + err = TestMakeSureProgrammingPinCredentialIsDeleted_106(); + break; + case 107: + ChipLogProgress(chipTool, " ***** Test Step 107 : Create new PIN credential and user\n"); + err = TestCreateNewPinCredentialAndUser_107(); + break; + case 108: + ChipLogProgress(chipTool, " ***** Test Step 108 : Create second PIN credential and add it to existing user\n"); + err = TestCreateSecondPinCredentialAndAddItToExistingUser_108(); + break; + case 109: + ChipLogProgress(chipTool, " ***** Test Step 109 : Create third PIN credential and add it to existing user\n"); + err = TestCreateThirdPinCredentialAndAddItToExistingUser_109(); + break; + case 110: + ChipLogProgress(chipTool, " ***** Test Step 110 : Create fourth PIN credential and add it to existing user\n"); + err = TestCreateFourthPinCredentialAndAddItToExistingUser_110(); + break; + case 111: + ChipLogProgress(chipTool, " ***** Test Step 111 : Create fifth PIN credential and add it to existing user\n"); + err = TestCreateFifthPinCredentialAndAddItToExistingUser_111(); + break; + case 112: + ChipLogProgress(chipTool, " ***** Test Step 112 : Try to create sixth PIN credential and make sure it fails\n"); + err = TestTryToCreateSixthPinCredentialAndMakeSureItFails_112(); break; } @@ -95102,30 +95147,63 @@ class DL_UsersAndCredentials : public TestCommandBridge { VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 93: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_COMMAND)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 94: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_COMMAND)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 95: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_COMMAND)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 96: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_COMMAND)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 97: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_COMMAND)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 98: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_COMMAND)); break; case 99: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_COMMAND)); break; case 100: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_COMMAND)); break; case 101: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_COMMAND)); + break; + case 102: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_COMMAND)); + break; + case 103: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_COMMAND)); + break; + case 104: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 105: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 106: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 107: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 108: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 109: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 110: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 111: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 112: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; } @@ -95141,7 +95219,7 @@ class DL_UsersAndCredentials : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 102; + const uint16_t mTestCount = 113; chip::Optional mNodeId; chip::Optional mCluster; @@ -96747,6 +96825,16 @@ class DL_UsersAndCredentials : public TestCommandBridge { VerifyOrReturn(CheckValueNull("userIndex", actualValue)); } + { + id actualValue = values.creatorFabricIndex; + VerifyOrReturn(CheckValueNull("creatorFabricIndex", actualValue)); + } + + { + id actualValue = values.lastModifiedFabricIndex; + VerifyOrReturn(CheckValueNull("lastModifiedFabricIndex", actualValue)); + } + { id actualValue = values.nextCredentialIndex; VerifyOrReturn(CheckValueNonNull("nextCredentialIndex", actualValue)); @@ -96963,6 +97051,18 @@ class DL_UsersAndCredentials : public TestCommandBridge { VerifyOrReturn(CheckValue("userIndex", actualValue, 1U)); } + { + id actualValue = values.creatorFabricIndex; + VerifyOrReturn(CheckValueNonNull("creatorFabricIndex", actualValue)); + VerifyOrReturn(CheckValue("creatorFabricIndex", actualValue, 1)); + } + + { + id actualValue = values.lastModifiedFabricIndex; + VerifyOrReturn(CheckValueNonNull("lastModifiedFabricIndex", actualValue)); + VerifyOrReturn(CheckValue("lastModifiedFabricIndex", actualValue, 1)); + } + { id actualValue = values.nextCredentialIndex; VerifyOrReturn(CheckValueNonNull("nextCredentialIndex", actualValue)); @@ -97167,6 +97267,16 @@ class DL_UsersAndCredentials : public TestCommandBridge { VerifyOrReturn(CheckValueNull("userIndex", actualValue)); } + { + id actualValue = values.creatorFabricIndex; + VerifyOrReturn(CheckValueNull("creatorFabricIndex", actualValue)); + } + + { + id actualValue = values.lastModifiedFabricIndex; + VerifyOrReturn(CheckValueNull("lastModifiedFabricIndex", actualValue)); + } + { id actualValue = values.nextCredentialIndex; VerifyOrReturn(CheckValueNonNull("nextCredentialIndex", actualValue)); @@ -97339,6 +97449,18 @@ class DL_UsersAndCredentials : public TestCommandBridge { VerifyOrReturn(CheckValue("userIndex", actualValue, 1U)); } + { + id actualValue = values.creatorFabricIndex; + VerifyOrReturn(CheckValueNonNull("creatorFabricIndex", actualValue)); + VerifyOrReturn(CheckValue("creatorFabricIndex", actualValue, 1)); + } + + { + id actualValue = values.lastModifiedFabricIndex; + VerifyOrReturn(CheckValueNonNull("lastModifiedFabricIndex", actualValue)); + VerifyOrReturn(CheckValue("lastModifiedFabricIndex", actualValue, 1)); + } + { id actualValue = values.nextCredentialIndex; VerifyOrReturn(CheckValueNonNull("nextCredentialIndex", actualValue)); @@ -97441,52 +97563,7 @@ class DL_UsersAndCredentials : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestCreateNewPinCredentialAndTryToAddItToExistingUser_53() - { - CHIPDevice * device = GetDevice("alpha"); - CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - __auto_type * params = [[CHIPDoorLockClusterSetCredentialParams alloc] init]; - params.operationType = [NSNumber numberWithUnsignedChar:0]; - params.credential = [[CHIPDoorLockClusterDlCredential alloc] init]; - ((CHIPDoorLockClusterDlCredential *) params.credential).credentialType = [NSNumber numberWithUnsignedChar:1]; - ((CHIPDoorLockClusterDlCredential *) params.credential).credentialIndex = [NSNumber numberWithUnsignedShort:3U]; - - params.credentialData = [[NSData alloc] initWithBytes:"123465" length:6]; - params.userIndex = [NSNumber numberWithUnsignedShort:1U]; - params.userStatus = nil; - params.userType = nil; - [cluster - setCredentialWithParams:params - completionHandler:^(CHIPDoorLockClusterSetCredentialResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Create new PIN credential and try to add it to existing user Error: %@", err); - - VerifyOrReturn(CheckValue("status", err, 0)); - - { - id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 3)); - } - - { - id actualValue = values.userIndex; - VerifyOrReturn(CheckValueNull("userIndex", actualValue)); - } - - { - id actualValue = values.nextCredentialIndex; - VerifyOrReturn(CheckValueNonNull("nextCredentialIndex", actualValue)); - VerifyOrReturn(CheckValue("nextCredentialIndex", actualValue, 4U)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestCreateNewCredentialAndTryToAddItTo0User_54() + CHIP_ERROR TestCreateNewCredentialAndTryToAddItTo0User_53() { CHIPDevice * device = GetDevice("alpha"); CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -97531,7 +97608,7 @@ class DL_UsersAndCredentials : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestCreateNewCredentialAndTryToAddItToOutOfBoundsUser_55() + CHIP_ERROR TestCreateNewCredentialAndTryToAddItToOutOfBoundsUser_54() { CHIPDevice * device = GetDevice("alpha"); CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -97576,7 +97653,7 @@ class DL_UsersAndCredentials : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestCreateNewPinWithTooShortData_56() + CHIP_ERROR TestCreateNewPinWithTooShortData_55() { CHIPDevice * device = GetDevice("alpha"); CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -97621,7 +97698,7 @@ class DL_UsersAndCredentials : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestCreateNewPinWithTooLongData_57() + CHIP_ERROR TestCreateNewPinWithTooLongData_56() { CHIPDevice * device = GetDevice("alpha"); CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -97666,7 +97743,7 @@ class DL_UsersAndCredentials : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestCreateNewRfidWithTooShortData_58() + CHIP_ERROR TestCreateNewRfidWithTooShortData_57() { CHIPDevice * device = GetDevice("alpha"); CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -97711,7 +97788,7 @@ class DL_UsersAndCredentials : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestCreateNewPinWithProgrammingUserTypeFails_59() + CHIP_ERROR TestCreateNewPinWithProgrammingUserTypeFails_58() { CHIPDevice * device = GetDevice("alpha"); CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -97756,7 +97833,7 @@ class DL_UsersAndCredentials : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestCreateNewRfidWithTooShortData_60() + CHIP_ERROR TestCreateNewRfidWithTooShortData_59() { CHIPDevice * device = GetDevice("alpha"); CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -97801,7 +97878,7 @@ class DL_UsersAndCredentials : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestCreateNewPinCredentialWithDataTheWouldCauseDuplicate_61() + CHIP_ERROR TestCreateNewPinCredentialWithDataTheWouldCauseDuplicate_60() { CHIPDevice * device = GetDevice("alpha"); CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -97846,7 +97923,7 @@ class DL_UsersAndCredentials : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestCreateNewRfidCredentialWithDataTheWouldCauseDuplicate_62() + CHIP_ERROR TestCreateNewRfidCredentialWithDataTheWouldCauseDuplicate_61() { CHIPDevice * device = GetDevice("alpha"); CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -97891,7 +97968,7 @@ class DL_UsersAndCredentials : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestModifyCredentialDataOfExistingPinCredential_63() + CHIP_ERROR TestModifyCredentialDataOfExistingPinCredential_62() { CHIPDevice * device = GetDevice("alpha"); CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -97936,7 +98013,7 @@ class DL_UsersAndCredentials : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestVerifyThatCredentialWasChangedByCreatingNewCredentialWithOldData_64() + CHIP_ERROR TestVerifyThatCredentialWasChangedByCreatingNewCredentialWithOldData_63() { CHIPDevice * device = GetDevice("alpha"); CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -97982,7 +98059,7 @@ class DL_UsersAndCredentials : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestVerifyThatCredentialWasChangedByCreatingNewCredentialWithNewData_65() + CHIP_ERROR TestVerifyThatCredentialWasChangedByCreatingNewCredentialWithNewData_64() { CHIPDevice * device = GetDevice("alpha"); CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -98027,152 +98104,447 @@ class DL_UsersAndCredentials : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestClearFirstPinCredential_66() + CHIP_ERROR TestCreateNewRfidCredentialAndAddItToExistingUser_65() { CHIPDevice * device = GetDevice("alpha"); CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[CHIPDoorLockClusterClearCredentialParams alloc] init]; + __auto_type * params = [[CHIPDoorLockClusterSetCredentialParams alloc] init]; + params.operationType = [NSNumber numberWithUnsignedChar:0]; params.credential = [[CHIPDoorLockClusterDlCredential alloc] init]; - ((CHIPDoorLockClusterDlCredential *) params.credential).credentialType = [NSNumber numberWithUnsignedChar:1]; - ((CHIPDoorLockClusterDlCredential *) params.credential).credentialIndex = [NSNumber numberWithUnsignedShort:1U]; + ((CHIPDoorLockClusterDlCredential *) params.credential).credentialType = [NSNumber numberWithUnsignedChar:2]; + ((CHIPDoorLockClusterDlCredential *) params.credential).credentialIndex = [NSNumber numberWithUnsignedShort:4U]; - [cluster clearCredentialWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Clear first PIN credential Error: %@", err); + params.credentialData = [[NSData alloc] initWithBytes:"rfid_data_7890" length:14]; + params.userIndex = [NSNumber numberWithUnsignedShort:1U]; + params.userStatus = nil; + params.userType = nil; + [cluster + setCredentialWithParams:params + completionHandler:^(CHIPDoorLockClusterSetCredentialResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"Create new RFID credential and add it to existing user Error: %@", err); - VerifyOrReturn(CheckValue("status", err, 0)); + VerifyOrReturn(CheckValue("status", err, 0)); - NextTest(); - }]; + { + id actualValue = values.status; + VerifyOrReturn(CheckValue("status", actualValue, 0)); + } + + { + id actualValue = values.userIndex; + VerifyOrReturn(CheckValueNull("userIndex", actualValue)); + } + + { + id actualValue = values.nextCredentialIndex; + VerifyOrReturn(CheckValueNonNull("nextCredentialIndex", actualValue)); + VerifyOrReturn(CheckValue("nextCredentialIndex", actualValue, 5U)); + } + + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadBackTheCredentialAndMakeSureItIsDeleted_67() + CHIP_ERROR TestVerifyModifiedUser_66() { CHIPDevice * device = GetDevice("alpha"); CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[CHIPDoorLockClusterGetCredentialStatusParams alloc] init]; - params.credential = [[CHIPDoorLockClusterDlCredential alloc] init]; - ((CHIPDoorLockClusterDlCredential *) params.credential).credentialType = [NSNumber numberWithUnsignedChar:1]; - ((CHIPDoorLockClusterDlCredential *) params.credential).credentialIndex = [NSNumber numberWithUnsignedShort:1U]; + __auto_type * params = [[CHIPDoorLockClusterGetUserParams alloc] init]; + params.userIndex = [NSNumber numberWithUnsignedShort:1U]; + [cluster + getUserWithParams:params + completionHandler:^(CHIPDoorLockClusterGetUserResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"Verify modified user Error: %@", err); - [cluster getCredentialStatusWithParams:params - completionHandler:^( - CHIPDoorLockClusterGetCredentialStatusResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Read back the credential and make sure it is deleted Error: %@", err); + VerifyOrReturn(CheckValue("status", err, 0)); - VerifyOrReturn(CheckValue("status", err, 0)); + { + id actualValue = values.userIndex; + VerifyOrReturn(CheckValue("userIndex", actualValue, 1U)); + } - { - id actualValue = values.credentialExists; - VerifyOrReturn(CheckValue("credentialExists", actualValue, false)); - } + { + id actualValue = values.userName; + VerifyOrReturn(CheckValueNonNull("userName", actualValue)); + VerifyOrReturn(CheckValueAsString("userName", actualValue, @"")); + } - { - id actualValue = values.userIndex; - VerifyOrReturn(CheckValueNull("userIndex", actualValue)); - } + { + id actualValue = values.userUniqueId; + VerifyOrReturn(CheckValueNull("userUniqueId", actualValue)); + } - { - id actualValue = values.nextCredentialIndex; - VerifyOrReturn(CheckValueNonNull("nextCredentialIndex", actualValue)); - VerifyOrReturn(CheckValue("nextCredentialIndex", actualValue, 4U)); - } + { + id actualValue = values.userStatus; + VerifyOrReturn(CheckValueNonNull("userStatus", actualValue)); + VerifyOrReturn(CheckValue("userStatus", actualValue, 1)); + } - NextTest(); - }]; + { + id actualValue = values.userType; + VerifyOrReturn(CheckValueNonNull("userType", actualValue)); + VerifyOrReturn(CheckValue("userType", actualValue, 0)); + } + + { + id actualValue = values.credentialRule; + VerifyOrReturn(CheckValueNonNull("credentialRule", actualValue)); + VerifyOrReturn(CheckValue("credentialRule", actualValue, 0)); + } + + { + id actualValue = values.credentials; + VerifyOrReturn(CheckValueNonNull("credentials", actualValue)); + VerifyOrReturn(CheckValue("credentials", [actualValue count], static_cast(3))); + VerifyOrReturn( + CheckValue("CredentialType", ((CHIPDoorLockClusterDlCredential *) actualValue[0]).credentialType, 1)); + VerifyOrReturn( + CheckValue("CredentialIndex", ((CHIPDoorLockClusterDlCredential *) actualValue[0]).credentialIndex, 1U)); + VerifyOrReturn( + CheckValue("CredentialType", ((CHIPDoorLockClusterDlCredential *) actualValue[1]).credentialType, 2)); + VerifyOrReturn( + CheckValue("CredentialIndex", ((CHIPDoorLockClusterDlCredential *) actualValue[1]).credentialIndex, 2U)); + VerifyOrReturn( + CheckValue("CredentialType", ((CHIPDoorLockClusterDlCredential *) actualValue[2]).credentialType, 2)); + VerifyOrReturn( + CheckValue("CredentialIndex", ((CHIPDoorLockClusterDlCredential *) actualValue[2]).credentialIndex, 4U)); + } + + { + id actualValue = values.creatorFabricIndex; + VerifyOrReturn(CheckValueNonNull("creatorFabricIndex", actualValue)); + VerifyOrReturn(CheckValue("creatorFabricIndex", actualValue, 1)); + } + + { + id actualValue = values.lastModifiedFabricIndex; + VerifyOrReturn(CheckValueNonNull("lastModifiedFabricIndex", actualValue)); + VerifyOrReturn(CheckValue("lastModifiedFabricIndex", actualValue, 1)); + } + + { + id actualValue = values.nextUserIndex; + VerifyOrReturn(CheckValueNonNull("nextUserIndex", actualValue)); + VerifyOrReturn(CheckValue("nextUserIndex", actualValue, 3U)); + } + + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheUserBackAndMakeSurePinCredentialIsDeleted_68() + CHIP_ERROR TestCreateNewRfidCredentialAndAddItToExistingUser_67() { CHIPDevice * device = GetDevice("alpha"); CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[CHIPDoorLockClusterGetUserParams alloc] init]; + __auto_type * params = [[CHIPDoorLockClusterSetCredentialParams alloc] init]; + params.operationType = [NSNumber numberWithUnsignedChar:0]; + params.credential = [[CHIPDoorLockClusterDlCredential alloc] init]; + ((CHIPDoorLockClusterDlCredential *) params.credential).credentialType = [NSNumber numberWithUnsignedChar:1]; + ((CHIPDoorLockClusterDlCredential *) params.credential).credentialIndex = [NSNumber numberWithUnsignedShort:5U]; + + params.credentialData = [[NSData alloc] initWithBytes:"789012" length:6]; params.userIndex = [NSNumber numberWithUnsignedShort:1U]; - [cluster getUserWithParams:params - completionHandler:^(CHIPDoorLockClusterGetUserResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Read the user back and make sure PIN credential is deleted Error: %@", err); + params.userStatus = nil; + params.userType = nil; + [cluster + setCredentialWithParams:params + completionHandler:^(CHIPDoorLockClusterSetCredentialResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"Create new RFID credential and add it to existing user Error: %@", err); - VerifyOrReturn(CheckValue("status", err, 0)); + VerifyOrReturn(CheckValue("status", err, 0)); - { - id actualValue = values.userIndex; - VerifyOrReturn(CheckValue("userIndex", actualValue, 1U)); - } + { + id actualValue = values.status; + VerifyOrReturn(CheckValue("status", actualValue, 0)); + } - { - id actualValue = values.userName; - VerifyOrReturn(CheckValueNonNull("userName", actualValue)); - VerifyOrReturn(CheckValueAsString("userName", actualValue, @"")); - } + { + id actualValue = values.userIndex; + VerifyOrReturn(CheckValueNull("userIndex", actualValue)); + } - { - id actualValue = values.userUniqueId; - VerifyOrReturn(CheckValueNull("userUniqueId", actualValue)); - } + { + id actualValue = values.nextCredentialIndex; + VerifyOrReturn(CheckValueNonNull("nextCredentialIndex", actualValue)); + VerifyOrReturn(CheckValue("nextCredentialIndex", actualValue, 6U)); + } - { - id actualValue = values.userStatus; - VerifyOrReturn(CheckValueNonNull("userStatus", actualValue)); - VerifyOrReturn(CheckValue("userStatus", actualValue, 1)); - } + NextTest(); + }]; - { - id actualValue = values.userType; - VerifyOrReturn(CheckValueNonNull("userType", actualValue)); - VerifyOrReturn(CheckValue("userType", actualValue, 0)); - } + return CHIP_NO_ERROR; + } - { - id actualValue = values.credentialRule; - VerifyOrReturn(CheckValueNonNull("credentialRule", actualValue)); - VerifyOrReturn(CheckValue("credentialRule", actualValue, 0)); - } + CHIP_ERROR TestVerifyModifiedUser_68() + { + CHIPDevice * device = GetDevice("alpha"); + CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - { - id actualValue = values.credentials; - VerifyOrReturn(CheckValueNonNull("credentials", actualValue)); - VerifyOrReturn(CheckValue("credentials", [actualValue count], static_cast(1))); - VerifyOrReturn( - CheckValue("CredentialType", ((CHIPDoorLockClusterDlCredential *) actualValue[0]).credentialType, 2)); - VerifyOrReturn(CheckValue( - "CredentialIndex", ((CHIPDoorLockClusterDlCredential *) actualValue[0]).credentialIndex, 2U)); - } + __auto_type * params = [[CHIPDoorLockClusterGetUserParams alloc] init]; + params.userIndex = [NSNumber numberWithUnsignedShort:1U]; + [cluster + getUserWithParams:params + completionHandler:^(CHIPDoorLockClusterGetUserResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"Verify modified user Error: %@", err); - { - id actualValue = values.creatorFabricIndex; - VerifyOrReturn(CheckValueNonNull("creatorFabricIndex", actualValue)); - VerifyOrReturn(CheckValue("creatorFabricIndex", actualValue, 1)); - } + VerifyOrReturn(CheckValue("status", err, 0)); - { - id actualValue = values.lastModifiedFabricIndex; - VerifyOrReturn(CheckValueNonNull("lastModifiedFabricIndex", actualValue)); - VerifyOrReturn(CheckValue("lastModifiedFabricIndex", actualValue, 1)); - } + { + id actualValue = values.userIndex; + VerifyOrReturn(CheckValue("userIndex", actualValue, 1U)); + } - { - id actualValue = values.nextUserIndex; - VerifyOrReturn(CheckValueNonNull("nextUserIndex", actualValue)); - VerifyOrReturn(CheckValue("nextUserIndex", actualValue, 3U)); - } + { + id actualValue = values.userName; + VerifyOrReturn(CheckValueNonNull("userName", actualValue)); + VerifyOrReturn(CheckValueAsString("userName", actualValue, @"")); + } - NextTest(); - }]; + { + id actualValue = values.userUniqueId; + VerifyOrReturn(CheckValueNull("userUniqueId", actualValue)); + } + + { + id actualValue = values.userStatus; + VerifyOrReturn(CheckValueNonNull("userStatus", actualValue)); + VerifyOrReturn(CheckValue("userStatus", actualValue, 1)); + } + + { + id actualValue = values.userType; + VerifyOrReturn(CheckValueNonNull("userType", actualValue)); + VerifyOrReturn(CheckValue("userType", actualValue, 0)); + } + + { + id actualValue = values.credentialRule; + VerifyOrReturn(CheckValueNonNull("credentialRule", actualValue)); + VerifyOrReturn(CheckValue("credentialRule", actualValue, 0)); + } + + { + id actualValue = values.credentials; + VerifyOrReturn(CheckValueNonNull("credentials", actualValue)); + VerifyOrReturn(CheckValue("credentials", [actualValue count], static_cast(4))); + VerifyOrReturn( + CheckValue("CredentialType", ((CHIPDoorLockClusterDlCredential *) actualValue[0]).credentialType, 1)); + VerifyOrReturn( + CheckValue("CredentialIndex", ((CHIPDoorLockClusterDlCredential *) actualValue[0]).credentialIndex, 1U)); + VerifyOrReturn( + CheckValue("CredentialType", ((CHIPDoorLockClusterDlCredential *) actualValue[1]).credentialType, 2)); + VerifyOrReturn( + CheckValue("CredentialIndex", ((CHIPDoorLockClusterDlCredential *) actualValue[1]).credentialIndex, 2U)); + VerifyOrReturn( + CheckValue("CredentialType", ((CHIPDoorLockClusterDlCredential *) actualValue[2]).credentialType, 2)); + VerifyOrReturn( + CheckValue("CredentialIndex", ((CHIPDoorLockClusterDlCredential *) actualValue[2]).credentialIndex, 4U)); + VerifyOrReturn( + CheckValue("CredentialType", ((CHIPDoorLockClusterDlCredential *) actualValue[3]).credentialType, 1)); + VerifyOrReturn( + CheckValue("CredentialIndex", ((CHIPDoorLockClusterDlCredential *) actualValue[3]).credentialIndex, 5U)); + } + + { + id actualValue = values.creatorFabricIndex; + VerifyOrReturn(CheckValueNonNull("creatorFabricIndex", actualValue)); + VerifyOrReturn(CheckValue("creatorFabricIndex", actualValue, 1)); + } + + { + id actualValue = values.lastModifiedFabricIndex; + VerifyOrReturn(CheckValueNonNull("lastModifiedFabricIndex", actualValue)); + VerifyOrReturn(CheckValue("lastModifiedFabricIndex", actualValue, 1)); + } + + { + id actualValue = values.nextUserIndex; + VerifyOrReturn(CheckValueNonNull("nextUserIndex", actualValue)); + VerifyOrReturn(CheckValue("nextUserIndex", actualValue, 3U)); + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestClearFirstPinCredential_69() + { + CHIPDevice * device = GetDevice("alpha"); + CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + __auto_type * params = [[CHIPDoorLockClusterClearCredentialParams alloc] init]; + params.credential = [[CHIPDoorLockClusterDlCredential alloc] init]; + ((CHIPDoorLockClusterDlCredential *) params.credential).credentialType = [NSNumber numberWithUnsignedChar:1]; + ((CHIPDoorLockClusterDlCredential *) params.credential).credentialIndex = [NSNumber numberWithUnsignedShort:1U]; + + [cluster clearCredentialWithParams:params + completionHandler:^(NSError * _Nullable err) { + NSLog(@"Clear first PIN credential Error: %@", err); + + VerifyOrReturn(CheckValue("status", err, 0)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestReadBackTheCredentialAndMakeSureItIsDeleted_70() + { + CHIPDevice * device = GetDevice("alpha"); + CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + __auto_type * params = [[CHIPDoorLockClusterGetCredentialStatusParams alloc] init]; + params.credential = [[CHIPDoorLockClusterDlCredential alloc] init]; + ((CHIPDoorLockClusterDlCredential *) params.credential).credentialType = [NSNumber numberWithUnsignedChar:1]; + ((CHIPDoorLockClusterDlCredential *) params.credential).credentialIndex = [NSNumber numberWithUnsignedShort:1U]; + + [cluster getCredentialStatusWithParams:params + completionHandler:^( + CHIPDoorLockClusterGetCredentialStatusResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"Read back the credential and make sure it is deleted Error: %@", err); + + VerifyOrReturn(CheckValue("status", err, 0)); + + { + id actualValue = values.credentialExists; + VerifyOrReturn(CheckValue("credentialExists", actualValue, false)); + } + + { + id actualValue = values.userIndex; + VerifyOrReturn(CheckValueNull("userIndex", actualValue)); + } + + { + id actualValue = values.creatorFabricIndex; + VerifyOrReturn(CheckValueNull("creatorFabricIndex", actualValue)); + } + + { + id actualValue = values.lastModifiedFabricIndex; + VerifyOrReturn(CheckValueNull("lastModifiedFabricIndex", actualValue)); + } + + { + id actualValue = values.nextCredentialIndex; + VerifyOrReturn(CheckValueNonNull("nextCredentialIndex", actualValue)); + VerifyOrReturn(CheckValue("nextCredentialIndex", actualValue, 6U)); + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestReadTheUserBackAndMakeSurePinCredentialIsDeleted_71() + { + CHIPDevice * device = GetDevice("alpha"); + CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + __auto_type * params = [[CHIPDoorLockClusterGetUserParams alloc] init]; + params.userIndex = [NSNumber numberWithUnsignedShort:1U]; + [cluster + getUserWithParams:params + completionHandler:^(CHIPDoorLockClusterGetUserResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"Read the user back and make sure PIN credential is deleted Error: %@", err); + + VerifyOrReturn(CheckValue("status", err, 0)); + + { + id actualValue = values.userIndex; + VerifyOrReturn(CheckValue("userIndex", actualValue, 1U)); + } + + { + id actualValue = values.userName; + VerifyOrReturn(CheckValueNonNull("userName", actualValue)); + VerifyOrReturn(CheckValueAsString("userName", actualValue, @"")); + } + + { + id actualValue = values.userUniqueId; + VerifyOrReturn(CheckValueNull("userUniqueId", actualValue)); + } + + { + id actualValue = values.userStatus; + VerifyOrReturn(CheckValueNonNull("userStatus", actualValue)); + VerifyOrReturn(CheckValue("userStatus", actualValue, 1)); + } + + { + id actualValue = values.userType; + VerifyOrReturn(CheckValueNonNull("userType", actualValue)); + VerifyOrReturn(CheckValue("userType", actualValue, 0)); + } + + { + id actualValue = values.credentialRule; + VerifyOrReturn(CheckValueNonNull("credentialRule", actualValue)); + VerifyOrReturn(CheckValue("credentialRule", actualValue, 0)); + } + + { + id actualValue = values.credentials; + VerifyOrReturn(CheckValueNonNull("credentials", actualValue)); + VerifyOrReturn(CheckValue("credentials", [actualValue count], static_cast(3))); + VerifyOrReturn( + CheckValue("CredentialType", ((CHIPDoorLockClusterDlCredential *) actualValue[0]).credentialType, 2)); + VerifyOrReturn( + CheckValue("CredentialIndex", ((CHIPDoorLockClusterDlCredential *) actualValue[0]).credentialIndex, 2U)); + VerifyOrReturn( + CheckValue("CredentialType", ((CHIPDoorLockClusterDlCredential *) actualValue[1]).credentialType, 2)); + VerifyOrReturn( + CheckValue("CredentialIndex", ((CHIPDoorLockClusterDlCredential *) actualValue[1]).credentialIndex, 4U)); + VerifyOrReturn( + CheckValue("CredentialType", ((CHIPDoorLockClusterDlCredential *) actualValue[2]).credentialType, 1)); + VerifyOrReturn( + CheckValue("CredentialIndex", ((CHIPDoorLockClusterDlCredential *) actualValue[2]).credentialIndex, 5U)); + } + + { + id actualValue = values.creatorFabricIndex; + VerifyOrReturn(CheckValueNonNull("creatorFabricIndex", actualValue)); + VerifyOrReturn(CheckValue("creatorFabricIndex", actualValue, 1)); + } + + { + id actualValue = values.lastModifiedFabricIndex; + VerifyOrReturn(CheckValueNonNull("lastModifiedFabricIndex", actualValue)); + VerifyOrReturn(CheckValue("lastModifiedFabricIndex", actualValue, 1)); + } + + { + id actualValue = values.nextUserIndex; + VerifyOrReturn(CheckValueNonNull("nextUserIndex", actualValue)); + VerifyOrReturn(CheckValue("nextUserIndex", actualValue, 3U)); + } + + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestClearTheSecondPinCredential_69() + CHIP_ERROR TestClearTheSecondPinCredential_72() { CHIPDevice * device = GetDevice("alpha"); CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -98195,7 +98567,7 @@ class DL_UsersAndCredentials : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadBackTheCredentialAndMakeSureItIsDeleted_70() + CHIP_ERROR TestReadBackTheCredentialAndMakeSureItIsDeleted_73() { CHIPDevice * device = GetDevice("alpha"); CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -98223,10 +98595,20 @@ class DL_UsersAndCredentials : public TestCommandBridge { VerifyOrReturn(CheckValueNull("userIndex", actualValue)); } + { + id actualValue = values.creatorFabricIndex; + VerifyOrReturn(CheckValueNull("creatorFabricIndex", actualValue)); + } + + { + id actualValue = values.lastModifiedFabricIndex; + VerifyOrReturn(CheckValueNull("lastModifiedFabricIndex", actualValue)); + } + { id actualValue = values.nextCredentialIndex; VerifyOrReturn(CheckValueNonNull("nextCredentialIndex", actualValue)); - VerifyOrReturn(CheckValue("nextCredentialIndex", actualValue, 4U)); + VerifyOrReturn(CheckValue("nextCredentialIndex", actualValue, 6U)); } NextTest(); @@ -98235,7 +98617,7 @@ class DL_UsersAndCredentials : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheUserBackAndMakeSureRelatedUserIsDeleted_71() + CHIP_ERROR TestReadTheUserBackAndMakeSureRelatedUserIsDeleted_74() { CHIPDevice * device = GetDevice("alpha"); CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -98306,7 +98688,7 @@ class DL_UsersAndCredentials : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestCreateNewRfidCredentialWithUser_72() + CHIP_ERROR TestCreateNewRfidCredentialWithUser_75() { CHIPDevice * device = GetDevice("alpha"); CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -98352,7 +98734,7 @@ class DL_UsersAndCredentials : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestClearAllTheRfidCredentials_73() + CHIP_ERROR TestClearAllTheRfidCredentials_76() { CHIPDevice * device = GetDevice("alpha"); CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -98375,7 +98757,7 @@ class DL_UsersAndCredentials : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadBackTheFistRfidCredentialAndMakeSureItIsDeleted_74() + CHIP_ERROR TestReadBackTheFistRfidCredentialAndMakeSureItIsDeleted_77() { CHIPDevice * device = GetDevice("alpha"); CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -98403,6 +98785,16 @@ class DL_UsersAndCredentials : public TestCommandBridge { VerifyOrReturn(CheckValueNull("userIndex", actualValue)); } + { + id actualValue = values.creatorFabricIndex; + VerifyOrReturn(CheckValueNull("creatorFabricIndex", actualValue)); + } + + { + id actualValue = values.lastModifiedFabricIndex; + VerifyOrReturn(CheckValueNull("lastModifiedFabricIndex", actualValue)); + } + { id actualValue = values.nextCredentialIndex; VerifyOrReturn(CheckValueNonNull("nextCredentialIndex", actualValue)); @@ -98415,7 +98807,7 @@ class DL_UsersAndCredentials : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadBackTheSecondRfidCredentialAndMakeSureItIsDeleted_75() + CHIP_ERROR TestReadBackTheSecondRfidCredentialAndMakeSureItIsDeleted_78() { CHIPDevice * device = GetDevice("alpha"); CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -98443,6 +98835,16 @@ class DL_UsersAndCredentials : public TestCommandBridge { VerifyOrReturn(CheckValueNull("userIndex", actualValue)); } + { + id actualValue = values.creatorFabricIndex; + VerifyOrReturn(CheckValueNull("creatorFabricIndex", actualValue)); + } + + { + id actualValue = values.lastModifiedFabricIndex; + VerifyOrReturn(CheckValueNull("lastModifiedFabricIndex", actualValue)); + } + { id actualValue = values.nextCredentialIndex; VerifyOrReturn(CheckValueNonNull("nextCredentialIndex", actualValue)); @@ -98455,7 +98857,57 @@ class DL_UsersAndCredentials : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheUserRelatedWithFirstRfidBackAndMakeSureItIsDeleted_76() + CHIP_ERROR TestReadBackTheThirdRfidCredentialAndMakeSureItIsDeleted_79() + { + CHIPDevice * device = GetDevice("alpha"); + CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + __auto_type * params = [[CHIPDoorLockClusterGetCredentialStatusParams alloc] init]; + params.credential = [[CHIPDoorLockClusterDlCredential alloc] init]; + ((CHIPDoorLockClusterDlCredential *) params.credential).credentialType = [NSNumber numberWithUnsignedChar:2]; + ((CHIPDoorLockClusterDlCredential *) params.credential).credentialIndex = [NSNumber numberWithUnsignedShort:4U]; + + [cluster getCredentialStatusWithParams:params + completionHandler:^( + CHIPDoorLockClusterGetCredentialStatusResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"Read back the third RFID credential and make sure it is deleted Error: %@", err); + + VerifyOrReturn(CheckValue("status", err, 0)); + + { + id actualValue = values.credentialExists; + VerifyOrReturn(CheckValue("credentialExists", actualValue, false)); + } + + { + id actualValue = values.userIndex; + VerifyOrReturn(CheckValueNull("userIndex", actualValue)); + } + + { + id actualValue = values.creatorFabricIndex; + VerifyOrReturn(CheckValueNull("creatorFabricIndex", actualValue)); + } + + { + id actualValue = values.lastModifiedFabricIndex; + VerifyOrReturn(CheckValueNull("lastModifiedFabricIndex", actualValue)); + } + + { + id actualValue = values.nextCredentialIndex; + VerifyOrReturn(CheckValueNonNull("nextCredentialIndex", actualValue)); + VerifyOrReturn(CheckValue("nextCredentialIndex", actualValue, 6U)); + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestReadTheUserRelatedWithFirstRfidBackAndMakeSureItHasOnlyPinCredential_80() { CHIPDevice * device = GetDevice("alpha"); CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -98465,7 +98917,7 @@ class DL_UsersAndCredentials : public TestCommandBridge { params.userIndex = [NSNumber numberWithUnsignedShort:1U]; [cluster getUserWithParams:params completionHandler:^(CHIPDoorLockClusterGetUserResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Read the user related with first RFID back and make sure it is deleted Error: %@", err); + NSLog(@"Read the user related with first RFID back and make sure it has only PIN credential Error: %@", err); VerifyOrReturn(CheckValue("status", err, 0)); @@ -98476,7 +98928,8 @@ class DL_UsersAndCredentials : public TestCommandBridge { { id actualValue = values.userName; - VerifyOrReturn(CheckValueNull("userName", actualValue)); + VerifyOrReturn(CheckValueNonNull("userName", actualValue)); + VerifyOrReturn(CheckValueAsString("userName", actualValue, @"")); } { @@ -98486,32 +98939,42 @@ class DL_UsersAndCredentials : public TestCommandBridge { { id actualValue = values.userStatus; - VerifyOrReturn(CheckValueNull("userStatus", actualValue)); + VerifyOrReturn(CheckValueNonNull("userStatus", actualValue)); + VerifyOrReturn(CheckValue("userStatus", actualValue, 1)); } { id actualValue = values.userType; - VerifyOrReturn(CheckValueNull("userType", actualValue)); + VerifyOrReturn(CheckValueNonNull("userType", actualValue)); + VerifyOrReturn(CheckValue("userType", actualValue, 0)); } { id actualValue = values.credentialRule; - VerifyOrReturn(CheckValueNull("credentialRule", actualValue)); + VerifyOrReturn(CheckValueNonNull("credentialRule", actualValue)); + VerifyOrReturn(CheckValue("credentialRule", actualValue, 0)); } { id actualValue = values.credentials; - VerifyOrReturn(CheckValueNull("credentials", actualValue)); + VerifyOrReturn(CheckValueNonNull("credentials", actualValue)); + VerifyOrReturn(CheckValue("credentials", [actualValue count], static_cast(1))); + VerifyOrReturn( + CheckValue("CredentialType", ((CHIPDoorLockClusterDlCredential *) actualValue[0]).credentialType, 1)); + VerifyOrReturn(CheckValue( + "CredentialIndex", ((CHIPDoorLockClusterDlCredential *) actualValue[0]).credentialIndex, 5U)); } { id actualValue = values.creatorFabricIndex; - VerifyOrReturn(CheckValueNull("creatorFabricIndex", actualValue)); + VerifyOrReturn(CheckValueNonNull("creatorFabricIndex", actualValue)); + VerifyOrReturn(CheckValue("creatorFabricIndex", actualValue, 1)); } { id actualValue = values.lastModifiedFabricIndex; - VerifyOrReturn(CheckValueNull("lastModifiedFabricIndex", actualValue)); + VerifyOrReturn(CheckValueNonNull("lastModifiedFabricIndex", actualValue)); + VerifyOrReturn(CheckValue("lastModifiedFabricIndex", actualValue, 1)); } { @@ -98526,7 +98989,7 @@ class DL_UsersAndCredentials : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheUserRelatedWithSecondRfidBackAndMakeSureItIsDeleted_77() + CHIP_ERROR TestReadTheUserRelatedWithSecondRfidBackAndMakeSureItIsDeleted_81() { CHIPDevice * device = GetDevice("alpha"); CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -98597,7 +99060,7 @@ class DL_UsersAndCredentials : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestCreateNewPinCredentialWithUser_78() + CHIP_ERROR TestCreateNewPinCredentialWithUser_82() { CHIPDevice * device = GetDevice("alpha"); CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -98628,7 +99091,7 @@ class DL_UsersAndCredentials : public TestCommandBridge { { id actualValue = values.userIndex; VerifyOrReturn(CheckValueNonNull("userIndex", actualValue)); - VerifyOrReturn(CheckValue("userIndex", actualValue, 1U)); + VerifyOrReturn(CheckValue("userIndex", actualValue, 2U)); } { @@ -98643,7 +99106,7 @@ class DL_UsersAndCredentials : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestCreateNewRfidCredentialWithUser_79() + CHIP_ERROR TestCreateNewRfidCredentialWithUser_83() { CHIPDevice * device = GetDevice("alpha"); CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -98674,7 +99137,7 @@ class DL_UsersAndCredentials : public TestCommandBridge { { id actualValue = values.userIndex; VerifyOrReturn(CheckValueNonNull("userIndex", actualValue)); - VerifyOrReturn(CheckValue("userIndex", actualValue, 2U)); + VerifyOrReturn(CheckValue("userIndex", actualValue, 3U)); } { @@ -98689,7 +99152,7 @@ class DL_UsersAndCredentials : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestCreateAnotherRfidCredentialWithUser_80() + CHIP_ERROR TestCreateAnotherRfidCredentialWithUser_84() { CHIPDevice * device = GetDevice("alpha"); CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -98720,7 +99183,7 @@ class DL_UsersAndCredentials : public TestCommandBridge { { id actualValue = values.userIndex; VerifyOrReturn(CheckValueNonNull("userIndex", actualValue)); - VerifyOrReturn(CheckValue("userIndex", actualValue, 3U)); + VerifyOrReturn(CheckValue("userIndex", actualValue, 4U)); } { @@ -98735,7 +99198,7 @@ class DL_UsersAndCredentials : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestClearAllTheCredentials_81() + CHIP_ERROR TestClearAllTheCredentials_85() { CHIPDevice * device = GetDevice("alpha"); CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -98755,7 +99218,7 @@ class DL_UsersAndCredentials : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadBackTheFirstPinCredentialAndMakeSureItIsDeleted_82() + CHIP_ERROR TestReadBackTheFirstPinCredentialAndMakeSureItIsDeleted_86() { CHIPDevice * device = GetDevice("alpha"); CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -98783,6 +99246,16 @@ class DL_UsersAndCredentials : public TestCommandBridge { VerifyOrReturn(CheckValueNull("userIndex", actualValue)); } + { + id actualValue = values.creatorFabricIndex; + VerifyOrReturn(CheckValueNull("creatorFabricIndex", actualValue)); + } + + { + id actualValue = values.lastModifiedFabricIndex; + VerifyOrReturn(CheckValueNull("lastModifiedFabricIndex", actualValue)); + } + { id actualValue = values.nextCredentialIndex; VerifyOrReturn(CheckValueNonNull("nextCredentialIndex", actualValue)); @@ -98795,7 +99268,7 @@ class DL_UsersAndCredentials : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadBackTheFirstRfidCredentialAndMakeSureItIsDeleted_83() + CHIP_ERROR TestReadBackTheFirstRfidCredentialAndMakeSureItIsDeleted_87() { CHIPDevice * device = GetDevice("alpha"); CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -98823,6 +99296,16 @@ class DL_UsersAndCredentials : public TestCommandBridge { VerifyOrReturn(CheckValueNull("userIndex", actualValue)); } + { + id actualValue = values.creatorFabricIndex; + VerifyOrReturn(CheckValueNull("creatorFabricIndex", actualValue)); + } + + { + id actualValue = values.lastModifiedFabricIndex; + VerifyOrReturn(CheckValueNull("lastModifiedFabricIndex", actualValue)); + } + { id actualValue = values.nextCredentialIndex; VerifyOrReturn(CheckValueNonNull("nextCredentialIndex", actualValue)); @@ -98835,7 +99318,7 @@ class DL_UsersAndCredentials : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadBackTheSecondPinCredentialAndMakeSureItIsDeleted_84() + CHIP_ERROR TestReadBackTheSecondPinCredentialAndMakeSureItIsDeleted_88() { CHIPDevice * device = GetDevice("alpha"); CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -98863,6 +99346,16 @@ class DL_UsersAndCredentials : public TestCommandBridge { VerifyOrReturn(CheckValueNull("userIndex", actualValue)); } + { + id actualValue = values.creatorFabricIndex; + VerifyOrReturn(CheckValueNull("creatorFabricIndex", actualValue)); + } + + { + id actualValue = values.lastModifiedFabricIndex; + VerifyOrReturn(CheckValueNull("lastModifiedFabricIndex", actualValue)); + } + { id actualValue = values.nextCredentialIndex; VerifyOrReturn(CheckValueNonNull("nextCredentialIndex", actualValue)); @@ -98875,7 +99368,7 @@ class DL_UsersAndCredentials : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheUserRelatedWithFirstPinBackAndMakeSureItIsDeleted_85() + CHIP_ERROR TestReadTheUserRelatedWithFirstPinBackAndMakeSureItIsDeleted_89() { CHIPDevice * device = GetDevice("alpha"); CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -98946,7 +99439,7 @@ class DL_UsersAndCredentials : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheUserRelatedWithFirstRfidBackAndMakeSureItIsDeleted_86() + CHIP_ERROR TestReadTheUserRelatedWithFirstRfidBackAndMakeSureItIsDeleted_90() { CHIPDevice * device = GetDevice("alpha"); CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -99017,7 +99510,7 @@ class DL_UsersAndCredentials : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheUserRelatedWithSecondPinBackAndMakeSureItIsDeleted_87() + CHIP_ERROR TestReadTheUserRelatedWithSecondPinBackAndMakeSureItIsDeleted_91() { CHIPDevice * device = GetDevice("alpha"); CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -99088,7 +99581,78 @@ class DL_UsersAndCredentials : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestCreateNewProgrammingPinCredentialWithInvalidIndex_88() + CHIP_ERROR TestReadTheUserRelatedWithLastRfidBackAndMakeSureItIsDeleted_92() + { + CHIPDevice * device = GetDevice("alpha"); + CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + __auto_type * params = [[CHIPDoorLockClusterGetUserParams alloc] init]; + params.userIndex = [NSNumber numberWithUnsignedShort:4U]; + [cluster getUserWithParams:params + completionHandler:^(CHIPDoorLockClusterGetUserResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"Read the user related with last RFID back and make sure it is deleted Error: %@", err); + + VerifyOrReturn(CheckValue("status", err, 0)); + + { + id actualValue = values.userIndex; + VerifyOrReturn(CheckValue("userIndex", actualValue, 4U)); + } + + { + id actualValue = values.userName; + VerifyOrReturn(CheckValueNull("userName", actualValue)); + } + + { + id actualValue = values.userUniqueId; + VerifyOrReturn(CheckValueNull("userUniqueId", actualValue)); + } + + { + id actualValue = values.userStatus; + VerifyOrReturn(CheckValueNull("userStatus", actualValue)); + } + + { + id actualValue = values.userType; + VerifyOrReturn(CheckValueNull("userType", actualValue)); + } + + { + id actualValue = values.credentialRule; + VerifyOrReturn(CheckValueNull("credentialRule", actualValue)); + } + + { + id actualValue = values.credentials; + VerifyOrReturn(CheckValueNull("credentials", actualValue)); + } + + { + id actualValue = values.creatorFabricIndex; + VerifyOrReturn(CheckValueNull("creatorFabricIndex", actualValue)); + } + + { + id actualValue = values.lastModifiedFabricIndex; + VerifyOrReturn(CheckValueNull("lastModifiedFabricIndex", actualValue)); + } + + { + id actualValue = values.nextUserIndex; + VerifyOrReturn(CheckValueNonNull("nextUserIndex", actualValue)); + VerifyOrReturn(CheckValue("nextUserIndex", actualValue, 5U)); + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestCreateNewProgrammingPinCredentialWithInvalidIndex_93() { CHIPDevice * device = GetDevice("alpha"); CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -99132,7 +99696,7 @@ class DL_UsersAndCredentials : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestCreateNewProgrammingPinCredentialWithValidIndex_89() + CHIP_ERROR TestCreateNewProgrammingPinCredentialWithValidIndex_94() { CHIPDevice * device = GetDevice("alpha"); CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -99177,7 +99741,7 @@ class DL_UsersAndCredentials : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestVerifyCreatedUser_90() + CHIP_ERROR TestVerifyCreatedUser_95() { CHIPDevice * device = GetDevice("alpha"); CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -99259,7 +99823,7 @@ class DL_UsersAndCredentials : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestVerifyCreatedProgrammingPinCredential_91() + CHIP_ERROR TestVerifyCreatedProgrammingPinCredential_96() { CHIPDevice * device = GetDevice("alpha"); CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -99288,6 +99852,18 @@ class DL_UsersAndCredentials : public TestCommandBridge { VerifyOrReturn(CheckValue("userIndex", actualValue, 1U)); } + { + id actualValue = values.creatorFabricIndex; + VerifyOrReturn(CheckValueNonNull("creatorFabricIndex", actualValue)); + VerifyOrReturn(CheckValue("creatorFabricIndex", actualValue, 1)); + } + + { + id actualValue = values.lastModifiedFabricIndex; + VerifyOrReturn(CheckValueNonNull("lastModifiedFabricIndex", actualValue)); + VerifyOrReturn(CheckValue("lastModifiedFabricIndex", actualValue, 1)); + } + { id actualValue = values.nextCredentialIndex; VerifyOrReturn(CheckValueNull("nextCredentialIndex", actualValue)); @@ -99299,7 +99875,7 @@ class DL_UsersAndCredentials : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestModifyTheProgrammingPinCredential_92() + CHIP_ERROR TestModifyTheProgrammingPinCredential_97() { CHIPDevice * device = GetDevice("alpha"); CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -99343,7 +99919,7 @@ class DL_UsersAndCredentials : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestClearingProgrammingPinFails_93() + CHIP_ERROR TestClearingProgrammingPinFails_98() { CHIPDevice * device = GetDevice("alpha"); CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -99365,7 +99941,7 @@ class DL_UsersAndCredentials : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestClearingProgrammingPinWithInvalidIndexFails_94() + CHIP_ERROR TestClearingProgrammingPinWithInvalidIndexFails_99() { CHIPDevice * device = GetDevice("alpha"); CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -99387,7 +99963,7 @@ class DL_UsersAndCredentials : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestClearingPinCredentialWithZeroIndexFails_95() + CHIP_ERROR TestClearingPinCredentialWithZeroIndexFails_100() { CHIPDevice * device = GetDevice("alpha"); CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -99409,7 +99985,7 @@ class DL_UsersAndCredentials : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestClearingPinCredentialWithOutOfBoundIndexFails_96() + CHIP_ERROR TestClearingPinCredentialWithOutOfBoundIndexFails_101() { CHIPDevice * device = GetDevice("alpha"); CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -99432,7 +100008,7 @@ class DL_UsersAndCredentials : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestClearingRfidCredentialWithZeroIndexFails_97() + CHIP_ERROR TestClearingRfidCredentialWithZeroIndexFails_102() { CHIPDevice * device = GetDevice("alpha"); CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -99454,7 +100030,7 @@ class DL_UsersAndCredentials : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestClearingRfidCredentialWithOutOfBoundIndexFails_98() + CHIP_ERROR TestClearingRfidCredentialWithOutOfBoundIndexFails_103() { CHIPDevice * device = GetDevice("alpha"); CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -99477,7 +100053,7 @@ class DL_UsersAndCredentials : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestClearTheProgrammingPinUser_99() + CHIP_ERROR TestClearTheProgrammingPinUser_104() { CHIPDevice * device = GetDevice("alpha"); CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -99497,7 +100073,7 @@ class DL_UsersAndCredentials : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestMakeSureProgrammingPinUserIsDeleted_100() + CHIP_ERROR TestMakeSureProgrammingPinUserIsDeleted_105() { CHIPDevice * device = GetDevice("alpha"); CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -99568,7 +100144,7 @@ class DL_UsersAndCredentials : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestMakeSureProgrammingPinCredentialIsDeleted_101() + CHIP_ERROR TestMakeSureProgrammingPinCredentialIsDeleted_106() { CHIPDevice * device = GetDevice("alpha"); CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -99596,6 +100172,16 @@ class DL_UsersAndCredentials : public TestCommandBridge { VerifyOrReturn(CheckValueNull("userIndex", actualValue)); } + { + id actualValue = values.creatorFabricIndex; + VerifyOrReturn(CheckValueNull("creatorFabricIndex", actualValue)); + } + + { + id actualValue = values.lastModifiedFabricIndex; + VerifyOrReturn(CheckValueNull("lastModifiedFabricIndex", actualValue)); + } + { id actualValue = values.nextCredentialIndex; VerifyOrReturn(CheckValueNull("nextCredentialIndex", actualValue)); @@ -99606,6 +100192,277 @@ class DL_UsersAndCredentials : public TestCommandBridge { return CHIP_NO_ERROR; } + + CHIP_ERROR TestCreateNewPinCredentialAndUser_107() + { + CHIPDevice * device = GetDevice("alpha"); + CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + __auto_type * params = [[CHIPDoorLockClusterSetCredentialParams alloc] init]; + params.operationType = [NSNumber numberWithUnsignedChar:0]; + params.credential = [[CHIPDoorLockClusterDlCredential alloc] init]; + ((CHIPDoorLockClusterDlCredential *) params.credential).credentialType = [NSNumber numberWithUnsignedChar:1]; + ((CHIPDoorLockClusterDlCredential *) params.credential).credentialIndex = [NSNumber numberWithUnsignedShort:1U]; + + params.credentialData = [[NSData alloc] initWithBytes:"000000" length:6]; + params.userIndex = nil; + params.userStatus = nil; + params.userType = nil; + [cluster + setCredentialWithParams:params + completionHandler:^(CHIPDoorLockClusterSetCredentialResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"Create new PIN credential and user Error: %@", err); + + VerifyOrReturn(CheckValue("status", err, 0)); + + { + id actualValue = values.status; + VerifyOrReturn(CheckValue("status", actualValue, 0)); + } + + { + id actualValue = values.userIndex; + VerifyOrReturn(CheckValueNonNull("userIndex", actualValue)); + VerifyOrReturn(CheckValue("userIndex", actualValue, 1U)); + } + + { + id actualValue = values.nextCredentialIndex; + VerifyOrReturn(CheckValueNonNull("nextCredentialIndex", actualValue)); + VerifyOrReturn(CheckValue("nextCredentialIndex", actualValue, 2U)); + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestCreateSecondPinCredentialAndAddItToExistingUser_108() + { + CHIPDevice * device = GetDevice("alpha"); + CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + __auto_type * params = [[CHIPDoorLockClusterSetCredentialParams alloc] init]; + params.operationType = [NSNumber numberWithUnsignedChar:0]; + params.credential = [[CHIPDoorLockClusterDlCredential alloc] init]; + ((CHIPDoorLockClusterDlCredential *) params.credential).credentialType = [NSNumber numberWithUnsignedChar:1]; + ((CHIPDoorLockClusterDlCredential *) params.credential).credentialIndex = [NSNumber numberWithUnsignedShort:2U]; + + params.credentialData = [[NSData alloc] initWithBytes:"000001" length:6]; + params.userIndex = [NSNumber numberWithUnsignedShort:1U]; + params.userStatus = nil; + params.userType = nil; + [cluster + setCredentialWithParams:params + completionHandler:^(CHIPDoorLockClusterSetCredentialResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"Create second PIN credential and add it to existing user Error: %@", err); + + VerifyOrReturn(CheckValue("status", err, 0)); + + { + id actualValue = values.status; + VerifyOrReturn(CheckValue("status", actualValue, 0)); + } + + { + id actualValue = values.userIndex; + VerifyOrReturn(CheckValueNull("userIndex", actualValue)); + } + + { + id actualValue = values.nextCredentialIndex; + VerifyOrReturn(CheckValueNonNull("nextCredentialIndex", actualValue)); + VerifyOrReturn(CheckValue("nextCredentialIndex", actualValue, 3U)); + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestCreateThirdPinCredentialAndAddItToExistingUser_109() + { + CHIPDevice * device = GetDevice("alpha"); + CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + __auto_type * params = [[CHIPDoorLockClusterSetCredentialParams alloc] init]; + params.operationType = [NSNumber numberWithUnsignedChar:0]; + params.credential = [[CHIPDoorLockClusterDlCredential alloc] init]; + ((CHIPDoorLockClusterDlCredential *) params.credential).credentialType = [NSNumber numberWithUnsignedChar:1]; + ((CHIPDoorLockClusterDlCredential *) params.credential).credentialIndex = [NSNumber numberWithUnsignedShort:3U]; + + params.credentialData = [[NSData alloc] initWithBytes:"000002" length:6]; + params.userIndex = [NSNumber numberWithUnsignedShort:1U]; + params.userStatus = nil; + params.userType = nil; + [cluster + setCredentialWithParams:params + completionHandler:^(CHIPDoorLockClusterSetCredentialResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"Create third PIN credential and add it to existing user Error: %@", err); + + VerifyOrReturn(CheckValue("status", err, 0)); + + { + id actualValue = values.status; + VerifyOrReturn(CheckValue("status", actualValue, 0)); + } + + { + id actualValue = values.userIndex; + VerifyOrReturn(CheckValueNull("userIndex", actualValue)); + } + + { + id actualValue = values.nextCredentialIndex; + VerifyOrReturn(CheckValueNonNull("nextCredentialIndex", actualValue)); + VerifyOrReturn(CheckValue("nextCredentialIndex", actualValue, 4U)); + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestCreateFourthPinCredentialAndAddItToExistingUser_110() + { + CHIPDevice * device = GetDevice("alpha"); + CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + __auto_type * params = [[CHIPDoorLockClusterSetCredentialParams alloc] init]; + params.operationType = [NSNumber numberWithUnsignedChar:0]; + params.credential = [[CHIPDoorLockClusterDlCredential alloc] init]; + ((CHIPDoorLockClusterDlCredential *) params.credential).credentialType = [NSNumber numberWithUnsignedChar:1]; + ((CHIPDoorLockClusterDlCredential *) params.credential).credentialIndex = [NSNumber numberWithUnsignedShort:4U]; + + params.credentialData = [[NSData alloc] initWithBytes:"000003" length:6]; + params.userIndex = [NSNumber numberWithUnsignedShort:1U]; + params.userStatus = nil; + params.userType = nil; + [cluster + setCredentialWithParams:params + completionHandler:^(CHIPDoorLockClusterSetCredentialResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"Create fourth PIN credential and add it to existing user Error: %@", err); + + VerifyOrReturn(CheckValue("status", err, 0)); + + { + id actualValue = values.status; + VerifyOrReturn(CheckValue("status", actualValue, 0)); + } + + { + id actualValue = values.userIndex; + VerifyOrReturn(CheckValueNull("userIndex", actualValue)); + } + + { + id actualValue = values.nextCredentialIndex; + VerifyOrReturn(CheckValueNonNull("nextCredentialIndex", actualValue)); + VerifyOrReturn(CheckValue("nextCredentialIndex", actualValue, 5U)); + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestCreateFifthPinCredentialAndAddItToExistingUser_111() + { + CHIPDevice * device = GetDevice("alpha"); + CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + __auto_type * params = [[CHIPDoorLockClusterSetCredentialParams alloc] init]; + params.operationType = [NSNumber numberWithUnsignedChar:0]; + params.credential = [[CHIPDoorLockClusterDlCredential alloc] init]; + ((CHIPDoorLockClusterDlCredential *) params.credential).credentialType = [NSNumber numberWithUnsignedChar:1]; + ((CHIPDoorLockClusterDlCredential *) params.credential).credentialIndex = [NSNumber numberWithUnsignedShort:5U]; + + params.credentialData = [[NSData alloc] initWithBytes:"000004" length:6]; + params.userIndex = [NSNumber numberWithUnsignedShort:1U]; + params.userStatus = nil; + params.userType = nil; + [cluster + setCredentialWithParams:params + completionHandler:^(CHIPDoorLockClusterSetCredentialResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"Create fifth PIN credential and add it to existing user Error: %@", err); + + VerifyOrReturn(CheckValue("status", err, 0)); + + { + id actualValue = values.status; + VerifyOrReturn(CheckValue("status", actualValue, 0)); + } + + { + id actualValue = values.userIndex; + VerifyOrReturn(CheckValueNull("userIndex", actualValue)); + } + + { + id actualValue = values.nextCredentialIndex; + VerifyOrReturn(CheckValueNonNull("nextCredentialIndex", actualValue)); + VerifyOrReturn(CheckValue("nextCredentialIndex", actualValue, 6U)); + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestTryToCreateSixthPinCredentialAndMakeSureItFails_112() + { + CHIPDevice * device = GetDevice("alpha"); + CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + __auto_type * params = [[CHIPDoorLockClusterSetCredentialParams alloc] init]; + params.operationType = [NSNumber numberWithUnsignedChar:0]; + params.credential = [[CHIPDoorLockClusterDlCredential alloc] init]; + ((CHIPDoorLockClusterDlCredential *) params.credential).credentialType = [NSNumber numberWithUnsignedChar:1]; + ((CHIPDoorLockClusterDlCredential *) params.credential).credentialIndex = [NSNumber numberWithUnsignedShort:6U]; + + params.credentialData = [[NSData alloc] initWithBytes:"000005" length:6]; + params.userIndex = [NSNumber numberWithUnsignedShort:1U]; + params.userStatus = nil; + params.userType = nil; + [cluster + setCredentialWithParams:params + completionHandler:^(CHIPDoorLockClusterSetCredentialResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"Try to create sixth PIN credential and make sure it fails Error: %@", err); + + VerifyOrReturn(CheckValue("status", err, 0)); + + { + id actualValue = values.status; + VerifyOrReturn(CheckValue("status", actualValue, 137)); + } + + { + id actualValue = values.userIndex; + VerifyOrReturn(CheckValueNull("userIndex", actualValue)); + } + + { + id actualValue = values.nextCredentialIndex; + VerifyOrReturn(CheckValueNonNull("nextCredentialIndex", actualValue)); + VerifyOrReturn(CheckValue("nextCredentialIndex", actualValue, 7U)); + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } }; class DL_LockUnlock : public TestCommandBridge { diff --git a/zzz_generated/chip-tool/zap-generated/cluster/Commands.h b/zzz_generated/chip-tool/zap-generated/cluster/Commands.h index bb03595cd2ffd4..680dd33c486bf4 100644 --- a/zzz_generated/chip-tool/zap-generated/cluster/Commands.h +++ b/zzz_generated/chip-tool/zap-generated/cluster/Commands.h @@ -7409,6 +7409,7 @@ class WriteShadeConfigurationMode : public WriteAttribute | * MaxRFIDCodeLength | 0x0019 | | * MinRFIDCodeLength | 0x001A | | * CredentialRulesSupport | 0x001B | +| * NumberOfCredentialsSupportedPerUser | 0x001C | | * EnableLogging | 0x0020 | | * Language | 0x0021 | | * LEDSettings | 0x0022 | @@ -22097,12 +22098,14 @@ void registerClusterDoorLock(Commands & commands, CredentialIssuerCommands * cre make_unique(Id, "number-of-year-day-schedules-supported-per-user", Attributes::NumberOfYearDaySchedulesSupportedPerUser::Id, credsIssuerConfig), // make_unique(Id, "number-of-holiday-schedules-supported", Attributes::NumberOfHolidaySchedulesSupported::Id, - credsIssuerConfig), // - make_unique(Id, "max-pincode-length", Attributes::MaxPINCodeLength::Id, credsIssuerConfig), // - make_unique(Id, "min-pincode-length", Attributes::MinPINCodeLength::Id, credsIssuerConfig), // - make_unique(Id, "max-rfidcode-length", Attributes::MaxRFIDCodeLength::Id, credsIssuerConfig), // - make_unique(Id, "min-rfidcode-length", Attributes::MinRFIDCodeLength::Id, credsIssuerConfig), // - make_unique(Id, "credential-rules-support", Attributes::CredentialRulesSupport::Id, credsIssuerConfig), // + credsIssuerConfig), // + make_unique(Id, "max-pincode-length", Attributes::MaxPINCodeLength::Id, credsIssuerConfig), // + make_unique(Id, "min-pincode-length", Attributes::MinPINCodeLength::Id, credsIssuerConfig), // + make_unique(Id, "max-rfidcode-length", Attributes::MaxRFIDCodeLength::Id, credsIssuerConfig), // + make_unique(Id, "min-rfidcode-length", Attributes::MinRFIDCodeLength::Id, credsIssuerConfig), // + make_unique(Id, "credential-rules-support", Attributes::CredentialRulesSupport::Id, credsIssuerConfig), // + make_unique(Id, "number-of-credentials-supported-per-user", + Attributes::NumberOfCredentialsSupportedPerUser::Id, credsIssuerConfig), // make_unique(Id, "enable-logging", Attributes::EnableLogging::Id, credsIssuerConfig), // make_unique(Id, "language", Attributes::Language::Id, credsIssuerConfig), // make_unique(Id, "ledsettings", Attributes::LEDSettings::Id, credsIssuerConfig), // @@ -22199,7 +22202,9 @@ void registerClusterDoorLock(Commands & commands, CredentialIssuerCommands * cre make_unique(Id, "max-rfidcode-length", Attributes::MaxRFIDCodeLength::Id, credsIssuerConfig), // make_unique(Id, "min-rfidcode-length", Attributes::MinRFIDCodeLength::Id, credsIssuerConfig), // make_unique(Id, "credential-rules-support", Attributes::CredentialRulesSupport::Id, - credsIssuerConfig), // + credsIssuerConfig), // + make_unique(Id, "number-of-credentials-supported-per-user", + Attributes::NumberOfCredentialsSupportedPerUser::Id, credsIssuerConfig), // make_unique(Id, "enable-logging", Attributes::EnableLogging::Id, credsIssuerConfig), // make_unique(Id, "language", Attributes::Language::Id, credsIssuerConfig), // make_unique(Id, "ledsettings", Attributes::LEDSettings::Id, credsIssuerConfig), // 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 c97f85dc5a2222..abd30ebf4cde7a 100644 --- a/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.cpp +++ b/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.cpp @@ -3770,6 +3770,8 @@ CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, DataModelLogger::LogString(label, indent, "{"); ReturnErrorOnFailure(DataModelLogger::LogValue("credentialExists", indent + 1, value.credentialExists)); ReturnErrorOnFailure(DataModelLogger::LogValue("userIndex", indent + 1, value.userIndex)); + ReturnErrorOnFailure(DataModelLogger::LogValue("creatorFabricIndex", indent + 1, value.creatorFabricIndex)); + ReturnErrorOnFailure(DataModelLogger::LogValue("lastModifiedFabricIndex", indent + 1, value.lastModifiedFabricIndex)); ReturnErrorOnFailure(DataModelLogger::LogValue("nextCredentialIndex", indent + 1, value.nextCredentialIndex)); DataModelLogger::LogString(indent, "}"); return CHIP_NO_ERROR; @@ -5631,6 +5633,11 @@ CHIP_ERROR DataModelLogger::LogAttribute(const chip::app::ConcreteDataAttributeP ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("CredentialRulesSupport", 1, value); } + case DoorLock::Attributes::NumberOfCredentialsSupportedPerUser::Id: { + uint8_t value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("NumberOfCredentialsSupportedPerUser", 1, value); + } case DoorLock::Attributes::EnableLogging::Id: { bool value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); diff --git a/zzz_generated/chip-tool/zap-generated/test/Commands.h b/zzz_generated/chip-tool/zap-generated/test/Commands.h index 54f6b7d2e28e27..abc4d179171fa0 100644 --- a/zzz_generated/chip-tool/zap-generated/test/Commands.h +++ b/zzz_generated/chip-tool/zap-generated/test/Commands.h @@ -21072,11 +21072,11 @@ class Test_TC_MF_1_3Suite : public TestCommand chip::app::Clusters::AdministratorCommissioning::Commands::OpenCommissioningWindow::Type value; value.commissioningTimeout = 180U; value.PAKEVerifier = chip::ByteSpan( - chip::Uint8::from_const_char("\006\307V\337\374\327\042e4R\241-\315\224]\214T\332+\017<\275\033M\303\361\255\262#" - "\256\262k\004|\322L\226\206o\227\233\035\203\354P\342\264\2560\315\362\375\263+" - "\330\242\021\2707\334\224\355\315V\364\321Cw\031\020v\277\305\235\231\267\3350S\357" - "\326\360,D4\362\275\322z\244\371\316\247\015s\216Lgarbage: not in length on purpose"), - 97); + chip::Uint8::from_const_char("\006\307V\337\374\327\042e4R\241-\315\224]\214T\332+\017<\275\033M\303\361\255\262#" + "\256\262k\004|\322L\226\206o\227\233\035\203\354P\342\264\2560\315\362\375\263+" + "\330\242\021\2707\334\224\355\315V\364\321Cw\031\020v\277\305\235\231\267\3350S\357" + "\326\360,D4\362\275\322z\244\371\316\247\015s\216Lgarbage: not in length on purpose"), + 97); value.discriminator = mDiscriminator.HasValue() ? mDiscriminator.Value() : 3840U; value.iterations = 1000UL; value.salt = chip::ByteSpan(chip::Uint8::from_const_char("SPAKE2P Key Saltgarbage: not in length on purpose"), 16); @@ -21506,11 +21506,11 @@ class Test_TC_MF_1_5Suite : public TestCommand chip::app::Clusters::AdministratorCommissioning::Commands::OpenCommissioningWindow::Type value; value.commissioningTimeout = 180U; value.PAKEVerifier = chip::ByteSpan( - chip::Uint8::from_const_char("\006\307V\337\374\327\042e4R\241-\315\224]\214T\332+\017<\275\033M\303\361\255\262#" - "\256\262k\004|\322L\226\206o\227\233\035\203\354P\342\264\2560\315\362\375\263+" - "\330\242\021\2707\334\224\355\315V\364\321Cw\031\020v\277\305\235\231\267\3350S\357" - "\326\360,D4\362\275\322z\244\371\316\247\015s\216Lgarbage: not in length on purpose"), - 97); + chip::Uint8::from_const_char("\006\307V\337\374\327\042e4R\241-\315\224]\214T\332+\017<\275\033M\303\361\255\262#" + "\256\262k\004|\322L\226\206o\227\233\035\203\354P\342\264\2560\315\362\375\263+" + "\330\242\021\2707\334\224\355\315V\364\321Cw\031\020v\277\305\235\231\267\3350S\357" + "\326\360,D4\362\275\322z\244\371\316\247\015s\216Lgarbage: not in length on purpose"), + 97); value.discriminator = 3840U; value.iterations = 1000UL; value.salt = chip::ByteSpan(chip::Uint8::from_const_char("SPAKE2P Key Saltgarbage: not in length on purpose"), 16); @@ -21554,11 +21554,11 @@ class Test_TC_MF_1_5Suite : public TestCommand chip::app::Clusters::AdministratorCommissioning::Commands::OpenCommissioningWindow::Type value; value.commissioningTimeout = 180U; value.PAKEVerifier = chip::ByteSpan( - chip::Uint8::from_const_char("\006\307V\337\374\327\042e4R\241-\315\224]\214T\332+\017<\275\033M\303\361\255\262#" - "\256\262k\004|\322L\226\206o\227\233\035\203\354P\342\264\2560\315\362\375\263+" - "\330\242\021\2707\334\224\355\315V\364\321Cw\031\020v\277\305\235\231\267\3350S\357" - "\326\360,D4\362\275\322z\244\371\316\247\015s\216Lgarbage: not in length on purpose"), - 97); + chip::Uint8::from_const_char("\006\307V\337\374\327\042e4R\241-\315\224]\214T\332+\017<\275\033M\303\361\255\262#" + "\256\262k\004|\322L\226\206o\227\233\035\203\354P\342\264\2560\315\362\375\263+" + "\330\242\021\2707\334\224\355\315V\364\321Cw\031\020v\277\305\235\231\267\3350S\357" + "\326\360,D4\362\275\322z\244\371\316\247\015s\216Lgarbage: not in length on purpose"), + 97); value.discriminator = 3840U; value.iterations = 1000UL; value.salt = chip::ByteSpan(chip::Uint8::from_const_char("SPAKE2P Key Saltgarbage: not in length on purpose"), 16); @@ -21602,11 +21602,11 @@ class Test_TC_MF_1_5Suite : public TestCommand chip::app::Clusters::AdministratorCommissioning::Commands::OpenCommissioningWindow::Type value; value.commissioningTimeout = 180U; value.PAKEVerifier = chip::ByteSpan( - chip::Uint8::from_const_char("\006\307V\337\374\327\042e4R\241-\315\224]\214T\332+\017<\275\033M\303\361\255\262#" - "\256\262k\004|\322L\226\206o\227\233\035\203\354P\342\264\2560\315\362\375\263+" - "\330\242\021\2707\334\224\355\315V\364\321Cw\031\020v\277\305\235\231\267\3350S\357" - "\326\360,D4\362\275\322z\244\371\316\247\015s\216Lgarbage: not in length on purpose"), - 97); + chip::Uint8::from_const_char("\006\307V\337\374\327\042e4R\241-\315\224]\214T\332+\017<\275\033M\303\361\255\262#" + "\256\262k\004|\322L\226\206o\227\233\035\203\354P\342\264\2560\315\362\375\263+" + "\330\242\021\2707\334\224\355\315V\364\321Cw\031\020v\277\305\235\231\267\3350S\357" + "\326\360,D4\362\275\322z\244\371\316\247\015s\216Lgarbage: not in length on purpose"), + 97); value.discriminator = 3840U; value.iterations = 1000UL; value.salt = chip::ByteSpan(chip::Uint8::from_const_char("SPAKE2P Key Saltgarbage: not in length on purpose"), 16); @@ -22127,11 +22127,11 @@ class Test_TC_MF_1_15Suite : public TestCommand chip::app::Clusters::AdministratorCommissioning::Commands::OpenCommissioningWindow::Type value; value.commissioningTimeout = 180U; value.PAKEVerifier = chip::ByteSpan( - chip::Uint8::from_const_char("\006\307V\337\374\327\042e4R\241-\315\224]\214T\332+\017<\275\033M\303\361\255\262#" - "\256\262k\004|\322L\226\206o\227\233\035\203\354P\342\264\2560\315\362\375\263+" - "\330\242\021\2707\334\224\355\315V\364\321Cw\031\020v\277\305\235\231\267\3350S\357" - "\326\360,D4\362\275\322z\244\371\316\247\015s\216Lgarbage: not in length on purpose"), - 97); + chip::Uint8::from_const_char("\006\307V\337\374\327\042e4R\241-\315\224]\214T\332+\017<\275\033M\303\361\255\262#" + "\256\262k\004|\322L\226\206o\227\233\035\203\354P\342\264\2560\315\362\375\263+" + "\330\242\021\2707\334\224\355\315V\364\321Cw\031\020v\277\305\235\231\267\3350S\357" + "\326\360,D4\362\275\322z\244\371\316\247\015s\216Lgarbage: not in length on purpose"), + 97); value.discriminator = 3840U; value.iterations = 1000UL; value.salt = chip::ByteSpan(chip::Uint8::from_const_char("SPAKE2P Key Saltgarbage: not in length on purpose"), 16); @@ -22173,11 +22173,11 @@ class Test_TC_MF_1_15Suite : public TestCommand chip::app::Clusters::AdministratorCommissioning::Commands::OpenCommissioningWindow::Type value; value.commissioningTimeout = 180U; value.PAKEVerifier = chip::ByteSpan( - chip::Uint8::from_const_char("\006\307V\337\374\327\042e4R\241-\315\224]\214T\332+\017<\275\033M\303\361\255\262#" - "\256\262k\004|\322L\226\206o\227\233\035\203\354P\342\264\2560\315\362\375\263+" - "\330\242\021\2707\334\224\355\315V\364\321Cw\031\020v\277\305\235\231\267\3350S\357" - "\326\360,D4\362\275\322z\244\371\316\247\015s\216Lgarbage: not in length on purpose"), - 97); + chip::Uint8::from_const_char("\006\307V\337\374\327\042e4R\241-\315\224]\214T\332+\017<\275\033M\303\361\255\262#" + "\256\262k\004|\322L\226\206o\227\233\035\203\354P\342\264\2560\315\362\375\263+" + "\330\242\021\2707\334\224\355\315V\364\321Cw\031\020v\277\305\235\231\267\3350S\357" + "\326\360,D4\362\275\322z\244\371\316\247\015s\216Lgarbage: not in length on purpose"), + 97); value.discriminator = 3840U; value.iterations = 1000UL; value.salt = chip::ByteSpan(chip::Uint8::from_const_char("SPAKE2P Key Saltgarbage: not in length on purpose"), 16); @@ -22190,11 +22190,11 @@ class Test_TC_MF_1_15Suite : public TestCommand chip::app::Clusters::AdministratorCommissioning::Commands::OpenCommissioningWindow::Type value; value.commissioningTimeout = 180U; value.PAKEVerifier = chip::ByteSpan( - chip::Uint8::from_const_char("\006\307V\337\374\327\042e4R\241-\315\224]\214T\332+\017<\275\033M\303\361\255\262#" - "\256\262k\004|\322L\226\206o\227\233\035\203\354P\342\264\2560\315\362\375\263+" - "\330\242\021\2707\334\224\355\315V\364\321Cw\031\020v\277\305\235\231\267\3350S\357" - "\326\360,D4\362\275\322z\244\371\316\247\015s\216Lgarbage: not in length on purpose"), - 97); + chip::Uint8::from_const_char("\006\307V\337\374\327\042e4R\241-\315\224]\214T\332+\017<\275\033M\303\361\255\262#" + "\256\262k\004|\322L\226\206o\227\233\035\203\354P\342\264\2560\315\362\375\263+" + "\330\242\021\2707\334\224\355\315V\364\321Cw\031\020v\277\305\235\231\267\3350S\357" + "\326\360,D4\362\275\322z\244\371\316\247\015s\216Lgarbage: not in length on purpose"), + 97); value.discriminator = 3840U; value.iterations = 1000UL; value.salt = chip::ByteSpan(chip::Uint8::from_const_char("SPAKE2P Key Saltgarbage: not in length on purpose"), 16); @@ -22236,11 +22236,11 @@ class Test_TC_MF_1_15Suite : public TestCommand chip::app::Clusters::AdministratorCommissioning::Commands::OpenCommissioningWindow::Type value; value.commissioningTimeout = 180U; value.PAKEVerifier = chip::ByteSpan( - chip::Uint8::from_const_char("\006\307V\337\374\327\042e4R\241-\315\224]\214T\332+\017<\275\033M\303\361\255\262#" - "\256\262k\004|\322L\226\206o\227\233\035\203\354P\342\264\2560\315\362\375\263+" - "\330\242\021\2707\334\224\355\315V\364\321Cw\031\020v\277\305\235\231\267\3350S\357" - "\326\360,D4\362\275\322z\244\371\316\247\015s\216Lgarbage: not in length on purpose"), - 97); + chip::Uint8::from_const_char("\006\307V\337\374\327\042e4R\241-\315\224]\214T\332+\017<\275\033M\303\361\255\262#" + "\256\262k\004|\322L\226\206o\227\233\035\203\354P\342\264\2560\315\362\375\263+" + "\330\242\021\2707\334\224\355\315V\364\321Cw\031\020v\277\305\235\231\267\3350S\357" + "\326\360,D4\362\275\322z\244\371\316\247\015s\216Lgarbage: not in length on purpose"), + 97); value.discriminator = 3840U; value.iterations = 1000UL; value.salt = chip::ByteSpan(chip::Uint8::from_const_char("SPAKE2P Key Saltgarbage: not in length on purpose"), 16); @@ -22253,11 +22253,11 @@ class Test_TC_MF_1_15Suite : public TestCommand chip::app::Clusters::AdministratorCommissioning::Commands::OpenCommissioningWindow::Type value; value.commissioningTimeout = 180U; value.PAKEVerifier = chip::ByteSpan( - chip::Uint8::from_const_char("\006\307V\337\374\327\042e4R\241-\315\224]\214T\332+\017<\275\033M\303\361\255\262#" - "\256\262k\004|\322L\226\206o\227\233\035\203\354P\342\264\2560\315\362\375\263+" - "\330\242\021\2707\334\224\355\315V\364\321Cw\031\020v\277\305\235\231\267\3350S\357" - "\326\360,D4\362\275\322z\244\371\316\247\015s\216Lgarbage: not in length on purpose"), - 97); + chip::Uint8::from_const_char("\006\307V\337\374\327\042e4R\241-\315\224]\214T\332+\017<\275\033M\303\361\255\262#" + "\256\262k\004|\322L\226\206o\227\233\035\203\354P\342\264\2560\315\362\375\263+" + "\330\242\021\2707\334\224\355\315V\364\321Cw\031\020v\277\305\235\231\267\3350S\357" + "\326\360,D4\362\275\322z\244\371\316\247\015s\216Lgarbage: not in length on purpose"), + 97); value.discriminator = 3840U; value.iterations = 1000UL; value.salt = chip::ByteSpan(chip::Uint8::from_const_char("SPAKE2P Key Saltgarbage: not in length on purpose"), 16); @@ -50463,7 +50463,7 @@ class DL_UsersAndCredentialsSuite : public TestCommand { public: DL_UsersAndCredentialsSuite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("DL_UsersAndCredentials", 102, credsIssuerConfig) + TestCommand("DL_UsersAndCredentials", 113, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -51032,6 +51032,10 @@ class DL_UsersAndCredentialsSuite : public TestCommand VerifyOrReturn(CheckValueNull("userIndex", value.userIndex)); + VerifyOrReturn(CheckValueNull("creatorFabricIndex", value.creatorFabricIndex)); + + VerifyOrReturn(CheckValueNull("lastModifiedFabricIndex", value.lastModifiedFabricIndex)); + VerifyOrReturn(CheckValueNonNull("nextCredentialIndex", value.nextCredentialIndex)); VerifyOrReturn(CheckValue("nextCredentialIndex.Value()", value.nextCredentialIndex.Value(), 2U)); } @@ -51106,6 +51110,12 @@ class DL_UsersAndCredentialsSuite : public TestCommand VerifyOrReturn(CheckValueNonNull("userIndex", value.userIndex)); VerifyOrReturn(CheckValue("userIndex.Value()", value.userIndex.Value(), 1U)); + VerifyOrReturn(CheckValueNonNull("creatorFabricIndex", value.creatorFabricIndex)); + VerifyOrReturn(CheckValue("creatorFabricIndex.Value()", value.creatorFabricIndex.Value(), 1)); + + VerifyOrReturn(CheckValueNonNull("lastModifiedFabricIndex", value.lastModifiedFabricIndex)); + VerifyOrReturn(CheckValue("lastModifiedFabricIndex.Value()", value.lastModifiedFabricIndex.Value(), 1)); + VerifyOrReturn(CheckValueNonNull("nextCredentialIndex", value.nextCredentialIndex)); VerifyOrReturn(CheckValue("nextCredentialIndex.Value()", value.nextCredentialIndex.Value(), 2U)); } @@ -51160,6 +51170,10 @@ class DL_UsersAndCredentialsSuite : public TestCommand VerifyOrReturn(CheckValueNull("userIndex", value.userIndex)); + VerifyOrReturn(CheckValueNull("creatorFabricIndex", value.creatorFabricIndex)); + + VerifyOrReturn(CheckValueNull("lastModifiedFabricIndex", value.lastModifiedFabricIndex)); + VerifyOrReturn(CheckValueNonNull("nextCredentialIndex", value.nextCredentialIndex)); VerifyOrReturn(CheckValue("nextCredentialIndex.Value()", value.nextCredentialIndex.Value(), 3U)); } @@ -51230,6 +51244,12 @@ class DL_UsersAndCredentialsSuite : public TestCommand VerifyOrReturn(CheckValueNonNull("userIndex", value.userIndex)); VerifyOrReturn(CheckValue("userIndex.Value()", value.userIndex.Value(), 1U)); + VerifyOrReturn(CheckValueNonNull("creatorFabricIndex", value.creatorFabricIndex)); + VerifyOrReturn(CheckValue("creatorFabricIndex.Value()", value.creatorFabricIndex.Value(), 1)); + + VerifyOrReturn(CheckValueNonNull("lastModifiedFabricIndex", value.lastModifiedFabricIndex)); + VerifyOrReturn(CheckValue("lastModifiedFabricIndex.Value()", value.lastModifiedFabricIndex.Value(), 1)); + VerifyOrReturn(CheckValueNonNull("nextCredentialIndex", value.nextCredentialIndex)); VerifyOrReturn(CheckValue("nextCredentialIndex.Value()", value.nextCredentialIndex.Value(), 3U)); } @@ -51264,7 +51284,7 @@ class DL_UsersAndCredentialsSuite : public TestCommand { chip::app::Clusters::DoorLock::Commands::SetCredentialResponse::DecodableType value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("status", value.status, 3)); + VerifyOrReturn(CheckValue("status", value.status, 133)); VerifyOrReturn(CheckValueNull("userIndex", value.userIndex)); @@ -51355,12 +51375,12 @@ class DL_UsersAndCredentialsSuite : public TestCommand { chip::app::Clusters::DoorLock::Commands::SetCredentialResponse::DecodableType value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("status", value.status, 133)); + VerifyOrReturn(CheckValue("status", value.status, 2)); VerifyOrReturn(CheckValueNull("userIndex", value.userIndex)); VerifyOrReturn(CheckValueNonNull("nextCredentialIndex", value.nextCredentialIndex)); - VerifyOrReturn(CheckValue("nextCredentialIndex.Value()", value.nextCredentialIndex.Value(), 4U)); + VerifyOrReturn(CheckValue("nextCredentialIndex.Value()", value.nextCredentialIndex.Value(), 5U)); } break; case 61: @@ -51381,12 +51401,12 @@ class DL_UsersAndCredentialsSuite : public TestCommand { chip::app::Clusters::DoorLock::Commands::SetCredentialResponse::DecodableType value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("status", value.status, 2)); + VerifyOrReturn(CheckValue("status", value.status, 0)); VerifyOrReturn(CheckValueNull("userIndex", value.userIndex)); VerifyOrReturn(CheckValueNonNull("nextCredentialIndex", value.nextCredentialIndex)); - VerifyOrReturn(CheckValue("nextCredentialIndex.Value()", value.nextCredentialIndex.Value(), 5U)); + VerifyOrReturn(CheckValue("nextCredentialIndex.Value()", value.nextCredentialIndex.Value(), 3U)); } break; case 63: @@ -51396,10 +51416,11 @@ class DL_UsersAndCredentialsSuite : public TestCommand VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValue("status", value.status, 0)); - VerifyOrReturn(CheckValueNull("userIndex", value.userIndex)); + VerifyOrReturn(CheckValueNonNull("userIndex", value.userIndex)); + VerifyOrReturn(CheckValue("userIndex.Value()", value.userIndex.Value(), 2U)); VerifyOrReturn(CheckValueNonNull("nextCredentialIndex", value.nextCredentialIndex)); - VerifyOrReturn(CheckValue("nextCredentialIndex.Value()", value.nextCredentialIndex.Value(), 3U)); + VerifyOrReturn(CheckValue("nextCredentialIndex.Value()", value.nextCredentialIndex.Value(), 4U)); } break; case 64: @@ -51407,13 +51428,12 @@ class DL_UsersAndCredentialsSuite : public TestCommand { chip::app::Clusters::DoorLock::Commands::SetCredentialResponse::DecodableType value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("status", value.status, 0)); + VerifyOrReturn(CheckValue("status", value.status, 2)); - VerifyOrReturn(CheckValueNonNull("userIndex", value.userIndex)); - VerifyOrReturn(CheckValue("userIndex.Value()", value.userIndex.Value(), 2U)); + VerifyOrReturn(CheckValueNull("userIndex", value.userIndex)); VerifyOrReturn(CheckValueNonNull("nextCredentialIndex", value.nextCredentialIndex)); - VerifyOrReturn(CheckValue("nextCredentialIndex.Value()", value.nextCredentialIndex.Value(), 4U)); + VerifyOrReturn(CheckValue("nextCredentialIndex.Value()", value.nextCredentialIndex.Value(), 5U)); } break; case 65: @@ -51421,7 +51441,7 @@ class DL_UsersAndCredentialsSuite : public TestCommand { chip::app::Clusters::DoorLock::Commands::SetCredentialResponse::DecodableType value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("status", value.status, 2)); + VerifyOrReturn(CheckValue("status", value.status, 0)); VerifyOrReturn(CheckValueNull("userIndex", value.userIndex)); @@ -51431,18 +51451,61 @@ class DL_UsersAndCredentialsSuite : public TestCommand break; case 66: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::Clusters::DoorLock::Commands::GetUserResponse::DecodableType value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("userIndex", value.userIndex, 1U)); + + VerifyOrReturn(CheckValueNonNull("userName", value.userName)); + VerifyOrReturn(CheckValueAsString("userName.Value()", value.userName.Value(), chip::CharSpan("", 0))); + + VerifyOrReturn(CheckValueNull("userUniqueId", value.userUniqueId)); + + VerifyOrReturn(CheckValueNonNull("userStatus", value.userStatus)); + VerifyOrReturn(CheckValue("userStatus.Value()", value.userStatus.Value(), 1)); + + VerifyOrReturn(CheckValueNonNull("userType", value.userType)); + VerifyOrReturn(CheckValue("userType.Value()", value.userType.Value(), 0)); + + VerifyOrReturn(CheckValueNonNull("credentialRule", value.credentialRule)); + VerifyOrReturn(CheckValue("credentialRule.Value()", value.credentialRule.Value(), 0)); + + VerifyOrReturn(CheckValueNonNull("credentials", value.credentials)); + { + auto iter_1 = value.credentials.Value().begin(); + VerifyOrReturn(CheckNextListItemDecodes("credentials.Value()", iter_1, 0)); + VerifyOrReturn(CheckValue("credentials.Value()[0].credentialType", iter_1.GetValue().credentialType, 1)); + VerifyOrReturn(CheckValue("credentials.Value()[0].credentialIndex", iter_1.GetValue().credentialIndex, 1U)); + VerifyOrReturn(CheckNextListItemDecodes("credentials.Value()", iter_1, 1)); + VerifyOrReturn(CheckValue("credentials.Value()[1].credentialType", iter_1.GetValue().credentialType, 2)); + VerifyOrReturn(CheckValue("credentials.Value()[1].credentialIndex", iter_1.GetValue().credentialIndex, 2U)); + VerifyOrReturn(CheckNextListItemDecodes("credentials.Value()", iter_1, 2)); + VerifyOrReturn(CheckValue("credentials.Value()[2].credentialType", iter_1.GetValue().credentialType, 2)); + VerifyOrReturn(CheckValue("credentials.Value()[2].credentialIndex", iter_1.GetValue().credentialIndex, 4U)); + VerifyOrReturn(CheckNoMoreListItems("credentials.Value()", iter_1, 3)); + } + + VerifyOrReturn(CheckValueNonNull("creatorFabricIndex", value.creatorFabricIndex)); + VerifyOrReturn(CheckValue("creatorFabricIndex.Value()", value.creatorFabricIndex.Value(), 1)); + + VerifyOrReturn(CheckValueNonNull("lastModifiedFabricIndex", value.lastModifiedFabricIndex)); + VerifyOrReturn(CheckValue("lastModifiedFabricIndex.Value()", value.lastModifiedFabricIndex.Value(), 1)); + + VerifyOrReturn(CheckValueNonNull("nextUserIndex", value.nextUserIndex)); + VerifyOrReturn(CheckValue("nextUserIndex.Value()", value.nextUserIndex.Value(), 3U)); + } break; case 67: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - chip::app::Clusters::DoorLock::Commands::GetCredentialStatusResponse::DecodableType value; + chip::app::Clusters::DoorLock::Commands::SetCredentialResponse::DecodableType value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("credentialExists", value.credentialExists, false)); + VerifyOrReturn(CheckValue("status", value.status, 0)); VerifyOrReturn(CheckValueNull("userIndex", value.userIndex)); VerifyOrReturn(CheckValueNonNull("nextCredentialIndex", value.nextCredentialIndex)); - VerifyOrReturn(CheckValue("nextCredentialIndex.Value()", value.nextCredentialIndex.Value(), 4U)); + VerifyOrReturn(CheckValue("nextCredentialIndex.Value()", value.nextCredentialIndex.Value(), 6U)); } break; case 68: @@ -51470,9 +51533,18 @@ class DL_UsersAndCredentialsSuite : public TestCommand { auto iter_1 = value.credentials.Value().begin(); VerifyOrReturn(CheckNextListItemDecodes("credentials.Value()", iter_1, 0)); - VerifyOrReturn(CheckValue("credentials.Value()[0].credentialType", iter_1.GetValue().credentialType, 2)); - VerifyOrReturn(CheckValue("credentials.Value()[0].credentialIndex", iter_1.GetValue().credentialIndex, 2U)); - VerifyOrReturn(CheckNoMoreListItems("credentials.Value()", iter_1, 1)); + VerifyOrReturn(CheckValue("credentials.Value()[0].credentialType", iter_1.GetValue().credentialType, 1)); + VerifyOrReturn(CheckValue("credentials.Value()[0].credentialIndex", iter_1.GetValue().credentialIndex, 1U)); + VerifyOrReturn(CheckNextListItemDecodes("credentials.Value()", iter_1, 1)); + VerifyOrReturn(CheckValue("credentials.Value()[1].credentialType", iter_1.GetValue().credentialType, 2)); + VerifyOrReturn(CheckValue("credentials.Value()[1].credentialIndex", iter_1.GetValue().credentialIndex, 2U)); + VerifyOrReturn(CheckNextListItemDecodes("credentials.Value()", iter_1, 2)); + VerifyOrReturn(CheckValue("credentials.Value()[2].credentialType", iter_1.GetValue().credentialType, 2)); + VerifyOrReturn(CheckValue("credentials.Value()[2].credentialIndex", iter_1.GetValue().credentialIndex, 4U)); + VerifyOrReturn(CheckNextListItemDecodes("credentials.Value()", iter_1, 3)); + VerifyOrReturn(CheckValue("credentials.Value()[3].credentialType", iter_1.GetValue().credentialType, 1)); + VerifyOrReturn(CheckValue("credentials.Value()[3].credentialIndex", iter_1.GetValue().credentialIndex, 5U)); + VerifyOrReturn(CheckNoMoreListItems("credentials.Value()", iter_1, 4)); } VerifyOrReturn(CheckValueNonNull("creatorFabricIndex", value.creatorFabricIndex)); @@ -51497,11 +51569,81 @@ class DL_UsersAndCredentialsSuite : public TestCommand VerifyOrReturn(CheckValueNull("userIndex", value.userIndex)); + VerifyOrReturn(CheckValueNull("creatorFabricIndex", value.creatorFabricIndex)); + + VerifyOrReturn(CheckValueNull("lastModifiedFabricIndex", value.lastModifiedFabricIndex)); + VerifyOrReturn(CheckValueNonNull("nextCredentialIndex", value.nextCredentialIndex)); - VerifyOrReturn(CheckValue("nextCredentialIndex.Value()", value.nextCredentialIndex.Value(), 4U)); + VerifyOrReturn(CheckValue("nextCredentialIndex.Value()", value.nextCredentialIndex.Value(), 6U)); } break; case 71: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::Clusters::DoorLock::Commands::GetUserResponse::DecodableType value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("userIndex", value.userIndex, 1U)); + + VerifyOrReturn(CheckValueNonNull("userName", value.userName)); + VerifyOrReturn(CheckValueAsString("userName.Value()", value.userName.Value(), chip::CharSpan("", 0))); + + VerifyOrReturn(CheckValueNull("userUniqueId", value.userUniqueId)); + + VerifyOrReturn(CheckValueNonNull("userStatus", value.userStatus)); + VerifyOrReturn(CheckValue("userStatus.Value()", value.userStatus.Value(), 1)); + + VerifyOrReturn(CheckValueNonNull("userType", value.userType)); + VerifyOrReturn(CheckValue("userType.Value()", value.userType.Value(), 0)); + + VerifyOrReturn(CheckValueNonNull("credentialRule", value.credentialRule)); + VerifyOrReturn(CheckValue("credentialRule.Value()", value.credentialRule.Value(), 0)); + + VerifyOrReturn(CheckValueNonNull("credentials", value.credentials)); + { + auto iter_1 = value.credentials.Value().begin(); + VerifyOrReturn(CheckNextListItemDecodes("credentials.Value()", iter_1, 0)); + VerifyOrReturn(CheckValue("credentials.Value()[0].credentialType", iter_1.GetValue().credentialType, 2)); + VerifyOrReturn(CheckValue("credentials.Value()[0].credentialIndex", iter_1.GetValue().credentialIndex, 2U)); + VerifyOrReturn(CheckNextListItemDecodes("credentials.Value()", iter_1, 1)); + VerifyOrReturn(CheckValue("credentials.Value()[1].credentialType", iter_1.GetValue().credentialType, 2)); + VerifyOrReturn(CheckValue("credentials.Value()[1].credentialIndex", iter_1.GetValue().credentialIndex, 4U)); + VerifyOrReturn(CheckNextListItemDecodes("credentials.Value()", iter_1, 2)); + VerifyOrReturn(CheckValue("credentials.Value()[2].credentialType", iter_1.GetValue().credentialType, 1)); + VerifyOrReturn(CheckValue("credentials.Value()[2].credentialIndex", iter_1.GetValue().credentialIndex, 5U)); + VerifyOrReturn(CheckNoMoreListItems("credentials.Value()", iter_1, 3)); + } + + VerifyOrReturn(CheckValueNonNull("creatorFabricIndex", value.creatorFabricIndex)); + VerifyOrReturn(CheckValue("creatorFabricIndex.Value()", value.creatorFabricIndex.Value(), 1)); + + VerifyOrReturn(CheckValueNonNull("lastModifiedFabricIndex", value.lastModifiedFabricIndex)); + VerifyOrReturn(CheckValue("lastModifiedFabricIndex.Value()", value.lastModifiedFabricIndex.Value(), 1)); + + VerifyOrReturn(CheckValueNonNull("nextUserIndex", value.nextUserIndex)); + VerifyOrReturn(CheckValue("nextUserIndex.Value()", value.nextUserIndex.Value(), 3U)); + } + break; + case 72: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 73: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::Clusters::DoorLock::Commands::GetCredentialStatusResponse::DecodableType value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("credentialExists", value.credentialExists, false)); + + VerifyOrReturn(CheckValueNull("userIndex", value.userIndex)); + + VerifyOrReturn(CheckValueNull("creatorFabricIndex", value.creatorFabricIndex)); + + VerifyOrReturn(CheckValueNull("lastModifiedFabricIndex", value.lastModifiedFabricIndex)); + + VerifyOrReturn(CheckValueNonNull("nextCredentialIndex", value.nextCredentialIndex)); + VerifyOrReturn(CheckValue("nextCredentialIndex.Value()", value.nextCredentialIndex.Value(), 6U)); + } + break; + case 74: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::Clusters::DoorLock::Commands::GetUserResponse::DecodableType value; @@ -51528,7 +51670,7 @@ class DL_UsersAndCredentialsSuite : public TestCommand VerifyOrReturn(CheckValue("nextUserIndex.Value()", value.nextUserIndex.Value(), 3U)); } break; - case 72: + case 75: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::Clusters::DoorLock::Commands::SetCredentialResponse::DecodableType value; @@ -51542,10 +51684,10 @@ class DL_UsersAndCredentialsSuite : public TestCommand VerifyOrReturn(CheckValue("nextCredentialIndex.Value()", value.nextCredentialIndex.Value(), 3U)); } break; - case 73: + case 76: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 74: + case 77: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::Clusters::DoorLock::Commands::GetCredentialStatusResponse::DecodableType value; @@ -51554,11 +51696,15 @@ class DL_UsersAndCredentialsSuite : public TestCommand VerifyOrReturn(CheckValueNull("userIndex", value.userIndex)); + VerifyOrReturn(CheckValueNull("creatorFabricIndex", value.creatorFabricIndex)); + + VerifyOrReturn(CheckValueNull("lastModifiedFabricIndex", value.lastModifiedFabricIndex)); + VerifyOrReturn(CheckValueNonNull("nextCredentialIndex", value.nextCredentialIndex)); VerifyOrReturn(CheckValue("nextCredentialIndex.Value()", value.nextCredentialIndex.Value(), 2U)); } break; - case 75: + case 78: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::Clusters::DoorLock::Commands::GetCredentialStatusResponse::DecodableType value; @@ -51567,38 +51713,72 @@ class DL_UsersAndCredentialsSuite : public TestCommand VerifyOrReturn(CheckValueNull("userIndex", value.userIndex)); + VerifyOrReturn(CheckValueNull("creatorFabricIndex", value.creatorFabricIndex)); + + VerifyOrReturn(CheckValueNull("lastModifiedFabricIndex", value.lastModifiedFabricIndex)); + VerifyOrReturn(CheckValueNonNull("nextCredentialIndex", value.nextCredentialIndex)); VerifyOrReturn(CheckValue("nextCredentialIndex.Value()", value.nextCredentialIndex.Value(), 3U)); } break; - case 76: + case 79: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::Clusters::DoorLock::Commands::GetCredentialStatusResponse::DecodableType value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("credentialExists", value.credentialExists, false)); + + VerifyOrReturn(CheckValueNull("userIndex", value.userIndex)); + + VerifyOrReturn(CheckValueNull("creatorFabricIndex", value.creatorFabricIndex)); + + VerifyOrReturn(CheckValueNull("lastModifiedFabricIndex", value.lastModifiedFabricIndex)); + + VerifyOrReturn(CheckValueNonNull("nextCredentialIndex", value.nextCredentialIndex)); + VerifyOrReturn(CheckValue("nextCredentialIndex.Value()", value.nextCredentialIndex.Value(), 6U)); + } + break; + case 80: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::Clusters::DoorLock::Commands::GetUserResponse::DecodableType value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValue("userIndex", value.userIndex, 1U)); - VerifyOrReturn(CheckValueNull("userName", value.userName)); + VerifyOrReturn(CheckValueNonNull("userName", value.userName)); + VerifyOrReturn(CheckValueAsString("userName.Value()", value.userName.Value(), chip::CharSpan("", 0))); VerifyOrReturn(CheckValueNull("userUniqueId", value.userUniqueId)); - VerifyOrReturn(CheckValueNull("userStatus", value.userStatus)); + VerifyOrReturn(CheckValueNonNull("userStatus", value.userStatus)); + VerifyOrReturn(CheckValue("userStatus.Value()", value.userStatus.Value(), 1)); - VerifyOrReturn(CheckValueNull("userType", value.userType)); + VerifyOrReturn(CheckValueNonNull("userType", value.userType)); + VerifyOrReturn(CheckValue("userType.Value()", value.userType.Value(), 0)); - VerifyOrReturn(CheckValueNull("credentialRule", value.credentialRule)); + VerifyOrReturn(CheckValueNonNull("credentialRule", value.credentialRule)); + VerifyOrReturn(CheckValue("credentialRule.Value()", value.credentialRule.Value(), 0)); - VerifyOrReturn(CheckValueNull("credentials", value.credentials)); + VerifyOrReturn(CheckValueNonNull("credentials", value.credentials)); + { + auto iter_1 = value.credentials.Value().begin(); + VerifyOrReturn(CheckNextListItemDecodes("credentials.Value()", iter_1, 0)); + VerifyOrReturn(CheckValue("credentials.Value()[0].credentialType", iter_1.GetValue().credentialType, 1)); + VerifyOrReturn(CheckValue("credentials.Value()[0].credentialIndex", iter_1.GetValue().credentialIndex, 5U)); + VerifyOrReturn(CheckNoMoreListItems("credentials.Value()", iter_1, 1)); + } - VerifyOrReturn(CheckValueNull("creatorFabricIndex", value.creatorFabricIndex)); + VerifyOrReturn(CheckValueNonNull("creatorFabricIndex", value.creatorFabricIndex)); + VerifyOrReturn(CheckValue("creatorFabricIndex.Value()", value.creatorFabricIndex.Value(), 1)); - VerifyOrReturn(CheckValueNull("lastModifiedFabricIndex", value.lastModifiedFabricIndex)); + VerifyOrReturn(CheckValueNonNull("lastModifiedFabricIndex", value.lastModifiedFabricIndex)); + VerifyOrReturn(CheckValue("lastModifiedFabricIndex.Value()", value.lastModifiedFabricIndex.Value(), 1)); VerifyOrReturn(CheckValueNonNull("nextUserIndex", value.nextUserIndex)); VerifyOrReturn(CheckValue("nextUserIndex.Value()", value.nextUserIndex.Value(), 2U)); } break; - case 77: + case 81: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::Clusters::DoorLock::Commands::GetUserResponse::DecodableType value; @@ -51625,7 +51805,7 @@ class DL_UsersAndCredentialsSuite : public TestCommand VerifyOrReturn(CheckValue("nextUserIndex.Value()", value.nextUserIndex.Value(), 3U)); } break; - case 78: + case 82: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::Clusters::DoorLock::Commands::SetCredentialResponse::DecodableType value; @@ -51633,13 +51813,13 @@ class DL_UsersAndCredentialsSuite : public TestCommand VerifyOrReturn(CheckValue("status", value.status, 0)); VerifyOrReturn(CheckValueNonNull("userIndex", value.userIndex)); - VerifyOrReturn(CheckValue("userIndex.Value()", value.userIndex.Value(), 1U)); + VerifyOrReturn(CheckValue("userIndex.Value()", value.userIndex.Value(), 2U)); VerifyOrReturn(CheckValueNonNull("nextCredentialIndex", value.nextCredentialIndex)); VerifyOrReturn(CheckValue("nextCredentialIndex.Value()", value.nextCredentialIndex.Value(), 2U)); } break; - case 79: + case 83: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::Clusters::DoorLock::Commands::SetCredentialResponse::DecodableType value; @@ -51647,13 +51827,13 @@ class DL_UsersAndCredentialsSuite : public TestCommand VerifyOrReturn(CheckValue("status", value.status, 0)); VerifyOrReturn(CheckValueNonNull("userIndex", value.userIndex)); - VerifyOrReturn(CheckValue("userIndex.Value()", value.userIndex.Value(), 2U)); + VerifyOrReturn(CheckValue("userIndex.Value()", value.userIndex.Value(), 3U)); VerifyOrReturn(CheckValueNonNull("nextCredentialIndex", value.nextCredentialIndex)); VerifyOrReturn(CheckValue("nextCredentialIndex.Value()", value.nextCredentialIndex.Value(), 3U)); } break; - case 80: + case 84: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::Clusters::DoorLock::Commands::SetCredentialResponse::DecodableType value; @@ -51661,16 +51841,16 @@ class DL_UsersAndCredentialsSuite : public TestCommand VerifyOrReturn(CheckValue("status", value.status, 0)); VerifyOrReturn(CheckValueNonNull("userIndex", value.userIndex)); - VerifyOrReturn(CheckValue("userIndex.Value()", value.userIndex.Value(), 3U)); + VerifyOrReturn(CheckValue("userIndex.Value()", value.userIndex.Value(), 4U)); VerifyOrReturn(CheckValueNonNull("nextCredentialIndex", value.nextCredentialIndex)); VerifyOrReturn(CheckValue("nextCredentialIndex.Value()", value.nextCredentialIndex.Value(), 7U)); } break; - case 81: + case 85: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 82: + case 86: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::Clusters::DoorLock::Commands::GetCredentialStatusResponse::DecodableType value; @@ -51679,11 +51859,15 @@ class DL_UsersAndCredentialsSuite : public TestCommand VerifyOrReturn(CheckValueNull("userIndex", value.userIndex)); + VerifyOrReturn(CheckValueNull("creatorFabricIndex", value.creatorFabricIndex)); + + VerifyOrReturn(CheckValueNull("lastModifiedFabricIndex", value.lastModifiedFabricIndex)); + VerifyOrReturn(CheckValueNonNull("nextCredentialIndex", value.nextCredentialIndex)); VerifyOrReturn(CheckValue("nextCredentialIndex.Value()", value.nextCredentialIndex.Value(), 2U)); } break; - case 83: + case 87: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::Clusters::DoorLock::Commands::GetCredentialStatusResponse::DecodableType value; @@ -51692,11 +51876,15 @@ class DL_UsersAndCredentialsSuite : public TestCommand VerifyOrReturn(CheckValueNull("userIndex", value.userIndex)); + VerifyOrReturn(CheckValueNull("creatorFabricIndex", value.creatorFabricIndex)); + + VerifyOrReturn(CheckValueNull("lastModifiedFabricIndex", value.lastModifiedFabricIndex)); + VerifyOrReturn(CheckValueNonNull("nextCredentialIndex", value.nextCredentialIndex)); VerifyOrReturn(CheckValue("nextCredentialIndex.Value()", value.nextCredentialIndex.Value(), 3U)); } break; - case 84: + case 88: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::Clusters::DoorLock::Commands::GetCredentialStatusResponse::DecodableType value; @@ -51705,11 +51893,15 @@ class DL_UsersAndCredentialsSuite : public TestCommand VerifyOrReturn(CheckValueNull("userIndex", value.userIndex)); + VerifyOrReturn(CheckValueNull("creatorFabricIndex", value.creatorFabricIndex)); + + VerifyOrReturn(CheckValueNull("lastModifiedFabricIndex", value.lastModifiedFabricIndex)); + VerifyOrReturn(CheckValueNonNull("nextCredentialIndex", value.nextCredentialIndex)); VerifyOrReturn(CheckValue("nextCredentialIndex.Value()", value.nextCredentialIndex.Value(), 7U)); } break; - case 85: + case 89: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::Clusters::DoorLock::Commands::GetUserResponse::DecodableType value; @@ -51736,7 +51928,7 @@ class DL_UsersAndCredentialsSuite : public TestCommand VerifyOrReturn(CheckValue("nextUserIndex.Value()", value.nextUserIndex.Value(), 2U)); } break; - case 86: + case 90: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::Clusters::DoorLock::Commands::GetUserResponse::DecodableType value; @@ -51763,7 +51955,7 @@ class DL_UsersAndCredentialsSuite : public TestCommand VerifyOrReturn(CheckValue("nextUserIndex.Value()", value.nextUserIndex.Value(), 3U)); } break; - case 87: + case 91: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::Clusters::DoorLock::Commands::GetUserResponse::DecodableType value; @@ -51790,7 +51982,34 @@ class DL_UsersAndCredentialsSuite : public TestCommand VerifyOrReturn(CheckValue("nextUserIndex.Value()", value.nextUserIndex.Value(), 4U)); } break; - case 88: + case 92: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::Clusters::DoorLock::Commands::GetUserResponse::DecodableType value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("userIndex", value.userIndex, 4U)); + + VerifyOrReturn(CheckValueNull("userName", value.userName)); + + VerifyOrReturn(CheckValueNull("userUniqueId", value.userUniqueId)); + + VerifyOrReturn(CheckValueNull("userStatus", value.userStatus)); + + VerifyOrReturn(CheckValueNull("userType", value.userType)); + + VerifyOrReturn(CheckValueNull("credentialRule", value.credentialRule)); + + VerifyOrReturn(CheckValueNull("credentials", value.credentials)); + + VerifyOrReturn(CheckValueNull("creatorFabricIndex", value.creatorFabricIndex)); + + VerifyOrReturn(CheckValueNull("lastModifiedFabricIndex", value.lastModifiedFabricIndex)); + + VerifyOrReturn(CheckValueNonNull("nextUserIndex", value.nextUserIndex)); + VerifyOrReturn(CheckValue("nextUserIndex.Value()", value.nextUserIndex.Value(), 5U)); + } + break; + case 93: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::Clusters::DoorLock::Commands::SetCredentialResponse::DecodableType value; @@ -51802,7 +52021,7 @@ class DL_UsersAndCredentialsSuite : public TestCommand VerifyOrReturn(CheckValueNull("nextCredentialIndex", value.nextCredentialIndex)); } break; - case 89: + case 94: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::Clusters::DoorLock::Commands::SetCredentialResponse::DecodableType value; @@ -51815,7 +52034,7 @@ class DL_UsersAndCredentialsSuite : public TestCommand VerifyOrReturn(CheckValueNull("nextCredentialIndex", value.nextCredentialIndex)); } break; - case 90: + case 95: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::Clusters::DoorLock::Commands::GetUserResponse::DecodableType value; @@ -51855,7 +52074,7 @@ class DL_UsersAndCredentialsSuite : public TestCommand VerifyOrReturn(CheckValue("nextUserIndex.Value()", value.nextUserIndex.Value(), 2U)); } break; - case 91: + case 96: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::Clusters::DoorLock::Commands::GetCredentialStatusResponse::DecodableType value; @@ -51865,10 +52084,16 @@ class DL_UsersAndCredentialsSuite : public TestCommand VerifyOrReturn(CheckValueNonNull("userIndex", value.userIndex)); VerifyOrReturn(CheckValue("userIndex.Value()", value.userIndex.Value(), 1U)); + VerifyOrReturn(CheckValueNonNull("creatorFabricIndex", value.creatorFabricIndex)); + VerifyOrReturn(CheckValue("creatorFabricIndex.Value()", value.creatorFabricIndex.Value(), 1)); + + VerifyOrReturn(CheckValueNonNull("lastModifiedFabricIndex", value.lastModifiedFabricIndex)); + VerifyOrReturn(CheckValue("lastModifiedFabricIndex.Value()", value.lastModifiedFabricIndex.Value(), 1)); + VerifyOrReturn(CheckValueNull("nextCredentialIndex", value.nextCredentialIndex)); } break; - case 92: + case 97: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::Clusters::DoorLock::Commands::SetCredentialResponse::DecodableType value; @@ -51880,28 +52105,28 @@ class DL_UsersAndCredentialsSuite : public TestCommand VerifyOrReturn(CheckValueNull("nextCredentialIndex", value.nextCredentialIndex)); } break; - case 93: + case 98: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_COMMAND)); break; - case 94: + case 99: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_COMMAND)); break; - case 95: + case 100: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_COMMAND)); break; - case 96: + case 101: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_COMMAND)); break; - case 97: + case 102: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_COMMAND)); break; - case 98: + case 103: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_COMMAND)); break; - case 99: + case 104: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 100: + case 105: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::Clusters::DoorLock::Commands::GetUserResponse::DecodableType value; @@ -51922,22 +52147,105 @@ class DL_UsersAndCredentialsSuite : public TestCommand VerifyOrReturn(CheckValueNull("creatorFabricIndex", value.creatorFabricIndex)); - VerifyOrReturn(CheckValueNull("lastModifiedFabricIndex", value.lastModifiedFabricIndex)); + VerifyOrReturn(CheckValueNull("lastModifiedFabricIndex", value.lastModifiedFabricIndex)); + + VerifyOrReturn(CheckValueNonNull("nextUserIndex", value.nextUserIndex)); + VerifyOrReturn(CheckValue("nextUserIndex.Value()", value.nextUserIndex.Value(), 2U)); + } + break; + case 106: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::Clusters::DoorLock::Commands::GetCredentialStatusResponse::DecodableType value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("credentialExists", value.credentialExists, false)); + + VerifyOrReturn(CheckValueNull("userIndex", value.userIndex)); + + VerifyOrReturn(CheckValueNull("creatorFabricIndex", value.creatorFabricIndex)); + + VerifyOrReturn(CheckValueNull("lastModifiedFabricIndex", value.lastModifiedFabricIndex)); + + VerifyOrReturn(CheckValueNull("nextCredentialIndex", value.nextCredentialIndex)); + } + break; + case 107: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::Clusters::DoorLock::Commands::SetCredentialResponse::DecodableType value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("status", value.status, 0)); + + VerifyOrReturn(CheckValueNonNull("userIndex", value.userIndex)); + VerifyOrReturn(CheckValue("userIndex.Value()", value.userIndex.Value(), 1U)); + + VerifyOrReturn(CheckValueNonNull("nextCredentialIndex", value.nextCredentialIndex)); + VerifyOrReturn(CheckValue("nextCredentialIndex.Value()", value.nextCredentialIndex.Value(), 2U)); + } + break; + case 108: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::Clusters::DoorLock::Commands::SetCredentialResponse::DecodableType value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("status", value.status, 0)); + + VerifyOrReturn(CheckValueNull("userIndex", value.userIndex)); + + VerifyOrReturn(CheckValueNonNull("nextCredentialIndex", value.nextCredentialIndex)); + VerifyOrReturn(CheckValue("nextCredentialIndex.Value()", value.nextCredentialIndex.Value(), 3U)); + } + break; + case 109: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::Clusters::DoorLock::Commands::SetCredentialResponse::DecodableType value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("status", value.status, 0)); + + VerifyOrReturn(CheckValueNull("userIndex", value.userIndex)); + + VerifyOrReturn(CheckValueNonNull("nextCredentialIndex", value.nextCredentialIndex)); + VerifyOrReturn(CheckValue("nextCredentialIndex.Value()", value.nextCredentialIndex.Value(), 4U)); + } + break; + case 110: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::Clusters::DoorLock::Commands::SetCredentialResponse::DecodableType value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("status", value.status, 0)); + + VerifyOrReturn(CheckValueNull("userIndex", value.userIndex)); + + VerifyOrReturn(CheckValueNonNull("nextCredentialIndex", value.nextCredentialIndex)); + VerifyOrReturn(CheckValue("nextCredentialIndex.Value()", value.nextCredentialIndex.Value(), 5U)); + } + break; + case 111: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::Clusters::DoorLock::Commands::SetCredentialResponse::DecodableType value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("status", value.status, 0)); + + VerifyOrReturn(CheckValueNull("userIndex", value.userIndex)); - VerifyOrReturn(CheckValueNonNull("nextUserIndex", value.nextUserIndex)); - VerifyOrReturn(CheckValue("nextUserIndex.Value()", value.nextUserIndex.Value(), 2U)); + VerifyOrReturn(CheckValueNonNull("nextCredentialIndex", value.nextCredentialIndex)); + VerifyOrReturn(CheckValue("nextCredentialIndex.Value()", value.nextCredentialIndex.Value(), 6U)); } break; - case 101: + case 112: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - chip::app::Clusters::DoorLock::Commands::GetCredentialStatusResponse::DecodableType value; + chip::app::Clusters::DoorLock::Commands::SetCredentialResponse::DecodableType value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("credentialExists", value.credentialExists, false)); + VerifyOrReturn(CheckValue("status", value.status, 137)); VerifyOrReturn(CheckValueNull("userIndex", value.userIndex)); - VerifyOrReturn(CheckValueNull("nextCredentialIndex", value.nextCredentialIndex)); + VerifyOrReturn(CheckValueNonNull("nextCredentialIndex", value.nextCredentialIndex)); + VerifyOrReturn(CheckValue("nextCredentialIndex.Value()", value.nextCredentialIndex.Value(), 7U)); } break; default: @@ -52463,23 +52771,7 @@ class DL_UsersAndCredentialsSuite : public TestCommand chip::Optional(10000)); } case 53: { - LogStep(53, "Create new PIN credential and try to add it to existing user"); - chip::app::Clusters::DoorLock::Commands::SetCredential::Type value; - value.operationType = static_cast(0); - - value.credential.credentialType = static_cast(1); - value.credential.credentialIndex = 3U; - - value.credentialData = chip::ByteSpan(chip::Uint8::from_const_char("123465garbage: not in length on purpose"), 6); - value.userIndex.SetNonNull(); - value.userIndex.Value() = 1U; - value.userStatus.SetNull(); - value.userType.SetNull(); - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::SetCredential::Id, value, - chip::Optional(10000)); - } - case 54: { - LogStep(54, "Create new credential and try to add it to 0 user"); + LogStep(53, "Create new credential and try to add it to 0 user"); chip::app::Clusters::DoorLock::Commands::SetCredential::Type value; value.operationType = static_cast(0); @@ -52494,8 +52786,8 @@ class DL_UsersAndCredentialsSuite : public TestCommand return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::SetCredential::Id, value, chip::Optional(10000)); } - case 55: { - LogStep(55, "Create new credential and try to add it to out-of-bounds user"); + case 54: { + LogStep(54, "Create new credential and try to add it to out-of-bounds user"); chip::app::Clusters::DoorLock::Commands::SetCredential::Type value; value.operationType = static_cast(0); @@ -52510,8 +52802,8 @@ class DL_UsersAndCredentialsSuite : public TestCommand return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::SetCredential::Id, value, chip::Optional(10000)); } - case 56: { - LogStep(56, "Create new PIN with too short data"); + case 55: { + LogStep(55, "Create new PIN with too short data"); chip::app::Clusters::DoorLock::Commands::SetCredential::Type value; value.operationType = static_cast(0); @@ -52526,8 +52818,8 @@ class DL_UsersAndCredentialsSuite : public TestCommand return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::SetCredential::Id, value, chip::Optional(10000)); } - case 57: { - LogStep(57, "Create new PIN with too long data"); + case 56: { + LogStep(56, "Create new PIN with too long data"); chip::app::Clusters::DoorLock::Commands::SetCredential::Type value; value.operationType = static_cast(0); @@ -52542,8 +52834,8 @@ class DL_UsersAndCredentialsSuite : public TestCommand return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::SetCredential::Id, value, chip::Optional(10000)); } - case 58: { - LogStep(58, "Create new RFID with too short data"); + case 57: { + LogStep(57, "Create new RFID with too short data"); chip::app::Clusters::DoorLock::Commands::SetCredential::Type value; value.operationType = static_cast(0); @@ -52558,8 +52850,8 @@ class DL_UsersAndCredentialsSuite : public TestCommand return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::SetCredential::Id, value, chip::Optional(10000)); } - case 59: { - LogStep(59, "Create new PIN with Programming user type fails"); + case 58: { + LogStep(58, "Create new PIN with Programming user type fails"); chip::app::Clusters::DoorLock::Commands::SetCredential::Type value; value.operationType = static_cast(0); @@ -52575,8 +52867,8 @@ class DL_UsersAndCredentialsSuite : public TestCommand return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::SetCredential::Id, value, chip::Optional(10000)); } - case 60: { - LogStep(60, "Create new RFID with too short data"); + case 59: { + LogStep(59, "Create new RFID with too short data"); chip::app::Clusters::DoorLock::Commands::SetCredential::Type value; value.operationType = static_cast(0); @@ -52592,8 +52884,8 @@ class DL_UsersAndCredentialsSuite : public TestCommand return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::SetCredential::Id, value, chip::Optional(10000)); } - case 61: { - LogStep(61, "Create new PIN credential with data the would cause duplicate"); + case 60: { + LogStep(60, "Create new PIN credential with data the would cause duplicate"); chip::app::Clusters::DoorLock::Commands::SetCredential::Type value; value.operationType = static_cast(0); @@ -52607,8 +52899,8 @@ class DL_UsersAndCredentialsSuite : public TestCommand return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::SetCredential::Id, value, chip::Optional(10000)); } - case 62: { - LogStep(62, "Create new RFID credential with data the would cause duplicate"); + case 61: { + LogStep(61, "Create new RFID credential with data the would cause duplicate"); chip::app::Clusters::DoorLock::Commands::SetCredential::Type value; value.operationType = static_cast(0); @@ -52623,8 +52915,8 @@ class DL_UsersAndCredentialsSuite : public TestCommand return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::SetCredential::Id, value, chip::Optional(10000)); } - case 63: { - LogStep(63, "Modify credentialData of existing PIN credential"); + case 62: { + LogStep(62, "Modify credentialData of existing PIN credential"); chip::app::Clusters::DoorLock::Commands::SetCredential::Type value; value.operationType = static_cast(2); @@ -52639,8 +52931,8 @@ class DL_UsersAndCredentialsSuite : public TestCommand return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::SetCredential::Id, value, chip::Optional(10000)); } - case 64: { - LogStep(64, "Verify that credential was changed by creating new credential with old data"); + case 63: { + LogStep(63, "Verify that credential was changed by creating new credential with old data"); chip::app::Clusters::DoorLock::Commands::SetCredential::Type value; value.operationType = static_cast(0); @@ -52654,8 +52946,8 @@ class DL_UsersAndCredentialsSuite : public TestCommand return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::SetCredential::Id, value, chip::Optional(10000)); } - case 65: { - LogStep(65, "Verify that credential was changed by creating new credential with new data"); + case 64: { + LogStep(64, "Verify that credential was changed by creating new credential with new data"); chip::app::Clusters::DoorLock::Commands::SetCredential::Type value; value.operationType = static_cast(0); @@ -52669,8 +52961,53 @@ class DL_UsersAndCredentialsSuite : public TestCommand return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::SetCredential::Id, value, chip::Optional(10000)); } + case 65: { + LogStep(65, "Create new RFID credential and add it to existing user"); + chip::app::Clusters::DoorLock::Commands::SetCredential::Type value; + value.operationType = static_cast(0); + + value.credential.credentialType = static_cast(2); + value.credential.credentialIndex = 4U; + + value.credentialData = + chip::ByteSpan(chip::Uint8::from_const_char("rfid_data_7890garbage: not in length on purpose"), 14); + value.userIndex.SetNonNull(); + value.userIndex.Value() = 1U; + value.userStatus.SetNull(); + value.userType.SetNull(); + return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::SetCredential::Id, value, + chip::Optional(10000)); + } case 66: { - LogStep(66, "Clear first PIN credential"); + LogStep(66, "Verify modified user"); + chip::app::Clusters::DoorLock::Commands::GetUser::Type value; + value.userIndex = 1U; + return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::GetUser::Id, value); + } + case 67: { + LogStep(67, "Create new RFID credential and add it to existing user"); + chip::app::Clusters::DoorLock::Commands::SetCredential::Type value; + value.operationType = static_cast(0); + + value.credential.credentialType = static_cast(1); + value.credential.credentialIndex = 5U; + + value.credentialData = chip::ByteSpan(chip::Uint8::from_const_char("789012garbage: not in length on purpose"), 6); + value.userIndex.SetNonNull(); + value.userIndex.Value() = 1U; + value.userStatus.SetNull(); + value.userType.SetNull(); + return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::SetCredential::Id, value, + chip::Optional(10000)); + } + case 68: { + LogStep(68, "Verify modified user"); + chip::app::Clusters::DoorLock::Commands::GetUser::Type value; + value.userIndex = 1U; + return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::GetUser::Id, value); + } + case 69: { + LogStep(69, "Clear first PIN credential"); chip::app::Clusters::DoorLock::Commands::ClearCredential::Type value; value.credential.SetNonNull(); @@ -52680,8 +53017,8 @@ class DL_UsersAndCredentialsSuite : public TestCommand return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::ClearCredential::Id, value, chip::Optional(10000)); } - case 67: { - LogStep(67, "Read back the credential and make sure it is deleted"); + case 70: { + LogStep(70, "Read back the credential and make sure it is deleted"); chip::app::Clusters::DoorLock::Commands::GetCredentialStatus::Type value; value.credential.credentialType = static_cast(1); @@ -52689,14 +53026,14 @@ class DL_UsersAndCredentialsSuite : public TestCommand return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::GetCredentialStatus::Id, value); } - case 68: { - LogStep(68, "Read the user back and make sure PIN credential is deleted"); + case 71: { + LogStep(71, "Read the user back and make sure PIN credential is deleted"); chip::app::Clusters::DoorLock::Commands::GetUser::Type value; value.userIndex = 1U; return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::GetUser::Id, value); } - case 69: { - LogStep(69, "Clear the second PIN credential"); + case 72: { + LogStep(72, "Clear the second PIN credential"); chip::app::Clusters::DoorLock::Commands::ClearCredential::Type value; value.credential.SetNonNull(); @@ -52706,8 +53043,8 @@ class DL_UsersAndCredentialsSuite : public TestCommand return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::ClearCredential::Id, value, chip::Optional(10000)); } - case 70: { - LogStep(70, "Read back the credential and make sure it is deleted"); + case 73: { + LogStep(73, "Read back the credential and make sure it is deleted"); chip::app::Clusters::DoorLock::Commands::GetCredentialStatus::Type value; value.credential.credentialType = static_cast(1); @@ -52715,14 +53052,14 @@ class DL_UsersAndCredentialsSuite : public TestCommand return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::GetCredentialStatus::Id, value); } - case 71: { - LogStep(71, "Read the user back and make sure related user is deleted"); + case 74: { + LogStep(74, "Read the user back and make sure related user is deleted"); chip::app::Clusters::DoorLock::Commands::GetUser::Type value; value.userIndex = 2U; return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::GetUser::Id, value); } - case 72: { - LogStep(72, "Create new RFID credential with user"); + case 75: { + LogStep(75, "Create new RFID credential with user"); chip::app::Clusters::DoorLock::Commands::SetCredential::Type value; value.operationType = static_cast(0); @@ -52737,8 +53074,8 @@ class DL_UsersAndCredentialsSuite : public TestCommand return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::SetCredential::Id, value, chip::Optional(10000)); } - case 73: { - LogStep(73, "Clear all the RFID credentials"); + case 76: { + LogStep(76, "Clear all the RFID credentials"); chip::app::Clusters::DoorLock::Commands::ClearCredential::Type value; value.credential.SetNonNull(); @@ -52748,8 +53085,8 @@ class DL_UsersAndCredentialsSuite : public TestCommand return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::ClearCredential::Id, value, chip::Optional(10000)); } - case 74: { - LogStep(74, "Read back the fist RFID credential and make sure it is deleted"); + case 77: { + LogStep(77, "Read back the fist RFID credential and make sure it is deleted"); chip::app::Clusters::DoorLock::Commands::GetCredentialStatus::Type value; value.credential.credentialType = static_cast(2); @@ -52757,8 +53094,8 @@ class DL_UsersAndCredentialsSuite : public TestCommand return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::GetCredentialStatus::Id, value); } - case 75: { - LogStep(75, "Read back the second RFID credential and make sure it is deleted"); + case 78: { + LogStep(78, "Read back the second RFID credential and make sure it is deleted"); chip::app::Clusters::DoorLock::Commands::GetCredentialStatus::Type value; value.credential.credentialType = static_cast(2); @@ -52766,20 +53103,29 @@ class DL_UsersAndCredentialsSuite : public TestCommand return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::GetCredentialStatus::Id, value); } - case 76: { - LogStep(76, "Read the user related with first RFID back and make sure it is deleted"); + case 79: { + LogStep(79, "Read back the third RFID credential and make sure it is deleted"); + chip::app::Clusters::DoorLock::Commands::GetCredentialStatus::Type value; + + value.credential.credentialType = static_cast(2); + value.credential.credentialIndex = 4U; + + return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::GetCredentialStatus::Id, value); + } + case 80: { + LogStep(80, "Read the user related with first RFID back and make sure it has only PIN credential"); chip::app::Clusters::DoorLock::Commands::GetUser::Type value; value.userIndex = 1U; return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::GetUser::Id, value); } - case 77: { - LogStep(77, "Read the user related with second RFID back and make sure it is deleted"); + case 81: { + LogStep(81, "Read the user related with second RFID back and make sure it is deleted"); chip::app::Clusters::DoorLock::Commands::GetUser::Type value; value.userIndex = 2U; return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::GetUser::Id, value); } - case 78: { - LogStep(78, "Create new PIN credential with user"); + case 82: { + LogStep(82, "Create new PIN credential with user"); chip::app::Clusters::DoorLock::Commands::SetCredential::Type value; value.operationType = static_cast(0); @@ -52793,8 +53139,8 @@ class DL_UsersAndCredentialsSuite : public TestCommand return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::SetCredential::Id, value, chip::Optional(10000)); } - case 79: { - LogStep(79, "Create new RFID credential with user"); + case 83: { + LogStep(83, "Create new RFID credential with user"); chip::app::Clusters::DoorLock::Commands::SetCredential::Type value; value.operationType = static_cast(0); @@ -52809,8 +53155,8 @@ class DL_UsersAndCredentialsSuite : public TestCommand return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::SetCredential::Id, value, chip::Optional(10000)); } - case 80: { - LogStep(80, "Create another RFID credential with user"); + case 84: { + LogStep(84, "Create another RFID credential with user"); chip::app::Clusters::DoorLock::Commands::SetCredential::Type value; value.operationType = static_cast(0); @@ -52825,15 +53171,15 @@ class DL_UsersAndCredentialsSuite : public TestCommand return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::SetCredential::Id, value, chip::Optional(10000)); } - case 81: { - LogStep(81, "Clear all the credentials"); + case 85: { + LogStep(85, "Clear all the credentials"); chip::app::Clusters::DoorLock::Commands::ClearCredential::Type value; value.credential.SetNull(); return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::ClearCredential::Id, value, chip::Optional(10000)); } - case 82: { - LogStep(82, "Read back the first PIN credential and make sure it is deleted"); + case 86: { + LogStep(86, "Read back the first PIN credential and make sure it is deleted"); chip::app::Clusters::DoorLock::Commands::GetCredentialStatus::Type value; value.credential.credentialType = static_cast(1); @@ -52841,8 +53187,8 @@ class DL_UsersAndCredentialsSuite : public TestCommand return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::GetCredentialStatus::Id, value); } - case 83: { - LogStep(83, "Read back the first RFID credential and make sure it is deleted"); + case 87: { + LogStep(87, "Read back the first RFID credential and make sure it is deleted"); chip::app::Clusters::DoorLock::Commands::GetCredentialStatus::Type value; value.credential.credentialType = static_cast(2); @@ -52850,8 +53196,8 @@ class DL_UsersAndCredentialsSuite : public TestCommand return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::GetCredentialStatus::Id, value); } - case 84: { - LogStep(84, "Read back the second PIN credential and make sure it is deleted"); + case 88: { + LogStep(88, "Read back the second PIN credential and make sure it is deleted"); chip::app::Clusters::DoorLock::Commands::GetCredentialStatus::Type value; value.credential.credentialType = static_cast(1); @@ -52859,26 +53205,32 @@ class DL_UsersAndCredentialsSuite : public TestCommand return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::GetCredentialStatus::Id, value); } - case 85: { - LogStep(85, "Read the user related with first PIN back and make sure it is deleted"); + case 89: { + LogStep(89, "Read the user related with first PIN back and make sure it is deleted"); chip::app::Clusters::DoorLock::Commands::GetUser::Type value; value.userIndex = 1U; return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::GetUser::Id, value); } - case 86: { - LogStep(86, "Read the user related with first RFID back and make sure it is deleted"); + case 90: { + LogStep(90, "Read the user related with first RFID back and make sure it is deleted"); chip::app::Clusters::DoorLock::Commands::GetUser::Type value; value.userIndex = 2U; return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::GetUser::Id, value); } - case 87: { - LogStep(87, "Read the user related with second PIN back and make sure it is deleted"); + case 91: { + LogStep(91, "Read the user related with second PIN back and make sure it is deleted"); chip::app::Clusters::DoorLock::Commands::GetUser::Type value; value.userIndex = 3U; return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::GetUser::Id, value); } - case 88: { - LogStep(88, "Create new Programming PIN credential with invalid index"); + case 92: { + LogStep(92, "Read the user related with last RFID back and make sure it is deleted"); + chip::app::Clusters::DoorLock::Commands::GetUser::Type value; + value.userIndex = 4U; + return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::GetUser::Id, value); + } + case 93: { + LogStep(93, "Create new Programming PIN credential with invalid index"); chip::app::Clusters::DoorLock::Commands::SetCredential::Type value; value.operationType = static_cast(0); @@ -52892,8 +53244,8 @@ class DL_UsersAndCredentialsSuite : public TestCommand return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::SetCredential::Id, value, chip::Optional(10000)); } - case 89: { - LogStep(89, "Create new Programming PIN credential with valid index"); + case 94: { + LogStep(94, "Create new Programming PIN credential with valid index"); chip::app::Clusters::DoorLock::Commands::SetCredential::Type value; value.operationType = static_cast(0); @@ -52907,14 +53259,14 @@ class DL_UsersAndCredentialsSuite : public TestCommand return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::SetCredential::Id, value, chip::Optional(10000)); } - case 90: { - LogStep(90, "Verify created user"); + case 95: { + LogStep(95, "Verify created user"); chip::app::Clusters::DoorLock::Commands::GetUser::Type value; value.userIndex = 1U; return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::GetUser::Id, value); } - case 91: { - LogStep(91, "Verify created programming PIN credential"); + case 96: { + LogStep(96, "Verify created programming PIN credential"); chip::app::Clusters::DoorLock::Commands::GetCredentialStatus::Type value; value.credential.credentialType = static_cast(0); @@ -52922,8 +53274,8 @@ class DL_UsersAndCredentialsSuite : public TestCommand return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::GetCredentialStatus::Id, value); } - case 92: { - LogStep(92, "Modify the Programming PIN credential"); + case 97: { + LogStep(97, "Modify the Programming PIN credential"); chip::app::Clusters::DoorLock::Commands::SetCredential::Type value; value.operationType = static_cast(2); @@ -52937,8 +53289,8 @@ class DL_UsersAndCredentialsSuite : public TestCommand return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::SetCredential::Id, value, chip::Optional(10000)); } - case 93: { - LogStep(93, "Clearing Programming PIN fails"); + case 98: { + LogStep(98, "Clearing Programming PIN fails"); chip::app::Clusters::DoorLock::Commands::ClearCredential::Type value; value.credential.SetNonNull(); @@ -52948,8 +53300,8 @@ class DL_UsersAndCredentialsSuite : public TestCommand return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::ClearCredential::Id, value, chip::Optional(10000)); } - case 94: { - LogStep(94, "Clearing Programming PIN with invalid index fails"); + case 99: { + LogStep(99, "Clearing Programming PIN with invalid index fails"); chip::app::Clusters::DoorLock::Commands::ClearCredential::Type value; value.credential.SetNonNull(); @@ -52959,8 +53311,8 @@ class DL_UsersAndCredentialsSuite : public TestCommand return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::ClearCredential::Id, value, chip::Optional(10000)); } - case 95: { - LogStep(95, "Clearing PIN credential with zero index fails"); + case 100: { + LogStep(100, "Clearing PIN credential with zero index fails"); chip::app::Clusters::DoorLock::Commands::ClearCredential::Type value; value.credential.SetNonNull(); @@ -52970,8 +53322,8 @@ class DL_UsersAndCredentialsSuite : public TestCommand return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::ClearCredential::Id, value, chip::Optional(10000)); } - case 96: { - LogStep(96, "Clearing PIN credential with out-of-bound index fails"); + case 101: { + LogStep(101, "Clearing PIN credential with out-of-bound index fails"); chip::app::Clusters::DoorLock::Commands::ClearCredential::Type value; value.credential.SetNonNull(); @@ -52981,8 +53333,8 @@ class DL_UsersAndCredentialsSuite : public TestCommand return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::ClearCredential::Id, value, chip::Optional(10000)); } - case 97: { - LogStep(97, "Clearing RFID credential with zero index fails"); + case 102: { + LogStep(102, "Clearing RFID credential with zero index fails"); chip::app::Clusters::DoorLock::Commands::ClearCredential::Type value; value.credential.SetNonNull(); @@ -52992,8 +53344,8 @@ class DL_UsersAndCredentialsSuite : public TestCommand return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::ClearCredential::Id, value, chip::Optional(10000)); } - case 98: { - LogStep(98, "Clearing RFID credential with out-of-bound index fails"); + case 103: { + LogStep(103, "Clearing RFID credential with out-of-bound index fails"); chip::app::Clusters::DoorLock::Commands::ClearCredential::Type value; value.credential.SetNonNull(); @@ -53003,21 +53355,21 @@ class DL_UsersAndCredentialsSuite : public TestCommand return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::ClearCredential::Id, value, chip::Optional(10000)); } - case 99: { - LogStep(99, "Clear the Programming PIN user"); + case 104: { + LogStep(104, "Clear the Programming PIN user"); chip::app::Clusters::DoorLock::Commands::ClearUser::Type value; value.userIndex = 1U; return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::ClearUser::Id, value, chip::Optional(10000)); } - case 100: { - LogStep(100, "Make sure Programming PIN user is deleted"); + case 105: { + LogStep(105, "Make sure Programming PIN user is deleted"); chip::app::Clusters::DoorLock::Commands::GetUser::Type value; value.userIndex = 1U; return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::GetUser::Id, value); } - case 101: { - LogStep(101, "Make sure programming PIN credential is deleted"); + case 106: { + LogStep(106, "Make sure programming PIN credential is deleted"); chip::app::Clusters::DoorLock::Commands::GetCredentialStatus::Type value; value.credential.credentialType = static_cast(0); @@ -53025,6 +53377,101 @@ class DL_UsersAndCredentialsSuite : public TestCommand return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::GetCredentialStatus::Id, value); } + case 107: { + LogStep(107, "Create new PIN credential and user"); + chip::app::Clusters::DoorLock::Commands::SetCredential::Type value; + value.operationType = static_cast(0); + + value.credential.credentialType = static_cast(1); + value.credential.credentialIndex = 1U; + + value.credentialData = chip::ByteSpan(chip::Uint8::from_const_char("000000garbage: not in length on purpose"), 6); + value.userIndex.SetNull(); + value.userStatus.SetNull(); + value.userType.SetNull(); + return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::SetCredential::Id, value, + chip::Optional(10000)); + } + case 108: { + LogStep(108, "Create second PIN credential and add it to existing user"); + chip::app::Clusters::DoorLock::Commands::SetCredential::Type value; + value.operationType = static_cast(0); + + value.credential.credentialType = static_cast(1); + value.credential.credentialIndex = 2U; + + value.credentialData = chip::ByteSpan(chip::Uint8::from_const_char("000001garbage: not in length on purpose"), 6); + value.userIndex.SetNonNull(); + value.userIndex.Value() = 1U; + value.userStatus.SetNull(); + value.userType.SetNull(); + return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::SetCredential::Id, value, + chip::Optional(10000)); + } + case 109: { + LogStep(109, "Create third PIN credential and add it to existing user"); + chip::app::Clusters::DoorLock::Commands::SetCredential::Type value; + value.operationType = static_cast(0); + + value.credential.credentialType = static_cast(1); + value.credential.credentialIndex = 3U; + + value.credentialData = chip::ByteSpan(chip::Uint8::from_const_char("000002garbage: not in length on purpose"), 6); + value.userIndex.SetNonNull(); + value.userIndex.Value() = 1U; + value.userStatus.SetNull(); + value.userType.SetNull(); + return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::SetCredential::Id, value, + chip::Optional(10000)); + } + case 110: { + LogStep(110, "Create fourth PIN credential and add it to existing user"); + chip::app::Clusters::DoorLock::Commands::SetCredential::Type value; + value.operationType = static_cast(0); + + value.credential.credentialType = static_cast(1); + value.credential.credentialIndex = 4U; + + value.credentialData = chip::ByteSpan(chip::Uint8::from_const_char("000003garbage: not in length on purpose"), 6); + value.userIndex.SetNonNull(); + value.userIndex.Value() = 1U; + value.userStatus.SetNull(); + value.userType.SetNull(); + return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::SetCredential::Id, value, + chip::Optional(10000)); + } + case 111: { + LogStep(111, "Create fifth PIN credential and add it to existing user"); + chip::app::Clusters::DoorLock::Commands::SetCredential::Type value; + value.operationType = static_cast(0); + + value.credential.credentialType = static_cast(1); + value.credential.credentialIndex = 5U; + + value.credentialData = chip::ByteSpan(chip::Uint8::from_const_char("000004garbage: not in length on purpose"), 6); + value.userIndex.SetNonNull(); + value.userIndex.Value() = 1U; + value.userStatus.SetNull(); + value.userType.SetNull(); + return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::SetCredential::Id, value, + chip::Optional(10000)); + } + case 112: { + LogStep(112, "Try to create sixth PIN credential and make sure it fails"); + chip::app::Clusters::DoorLock::Commands::SetCredential::Type value; + value.operationType = static_cast(0); + + value.credential.credentialType = static_cast(1); + value.credential.credentialIndex = 6U; + + value.credentialData = chip::ByteSpan(chip::Uint8::from_const_char("000005garbage: not in length on purpose"), 6); + value.userIndex.SetNonNull(); + value.userIndex.Value() = 1U; + value.userStatus.SetNull(); + value.userType.SetNull(); + return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::SetCredential::Id, value, + chip::Optional(10000)); + } } return CHIP_NO_ERROR; } diff --git a/zzz_generated/lock-app/zap-generated/endpoint_config.h b/zzz_generated/lock-app/zap-generated/endpoint_config.h index b1f6f2917c6626..46e8f799ca76ee 100644 --- a/zzz_generated/lock-app/zap-generated/endpoint_config.h +++ b/zzz_generated/lock-app/zap-generated/endpoint_config.h @@ -483,7 +483,7 @@ #define ZAP_ATTRIBUTE_MASK(mask) ATTRIBUTE_MASK_##mask // This is an array of EmberAfAttributeMetadata structures. -#define GENERATED_ATTRIBUTE_COUNT 241 +#define GENERATED_ATTRIBUTE_COUNT 242 #define GENERATED_ATTRIBUTES \ { \ \ @@ -827,6 +827,7 @@ { 0x00000019, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(20) }, /* MaxRFIDCodeLength */ \ { 0x0000001A, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(10) }, /* MinRFIDCodeLength */ \ { 0x0000001B, ZAP_TYPE(BITMAP8), 1, 0, ZAP_SIMPLE_DEFAULT(1) }, /* CredentialRulesSupport */ \ + { 0x0000001C, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(5) }, /* NumberOfCredentialsSupportedPerUser */ \ { 0x00000021, ZAP_TYPE(CHAR_STRING), 4, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(255) }, /* Language */ \ { 0x00000023, ZAP_TYPE(INT32U), 4, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(258) }, /* AutoRelockTime */ \ { 0x00000024, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ @@ -1312,8 +1313,8 @@ /* Endpoint: 1, Cluster: Door Lock (server) */ \ .clusterId = 0x00000101, \ .attributes = ZAP_ATTRIBUTE_INDEX(215), \ - .attributeCount = 26, \ - .clusterSize = 40, \ + .attributeCount = 27, \ + .clusterSize = 41, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(ATTRIBUTE_CHANGED_FUNCTION) | ZAP_CLUSTER_MASK(PRE_ATTRIBUTE_CHANGED_FUNCTION), \ .functions = chipFuncArrayDoorLockServer, \ .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 73 ) ,\ @@ -1330,7 +1331,7 @@ // This is an array of EmberAfEndpointType structures. #define GENERATED_ENDPOINT_TYPES \ { \ - { ZAP_CLUSTER_INDEX(0), 21, 498 }, { ZAP_CLUSTER_INDEX(21), 6, 193 }, \ + { ZAP_CLUSTER_INDEX(0), 21, 498 }, { ZAP_CLUSTER_INDEX(21), 6, 194 }, \ } // Largest attribute size is needed for various buffers @@ -1342,7 +1343,7 @@ static_assert(ATTRIBUTE_LARGEST <= CHIP_CONFIG_MAX_ATTRIBUTE_STORE_ELEMENT_SIZE, #define ATTRIBUTE_SINGLETONS_SIZE (37) // Total size of attribute storage -#define ATTRIBUTE_MAX_SIZE (691) +#define ATTRIBUTE_MAX_SIZE (692) // Number of fixed endpoints #define FIXED_ENDPOINT_COUNT (2)