Skip to content

Commit a94cb7c

Browse files
committed
Generated using ./scripts/tools/zap_regen_all.py
1 parent 6bad5b0 commit a94cb7c

File tree

22 files changed

+1837
-2249
lines changed

22 files changed

+1837
-2249
lines changed

scripts/tools/zap/tests/outputs/all-clusters-app/app-templates/IMClusterCommandHandler.cpp

+107-107
Large diffs are not rendered by default.

scripts/tools/zap/tests/outputs/lighting-app/app-templates/IMClusterCommandHandler.cpp

+57-57
Large diffs are not rendered by default.

src/controller/data_model/controller-clusters.matter

+5-3
Original file line numberDiff line numberDiff line change
@@ -10586,15 +10586,17 @@ cluster CommissionerControl = 1873 {
1058610586
provisional cluster TlsCertificateManagement = 2049 {
1058710587
revision 1;
1058810588

10589-
struct TLSCertStruct {
10589+
fabric_scoped struct TLSCertStruct {
1059010590
int16u caid = 0;
1059110591
optional long_octet_string<3000> certificate = 1;
10592+
fabric_idx fabricIndex = 254;
1059210593
}
1059310594

10594-
struct TLSClientCertificateDetailStruct {
10595+
fabric_scoped struct TLSClientCertificateDetailStruct {
1059510596
int16u ccdid = 0;
1059610597
optional long_octet_string<3000> clientCertificate = 1;
1059710598
optional octet_string intermediateCertificates[] = 2;
10599+
fabric_idx fabricIndex = 254;
1059810600
}
1059910601

1060010602
readonly attribute int8u maxRootCertificates = 0;
@@ -10683,7 +10685,7 @@ provisional cluster TlsCertificateManagement = 2049 {
1068310685
/** This command SHALL be generated to request the Node generates a Certificate Signing Request. */
1068410686
fabric command access(invoke: administer) TLSClientCSR(TLSClientCSRRequest): TLSClientCSRResponse = 7;
1068510687
/** This command SHALL be generated to request the Node provisions newly provided Client Certificate Details, or rotate an existing client certificate. */
10686-
command access(invoke: administer) ProvisionClientCertificate(ProvisionClientCertificateRequest): DefaultSuccess = 9;
10688+
fabric command access(invoke: administer) ProvisionClientCertificate(ProvisionClientCertificateRequest): DefaultSuccess = 9;
1068710689
/** This command SHALL return the TLSClientCertificateDetailStruct for the passed in CCDID, or all TLS client certificates, based on the contents of the CCDID field. */
1068810690
fabric command FindClientCertificate(FindClientCertificateRequest): FindClientCertificateResponse = 10;
1068910691
/** This command SHALL return the CCDID for the passed in Fingerprint. */

src/controller/java/generated/java/chip/devicecontroller/ChipClusters.java

+12-2
Original file line numberDiff line numberDiff line change
@@ -65406,6 +65406,11 @@ public void onSuccess(byte[] tlv) {
6540665406

6540765407
public void readProvisionedRootCertificatesAttribute(
6540865408
ProvisionedRootCertificatesAttributeCallback callback) {
65409+
readProvisionedRootCertificatesAttributeWithFabricFilter(callback, true);
65410+
}
65411+
65412+
public void readProvisionedRootCertificatesAttributeWithFabricFilter(
65413+
ProvisionedRootCertificatesAttributeCallback callback, boolean isFabricFiltered) {
6540965414
ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, PROVISIONED_ROOT_CERTIFICATES_ATTRIBUTE_ID);
6541065415

6541165416
readAttribute(new ReportCallbackImpl(callback, path) {
@@ -65414,7 +65419,7 @@ public void onSuccess(byte[] tlv) {
6541465419
List<ChipStructs.TlsCertificateManagementClusterTLSCertStruct> value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv);
6541565420
callback.onSuccess(value);
6541665421
}
65417-
}, PROVISIONED_ROOT_CERTIFICATES_ATTRIBUTE_ID, true);
65422+
}, PROVISIONED_ROOT_CERTIFICATES_ATTRIBUTE_ID, isFabricFiltered);
6541865423
}
6541965424

6542065425
public void subscribeProvisionedRootCertificatesAttribute(
@@ -65458,6 +65463,11 @@ public void onSuccess(byte[] tlv) {
6545865463

6545965464
public void readProvisionedClientCertificatesAttribute(
6546065465
ProvisionedClientCertificatesAttributeCallback callback) {
65466+
readProvisionedClientCertificatesAttributeWithFabricFilter(callback, true);
65467+
}
65468+
65469+
public void readProvisionedClientCertificatesAttributeWithFabricFilter(
65470+
ProvisionedClientCertificatesAttributeCallback callback, boolean isFabricFiltered) {
6546165471
ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, PROVISIONED_CLIENT_CERTIFICATES_ATTRIBUTE_ID);
6546265472

6546365473
readAttribute(new ReportCallbackImpl(callback, path) {
@@ -65466,7 +65476,7 @@ public void onSuccess(byte[] tlv) {
6546665476
List<ChipStructs.TlsCertificateManagementClusterTLSClientCertificateDetailStruct> value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv);
6546765477
callback.onSuccess(value);
6546865478
}
65469-
}, PROVISIONED_CLIENT_CERTIFICATES_ATTRIBUTE_ID, true);
65479+
}, PROVISIONED_CLIENT_CERTIFICATES_ATTRIBUTE_ID, isFabricFiltered);
6547065480
}
6547165481

6547265482
public void subscribeProvisionedClientCertificatesAttribute(

src/controller/java/generated/java/chip/devicecontroller/ChipStructs.java

+34-4
Original file line numberDiff line numberDiff line change
@@ -16152,21 +16152,26 @@ public String toString() {
1615216152
public static class TlsCertificateManagementClusterTLSCertStruct {
1615316153
public Integer caid;
1615416154
public Optional<byte[]> certificate;
16155+
public Integer fabricIndex;
1615516156
private static final long CAID_ID = 0L;
1615616157
private static final long CERTIFICATE_ID = 1L;
16158+
private static final long FABRIC_INDEX_ID = 254L;
1615716159

1615816160
public TlsCertificateManagementClusterTLSCertStruct(
1615916161
Integer caid,
16160-
Optional<byte[]> certificate
16162+
Optional<byte[]> certificate,
16163+
Integer fabricIndex
1616116164
) {
1616216165
this.caid = caid;
1616316166
this.certificate = certificate;
16167+
this.fabricIndex = fabricIndex;
1616416168
}
1616516169

1616616170
public StructType encodeTlv() {
1616716171
ArrayList<StructElement> values = new ArrayList<>();
1616816172
values.add(new StructElement(CAID_ID, new UIntType(caid)));
1616916173
values.add(new StructElement(CERTIFICATE_ID, certificate.<BaseTLVType>map((nonOptionalcertificate) -> new ByteArrayType(nonOptionalcertificate)).orElse(new EmptyType())));
16174+
values.add(new StructElement(FABRIC_INDEX_ID, new UIntType(fabricIndex)));
1617016175

1617116176
return new StructType(values);
1617216177
}
@@ -16177,6 +16182,7 @@ public static TlsCertificateManagementClusterTLSCertStruct decodeTlv(BaseTLVType
1617716182
}
1617816183
Integer caid = null;
1617916184
Optional<byte[]> certificate = Optional.empty();
16185+
Integer fabricIndex = null;
1618016186
for (StructElement element: ((StructType)tlvValue).value()) {
1618116187
if (element.contextTagNum() == CAID_ID) {
1618216188
if (element.value(BaseTLVType.class).type() == TLVType.UInt) {
@@ -16188,11 +16194,17 @@ public static TlsCertificateManagementClusterTLSCertStruct decodeTlv(BaseTLVType
1618816194
ByteArrayType castingValue = element.value(ByteArrayType.class);
1618916195
certificate = Optional.of(castingValue.value(byte[].class));
1619016196
}
16197+
} else if (element.contextTagNum() == FABRIC_INDEX_ID) {
16198+
if (element.value(BaseTLVType.class).type() == TLVType.UInt) {
16199+
UIntType castingValue = element.value(UIntType.class);
16200+
fabricIndex = castingValue.value(Integer.class);
16201+
}
1619116202
}
1619216203
}
1619316204
return new TlsCertificateManagementClusterTLSCertStruct(
1619416205
caid,
16195-
certificate
16206+
certificate,
16207+
fabricIndex
1619616208
);
1619716209
}
1619816210

@@ -16206,6 +16218,9 @@ public String toString() {
1620616218
output.append("\tcertificate: ");
1620716219
output.append(certificate.isPresent() ? Arrays.toString(certificate.get()) : "");
1620816220
output.append("\n");
16221+
output.append("\tfabricIndex: ");
16222+
output.append(fabricIndex);
16223+
output.append("\n");
1620916224
output.append("}\n");
1621016225
return output.toString();
1621116226
}
@@ -16214,25 +16229,30 @@ public static class TlsCertificateManagementClusterTLSClientCertificateDetailStr
1621416229
public Integer ccdid;
1621516230
public Optional<byte[]> clientCertificate;
1621616231
public Optional<ArrayList<byte[]>> intermediateCertificates;
16232+
public Integer fabricIndex;
1621716233
private static final long CCDID_ID = 0L;
1621816234
private static final long CLIENT_CERTIFICATE_ID = 1L;
1621916235
private static final long INTERMEDIATE_CERTIFICATES_ID = 2L;
16236+
private static final long FABRIC_INDEX_ID = 254L;
1622016237

1622116238
public TlsCertificateManagementClusterTLSClientCertificateDetailStruct(
1622216239
Integer ccdid,
1622316240
Optional<byte[]> clientCertificate,
16224-
Optional<ArrayList<byte[]>> intermediateCertificates
16241+
Optional<ArrayList<byte[]>> intermediateCertificates,
16242+
Integer fabricIndex
1622516243
) {
1622616244
this.ccdid = ccdid;
1622716245
this.clientCertificate = clientCertificate;
1622816246
this.intermediateCertificates = intermediateCertificates;
16247+
this.fabricIndex = fabricIndex;
1622916248
}
1623016249

1623116250
public StructType encodeTlv() {
1623216251
ArrayList<StructElement> values = new ArrayList<>();
1623316252
values.add(new StructElement(CCDID_ID, new UIntType(ccdid)));
1623416253
values.add(new StructElement(CLIENT_CERTIFICATE_ID, clientCertificate.<BaseTLVType>map((nonOptionalclientCertificate) -> new ByteArrayType(nonOptionalclientCertificate)).orElse(new EmptyType())));
1623516254
values.add(new StructElement(INTERMEDIATE_CERTIFICATES_ID, intermediateCertificates.<BaseTLVType>map((nonOptionalintermediateCertificates) -> ArrayType.generateArrayType(nonOptionalintermediateCertificates, (elementnonOptionalintermediateCertificates) -> new ByteArrayType(elementnonOptionalintermediateCertificates))).orElse(new EmptyType())));
16255+
values.add(new StructElement(FABRIC_INDEX_ID, new UIntType(fabricIndex)));
1623616256

1623716257
return new StructType(values);
1623816258
}
@@ -16244,6 +16264,7 @@ public static TlsCertificateManagementClusterTLSClientCertificateDetailStruct de
1624416264
Integer ccdid = null;
1624516265
Optional<byte[]> clientCertificate = Optional.empty();
1624616266
Optional<ArrayList<byte[]>> intermediateCertificates = Optional.empty();
16267+
Integer fabricIndex = null;
1624716268
for (StructElement element: ((StructType)tlvValue).value()) {
1624816269
if (element.contextTagNum() == CCDID_ID) {
1624916270
if (element.value(BaseTLVType.class).type() == TLVType.UInt) {
@@ -16260,12 +16281,18 @@ public static TlsCertificateManagementClusterTLSClientCertificateDetailStruct de
1626016281
ArrayType castingValue = element.value(ArrayType.class);
1626116282
intermediateCertificates = Optional.of(castingValue.map((elementcastingValue) -> elementcastingValue.value(byte[].class)));
1626216283
}
16284+
} else if (element.contextTagNum() == FABRIC_INDEX_ID) {
16285+
if (element.value(BaseTLVType.class).type() == TLVType.UInt) {
16286+
UIntType castingValue = element.value(UIntType.class);
16287+
fabricIndex = castingValue.value(Integer.class);
16288+
}
1626316289
}
1626416290
}
1626516291
return new TlsCertificateManagementClusterTLSClientCertificateDetailStruct(
1626616292
ccdid,
1626716293
clientCertificate,
16268-
intermediateCertificates
16294+
intermediateCertificates,
16295+
fabricIndex
1626916296
);
1627016297
}
1627116298

@@ -16282,6 +16309,9 @@ public String toString() {
1628216309
output.append("\tintermediateCertificates: ");
1628316310
output.append(intermediateCertificates);
1628416311
output.append("\n");
16312+
output.append("\tfabricIndex: ");
16313+
output.append(fabricIndex);
16314+
output.append("\n");
1628516315
output.append("}\n");
1628616316
return output.toString();
1628716317
}

src/controller/java/generated/java/chip/devicecontroller/cluster/structs/TlsCertificateManagementClusterTLSCertStruct.kt

+6-1
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,13 @@ import matter.tlv.TlvWriter
2626
class TlsCertificateManagementClusterTLSCertStruct(
2727
val caid: UInt,
2828
val certificate: Optional<ByteArray>,
29+
val fabricIndex: UInt,
2930
) {
3031
override fun toString(): String = buildString {
3132
append("TlsCertificateManagementClusterTLSCertStruct {\n")
3233
append("\tcaid : $caid\n")
3334
append("\tcertificate : $certificate\n")
35+
append("\tfabricIndex : $fabricIndex\n")
3436
append("}\n")
3537
}
3638

@@ -42,13 +44,15 @@ class TlsCertificateManagementClusterTLSCertStruct(
4244
val optcertificate = certificate.get()
4345
put(ContextSpecificTag(TAG_CERTIFICATE), optcertificate)
4446
}
47+
put(ContextSpecificTag(TAG_FABRIC_INDEX), fabricIndex)
4548
endStructure()
4649
}
4750
}
4851

4952
companion object {
5053
private const val TAG_CAID = 0
5154
private const val TAG_CERTIFICATE = 1
55+
private const val TAG_FABRIC_INDEX = 254
5256

5357
fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): TlsCertificateManagementClusterTLSCertStruct {
5458
tlvReader.enterStructure(tlvTag)
@@ -59,10 +63,11 @@ class TlsCertificateManagementClusterTLSCertStruct(
5963
} else {
6064
Optional.empty()
6165
}
66+
val fabricIndex = tlvReader.getUInt(ContextSpecificTag(TAG_FABRIC_INDEX))
6267

6368
tlvReader.exitContainer()
6469

65-
return TlsCertificateManagementClusterTLSCertStruct(caid, certificate)
70+
return TlsCertificateManagementClusterTLSCertStruct(caid, certificate, fabricIndex)
6671
}
6772
}
6873
}

src/controller/java/generated/java/chip/devicecontroller/cluster/structs/TlsCertificateManagementClusterTLSClientCertificateDetailStruct.kt

+6
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,14 @@ class TlsCertificateManagementClusterTLSClientCertificateDetailStruct(
2828
val ccdid: UInt,
2929
val clientCertificate: Optional<ByteArray>,
3030
val intermediateCertificates: Optional<List<ByteArray>>,
31+
val fabricIndex: UInt,
3132
) {
3233
override fun toString(): String = buildString {
3334
append("TlsCertificateManagementClusterTLSClientCertificateDetailStruct {\n")
3435
append("\tccdid : $ccdid\n")
3536
append("\tclientCertificate : $clientCertificate\n")
3637
append("\tintermediateCertificates : $intermediateCertificates\n")
38+
append("\tfabricIndex : $fabricIndex\n")
3739
append("}\n")
3840
}
3941

@@ -53,6 +55,7 @@ class TlsCertificateManagementClusterTLSClientCertificateDetailStruct(
5355
}
5456
endArray()
5557
}
58+
put(ContextSpecificTag(TAG_FABRIC_INDEX), fabricIndex)
5659
endStructure()
5760
}
5861
}
@@ -61,6 +64,7 @@ class TlsCertificateManagementClusterTLSClientCertificateDetailStruct(
6164
private const val TAG_CCDID = 0
6265
private const val TAG_CLIENT_CERTIFICATE = 1
6366
private const val TAG_INTERMEDIATE_CERTIFICATES = 2
67+
private const val TAG_FABRIC_INDEX = 254
6468

6569
fun fromTlv(
6670
tlvTag: Tag,
@@ -88,13 +92,15 @@ class TlsCertificateManagementClusterTLSClientCertificateDetailStruct(
8892
} else {
8993
Optional.empty()
9094
}
95+
val fabricIndex = tlvReader.getUInt(ContextSpecificTag(TAG_FABRIC_INDEX))
9196

9297
tlvReader.exitContainer()
9398

9499
return TlsCertificateManagementClusterTLSClientCertificateDetailStruct(
95100
ccdid,
96101
clientCertificate,
97102
intermediateCertificates,
103+
fabricIndex,
98104
)
99105
}
100106
}

src/controller/java/generated/java/matter/controller/cluster/structs/TlsCertificateManagementClusterTLSCertStruct.kt

+6-1
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,13 @@ import matter.tlv.TlvWriter
2626
class TlsCertificateManagementClusterTLSCertStruct(
2727
val caid: UShort,
2828
val certificate: Optional<ByteArray>,
29+
val fabricIndex: UByte,
2930
) {
3031
override fun toString(): String = buildString {
3132
append("TlsCertificateManagementClusterTLSCertStruct {\n")
3233
append("\tcaid : $caid\n")
3334
append("\tcertificate : $certificate\n")
35+
append("\tfabricIndex : $fabricIndex\n")
3436
append("}\n")
3537
}
3638

@@ -42,13 +44,15 @@ class TlsCertificateManagementClusterTLSCertStruct(
4244
val optcertificate = certificate.get()
4345
put(ContextSpecificTag(TAG_CERTIFICATE), optcertificate)
4446
}
47+
put(ContextSpecificTag(TAG_FABRIC_INDEX), fabricIndex)
4548
endStructure()
4649
}
4750
}
4851

4952
companion object {
5053
private const val TAG_CAID = 0
5154
private const val TAG_CERTIFICATE = 1
55+
private const val TAG_FABRIC_INDEX = 254
5256

5357
fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): TlsCertificateManagementClusterTLSCertStruct {
5458
tlvReader.enterStructure(tlvTag)
@@ -59,10 +63,11 @@ class TlsCertificateManagementClusterTLSCertStruct(
5963
} else {
6064
Optional.empty()
6165
}
66+
val fabricIndex = tlvReader.getUByte(ContextSpecificTag(TAG_FABRIC_INDEX))
6267

6368
tlvReader.exitContainer()
6469

65-
return TlsCertificateManagementClusterTLSCertStruct(caid, certificate)
70+
return TlsCertificateManagementClusterTLSCertStruct(caid, certificate, fabricIndex)
6671
}
6772
}
6873
}

src/controller/java/generated/java/matter/controller/cluster/structs/TlsCertificateManagementClusterTLSClientCertificateDetailStruct.kt

+6
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,14 @@ class TlsCertificateManagementClusterTLSClientCertificateDetailStruct(
2828
val ccdid: UShort,
2929
val clientCertificate: Optional<ByteArray>,
3030
val intermediateCertificates: Optional<List<ByteArray>>,
31+
val fabricIndex: UByte,
3132
) {
3233
override fun toString(): String = buildString {
3334
append("TlsCertificateManagementClusterTLSClientCertificateDetailStruct {\n")
3435
append("\tccdid : $ccdid\n")
3536
append("\tclientCertificate : $clientCertificate\n")
3637
append("\tintermediateCertificates : $intermediateCertificates\n")
38+
append("\tfabricIndex : $fabricIndex\n")
3739
append("}\n")
3840
}
3941

@@ -53,6 +55,7 @@ class TlsCertificateManagementClusterTLSClientCertificateDetailStruct(
5355
}
5456
endArray()
5557
}
58+
put(ContextSpecificTag(TAG_FABRIC_INDEX), fabricIndex)
5659
endStructure()
5760
}
5861
}
@@ -61,6 +64,7 @@ class TlsCertificateManagementClusterTLSClientCertificateDetailStruct(
6164
private const val TAG_CCDID = 0
6265
private const val TAG_CLIENT_CERTIFICATE = 1
6366
private const val TAG_INTERMEDIATE_CERTIFICATES = 2
67+
private const val TAG_FABRIC_INDEX = 254
6468

6569
fun fromTlv(
6670
tlvTag: Tag,
@@ -88,13 +92,15 @@ class TlsCertificateManagementClusterTLSClientCertificateDetailStruct(
8892
} else {
8993
Optional.empty()
9094
}
95+
val fabricIndex = tlvReader.getUByte(ContextSpecificTag(TAG_FABRIC_INDEX))
9196

9297
tlvReader.exitContainer()
9398

9499
return TlsCertificateManagementClusterTLSClientCertificateDetailStruct(
95100
ccdid,
96101
clientCertificate,
97102
intermediateCertificates,
103+
fabricIndex,
98104
)
99105
}
100106
}

0 commit comments

Comments
 (0)