From 0bcb9404a438206933ffa357e1d56fc2bd703252 Mon Sep 17 00:00:00 2001 From: Thirupathi S Date: Mon, 24 Jun 2024 18:34:44 +0530 Subject: [PATCH] doorlock changes removed --- .../all-clusters-minimal-app.matter | 2 +- .../rootnode_doorlock_aNKYAreMXE.matter | 2 +- examples/lock-app/lock-common/lock-app.matter | 2 +- examples/lock-app/nxp/zap/lock-app.matter | 2 +- examples/lock-app/qpg/zap/lock.matter | 2 +- .../placeholder/linux/apps/app1/config.matter | 4 ++-- .../placeholder/linux/apps/app2/config.matter | 4 ++-- .../virtual-device-app.matter | 2 +- .../zcl/data-model/chip/door-lock-cluster.xml | 2 +- .../data_model/controller-clusters.matter | 2 +- .../cluster/clusters/DoorLockCluster.kt | 18 ++++++++++++++---- src/controller/python/chip/clusters/Objects.py | 8 ++++---- 12 files changed, 30 insertions(+), 20 deletions(-) diff --git a/examples/all-clusters-minimal-app/all-clusters-common/all-clusters-minimal-app.matter b/examples/all-clusters-minimal-app/all-clusters-common/all-clusters-minimal-app.matter index 50ba4d0078f421..cecc3679a7cc38 100644 --- a/examples/all-clusters-minimal-app/all-clusters-common/all-clusters-minimal-app.matter +++ b/examples/all-clusters-minimal-app/all-clusters-common/all-clusters-minimal-app.matter @@ -2973,7 +2973,7 @@ cluster DoorLock = 257 { readonly attribute optional int8u numberOfCredentialsSupportedPerUser = 28; attribute access(write: manage) optional char_string<3> language = 33; attribute access(write: manage) optional int8u LEDSettings = 34; - attribute access(write: manage) int32u autoRelockTime = 35; + attribute access(write: manage) optional int32u autoRelockTime = 35; attribute access(write: manage) optional int8u soundVolume = 36; attribute access(write: manage) OperatingModeEnum operatingMode = 37; readonly attribute DlSupportedOperatingModes supportedOperatingModes = 38; diff --git a/examples/chef/devices/rootnode_doorlock_aNKYAreMXE.matter b/examples/chef/devices/rootnode_doorlock_aNKYAreMXE.matter index 842d8bc79ef7d5..e2ca298b2d9e77 100644 --- a/examples/chef/devices/rootnode_doorlock_aNKYAreMXE.matter +++ b/examples/chef/devices/rootnode_doorlock_aNKYAreMXE.matter @@ -1878,7 +1878,7 @@ cluster DoorLock = 257 { readonly attribute optional int8u numberOfCredentialsSupportedPerUser = 28; attribute access(write: manage) optional char_string<3> language = 33; attribute access(write: manage) optional int8u LEDSettings = 34; - attribute access(write: manage) int32u autoRelockTime = 35; + attribute access(write: manage) optional int32u autoRelockTime = 35; attribute access(write: manage) optional int8u soundVolume = 36; attribute access(write: manage) OperatingModeEnum operatingMode = 37; readonly attribute DlSupportedOperatingModes supportedOperatingModes = 38; diff --git a/examples/lock-app/lock-common/lock-app.matter b/examples/lock-app/lock-common/lock-app.matter index 14b549e9075b30..5c21291397494c 100644 --- a/examples/lock-app/lock-common/lock-app.matter +++ b/examples/lock-app/lock-common/lock-app.matter @@ -2252,7 +2252,7 @@ cluster DoorLock = 257 { readonly attribute optional int8u numberOfCredentialsSupportedPerUser = 28; attribute access(write: manage) optional char_string<3> language = 33; attribute access(write: manage) optional int8u LEDSettings = 34; - attribute access(write: manage) int32u autoRelockTime = 35; + attribute access(write: manage) optional int32u autoRelockTime = 35; attribute access(write: manage) optional int8u soundVolume = 36; attribute access(write: manage) OperatingModeEnum operatingMode = 37; readonly attribute DlSupportedOperatingModes supportedOperatingModes = 38; diff --git a/examples/lock-app/nxp/zap/lock-app.matter b/examples/lock-app/nxp/zap/lock-app.matter index fdc91f68db4f63..a8c73faab0fc20 100644 --- a/examples/lock-app/nxp/zap/lock-app.matter +++ b/examples/lock-app/nxp/zap/lock-app.matter @@ -1504,7 +1504,7 @@ cluster DoorLock = 257 { readonly attribute optional int8u numberOfCredentialsSupportedPerUser = 28; attribute access(write: manage) optional char_string<3> language = 33; attribute access(write: manage) optional int8u LEDSettings = 34; - attribute access(write: manage) int32u autoRelockTime = 35; + attribute access(write: manage) optional int32u autoRelockTime = 35; attribute access(write: manage) optional int8u soundVolume = 36; attribute access(write: manage) OperatingModeEnum operatingMode = 37; readonly attribute DlSupportedOperatingModes supportedOperatingModes = 38; diff --git a/examples/lock-app/qpg/zap/lock.matter b/examples/lock-app/qpg/zap/lock.matter index 997cf08f7e41f9..589eb097561c77 100644 --- a/examples/lock-app/qpg/zap/lock.matter +++ b/examples/lock-app/qpg/zap/lock.matter @@ -1908,7 +1908,7 @@ cluster DoorLock = 257 { readonly attribute optional int8u numberOfCredentialsSupportedPerUser = 28; attribute access(write: manage) optional char_string<3> language = 33; attribute access(write: manage) optional int8u LEDSettings = 34; - attribute access(write: manage) int32u autoRelockTime = 35; + attribute access(write: manage) optional int32u autoRelockTime = 35; attribute access(write: manage) optional int8u soundVolume = 36; attribute access(write: manage) OperatingModeEnum operatingMode = 37; readonly attribute DlSupportedOperatingModes supportedOperatingModes = 38; diff --git a/examples/placeholder/linux/apps/app1/config.matter b/examples/placeholder/linux/apps/app1/config.matter index 28fee84354d0b0..72ae96e7c7c3f0 100644 --- a/examples/placeholder/linux/apps/app1/config.matter +++ b/examples/placeholder/linux/apps/app1/config.matter @@ -3568,7 +3568,7 @@ cluster DoorLock = 257 { readonly attribute optional int8u numberOfCredentialsSupportedPerUser = 28; attribute access(write: manage) optional char_string<3> language = 33; attribute access(write: manage) optional int8u LEDSettings = 34; - attribute access(write: manage) int32u autoRelockTime = 35; + attribute access(write: manage) optional int32u autoRelockTime = 35; attribute access(write: manage) optional int8u soundVolume = 36; attribute access(write: manage) OperatingModeEnum operatingMode = 37; readonly attribute DlSupportedOperatingModes supportedOperatingModes = 38; @@ -4219,7 +4219,7 @@ cluster DoorLock = 257 { readonly attribute optional int8u numberOfCredentialsSupportedPerUser = 28; attribute access(write: manage) optional char_string<3> language = 33; attribute access(write: manage) optional int8u LEDSettings = 34; - attribute access(write: manage) int32u autoRelockTime = 35; + attribute access(write: manage) optional int32u autoRelockTime = 35; attribute access(write: manage) optional int8u soundVolume = 36; attribute access(write: manage) OperatingModeEnum operatingMode = 37; readonly attribute DlSupportedOperatingModes supportedOperatingModes = 38; diff --git a/examples/placeholder/linux/apps/app2/config.matter b/examples/placeholder/linux/apps/app2/config.matter index fb6cccb45e0507..4e951ef5adfed9 100644 --- a/examples/placeholder/linux/apps/app2/config.matter +++ b/examples/placeholder/linux/apps/app2/config.matter @@ -3525,7 +3525,7 @@ cluster DoorLock = 257 { readonly attribute optional int8u numberOfCredentialsSupportedPerUser = 28; attribute access(write: manage) optional char_string<3> language = 33; attribute access(write: manage) optional int8u LEDSettings = 34; - attribute access(write: manage) int32u autoRelockTime = 35; + attribute access(write: manage) optional int32u autoRelockTime = 35; attribute access(write: manage) optional int8u soundVolume = 36; attribute access(write: manage) OperatingModeEnum operatingMode = 37; readonly attribute DlSupportedOperatingModes supportedOperatingModes = 38; @@ -4176,7 +4176,7 @@ cluster DoorLock = 257 { readonly attribute optional int8u numberOfCredentialsSupportedPerUser = 28; attribute access(write: manage) optional char_string<3> language = 33; attribute access(write: manage) optional int8u LEDSettings = 34; - attribute access(write: manage) int32u autoRelockTime = 35; + attribute access(write: manage) optional int32u autoRelockTime = 35; attribute access(write: manage) optional int8u soundVolume = 36; attribute access(write: manage) OperatingModeEnum operatingMode = 37; readonly attribute DlSupportedOperatingModes supportedOperatingModes = 38; diff --git a/examples/virtual-device-app/virtual-device-common/virtual-device-app.matter b/examples/virtual-device-app/virtual-device-common/virtual-device-app.matter index 3e35634ac740bc..5637d0c9cc2876 100644 --- a/examples/virtual-device-app/virtual-device-common/virtual-device-app.matter +++ b/examples/virtual-device-app/virtual-device-common/virtual-device-app.matter @@ -2448,7 +2448,7 @@ cluster DoorLock = 257 { readonly attribute optional int8u numberOfCredentialsSupportedPerUser = 28; attribute access(write: manage) optional char_string<3> language = 33; attribute access(write: manage) optional int8u LEDSettings = 34; - attribute access(write: manage) int32u autoRelockTime = 35; + attribute access(write: manage) optional int32u autoRelockTime = 35; attribute access(write: manage) optional int8u soundVolume = 36; attribute access(write: manage) OperatingModeEnum operatingMode = 37; readonly attribute DlSupportedOperatingModes supportedOperatingModes = 38; diff --git a/src/app/zap-templates/zcl/data-model/chip/door-lock-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/door-lock-cluster.xml index cc2bf491f25045..8ebb31df118d92 100644 --- a/src/app/zap-templates/zcl/data-model/chip/door-lock-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/door-lock-cluster.xml @@ -190,7 +190,7 @@ limitations under the License. - + AutoRelockTime diff --git a/src/controller/data_model/controller-clusters.matter b/src/controller/data_model/controller-clusters.matter index aceb6bb1281e2c..7cc587541d9a9c 100644 --- a/src/controller/data_model/controller-clusters.matter +++ b/src/controller/data_model/controller-clusters.matter @@ -5559,7 +5559,7 @@ cluster DoorLock = 257 { readonly attribute optional int8u numberOfCredentialsSupportedPerUser = 28; attribute access(write: manage) optional char_string<3> language = 33; attribute access(write: manage) optional int8u LEDSettings = 34; - attribute access(write: manage) int32u autoRelockTime = 35; + attribute access(write: manage) optional int32u autoRelockTime = 35; attribute access(write: manage) optional int8u soundVolume = 36; attribute access(write: manage) OperatingModeEnum operatingMode = 37; readonly attribute DlSupportedOperatingModes supportedOperatingModes = 38; diff --git a/src/controller/java/generated/java/matter/controller/cluster/clusters/DoorLockCluster.kt b/src/controller/java/generated/java/matter/controller/cluster/clusters/DoorLockCluster.kt index 320f02ced0c9a1..79acaad63e1e48 100644 --- a/src/controller/java/generated/java/matter/controller/cluster/clusters/DoorLockCluster.kt +++ b/src/controller/java/generated/java/matter/controller/cluster/clusters/DoorLockCluster.kt @@ -3647,7 +3647,7 @@ class DoorLockCluster(private val controller: MatterController, private val endp } } - suspend fun readAutoRelockTimeAttribute(): UInt { + suspend fun readAutoRelockTimeAttribute(): UInt? { val ATTRIBUTE_ID: UInt = 35u val attributePath = @@ -3673,7 +3673,12 @@ class DoorLockCluster(private val controller: MatterController, private val endp // Decode the TLV data into the appropriate type val tlvReader = TlvReader(attributeData.data) - val decodedValue: UInt = tlvReader.getUInt(AnonymousTag) + val decodedValue: UInt? = + if (tlvReader.isNextTag(AnonymousTag)) { + tlvReader.getUInt(AnonymousTag) + } else { + null + } return decodedValue } @@ -3759,9 +3764,14 @@ class DoorLockCluster(private val controller: MatterController, private val endp // Decode the TLV data into the appropriate type val tlvReader = TlvReader(attributeData.data) - val decodedValue: UInt = tlvReader.getUInt(AnonymousTag) + val decodedValue: UInt? = + if (tlvReader.isNextTag(AnonymousTag)) { + tlvReader.getUInt(AnonymousTag) + } else { + null + } - emit(UIntSubscriptionState.Success(decodedValue)) + decodedValue?.let { emit(UIntSubscriptionState.Success(it)) } } SubscriptionState.SubscriptionEstablished -> { emit(UIntSubscriptionState.SubscriptionEstablished) diff --git a/src/controller/python/chip/clusters/Objects.py b/src/controller/python/chip/clusters/Objects.py index e3eef1c61c7f4b..d8ed8dae9157c6 100644 --- a/src/controller/python/chip/clusters/Objects.py +++ b/src/controller/python/chip/clusters/Objects.py @@ -26774,7 +26774,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="numberOfCredentialsSupportedPerUser", Tag=0x0000001C, Type=typing.Optional[uint]), ClusterObjectFieldDescriptor(Label="language", Tag=0x00000021, Type=typing.Optional[str]), ClusterObjectFieldDescriptor(Label="LEDSettings", Tag=0x00000022, Type=typing.Optional[uint]), - ClusterObjectFieldDescriptor(Label="autoRelockTime", Tag=0x00000023, Type=uint), + ClusterObjectFieldDescriptor(Label="autoRelockTime", Tag=0x00000023, Type=typing.Optional[uint]), ClusterObjectFieldDescriptor(Label="soundVolume", Tag=0x00000024, Type=typing.Optional[uint]), ClusterObjectFieldDescriptor(Label="operatingMode", Tag=0x00000025, Type=DoorLock.Enums.OperatingModeEnum), ClusterObjectFieldDescriptor(Label="supportedOperatingModes", Tag=0x00000026, Type=uint), @@ -26827,7 +26827,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: numberOfCredentialsSupportedPerUser: 'typing.Optional[uint]' = None language: 'typing.Optional[str]' = None LEDSettings: 'typing.Optional[uint]' = None - autoRelockTime: 'uint' = None + autoRelockTime: 'typing.Optional[uint]' = None soundVolume: 'typing.Optional[uint]' = None operatingMode: 'DoorLock.Enums.OperatingModeEnum' = None supportedOperatingModes: 'uint' = None @@ -28224,9 +28224,9 @@ def attribute_id(cls) -> int: @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=uint) + return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - value: 'uint' = 0 + value: 'typing.Optional[uint]' = None @dataclass class SoundVolume(ClusterAttributeDescriptor):