Skip to content

Commit

Permalink
Re-generated after merge using ./scripts/tools/zap_regen_all.py
Browse files Browse the repository at this point in the history
  • Loading branch information
gmarcosb committed Jan 10, 2025
1 parent 6948ccc commit aca517a
Show file tree
Hide file tree
Showing 18 changed files with 96 additions and 112 deletions.
6 changes: 3 additions & 3 deletions src/controller/data_model/controller-clusters.matter
Original file line number Diff line number Diff line change
Expand Up @@ -10260,7 +10260,7 @@ provisional cluster TlsCertificateManagement = 2049 {
struct TLSClientCertificateDetailStruct {
int16u ccdid = 0;
long_octet_string<3000> clientCertificate = 1;
octet_string intermediateCerts[] = 2;
octet_string intermediateCertificates[] = 2;
}

readonly attribute int8u maxRootCertificates = 0;
Expand All @@ -10276,15 +10276,15 @@ provisional cluster TlsCertificateManagement = 2049 {

request struct ProvisionRootCertificateRequest {
long_octet_string<3000> certificate = 0;
optional nullable int16u caid = 1;
nullable int16u caid = 1;
}

response struct ProvisionRootCertificateResponse = 1 {
int16u caid = 0;
}

request struct FindRootCertificateRequest {
optional nullable int16u caid = 0;
nullable int16u caid = 0;
}

response struct FindRootCertificateResponse = 3 {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63895,11 +63895,11 @@ public long initWithDevice(long devicePtr, int endpointId) {
return 0L;
}

public void provisionRootCertificate(ProvisionRootCertificateResponseCallback callback, byte[] certificate, @Nullable Optional<Integer> caid) {
public void provisionRootCertificate(ProvisionRootCertificateResponseCallback callback, byte[] certificate, @Nullable Integer caid) {
provisionRootCertificate(callback, certificate, caid, 0);
}

public void provisionRootCertificate(ProvisionRootCertificateResponseCallback callback, byte[] certificate, @Nullable Optional<Integer> caid, int timedInvokeTimeoutMs) {
public void provisionRootCertificate(ProvisionRootCertificateResponseCallback callback, byte[] certificate, @Nullable Integer caid, int timedInvokeTimeoutMs) {
final long commandId = 0L;

ArrayList<StructElement> elements = new ArrayList<>();
Expand All @@ -63908,7 +63908,7 @@ public void provisionRootCertificate(ProvisionRootCertificateResponseCallback ca
elements.add(new StructElement(certificateFieldID, certificatetlvValue));

final long caidFieldID = 1L;
BaseTLVType caidtlvValue = caid != null ? caid.<BaseTLVType>map((nonOptionalcaid) -> new UIntType(nonOptionalcaid)).orElse(new EmptyType()) : new NullType();
BaseTLVType caidtlvValue = caid != null ? new UIntType(caid) : new NullType();
elements.add(new StructElement(caidFieldID, caidtlvValue));

StructType commandArgs = new StructType(elements);
Expand All @@ -63929,16 +63929,16 @@ public void onResponse(StructType invokeStructValue) {
}}, commandId, commandArgs, timedInvokeTimeoutMs);
}

public void findRootCertificate(FindRootCertificateResponseCallback callback, @Nullable Optional<Integer> caid) {
public void findRootCertificate(FindRootCertificateResponseCallback callback, @Nullable Integer caid) {
findRootCertificate(callback, caid, 0);
}

public void findRootCertificate(FindRootCertificateResponseCallback callback, @Nullable Optional<Integer> caid, int timedInvokeTimeoutMs) {
public void findRootCertificate(FindRootCertificateResponseCallback callback, @Nullable Integer caid, int timedInvokeTimeoutMs) {
final long commandId = 2L;

ArrayList<StructElement> elements = new ArrayList<>();
final long caidFieldID = 0L;
BaseTLVType caidtlvValue = caid != null ? caid.<BaseTLVType>map((nonOptionalcaid) -> new UIntType(nonOptionalcaid)).orElse(new EmptyType()) : new NullType();
BaseTLVType caidtlvValue = caid != null ? new UIntType(caid) : new NullType();
elements.add(new StructElement(caidFieldID, caidtlvValue));

StructType commandArgs = new StructType(elements);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15303,26 +15303,26 @@ public String toString() {
public static class TlsCertificateManagementClusterTLSClientCertificateDetailStruct {
public Integer ccdid;
public byte[] clientCertificate;
public ArrayList<byte[]> intermediateCerts;
public ArrayList<byte[]> intermediateCertificates;
private static final long CCDID_ID = 0L;
private static final long CLIENT_CERTIFICATE_ID = 1L;
private static final long INTERMEDIATE_CERTS_ID = 2L;
private static final long INTERMEDIATE_CERTIFICATES_ID = 2L;

public TlsCertificateManagementClusterTLSClientCertificateDetailStruct(
Integer ccdid,
byte[] clientCertificate,
ArrayList<byte[]> intermediateCerts
ArrayList<byte[]> intermediateCertificates
) {
this.ccdid = ccdid;
this.clientCertificate = clientCertificate;
this.intermediateCerts = intermediateCerts;
this.intermediateCertificates = intermediateCertificates;
}

public StructType encodeTlv() {
ArrayList<StructElement> values = new ArrayList<>();
values.add(new StructElement(CCDID_ID, new UIntType(ccdid)));
values.add(new StructElement(CLIENT_CERTIFICATE_ID, new ByteArrayType(clientCertificate)));
values.add(new StructElement(INTERMEDIATE_CERTS_ID, ArrayType.generateArrayType(intermediateCerts, (elementintermediateCerts) -> new ByteArrayType(elementintermediateCerts))));
values.add(new StructElement(INTERMEDIATE_CERTIFICATES_ID, ArrayType.generateArrayType(intermediateCertificates, (elementintermediateCertificates) -> new ByteArrayType(elementintermediateCertificates))));

return new StructType(values);
}
Expand All @@ -15333,7 +15333,7 @@ public static TlsCertificateManagementClusterTLSClientCertificateDetailStruct de
}
Integer ccdid = null;
byte[] clientCertificate = null;
ArrayList<byte[]> intermediateCerts = null;
ArrayList<byte[]> intermediateCertificates = null;
for (StructElement element: ((StructType)tlvValue).value()) {
if (element.contextTagNum() == CCDID_ID) {
if (element.value(BaseTLVType.class).type() == TLVType.UInt) {
Expand All @@ -15345,17 +15345,17 @@ public static TlsCertificateManagementClusterTLSClientCertificateDetailStruct de
ByteArrayType castingValue = element.value(ByteArrayType.class);
clientCertificate = castingValue.value(byte[].class);
}
} else if (element.contextTagNum() == INTERMEDIATE_CERTS_ID) {
} else if (element.contextTagNum() == INTERMEDIATE_CERTIFICATES_ID) {
if (element.value(BaseTLVType.class).type() == TLVType.Array) {
ArrayType castingValue = element.value(ArrayType.class);
intermediateCerts = castingValue.map((elementcastingValue) -> elementcastingValue.value(byte[].class));
intermediateCertificates = castingValue.map((elementcastingValue) -> elementcastingValue.value(byte[].class));
}
}
}
return new TlsCertificateManagementClusterTLSClientCertificateDetailStruct(
ccdid,
clientCertificate,
intermediateCerts
intermediateCertificates
);
}

Expand All @@ -15369,8 +15369,8 @@ public String toString() {
output.append("\tclientCertificate: ");
output.append(Arrays.toString(clientCertificate));
output.append("\n");
output.append("\tintermediateCerts: ");
output.append(intermediateCerts);
output.append("\tintermediateCertificates: ");
output.append(intermediateCertificates);
output.append("\n");
output.append("}\n");
return output.toString();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30813,7 +30813,7 @@ public Map<String, Map<String, InteractionInfo>> getCommandMap() {
CommandParameterInfo tlsCertificateManagementprovisionRootCertificatecertificateCommandParameterInfo = new CommandParameterInfo("certificate", byte[].class, byte[].class);
tlsCertificateManagementprovisionRootCertificateCommandParams.put("certificate",tlsCertificateManagementprovisionRootCertificatecertificateCommandParameterInfo);

CommandParameterInfo tlsCertificateManagementprovisionRootCertificatecaidCommandParameterInfo = new CommandParameterInfo("caid", Optional.class, Integer.class);
CommandParameterInfo tlsCertificateManagementprovisionRootCertificatecaidCommandParameterInfo = new CommandParameterInfo("caid", Integer.class, Integer.class);
tlsCertificateManagementprovisionRootCertificateCommandParams.put("caid",tlsCertificateManagementprovisionRootCertificatecaidCommandParameterInfo);
InteractionInfo tlsCertificateManagementprovisionRootCertificateInteractionInfo = new InteractionInfo(
(cluster, callback, commandArguments) -> {
Expand All @@ -30822,7 +30822,7 @@ public Map<String, Map<String, InteractionInfo>> getCommandMap() {
, (byte[])
commandArguments.get("certificate")

, (Optional<Integer>)
, (Integer)
commandArguments.get("caid")

);
Expand All @@ -30834,13 +30834,13 @@ public Map<String, Map<String, InteractionInfo>> getCommandMap() {

Map<String, CommandParameterInfo> tlsCertificateManagementfindRootCertificateCommandParams = new LinkedHashMap<String, CommandParameterInfo>();

CommandParameterInfo tlsCertificateManagementfindRootCertificatecaidCommandParameterInfo = new CommandParameterInfo("caid", Optional.class, Integer.class);
CommandParameterInfo tlsCertificateManagementfindRootCertificatecaidCommandParameterInfo = new CommandParameterInfo("caid", Integer.class, Integer.class);
tlsCertificateManagementfindRootCertificateCommandParams.put("caid",tlsCertificateManagementfindRootCertificatecaidCommandParameterInfo);
InteractionInfo tlsCertificateManagementfindRootCertificateInteractionInfo = new InteractionInfo(
(cluster, callback, commandArguments) -> {
((ChipClusters.TlsCertificateManagementCluster) cluster)
.findRootCertificate((ChipClusters.TlsCertificateManagementCluster.FindRootCertificateResponseCallback) callback
, (Optional<Integer>)
, (Integer)
commandArguments.get("caid")

);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,13 @@ import matter.tlv.TlvWriter
class TlsCertificateManagementClusterTLSClientCertificateDetailStruct(
val ccdid: UInt,
val clientCertificate: ByteArray,
val intermediateCerts: List<ByteArray>,
val intermediateCertificates: List<ByteArray>,
) {
override fun toString(): String = buildString {
append("TlsCertificateManagementClusterTLSClientCertificateDetailStruct {\n")
append("\tccdid : $ccdid\n")
append("\tclientCertificate : $clientCertificate\n")
append("\tintermediateCerts : $intermediateCerts\n")
append("\tintermediateCertificates : $intermediateCertificates\n")
append("}\n")
}

Expand All @@ -41,8 +41,8 @@ class TlsCertificateManagementClusterTLSClientCertificateDetailStruct(
startStructure(tlvTag)
put(ContextSpecificTag(TAG_CCDID), ccdid)
put(ContextSpecificTag(TAG_CLIENT_CERTIFICATE), clientCertificate)
startArray(ContextSpecificTag(TAG_INTERMEDIATE_CERTS))
for (item in intermediateCerts.iterator()) {
startArray(ContextSpecificTag(TAG_INTERMEDIATE_CERTIFICATES))
for (item in intermediateCertificates.iterator()) {
put(AnonymousTag, item)
}
endArray()
Expand All @@ -53,7 +53,7 @@ class TlsCertificateManagementClusterTLSClientCertificateDetailStruct(
companion object {
private const val TAG_CCDID = 0
private const val TAG_CLIENT_CERTIFICATE = 1
private const val TAG_INTERMEDIATE_CERTS = 2
private const val TAG_INTERMEDIATE_CERTIFICATES = 2

fun fromTlv(
tlvTag: Tag,
Expand All @@ -62,9 +62,9 @@ class TlsCertificateManagementClusterTLSClientCertificateDetailStruct(
tlvReader.enterStructure(tlvTag)
val ccdid = tlvReader.getUInt(ContextSpecificTag(TAG_CCDID))
val clientCertificate = tlvReader.getByteArray(ContextSpecificTag(TAG_CLIENT_CERTIFICATE))
val intermediateCerts =
val intermediateCertificates =
buildList<ByteArray> {
tlvReader.enterArray(ContextSpecificTag(TAG_INTERMEDIATE_CERTS))
tlvReader.enterArray(ContextSpecificTag(TAG_INTERMEDIATE_CERTIFICATES))
while (!tlvReader.isEndOfContainer()) {
add(tlvReader.getByteArray(AnonymousTag))
}
Expand All @@ -76,7 +76,7 @@ class TlsCertificateManagementClusterTLSClientCertificateDetailStruct(
return TlsCertificateManagementClusterTLSClientCertificateDetailStruct(
ccdid,
clientCertificate,
intermediateCerts,
intermediateCertificates,
)
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,13 @@ import matter.tlv.TlvWriter
class TlsCertificateManagementClusterTLSClientCertificateDetailStruct(
val ccdid: UShort,
val clientCertificate: ByteArray,
val intermediateCerts: List<ByteArray>,
val intermediateCertificates: List<ByteArray>,
) {
override fun toString(): String = buildString {
append("TlsCertificateManagementClusterTLSClientCertificateDetailStruct {\n")
append("\tccdid : $ccdid\n")
append("\tclientCertificate : $clientCertificate\n")
append("\tintermediateCerts : $intermediateCerts\n")
append("\tintermediateCertificates : $intermediateCertificates\n")
append("}\n")
}

Expand All @@ -41,8 +41,8 @@ class TlsCertificateManagementClusterTLSClientCertificateDetailStruct(
startStructure(tlvTag)
put(ContextSpecificTag(TAG_CCDID), ccdid)
put(ContextSpecificTag(TAG_CLIENT_CERTIFICATE), clientCertificate)
startArray(ContextSpecificTag(TAG_INTERMEDIATE_CERTS))
for (item in intermediateCerts.iterator()) {
startArray(ContextSpecificTag(TAG_INTERMEDIATE_CERTIFICATES))
for (item in intermediateCertificates.iterator()) {
put(AnonymousTag, item)
}
endArray()
Expand All @@ -53,7 +53,7 @@ class TlsCertificateManagementClusterTLSClientCertificateDetailStruct(
companion object {
private const val TAG_CCDID = 0
private const val TAG_CLIENT_CERTIFICATE = 1
private const val TAG_INTERMEDIATE_CERTS = 2
private const val TAG_INTERMEDIATE_CERTIFICATES = 2

fun fromTlv(
tlvTag: Tag,
Expand All @@ -62,9 +62,9 @@ class TlsCertificateManagementClusterTLSClientCertificateDetailStruct(
tlvReader.enterStructure(tlvTag)
val ccdid = tlvReader.getUShort(ContextSpecificTag(TAG_CCDID))
val clientCertificate = tlvReader.getByteArray(ContextSpecificTag(TAG_CLIENT_CERTIFICATE))
val intermediateCerts =
val intermediateCertificates =
buildList<ByteArray> {
tlvReader.enterArray(ContextSpecificTag(TAG_INTERMEDIATE_CERTS))
tlvReader.enterArray(ContextSpecificTag(TAG_INTERMEDIATE_CERTIFICATES))
while (!tlvReader.isEndOfContainer()) {
add(tlvReader.getByteArray(AnonymousTag))
}
Expand All @@ -76,7 +76,7 @@ class TlsCertificateManagementClusterTLSClientCertificateDetailStruct(
return TlsCertificateManagementClusterTLSClientCertificateDetailStruct(
ccdid,
clientCertificate,
intermediateCerts,
intermediateCertificates,
)
}
}
Expand Down
12 changes: 6 additions & 6 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.

4 changes: 1 addition & 3 deletions src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h

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

6 changes: 1 addition & 5 deletions src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm

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

Loading

0 comments on commit aca517a

Please sign in to comment.