Skip to content

Commit

Permalink
Correctly add AliroExpeditedTransactionSupportedProtocolVersions and …
Browse files Browse the repository at this point in the history
…AliroSupportedBLEUWBProtocolVersions attributes as lists
  • Loading branch information
nivi-apple committed Jan 8, 2024
1 parent 5b6ef86 commit 6a042ac
Show file tree
Hide file tree
Showing 28 changed files with 421 additions and 181 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3018,9 +3018,9 @@ cluster DoorLock = 257 {
readonly attribute access(read: administer) optional nullable octet_string<65> aliroReaderVerificationKey = 128;
readonly attribute access(read: administer) optional nullable octet_string<16> aliroReaderGroupIdentifier = 129;
readonly attribute access(read: administer) optional octet_string<16> aliroReaderGroupSubIdentifier = 130;
readonly attribute access(read: administer) optional octet_string<16> aliroExpeditedTransactionSupportedProtocolVersions = 131;
readonly attribute access(read: administer) optional octet_string aliroExpeditedTransactionSupportedProtocolVersions[] = 131;
readonly attribute access(read: administer) optional nullable octet_string<16> aliroGroupResolvingKey = 132;
readonly attribute access(read: administer) optional octet_string<16> aliroSupportedBLEUWBProtocolVersions = 133;
readonly attribute access(read: administer) optional octet_string aliroSupportedBLEUWBProtocolVersions[] = 133;
readonly attribute access(read: administer) optional int8u aliroBLEAdvertisingVersion = 134;
readonly attribute optional int16u numberOfAliroCredentialIssuerKeysSupported = 135;
readonly attribute optional int16u numberOfAliroEndpointKeysSupported = 136;
Expand Down
4 changes: 2 additions & 2 deletions examples/chef/devices/rootnode_doorlock_aNKYAreMXE.matter
Original file line number Diff line number Diff line change
Expand Up @@ -1719,9 +1719,9 @@ cluster DoorLock = 257 {
readonly attribute access(read: administer) optional nullable octet_string<65> aliroReaderVerificationKey = 128;
readonly attribute access(read: administer) optional nullable octet_string<16> aliroReaderGroupIdentifier = 129;
readonly attribute access(read: administer) optional octet_string<16> aliroReaderGroupSubIdentifier = 130;
readonly attribute access(read: administer) optional octet_string<16> aliroExpeditedTransactionSupportedProtocolVersions = 131;
readonly attribute access(read: administer) optional octet_string aliroExpeditedTransactionSupportedProtocolVersions[] = 131;
readonly attribute access(read: administer) optional nullable octet_string<16> aliroGroupResolvingKey = 132;
readonly attribute access(read: administer) optional octet_string<16> aliroSupportedBLEUWBProtocolVersions = 133;
readonly attribute access(read: administer) optional octet_string aliroSupportedBLEUWBProtocolVersions[] = 133;
readonly attribute access(read: administer) optional int8u aliroBLEAdvertisingVersion = 134;
readonly attribute optional int16u numberOfAliroCredentialIssuerKeysSupported = 135;
readonly attribute optional int16u numberOfAliroEndpointKeysSupported = 136;
Expand Down
4 changes: 2 additions & 2 deletions examples/lock-app/lock-common/lock-app.matter
Original file line number Diff line number Diff line change
Expand Up @@ -2244,9 +2244,9 @@ cluster DoorLock = 257 {
readonly attribute access(read: administer) optional nullable octet_string<65> aliroReaderVerificationKey = 128;
readonly attribute access(read: administer) optional nullable octet_string<16> aliroReaderGroupIdentifier = 129;
readonly attribute access(read: administer) optional octet_string<16> aliroReaderGroupSubIdentifier = 130;
readonly attribute access(read: administer) optional octet_string<16> aliroExpeditedTransactionSupportedProtocolVersions = 131;
readonly attribute access(read: administer) optional octet_string aliroExpeditedTransactionSupportedProtocolVersions[] = 131;
readonly attribute access(read: administer) optional nullable octet_string<16> aliroGroupResolvingKey = 132;
readonly attribute access(read: administer) optional octet_string<16> aliroSupportedBLEUWBProtocolVersions = 133;
readonly attribute access(read: administer) optional octet_string aliroSupportedBLEUWBProtocolVersions[] = 133;
readonly attribute access(read: administer) optional int8u aliroBLEAdvertisingVersion = 134;
readonly attribute optional int16u numberOfAliroCredentialIssuerKeysSupported = 135;
readonly attribute optional int16u numberOfAliroEndpointKeysSupported = 136;
Expand Down
4 changes: 2 additions & 2 deletions examples/lock-app/nxp/zap/lock-app.matter
Original file line number Diff line number Diff line change
Expand Up @@ -1506,9 +1506,9 @@ cluster DoorLock = 257 {
readonly attribute access(read: administer) optional nullable octet_string<65> aliroReaderVerificationKey = 128;
readonly attribute access(read: administer) optional nullable octet_string<16> aliroReaderGroupIdentifier = 129;
readonly attribute access(read: administer) optional octet_string<16> aliroReaderGroupSubIdentifier = 130;
readonly attribute access(read: administer) optional octet_string<16> aliroExpeditedTransactionSupportedProtocolVersions = 131;
readonly attribute access(read: administer) optional octet_string aliroExpeditedTransactionSupportedProtocolVersions[] = 131;
readonly attribute access(read: administer) optional nullable octet_string<16> aliroGroupResolvingKey = 132;
readonly attribute access(read: administer) optional octet_string<16> aliroSupportedBLEUWBProtocolVersions = 133;
readonly attribute access(read: administer) optional octet_string aliroSupportedBLEUWBProtocolVersions[] = 133;
readonly attribute access(read: administer) optional int8u aliroBLEAdvertisingVersion = 134;
readonly attribute optional int16u numberOfAliroCredentialIssuerKeysSupported = 135;
readonly attribute optional int16u numberOfAliroEndpointKeysSupported = 136;
Expand Down
4 changes: 2 additions & 2 deletions examples/lock-app/qpg/zap/lock.matter
Original file line number Diff line number Diff line change
Expand Up @@ -1900,9 +1900,9 @@ cluster DoorLock = 257 {
readonly attribute access(read: administer) optional nullable octet_string<65> aliroReaderVerificationKey = 128;
readonly attribute access(read: administer) optional nullable octet_string<16> aliroReaderGroupIdentifier = 129;
readonly attribute access(read: administer) optional octet_string<16> aliroReaderGroupSubIdentifier = 130;
readonly attribute access(read: administer) optional octet_string<16> aliroExpeditedTransactionSupportedProtocolVersions = 131;
readonly attribute access(read: administer) optional octet_string aliroExpeditedTransactionSupportedProtocolVersions[] = 131;
readonly attribute access(read: administer) optional nullable octet_string<16> aliroGroupResolvingKey = 132;
readonly attribute access(read: administer) optional octet_string<16> aliroSupportedBLEUWBProtocolVersions = 133;
readonly attribute access(read: administer) optional octet_string aliroSupportedBLEUWBProtocolVersions[] = 133;
readonly attribute access(read: administer) optional int8u aliroBLEAdvertisingVersion = 134;
readonly attribute optional int16u numberOfAliroCredentialIssuerKeysSupported = 135;
readonly attribute optional int16u numberOfAliroEndpointKeysSupported = 136;
Expand Down
8 changes: 4 additions & 4 deletions examples/placeholder/linux/apps/app1/config.matter
Original file line number Diff line number Diff line change
Expand Up @@ -3612,9 +3612,9 @@ cluster DoorLock = 257 {
readonly attribute access(read: administer) optional nullable octet_string<65> aliroReaderVerificationKey = 128;
readonly attribute access(read: administer) optional nullable octet_string<16> aliroReaderGroupIdentifier = 129;
readonly attribute access(read: administer) optional octet_string<16> aliroReaderGroupSubIdentifier = 130;
readonly attribute access(read: administer) optional octet_string<16> aliroExpeditedTransactionSupportedProtocolVersions = 131;
readonly attribute access(read: administer) optional octet_string aliroExpeditedTransactionSupportedProtocolVersions[] = 131;
readonly attribute access(read: administer) optional nullable octet_string<16> aliroGroupResolvingKey = 132;
readonly attribute access(read: administer) optional octet_string<16> aliroSupportedBLEUWBProtocolVersions = 133;
readonly attribute access(read: administer) optional octet_string aliroSupportedBLEUWBProtocolVersions[] = 133;
readonly attribute access(read: administer) optional int8u aliroBLEAdvertisingVersion = 134;
readonly attribute optional int16u numberOfAliroCredentialIssuerKeysSupported = 135;
readonly attribute optional int16u numberOfAliroEndpointKeysSupported = 136;
Expand Down Expand Up @@ -4263,9 +4263,9 @@ cluster DoorLock = 257 {
readonly attribute access(read: administer) optional nullable octet_string<65> aliroReaderVerificationKey = 128;
readonly attribute access(read: administer) optional nullable octet_string<16> aliroReaderGroupIdentifier = 129;
readonly attribute access(read: administer) optional octet_string<16> aliroReaderGroupSubIdentifier = 130;
readonly attribute access(read: administer) optional octet_string<16> aliroExpeditedTransactionSupportedProtocolVersions = 131;
readonly attribute access(read: administer) optional octet_string aliroExpeditedTransactionSupportedProtocolVersions[] = 131;
readonly attribute access(read: administer) optional nullable octet_string<16> aliroGroupResolvingKey = 132;
readonly attribute access(read: administer) optional octet_string<16> aliroSupportedBLEUWBProtocolVersions = 133;
readonly attribute access(read: administer) optional octet_string aliroSupportedBLEUWBProtocolVersions[] = 133;
readonly attribute access(read: administer) optional int8u aliroBLEAdvertisingVersion = 134;
readonly attribute optional int16u numberOfAliroCredentialIssuerKeysSupported = 135;
readonly attribute optional int16u numberOfAliroEndpointKeysSupported = 136;
Expand Down
8 changes: 4 additions & 4 deletions examples/placeholder/linux/apps/app2/config.matter
Original file line number Diff line number Diff line change
Expand Up @@ -3569,9 +3569,9 @@ cluster DoorLock = 257 {
readonly attribute access(read: administer) optional nullable octet_string<65> aliroReaderVerificationKey = 128;
readonly attribute access(read: administer) optional nullable octet_string<16> aliroReaderGroupIdentifier = 129;
readonly attribute access(read: administer) optional octet_string<16> aliroReaderGroupSubIdentifier = 130;
readonly attribute access(read: administer) optional octet_string<16> aliroExpeditedTransactionSupportedProtocolVersions = 131;
readonly attribute access(read: administer) optional octet_string aliroExpeditedTransactionSupportedProtocolVersions[] = 131;
readonly attribute access(read: administer) optional nullable octet_string<16> aliroGroupResolvingKey = 132;
readonly attribute access(read: administer) optional octet_string<16> aliroSupportedBLEUWBProtocolVersions = 133;
readonly attribute access(read: administer) optional octet_string aliroSupportedBLEUWBProtocolVersions[] = 133;
readonly attribute access(read: administer) optional int8u aliroBLEAdvertisingVersion = 134;
readonly attribute optional int16u numberOfAliroCredentialIssuerKeysSupported = 135;
readonly attribute optional int16u numberOfAliroEndpointKeysSupported = 136;
Expand Down Expand Up @@ -4220,9 +4220,9 @@ cluster DoorLock = 257 {
readonly attribute access(read: administer) optional nullable octet_string<65> aliroReaderVerificationKey = 128;
readonly attribute access(read: administer) optional nullable octet_string<16> aliroReaderGroupIdentifier = 129;
readonly attribute access(read: administer) optional octet_string<16> aliroReaderGroupSubIdentifier = 130;
readonly attribute access(read: administer) optional octet_string<16> aliroExpeditedTransactionSupportedProtocolVersions = 131;
readonly attribute access(read: administer) optional octet_string aliroExpeditedTransactionSupportedProtocolVersions[] = 131;
readonly attribute access(read: administer) optional nullable octet_string<16> aliroGroupResolvingKey = 132;
readonly attribute access(read: administer) optional octet_string<16> aliroSupportedBLEUWBProtocolVersions = 133;
readonly attribute access(read: administer) optional octet_string aliroSupportedBLEUWBProtocolVersions[] = 133;
readonly attribute access(read: administer) optional int8u aliroBLEAdvertisingVersion = 134;
readonly attribute optional int16u numberOfAliroCredentialIssuerKeysSupported = 135;
readonly attribute optional int16u numberOfAliroEndpointKeysSupported = 136;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2494,9 +2494,9 @@ cluster DoorLock = 257 {
readonly attribute access(read: administer) optional nullable octet_string<65> aliroReaderVerificationKey = 128;
readonly attribute access(read: administer) optional nullable octet_string<16> aliroReaderGroupIdentifier = 129;
readonly attribute access(read: administer) optional octet_string<16> aliroReaderGroupSubIdentifier = 130;
readonly attribute access(read: administer) optional octet_string<16> aliroExpeditedTransactionSupportedProtocolVersions = 131;
readonly attribute access(read: administer) optional octet_string aliroExpeditedTransactionSupportedProtocolVersions[] = 131;
readonly attribute access(read: administer) optional nullable octet_string<16> aliroGroupResolvingKey = 132;
readonly attribute access(read: administer) optional octet_string<16> aliroSupportedBLEUWBProtocolVersions = 133;
readonly attribute access(read: administer) optional octet_string aliroSupportedBLEUWBProtocolVersions[] = 133;
readonly attribute access(read: administer) optional int8u aliroBLEAdvertisingVersion = 134;
readonly attribute optional int16u numberOfAliroCredentialIssuerKeysSupported = 135;
readonly attribute optional int16u numberOfAliroEndpointKeysSupported = 136;
Expand Down
2 changes: 1 addition & 1 deletion src/app/clusters/door-lock-server/door-lock-server.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/**
*
* Copyright (c) 2020 Project CHIP Authors
* Copyright (c) 2020 - 2024 Project CHIP Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ limitations under the License.
<access op="read" privilege="administer" />
</attribute>
<!-- Conformance feature [ALIRO] - optional -->
<attribute side="server" code="131" define="ALIRO_EXPEDITED_TRANSACTION_SUPPORTED_PROTOCOL_VERSIONS" type="octet_string" array="true" length="16" writable="false" optional="true" apiMaturity="provisional">
<attribute side="server" code="131" define="ALIRO_EXPEDITED_TRANSACTION_SUPPORTED_PROTOCOL_VERSIONS" type="array" entryType="octet_string" length="16" writable="false" optional="true" apiMaturity="provisional">
<description>AliroExpeditedTransactionSupportedProtocolVersions</description>
<access op="read" privilege="administer" />
</attribute>
Expand All @@ -228,7 +228,7 @@ limitations under the License.
<access op="read" privilege="administer" />
</attribute>
<!-- Conformance feature [ALBU] - optional if ALIRO is supported -->
<attribute side="server" code="133" define="ALIRO_SUPPORTED_BLE_UWB_PROTOCOL_VERSIONS" type="octet_string" array="true" length="16" writable="false" optional="true" apiMaturity="provisional">
<attribute side="server" code="133" define="ALIRO_SUPPORTED_BLE_UWB_PROTOCOL_VERSIONS" type="array" entryType="octet_string" length="16" writable="false" optional="true" apiMaturity="provisional">
<description>AliroSupportedBLEUWBProtocolVersions</description>
<access op="read" privilege="administer" />
</attribute>
Expand Down
4 changes: 2 additions & 2 deletions src/controller/data_model/controller-clusters.matter
Original file line number Diff line number Diff line change
Expand Up @@ -5217,9 +5217,9 @@ cluster DoorLock = 257 {
readonly attribute access(read: administer) optional nullable octet_string<65> aliroReaderVerificationKey = 128;
readonly attribute access(read: administer) optional nullable octet_string<16> aliroReaderGroupIdentifier = 129;
readonly attribute access(read: administer) optional octet_string<16> aliroReaderGroupSubIdentifier = 130;
readonly attribute access(read: administer) optional octet_string<16> aliroExpeditedTransactionSupportedProtocolVersions = 131;
readonly attribute access(read: administer) optional octet_string aliroExpeditedTransactionSupportedProtocolVersions[] = 131;
readonly attribute access(read: administer) optional nullable octet_string<16> aliroGroupResolvingKey = 132;
readonly attribute access(read: administer) optional octet_string<16> aliroSupportedBLEUWBProtocolVersions = 133;
readonly attribute access(read: administer) optional octet_string aliroSupportedBLEUWBProtocolVersions[] = 133;
readonly attribute access(read: administer) optional int8u aliroBLEAdvertisingVersion = 134;
readonly attribute optional int16u numberOfAliroCredentialIssuerKeysSupported = 135;
readonly attribute optional int16u numberOfAliroEndpointKeysSupported = 136;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32076,10 +32076,18 @@ public interface AliroReaderGroupIdentifierAttributeCallback extends BaseAttribu
void onSuccess(@Nullable byte[] value);
}

public interface AliroExpeditedTransactionSupportedProtocolVersionsAttributeCallback extends BaseAttributeCallback {
void onSuccess(List<byte[]> value);
}

public interface AliroGroupResolvingKeyAttributeCallback extends BaseAttributeCallback {
void onSuccess(@Nullable byte[] value);
}

public interface AliroSupportedBLEUWBProtocolVersionsAttributeCallback extends BaseAttributeCallback {
void onSuccess(List<byte[]> value);
}

public interface GeneratedCommandListAttributeCallback extends BaseAttributeCallback {
void onSuccess(List<Long> value);
}
Expand Down Expand Up @@ -33234,26 +33242,26 @@ public void onSuccess(byte[] tlv) {
}

public void readAliroExpeditedTransactionSupportedProtocolVersionsAttribute(
OctetStringAttributeCallback callback) {
AliroExpeditedTransactionSupportedProtocolVersionsAttributeCallback callback) {
ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ALIRO_EXPEDITED_TRANSACTION_SUPPORTED_PROTOCOL_VERSIONS_ATTRIBUTE_ID);

readAttribute(new ReportCallbackImpl(callback, path) {
@Override
public void onSuccess(byte[] tlv) {
byte[] value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv);
List<byte[]> value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv);
callback.onSuccess(value);
}
}, ALIRO_EXPEDITED_TRANSACTION_SUPPORTED_PROTOCOL_VERSIONS_ATTRIBUTE_ID, true);
}

public void subscribeAliroExpeditedTransactionSupportedProtocolVersionsAttribute(
OctetStringAttributeCallback callback, int minInterval, int maxInterval) {
AliroExpeditedTransactionSupportedProtocolVersionsAttributeCallback callback, int minInterval, int maxInterval) {
ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ALIRO_EXPEDITED_TRANSACTION_SUPPORTED_PROTOCOL_VERSIONS_ATTRIBUTE_ID);

subscribeAttribute(new ReportCallbackImpl(callback, path) {
@Override
public void onSuccess(byte[] tlv) {
byte[] value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv);
List<byte[]> value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv);
}
}, ALIRO_EXPEDITED_TRANSACTION_SUPPORTED_PROTOCOL_VERSIONS_ATTRIBUTE_ID, minInterval, maxInterval);
}
Expand Down Expand Up @@ -33284,26 +33292,26 @@ public void onSuccess(byte[] tlv) {
}

public void readAliroSupportedBLEUWBProtocolVersionsAttribute(
OctetStringAttributeCallback callback) {
AliroSupportedBLEUWBProtocolVersionsAttributeCallback callback) {
ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ALIRO_SUPPORTED_B_L_E_U_W_B_PROTOCOL_VERSIONS_ATTRIBUTE_ID);

readAttribute(new ReportCallbackImpl(callback, path) {
@Override
public void onSuccess(byte[] tlv) {
byte[] value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv);
List<byte[]> value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv);
callback.onSuccess(value);
}
}, ALIRO_SUPPORTED_B_L_E_U_W_B_PROTOCOL_VERSIONS_ATTRIBUTE_ID, true);
}

public void subscribeAliroSupportedBLEUWBProtocolVersionsAttribute(
OctetStringAttributeCallback callback, int minInterval, int maxInterval) {
AliroSupportedBLEUWBProtocolVersionsAttributeCallback callback, int minInterval, int maxInterval) {
ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ALIRO_SUPPORTED_B_L_E_U_W_B_PROTOCOL_VERSIONS_ATTRIBUTE_ID);

subscribeAttribute(new ReportCallbackImpl(callback, path) {
@Override
public void onSuccess(byte[] tlv) {
byte[] value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv);
List<byte[]> value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv);
}
}, ALIRO_SUPPORTED_B_L_E_U_W_B_PROTOCOL_VERSIONS_ATTRIBUTE_ID, minInterval, maxInterval);
}
Expand Down
Loading

0 comments on commit 6a042ac

Please sign in to comment.