Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mark AutoRelockTime attribute of the Door Lock cluster as optional in the XML #33701

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -2972,7 +2972,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;
Expand Down
2 changes: 1 addition & 1 deletion examples/chef/devices/rootnode_doorlock_aNKYAreMXE.matter
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion examples/lock-app/lock-common/lock-app.matter
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion examples/lock-app/nxp/zap/lock-app.matter
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion examples/lock-app/qpg/zap/lock.matter
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
4 changes: 2 additions & 2 deletions examples/placeholder/linux/apps/app1/config.matter
Original file line number Diff line number Diff line change
Expand Up @@ -3566,7 +3566,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;
Expand Down Expand Up @@ -4217,7 +4217,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;
Expand Down
4 changes: 2 additions & 2 deletions examples/placeholder/linux/apps/app2/config.matter
Original file line number Diff line number Diff line change
Expand Up @@ -3523,7 +3523,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;
Expand Down Expand Up @@ -4174,7 +4174,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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ limitations under the License.
<access op="read" role="view" />
<access op="write" role="manage" />
</attribute>
<attribute side="server" code="35" define="AUTO_RELOCK_TIME" type="int32u" reportable="true" writable="true">
<attribute side="server" code="35" define="AUTO_RELOCK_TIME" type="int32u" reportable="true" writable="true" optional="true">
<description>AutoRelockTime</description>
<access op="read" role="view" />
<access op="write" role="manage" />
Expand Down
2 changes: 1 addition & 1 deletion src/controller/data_model/controller-clusters.matter
Original file line number Diff line number Diff line change
Expand Up @@ -5558,7 +5558,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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 =
Expand All @@ -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
}
Expand Down Expand Up @@ -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)
Expand Down
8 changes: 4 additions & 4 deletions src/controller/python/chip/clusters/Objects.py

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading