diff --git a/scripts/py_matter_idl/matter_idl/generators/kotlin/MatterClusters.jinja b/scripts/py_matter_idl/matter_idl/generators/kotlin/MatterClusters.jinja index 76fa2eb6b22967..5d4ff2ec884127 100644 --- a/scripts/py_matter_idl/matter_idl/generators/kotlin/MatterClusters.jinja +++ b/scripts/py_matter_idl/matter_idl/generators/kotlin/MatterClusters.jinja @@ -6,10 +6,10 @@ {%- elif encodable.is_optional -%} {{encode_value(source, encodable.without_optional(), depth + 1)}}? {%- elif encodable.is_list -%} - ArrayList<{{encode_value(source, encodable.without_list(), depth + 1)}}> + List<{{encode_value(source, encodable.without_list(), depth + 1)}}> {%- elif encodable.is_struct -%} {%- set struct = encodable.get_underlying_struct() -%} - ChipStructs.{{source.name}}Cluster{{struct.name}} + {{source.name}}Cluster{{struct.name}} {%- else -%} {{encodable.kotlin_type}} {%- endif -%} @@ -22,7 +22,7 @@ List<{{encode_value_without_optional(source, encodable.without_list(), depth + 1)}}> {%- elif encodable.is_struct -%} {%- set struct = encodable.get_underlying_struct() -%} - ChipStructs.{{source.name}}Cluster{{struct.name}} + {{source.name}}Cluster{{struct.name}} {%- else -%} {{encodable.kotlin_type}} {%- endif -%} @@ -30,10 +30,10 @@ {%- macro encode_value_without_optional_nullable(source, encodable, depth) -%} {%- if encodable.is_list -%} - ArrayList<{{encode_value_without_optional_nullable(source, encodable.without_list(), depth + 1)}}> + List<{{encode_value_without_optional_nullable(source, encodable.without_list(), depth + 1)}}> {%- elif encodable.is_struct -%} {%- set struct = encodable.get_underlying_struct() -%} - ChipStructs.{{source.name}}Cluster{{struct.name}} + {{source.name}}Cluster{{struct.name}} {%- else -%} {{encodable.kotlin_type}} {%- endif -%} @@ -58,7 +58,7 @@ package matter.devicecontroller.cluster.clusters -import java.util.ArrayList +import matter.devicecontroller.cluster.structs.* {% set typeLookup = idl | createLookupContext(cluster) %} class {{cluster.name}}Cluster(private val endpointId: UShort) { diff --git a/scripts/py_matter_idl/matter_idl/generators/kotlin/MatterEventStructs.jinja b/scripts/py_matter_idl/matter_idl/generators/kotlin/MatterEventStructs.jinja new file mode 100644 index 00000000000000..b33ddbfe762839 --- /dev/null +++ b/scripts/py_matter_idl/matter_idl/generators/kotlin/MatterEventStructs.jinja @@ -0,0 +1,153 @@ +{%- macro encode_value(source, encodable, depth) -%} + {%- if encodable.is_nullable -%} + {{encode_value(source, encodable.without_nullable(), depth + 1)}}? + {%- elif encodable.is_optional -%} + Optional<{{encode_value(source, encodable.without_optional(), depth + 1)}}> + {%- elif encodable.is_list -%} + List<{{encode_value(source, encodable.without_list(), depth + 1)}}> + {%- elif encodable.is_struct -%} + {%- set struct = encodable.get_underlying_struct() -%} + matter.devicecontroller.cluster.structs.{{source.name}}Cluster{{struct.name}} + {%- else -%} + {{encodable.kotlin_type}} + {%- endif -%} +{%- endmacro -%} + +{%- macro encode_tlv(encodable, tag, name, depth) %} + {%- if encodable.is_nullable -%} + if ({{name}} != null) { + {{encode_tlv(encodable.without_nullable(), tag, name, depth + 1)}} + } else { + putNull({{tag}}) + } + {%- elif encodable.is_optional -%} + if ({{name}}.isPresent) { + val opt{{name}} = {{name}}.get() + {{encode_tlv(encodable.without_optional(), tag, "opt" + name, depth + 1)}} + } + {%- elif encodable.is_list -%} + startArray({{tag}}) + for (item in {{name}}.iterator()) { + {{encode_tlv(encodable.without_list(), "AnonymousTag", "item", depth + 1)}} + } + endArray() + {%- elif encodable.is_struct -%} + {{name}}.toTlv({{tag}}, this) + {%- else -%} + put({{tag}}, {{name}}) + {%- endif -%} +{%- endmacro -%} + +{%- macro decode_tlv(source, encodable, tag, depth) %} + {%- if encodable.is_nullable -%} + if (!tlvReader.isNull()) { + {{decode_tlv(source, encodable.without_nullable(), tag, depth + 1)}} + } else { + tlvReader.getNull({{tag}}) + null + } + {%- elif encodable.is_optional -%} + if (tlvReader.isNextTag({{tag}})) { + Optional.of({{decode_tlv(source, encodable.without_optional(), tag, depth + 1)}}) + } else { + Optional.empty() + } + {%- elif encodable.is_list -%} + {%- set encodablewithoutlist = encodable.without_list() -%} + buildList <{{encode_value(source, encodablewithoutlist, depth + 1)}}> { + tlvReader.enterArray({{tag}}) + while(!tlvReader.isEndOfContainer()) { + this.add({{decode_tlv(source, encodablewithoutlist, "AnonymousTag", depth + 1)}}) + } + tlvReader.exitContainer() + } + {%- elif encodable.is_struct -%} + {%- set struct = encodable.get_underlying_struct() -%} + matter.devicecontroller.cluster.structs.{{source.name}}Cluster{{struct.name}}.fromTlv({{tag}}, tlvReader) + {%- else -%} + tlvReader.get{{encodable.kotlin_type}}({{tag}}) + {%- endif -%} +{%- endmacro -%} + +{%- macro contextSpecificTag(field) -%} + ContextSpecificTag(TAG_{{field.name | constcase}}) +{%- endmacro -%} + +/* + * + * Copyright (c) 2023 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package matter.devicecontroller.cluster.eventstructs + +import matter.devicecontroller.cluster.* +import matter.tlv.AnonymousTag +import matter.tlv.ContextSpecificTag +import matter.tlv.Tag +import matter.tlv.TlvParsingException +import matter.tlv.TlvReader +import matter.tlv.TlvWriter + +import java.util.Optional + +class {{cluster.name}}Cluster{{event.name}}Event ( + {%- for field in event.fields -%} + {%- set encodable = field | asEncodable(typeLookup) %} + val {{field.name}}: {{encode_value(cluster, encodable, 0)}} + {%- if loop.index0 < loop.length - 1 -%}{{","}}{%- endif -%} + {%- endfor -%}) { + override fun toString(): String = buildString { + append("{{cluster.name}}Cluster{{event.name}}Event {\n") + {%- for field in event.fields %} + append("\t{{field.name}} : ${{field.name}}\n") + {%- endfor %} + append("}\n") + } + + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tlvTag) + {% for field in event.fields %} + {%- set encodable = field | asEncodable(typeLookup) %} + {%- set tag = contextSpecificTag(field) -%} + {{encode_tlv(encodable, tag, field.name, 0)}} + {% endfor -%} + endStructure() + } + } + + companion object { + {%- for field in event.fields %} + private const val TAG_{{field.name | constcase}} = {{field.code}} + {%- endfor %} + + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader) : {{cluster.name}}Cluster{{event.name}}Event { + tlvReader.enterStructure(tlvTag) + {% for field in event.fields %} + {%- set decodable = field | asEncodable(typeLookup) %} + {%- set tag = contextSpecificTag(field) -%} + val {{field.name}} = {{decode_tlv(cluster, decodable, tag, 0)}} + {% endfor %} + tlvReader.exitContainer() + + return {{cluster.name}}Cluster{{event.name}}Event( + {%- for field in event.fields -%} + {%- set encodable = field | asEncodable(typeLookup) -%} + {{field.name}} + {%- if loop.index0 < loop.length - 1 -%}{{", "}}{%- endif -%} + {%- endfor -%} + ) + } + } +} diff --git a/scripts/py_matter_idl/matter_idl/generators/kotlin/MatterFiles_gni.jinja b/scripts/py_matter_idl/matter_idl/generators/kotlin/MatterFiles_gni.jinja index b9fbf099f29eed..9094155de0d237 100644 --- a/scripts/py_matter_idl/matter_idl/generators/kotlin/MatterFiles_gni.jinja +++ b/scripts/py_matter_idl/matter_idl/generators/kotlin/MatterFiles_gni.jinja @@ -1,6 +1,28 @@ import("//build_overrides/build.gni") import("//build_overrides/chip.gni") +matter_structs_sources = [ +{%- for cluster in clientClusters | sort(attribute='name') %} +{%- set typeLookup = idl | createLookupContext(cluster) %} +{%- for struct in cluster.structs | sort(attribute='name') %} +{%- if not struct.tag %} + "${chip_root}/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/{{cluster.name}}Cluster{{struct.name}}.kt", +{%- endif %} +{%- endfor %} +{%- endfor %} +] + +matter_eventstructs_sources = [ +{%- for cluster in clientClusters | sort(attribute='name') %} +{%- set typeLookup = idl | createLookupContext(cluster) %} +{%- for event in cluster.events | sort(attribute='name') %} +{%- if event.fields %} + "${chip_root}/src/controller/java/generated/java/matter/devicecontroller/cluster/eventstructs/{{cluster.name}}Cluster{{event.name}}Event.kt", +{%- endif %} +{%- endfor %} +{%- endfor %} +] + matter_clusters_sources = [ {%- for cluster in clientClusters | sort(attribute='name') %} {%- set typeLookup = idl | createLookupContext(cluster) %} diff --git a/scripts/py_matter_idl/matter_idl/generators/kotlin/MatterStructs.jinja b/scripts/py_matter_idl/matter_idl/generators/kotlin/MatterStructs.jinja new file mode 100644 index 00000000000000..1ec9fed3a34f08 --- /dev/null +++ b/scripts/py_matter_idl/matter_idl/generators/kotlin/MatterStructs.jinja @@ -0,0 +1,153 @@ +{%- macro encode_value(source, encodable, depth) -%} + {%- if encodable.is_nullable -%} + {{encode_value(source, encodable.without_nullable(), depth + 1)}}? + {%- elif encodable.is_optional -%} + Optional<{{encode_value(source, encodable.without_optional(), depth + 1)}}> + {%- elif encodable.is_list -%} + List<{{encode_value(source, encodable.without_list(), depth + 1)}}> + {%- elif encodable.is_struct -%} + {%- set struct = encodable.get_underlying_struct() -%} + {{source.name}}Cluster{{struct.name}} + {%- else -%} + {{encodable.kotlin_type}} + {%- endif -%} +{%- endmacro -%} + +{%- macro encode_tlv(encodable, tag, name, depth) %} + {%- if encodable.is_nullable -%} + if ({{name}} != null) { + {{encode_tlv(encodable.without_nullable(), tag, name, depth + 1)}} + } else { + putNull({{tag}}) + } + {%- elif encodable.is_optional -%} + if ({{name}}.isPresent) { + val opt{{name}} = {{name}}.get() + {{encode_tlv(encodable.without_optional(), tag, "opt" + name, depth + 1)}} + } + {%- elif encodable.is_list -%} + startArray({{tag}}) + for (item in {{name}}.iterator()) { + {{encode_tlv(encodable.without_list(), "AnonymousTag", "item", depth + 1)}} + } + endArray() + {%- elif encodable.is_struct -%} + {{name}}.toTlv({{tag}}, this) + {%- else -%} + put({{tag}}, {{name}}) + {%- endif -%} +{%- endmacro -%} + +{%- macro decode_tlv(source, encodable, tag, depth) %} + {%- if encodable.is_nullable -%} + if (!tlvReader.isNull()) { + {{decode_tlv(source, encodable.without_nullable(), tag, depth + 1)}} + } else { + tlvReader.getNull({{tag}}) + null + } + {%- elif encodable.is_optional -%} + if (tlvReader.isNextTag({{tag}})) { + Optional.of({{decode_tlv(source, encodable.without_optional(), tag, depth + 1)}}) + } else { + Optional.empty() + } + {%- elif encodable.is_list -%} + {%- set encodablewithoutlist = encodable.without_list() -%} + buildList<{{encode_value(source, encodablewithoutlist, depth + 1)}}> { + tlvReader.enterArray({{tag}}) + while(!tlvReader.isEndOfContainer()) { + add({{decode_tlv(source, encodablewithoutlist, "AnonymousTag", depth + 1)}}) + } + tlvReader.exitContainer() + } + {%- elif encodable.is_struct -%} + {%- set struct = encodable.get_underlying_struct() -%} + {{source.name}}Cluster{{struct.name}}.fromTlv({{tag}}, tlvReader) + {%- else -%} + tlvReader.get{{encodable.kotlin_type}}({{tag}}) + {%- endif -%} +{%- endmacro -%} + +{%- macro contextSpecificTag(field) -%} + ContextSpecificTag(TAG_{{field.name | constcase}}) +{%- endmacro -%} + +/* + * + * Copyright (c) 2023 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package matter.devicecontroller.cluster.structs + +import matter.devicecontroller.cluster.* +import matter.tlv.AnonymousTag +import matter.tlv.ContextSpecificTag +import matter.tlv.Tag +import matter.tlv.TlvParsingException +import matter.tlv.TlvReader +import matter.tlv.TlvWriter + +import java.util.Optional + +class {{cluster.name}}Cluster{{struct.name}} ( + {%- for field in struct.fields %} + {%- set encodable = field | asEncodable(typeLookup) %} + val {{field.name}}: {{encode_value(cluster, encodable, 0)}} + {%- if loop.index0 < loop.length - 1 -%}{{","}}{%- endif -%} + {%- endfor -%}) { + override fun toString(): String = buildString { + append("{{cluster.name}}Cluster{{struct.name}} {\n") + {%- for field in struct.fields %} + append("\t{{field.name}} : ${{field.name}}\n") + {%- endfor %} + append("}\n") + } + + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tlvTag) + {% for field in struct.fields %} + {%- set encodable = field | asEncodable(typeLookup) %} + {%- set tag = contextSpecificTag(field) -%} + {{encode_tlv(encodable, tag, field.name, 0)}} + {% endfor -%} + endStructure() + } + } + + companion object { + {%- for field in struct.fields %} + private const val TAG_{{field.name | constcase}} = {{field.code}} + {%- endfor %} + + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader) : {{cluster.name}}Cluster{{struct.name}} { + tlvReader.enterStructure(tlvTag) + {% for field in struct.fields %} + {%- set decodable = field | asEncodable(typeLookup) %} + {%- set tag = contextSpecificTag(field) -%} + val {{field.name}} = {{decode_tlv(cluster, decodable, tag, 0)}} + {% endfor %} + tlvReader.exitContainer() + + return {{cluster.name}}Cluster{{struct.name}}( + {%- for field in struct.fields -%} + {%- set encodable = field | asEncodable(typeLookup) -%} + {{field.name}} + {%- if loop.index0 < loop.length - 1 -%}{{", "}}{%- endif -%} + {%- endfor -%} + ) + } + } +} diff --git a/scripts/py_matter_idl/matter_idl/generators/kotlin/__init__.py b/scripts/py_matter_idl/matter_idl/generators/kotlin/__init__.py index 025a314685367e..c3ead6bb3cc351 100644 --- a/scripts/py_matter_idl/matter_idl/generators/kotlin/__init__.py +++ b/scripts/py_matter_idl/matter_idl/generators/kotlin/__init__.py @@ -675,3 +675,43 @@ def internal_render_all(self): 'cluster': cluster, } ) + + # Every cluster has its own impl, to avoid + # very large compilations (running out of RAM) + for cluster in self.idl.clusters: + if cluster.side != ClusterSide.CLIENT: + continue + + for struct in cluster.structs: + if struct.tag: + continue + + output_name = "java/matter/devicecontroller/cluster/structs/{cluster_name}Cluster{struct_name}.kt" + self.internal_render_one_output( + template_path="MatterStructs.jinja", + output_file_name=output_name.format( + cluster_name=cluster.name, + struct_name=struct.name), + vars={ + 'cluster': cluster, + 'struct': struct, + 'typeLookup': TypeLookupContext(self.idl, cluster), + } + ) + + for event in cluster.events: + if not event.fields: + continue + + output_name = "java/matter/devicecontroller/cluster/eventstructs/{cluster_name}Cluster{event_name}Event.kt" + self.internal_render_one_output( + template_path="MatterEventStructs.jinja", + output_file_name=output_name.format( + cluster_name=cluster.name, + event_name=event.name), + vars={ + 'cluster': cluster, + 'event': event, + 'typeLookup': TypeLookupContext(self.idl, cluster), + } + ) diff --git a/src/controller/java/BUILD.gn b/src/controller/java/BUILD.gn index 5dbd5c90ff8ca3..6b71a6239597c1 100644 --- a/src/controller/java/BUILD.gn +++ b/src/controller/java/BUILD.gn @@ -353,10 +353,14 @@ kotlin_library("chipcluster_test") { } kotlin_library("kotlin_matter_controller") { + import( + "${chip_root}/src/controller/java/generated/java/matter/devicecontroller/cluster/files.gni") + output_name = "KotlinMatterController.jar" deps = [ ":java", + ":tlv", "${chip_root}/third_party/java_deps:annotation", ] @@ -373,6 +377,9 @@ kotlin_library("kotlin_matter_controller") { "src/matter/controller/model/States.kt", ] + sources += matter_structs_sources + sources += matter_eventstructs_sources + if (matter_enable_java_compilation) { deps += [ "${chip_root}/third_party/java_deps:json", diff --git a/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/AccessControlCluster.kt b/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/AccessControlCluster.kt index 2fbee5e99184f9..8e297aed240548 100644 --- a/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/AccessControlCluster.kt +++ b/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/AccessControlCluster.kt @@ -17,24 +17,20 @@ package matter.devicecontroller.cluster.clusters -import java.util.ArrayList +import matter.devicecontroller.cluster.structs.* class AccessControlCluster(private val endpointId: UShort) { - class AclAttribute( - val value: ArrayList - ) + class AclAttribute(val value: List) - class ExtensionAttribute( - val value: ArrayList? - ) + class ExtensionAttribute(val value: List?) - class GeneratedCommandListAttribute(val value: ArrayList) + class GeneratedCommandListAttribute(val value: List) - class AcceptedCommandListAttribute(val value: ArrayList) + class AcceptedCommandListAttribute(val value: List) - class EventListAttribute(val value: ArrayList) + class EventListAttribute(val value: List) - class AttributeListAttribute(val value: ArrayList) + class AttributeListAttribute(val value: List) suspend fun readAclAttribute(): AclAttribute { // Implementation needs to be added here @@ -44,14 +40,12 @@ class AccessControlCluster(private val endpointId: UShort) { // Implementation needs to be added here } - suspend fun writeAclAttribute( - value: ArrayList - ) { + suspend fun writeAclAttribute(value: List) { // Implementation needs to be added here } suspend fun writeAclAttribute( - value: ArrayList, + value: List, timedWriteTimeoutMs: Int ) { // Implementation needs to be added here @@ -72,13 +66,13 @@ class AccessControlCluster(private val endpointId: UShort) { } suspend fun writeExtensionAttribute( - value: ArrayList + value: List ) { // Implementation needs to be added here } suspend fun writeExtensionAttribute( - value: ArrayList, + value: List, timedWriteTimeoutMs: Int ) { // Implementation needs to be added here diff --git a/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/AccountLoginCluster.kt b/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/AccountLoginCluster.kt index f3021af650c22d..b9f28491eaad54 100644 --- a/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/AccountLoginCluster.kt +++ b/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/AccountLoginCluster.kt @@ -17,18 +17,18 @@ package matter.devicecontroller.cluster.clusters -import java.util.ArrayList +import matter.devicecontroller.cluster.structs.* class AccountLoginCluster(private val endpointId: UShort) { class GetSetupPINResponse(val setupPIN: String) - class GeneratedCommandListAttribute(val value: ArrayList) + class GeneratedCommandListAttribute(val value: List) - class AcceptedCommandListAttribute(val value: ArrayList) + class AcceptedCommandListAttribute(val value: List) - class EventListAttribute(val value: ArrayList) + class EventListAttribute(val value: List) - class AttributeListAttribute(val value: ArrayList) + class AttributeListAttribute(val value: List) suspend fun getSetupPIN( tempAccountIdentifier: String, diff --git a/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/ActionsCluster.kt b/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/ActionsCluster.kt index 1b7e91e08d78d0..8dd73589f6bd1c 100644 --- a/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/ActionsCluster.kt +++ b/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/ActionsCluster.kt @@ -17,20 +17,20 @@ package matter.devicecontroller.cluster.clusters -import java.util.ArrayList +import matter.devicecontroller.cluster.structs.* class ActionsCluster(private val endpointId: UShort) { - class ActionListAttribute(val value: ArrayList) + class ActionListAttribute(val value: List) - class EndpointListsAttribute(val value: ArrayList) + class EndpointListsAttribute(val value: List) - class GeneratedCommandListAttribute(val value: ArrayList) + class GeneratedCommandListAttribute(val value: List) - class AcceptedCommandListAttribute(val value: ArrayList) + class AcceptedCommandListAttribute(val value: List) - class EventListAttribute(val value: ArrayList) + class EventListAttribute(val value: List) - class AttributeListAttribute(val value: ArrayList) + class AttributeListAttribute(val value: List) suspend fun instantAction(actionID: UShort, invokeID: UInt?, timedInvokeTimeoutMs: Int? = null) { if (timedInvokeTimeoutMs != null) { diff --git a/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/ActivatedCarbonFilterMonitoringCluster.kt b/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/ActivatedCarbonFilterMonitoringCluster.kt index 1133dea37122ec..dde33ff51f4e9c 100644 --- a/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/ActivatedCarbonFilterMonitoringCluster.kt +++ b/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/ActivatedCarbonFilterMonitoringCluster.kt @@ -17,23 +17,22 @@ package matter.devicecontroller.cluster.clusters -import java.util.ArrayList +import matter.devicecontroller.cluster.structs.* class ActivatedCarbonFilterMonitoringCluster(private val endpointId: UShort) { class LastChangedTimeAttribute(val value: UInt?) class ReplacementProductListAttribute( - val value: - ArrayList? + val value: List? ) - class GeneratedCommandListAttribute(val value: ArrayList) + class GeneratedCommandListAttribute(val value: List) - class AcceptedCommandListAttribute(val value: ArrayList) + class AcceptedCommandListAttribute(val value: List) - class EventListAttribute(val value: ArrayList) + class EventListAttribute(val value: List) - class AttributeListAttribute(val value: ArrayList) + class AttributeListAttribute(val value: List) suspend fun resetCondition(timedInvokeTimeoutMs: Int? = null) { if (timedInvokeTimeoutMs != null) { diff --git a/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/AdministratorCommissioningCluster.kt b/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/AdministratorCommissioningCluster.kt index 359feb433b7194..37e3560cdd52b6 100644 --- a/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/AdministratorCommissioningCluster.kt +++ b/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/AdministratorCommissioningCluster.kt @@ -17,20 +17,20 @@ package matter.devicecontroller.cluster.clusters -import java.util.ArrayList +import matter.devicecontroller.cluster.structs.* class AdministratorCommissioningCluster(private val endpointId: UShort) { class AdminFabricIndexAttribute(val value: UByte?) class AdminVendorIdAttribute(val value: UShort?) - class GeneratedCommandListAttribute(val value: ArrayList) + class GeneratedCommandListAttribute(val value: List) - class AcceptedCommandListAttribute(val value: ArrayList) + class AcceptedCommandListAttribute(val value: List) - class EventListAttribute(val value: ArrayList) + class EventListAttribute(val value: List) - class AttributeListAttribute(val value: ArrayList) + class AttributeListAttribute(val value: List) suspend fun openCommissioningWindow( commissioningTimeout: UShort, diff --git a/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/AirQualityCluster.kt b/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/AirQualityCluster.kt index ed191ea82883eb..b4a823aa81c39e 100644 --- a/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/AirQualityCluster.kt +++ b/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/AirQualityCluster.kt @@ -17,16 +17,16 @@ package matter.devicecontroller.cluster.clusters -import java.util.ArrayList +import matter.devicecontroller.cluster.structs.* class AirQualityCluster(private val endpointId: UShort) { - class GeneratedCommandListAttribute(val value: ArrayList) + class GeneratedCommandListAttribute(val value: List) - class AcceptedCommandListAttribute(val value: ArrayList) + class AcceptedCommandListAttribute(val value: List) - class EventListAttribute(val value: ArrayList) + class EventListAttribute(val value: List) - class AttributeListAttribute(val value: ArrayList) + class AttributeListAttribute(val value: List) suspend fun readAirQualityAttribute(): UByte { // Implementation needs to be added here diff --git a/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/ApplicationBasicCluster.kt b/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/ApplicationBasicCluster.kt index aba8f4afbe36ef..6338a940258320 100644 --- a/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/ApplicationBasicCluster.kt +++ b/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/ApplicationBasicCluster.kt @@ -17,20 +17,20 @@ package matter.devicecontroller.cluster.clusters -import java.util.ArrayList +import matter.devicecontroller.cluster.structs.* class ApplicationBasicCluster(private val endpointId: UShort) { - class ApplicationAttribute(val value: ChipStructs.ApplicationBasicClusterApplicationStruct) + class ApplicationAttribute(val value: ApplicationBasicClusterApplicationStruct) - class AllowedVendorListAttribute(val value: ArrayList) + class AllowedVendorListAttribute(val value: List) - class GeneratedCommandListAttribute(val value: ArrayList) + class GeneratedCommandListAttribute(val value: List) - class AcceptedCommandListAttribute(val value: ArrayList) + class AcceptedCommandListAttribute(val value: List) - class EventListAttribute(val value: ArrayList) + class EventListAttribute(val value: List) - class AttributeListAttribute(val value: ArrayList) + class AttributeListAttribute(val value: List) suspend fun readVendorNameAttribute(): CharString { // Implementation needs to be added here diff --git a/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/ApplicationLauncherCluster.kt b/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/ApplicationLauncherCluster.kt index 2dfd1f16ee3986..7e07a8ed18e36e 100644 --- a/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/ApplicationLauncherCluster.kt +++ b/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/ApplicationLauncherCluster.kt @@ -17,25 +17,25 @@ package matter.devicecontroller.cluster.clusters -import java.util.ArrayList +import matter.devicecontroller.cluster.structs.* class ApplicationLauncherCluster(private val endpointId: UShort) { class LauncherResponse(val status: UInt, val data: ByteArray?) - class CatalogListAttribute(val value: ArrayList?) + class CatalogListAttribute(val value: List?) - class CurrentAppAttribute(val value: ChipStructs.ApplicationLauncherClusterApplicationEPStruct?) + class CurrentAppAttribute(val value: ApplicationLauncherClusterApplicationEPStruct?) - class GeneratedCommandListAttribute(val value: ArrayList) + class GeneratedCommandListAttribute(val value: List) - class AcceptedCommandListAttribute(val value: ArrayList) + class AcceptedCommandListAttribute(val value: List) - class EventListAttribute(val value: ArrayList) + class EventListAttribute(val value: List) - class AttributeListAttribute(val value: ArrayList) + class AttributeListAttribute(val value: List) suspend fun launchApp( - application: ChipStructs.ApplicationLauncherClusterApplicationStruct?, + application: ApplicationLauncherClusterApplicationStruct?, data: ByteArray?, timedInvokeTimeoutMs: Int? = null ): LauncherResponse { @@ -47,7 +47,7 @@ class ApplicationLauncherCluster(private val endpointId: UShort) { } suspend fun stopApp( - application: ChipStructs.ApplicationLauncherClusterApplicationStruct?, + application: ApplicationLauncherClusterApplicationStruct?, timedInvokeTimeoutMs: Int? = null ): LauncherResponse { if (timedInvokeTimeoutMs != null) { @@ -58,7 +58,7 @@ class ApplicationLauncherCluster(private val endpointId: UShort) { } suspend fun hideApp( - application: ChipStructs.ApplicationLauncherClusterApplicationStruct?, + application: ApplicationLauncherClusterApplicationStruct?, timedInvokeTimeoutMs: Int? = null ): LauncherResponse { if (timedInvokeTimeoutMs != null) { @@ -83,14 +83,12 @@ class ApplicationLauncherCluster(private val endpointId: UShort) { // Implementation needs to be added here } - suspend fun writeCurrentAppAttribute( - value: ChipStructs.ApplicationLauncherClusterApplicationEPStruct - ) { + suspend fun writeCurrentAppAttribute(value: ApplicationLauncherClusterApplicationEPStruct) { // Implementation needs to be added here } suspend fun writeCurrentAppAttribute( - value: ChipStructs.ApplicationLauncherClusterApplicationEPStruct, + value: ApplicationLauncherClusterApplicationEPStruct, timedWriteTimeoutMs: Int ) { // Implementation needs to be added here diff --git a/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/AudioOutputCluster.kt b/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/AudioOutputCluster.kt index 02f8838eccb061..a62a04f93ae2d8 100644 --- a/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/AudioOutputCluster.kt +++ b/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/AudioOutputCluster.kt @@ -17,18 +17,18 @@ package matter.devicecontroller.cluster.clusters -import java.util.ArrayList +import matter.devicecontroller.cluster.structs.* class AudioOutputCluster(private val endpointId: UShort) { - class OutputListAttribute(val value: ArrayList) + class OutputListAttribute(val value: List) - class GeneratedCommandListAttribute(val value: ArrayList) + class GeneratedCommandListAttribute(val value: List) - class AcceptedCommandListAttribute(val value: ArrayList) + class AcceptedCommandListAttribute(val value: List) - class EventListAttribute(val value: ArrayList) + class EventListAttribute(val value: List) - class AttributeListAttribute(val value: ArrayList) + class AttributeListAttribute(val value: List) suspend fun selectOutput(index: UByte, timedInvokeTimeoutMs: Int? = null) { if (timedInvokeTimeoutMs != null) { diff --git a/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/BallastConfigurationCluster.kt b/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/BallastConfigurationCluster.kt index 6acc691b935284..de8a8cffb7a56b 100644 --- a/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/BallastConfigurationCluster.kt +++ b/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/BallastConfigurationCluster.kt @@ -17,7 +17,7 @@ package matter.devicecontroller.cluster.clusters -import java.util.ArrayList +import matter.devicecontroller.cluster.structs.* class BallastConfigurationCluster(private val endpointId: UShort) { class IntrinsicBallastFactorAttribute(val value: UByte?) @@ -30,13 +30,13 @@ class BallastConfigurationCluster(private val endpointId: UShort) { class LampBurnHoursTripPointAttribute(val value: UInt?) - class GeneratedCommandListAttribute(val value: ArrayList) + class GeneratedCommandListAttribute(val value: List) - class AcceptedCommandListAttribute(val value: ArrayList) + class AcceptedCommandListAttribute(val value: List) - class EventListAttribute(val value: ArrayList) + class EventListAttribute(val value: List) - class AttributeListAttribute(val value: ArrayList) + class AttributeListAttribute(val value: List) suspend fun readPhysicalMinLevelAttribute(): UByte { // Implementation needs to be added here diff --git a/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/BarrierControlCluster.kt b/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/BarrierControlCluster.kt index 0c963de7d252df..d6b21b6dcc2507 100644 --- a/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/BarrierControlCluster.kt +++ b/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/BarrierControlCluster.kt @@ -17,16 +17,16 @@ package matter.devicecontroller.cluster.clusters -import java.util.ArrayList +import matter.devicecontroller.cluster.structs.* class BarrierControlCluster(private val endpointId: UShort) { - class GeneratedCommandListAttribute(val value: ArrayList) + class GeneratedCommandListAttribute(val value: List) - class AcceptedCommandListAttribute(val value: ArrayList) + class AcceptedCommandListAttribute(val value: List) - class EventListAttribute(val value: ArrayList) + class EventListAttribute(val value: List) - class AttributeListAttribute(val value: ArrayList) + class AttributeListAttribute(val value: List) suspend fun barrierControlGoToPercent(percentOpen: UByte, timedInvokeTimeoutMs: Int? = null) { if (timedInvokeTimeoutMs != null) { diff --git a/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/BasicInformationCluster.kt b/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/BasicInformationCluster.kt index bef0dafdb25437..94c306006f1d76 100644 --- a/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/BasicInformationCluster.kt +++ b/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/BasicInformationCluster.kt @@ -17,24 +17,20 @@ package matter.devicecontroller.cluster.clusters -import java.util.ArrayList +import matter.devicecontroller.cluster.structs.* class BasicInformationCluster(private val endpointId: UShort) { - class CapabilityMinimaAttribute( - val value: ChipStructs.BasicInformationClusterCapabilityMinimaStruct - ) + class CapabilityMinimaAttribute(val value: BasicInformationClusterCapabilityMinimaStruct) - class ProductAppearanceAttribute( - val value: ChipStructs.BasicInformationClusterProductAppearanceStruct? - ) + class ProductAppearanceAttribute(val value: BasicInformationClusterProductAppearanceStruct?) - class GeneratedCommandListAttribute(val value: ArrayList) + class GeneratedCommandListAttribute(val value: List) - class AcceptedCommandListAttribute(val value: ArrayList) + class AcceptedCommandListAttribute(val value: List) - class EventListAttribute(val value: ArrayList) + class EventListAttribute(val value: List) - class AttributeListAttribute(val value: ArrayList) + class AttributeListAttribute(val value: List) suspend fun mfgSpecificPing(timedInvokeTimeoutMs: Int? = null) { if (timedInvokeTimeoutMs != null) { diff --git a/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/BinaryInputBasicCluster.kt b/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/BinaryInputBasicCluster.kt index 65c305c956aa18..f3e19b08fac61a 100644 --- a/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/BinaryInputBasicCluster.kt +++ b/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/BinaryInputBasicCluster.kt @@ -17,16 +17,16 @@ package matter.devicecontroller.cluster.clusters -import java.util.ArrayList +import matter.devicecontroller.cluster.structs.* class BinaryInputBasicCluster(private val endpointId: UShort) { - class GeneratedCommandListAttribute(val value: ArrayList) + class GeneratedCommandListAttribute(val value: List) - class AcceptedCommandListAttribute(val value: ArrayList) + class AcceptedCommandListAttribute(val value: List) - class EventListAttribute(val value: ArrayList) + class EventListAttribute(val value: List) - class AttributeListAttribute(val value: ArrayList) + class AttributeListAttribute(val value: List) suspend fun readActiveTextAttribute(): CharString { // Implementation needs to be added here diff --git a/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/BindingCluster.kt b/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/BindingCluster.kt index 10a9bcb5c9f910..713ad3f3b7feff 100644 --- a/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/BindingCluster.kt +++ b/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/BindingCluster.kt @@ -17,18 +17,18 @@ package matter.devicecontroller.cluster.clusters -import java.util.ArrayList +import matter.devicecontroller.cluster.structs.* class BindingCluster(private val endpointId: UShort) { - class BindingAttribute(val value: ArrayList) + class BindingAttribute(val value: List) - class GeneratedCommandListAttribute(val value: ArrayList) + class GeneratedCommandListAttribute(val value: List) - class AcceptedCommandListAttribute(val value: ArrayList) + class AcceptedCommandListAttribute(val value: List) - class EventListAttribute(val value: ArrayList) + class EventListAttribute(val value: List) - class AttributeListAttribute(val value: ArrayList) + class AttributeListAttribute(val value: List) suspend fun readBindingAttribute(): BindingAttribute { // Implementation needs to be added here @@ -38,12 +38,12 @@ class BindingCluster(private val endpointId: UShort) { // Implementation needs to be added here } - suspend fun writeBindingAttribute(value: ArrayList) { + suspend fun writeBindingAttribute(value: List) { // Implementation needs to be added here } suspend fun writeBindingAttribute( - value: ArrayList, + value: List, timedWriteTimeoutMs: Int ) { // Implementation needs to be added here diff --git a/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/BooleanStateCluster.kt b/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/BooleanStateCluster.kt index 4d3d86e005cbbb..d1b3980565955e 100644 --- a/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/BooleanStateCluster.kt +++ b/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/BooleanStateCluster.kt @@ -17,16 +17,16 @@ package matter.devicecontroller.cluster.clusters -import java.util.ArrayList +import matter.devicecontroller.cluster.structs.* class BooleanStateCluster(private val endpointId: UShort) { - class GeneratedCommandListAttribute(val value: ArrayList) + class GeneratedCommandListAttribute(val value: List) - class AcceptedCommandListAttribute(val value: ArrayList) + class AcceptedCommandListAttribute(val value: List) - class EventListAttribute(val value: ArrayList) + class EventListAttribute(val value: List) - class AttributeListAttribute(val value: ArrayList) + class AttributeListAttribute(val value: List) suspend fun readStateValueAttribute(): Boolean { // Implementation needs to be added here diff --git a/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/BridgedDeviceBasicInformationCluster.kt b/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/BridgedDeviceBasicInformationCluster.kt index f8f0764762fdfc..d557ecff969467 100644 --- a/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/BridgedDeviceBasicInformationCluster.kt +++ b/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/BridgedDeviceBasicInformationCluster.kt @@ -17,20 +17,20 @@ package matter.devicecontroller.cluster.clusters -import java.util.ArrayList +import matter.devicecontroller.cluster.structs.* class BridgedDeviceBasicInformationCluster(private val endpointId: UShort) { class ProductAppearanceAttribute( - val value: ChipStructs.BridgedDeviceBasicInformationClusterProductAppearanceStruct? + val value: BridgedDeviceBasicInformationClusterProductAppearanceStruct? ) - class GeneratedCommandListAttribute(val value: ArrayList) + class GeneratedCommandListAttribute(val value: List) - class AcceptedCommandListAttribute(val value: ArrayList) + class AcceptedCommandListAttribute(val value: List) - class EventListAttribute(val value: ArrayList) + class EventListAttribute(val value: List) - class AttributeListAttribute(val value: ArrayList) + class AttributeListAttribute(val value: List) suspend fun readVendorNameAttribute(): CharString { // Implementation needs to be added here diff --git a/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/CarbonDioxideConcentrationMeasurementCluster.kt b/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/CarbonDioxideConcentrationMeasurementCluster.kt index ced39ab41618ee..8def5ce68f3643 100644 --- a/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/CarbonDioxideConcentrationMeasurementCluster.kt +++ b/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/CarbonDioxideConcentrationMeasurementCluster.kt @@ -17,7 +17,7 @@ package matter.devicecontroller.cluster.clusters -import java.util.ArrayList +import matter.devicecontroller.cluster.structs.* class CarbonDioxideConcentrationMeasurementCluster(private val endpointId: UShort) { class MeasuredValueAttribute(val value: Float?) @@ -30,13 +30,13 @@ class CarbonDioxideConcentrationMeasurementCluster(private val endpointId: UShor class AverageMeasuredValueAttribute(val value: Float?) - class GeneratedCommandListAttribute(val value: ArrayList) + class GeneratedCommandListAttribute(val value: List) - class AcceptedCommandListAttribute(val value: ArrayList) + class AcceptedCommandListAttribute(val value: List) - class EventListAttribute(val value: ArrayList) + class EventListAttribute(val value: List) - class AttributeListAttribute(val value: ArrayList) + class AttributeListAttribute(val value: List) suspend fun readMeasuredValueAttribute(): MeasuredValueAttribute { // Implementation needs to be added here diff --git a/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/CarbonMonoxideConcentrationMeasurementCluster.kt b/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/CarbonMonoxideConcentrationMeasurementCluster.kt index f7e0ca1937eeb0..ea9815273490e9 100644 --- a/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/CarbonMonoxideConcentrationMeasurementCluster.kt +++ b/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/CarbonMonoxideConcentrationMeasurementCluster.kt @@ -17,7 +17,7 @@ package matter.devicecontroller.cluster.clusters -import java.util.ArrayList +import matter.devicecontroller.cluster.structs.* class CarbonMonoxideConcentrationMeasurementCluster(private val endpointId: UShort) { class MeasuredValueAttribute(val value: Float?) @@ -30,13 +30,13 @@ class CarbonMonoxideConcentrationMeasurementCluster(private val endpointId: USho class AverageMeasuredValueAttribute(val value: Float?) - class GeneratedCommandListAttribute(val value: ArrayList) + class GeneratedCommandListAttribute(val value: List) - class AcceptedCommandListAttribute(val value: ArrayList) + class AcceptedCommandListAttribute(val value: List) - class EventListAttribute(val value: ArrayList) + class EventListAttribute(val value: List) - class AttributeListAttribute(val value: ArrayList) + class AttributeListAttribute(val value: List) suspend fun readMeasuredValueAttribute(): MeasuredValueAttribute { // Implementation needs to be added here diff --git a/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/ChannelCluster.kt b/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/ChannelCluster.kt index 92cb96d50a1e1e..b75f88a1a259b4 100644 --- a/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/ChannelCluster.kt +++ b/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/ChannelCluster.kt @@ -17,24 +17,24 @@ package matter.devicecontroller.cluster.clusters -import java.util.ArrayList +import matter.devicecontroller.cluster.structs.* class ChannelCluster(private val endpointId: UShort) { class ChangeChannelResponse(val status: UInt, val data: String?) - class ChannelListAttribute(val value: ArrayList?) + class ChannelListAttribute(val value: List?) - class LineupAttribute(val value: ChipStructs.ChannelClusterLineupInfoStruct?) + class LineupAttribute(val value: ChannelClusterLineupInfoStruct?) - class CurrentChannelAttribute(val value: ChipStructs.ChannelClusterChannelInfoStruct?) + class CurrentChannelAttribute(val value: ChannelClusterChannelInfoStruct?) - class GeneratedCommandListAttribute(val value: ArrayList) + class GeneratedCommandListAttribute(val value: List) - class AcceptedCommandListAttribute(val value: ArrayList) + class AcceptedCommandListAttribute(val value: List) - class EventListAttribute(val value: ArrayList) + class EventListAttribute(val value: List) - class AttributeListAttribute(val value: ArrayList) + class AttributeListAttribute(val value: List) suspend fun changeChannel( match: String, diff --git a/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/ColorControlCluster.kt b/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/ColorControlCluster.kt index 0529929d21ee5b..28a6015110c32d 100644 --- a/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/ColorControlCluster.kt +++ b/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/ColorControlCluster.kt @@ -17,7 +17,7 @@ package matter.devicecontroller.cluster.clusters -import java.util.ArrayList +import matter.devicecontroller.cluster.structs.* class ColorControlCluster(private val endpointId: UShort) { class NumberOfPrimariesAttribute(val value: UByte?) @@ -42,13 +42,13 @@ class ColorControlCluster(private val endpointId: UShort) { class StartUpColorTemperatureMiredsAttribute(val value: UShort?) - class GeneratedCommandListAttribute(val value: ArrayList) + class GeneratedCommandListAttribute(val value: List) - class AcceptedCommandListAttribute(val value: ArrayList) + class AcceptedCommandListAttribute(val value: List) - class EventListAttribute(val value: ArrayList) + class EventListAttribute(val value: List) - class AttributeListAttribute(val value: ArrayList) + class AttributeListAttribute(val value: List) suspend fun moveToHue( hue: UByte, diff --git a/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/ContentLauncherCluster.kt b/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/ContentLauncherCluster.kt index 014ba9f1828189..6a32e63e4b869f 100644 --- a/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/ContentLauncherCluster.kt +++ b/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/ContentLauncherCluster.kt @@ -17,23 +17,23 @@ package matter.devicecontroller.cluster.clusters -import java.util.ArrayList +import matter.devicecontroller.cluster.structs.* class ContentLauncherCluster(private val endpointId: UShort) { class LauncherResponse(val status: UInt, val data: String?) - class AcceptHeaderAttribute(val value: ArrayList?) + class AcceptHeaderAttribute(val value: List?) - class GeneratedCommandListAttribute(val value: ArrayList) + class GeneratedCommandListAttribute(val value: List) - class AcceptedCommandListAttribute(val value: ArrayList) + class AcceptedCommandListAttribute(val value: List) - class EventListAttribute(val value: ArrayList) + class EventListAttribute(val value: List) - class AttributeListAttribute(val value: ArrayList) + class AttributeListAttribute(val value: List) suspend fun launchContent( - search: ChipStructs.ContentLauncherClusterContentSearchStruct, + search: ContentLauncherClusterContentSearchStruct, autoPlay: Boolean, data: String?, timedInvokeTimeoutMs: Int? = null @@ -48,7 +48,7 @@ class ContentLauncherCluster(private val endpointId: UShort) { suspend fun launchURL( contentURL: String, displayString: String?, - brandingInformation: ChipStructs.ContentLauncherClusterBrandingInformationStruct?, + brandingInformation: ContentLauncherClusterBrandingInformationStruct?, timedInvokeTimeoutMs: Int? = null ): LauncherResponse { if (timedInvokeTimeoutMs != null) { diff --git a/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/DescriptorCluster.kt b/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/DescriptorCluster.kt index d0cedbee38f8ec..da4341bdcb48ec 100644 --- a/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/DescriptorCluster.kt +++ b/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/DescriptorCluster.kt @@ -17,28 +17,26 @@ package matter.devicecontroller.cluster.clusters -import java.util.ArrayList +import matter.devicecontroller.cluster.structs.* class DescriptorCluster(private val endpointId: UShort) { - class DeviceTypeListAttribute( - val value: ArrayList - ) + class DeviceTypeListAttribute(val value: List) - class ServerListAttribute(val value: ArrayList) + class ServerListAttribute(val value: List) - class ClientListAttribute(val value: ArrayList) + class ClientListAttribute(val value: List) - class PartsListAttribute(val value: ArrayList) + class PartsListAttribute(val value: List) - class TagListAttribute(val value: ArrayList?) + class TagListAttribute(val value: List?) - class GeneratedCommandListAttribute(val value: ArrayList) + class GeneratedCommandListAttribute(val value: List) - class AcceptedCommandListAttribute(val value: ArrayList) + class AcceptedCommandListAttribute(val value: List) - class EventListAttribute(val value: ArrayList) + class EventListAttribute(val value: List) - class AttributeListAttribute(val value: ArrayList) + class AttributeListAttribute(val value: List) suspend fun readDeviceTypeListAttribute(): DeviceTypeListAttribute { // Implementation needs to be added here diff --git a/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/DiagnosticLogsCluster.kt b/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/DiagnosticLogsCluster.kt index fbf46e3991d075..e6233e59dd2342 100644 --- a/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/DiagnosticLogsCluster.kt +++ b/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/DiagnosticLogsCluster.kt @@ -17,7 +17,7 @@ package matter.devicecontroller.cluster.clusters -import java.util.ArrayList +import matter.devicecontroller.cluster.structs.* class DiagnosticLogsCluster(private val endpointId: UShort) { class RetrieveLogsResponse( @@ -27,13 +27,13 @@ class DiagnosticLogsCluster(private val endpointId: UShort) { val timeSinceBoot: ULong? ) - class GeneratedCommandListAttribute(val value: ArrayList) + class GeneratedCommandListAttribute(val value: List) - class AcceptedCommandListAttribute(val value: ArrayList) + class AcceptedCommandListAttribute(val value: List) - class EventListAttribute(val value: ArrayList) + class EventListAttribute(val value: List) - class AttributeListAttribute(val value: ArrayList) + class AttributeListAttribute(val value: List) suspend fun retrieveLogsRequest( intent: UInt, diff --git a/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/DishwasherAlarmCluster.kt b/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/DishwasherAlarmCluster.kt index a13c51a52da55f..a186f0b736ef25 100644 --- a/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/DishwasherAlarmCluster.kt +++ b/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/DishwasherAlarmCluster.kt @@ -17,16 +17,16 @@ package matter.devicecontroller.cluster.clusters -import java.util.ArrayList +import matter.devicecontroller.cluster.structs.* class DishwasherAlarmCluster(private val endpointId: UShort) { - class GeneratedCommandListAttribute(val value: ArrayList) + class GeneratedCommandListAttribute(val value: List) - class AcceptedCommandListAttribute(val value: ArrayList) + class AcceptedCommandListAttribute(val value: List) - class EventListAttribute(val value: ArrayList) + class EventListAttribute(val value: List) - class AttributeListAttribute(val value: ArrayList) + class AttributeListAttribute(val value: List) suspend fun reset(alarms: ULong, timedInvokeTimeoutMs: Int? = null) { if (timedInvokeTimeoutMs != null) { diff --git a/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/DishwasherModeCluster.kt b/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/DishwasherModeCluster.kt index f24f914fc1075e..af1bae38f5ee74 100644 --- a/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/DishwasherModeCluster.kt +++ b/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/DishwasherModeCluster.kt @@ -17,26 +17,24 @@ package matter.devicecontroller.cluster.clusters -import java.util.ArrayList +import matter.devicecontroller.cluster.structs.* class DishwasherModeCluster(private val endpointId: UShort) { class ChangeToModeResponse(val status: UInt, val statusText: String?) - class SupportedModesAttribute( - val value: ArrayList - ) + class SupportedModesAttribute(val value: List) class StartUpModeAttribute(val value: UByte?) class OnModeAttribute(val value: UByte?) - class GeneratedCommandListAttribute(val value: ArrayList) + class GeneratedCommandListAttribute(val value: List) - class AcceptedCommandListAttribute(val value: ArrayList) + class AcceptedCommandListAttribute(val value: List) - class EventListAttribute(val value: ArrayList) + class EventListAttribute(val value: List) - class AttributeListAttribute(val value: ArrayList) + class AttributeListAttribute(val value: List) suspend fun changeToMode( newMode: UByte, diff --git a/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/DoorLockCluster.kt b/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/DoorLockCluster.kt index 53e16956f29cbd..e811fd8d00f874 100644 --- a/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/DoorLockCluster.kt +++ b/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/DoorLockCluster.kt @@ -17,7 +17,7 @@ package matter.devicecontroller.cluster.clusters -import java.util.ArrayList +import matter.devicecontroller.cluster.structs.* class DoorLockCluster(private val endpointId: UShort) { class GetWeekDayScheduleResponse( @@ -54,7 +54,7 @@ class DoorLockCluster(private val endpointId: UShort) { val userStatus: UInt?, val userType: UInt?, val credentialRule: UInt?, - val credentials: ArrayList?, + val credentials: List?, val creatorFabricIndex: UByte?, val lastModifiedFabricIndex: UByte?, val nextUserIndex: UShort? @@ -78,13 +78,13 @@ class DoorLockCluster(private val endpointId: UShort) { class DoorStateAttribute(val value: UInt?) - class GeneratedCommandListAttribute(val value: ArrayList) + class GeneratedCommandListAttribute(val value: List) - class AcceptedCommandListAttribute(val value: ArrayList) + class AcceptedCommandListAttribute(val value: List) - class EventListAttribute(val value: ArrayList) + class EventListAttribute(val value: List) - class AttributeListAttribute(val value: ArrayList) + class AttributeListAttribute(val value: List) suspend fun lockDoor(PINCode: ByteArray?, timedInvokeTimeoutMs: Int? = null) { if (timedInvokeTimeoutMs != null) { @@ -261,7 +261,7 @@ class DoorLockCluster(private val endpointId: UShort) { suspend fun setCredential( operationType: UInt, - credential: ChipStructs.DoorLockClusterCredentialStruct, + credential: DoorLockClusterCredentialStruct, credentialData: ByteArray, userIndex: UShort?, userStatus: UInt?, @@ -276,7 +276,7 @@ class DoorLockCluster(private val endpointId: UShort) { } suspend fun getCredentialStatus( - credential: ChipStructs.DoorLockClusterCredentialStruct, + credential: DoorLockClusterCredentialStruct, timedInvokeTimeoutMs: Int? = null ): GetCredentialStatusResponse { if (timedInvokeTimeoutMs != null) { @@ -287,7 +287,7 @@ class DoorLockCluster(private val endpointId: UShort) { } suspend fun clearCredential( - credential: ChipStructs.DoorLockClusterCredentialStruct?, + credential: DoorLockClusterCredentialStruct?, timedInvokeTimeoutMs: Int? = null ) { if (timedInvokeTimeoutMs != null) { diff --git a/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/ElectricalMeasurementCluster.kt b/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/ElectricalMeasurementCluster.kt index 17ad4bca3238c9..7a7a7fa1b71cd4 100644 --- a/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/ElectricalMeasurementCluster.kt +++ b/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/ElectricalMeasurementCluster.kt @@ -17,16 +17,16 @@ package matter.devicecontroller.cluster.clusters -import java.util.ArrayList +import matter.devicecontroller.cluster.structs.* class ElectricalMeasurementCluster(private val endpointId: UShort) { - class GeneratedCommandListAttribute(val value: ArrayList) + class GeneratedCommandListAttribute(val value: List) - class AcceptedCommandListAttribute(val value: ArrayList) + class AcceptedCommandListAttribute(val value: List) - class EventListAttribute(val value: ArrayList) + class EventListAttribute(val value: List) - class AttributeListAttribute(val value: ArrayList) + class AttributeListAttribute(val value: List) suspend fun getProfileInfoCommand(timedInvokeTimeoutMs: Int? = null) { if (timedInvokeTimeoutMs != null) { diff --git a/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/EthernetNetworkDiagnosticsCluster.kt b/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/EthernetNetworkDiagnosticsCluster.kt index 7211471daa9e22..f4e6ccd52ad9f5 100644 --- a/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/EthernetNetworkDiagnosticsCluster.kt +++ b/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/EthernetNetworkDiagnosticsCluster.kt @@ -17,7 +17,7 @@ package matter.devicecontroller.cluster.clusters -import java.util.ArrayList +import matter.devicecontroller.cluster.structs.* class EthernetNetworkDiagnosticsCluster(private val endpointId: UShort) { class PHYRateAttribute(val value: UInt?) @@ -26,13 +26,13 @@ class EthernetNetworkDiagnosticsCluster(private val endpointId: UShort) { class CarrierDetectAttribute(val value: Boolean?) - class GeneratedCommandListAttribute(val value: ArrayList) + class GeneratedCommandListAttribute(val value: List) - class AcceptedCommandListAttribute(val value: ArrayList) + class AcceptedCommandListAttribute(val value: List) - class EventListAttribute(val value: ArrayList) + class EventListAttribute(val value: List) - class AttributeListAttribute(val value: ArrayList) + class AttributeListAttribute(val value: List) suspend fun resetCounts(timedInvokeTimeoutMs: Int? = null) { if (timedInvokeTimeoutMs != null) { diff --git a/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/FanControlCluster.kt b/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/FanControlCluster.kt index 50126d392ae8e3..8b2a215e951bdc 100644 --- a/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/FanControlCluster.kt +++ b/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/FanControlCluster.kt @@ -17,20 +17,20 @@ package matter.devicecontroller.cluster.clusters -import java.util.ArrayList +import matter.devicecontroller.cluster.structs.* class FanControlCluster(private val endpointId: UShort) { class PercentSettingAttribute(val value: UByte?) class SpeedSettingAttribute(val value: UByte?) - class GeneratedCommandListAttribute(val value: ArrayList) + class GeneratedCommandListAttribute(val value: List) - class AcceptedCommandListAttribute(val value: ArrayList) + class AcceptedCommandListAttribute(val value: List) - class EventListAttribute(val value: ArrayList) + class EventListAttribute(val value: List) - class AttributeListAttribute(val value: ArrayList) + class AttributeListAttribute(val value: List) suspend fun step( direction: UInt, diff --git a/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/FaultInjectionCluster.kt b/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/FaultInjectionCluster.kt index 2caa5da496557a..2cf2566e7e306f 100644 --- a/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/FaultInjectionCluster.kt +++ b/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/FaultInjectionCluster.kt @@ -17,16 +17,16 @@ package matter.devicecontroller.cluster.clusters -import java.util.ArrayList +import matter.devicecontroller.cluster.structs.* class FaultInjectionCluster(private val endpointId: UShort) { - class GeneratedCommandListAttribute(val value: ArrayList) + class GeneratedCommandListAttribute(val value: List) - class AcceptedCommandListAttribute(val value: ArrayList) + class AcceptedCommandListAttribute(val value: List) - class EventListAttribute(val value: ArrayList) + class EventListAttribute(val value: List) - class AttributeListAttribute(val value: ArrayList) + class AttributeListAttribute(val value: List) suspend fun failAtFault( type: UInt, diff --git a/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/FixedLabelCluster.kt b/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/FixedLabelCluster.kt index f57fc133305b04..f30284e3d163c5 100644 --- a/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/FixedLabelCluster.kt +++ b/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/FixedLabelCluster.kt @@ -17,18 +17,18 @@ package matter.devicecontroller.cluster.clusters -import java.util.ArrayList +import matter.devicecontroller.cluster.structs.* class FixedLabelCluster(private val endpointId: UShort) { - class LabelListAttribute(val value: ArrayList) + class LabelListAttribute(val value: List) - class GeneratedCommandListAttribute(val value: ArrayList) + class GeneratedCommandListAttribute(val value: List) - class AcceptedCommandListAttribute(val value: ArrayList) + class AcceptedCommandListAttribute(val value: List) - class EventListAttribute(val value: ArrayList) + class EventListAttribute(val value: List) - class AttributeListAttribute(val value: ArrayList) + class AttributeListAttribute(val value: List) suspend fun readLabelListAttribute(): LabelListAttribute { // Implementation needs to be added here diff --git a/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/FlowMeasurementCluster.kt b/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/FlowMeasurementCluster.kt index 68704d81bc332c..9c8cc3dced9b0d 100644 --- a/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/FlowMeasurementCluster.kt +++ b/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/FlowMeasurementCluster.kt @@ -17,7 +17,7 @@ package matter.devicecontroller.cluster.clusters -import java.util.ArrayList +import matter.devicecontroller.cluster.structs.* class FlowMeasurementCluster(private val endpointId: UShort) { class MeasuredValueAttribute(val value: UShort?) @@ -26,13 +26,13 @@ class FlowMeasurementCluster(private val endpointId: UShort) { class MaxMeasuredValueAttribute(val value: UShort?) - class GeneratedCommandListAttribute(val value: ArrayList) + class GeneratedCommandListAttribute(val value: List) - class AcceptedCommandListAttribute(val value: ArrayList) + class AcceptedCommandListAttribute(val value: List) - class EventListAttribute(val value: ArrayList) + class EventListAttribute(val value: List) - class AttributeListAttribute(val value: ArrayList) + class AttributeListAttribute(val value: List) suspend fun readMeasuredValueAttribute(): MeasuredValueAttribute { // Implementation needs to be added here diff --git a/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/FormaldehydeConcentrationMeasurementCluster.kt b/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/FormaldehydeConcentrationMeasurementCluster.kt index a609f5446fb170..04ec12d3cbaed8 100644 --- a/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/FormaldehydeConcentrationMeasurementCluster.kt +++ b/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/FormaldehydeConcentrationMeasurementCluster.kt @@ -17,7 +17,7 @@ package matter.devicecontroller.cluster.clusters -import java.util.ArrayList +import matter.devicecontroller.cluster.structs.* class FormaldehydeConcentrationMeasurementCluster(private val endpointId: UShort) { class MeasuredValueAttribute(val value: Float?) @@ -30,13 +30,13 @@ class FormaldehydeConcentrationMeasurementCluster(private val endpointId: UShort class AverageMeasuredValueAttribute(val value: Float?) - class GeneratedCommandListAttribute(val value: ArrayList) + class GeneratedCommandListAttribute(val value: List) - class AcceptedCommandListAttribute(val value: ArrayList) + class AcceptedCommandListAttribute(val value: List) - class EventListAttribute(val value: ArrayList) + class EventListAttribute(val value: List) - class AttributeListAttribute(val value: ArrayList) + class AttributeListAttribute(val value: List) suspend fun readMeasuredValueAttribute(): MeasuredValueAttribute { // Implementation needs to be added here diff --git a/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/GeneralCommissioningCluster.kt b/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/GeneralCommissioningCluster.kt index 3ba91b04a0d7a2..c9687cf738063f 100644 --- a/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/GeneralCommissioningCluster.kt +++ b/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/GeneralCommissioningCluster.kt @@ -17,7 +17,7 @@ package matter.devicecontroller.cluster.clusters -import java.util.ArrayList +import matter.devicecontroller.cluster.structs.* class GeneralCommissioningCluster(private val endpointId: UShort) { class ArmFailSafeResponse(val errorCode: UInt, val debugText: String) @@ -27,16 +27,16 @@ class GeneralCommissioningCluster(private val endpointId: UShort) { class CommissioningCompleteResponse(val errorCode: UInt, val debugText: String) class BasicCommissioningInfoAttribute( - val value: ChipStructs.GeneralCommissioningClusterBasicCommissioningInfo + val value: GeneralCommissioningClusterBasicCommissioningInfo ) - class GeneratedCommandListAttribute(val value: ArrayList) + class GeneratedCommandListAttribute(val value: List) - class AcceptedCommandListAttribute(val value: ArrayList) + class AcceptedCommandListAttribute(val value: List) - class EventListAttribute(val value: ArrayList) + class EventListAttribute(val value: List) - class AttributeListAttribute(val value: ArrayList) + class AttributeListAttribute(val value: List) suspend fun armFailSafe( expiryLengthSeconds: UShort, diff --git a/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/GeneralDiagnosticsCluster.kt b/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/GeneralDiagnosticsCluster.kt index 83b0786c2ac77f..1a3b9d434bc57a 100644 --- a/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/GeneralDiagnosticsCluster.kt +++ b/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/GeneralDiagnosticsCluster.kt @@ -17,26 +17,26 @@ package matter.devicecontroller.cluster.clusters -import java.util.ArrayList +import matter.devicecontroller.cluster.structs.* class GeneralDiagnosticsCluster(private val endpointId: UShort) { - class NetworkInterfacesAttribute( - val value: ArrayList - ) + class TimeSnapshotResponse(val systemTimeUs: ULong, val UTCTimeUs: ULong?) - class ActiveHardwareFaultsAttribute(val value: ArrayList?) + class NetworkInterfacesAttribute(val value: List) - class ActiveRadioFaultsAttribute(val value: ArrayList?) + class ActiveHardwareFaultsAttribute(val value: List?) - class ActiveNetworkFaultsAttribute(val value: ArrayList?) + class ActiveRadioFaultsAttribute(val value: List?) - class GeneratedCommandListAttribute(val value: ArrayList) + class ActiveNetworkFaultsAttribute(val value: List?) - class AcceptedCommandListAttribute(val value: ArrayList) + class GeneratedCommandListAttribute(val value: List) - class EventListAttribute(val value: ArrayList) + class AcceptedCommandListAttribute(val value: List) - class AttributeListAttribute(val value: ArrayList) + class EventListAttribute(val value: List) + + class AttributeListAttribute(val value: List) suspend fun testEventTrigger( enableKey: ByteArray, @@ -50,6 +50,14 @@ class GeneralDiagnosticsCluster(private val endpointId: UShort) { } } + suspend fun timeSnapshot(timedInvokeTimeoutMs: Int? = null): TimeSnapshotResponse { + if (timedInvokeTimeoutMs != null) { + // Do the action with timedInvokeTimeoutMs + } else { + // Do the action without timedInvokeTimeoutMs + } + } + suspend fun readNetworkInterfacesAttribute(): NetworkInterfacesAttribute { // Implementation needs to be added here } diff --git a/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/GroupKeyManagementCluster.kt b/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/GroupKeyManagementCluster.kt index 11ca30cc8f5a3f..3473cc8ef73ce6 100644 --- a/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/GroupKeyManagementCluster.kt +++ b/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/GroupKeyManagementCluster.kt @@ -17,31 +17,27 @@ package matter.devicecontroller.cluster.clusters -import java.util.ArrayList +import matter.devicecontroller.cluster.structs.* class GroupKeyManagementCluster(private val endpointId: UShort) { - class KeySetReadResponse(val groupKeySet: ChipStructs.GroupKeyManagementClusterGroupKeySetStruct) + class KeySetReadResponse(val groupKeySet: GroupKeyManagementClusterGroupKeySetStruct) - class KeySetReadAllIndicesResponse(val groupKeySetIDs: ArrayList) + class KeySetReadAllIndicesResponse(val groupKeySetIDs: List) - class GroupKeyMapAttribute( - val value: ArrayList - ) + class GroupKeyMapAttribute(val value: List) - class GroupTableAttribute( - val value: ArrayList - ) + class GroupTableAttribute(val value: List) - class GeneratedCommandListAttribute(val value: ArrayList) + class GeneratedCommandListAttribute(val value: List) - class AcceptedCommandListAttribute(val value: ArrayList) + class AcceptedCommandListAttribute(val value: List) - class EventListAttribute(val value: ArrayList) + class EventListAttribute(val value: List) - class AttributeListAttribute(val value: ArrayList) + class AttributeListAttribute(val value: List) suspend fun keySetWrite( - groupKeySet: ChipStructs.GroupKeyManagementClusterGroupKeySetStruct, + groupKeySet: GroupKeyManagementClusterGroupKeySetStruct, timedInvokeTimeoutMs: Int? = null ) { if (timedInvokeTimeoutMs != null) { @@ -90,14 +86,12 @@ class GroupKeyManagementCluster(private val endpointId: UShort) { // Implementation needs to be added here } - suspend fun writeGroupKeyMapAttribute( - value: ArrayList - ) { + suspend fun writeGroupKeyMapAttribute(value: List) { // Implementation needs to be added here } suspend fun writeGroupKeyMapAttribute( - value: ArrayList, + value: List, timedWriteTimeoutMs: Int ) { // Implementation needs to be added here diff --git a/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/GroupsCluster.kt b/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/GroupsCluster.kt index 01c1dec237e116..c528fc0c08eb69 100644 --- a/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/GroupsCluster.kt +++ b/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/GroupsCluster.kt @@ -17,24 +17,24 @@ package matter.devicecontroller.cluster.clusters -import java.util.ArrayList +import matter.devicecontroller.cluster.structs.* class GroupsCluster(private val endpointId: UShort) { class AddGroupResponse(val status: UInt, val groupID: UShort) class ViewGroupResponse(val status: UInt, val groupID: UShort, val groupName: String) - class GetGroupMembershipResponse(val capacity: UByte?, val groupList: ArrayList) + class GetGroupMembershipResponse(val capacity: UByte?, val groupList: List) class RemoveGroupResponse(val status: UInt, val groupID: UShort) - class GeneratedCommandListAttribute(val value: ArrayList) + class GeneratedCommandListAttribute(val value: List) - class AcceptedCommandListAttribute(val value: ArrayList) + class AcceptedCommandListAttribute(val value: List) - class EventListAttribute(val value: ArrayList) + class EventListAttribute(val value: List) - class AttributeListAttribute(val value: ArrayList) + class AttributeListAttribute(val value: List) suspend fun addGroup( groupID: UShort, @@ -57,7 +57,7 @@ class GroupsCluster(private val endpointId: UShort) { } suspend fun getGroupMembership( - groupList: ArrayList, + groupList: List, timedInvokeTimeoutMs: Int? = null ): GetGroupMembershipResponse { if (timedInvokeTimeoutMs != null) { diff --git a/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/HepaFilterMonitoringCluster.kt b/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/HepaFilterMonitoringCluster.kt index 261d7a1740d98b..1dfee41a2c6b9e 100644 --- a/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/HepaFilterMonitoringCluster.kt +++ b/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/HepaFilterMonitoringCluster.kt @@ -17,22 +17,22 @@ package matter.devicecontroller.cluster.clusters -import java.util.ArrayList +import matter.devicecontroller.cluster.structs.* class HepaFilterMonitoringCluster(private val endpointId: UShort) { class LastChangedTimeAttribute(val value: UInt?) class ReplacementProductListAttribute( - val value: ArrayList? + val value: List? ) - class GeneratedCommandListAttribute(val value: ArrayList) + class GeneratedCommandListAttribute(val value: List) - class AcceptedCommandListAttribute(val value: ArrayList) + class AcceptedCommandListAttribute(val value: List) - class EventListAttribute(val value: ArrayList) + class EventListAttribute(val value: List) - class AttributeListAttribute(val value: ArrayList) + class AttributeListAttribute(val value: List) suspend fun resetCondition(timedInvokeTimeoutMs: Int? = null) { if (timedInvokeTimeoutMs != null) { diff --git a/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/IcdManagementCluster.kt b/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/IcdManagementCluster.kt index 124385d641dd9f..8c64f584032d98 100644 --- a/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/IcdManagementCluster.kt +++ b/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/IcdManagementCluster.kt @@ -17,22 +17,22 @@ package matter.devicecontroller.cluster.clusters -import java.util.ArrayList +import matter.devicecontroller.cluster.structs.* class IcdManagementCluster(private val endpointId: UShort) { class RegisterClientResponse(val ICDCounter: UInt) class RegisteredClientsAttribute( - val value: ArrayList? + val value: List? ) - class GeneratedCommandListAttribute(val value: ArrayList) + class GeneratedCommandListAttribute(val value: List) - class AcceptedCommandListAttribute(val value: ArrayList) + class AcceptedCommandListAttribute(val value: List) - class EventListAttribute(val value: ArrayList) + class EventListAttribute(val value: List) - class AttributeListAttribute(val value: ArrayList) + class AttributeListAttribute(val value: List) suspend fun registerClient( checkInNodeID: ULong, diff --git a/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/IdentifyCluster.kt b/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/IdentifyCluster.kt index 1726a21d39257d..61a686849e5fc1 100644 --- a/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/IdentifyCluster.kt +++ b/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/IdentifyCluster.kt @@ -17,16 +17,16 @@ package matter.devicecontroller.cluster.clusters -import java.util.ArrayList +import matter.devicecontroller.cluster.structs.* class IdentifyCluster(private val endpointId: UShort) { - class GeneratedCommandListAttribute(val value: ArrayList) + class GeneratedCommandListAttribute(val value: List) - class AcceptedCommandListAttribute(val value: ArrayList) + class AcceptedCommandListAttribute(val value: List) - class EventListAttribute(val value: ArrayList) + class EventListAttribute(val value: List) - class AttributeListAttribute(val value: ArrayList) + class AttributeListAttribute(val value: List) suspend fun identify(identifyTime: UShort, timedInvokeTimeoutMs: Int? = null) { if (timedInvokeTimeoutMs != null) { diff --git a/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/IlluminanceMeasurementCluster.kt b/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/IlluminanceMeasurementCluster.kt index 5c00ce53208a43..da5973e5a0a2f1 100644 --- a/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/IlluminanceMeasurementCluster.kt +++ b/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/IlluminanceMeasurementCluster.kt @@ -17,7 +17,7 @@ package matter.devicecontroller.cluster.clusters -import java.util.ArrayList +import matter.devicecontroller.cluster.structs.* class IlluminanceMeasurementCluster(private val endpointId: UShort) { class MeasuredValueAttribute(val value: UShort?) @@ -28,13 +28,13 @@ class IlluminanceMeasurementCluster(private val endpointId: UShort) { class LightSensorTypeAttribute(val value: UInt?) - class GeneratedCommandListAttribute(val value: ArrayList) + class GeneratedCommandListAttribute(val value: List) - class AcceptedCommandListAttribute(val value: ArrayList) + class AcceptedCommandListAttribute(val value: List) - class EventListAttribute(val value: ArrayList) + class EventListAttribute(val value: List) - class AttributeListAttribute(val value: ArrayList) + class AttributeListAttribute(val value: List) suspend fun readMeasuredValueAttribute(): MeasuredValueAttribute { // Implementation needs to be added here diff --git a/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/KeypadInputCluster.kt b/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/KeypadInputCluster.kt index bf2b852f33a5b3..adcdbc1da8c654 100644 --- a/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/KeypadInputCluster.kt +++ b/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/KeypadInputCluster.kt @@ -17,18 +17,18 @@ package matter.devicecontroller.cluster.clusters -import java.util.ArrayList +import matter.devicecontroller.cluster.structs.* class KeypadInputCluster(private val endpointId: UShort) { class SendKeyResponse(val status: UInt) - class GeneratedCommandListAttribute(val value: ArrayList) + class GeneratedCommandListAttribute(val value: List) - class AcceptedCommandListAttribute(val value: ArrayList) + class AcceptedCommandListAttribute(val value: List) - class EventListAttribute(val value: ArrayList) + class EventListAttribute(val value: List) - class AttributeListAttribute(val value: ArrayList) + class AttributeListAttribute(val value: List) suspend fun sendKey(keyCode: UInt, timedInvokeTimeoutMs: Int? = null): SendKeyResponse { if (timedInvokeTimeoutMs != null) { diff --git a/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/LaundryWasherControlsCluster.kt b/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/LaundryWasherControlsCluster.kt index e9f6ffa9de625a..f9c4ef50a5caf4 100644 --- a/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/LaundryWasherControlsCluster.kt +++ b/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/LaundryWasherControlsCluster.kt @@ -17,22 +17,22 @@ package matter.devicecontroller.cluster.clusters -import java.util.ArrayList +import matter.devicecontroller.cluster.structs.* class LaundryWasherControlsCluster(private val endpointId: UShort) { - class SpinSpeedsAttribute(val value: ArrayList?) + class SpinSpeedsAttribute(val value: List?) class SpinSpeedCurrentAttribute(val value: UByte?) - class SupportedRinsesAttribute(val value: ArrayList?) + class SupportedRinsesAttribute(val value: List?) - class GeneratedCommandListAttribute(val value: ArrayList) + class GeneratedCommandListAttribute(val value: List) - class AcceptedCommandListAttribute(val value: ArrayList) + class AcceptedCommandListAttribute(val value: List) - class EventListAttribute(val value: ArrayList) + class EventListAttribute(val value: List) - class AttributeListAttribute(val value: ArrayList) + class AttributeListAttribute(val value: List) suspend fun readSpinSpeedsAttribute(): SpinSpeedsAttribute { // Implementation needs to be added here diff --git a/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/LaundryWasherModeCluster.kt b/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/LaundryWasherModeCluster.kt index 7e41ed91ea99e2..a16b8e87a3ec37 100644 --- a/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/LaundryWasherModeCluster.kt +++ b/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/LaundryWasherModeCluster.kt @@ -17,26 +17,24 @@ package matter.devicecontroller.cluster.clusters -import java.util.ArrayList +import matter.devicecontroller.cluster.structs.* class LaundryWasherModeCluster(private val endpointId: UShort) { class ChangeToModeResponse(val status: UInt, val statusText: String?) - class SupportedModesAttribute( - val value: ArrayList - ) + class SupportedModesAttribute(val value: List) class StartUpModeAttribute(val value: UByte?) class OnModeAttribute(val value: UByte?) - class GeneratedCommandListAttribute(val value: ArrayList) + class GeneratedCommandListAttribute(val value: List) - class AcceptedCommandListAttribute(val value: ArrayList) + class AcceptedCommandListAttribute(val value: List) - class EventListAttribute(val value: ArrayList) + class EventListAttribute(val value: List) - class AttributeListAttribute(val value: ArrayList) + class AttributeListAttribute(val value: List) suspend fun changeToMode( newMode: UByte, diff --git a/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/LevelControlCluster.kt b/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/LevelControlCluster.kt index c60bb74c788614..1e5c27e024c7c0 100644 --- a/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/LevelControlCluster.kt +++ b/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/LevelControlCluster.kt @@ -17,7 +17,7 @@ package matter.devicecontroller.cluster.clusters -import java.util.ArrayList +import matter.devicecontroller.cluster.structs.* class LevelControlCluster(private val endpointId: UShort) { class CurrentLevelAttribute(val value: UByte?) @@ -32,13 +32,13 @@ class LevelControlCluster(private val endpointId: UShort) { class StartUpCurrentLevelAttribute(val value: UByte?) - class GeneratedCommandListAttribute(val value: ArrayList) + class GeneratedCommandListAttribute(val value: List) - class AcceptedCommandListAttribute(val value: ArrayList) + class AcceptedCommandListAttribute(val value: List) - class EventListAttribute(val value: ArrayList) + class EventListAttribute(val value: List) - class AttributeListAttribute(val value: ArrayList) + class AttributeListAttribute(val value: List) suspend fun moveToLevel( level: UByte, diff --git a/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/LocalizationConfigurationCluster.kt b/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/LocalizationConfigurationCluster.kt index 60b89689489ade..ac06a298de1736 100644 --- a/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/LocalizationConfigurationCluster.kt +++ b/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/LocalizationConfigurationCluster.kt @@ -17,18 +17,18 @@ package matter.devicecontroller.cluster.clusters -import java.util.ArrayList +import matter.devicecontroller.cluster.structs.* class LocalizationConfigurationCluster(private val endpointId: UShort) { - class SupportedLocalesAttribute(val value: ArrayList) + class SupportedLocalesAttribute(val value: List) - class GeneratedCommandListAttribute(val value: ArrayList) + class GeneratedCommandListAttribute(val value: List) - class AcceptedCommandListAttribute(val value: ArrayList) + class AcceptedCommandListAttribute(val value: List) - class EventListAttribute(val value: ArrayList) + class EventListAttribute(val value: List) - class AttributeListAttribute(val value: ArrayList) + class AttributeListAttribute(val value: List) suspend fun readActiveLocaleAttribute(): CharString { // Implementation needs to be added here diff --git a/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/LowPowerCluster.kt b/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/LowPowerCluster.kt index 4dca4c58fe9beb..6881db9d08dffb 100644 --- a/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/LowPowerCluster.kt +++ b/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/LowPowerCluster.kt @@ -17,16 +17,16 @@ package matter.devicecontroller.cluster.clusters -import java.util.ArrayList +import matter.devicecontroller.cluster.structs.* class LowPowerCluster(private val endpointId: UShort) { - class GeneratedCommandListAttribute(val value: ArrayList) + class GeneratedCommandListAttribute(val value: List) - class AcceptedCommandListAttribute(val value: ArrayList) + class AcceptedCommandListAttribute(val value: List) - class EventListAttribute(val value: ArrayList) + class EventListAttribute(val value: List) - class AttributeListAttribute(val value: ArrayList) + class AttributeListAttribute(val value: List) suspend fun sleep(timedInvokeTimeoutMs: Int? = null) { if (timedInvokeTimeoutMs != null) { diff --git a/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/MediaInputCluster.kt b/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/MediaInputCluster.kt index 5e013126be4f21..b89cd9bf964404 100644 --- a/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/MediaInputCluster.kt +++ b/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/MediaInputCluster.kt @@ -17,18 +17,18 @@ package matter.devicecontroller.cluster.clusters -import java.util.ArrayList +import matter.devicecontroller.cluster.structs.* class MediaInputCluster(private val endpointId: UShort) { - class InputListAttribute(val value: ArrayList) + class InputListAttribute(val value: List) - class GeneratedCommandListAttribute(val value: ArrayList) + class GeneratedCommandListAttribute(val value: List) - class AcceptedCommandListAttribute(val value: ArrayList) + class AcceptedCommandListAttribute(val value: List) - class EventListAttribute(val value: ArrayList) + class EventListAttribute(val value: List) - class AttributeListAttribute(val value: ArrayList) + class AttributeListAttribute(val value: List) suspend fun selectInput(index: UByte, timedInvokeTimeoutMs: Int? = null) { if (timedInvokeTimeoutMs != null) { diff --git a/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/MediaPlaybackCluster.kt b/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/MediaPlaybackCluster.kt index 3769725825a9c5..9d58fd84c46189 100644 --- a/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/MediaPlaybackCluster.kt +++ b/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/MediaPlaybackCluster.kt @@ -17,7 +17,7 @@ package matter.devicecontroller.cluster.clusters -import java.util.ArrayList +import matter.devicecontroller.cluster.structs.* class MediaPlaybackCluster(private val endpointId: UShort) { class PlaybackResponse(val status: UInt, val data: String?) @@ -26,21 +26,19 @@ class MediaPlaybackCluster(private val endpointId: UShort) { class DurationAttribute(val value: ULong?) - class SampledPositionAttribute( - val value: ChipStructs.MediaPlaybackClusterPlaybackPositionStruct? - ) + class SampledPositionAttribute(val value: MediaPlaybackClusterPlaybackPositionStruct?) class SeekRangeEndAttribute(val value: ULong?) class SeekRangeStartAttribute(val value: ULong?) - class GeneratedCommandListAttribute(val value: ArrayList) + class GeneratedCommandListAttribute(val value: List) - class AcceptedCommandListAttribute(val value: ArrayList) + class AcceptedCommandListAttribute(val value: List) - class EventListAttribute(val value: ArrayList) + class EventListAttribute(val value: List) - class AttributeListAttribute(val value: ArrayList) + class AttributeListAttribute(val value: List) suspend fun play(timedInvokeTimeoutMs: Int? = null): PlaybackResponse { if (timedInvokeTimeoutMs != null) { diff --git a/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/MicrowaveOvenControlCluster.kt b/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/MicrowaveOvenControlCluster.kt new file mode 100644 index 00000000000000..79da0170d7bf88 --- /dev/null +++ b/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/MicrowaveOvenControlCluster.kt @@ -0,0 +1,152 @@ +/* + * + * Copyright (c) 2023 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package matter.devicecontroller.cluster.clusters + +import matter.devicecontroller.cluster.structs.* + +class MicrowaveOvenControlCluster(private val endpointId: UShort) { + class GeneratedCommandListAttribute(val value: List) + + class AcceptedCommandListAttribute(val value: List) + + class EventListAttribute(val value: List) + + class AttributeListAttribute(val value: List) + + suspend fun setCookingParameters( + cookMode: UByte?, + cookTime: UInt?, + powerSetting: UByte?, + timedInvokeTimeoutMs: Int? = null + ) { + if (timedInvokeTimeoutMs != null) { + // Do the action with timedInvokeTimeoutMs + } else { + // Do the action without timedInvokeTimeoutMs + } + } + + suspend fun addMoreTime(timeToAdd: UInt, timedInvokeTimeoutMs: Int? = null) { + if (timedInvokeTimeoutMs != null) { + // Do the action with timedInvokeTimeoutMs + } else { + // Do the action without timedInvokeTimeoutMs + } + } + + suspend fun readCookTimeAttribute(): UInt { + // Implementation needs to be added here + } + + suspend fun subscribeCookTimeAttribute(minInterval: Int, maxInterval: Int): UInt { + // Implementation needs to be added here + } + + suspend fun readPowerSettingAttribute(): UByte { + // Implementation needs to be added here + } + + suspend fun subscribePowerSettingAttribute(minInterval: Int, maxInterval: Int): UByte { + // Implementation needs to be added here + } + + suspend fun readMinPowerAttribute(): UByte { + // Implementation needs to be added here + } + + suspend fun subscribeMinPowerAttribute(minInterval: Int, maxInterval: Int): UByte { + // Implementation needs to be added here + } + + suspend fun readMaxPowerAttribute(): UByte { + // Implementation needs to be added here + } + + suspend fun subscribeMaxPowerAttribute(minInterval: Int, maxInterval: Int): UByte { + // Implementation needs to be added here + } + + suspend fun readPowerStepAttribute(): UByte { + // Implementation needs to be added here + } + + suspend fun subscribePowerStepAttribute(minInterval: Int, maxInterval: Int): UByte { + // Implementation needs to be added here + } + + suspend fun readGeneratedCommandListAttribute(): GeneratedCommandListAttribute { + // Implementation needs to be added here + } + + suspend fun subscribeGeneratedCommandListAttribute( + minInterval: Int, + maxInterval: Int + ): GeneratedCommandListAttribute { + // Implementation needs to be added here + } + + suspend fun readAcceptedCommandListAttribute(): AcceptedCommandListAttribute { + // Implementation needs to be added here + } + + suspend fun subscribeAcceptedCommandListAttribute( + minInterval: Int, + maxInterval: Int + ): AcceptedCommandListAttribute { + // Implementation needs to be added here + } + + suspend fun readEventListAttribute(): EventListAttribute { + // Implementation needs to be added here + } + + suspend fun subscribeEventListAttribute(minInterval: Int, maxInterval: Int): EventListAttribute { + // Implementation needs to be added here + } + + suspend fun readAttributeListAttribute(): AttributeListAttribute { + // Implementation needs to be added here + } + + suspend fun subscribeAttributeListAttribute( + minInterval: Int, + maxInterval: Int + ): AttributeListAttribute { + // Implementation needs to be added here + } + + suspend fun readFeatureMapAttribute(): UInt { + // Implementation needs to be added here + } + + suspend fun subscribeFeatureMapAttribute(minInterval: Int, maxInterval: Int): UInt { + // Implementation needs to be added here + } + + suspend fun readClusterRevisionAttribute(): UShort { + // Implementation needs to be added here + } + + suspend fun subscribeClusterRevisionAttribute(minInterval: Int, maxInterval: Int): UShort { + // Implementation needs to be added here + } + + companion object { + const val CLUSTER_ID: UInt = 95u + } +} diff --git a/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/ModeSelectCluster.kt b/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/ModeSelectCluster.kt index 7b32db37c44eb0..acae26fd634da2 100644 --- a/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/ModeSelectCluster.kt +++ b/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/ModeSelectCluster.kt @@ -17,26 +17,24 @@ package matter.devicecontroller.cluster.clusters -import java.util.ArrayList +import matter.devicecontroller.cluster.structs.* class ModeSelectCluster(private val endpointId: UShort) { class StandardNamespaceAttribute(val value: UInt?) - class SupportedModesAttribute( - val value: ArrayList - ) + class SupportedModesAttribute(val value: List) class StartUpModeAttribute(val value: UByte?) class OnModeAttribute(val value: UByte?) - class GeneratedCommandListAttribute(val value: ArrayList) + class GeneratedCommandListAttribute(val value: List) - class AcceptedCommandListAttribute(val value: ArrayList) + class AcceptedCommandListAttribute(val value: List) - class EventListAttribute(val value: ArrayList) + class EventListAttribute(val value: List) - class AttributeListAttribute(val value: ArrayList) + class AttributeListAttribute(val value: List) suspend fun changeToMode(newMode: UByte, timedInvokeTimeoutMs: Int? = null) { if (timedInvokeTimeoutMs != null) { diff --git a/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/NetworkCommissioningCluster.kt b/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/NetworkCommissioningCluster.kt index c3ffa0cd078e4a..c4e3477cfb17e4 100644 --- a/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/NetworkCommissioningCluster.kt +++ b/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/NetworkCommissioningCluster.kt @@ -17,16 +17,14 @@ package matter.devicecontroller.cluster.clusters -import java.util.ArrayList +import matter.devicecontroller.cluster.structs.* class NetworkCommissioningCluster(private val endpointId: UShort) { class ScanNetworksResponse( val networkingStatus: UInt, val debugText: String?, - val wiFiScanResults: - ArrayList?, - val threadScanResults: - ArrayList? + val wiFiScanResults: List?, + val threadScanResults: List? ) class NetworkConfigResponse( @@ -41,9 +39,7 @@ class NetworkCommissioningCluster(private val endpointId: UShort) { val errorValue: Int? ) - class NetworksAttribute( - val value: ArrayList - ) + class NetworksAttribute(val value: List) class LastNetworkingStatusAttribute(val value: UInt?) @@ -51,15 +47,15 @@ class NetworkCommissioningCluster(private val endpointId: UShort) { class LastConnectErrorValueAttribute(val value: Int?) - class SupportedWiFiBandsAttribute(val value: ArrayList?) + class SupportedWiFiBandsAttribute(val value: List?) - class GeneratedCommandListAttribute(val value: ArrayList) + class GeneratedCommandListAttribute(val value: List) - class AcceptedCommandListAttribute(val value: ArrayList) + class AcceptedCommandListAttribute(val value: List) - class EventListAttribute(val value: ArrayList) + class EventListAttribute(val value: List) - class AttributeListAttribute(val value: ArrayList) + class AttributeListAttribute(val value: List) suspend fun scanNetworks( ssid: ByteArray?, diff --git a/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/NitrogenDioxideConcentrationMeasurementCluster.kt b/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/NitrogenDioxideConcentrationMeasurementCluster.kt index a7b9f91a0db969..a9b1d6e828fc9f 100644 --- a/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/NitrogenDioxideConcentrationMeasurementCluster.kt +++ b/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/NitrogenDioxideConcentrationMeasurementCluster.kt @@ -17,7 +17,7 @@ package matter.devicecontroller.cluster.clusters -import java.util.ArrayList +import matter.devicecontroller.cluster.structs.* class NitrogenDioxideConcentrationMeasurementCluster(private val endpointId: UShort) { class MeasuredValueAttribute(val value: Float?) @@ -30,13 +30,13 @@ class NitrogenDioxideConcentrationMeasurementCluster(private val endpointId: USh class AverageMeasuredValueAttribute(val value: Float?) - class GeneratedCommandListAttribute(val value: ArrayList) + class GeneratedCommandListAttribute(val value: List) - class AcceptedCommandListAttribute(val value: ArrayList) + class AcceptedCommandListAttribute(val value: List) - class EventListAttribute(val value: ArrayList) + class EventListAttribute(val value: List) - class AttributeListAttribute(val value: ArrayList) + class AttributeListAttribute(val value: List) suspend fun readMeasuredValueAttribute(): MeasuredValueAttribute { // Implementation needs to be added here diff --git a/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/OccupancySensingCluster.kt b/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/OccupancySensingCluster.kt index b1e422f9a6d427..d13dbd20f35a27 100644 --- a/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/OccupancySensingCluster.kt +++ b/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/OccupancySensingCluster.kt @@ -17,16 +17,16 @@ package matter.devicecontroller.cluster.clusters -import java.util.ArrayList +import matter.devicecontroller.cluster.structs.* class OccupancySensingCluster(private val endpointId: UShort) { - class GeneratedCommandListAttribute(val value: ArrayList) + class GeneratedCommandListAttribute(val value: List) - class AcceptedCommandListAttribute(val value: ArrayList) + class AcceptedCommandListAttribute(val value: List) - class EventListAttribute(val value: ArrayList) + class EventListAttribute(val value: List) - class AttributeListAttribute(val value: ArrayList) + class AttributeListAttribute(val value: List) suspend fun readOccupancyAttribute(): UByte { // Implementation needs to be added here diff --git a/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/OnOffCluster.kt b/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/OnOffCluster.kt index 1a664fcca03619..912d623f0e8bbe 100644 --- a/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/OnOffCluster.kt +++ b/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/OnOffCluster.kt @@ -17,18 +17,18 @@ package matter.devicecontroller.cluster.clusters -import java.util.ArrayList +import matter.devicecontroller.cluster.structs.* class OnOffCluster(private val endpointId: UShort) { class StartUpOnOffAttribute(val value: UInt?) - class GeneratedCommandListAttribute(val value: ArrayList) + class GeneratedCommandListAttribute(val value: List) - class AcceptedCommandListAttribute(val value: ArrayList) + class AcceptedCommandListAttribute(val value: List) - class EventListAttribute(val value: ArrayList) + class EventListAttribute(val value: List) - class AttributeListAttribute(val value: ArrayList) + class AttributeListAttribute(val value: List) suspend fun off(timedInvokeTimeoutMs: Int? = null) { if (timedInvokeTimeoutMs != null) { diff --git a/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/OnOffSwitchConfigurationCluster.kt b/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/OnOffSwitchConfigurationCluster.kt index 6db5a92ae7ec92..2a04bd383851bf 100644 --- a/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/OnOffSwitchConfigurationCluster.kt +++ b/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/OnOffSwitchConfigurationCluster.kt @@ -17,16 +17,16 @@ package matter.devicecontroller.cluster.clusters -import java.util.ArrayList +import matter.devicecontroller.cluster.structs.* class OnOffSwitchConfigurationCluster(private val endpointId: UShort) { - class GeneratedCommandListAttribute(val value: ArrayList) + class GeneratedCommandListAttribute(val value: List) - class AcceptedCommandListAttribute(val value: ArrayList) + class AcceptedCommandListAttribute(val value: List) - class EventListAttribute(val value: ArrayList) + class EventListAttribute(val value: List) - class AttributeListAttribute(val value: ArrayList) + class AttributeListAttribute(val value: List) suspend fun readSwitchTypeAttribute(): UByte { // Implementation needs to be added here diff --git a/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/OperationalCredentialsCluster.kt b/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/OperationalCredentialsCluster.kt index f63ff9156c4845..1872207aec663f 100644 --- a/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/OperationalCredentialsCluster.kt +++ b/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/OperationalCredentialsCluster.kt @@ -17,7 +17,7 @@ package matter.devicecontroller.cluster.clusters -import java.util.ArrayList +import matter.devicecontroller.cluster.structs.* class OperationalCredentialsCluster(private val endpointId: UShort) { class AttestationResponse( @@ -31,21 +31,19 @@ class OperationalCredentialsCluster(private val endpointId: UShort) { class NOCResponse(val statusCode: UInt, val fabricIndex: UByte?, val debugText: String?) - class NOCsAttribute(val value: ArrayList) + class NOCsAttribute(val value: List) - class FabricsAttribute( - val value: ArrayList - ) + class FabricsAttribute(val value: List) - class TrustedRootCertificatesAttribute(val value: ArrayList) + class TrustedRootCertificatesAttribute(val value: List) - class GeneratedCommandListAttribute(val value: ArrayList) + class GeneratedCommandListAttribute(val value: List) - class AcceptedCommandListAttribute(val value: ArrayList) + class AcceptedCommandListAttribute(val value: List) - class EventListAttribute(val value: ArrayList) + class EventListAttribute(val value: List) - class AttributeListAttribute(val value: ArrayList) + class AttributeListAttribute(val value: List) suspend fun attestationRequest( attestationNonce: ByteArray, diff --git a/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/OperationalStateCluster.kt b/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/OperationalStateCluster.kt index 67a438780eb9d3..1064e27d1d9f64 100644 --- a/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/OperationalStateCluster.kt +++ b/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/OperationalStateCluster.kt @@ -17,32 +17,32 @@ package matter.devicecontroller.cluster.clusters -import java.util.ArrayList +import matter.devicecontroller.cluster.structs.* class OperationalStateCluster(private val endpointId: UShort) { class OperationalCommandResponse( - val commandResponseState: ChipStructs.OperationalStateClusterErrorStateStruct + val commandResponseState: OperationalStateClusterErrorStateStruct ) - class PhaseListAttribute(val value: ArrayList?) + class PhaseListAttribute(val value: List?) class CurrentPhaseAttribute(val value: UByte?) class CountdownTimeAttribute(val value: UInt?) class OperationalStateListAttribute( - val value: ArrayList + val value: List ) - class OperationalErrorAttribute(val value: ChipStructs.OperationalStateClusterErrorStateStruct) + class OperationalErrorAttribute(val value: OperationalStateClusterErrorStateStruct) - class GeneratedCommandListAttribute(val value: ArrayList) + class GeneratedCommandListAttribute(val value: List) - class AcceptedCommandListAttribute(val value: ArrayList) + class AcceptedCommandListAttribute(val value: List) - class EventListAttribute(val value: ArrayList) + class EventListAttribute(val value: List) - class AttributeListAttribute(val value: ArrayList) + class AttributeListAttribute(val value: List) suspend fun pause(timedInvokeTimeoutMs: Int? = null): OperationalCommandResponse { if (timedInvokeTimeoutMs != null) { diff --git a/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/OtaSoftwareUpdateProviderCluster.kt b/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/OtaSoftwareUpdateProviderCluster.kt index 7b252ac5dc8fac..3cf4e93c1d36c4 100644 --- a/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/OtaSoftwareUpdateProviderCluster.kt +++ b/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/OtaSoftwareUpdateProviderCluster.kt @@ -17,7 +17,7 @@ package matter.devicecontroller.cluster.clusters -import java.util.ArrayList +import matter.devicecontroller.cluster.structs.* class OtaSoftwareUpdateProviderCluster(private val endpointId: UShort) { class QueryImageResponse( @@ -33,19 +33,19 @@ class OtaSoftwareUpdateProviderCluster(private val endpointId: UShort) { class ApplyUpdateResponse(val action: UInt, val delayedActionTime: UInt) - class GeneratedCommandListAttribute(val value: ArrayList) + class GeneratedCommandListAttribute(val value: List) - class AcceptedCommandListAttribute(val value: ArrayList) + class AcceptedCommandListAttribute(val value: List) - class EventListAttribute(val value: ArrayList) + class EventListAttribute(val value: List) - class AttributeListAttribute(val value: ArrayList) + class AttributeListAttribute(val value: List) suspend fun queryImage( vendorID: UShort, productID: UShort, softwareVersion: UInt, - protocolsSupported: ArrayList, + protocolsSupported: List, hardwareVersion: UShort?, location: String?, requestorCanConsent: Boolean?, diff --git a/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/OtaSoftwareUpdateRequestorCluster.kt b/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/OtaSoftwareUpdateRequestorCluster.kt index 0073fd7f2b621b..71c319d1d128b1 100644 --- a/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/OtaSoftwareUpdateRequestorCluster.kt +++ b/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/OtaSoftwareUpdateRequestorCluster.kt @@ -17,22 +17,22 @@ package matter.devicecontroller.cluster.clusters -import java.util.ArrayList +import matter.devicecontroller.cluster.structs.* class OtaSoftwareUpdateRequestorCluster(private val endpointId: UShort) { class DefaultOTAProvidersAttribute( - val value: ArrayList + val value: List ) class UpdateStateProgressAttribute(val value: UByte?) - class GeneratedCommandListAttribute(val value: ArrayList) + class GeneratedCommandListAttribute(val value: List) - class AcceptedCommandListAttribute(val value: ArrayList) + class AcceptedCommandListAttribute(val value: List) - class EventListAttribute(val value: ArrayList) + class EventListAttribute(val value: List) - class AttributeListAttribute(val value: ArrayList) + class AttributeListAttribute(val value: List) suspend fun announceOTAProvider( providerNodeID: ULong, @@ -60,13 +60,13 @@ class OtaSoftwareUpdateRequestorCluster(private val endpointId: UShort) { } suspend fun writeDefaultOTAProvidersAttribute( - value: ArrayList + value: List ) { // Implementation needs to be added here } suspend fun writeDefaultOTAProvidersAttribute( - value: ArrayList, + value: List, timedWriteTimeoutMs: Int ) { // Implementation needs to be added here diff --git a/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/OzoneConcentrationMeasurementCluster.kt b/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/OzoneConcentrationMeasurementCluster.kt index 8a9f00bcb930ee..7dd6c7cac8bee6 100644 --- a/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/OzoneConcentrationMeasurementCluster.kt +++ b/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/OzoneConcentrationMeasurementCluster.kt @@ -17,7 +17,7 @@ package matter.devicecontroller.cluster.clusters -import java.util.ArrayList +import matter.devicecontroller.cluster.structs.* class OzoneConcentrationMeasurementCluster(private val endpointId: UShort) { class MeasuredValueAttribute(val value: Float?) @@ -30,13 +30,13 @@ class OzoneConcentrationMeasurementCluster(private val endpointId: UShort) { class AverageMeasuredValueAttribute(val value: Float?) - class GeneratedCommandListAttribute(val value: ArrayList) + class GeneratedCommandListAttribute(val value: List) - class AcceptedCommandListAttribute(val value: ArrayList) + class AcceptedCommandListAttribute(val value: List) - class EventListAttribute(val value: ArrayList) + class EventListAttribute(val value: List) - class AttributeListAttribute(val value: ArrayList) + class AttributeListAttribute(val value: List) suspend fun readMeasuredValueAttribute(): MeasuredValueAttribute { // Implementation needs to be added here diff --git a/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/Pm10ConcentrationMeasurementCluster.kt b/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/Pm10ConcentrationMeasurementCluster.kt index 5c62e414efbcd4..f8030010d0da11 100644 --- a/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/Pm10ConcentrationMeasurementCluster.kt +++ b/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/Pm10ConcentrationMeasurementCluster.kt @@ -17,7 +17,7 @@ package matter.devicecontroller.cluster.clusters -import java.util.ArrayList +import matter.devicecontroller.cluster.structs.* class Pm10ConcentrationMeasurementCluster(private val endpointId: UShort) { class MeasuredValueAttribute(val value: Float?) @@ -30,13 +30,13 @@ class Pm10ConcentrationMeasurementCluster(private val endpointId: UShort) { class AverageMeasuredValueAttribute(val value: Float?) - class GeneratedCommandListAttribute(val value: ArrayList) + class GeneratedCommandListAttribute(val value: List) - class AcceptedCommandListAttribute(val value: ArrayList) + class AcceptedCommandListAttribute(val value: List) - class EventListAttribute(val value: ArrayList) + class EventListAttribute(val value: List) - class AttributeListAttribute(val value: ArrayList) + class AttributeListAttribute(val value: List) suspend fun readMeasuredValueAttribute(): MeasuredValueAttribute { // Implementation needs to be added here diff --git a/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/Pm1ConcentrationMeasurementCluster.kt b/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/Pm1ConcentrationMeasurementCluster.kt index 8cfae81b81c12b..77700b857234d9 100644 --- a/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/Pm1ConcentrationMeasurementCluster.kt +++ b/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/Pm1ConcentrationMeasurementCluster.kt @@ -17,7 +17,7 @@ package matter.devicecontroller.cluster.clusters -import java.util.ArrayList +import matter.devicecontroller.cluster.structs.* class Pm1ConcentrationMeasurementCluster(private val endpointId: UShort) { class MeasuredValueAttribute(val value: Float?) @@ -30,13 +30,13 @@ class Pm1ConcentrationMeasurementCluster(private val endpointId: UShort) { class AverageMeasuredValueAttribute(val value: Float?) - class GeneratedCommandListAttribute(val value: ArrayList) + class GeneratedCommandListAttribute(val value: List) - class AcceptedCommandListAttribute(val value: ArrayList) + class AcceptedCommandListAttribute(val value: List) - class EventListAttribute(val value: ArrayList) + class EventListAttribute(val value: List) - class AttributeListAttribute(val value: ArrayList) + class AttributeListAttribute(val value: List) suspend fun readMeasuredValueAttribute(): MeasuredValueAttribute { // Implementation needs to be added here diff --git a/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/Pm25ConcentrationMeasurementCluster.kt b/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/Pm25ConcentrationMeasurementCluster.kt index bcc05a26a5f124..096a8ee16bfaeb 100644 --- a/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/Pm25ConcentrationMeasurementCluster.kt +++ b/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/Pm25ConcentrationMeasurementCluster.kt @@ -17,7 +17,7 @@ package matter.devicecontroller.cluster.clusters -import java.util.ArrayList +import matter.devicecontroller.cluster.structs.* class Pm25ConcentrationMeasurementCluster(private val endpointId: UShort) { class MeasuredValueAttribute(val value: Float?) @@ -30,13 +30,13 @@ class Pm25ConcentrationMeasurementCluster(private val endpointId: UShort) { class AverageMeasuredValueAttribute(val value: Float?) - class GeneratedCommandListAttribute(val value: ArrayList) + class GeneratedCommandListAttribute(val value: List) - class AcceptedCommandListAttribute(val value: ArrayList) + class AcceptedCommandListAttribute(val value: List) - class EventListAttribute(val value: ArrayList) + class EventListAttribute(val value: List) - class AttributeListAttribute(val value: ArrayList) + class AttributeListAttribute(val value: List) suspend fun readMeasuredValueAttribute(): MeasuredValueAttribute { // Implementation needs to be added here diff --git a/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/PowerSourceCluster.kt b/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/PowerSourceCluster.kt index a1a4ca2b53c0a1..da40049b9cb03b 100644 --- a/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/PowerSourceCluster.kt +++ b/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/PowerSourceCluster.kt @@ -17,7 +17,7 @@ package matter.devicecontroller.cluster.clusters -import java.util.ArrayList +import matter.devicecontroller.cluster.structs.* class PowerSourceCluster(private val endpointId: UShort) { class WiredAssessedInputVoltageAttribute(val value: UInt?) @@ -26,7 +26,7 @@ class PowerSourceCluster(private val endpointId: UShort) { class WiredAssessedCurrentAttribute(val value: UInt?) - class ActiveWiredFaultsAttribute(val value: ArrayList?) + class ActiveWiredFaultsAttribute(val value: List?) class BatVoltageAttribute(val value: UInt?) @@ -34,23 +34,23 @@ class PowerSourceCluster(private val endpointId: UShort) { class BatTimeRemainingAttribute(val value: UInt?) - class ActiveBatFaultsAttribute(val value: ArrayList?) + class ActiveBatFaultsAttribute(val value: List?) class BatTimeToFullChargeAttribute(val value: UInt?) class BatChargingCurrentAttribute(val value: UInt?) - class ActiveBatChargeFaultsAttribute(val value: ArrayList?) + class ActiveBatChargeFaultsAttribute(val value: List?) - class EndpointListAttribute(val value: ArrayList) + class EndpointListAttribute(val value: List) - class GeneratedCommandListAttribute(val value: ArrayList) + class GeneratedCommandListAttribute(val value: List) - class AcceptedCommandListAttribute(val value: ArrayList) + class AcceptedCommandListAttribute(val value: List) - class EventListAttribute(val value: ArrayList) + class EventListAttribute(val value: List) - class AttributeListAttribute(val value: ArrayList) + class AttributeListAttribute(val value: List) suspend fun readStatusAttribute(): UByte { // Implementation needs to be added here diff --git a/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/PowerSourceConfigurationCluster.kt b/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/PowerSourceConfigurationCluster.kt index 465df21407c031..13bced39ded546 100644 --- a/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/PowerSourceConfigurationCluster.kt +++ b/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/PowerSourceConfigurationCluster.kt @@ -17,18 +17,18 @@ package matter.devicecontroller.cluster.clusters -import java.util.ArrayList +import matter.devicecontroller.cluster.structs.* class PowerSourceConfigurationCluster(private val endpointId: UShort) { - class SourcesAttribute(val value: ArrayList) + class SourcesAttribute(val value: List) - class GeneratedCommandListAttribute(val value: ArrayList) + class GeneratedCommandListAttribute(val value: List) - class AcceptedCommandListAttribute(val value: ArrayList) + class AcceptedCommandListAttribute(val value: List) - class EventListAttribute(val value: ArrayList) + class EventListAttribute(val value: List) - class AttributeListAttribute(val value: ArrayList) + class AttributeListAttribute(val value: List) suspend fun readSourcesAttribute(): SourcesAttribute { // Implementation needs to be added here diff --git a/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/PressureMeasurementCluster.kt b/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/PressureMeasurementCluster.kt index 4bbc2eb021dd60..55e60d8ff8ad38 100644 --- a/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/PressureMeasurementCluster.kt +++ b/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/PressureMeasurementCluster.kt @@ -17,7 +17,7 @@ package matter.devicecontroller.cluster.clusters -import java.util.ArrayList +import matter.devicecontroller.cluster.structs.* class PressureMeasurementCluster(private val endpointId: UShort) { class MeasuredValueAttribute(val value: Short?) @@ -32,13 +32,13 @@ class PressureMeasurementCluster(private val endpointId: UShort) { class MaxScaledValueAttribute(val value: Short?) - class GeneratedCommandListAttribute(val value: ArrayList) + class GeneratedCommandListAttribute(val value: List) - class AcceptedCommandListAttribute(val value: ArrayList) + class AcceptedCommandListAttribute(val value: List) - class EventListAttribute(val value: ArrayList) + class EventListAttribute(val value: List) - class AttributeListAttribute(val value: ArrayList) + class AttributeListAttribute(val value: List) suspend fun readMeasuredValueAttribute(): MeasuredValueAttribute { // Implementation needs to be added here diff --git a/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/ProxyConfigurationCluster.kt b/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/ProxyConfigurationCluster.kt index a4ccebc42ac090..8dc5508cf98e6f 100644 --- a/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/ProxyConfigurationCluster.kt +++ b/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/ProxyConfigurationCluster.kt @@ -17,16 +17,16 @@ package matter.devicecontroller.cluster.clusters -import java.util.ArrayList +import matter.devicecontroller.cluster.structs.* class ProxyConfigurationCluster(private val endpointId: UShort) { - class GeneratedCommandListAttribute(val value: ArrayList) + class GeneratedCommandListAttribute(val value: List) - class AcceptedCommandListAttribute(val value: ArrayList) + class AcceptedCommandListAttribute(val value: List) - class EventListAttribute(val value: ArrayList) + class EventListAttribute(val value: List) - class AttributeListAttribute(val value: ArrayList) + class AttributeListAttribute(val value: List) suspend fun readGeneratedCommandListAttribute(): GeneratedCommandListAttribute { // Implementation needs to be added here diff --git a/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/ProxyDiscoveryCluster.kt b/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/ProxyDiscoveryCluster.kt index bb36d71e8eb07f..c9c163e70f15e9 100644 --- a/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/ProxyDiscoveryCluster.kt +++ b/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/ProxyDiscoveryCluster.kt @@ -17,16 +17,16 @@ package matter.devicecontroller.cluster.clusters -import java.util.ArrayList +import matter.devicecontroller.cluster.structs.* class ProxyDiscoveryCluster(private val endpointId: UShort) { - class GeneratedCommandListAttribute(val value: ArrayList) + class GeneratedCommandListAttribute(val value: List) - class AcceptedCommandListAttribute(val value: ArrayList) + class AcceptedCommandListAttribute(val value: List) - class EventListAttribute(val value: ArrayList) + class EventListAttribute(val value: List) - class AttributeListAttribute(val value: ArrayList) + class AttributeListAttribute(val value: List) suspend fun readGeneratedCommandListAttribute(): GeneratedCommandListAttribute { // Implementation needs to be added here diff --git a/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/ProxyValidCluster.kt b/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/ProxyValidCluster.kt index 9e0e7d84c3a0d0..f88698bbefa063 100644 --- a/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/ProxyValidCluster.kt +++ b/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/ProxyValidCluster.kt @@ -17,16 +17,16 @@ package matter.devicecontroller.cluster.clusters -import java.util.ArrayList +import matter.devicecontroller.cluster.structs.* class ProxyValidCluster(private val endpointId: UShort) { - class GeneratedCommandListAttribute(val value: ArrayList) + class GeneratedCommandListAttribute(val value: List) - class AcceptedCommandListAttribute(val value: ArrayList) + class AcceptedCommandListAttribute(val value: List) - class EventListAttribute(val value: ArrayList) + class EventListAttribute(val value: List) - class AttributeListAttribute(val value: ArrayList) + class AttributeListAttribute(val value: List) suspend fun readGeneratedCommandListAttribute(): GeneratedCommandListAttribute { // Implementation needs to be added here diff --git a/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/PulseWidthModulationCluster.kt b/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/PulseWidthModulationCluster.kt index 0183a08f7f10dc..2e3de7f45a33c6 100644 --- a/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/PulseWidthModulationCluster.kt +++ b/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/PulseWidthModulationCluster.kt @@ -17,16 +17,16 @@ package matter.devicecontroller.cluster.clusters -import java.util.ArrayList +import matter.devicecontroller.cluster.structs.* class PulseWidthModulationCluster(private val endpointId: UShort) { - class GeneratedCommandListAttribute(val value: ArrayList) + class GeneratedCommandListAttribute(val value: List) - class AcceptedCommandListAttribute(val value: ArrayList) + class AcceptedCommandListAttribute(val value: List) - class EventListAttribute(val value: ArrayList) + class EventListAttribute(val value: List) - class AttributeListAttribute(val value: ArrayList) + class AttributeListAttribute(val value: List) suspend fun readGeneratedCommandListAttribute(): GeneratedCommandListAttribute { // Implementation needs to be added here diff --git a/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/PumpConfigurationAndControlCluster.kt b/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/PumpConfigurationAndControlCluster.kt index 08f4c5c5c0aab9..2fc7f8370ebe4d 100644 --- a/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/PumpConfigurationAndControlCluster.kt +++ b/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/PumpConfigurationAndControlCluster.kt @@ -17,7 +17,7 @@ package matter.devicecontroller.cluster.clusters -import java.util.ArrayList +import matter.devicecontroller.cluster.structs.* class PumpConfigurationAndControlCluster(private val endpointId: UShort) { class MaxPressureAttribute(val value: Short?) @@ -56,13 +56,13 @@ class PumpConfigurationAndControlCluster(private val endpointId: UShort) { class LifetimeEnergyConsumedAttribute(val value: UInt?) - class GeneratedCommandListAttribute(val value: ArrayList) + class GeneratedCommandListAttribute(val value: List) - class AcceptedCommandListAttribute(val value: ArrayList) + class AcceptedCommandListAttribute(val value: List) - class EventListAttribute(val value: ArrayList) + class EventListAttribute(val value: List) - class AttributeListAttribute(val value: ArrayList) + class AttributeListAttribute(val value: List) suspend fun readMaxPressureAttribute(): MaxPressureAttribute { // Implementation needs to be added here diff --git a/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/RadonConcentrationMeasurementCluster.kt b/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/RadonConcentrationMeasurementCluster.kt index 945e652210361b..9ae2d47bf1c17c 100644 --- a/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/RadonConcentrationMeasurementCluster.kt +++ b/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/RadonConcentrationMeasurementCluster.kt @@ -17,7 +17,7 @@ package matter.devicecontroller.cluster.clusters -import java.util.ArrayList +import matter.devicecontroller.cluster.structs.* class RadonConcentrationMeasurementCluster(private val endpointId: UShort) { class MeasuredValueAttribute(val value: Float?) @@ -30,13 +30,13 @@ class RadonConcentrationMeasurementCluster(private val endpointId: UShort) { class AverageMeasuredValueAttribute(val value: Float?) - class GeneratedCommandListAttribute(val value: ArrayList) + class GeneratedCommandListAttribute(val value: List) - class AcceptedCommandListAttribute(val value: ArrayList) + class AcceptedCommandListAttribute(val value: List) - class EventListAttribute(val value: ArrayList) + class EventListAttribute(val value: List) - class AttributeListAttribute(val value: ArrayList) + class AttributeListAttribute(val value: List) suspend fun readMeasuredValueAttribute(): MeasuredValueAttribute { // Implementation needs to be added here diff --git a/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/RefrigeratorAlarmCluster.kt b/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/RefrigeratorAlarmCluster.kt index 817abe4adb6e3a..27bc2db2abd73b 100644 --- a/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/RefrigeratorAlarmCluster.kt +++ b/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/RefrigeratorAlarmCluster.kt @@ -17,16 +17,16 @@ package matter.devicecontroller.cluster.clusters -import java.util.ArrayList +import matter.devicecontroller.cluster.structs.* class RefrigeratorAlarmCluster(private val endpointId: UShort) { - class GeneratedCommandListAttribute(val value: ArrayList) + class GeneratedCommandListAttribute(val value: List) - class AcceptedCommandListAttribute(val value: ArrayList) + class AcceptedCommandListAttribute(val value: List) - class EventListAttribute(val value: ArrayList) + class EventListAttribute(val value: List) - class AttributeListAttribute(val value: ArrayList) + class AttributeListAttribute(val value: List) suspend fun readMaskAttribute(): UInt { // Implementation needs to be added here diff --git a/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/RefrigeratorAndTemperatureControlledCabinetModeCluster.kt b/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/RefrigeratorAndTemperatureControlledCabinetModeCluster.kt index f36b82ceee2fb7..f12c08185449d8 100644 --- a/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/RefrigeratorAndTemperatureControlledCabinetModeCluster.kt +++ b/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/RefrigeratorAndTemperatureControlledCabinetModeCluster.kt @@ -17,27 +17,26 @@ package matter.devicecontroller.cluster.clusters -import java.util.ArrayList +import matter.devicecontroller.cluster.structs.* class RefrigeratorAndTemperatureControlledCabinetModeCluster(private val endpointId: UShort) { class ChangeToModeResponse(val status: UInt, val statusText: String?) class SupportedModesAttribute( - val value: - ArrayList + val value: List ) class StartUpModeAttribute(val value: UByte?) class OnModeAttribute(val value: UByte?) - class GeneratedCommandListAttribute(val value: ArrayList) + class GeneratedCommandListAttribute(val value: List) - class AcceptedCommandListAttribute(val value: ArrayList) + class AcceptedCommandListAttribute(val value: List) - class EventListAttribute(val value: ArrayList) + class EventListAttribute(val value: List) - class AttributeListAttribute(val value: ArrayList) + class AttributeListAttribute(val value: List) suspend fun changeToMode( newMode: UByte, diff --git a/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/RelativeHumidityMeasurementCluster.kt b/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/RelativeHumidityMeasurementCluster.kt index d33ab1e6c9a7a4..70e7a67dc8d5b2 100644 --- a/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/RelativeHumidityMeasurementCluster.kt +++ b/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/RelativeHumidityMeasurementCluster.kt @@ -17,7 +17,7 @@ package matter.devicecontroller.cluster.clusters -import java.util.ArrayList +import matter.devicecontroller.cluster.structs.* class RelativeHumidityMeasurementCluster(private val endpointId: UShort) { class MeasuredValueAttribute(val value: UShort?) @@ -26,13 +26,13 @@ class RelativeHumidityMeasurementCluster(private val endpointId: UShort) { class MaxMeasuredValueAttribute(val value: UShort?) - class GeneratedCommandListAttribute(val value: ArrayList) + class GeneratedCommandListAttribute(val value: List) - class AcceptedCommandListAttribute(val value: ArrayList) + class AcceptedCommandListAttribute(val value: List) - class EventListAttribute(val value: ArrayList) + class EventListAttribute(val value: List) - class AttributeListAttribute(val value: ArrayList) + class AttributeListAttribute(val value: List) suspend fun readMeasuredValueAttribute(): MeasuredValueAttribute { // Implementation needs to be added here diff --git a/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/RvcCleanModeCluster.kt b/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/RvcCleanModeCluster.kt index 3265616a9ed3dd..2dd95d452d32b6 100644 --- a/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/RvcCleanModeCluster.kt +++ b/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/RvcCleanModeCluster.kt @@ -17,24 +17,22 @@ package matter.devicecontroller.cluster.clusters -import java.util.ArrayList +import matter.devicecontroller.cluster.structs.* class RvcCleanModeCluster(private val endpointId: UShort) { class ChangeToModeResponse(val status: UInt, val statusText: String?) - class SupportedModesAttribute( - val value: ArrayList - ) + class SupportedModesAttribute(val value: List) class OnModeAttribute(val value: UByte?) - class GeneratedCommandListAttribute(val value: ArrayList) + class GeneratedCommandListAttribute(val value: List) - class AcceptedCommandListAttribute(val value: ArrayList) + class AcceptedCommandListAttribute(val value: List) - class EventListAttribute(val value: ArrayList) + class EventListAttribute(val value: List) - class AttributeListAttribute(val value: ArrayList) + class AttributeListAttribute(val value: List) suspend fun changeToMode( newMode: UByte, diff --git a/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/RvcOperationalStateCluster.kt b/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/RvcOperationalStateCluster.kt index 913d76d7375be9..bcb251b79059e3 100644 --- a/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/RvcOperationalStateCluster.kt +++ b/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/RvcOperationalStateCluster.kt @@ -17,34 +17,32 @@ package matter.devicecontroller.cluster.clusters -import java.util.ArrayList +import matter.devicecontroller.cluster.structs.* class RvcOperationalStateCluster(private val endpointId: UShort) { class OperationalCommandResponse( - val commandResponseState: ChipStructs.RvcOperationalStateClusterErrorStateStruct + val commandResponseState: RvcOperationalStateClusterErrorStateStruct ) - class PhaseListAttribute(val value: ArrayList?) + class PhaseListAttribute(val value: List?) class CurrentPhaseAttribute(val value: UByte?) class CountdownTimeAttribute(val value: UInt?) class OperationalStateListAttribute( - val value: ArrayList + val value: List ) - class OperationalErrorAttribute( - val value: ChipStructs.RvcOperationalStateClusterErrorStateStruct - ) + class OperationalErrorAttribute(val value: RvcOperationalStateClusterErrorStateStruct) - class GeneratedCommandListAttribute(val value: ArrayList) + class GeneratedCommandListAttribute(val value: List) - class AcceptedCommandListAttribute(val value: ArrayList) + class AcceptedCommandListAttribute(val value: List) - class EventListAttribute(val value: ArrayList) + class EventListAttribute(val value: List) - class AttributeListAttribute(val value: ArrayList) + class AttributeListAttribute(val value: List) suspend fun pause(timedInvokeTimeoutMs: Int? = null): OperationalCommandResponse { if (timedInvokeTimeoutMs != null) { diff --git a/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/RvcRunModeCluster.kt b/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/RvcRunModeCluster.kt index 045aab80dd57c2..3b41c31cd6de6f 100644 --- a/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/RvcRunModeCluster.kt +++ b/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/RvcRunModeCluster.kt @@ -17,24 +17,22 @@ package matter.devicecontroller.cluster.clusters -import java.util.ArrayList +import matter.devicecontroller.cluster.structs.* class RvcRunModeCluster(private val endpointId: UShort) { class ChangeToModeResponse(val status: UInt, val statusText: String?) - class SupportedModesAttribute( - val value: ArrayList - ) + class SupportedModesAttribute(val value: List) class OnModeAttribute(val value: UByte?) - class GeneratedCommandListAttribute(val value: ArrayList) + class GeneratedCommandListAttribute(val value: List) - class AcceptedCommandListAttribute(val value: ArrayList) + class AcceptedCommandListAttribute(val value: List) - class EventListAttribute(val value: ArrayList) + class EventListAttribute(val value: List) - class AttributeListAttribute(val value: ArrayList) + class AttributeListAttribute(val value: List) suspend fun changeToMode( newMode: UByte, diff --git a/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/SampleMeiCluster.kt b/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/SampleMeiCluster.kt index 3453b23490904b..fed4498e1ce04f 100644 --- a/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/SampleMeiCluster.kt +++ b/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/SampleMeiCluster.kt @@ -17,18 +17,18 @@ package matter.devicecontroller.cluster.clusters -import java.util.ArrayList +import matter.devicecontroller.cluster.structs.* class SampleMeiCluster(private val endpointId: UShort) { class AddArgumentsResponse(val returnValue: UByte) - class GeneratedCommandListAttribute(val value: ArrayList) + class GeneratedCommandListAttribute(val value: List) - class AcceptedCommandListAttribute(val value: ArrayList) + class AcceptedCommandListAttribute(val value: List) - class EventListAttribute(val value: ArrayList) + class EventListAttribute(val value: List) - class AttributeListAttribute(val value: ArrayList) + class AttributeListAttribute(val value: List) suspend fun ping(timedInvokeTimeoutMs: Int? = null) { if (timedInvokeTimeoutMs != null) { diff --git a/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/ScenesCluster.kt b/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/ScenesCluster.kt index 11d3113f504488..1aa49a8e0d17db 100644 --- a/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/ScenesCluster.kt +++ b/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/ScenesCluster.kt @@ -17,7 +17,7 @@ package matter.devicecontroller.cluster.clusters -import java.util.ArrayList +import matter.devicecontroller.cluster.structs.* class ScenesCluster(private val endpointId: UShort) { class AddSceneResponse(val status: UShort, val groupID: UShort, val sceneID: UByte) @@ -28,7 +28,7 @@ class ScenesCluster(private val endpointId: UShort) { val sceneID: UByte, val transitionTime: UShort?, val sceneName: String?, - val extensionFieldSets: ArrayList? + val extensionFieldSets: List? ) class RemoveSceneResponse(val status: UShort, val groupID: UShort, val sceneID: UByte) @@ -41,7 +41,7 @@ class ScenesCluster(private val endpointId: UShort) { val status: UShort, val capacity: UByte?, val groupID: UShort, - val sceneList: ArrayList? + val sceneList: List? ) class EnhancedAddSceneResponse(val status: UShort, val groupID: UShort, val sceneID: UByte) @@ -52,7 +52,7 @@ class ScenesCluster(private val endpointId: UShort) { val sceneID: UByte, val transitionTime: UShort?, val sceneName: String?, - val extensionFieldSets: ArrayList? + val extensionFieldSets: List? ) class CopySceneResponse( @@ -63,20 +63,20 @@ class ScenesCluster(private val endpointId: UShort) { class LastConfiguredByAttribute(val value: ULong?) - class GeneratedCommandListAttribute(val value: ArrayList) + class GeneratedCommandListAttribute(val value: List) - class AcceptedCommandListAttribute(val value: ArrayList) + class AcceptedCommandListAttribute(val value: List) - class EventListAttribute(val value: ArrayList) + class EventListAttribute(val value: List) - class AttributeListAttribute(val value: ArrayList) + class AttributeListAttribute(val value: List) suspend fun addScene( groupID: UShort, sceneID: UByte, transitionTime: UShort, sceneName: String, - extensionFieldSets: ArrayList, + extensionFieldSets: List, timedInvokeTimeoutMs: Int? = null ): AddSceneResponse { if (timedInvokeTimeoutMs != null) { @@ -162,7 +162,7 @@ class ScenesCluster(private val endpointId: UShort) { sceneID: UByte, transitionTime: UShort, sceneName: String, - extensionFieldSets: ArrayList, + extensionFieldSets: List, timedInvokeTimeoutMs: Int? = null ): EnhancedAddSceneResponse { if (timedInvokeTimeoutMs != null) { diff --git a/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/SmokeCoAlarmCluster.kt b/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/SmokeCoAlarmCluster.kt index 3b0e50ed0434ee..82210bdece4948 100644 --- a/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/SmokeCoAlarmCluster.kt +++ b/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/SmokeCoAlarmCluster.kt @@ -17,16 +17,16 @@ package matter.devicecontroller.cluster.clusters -import java.util.ArrayList +import matter.devicecontroller.cluster.structs.* class SmokeCoAlarmCluster(private val endpointId: UShort) { - class GeneratedCommandListAttribute(val value: ArrayList) + class GeneratedCommandListAttribute(val value: List) - class AcceptedCommandListAttribute(val value: ArrayList) + class AcceptedCommandListAttribute(val value: List) - class EventListAttribute(val value: ArrayList) + class EventListAttribute(val value: List) - class AttributeListAttribute(val value: ArrayList) + class AttributeListAttribute(val value: List) suspend fun selfTestRequest(timedInvokeTimeoutMs: Int? = null) { if (timedInvokeTimeoutMs != null) { diff --git a/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/SoftwareDiagnosticsCluster.kt b/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/SoftwareDiagnosticsCluster.kt index 7188448084f1db..83fa67cbdf9cfc 100644 --- a/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/SoftwareDiagnosticsCluster.kt +++ b/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/SoftwareDiagnosticsCluster.kt @@ -17,20 +17,18 @@ package matter.devicecontroller.cluster.clusters -import java.util.ArrayList +import matter.devicecontroller.cluster.structs.* class SoftwareDiagnosticsCluster(private val endpointId: UShort) { - class ThreadMetricsAttribute( - val value: ArrayList? - ) + class ThreadMetricsAttribute(val value: List?) - class GeneratedCommandListAttribute(val value: ArrayList) + class GeneratedCommandListAttribute(val value: List) - class AcceptedCommandListAttribute(val value: ArrayList) + class AcceptedCommandListAttribute(val value: List) - class EventListAttribute(val value: ArrayList) + class EventListAttribute(val value: List) - class AttributeListAttribute(val value: ArrayList) + class AttributeListAttribute(val value: List) suspend fun resetWatermarks(timedInvokeTimeoutMs: Int? = null) { if (timedInvokeTimeoutMs != null) { diff --git a/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/SwitchCluster.kt b/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/SwitchCluster.kt index a7d2a5eaac0e94..fb6375fbfe43d1 100644 --- a/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/SwitchCluster.kt +++ b/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/SwitchCluster.kt @@ -17,16 +17,16 @@ package matter.devicecontroller.cluster.clusters -import java.util.ArrayList +import matter.devicecontroller.cluster.structs.* class SwitchCluster(private val endpointId: UShort) { - class GeneratedCommandListAttribute(val value: ArrayList) + class GeneratedCommandListAttribute(val value: List) - class AcceptedCommandListAttribute(val value: ArrayList) + class AcceptedCommandListAttribute(val value: List) - class EventListAttribute(val value: ArrayList) + class EventListAttribute(val value: List) - class AttributeListAttribute(val value: ArrayList) + class AttributeListAttribute(val value: List) suspend fun readNumberOfPositionsAttribute(): UByte { // Implementation needs to be added here diff --git a/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/TargetNavigatorCluster.kt b/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/TargetNavigatorCluster.kt index 1f74204e4b7ee1..96f1449c769d6b 100644 --- a/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/TargetNavigatorCluster.kt +++ b/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/TargetNavigatorCluster.kt @@ -17,22 +17,20 @@ package matter.devicecontroller.cluster.clusters -import java.util.ArrayList +import matter.devicecontroller.cluster.structs.* class TargetNavigatorCluster(private val endpointId: UShort) { class NavigateTargetResponse(val status: UInt, val data: String?) - class TargetListAttribute( - val value: ArrayList - ) + class TargetListAttribute(val value: List) - class GeneratedCommandListAttribute(val value: ArrayList) + class GeneratedCommandListAttribute(val value: List) - class AcceptedCommandListAttribute(val value: ArrayList) + class AcceptedCommandListAttribute(val value: List) - class EventListAttribute(val value: ArrayList) + class EventListAttribute(val value: List) - class AttributeListAttribute(val value: ArrayList) + class AttributeListAttribute(val value: List) suspend fun navigateTarget( target: UByte, diff --git a/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/TemperatureControlCluster.kt b/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/TemperatureControlCluster.kt index eeb0afbba7a049..f147238c326ecf 100644 --- a/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/TemperatureControlCluster.kt +++ b/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/TemperatureControlCluster.kt @@ -17,18 +17,18 @@ package matter.devicecontroller.cluster.clusters -import java.util.ArrayList +import matter.devicecontroller.cluster.structs.* class TemperatureControlCluster(private val endpointId: UShort) { - class SupportedTemperatureLevelsAttribute(val value: ArrayList?) + class SupportedTemperatureLevelsAttribute(val value: List?) - class GeneratedCommandListAttribute(val value: ArrayList) + class GeneratedCommandListAttribute(val value: List) - class AcceptedCommandListAttribute(val value: ArrayList) + class AcceptedCommandListAttribute(val value: List) - class EventListAttribute(val value: ArrayList) + class EventListAttribute(val value: List) - class AttributeListAttribute(val value: ArrayList) + class AttributeListAttribute(val value: List) suspend fun setTemperature( targetTemperature: Short?, diff --git a/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/TemperatureMeasurementCluster.kt b/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/TemperatureMeasurementCluster.kt index e7e758d9d92a39..f5391045e24a44 100644 --- a/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/TemperatureMeasurementCluster.kt +++ b/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/TemperatureMeasurementCluster.kt @@ -17,7 +17,7 @@ package matter.devicecontroller.cluster.clusters -import java.util.ArrayList +import matter.devicecontroller.cluster.structs.* class TemperatureMeasurementCluster(private val endpointId: UShort) { class MeasuredValueAttribute(val value: Short?) @@ -26,13 +26,13 @@ class TemperatureMeasurementCluster(private val endpointId: UShort) { class MaxMeasuredValueAttribute(val value: Short?) - class GeneratedCommandListAttribute(val value: ArrayList) + class GeneratedCommandListAttribute(val value: List) - class AcceptedCommandListAttribute(val value: ArrayList) + class AcceptedCommandListAttribute(val value: List) - class EventListAttribute(val value: ArrayList) + class EventListAttribute(val value: List) - class AttributeListAttribute(val value: ArrayList) + class AttributeListAttribute(val value: List) suspend fun readMeasuredValueAttribute(): MeasuredValueAttribute { // Implementation needs to be added here diff --git a/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/ThermostatCluster.kt b/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/ThermostatCluster.kt index 857a84b6ff9430..a5a41b0fd5ee3f 100644 --- a/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/ThermostatCluster.kt +++ b/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/ThermostatCluster.kt @@ -17,14 +17,14 @@ package matter.devicecontroller.cluster.clusters -import java.util.ArrayList +import matter.devicecontroller.cluster.structs.* class ThermostatCluster(private val endpointId: UShort) { class GetWeeklyScheduleResponse( val numberOfTransitionsForSequence: UByte, val dayOfWeekForSequence: UInt, val modeForSequence: UInt, - val transitions: ArrayList + val transitions: List ) class LocalTemperatureAttribute(val value: Short?) @@ -49,13 +49,13 @@ class ThermostatCluster(private val endpointId: UShort) { class ACCoilTemperatureAttribute(val value: Short?) - class GeneratedCommandListAttribute(val value: ArrayList) + class GeneratedCommandListAttribute(val value: List) - class AcceptedCommandListAttribute(val value: ArrayList) + class AcceptedCommandListAttribute(val value: List) - class EventListAttribute(val value: ArrayList) + class EventListAttribute(val value: List) - class AttributeListAttribute(val value: ArrayList) + class AttributeListAttribute(val value: List) suspend fun setpointRaiseLower(mode: UInt, amount: Byte, timedInvokeTimeoutMs: Int? = null) { if (timedInvokeTimeoutMs != null) { @@ -69,7 +69,7 @@ class ThermostatCluster(private val endpointId: UShort) { numberOfTransitionsForSequence: UByte, dayOfWeekForSequence: UInt, modeForSequence: UInt, - transitions: ArrayList, + transitions: List, timedInvokeTimeoutMs: Int? = null ) { if (timedInvokeTimeoutMs != null) { diff --git a/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/ThermostatUserInterfaceConfigurationCluster.kt b/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/ThermostatUserInterfaceConfigurationCluster.kt index 78192bd598e59a..32ddcfc751bc5d 100644 --- a/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/ThermostatUserInterfaceConfigurationCluster.kt +++ b/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/ThermostatUserInterfaceConfigurationCluster.kt @@ -17,16 +17,16 @@ package matter.devicecontroller.cluster.clusters -import java.util.ArrayList +import matter.devicecontroller.cluster.structs.* class ThermostatUserInterfaceConfigurationCluster(private val endpointId: UShort) { - class GeneratedCommandListAttribute(val value: ArrayList) + class GeneratedCommandListAttribute(val value: List) - class AcceptedCommandListAttribute(val value: ArrayList) + class AcceptedCommandListAttribute(val value: List) - class EventListAttribute(val value: ArrayList) + class EventListAttribute(val value: List) - class AttributeListAttribute(val value: ArrayList) + class AttributeListAttribute(val value: List) suspend fun readTemperatureDisplayModeAttribute(): UByte { // Implementation needs to be added here diff --git a/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/ThreadNetworkDiagnosticsCluster.kt b/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/ThreadNetworkDiagnosticsCluster.kt index bf26e9cf3dc874..52f9a40c6b7d5f 100644 --- a/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/ThreadNetworkDiagnosticsCluster.kt +++ b/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/ThreadNetworkDiagnosticsCluster.kt @@ -17,7 +17,7 @@ package matter.devicecontroller.cluster.clusters -import java.util.ArrayList +import matter.devicecontroller.cluster.structs.* class ThreadNetworkDiagnosticsCluster(private val endpointId: UShort) { class ChannelAttribute(val value: UShort?) @@ -32,13 +32,9 @@ class ThreadNetworkDiagnosticsCluster(private val endpointId: UShort) { class MeshLocalPrefixAttribute(val value: ByteArray?) - class NeighborTableAttribute( - val value: ArrayList - ) + class NeighborTableAttribute(val value: List) - class RouteTableAttribute( - val value: ArrayList - ) + class RouteTableAttribute(val value: List) class PartitionIdAttribute(val value: UInt?) @@ -56,25 +52,23 @@ class ThreadNetworkDiagnosticsCluster(private val endpointId: UShort) { class DelayAttribute(val value: UInt?) - class SecurityPolicyAttribute( - val value: ChipStructs.ThreadNetworkDiagnosticsClusterSecurityPolicy? - ) + class SecurityPolicyAttribute(val value: ThreadNetworkDiagnosticsClusterSecurityPolicy?) class ChannelPage0MaskAttribute(val value: ByteArray?) class OperationalDatasetComponentsAttribute( - val value: ChipStructs.ThreadNetworkDiagnosticsClusterOperationalDatasetComponents? + val value: ThreadNetworkDiagnosticsClusterOperationalDatasetComponents? ) - class ActiveNetworkFaultsListAttribute(val value: ArrayList) + class ActiveNetworkFaultsListAttribute(val value: List) - class GeneratedCommandListAttribute(val value: ArrayList) + class GeneratedCommandListAttribute(val value: List) - class AcceptedCommandListAttribute(val value: ArrayList) + class AcceptedCommandListAttribute(val value: List) - class EventListAttribute(val value: ArrayList) + class EventListAttribute(val value: List) - class AttributeListAttribute(val value: ArrayList) + class AttributeListAttribute(val value: List) suspend fun resetCounts(timedInvokeTimeoutMs: Int? = null) { if (timedInvokeTimeoutMs != null) { diff --git a/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/TimeFormatLocalizationCluster.kt b/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/TimeFormatLocalizationCluster.kt index 593223c563e697..aae8d98e4562e4 100644 --- a/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/TimeFormatLocalizationCluster.kt +++ b/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/TimeFormatLocalizationCluster.kt @@ -17,18 +17,18 @@ package matter.devicecontroller.cluster.clusters -import java.util.ArrayList +import matter.devicecontroller.cluster.structs.* class TimeFormatLocalizationCluster(private val endpointId: UShort) { - class SupportedCalendarTypesAttribute(val value: ArrayList?) + class SupportedCalendarTypesAttribute(val value: List?) - class GeneratedCommandListAttribute(val value: ArrayList) + class GeneratedCommandListAttribute(val value: List) - class AcceptedCommandListAttribute(val value: ArrayList) + class AcceptedCommandListAttribute(val value: List) - class EventListAttribute(val value: ArrayList) + class EventListAttribute(val value: List) - class AttributeListAttribute(val value: ArrayList) + class AttributeListAttribute(val value: List) suspend fun readHourFormatAttribute(): UByte { // Implementation needs to be added here diff --git a/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/TimeSynchronizationCluster.kt b/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/TimeSynchronizationCluster.kt index 478d89838c3120..8ccc02f6ec89c4 100644 --- a/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/TimeSynchronizationCluster.kt +++ b/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/TimeSynchronizationCluster.kt @@ -17,36 +17,30 @@ package matter.devicecontroller.cluster.clusters -import java.util.ArrayList +import matter.devicecontroller.cluster.structs.* class TimeSynchronizationCluster(private val endpointId: UShort) { class SetTimeZoneResponse(val DSTOffsetRequired: Boolean) class UTCTimeAttribute(val value: ULong?) - class TrustedTimeSourceAttribute( - val value: ChipStructs.TimeSynchronizationClusterTrustedTimeSourceStruct? - ) + class TrustedTimeSourceAttribute(val value: TimeSynchronizationClusterTrustedTimeSourceStruct?) class DefaultNTPAttribute(val value: String?) - class TimeZoneAttribute( - val value: ArrayList? - ) + class TimeZoneAttribute(val value: List?) - class DSTOffsetAttribute( - val value: ArrayList? - ) + class DSTOffsetAttribute(val value: List?) class LocalTimeAttribute(val value: ULong?) - class GeneratedCommandListAttribute(val value: ArrayList) + class GeneratedCommandListAttribute(val value: List) - class AcceptedCommandListAttribute(val value: ArrayList) + class AcceptedCommandListAttribute(val value: List) - class EventListAttribute(val value: ArrayList) + class EventListAttribute(val value: List) - class AttributeListAttribute(val value: ArrayList) + class AttributeListAttribute(val value: List) suspend fun setUTCTime( UTCTime: ULong, @@ -62,7 +56,7 @@ class TimeSynchronizationCluster(private val endpointId: UShort) { } suspend fun setTrustedTimeSource( - trustedTimeSource: ChipStructs.TimeSynchronizationClusterFabricScopedTrustedTimeSourceStruct?, + trustedTimeSource: TimeSynchronizationClusterFabricScopedTrustedTimeSourceStruct?, timedInvokeTimeoutMs: Int? = null ) { if (timedInvokeTimeoutMs != null) { @@ -73,7 +67,7 @@ class TimeSynchronizationCluster(private val endpointId: UShort) { } suspend fun setTimeZone( - timeZone: ArrayList, + timeZone: List, timedInvokeTimeoutMs: Int? = null ): SetTimeZoneResponse { if (timedInvokeTimeoutMs != null) { @@ -84,7 +78,7 @@ class TimeSynchronizationCluster(private val endpointId: UShort) { } suspend fun setDSTOffset( - DSTOffset: ArrayList, + DSTOffset: List, timedInvokeTimeoutMs: Int? = null ) { if (timedInvokeTimeoutMs != null) { diff --git a/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/TotalVolatileOrganicCompoundsConcentrationMeasurementCluster.kt b/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/TotalVolatileOrganicCompoundsConcentrationMeasurementCluster.kt index 948d6a51054a07..1ddf7e505d0dd3 100644 --- a/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/TotalVolatileOrganicCompoundsConcentrationMeasurementCluster.kt +++ b/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/TotalVolatileOrganicCompoundsConcentrationMeasurementCluster.kt @@ -17,7 +17,7 @@ package matter.devicecontroller.cluster.clusters -import java.util.ArrayList +import matter.devicecontroller.cluster.structs.* class TotalVolatileOrganicCompoundsConcentrationMeasurementCluster(private val endpointId: UShort) { class MeasuredValueAttribute(val value: Float?) @@ -30,13 +30,13 @@ class TotalVolatileOrganicCompoundsConcentrationMeasurementCluster(private val e class AverageMeasuredValueAttribute(val value: Float?) - class GeneratedCommandListAttribute(val value: ArrayList) + class GeneratedCommandListAttribute(val value: List) - class AcceptedCommandListAttribute(val value: ArrayList) + class AcceptedCommandListAttribute(val value: List) - class EventListAttribute(val value: ArrayList) + class EventListAttribute(val value: List) - class AttributeListAttribute(val value: ArrayList) + class AttributeListAttribute(val value: List) suspend fun readMeasuredValueAttribute(): MeasuredValueAttribute { // Implementation needs to be added here diff --git a/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/UnitLocalizationCluster.kt b/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/UnitLocalizationCluster.kt index 515723d09d1391..e74f901c5abb8d 100644 --- a/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/UnitLocalizationCluster.kt +++ b/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/UnitLocalizationCluster.kt @@ -17,16 +17,16 @@ package matter.devicecontroller.cluster.clusters -import java.util.ArrayList +import matter.devicecontroller.cluster.structs.* class UnitLocalizationCluster(private val endpointId: UShort) { - class GeneratedCommandListAttribute(val value: ArrayList) + class GeneratedCommandListAttribute(val value: List) - class AcceptedCommandListAttribute(val value: ArrayList) + class AcceptedCommandListAttribute(val value: List) - class EventListAttribute(val value: ArrayList) + class EventListAttribute(val value: List) - class AttributeListAttribute(val value: ArrayList) + class AttributeListAttribute(val value: List) suspend fun readTemperatureUnitAttribute(): UByte { // Implementation needs to be added here diff --git a/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/UnitTestingCluster.kt b/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/UnitTestingCluster.kt index c66214714089f9..28637a7afd94b3 100644 --- a/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/UnitTestingCluster.kt +++ b/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/UnitTestingCluster.kt @@ -17,7 +17,7 @@ package matter.devicecontroller.cluster.clusters -import java.util.ArrayList +import matter.devicecontroller.cluster.structs.* class UnitTestingCluster(private val endpointId: UShort) { class TestSpecificResponse(val returnValue: UByte) @@ -27,17 +27,17 @@ class UnitTestingCluster(private val endpointId: UShort) { class TestSimpleArgumentResponse(val returnValue: Boolean) class TestStructArrayArgumentResponse( - val arg1: ArrayList, - val arg2: ArrayList, - val arg3: ArrayList, - val arg4: ArrayList, + val arg1: List, + val arg2: List, + val arg3: List, + val arg4: List, val arg5: UInt, val arg6: Boolean ) class BooleanResponse(val value: Boolean) - class TestListInt8UReverseResponse(val arg1: ArrayList) + class TestListInt8UReverseResponse(val arg1: List) class TestEnumsResponse(val arg1: UShort, val arg2: UInt) @@ -64,46 +64,42 @@ class UnitTestingCluster(private val endpointId: UShort) { val nullableOptionalStringWasNull: Boolean?, val nullableOptionalStringValue: String?, val nullableStructWasNull: Boolean, - val nullableStructValue: ChipStructs.UnitTestingClusterSimpleStruct?, + val nullableStructValue: UnitTestingClusterSimpleStruct?, val optionalStructWasPresent: Boolean, - val optionalStructValue: ChipStructs.UnitTestingClusterSimpleStruct?, + val optionalStructValue: UnitTestingClusterSimpleStruct?, val nullableOptionalStructWasPresent: Boolean, val nullableOptionalStructWasNull: Boolean?, - val nullableOptionalStructValue: ChipStructs.UnitTestingClusterSimpleStruct?, + val nullableOptionalStructValue: UnitTestingClusterSimpleStruct?, val nullableListWasNull: Boolean, - val nullableListValue: ArrayList?, + val nullableListValue: List?, val optionalListWasPresent: Boolean, - val optionalListValue: ArrayList?, + val optionalListValue: List?, val nullableOptionalListWasPresent: Boolean, val nullableOptionalListWasNull: Boolean?, - val nullableOptionalListValue: ArrayList? + val nullableOptionalListValue: List? ) - class SimpleStructResponse(val arg1: ChipStructs.UnitTestingClusterSimpleStruct) + class SimpleStructResponse(val arg1: UnitTestingClusterSimpleStruct) class TestEmitTestEventResponse(val value: ULong) class TestEmitTestFabricScopedEventResponse(val value: ULong) - class ListInt8uAttribute(val value: ArrayList) + class ListInt8uAttribute(val value: List) - class ListOctetStringAttribute(val value: ArrayList) + class ListOctetStringAttribute(val value: List) - class ListStructOctetStringAttribute( - val value: ArrayList - ) + class ListStructOctetStringAttribute(val value: List) class ListNullablesAndOptionalsStructAttribute( - val value: ArrayList + val value: List ) - class StructAttrAttribute(val value: ChipStructs.UnitTestingClusterSimpleStruct) + class StructAttrAttribute(val value: UnitTestingClusterSimpleStruct) - class ListLongOctetStringAttribute(val value: ArrayList) + class ListLongOctetStringAttribute(val value: List) - class ListFabricScopedAttribute( - val value: ArrayList - ) + class ListFabricScopedAttribute(val value: List) class NullableBooleanAttribute(val value: Boolean?) @@ -161,7 +157,7 @@ class UnitTestingCluster(private val endpointId: UShort) { class NullableEnumAttrAttribute(val value: UInt?) - class NullableStructAttribute(val value: ChipStructs.UnitTestingClusterSimpleStruct?) + class NullableStructAttribute(val value: UnitTestingClusterSimpleStruct?) class NullableRangeRestrictedInt8uAttribute(val value: UByte?) @@ -171,13 +167,13 @@ class UnitTestingCluster(private val endpointId: UShort) { class NullableRangeRestrictedInt16sAttribute(val value: Short?) - class GeneratedCommandListAttribute(val value: ArrayList) + class GeneratedCommandListAttribute(val value: List) - class AcceptedCommandListAttribute(val value: ArrayList) + class AcceptedCommandListAttribute(val value: List) - class EventListAttribute(val value: ArrayList) + class EventListAttribute(val value: List) - class AttributeListAttribute(val value: ArrayList) + class AttributeListAttribute(val value: List) suspend fun test(timedInvokeTimeoutMs: Int? = null) { if (timedInvokeTimeoutMs != null) { @@ -235,10 +231,10 @@ class UnitTestingCluster(private val endpointId: UShort) { } suspend fun testStructArrayArgumentRequest( - arg1: ArrayList, - arg2: ArrayList, - arg3: ArrayList, - arg4: ArrayList, + arg1: List, + arg2: List, + arg3: List, + arg4: List, arg5: UInt, arg6: Boolean, timedInvokeTimeoutMs: Int? = null @@ -251,7 +247,7 @@ class UnitTestingCluster(private val endpointId: UShort) { } suspend fun testStructArgumentRequest( - arg1: ChipStructs.UnitTestingClusterSimpleStruct, + arg1: UnitTestingClusterSimpleStruct, timedInvokeTimeoutMs: Int? = null ): BooleanResponse { if (timedInvokeTimeoutMs != null) { @@ -262,7 +258,7 @@ class UnitTestingCluster(private val endpointId: UShort) { } suspend fun testNestedStructArgumentRequest( - arg1: ChipStructs.UnitTestingClusterNestedStruct, + arg1: UnitTestingClusterNestedStruct, timedInvokeTimeoutMs: Int? = null ): BooleanResponse { if (timedInvokeTimeoutMs != null) { @@ -273,7 +269,7 @@ class UnitTestingCluster(private val endpointId: UShort) { } suspend fun testListStructArgumentRequest( - arg1: ArrayList, + arg1: List, timedInvokeTimeoutMs: Int? = null ): BooleanResponse { if (timedInvokeTimeoutMs != null) { @@ -284,7 +280,7 @@ class UnitTestingCluster(private val endpointId: UShort) { } suspend fun testListInt8UArgumentRequest( - arg1: ArrayList, + arg1: List, timedInvokeTimeoutMs: Int? = null ): BooleanResponse { if (timedInvokeTimeoutMs != null) { @@ -295,7 +291,7 @@ class UnitTestingCluster(private val endpointId: UShort) { } suspend fun testNestedStructListArgumentRequest( - arg1: ChipStructs.UnitTestingClusterNestedStructList, + arg1: UnitTestingClusterNestedStructList, timedInvokeTimeoutMs: Int? = null ): BooleanResponse { if (timedInvokeTimeoutMs != null) { @@ -306,7 +302,7 @@ class UnitTestingCluster(private val endpointId: UShort) { } suspend fun testListNestedStructListArgumentRequest( - arg1: ArrayList, + arg1: List, timedInvokeTimeoutMs: Int? = null ): BooleanResponse { if (timedInvokeTimeoutMs != null) { @@ -317,7 +313,7 @@ class UnitTestingCluster(private val endpointId: UShort) { } suspend fun testListInt8UReverseRequest( - arg1: ArrayList, + arg1: List, timedInvokeTimeoutMs: Int? = null ): TestListInt8UReverseResponse { if (timedInvokeTimeoutMs != null) { @@ -357,12 +353,12 @@ class UnitTestingCluster(private val endpointId: UShort) { nullableString: String?, optionalString: String?, nullableOptionalString: String?, - nullableStruct: ChipStructs.UnitTestingClusterSimpleStruct?, - optionalStruct: ChipStructs.UnitTestingClusterSimpleStruct?, - nullableOptionalStruct: ChipStructs.UnitTestingClusterSimpleStruct?, - nullableList: ArrayList?, - optionalList: ArrayList?, - nullableOptionalList: ArrayList?, + nullableStruct: UnitTestingClusterSimpleStruct?, + optionalStruct: UnitTestingClusterSimpleStruct?, + nullableOptionalStruct: UnitTestingClusterSimpleStruct?, + nullableList: List?, + optionalList: List?, + nullableOptionalList: List?, timedInvokeTimeoutMs: Int? = null ): TestComplexNullableOptionalResponse { if (timedInvokeTimeoutMs != null) { @@ -373,7 +369,7 @@ class UnitTestingCluster(private val endpointId: UShort) { } suspend fun simpleStructEchoRequest( - arg1: ChipStructs.UnitTestingClusterSimpleStruct, + arg1: UnitTestingClusterSimpleStruct, timedInvokeTimeoutMs: Int? = null ): SimpleStructResponse { if (timedInvokeTimeoutMs != null) { @@ -843,11 +839,11 @@ class UnitTestingCluster(private val endpointId: UShort) { // Implementation needs to be added here } - suspend fun writeListInt8uAttribute(value: ArrayList) { + suspend fun writeListInt8uAttribute(value: List) { // Implementation needs to be added here } - suspend fun writeListInt8uAttribute(value: ArrayList, timedWriteTimeoutMs: Int) { + suspend fun writeListInt8uAttribute(value: List, timedWriteTimeoutMs: Int) { // Implementation needs to be added here } @@ -859,11 +855,11 @@ class UnitTestingCluster(private val endpointId: UShort) { // Implementation needs to be added here } - suspend fun writeListOctetStringAttribute(value: ArrayList) { + suspend fun writeListOctetStringAttribute(value: List) { // Implementation needs to be added here } - suspend fun writeListOctetStringAttribute(value: ArrayList, timedWriteTimeoutMs: Int) { + suspend fun writeListOctetStringAttribute(value: List, timedWriteTimeoutMs: Int) { // Implementation needs to be added here } @@ -879,13 +875,13 @@ class UnitTestingCluster(private val endpointId: UShort) { } suspend fun writeListStructOctetStringAttribute( - value: ArrayList + value: List ) { // Implementation needs to be added here } suspend fun writeListStructOctetStringAttribute( - value: ArrayList, + value: List, timedWriteTimeoutMs: Int ) { // Implementation needs to be added here @@ -1000,13 +996,13 @@ class UnitTestingCluster(private val endpointId: UShort) { } suspend fun writeListNullablesAndOptionalsStructAttribute( - value: ArrayList + value: List ) { // Implementation needs to be added here } suspend fun writeListNullablesAndOptionalsStructAttribute( - value: ArrayList, + value: List, timedWriteTimeoutMs: Int ) { // Implementation needs to be added here @@ -1039,12 +1035,12 @@ class UnitTestingCluster(private val endpointId: UShort) { // Implementation needs to be added here } - suspend fun writeStructAttrAttribute(value: ChipStructs.UnitTestingClusterSimpleStruct) { + suspend fun writeStructAttrAttribute(value: UnitTestingClusterSimpleStruct) { // Implementation needs to be added here } suspend fun writeStructAttrAttribute( - value: ChipStructs.UnitTestingClusterSimpleStruct, + value: UnitTestingClusterSimpleStruct, timedWriteTimeoutMs: Int ) { // Implementation needs to be added here @@ -1125,14 +1121,11 @@ class UnitTestingCluster(private val endpointId: UShort) { // Implementation needs to be added here } - suspend fun writeListLongOctetStringAttribute(value: ArrayList) { + suspend fun writeListLongOctetStringAttribute(value: List) { // Implementation needs to be added here } - suspend fun writeListLongOctetStringAttribute( - value: ArrayList, - timedWriteTimeoutMs: Int - ) { + suspend fun writeListLongOctetStringAttribute(value: List, timedWriteTimeoutMs: Int) { // Implementation needs to be added here } @@ -1153,14 +1146,12 @@ class UnitTestingCluster(private val endpointId: UShort) { // Implementation needs to be added here } - suspend fun writeListFabricScopedAttribute( - value: ArrayList - ) { + suspend fun writeListFabricScopedAttribute(value: List) { // Implementation needs to be added here } suspend fun writeListFabricScopedAttribute( - value: ArrayList, + value: List, timedWriteTimeoutMs: Int ) { // Implementation needs to be added here @@ -1769,12 +1760,12 @@ class UnitTestingCluster(private val endpointId: UShort) { // Implementation needs to be added here } - suspend fun writeNullableStructAttribute(value: ChipStructs.UnitTestingClusterSimpleStruct) { + suspend fun writeNullableStructAttribute(value: UnitTestingClusterSimpleStruct) { // Implementation needs to be added here } suspend fun writeNullableStructAttribute( - value: ChipStructs.UnitTestingClusterSimpleStruct, + value: UnitTestingClusterSimpleStruct, timedWriteTimeoutMs: Int ) { // Implementation needs to be added here diff --git a/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/UserLabelCluster.kt b/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/UserLabelCluster.kt index e15bdfef926b4f..59432cfb5d451c 100644 --- a/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/UserLabelCluster.kt +++ b/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/UserLabelCluster.kt @@ -17,29 +17,29 @@ package matter.devicecontroller.cluster.clusters -import java.util.ArrayList +import matter.devicecontroller.cluster.structs.* class UserLabelCluster(private val endpointId: UShort) { - class LabelListAttribute(val value: ArrayList) + class LabelListAttribute(val value: List) - class GeneratedCommandListAttribute(val value: ArrayList) + class GeneratedCommandListAttribute(val value: List) - class AcceptedCommandListAttribute(val value: ArrayList) + class AcceptedCommandListAttribute(val value: List) - class EventListAttribute(val value: ArrayList) + class EventListAttribute(val value: List) - class AttributeListAttribute(val value: ArrayList) + class AttributeListAttribute(val value: List) suspend fun readLabelListAttribute(): LabelListAttribute { // Implementation needs to be added here } - suspend fun writeLabelListAttribute(value: ArrayList) { + suspend fun writeLabelListAttribute(value: List) { // Implementation needs to be added here } suspend fun writeLabelListAttribute( - value: ArrayList, + value: List, timedWriteTimeoutMs: Int ) { // Implementation needs to be added here diff --git a/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/WakeOnLanCluster.kt b/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/WakeOnLanCluster.kt index 7cd24e24c08de1..ad741ab4369df4 100644 --- a/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/WakeOnLanCluster.kt +++ b/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/WakeOnLanCluster.kt @@ -17,16 +17,16 @@ package matter.devicecontroller.cluster.clusters -import java.util.ArrayList +import matter.devicecontroller.cluster.structs.* class WakeOnLanCluster(private val endpointId: UShort) { - class GeneratedCommandListAttribute(val value: ArrayList) + class GeneratedCommandListAttribute(val value: List) - class AcceptedCommandListAttribute(val value: ArrayList) + class AcceptedCommandListAttribute(val value: List) - class EventListAttribute(val value: ArrayList) + class EventListAttribute(val value: List) - class AttributeListAttribute(val value: ArrayList) + class AttributeListAttribute(val value: List) suspend fun readMACAddressAttribute(): CharString { // Implementation needs to be added here diff --git a/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/WiFiNetworkDiagnosticsCluster.kt b/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/WiFiNetworkDiagnosticsCluster.kt index fa61490a6f8145..60013c5f0ae780 100644 --- a/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/WiFiNetworkDiagnosticsCluster.kt +++ b/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/WiFiNetworkDiagnosticsCluster.kt @@ -17,7 +17,7 @@ package matter.devicecontroller.cluster.clusters -import java.util.ArrayList +import matter.devicecontroller.cluster.structs.* class WiFiNetworkDiagnosticsCluster(private val endpointId: UShort) { class BssidAttribute(val value: ByteArray?) @@ -46,13 +46,13 @@ class WiFiNetworkDiagnosticsCluster(private val endpointId: UShort) { class OverrunCountAttribute(val value: ULong?) - class GeneratedCommandListAttribute(val value: ArrayList) + class GeneratedCommandListAttribute(val value: List) - class AcceptedCommandListAttribute(val value: ArrayList) + class AcceptedCommandListAttribute(val value: List) - class EventListAttribute(val value: ArrayList) + class EventListAttribute(val value: List) - class AttributeListAttribute(val value: ArrayList) + class AttributeListAttribute(val value: List) suspend fun resetCounts(timedInvokeTimeoutMs: Int? = null) { if (timedInvokeTimeoutMs != null) { diff --git a/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/WindowCoveringCluster.kt b/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/WindowCoveringCluster.kt index d8a5453d7ff335..46163d759a0413 100644 --- a/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/WindowCoveringCluster.kt +++ b/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/WindowCoveringCluster.kt @@ -17,7 +17,7 @@ package matter.devicecontroller.cluster.clusters -import java.util.ArrayList +import matter.devicecontroller.cluster.structs.* class WindowCoveringCluster(private val endpointId: UShort) { class CurrentPositionLiftAttribute(val value: UShort?) @@ -36,13 +36,13 @@ class WindowCoveringCluster(private val endpointId: UShort) { class CurrentPositionTiltPercent100thsAttribute(val value: UShort?) - class GeneratedCommandListAttribute(val value: ArrayList) + class GeneratedCommandListAttribute(val value: List) - class AcceptedCommandListAttribute(val value: ArrayList) + class AcceptedCommandListAttribute(val value: List) - class EventListAttribute(val value: ArrayList) + class EventListAttribute(val value: List) - class AttributeListAttribute(val value: ArrayList) + class AttributeListAttribute(val value: List) suspend fun upOrOpen(timedInvokeTimeoutMs: Int? = null) { if (timedInvokeTimeoutMs != null) { diff --git a/src/controller/java/generated/java/matter/devicecontroller/cluster/eventstructs/AccessControlClusterAccessControlEntryChangedEvent.kt b/src/controller/java/generated/java/matter/devicecontroller/cluster/eventstructs/AccessControlClusterAccessControlEntryChangedEvent.kt new file mode 100644 index 00000000000000..50ec0a54a8ec73 --- /dev/null +++ b/src/controller/java/generated/java/matter/devicecontroller/cluster/eventstructs/AccessControlClusterAccessControlEntryChangedEvent.kt @@ -0,0 +1,115 @@ +/* + * + * Copyright (c) 2023 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package matter.devicecontroller.cluster.eventstructs + +import matter.devicecontroller.cluster.* +import matter.tlv.ContextSpecificTag +import matter.tlv.Tag +import matter.tlv.TlvReader +import matter.tlv.TlvWriter + +class AccessControlClusterAccessControlEntryChangedEvent( + val adminNodeID: ULong?, + val adminPasscodeID: UShort?, + val changeType: UInt, + val latestValue: + matter.devicecontroller.cluster.structs.AccessControlClusterAccessControlEntryStruct?, + val fabricIndex: UByte +) { + override fun toString(): String = buildString { + append("AccessControlClusterAccessControlEntryChangedEvent {\n") + append("\tadminNodeID : $adminNodeID\n") + append("\tadminPasscodeID : $adminPasscodeID\n") + append("\tchangeType : $changeType\n") + append("\tlatestValue : $latestValue\n") + append("\tfabricIndex : $fabricIndex\n") + append("}\n") + } + + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tlvTag) + if (adminNodeID != null) { + put(ContextSpecificTag(TAG_ADMIN_NODE_I_D), adminNodeID) + } else { + putNull(ContextSpecificTag(TAG_ADMIN_NODE_I_D)) + } + if (adminPasscodeID != null) { + put(ContextSpecificTag(TAG_ADMIN_PASSCODE_I_D), adminPasscodeID) + } else { + putNull(ContextSpecificTag(TAG_ADMIN_PASSCODE_I_D)) + } + put(ContextSpecificTag(TAG_CHANGE_TYPE), changeType) + if (latestValue != null) { + latestValue.toTlv(ContextSpecificTag(TAG_LATEST_VALUE), this) + } else { + putNull(ContextSpecificTag(TAG_LATEST_VALUE)) + } + put(ContextSpecificTag(TAG_FABRIC_INDEX), fabricIndex) + endStructure() + } + } + + companion object { + private const val TAG_ADMIN_NODE_I_D = 1 + private const val TAG_ADMIN_PASSCODE_I_D = 2 + private const val TAG_CHANGE_TYPE = 3 + private const val TAG_LATEST_VALUE = 4 + private const val TAG_FABRIC_INDEX = 254 + + fun fromTlv( + tlvTag: Tag, + tlvReader: TlvReader + ): AccessControlClusterAccessControlEntryChangedEvent { + tlvReader.enterStructure(tlvTag) + val adminNodeID = + if (!tlvReader.isNull()) { + tlvReader.getULong(ContextSpecificTag(TAG_ADMIN_NODE_I_D)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_ADMIN_NODE_I_D)) + null + } + val adminPasscodeID = + if (!tlvReader.isNull()) { + tlvReader.getUShort(ContextSpecificTag(TAG_ADMIN_PASSCODE_I_D)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_ADMIN_PASSCODE_I_D)) + null + } + val changeType = tlvReader.getUInt(ContextSpecificTag(TAG_CHANGE_TYPE)) + val latestValue = + if (!tlvReader.isNull()) { + matter.devicecontroller.cluster.structs.AccessControlClusterAccessControlEntryStruct + .fromTlv(ContextSpecificTag(TAG_LATEST_VALUE), tlvReader) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_LATEST_VALUE)) + null + } + val fabricIndex = tlvReader.getUByte(ContextSpecificTag(TAG_FABRIC_INDEX)) + + tlvReader.exitContainer() + + return AccessControlClusterAccessControlEntryChangedEvent( + adminNodeID, + adminPasscodeID, + changeType, + latestValue, + fabricIndex + ) + } + } +} diff --git a/src/controller/java/generated/java/matter/devicecontroller/cluster/eventstructs/AccessControlClusterAccessControlExtensionChangedEvent.kt b/src/controller/java/generated/java/matter/devicecontroller/cluster/eventstructs/AccessControlClusterAccessControlExtensionChangedEvent.kt new file mode 100644 index 00000000000000..c6721f29f88959 --- /dev/null +++ b/src/controller/java/generated/java/matter/devicecontroller/cluster/eventstructs/AccessControlClusterAccessControlExtensionChangedEvent.kt @@ -0,0 +1,115 @@ +/* + * + * Copyright (c) 2023 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package matter.devicecontroller.cluster.eventstructs + +import matter.devicecontroller.cluster.* +import matter.tlv.ContextSpecificTag +import matter.tlv.Tag +import matter.tlv.TlvReader +import matter.tlv.TlvWriter + +class AccessControlClusterAccessControlExtensionChangedEvent( + val adminNodeID: ULong?, + val adminPasscodeID: UShort?, + val changeType: UInt, + val latestValue: + matter.devicecontroller.cluster.structs.AccessControlClusterAccessControlExtensionStruct?, + val fabricIndex: UByte +) { + override fun toString(): String = buildString { + append("AccessControlClusterAccessControlExtensionChangedEvent {\n") + append("\tadminNodeID : $adminNodeID\n") + append("\tadminPasscodeID : $adminPasscodeID\n") + append("\tchangeType : $changeType\n") + append("\tlatestValue : $latestValue\n") + append("\tfabricIndex : $fabricIndex\n") + append("}\n") + } + + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tlvTag) + if (adminNodeID != null) { + put(ContextSpecificTag(TAG_ADMIN_NODE_I_D), adminNodeID) + } else { + putNull(ContextSpecificTag(TAG_ADMIN_NODE_I_D)) + } + if (adminPasscodeID != null) { + put(ContextSpecificTag(TAG_ADMIN_PASSCODE_I_D), adminPasscodeID) + } else { + putNull(ContextSpecificTag(TAG_ADMIN_PASSCODE_I_D)) + } + put(ContextSpecificTag(TAG_CHANGE_TYPE), changeType) + if (latestValue != null) { + latestValue.toTlv(ContextSpecificTag(TAG_LATEST_VALUE), this) + } else { + putNull(ContextSpecificTag(TAG_LATEST_VALUE)) + } + put(ContextSpecificTag(TAG_FABRIC_INDEX), fabricIndex) + endStructure() + } + } + + companion object { + private const val TAG_ADMIN_NODE_I_D = 1 + private const val TAG_ADMIN_PASSCODE_I_D = 2 + private const val TAG_CHANGE_TYPE = 3 + private const val TAG_LATEST_VALUE = 4 + private const val TAG_FABRIC_INDEX = 254 + + fun fromTlv( + tlvTag: Tag, + tlvReader: TlvReader + ): AccessControlClusterAccessControlExtensionChangedEvent { + tlvReader.enterStructure(tlvTag) + val adminNodeID = + if (!tlvReader.isNull()) { + tlvReader.getULong(ContextSpecificTag(TAG_ADMIN_NODE_I_D)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_ADMIN_NODE_I_D)) + null + } + val adminPasscodeID = + if (!tlvReader.isNull()) { + tlvReader.getUShort(ContextSpecificTag(TAG_ADMIN_PASSCODE_I_D)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_ADMIN_PASSCODE_I_D)) + null + } + val changeType = tlvReader.getUInt(ContextSpecificTag(TAG_CHANGE_TYPE)) + val latestValue = + if (!tlvReader.isNull()) { + matter.devicecontroller.cluster.structs.AccessControlClusterAccessControlExtensionStruct + .fromTlv(ContextSpecificTag(TAG_LATEST_VALUE), tlvReader) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_LATEST_VALUE)) + null + } + val fabricIndex = tlvReader.getUByte(ContextSpecificTag(TAG_FABRIC_INDEX)) + + tlvReader.exitContainer() + + return AccessControlClusterAccessControlExtensionChangedEvent( + adminNodeID, + adminPasscodeID, + changeType, + latestValue, + fabricIndex + ) + } + } +} diff --git a/src/controller/java/generated/java/matter/devicecontroller/cluster/eventstructs/ActionsClusterActionFailedEvent.kt b/src/controller/java/generated/java/matter/devicecontroller/cluster/eventstructs/ActionsClusterActionFailedEvent.kt new file mode 100644 index 00000000000000..7def1a047e9a3a --- /dev/null +++ b/src/controller/java/generated/java/matter/devicecontroller/cluster/eventstructs/ActionsClusterActionFailedEvent.kt @@ -0,0 +1,69 @@ +/* + * + * Copyright (c) 2023 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package matter.devicecontroller.cluster.eventstructs + +import matter.devicecontroller.cluster.* +import matter.tlv.ContextSpecificTag +import matter.tlv.Tag +import matter.tlv.TlvReader +import matter.tlv.TlvWriter + +class ActionsClusterActionFailedEvent( + val actionID: UShort, + val invokeID: UInt, + val newState: UInt, + val error: UInt +) { + override fun toString(): String = buildString { + append("ActionsClusterActionFailedEvent {\n") + append("\tactionID : $actionID\n") + append("\tinvokeID : $invokeID\n") + append("\tnewState : $newState\n") + append("\terror : $error\n") + append("}\n") + } + + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tlvTag) + put(ContextSpecificTag(TAG_ACTION_I_D), actionID) + put(ContextSpecificTag(TAG_INVOKE_I_D), invokeID) + put(ContextSpecificTag(TAG_NEW_STATE), newState) + put(ContextSpecificTag(TAG_ERROR), error) + endStructure() + } + } + + companion object { + private const val TAG_ACTION_I_D = 0 + private const val TAG_INVOKE_I_D = 1 + private const val TAG_NEW_STATE = 2 + private const val TAG_ERROR = 3 + + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): ActionsClusterActionFailedEvent { + tlvReader.enterStructure(tlvTag) + val actionID = tlvReader.getUShort(ContextSpecificTag(TAG_ACTION_I_D)) + val invokeID = tlvReader.getUInt(ContextSpecificTag(TAG_INVOKE_I_D)) + val newState = tlvReader.getUInt(ContextSpecificTag(TAG_NEW_STATE)) + val error = tlvReader.getUInt(ContextSpecificTag(TAG_ERROR)) + + tlvReader.exitContainer() + + return ActionsClusterActionFailedEvent(actionID, invokeID, newState, error) + } + } +} diff --git a/src/controller/java/generated/java/matter/devicecontroller/cluster/eventstructs/ActionsClusterStateChangedEvent.kt b/src/controller/java/generated/java/matter/devicecontroller/cluster/eventstructs/ActionsClusterStateChangedEvent.kt new file mode 100644 index 00000000000000..81ed599b956c26 --- /dev/null +++ b/src/controller/java/generated/java/matter/devicecontroller/cluster/eventstructs/ActionsClusterStateChangedEvent.kt @@ -0,0 +1,64 @@ +/* + * + * Copyright (c) 2023 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package matter.devicecontroller.cluster.eventstructs + +import matter.devicecontroller.cluster.* +import matter.tlv.ContextSpecificTag +import matter.tlv.Tag +import matter.tlv.TlvReader +import matter.tlv.TlvWriter + +class ActionsClusterStateChangedEvent( + val actionID: UShort, + val invokeID: UInt, + val newState: UInt +) { + override fun toString(): String = buildString { + append("ActionsClusterStateChangedEvent {\n") + append("\tactionID : $actionID\n") + append("\tinvokeID : $invokeID\n") + append("\tnewState : $newState\n") + append("}\n") + } + + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tlvTag) + put(ContextSpecificTag(TAG_ACTION_I_D), actionID) + put(ContextSpecificTag(TAG_INVOKE_I_D), invokeID) + put(ContextSpecificTag(TAG_NEW_STATE), newState) + endStructure() + } + } + + companion object { + private const val TAG_ACTION_I_D = 0 + private const val TAG_INVOKE_I_D = 1 + private const val TAG_NEW_STATE = 2 + + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): ActionsClusterStateChangedEvent { + tlvReader.enterStructure(tlvTag) + val actionID = tlvReader.getUShort(ContextSpecificTag(TAG_ACTION_I_D)) + val invokeID = tlvReader.getUInt(ContextSpecificTag(TAG_INVOKE_I_D)) + val newState = tlvReader.getUInt(ContextSpecificTag(TAG_NEW_STATE)) + + tlvReader.exitContainer() + + return ActionsClusterStateChangedEvent(actionID, invokeID, newState) + } + } +} diff --git a/src/controller/java/generated/java/matter/devicecontroller/cluster/eventstructs/BasicInformationClusterLeaveEvent.kt b/src/controller/java/generated/java/matter/devicecontroller/cluster/eventstructs/BasicInformationClusterLeaveEvent.kt new file mode 100644 index 00000000000000..527ca9e747d32d --- /dev/null +++ b/src/controller/java/generated/java/matter/devicecontroller/cluster/eventstructs/BasicInformationClusterLeaveEvent.kt @@ -0,0 +1,52 @@ +/* + * + * Copyright (c) 2023 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package matter.devicecontroller.cluster.eventstructs + +import matter.devicecontroller.cluster.* +import matter.tlv.ContextSpecificTag +import matter.tlv.Tag +import matter.tlv.TlvReader +import matter.tlv.TlvWriter + +class BasicInformationClusterLeaveEvent(val fabricIndex: UByte) { + override fun toString(): String = buildString { + append("BasicInformationClusterLeaveEvent {\n") + append("\tfabricIndex : $fabricIndex\n") + append("}\n") + } + + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tlvTag) + put(ContextSpecificTag(TAG_FABRIC_INDEX), fabricIndex) + endStructure() + } + } + + companion object { + private const val TAG_FABRIC_INDEX = 0 + + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): BasicInformationClusterLeaveEvent { + tlvReader.enterStructure(tlvTag) + val fabricIndex = tlvReader.getUByte(ContextSpecificTag(TAG_FABRIC_INDEX)) + + tlvReader.exitContainer() + + return BasicInformationClusterLeaveEvent(fabricIndex) + } + } +} diff --git a/src/controller/java/generated/java/matter/devicecontroller/cluster/eventstructs/BasicInformationClusterReachableChangedEvent.kt b/src/controller/java/generated/java/matter/devicecontroller/cluster/eventstructs/BasicInformationClusterReachableChangedEvent.kt new file mode 100644 index 00000000000000..117e3e4472bedf --- /dev/null +++ b/src/controller/java/generated/java/matter/devicecontroller/cluster/eventstructs/BasicInformationClusterReachableChangedEvent.kt @@ -0,0 +1,52 @@ +/* + * + * Copyright (c) 2023 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package matter.devicecontroller.cluster.eventstructs + +import matter.devicecontroller.cluster.* +import matter.tlv.ContextSpecificTag +import matter.tlv.Tag +import matter.tlv.TlvReader +import matter.tlv.TlvWriter + +class BasicInformationClusterReachableChangedEvent(val reachableNewValue: Boolean) { + override fun toString(): String = buildString { + append("BasicInformationClusterReachableChangedEvent {\n") + append("\treachableNewValue : $reachableNewValue\n") + append("}\n") + } + + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tlvTag) + put(ContextSpecificTag(TAG_REACHABLE_NEW_VALUE), reachableNewValue) + endStructure() + } + } + + companion object { + private const val TAG_REACHABLE_NEW_VALUE = 0 + + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): BasicInformationClusterReachableChangedEvent { + tlvReader.enterStructure(tlvTag) + val reachableNewValue = tlvReader.getBoolean(ContextSpecificTag(TAG_REACHABLE_NEW_VALUE)) + + tlvReader.exitContainer() + + return BasicInformationClusterReachableChangedEvent(reachableNewValue) + } + } +} diff --git a/src/controller/java/generated/java/matter/devicecontroller/cluster/eventstructs/BasicInformationClusterStartUpEvent.kt b/src/controller/java/generated/java/matter/devicecontroller/cluster/eventstructs/BasicInformationClusterStartUpEvent.kt new file mode 100644 index 00000000000000..cbcb04d823ae49 --- /dev/null +++ b/src/controller/java/generated/java/matter/devicecontroller/cluster/eventstructs/BasicInformationClusterStartUpEvent.kt @@ -0,0 +1,52 @@ +/* + * + * Copyright (c) 2023 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package matter.devicecontroller.cluster.eventstructs + +import matter.devicecontroller.cluster.* +import matter.tlv.ContextSpecificTag +import matter.tlv.Tag +import matter.tlv.TlvReader +import matter.tlv.TlvWriter + +class BasicInformationClusterStartUpEvent(val softwareVersion: UInt) { + override fun toString(): String = buildString { + append("BasicInformationClusterStartUpEvent {\n") + append("\tsoftwareVersion : $softwareVersion\n") + append("}\n") + } + + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tlvTag) + put(ContextSpecificTag(TAG_SOFTWARE_VERSION), softwareVersion) + endStructure() + } + } + + companion object { + private const val TAG_SOFTWARE_VERSION = 0 + + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): BasicInformationClusterStartUpEvent { + tlvReader.enterStructure(tlvTag) + val softwareVersion = tlvReader.getUInt(ContextSpecificTag(TAG_SOFTWARE_VERSION)) + + tlvReader.exitContainer() + + return BasicInformationClusterStartUpEvent(softwareVersion) + } + } +} diff --git a/src/controller/java/generated/java/matter/devicecontroller/cluster/eventstructs/BooleanStateClusterStateChangeEvent.kt b/src/controller/java/generated/java/matter/devicecontroller/cluster/eventstructs/BooleanStateClusterStateChangeEvent.kt new file mode 100644 index 00000000000000..b3ac5fad687aac --- /dev/null +++ b/src/controller/java/generated/java/matter/devicecontroller/cluster/eventstructs/BooleanStateClusterStateChangeEvent.kt @@ -0,0 +1,52 @@ +/* + * + * Copyright (c) 2023 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package matter.devicecontroller.cluster.eventstructs + +import matter.devicecontroller.cluster.* +import matter.tlv.ContextSpecificTag +import matter.tlv.Tag +import matter.tlv.TlvReader +import matter.tlv.TlvWriter + +class BooleanStateClusterStateChangeEvent(val stateValue: Boolean) { + override fun toString(): String = buildString { + append("BooleanStateClusterStateChangeEvent {\n") + append("\tstateValue : $stateValue\n") + append("}\n") + } + + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tlvTag) + put(ContextSpecificTag(TAG_STATE_VALUE), stateValue) + endStructure() + } + } + + companion object { + private const val TAG_STATE_VALUE = 0 + + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): BooleanStateClusterStateChangeEvent { + tlvReader.enterStructure(tlvTag) + val stateValue = tlvReader.getBoolean(ContextSpecificTag(TAG_STATE_VALUE)) + + tlvReader.exitContainer() + + return BooleanStateClusterStateChangeEvent(stateValue) + } + } +} diff --git a/src/controller/java/generated/java/matter/devicecontroller/cluster/eventstructs/BridgedDeviceBasicInformationClusterReachableChangedEvent.kt b/src/controller/java/generated/java/matter/devicecontroller/cluster/eventstructs/BridgedDeviceBasicInformationClusterReachableChangedEvent.kt new file mode 100644 index 00000000000000..f153ed3f64cc07 --- /dev/null +++ b/src/controller/java/generated/java/matter/devicecontroller/cluster/eventstructs/BridgedDeviceBasicInformationClusterReachableChangedEvent.kt @@ -0,0 +1,55 @@ +/* + * + * Copyright (c) 2023 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package matter.devicecontroller.cluster.eventstructs + +import matter.devicecontroller.cluster.* +import matter.tlv.ContextSpecificTag +import matter.tlv.Tag +import matter.tlv.TlvReader +import matter.tlv.TlvWriter + +class BridgedDeviceBasicInformationClusterReachableChangedEvent(val reachableNewValue: Boolean) { + override fun toString(): String = buildString { + append("BridgedDeviceBasicInformationClusterReachableChangedEvent {\n") + append("\treachableNewValue : $reachableNewValue\n") + append("}\n") + } + + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tlvTag) + put(ContextSpecificTag(TAG_REACHABLE_NEW_VALUE), reachableNewValue) + endStructure() + } + } + + companion object { + private const val TAG_REACHABLE_NEW_VALUE = 0 + + fun fromTlv( + tlvTag: Tag, + tlvReader: TlvReader + ): BridgedDeviceBasicInformationClusterReachableChangedEvent { + tlvReader.enterStructure(tlvTag) + val reachableNewValue = tlvReader.getBoolean(ContextSpecificTag(TAG_REACHABLE_NEW_VALUE)) + + tlvReader.exitContainer() + + return BridgedDeviceBasicInformationClusterReachableChangedEvent(reachableNewValue) + } + } +} diff --git a/src/controller/java/generated/java/matter/devicecontroller/cluster/eventstructs/BridgedDeviceBasicInformationClusterStartUpEvent.kt b/src/controller/java/generated/java/matter/devicecontroller/cluster/eventstructs/BridgedDeviceBasicInformationClusterStartUpEvent.kt new file mode 100644 index 00000000000000..2df7a457951adf --- /dev/null +++ b/src/controller/java/generated/java/matter/devicecontroller/cluster/eventstructs/BridgedDeviceBasicInformationClusterStartUpEvent.kt @@ -0,0 +1,55 @@ +/* + * + * Copyright (c) 2023 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package matter.devicecontroller.cluster.eventstructs + +import matter.devicecontroller.cluster.* +import matter.tlv.ContextSpecificTag +import matter.tlv.Tag +import matter.tlv.TlvReader +import matter.tlv.TlvWriter + +class BridgedDeviceBasicInformationClusterStartUpEvent(val softwareVersion: UInt) { + override fun toString(): String = buildString { + append("BridgedDeviceBasicInformationClusterStartUpEvent {\n") + append("\tsoftwareVersion : $softwareVersion\n") + append("}\n") + } + + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tlvTag) + put(ContextSpecificTag(TAG_SOFTWARE_VERSION), softwareVersion) + endStructure() + } + } + + companion object { + private const val TAG_SOFTWARE_VERSION = 0 + + fun fromTlv( + tlvTag: Tag, + tlvReader: TlvReader + ): BridgedDeviceBasicInformationClusterStartUpEvent { + tlvReader.enterStructure(tlvTag) + val softwareVersion = tlvReader.getUInt(ContextSpecificTag(TAG_SOFTWARE_VERSION)) + + tlvReader.exitContainer() + + return BridgedDeviceBasicInformationClusterStartUpEvent(softwareVersion) + } + } +} diff --git a/src/controller/java/generated/java/matter/devicecontroller/cluster/eventstructs/DishwasherAlarmClusterNotifyEvent.kt b/src/controller/java/generated/java/matter/devicecontroller/cluster/eventstructs/DishwasherAlarmClusterNotifyEvent.kt new file mode 100644 index 00000000000000..3b0bd74a1fd5c7 --- /dev/null +++ b/src/controller/java/generated/java/matter/devicecontroller/cluster/eventstructs/DishwasherAlarmClusterNotifyEvent.kt @@ -0,0 +1,69 @@ +/* + * + * Copyright (c) 2023 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package matter.devicecontroller.cluster.eventstructs + +import matter.devicecontroller.cluster.* +import matter.tlv.ContextSpecificTag +import matter.tlv.Tag +import matter.tlv.TlvReader +import matter.tlv.TlvWriter + +class DishwasherAlarmClusterNotifyEvent( + val active: ULong, + val inactive: ULong, + val state: ULong, + val mask: ULong +) { + override fun toString(): String = buildString { + append("DishwasherAlarmClusterNotifyEvent {\n") + append("\tactive : $active\n") + append("\tinactive : $inactive\n") + append("\tstate : $state\n") + append("\tmask : $mask\n") + append("}\n") + } + + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tlvTag) + put(ContextSpecificTag(TAG_ACTIVE), active) + put(ContextSpecificTag(TAG_INACTIVE), inactive) + put(ContextSpecificTag(TAG_STATE), state) + put(ContextSpecificTag(TAG_MASK), mask) + endStructure() + } + } + + companion object { + private const val TAG_ACTIVE = 0 + private const val TAG_INACTIVE = 1 + private const val TAG_STATE = 2 + private const val TAG_MASK = 3 + + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): DishwasherAlarmClusterNotifyEvent { + tlvReader.enterStructure(tlvTag) + val active = tlvReader.getULong(ContextSpecificTag(TAG_ACTIVE)) + val inactive = tlvReader.getULong(ContextSpecificTag(TAG_INACTIVE)) + val state = tlvReader.getULong(ContextSpecificTag(TAG_STATE)) + val mask = tlvReader.getULong(ContextSpecificTag(TAG_MASK)) + + tlvReader.exitContainer() + + return DishwasherAlarmClusterNotifyEvent(active, inactive, state, mask) + } + } +} diff --git a/src/controller/java/generated/java/matter/devicecontroller/cluster/eventstructs/DoorLockClusterDoorLockAlarmEvent.kt b/src/controller/java/generated/java/matter/devicecontroller/cluster/eventstructs/DoorLockClusterDoorLockAlarmEvent.kt new file mode 100644 index 00000000000000..5acde4acb5f40d --- /dev/null +++ b/src/controller/java/generated/java/matter/devicecontroller/cluster/eventstructs/DoorLockClusterDoorLockAlarmEvent.kt @@ -0,0 +1,52 @@ +/* + * + * Copyright (c) 2023 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package matter.devicecontroller.cluster.eventstructs + +import matter.devicecontroller.cluster.* +import matter.tlv.ContextSpecificTag +import matter.tlv.Tag +import matter.tlv.TlvReader +import matter.tlv.TlvWriter + +class DoorLockClusterDoorLockAlarmEvent(val alarmCode: UInt) { + override fun toString(): String = buildString { + append("DoorLockClusterDoorLockAlarmEvent {\n") + append("\talarmCode : $alarmCode\n") + append("}\n") + } + + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tlvTag) + put(ContextSpecificTag(TAG_ALARM_CODE), alarmCode) + endStructure() + } + } + + companion object { + private const val TAG_ALARM_CODE = 0 + + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): DoorLockClusterDoorLockAlarmEvent { + tlvReader.enterStructure(tlvTag) + val alarmCode = tlvReader.getUInt(ContextSpecificTag(TAG_ALARM_CODE)) + + tlvReader.exitContainer() + + return DoorLockClusterDoorLockAlarmEvent(alarmCode) + } + } +} diff --git a/src/controller/java/generated/java/matter/devicecontroller/cluster/eventstructs/DoorLockClusterDoorStateChangeEvent.kt b/src/controller/java/generated/java/matter/devicecontroller/cluster/eventstructs/DoorLockClusterDoorStateChangeEvent.kt new file mode 100644 index 00000000000000..cc693ce9d5d390 --- /dev/null +++ b/src/controller/java/generated/java/matter/devicecontroller/cluster/eventstructs/DoorLockClusterDoorStateChangeEvent.kt @@ -0,0 +1,52 @@ +/* + * + * Copyright (c) 2023 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package matter.devicecontroller.cluster.eventstructs + +import matter.devicecontroller.cluster.* +import matter.tlv.ContextSpecificTag +import matter.tlv.Tag +import matter.tlv.TlvReader +import matter.tlv.TlvWriter + +class DoorLockClusterDoorStateChangeEvent(val doorState: UInt) { + override fun toString(): String = buildString { + append("DoorLockClusterDoorStateChangeEvent {\n") + append("\tdoorState : $doorState\n") + append("}\n") + } + + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tlvTag) + put(ContextSpecificTag(TAG_DOOR_STATE), doorState) + endStructure() + } + } + + companion object { + private const val TAG_DOOR_STATE = 0 + + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): DoorLockClusterDoorStateChangeEvent { + tlvReader.enterStructure(tlvTag) + val doorState = tlvReader.getUInt(ContextSpecificTag(TAG_DOOR_STATE)) + + tlvReader.exitContainer() + + return DoorLockClusterDoorStateChangeEvent(doorState) + } + } +} diff --git a/src/controller/java/generated/java/matter/devicecontroller/cluster/eventstructs/DoorLockClusterLockOperationErrorEvent.kt b/src/controller/java/generated/java/matter/devicecontroller/cluster/eventstructs/DoorLockClusterLockOperationErrorEvent.kt new file mode 100644 index 00000000000000..84b682fc2d55bb --- /dev/null +++ b/src/controller/java/generated/java/matter/devicecontroller/cluster/eventstructs/DoorLockClusterLockOperationErrorEvent.kt @@ -0,0 +1,159 @@ +/* + * + * Copyright (c) 2023 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package matter.devicecontroller.cluster.eventstructs + +import java.util.Optional +import matter.devicecontroller.cluster.* +import matter.tlv.AnonymousTag +import matter.tlv.ContextSpecificTag +import matter.tlv.Tag +import matter.tlv.TlvReader +import matter.tlv.TlvWriter + +class DoorLockClusterLockOperationErrorEvent( + val lockOperationType: UInt, + val operationSource: UInt, + val operationError: UInt, + val userIndex: UShort?, + val fabricIndex: UByte?, + val sourceNode: ULong?, + val credentials: + Optional>? +) { + override fun toString(): String = buildString { + append("DoorLockClusterLockOperationErrorEvent {\n") + append("\tlockOperationType : $lockOperationType\n") + append("\toperationSource : $operationSource\n") + append("\toperationError : $operationError\n") + append("\tuserIndex : $userIndex\n") + append("\tfabricIndex : $fabricIndex\n") + append("\tsourceNode : $sourceNode\n") + append("\tcredentials : $credentials\n") + append("}\n") + } + + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tlvTag) + put(ContextSpecificTag(TAG_LOCK_OPERATION_TYPE), lockOperationType) + put(ContextSpecificTag(TAG_OPERATION_SOURCE), operationSource) + put(ContextSpecificTag(TAG_OPERATION_ERROR), operationError) + if (userIndex != null) { + put(ContextSpecificTag(TAG_USER_INDEX), userIndex) + } else { + putNull(ContextSpecificTag(TAG_USER_INDEX)) + } + if (fabricIndex != null) { + put(ContextSpecificTag(TAG_FABRIC_INDEX), fabricIndex) + } else { + putNull(ContextSpecificTag(TAG_FABRIC_INDEX)) + } + if (sourceNode != null) { + put(ContextSpecificTag(TAG_SOURCE_NODE), sourceNode) + } else { + putNull(ContextSpecificTag(TAG_SOURCE_NODE)) + } + if (credentials != null) { + if (credentials.isPresent) { + val optcredentials = credentials.get() + startArray(ContextSpecificTag(TAG_CREDENTIALS)) + for (item in optcredentials.iterator()) { + item.toTlv(AnonymousTag, this) + } + endArray() + } + } else { + putNull(ContextSpecificTag(TAG_CREDENTIALS)) + } + endStructure() + } + } + + companion object { + private const val TAG_LOCK_OPERATION_TYPE = 0 + private const val TAG_OPERATION_SOURCE = 1 + private const val TAG_OPERATION_ERROR = 2 + private const val TAG_USER_INDEX = 3 + private const val TAG_FABRIC_INDEX = 4 + private const val TAG_SOURCE_NODE = 5 + private const val TAG_CREDENTIALS = 6 + + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): DoorLockClusterLockOperationErrorEvent { + tlvReader.enterStructure(tlvTag) + val lockOperationType = tlvReader.getUInt(ContextSpecificTag(TAG_LOCK_OPERATION_TYPE)) + val operationSource = tlvReader.getUInt(ContextSpecificTag(TAG_OPERATION_SOURCE)) + val operationError = tlvReader.getUInt(ContextSpecificTag(TAG_OPERATION_ERROR)) + val userIndex = + if (!tlvReader.isNull()) { + tlvReader.getUShort(ContextSpecificTag(TAG_USER_INDEX)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_USER_INDEX)) + null + } + val fabricIndex = + if (!tlvReader.isNull()) { + tlvReader.getUByte(ContextSpecificTag(TAG_FABRIC_INDEX)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_FABRIC_INDEX)) + null + } + val sourceNode = + if (!tlvReader.isNull()) { + tlvReader.getULong(ContextSpecificTag(TAG_SOURCE_NODE)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_SOURCE_NODE)) + null + } + val credentials = + if (!tlvReader.isNull()) { + if (tlvReader.isNextTag(ContextSpecificTag(TAG_CREDENTIALS))) { + Optional.of( + buildList { + tlvReader.enterArray(ContextSpecificTag(TAG_CREDENTIALS)) + while (!tlvReader.isEndOfContainer()) { + this.add( + matter.devicecontroller.cluster.structs.DoorLockClusterCredentialStruct.fromTlv( + AnonymousTag, + tlvReader + ) + ) + } + tlvReader.exitContainer() + } + ) + } else { + Optional.empty() + } + } else { + tlvReader.getNull(ContextSpecificTag(TAG_CREDENTIALS)) + null + } + + tlvReader.exitContainer() + + return DoorLockClusterLockOperationErrorEvent( + lockOperationType, + operationSource, + operationError, + userIndex, + fabricIndex, + sourceNode, + credentials + ) + } + } +} diff --git a/src/controller/java/generated/java/matter/devicecontroller/cluster/eventstructs/DoorLockClusterLockOperationEvent.kt b/src/controller/java/generated/java/matter/devicecontroller/cluster/eventstructs/DoorLockClusterLockOperationEvent.kt new file mode 100644 index 00000000000000..4708017ff6fcae --- /dev/null +++ b/src/controller/java/generated/java/matter/devicecontroller/cluster/eventstructs/DoorLockClusterLockOperationEvent.kt @@ -0,0 +1,153 @@ +/* + * + * Copyright (c) 2023 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package matter.devicecontroller.cluster.eventstructs + +import java.util.Optional +import matter.devicecontroller.cluster.* +import matter.tlv.AnonymousTag +import matter.tlv.ContextSpecificTag +import matter.tlv.Tag +import matter.tlv.TlvReader +import matter.tlv.TlvWriter + +class DoorLockClusterLockOperationEvent( + val lockOperationType: UInt, + val operationSource: UInt, + val userIndex: UShort?, + val fabricIndex: UByte?, + val sourceNode: ULong?, + val credentials: + Optional>? +) { + override fun toString(): String = buildString { + append("DoorLockClusterLockOperationEvent {\n") + append("\tlockOperationType : $lockOperationType\n") + append("\toperationSource : $operationSource\n") + append("\tuserIndex : $userIndex\n") + append("\tfabricIndex : $fabricIndex\n") + append("\tsourceNode : $sourceNode\n") + append("\tcredentials : $credentials\n") + append("}\n") + } + + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tlvTag) + put(ContextSpecificTag(TAG_LOCK_OPERATION_TYPE), lockOperationType) + put(ContextSpecificTag(TAG_OPERATION_SOURCE), operationSource) + if (userIndex != null) { + put(ContextSpecificTag(TAG_USER_INDEX), userIndex) + } else { + putNull(ContextSpecificTag(TAG_USER_INDEX)) + } + if (fabricIndex != null) { + put(ContextSpecificTag(TAG_FABRIC_INDEX), fabricIndex) + } else { + putNull(ContextSpecificTag(TAG_FABRIC_INDEX)) + } + if (sourceNode != null) { + put(ContextSpecificTag(TAG_SOURCE_NODE), sourceNode) + } else { + putNull(ContextSpecificTag(TAG_SOURCE_NODE)) + } + if (credentials != null) { + if (credentials.isPresent) { + val optcredentials = credentials.get() + startArray(ContextSpecificTag(TAG_CREDENTIALS)) + for (item in optcredentials.iterator()) { + item.toTlv(AnonymousTag, this) + } + endArray() + } + } else { + putNull(ContextSpecificTag(TAG_CREDENTIALS)) + } + endStructure() + } + } + + companion object { + private const val TAG_LOCK_OPERATION_TYPE = 0 + private const val TAG_OPERATION_SOURCE = 1 + private const val TAG_USER_INDEX = 2 + private const val TAG_FABRIC_INDEX = 3 + private const val TAG_SOURCE_NODE = 4 + private const val TAG_CREDENTIALS = 5 + + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): DoorLockClusterLockOperationEvent { + tlvReader.enterStructure(tlvTag) + val lockOperationType = tlvReader.getUInt(ContextSpecificTag(TAG_LOCK_OPERATION_TYPE)) + val operationSource = tlvReader.getUInt(ContextSpecificTag(TAG_OPERATION_SOURCE)) + val userIndex = + if (!tlvReader.isNull()) { + tlvReader.getUShort(ContextSpecificTag(TAG_USER_INDEX)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_USER_INDEX)) + null + } + val fabricIndex = + if (!tlvReader.isNull()) { + tlvReader.getUByte(ContextSpecificTag(TAG_FABRIC_INDEX)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_FABRIC_INDEX)) + null + } + val sourceNode = + if (!tlvReader.isNull()) { + tlvReader.getULong(ContextSpecificTag(TAG_SOURCE_NODE)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_SOURCE_NODE)) + null + } + val credentials = + if (!tlvReader.isNull()) { + if (tlvReader.isNextTag(ContextSpecificTag(TAG_CREDENTIALS))) { + Optional.of( + buildList { + tlvReader.enterArray(ContextSpecificTag(TAG_CREDENTIALS)) + while (!tlvReader.isEndOfContainer()) { + this.add( + matter.devicecontroller.cluster.structs.DoorLockClusterCredentialStruct.fromTlv( + AnonymousTag, + tlvReader + ) + ) + } + tlvReader.exitContainer() + } + ) + } else { + Optional.empty() + } + } else { + tlvReader.getNull(ContextSpecificTag(TAG_CREDENTIALS)) + null + } + + tlvReader.exitContainer() + + return DoorLockClusterLockOperationEvent( + lockOperationType, + operationSource, + userIndex, + fabricIndex, + sourceNode, + credentials + ) + } + } +} diff --git a/src/controller/java/generated/java/matter/devicecontroller/cluster/eventstructs/DoorLockClusterLockUserChangeEvent.kt b/src/controller/java/generated/java/matter/devicecontroller/cluster/eventstructs/DoorLockClusterLockUserChangeEvent.kt new file mode 100644 index 00000000000000..81814e6393b670 --- /dev/null +++ b/src/controller/java/generated/java/matter/devicecontroller/cluster/eventstructs/DoorLockClusterLockUserChangeEvent.kt @@ -0,0 +1,132 @@ +/* + * + * Copyright (c) 2023 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package matter.devicecontroller.cluster.eventstructs + +import matter.devicecontroller.cluster.* +import matter.tlv.ContextSpecificTag +import matter.tlv.Tag +import matter.tlv.TlvReader +import matter.tlv.TlvWriter + +class DoorLockClusterLockUserChangeEvent( + val lockDataType: UInt, + val dataOperationType: UInt, + val operationSource: UInt, + val userIndex: UShort?, + val fabricIndex: UByte?, + val sourceNode: ULong?, + val dataIndex: UShort? +) { + override fun toString(): String = buildString { + append("DoorLockClusterLockUserChangeEvent {\n") + append("\tlockDataType : $lockDataType\n") + append("\tdataOperationType : $dataOperationType\n") + append("\toperationSource : $operationSource\n") + append("\tuserIndex : $userIndex\n") + append("\tfabricIndex : $fabricIndex\n") + append("\tsourceNode : $sourceNode\n") + append("\tdataIndex : $dataIndex\n") + append("}\n") + } + + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tlvTag) + put(ContextSpecificTag(TAG_LOCK_DATA_TYPE), lockDataType) + put(ContextSpecificTag(TAG_DATA_OPERATION_TYPE), dataOperationType) + put(ContextSpecificTag(TAG_OPERATION_SOURCE), operationSource) + if (userIndex != null) { + put(ContextSpecificTag(TAG_USER_INDEX), userIndex) + } else { + putNull(ContextSpecificTag(TAG_USER_INDEX)) + } + if (fabricIndex != null) { + put(ContextSpecificTag(TAG_FABRIC_INDEX), fabricIndex) + } else { + putNull(ContextSpecificTag(TAG_FABRIC_INDEX)) + } + if (sourceNode != null) { + put(ContextSpecificTag(TAG_SOURCE_NODE), sourceNode) + } else { + putNull(ContextSpecificTag(TAG_SOURCE_NODE)) + } + if (dataIndex != null) { + put(ContextSpecificTag(TAG_DATA_INDEX), dataIndex) + } else { + putNull(ContextSpecificTag(TAG_DATA_INDEX)) + } + endStructure() + } + } + + companion object { + private const val TAG_LOCK_DATA_TYPE = 0 + private const val TAG_DATA_OPERATION_TYPE = 1 + private const val TAG_OPERATION_SOURCE = 2 + private const val TAG_USER_INDEX = 3 + private const val TAG_FABRIC_INDEX = 4 + private const val TAG_SOURCE_NODE = 5 + private const val TAG_DATA_INDEX = 6 + + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): DoorLockClusterLockUserChangeEvent { + tlvReader.enterStructure(tlvTag) + val lockDataType = tlvReader.getUInt(ContextSpecificTag(TAG_LOCK_DATA_TYPE)) + val dataOperationType = tlvReader.getUInt(ContextSpecificTag(TAG_DATA_OPERATION_TYPE)) + val operationSource = tlvReader.getUInt(ContextSpecificTag(TAG_OPERATION_SOURCE)) + val userIndex = + if (!tlvReader.isNull()) { + tlvReader.getUShort(ContextSpecificTag(TAG_USER_INDEX)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_USER_INDEX)) + null + } + val fabricIndex = + if (!tlvReader.isNull()) { + tlvReader.getUByte(ContextSpecificTag(TAG_FABRIC_INDEX)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_FABRIC_INDEX)) + null + } + val sourceNode = + if (!tlvReader.isNull()) { + tlvReader.getULong(ContextSpecificTag(TAG_SOURCE_NODE)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_SOURCE_NODE)) + null + } + val dataIndex = + if (!tlvReader.isNull()) { + tlvReader.getUShort(ContextSpecificTag(TAG_DATA_INDEX)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_DATA_INDEX)) + null + } + + tlvReader.exitContainer() + + return DoorLockClusterLockUserChangeEvent( + lockDataType, + dataOperationType, + operationSource, + userIndex, + fabricIndex, + sourceNode, + dataIndex + ) + } + } +} diff --git a/src/controller/java/generated/java/matter/devicecontroller/cluster/eventstructs/GeneralDiagnosticsClusterBootReasonEvent.kt b/src/controller/java/generated/java/matter/devicecontroller/cluster/eventstructs/GeneralDiagnosticsClusterBootReasonEvent.kt new file mode 100644 index 00000000000000..39205bf4badbef --- /dev/null +++ b/src/controller/java/generated/java/matter/devicecontroller/cluster/eventstructs/GeneralDiagnosticsClusterBootReasonEvent.kt @@ -0,0 +1,52 @@ +/* + * + * Copyright (c) 2023 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package matter.devicecontroller.cluster.eventstructs + +import matter.devicecontroller.cluster.* +import matter.tlv.ContextSpecificTag +import matter.tlv.Tag +import matter.tlv.TlvReader +import matter.tlv.TlvWriter + +class GeneralDiagnosticsClusterBootReasonEvent(val bootReason: UInt) { + override fun toString(): String = buildString { + append("GeneralDiagnosticsClusterBootReasonEvent {\n") + append("\tbootReason : $bootReason\n") + append("}\n") + } + + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tlvTag) + put(ContextSpecificTag(TAG_BOOT_REASON), bootReason) + endStructure() + } + } + + companion object { + private const val TAG_BOOT_REASON = 0 + + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): GeneralDiagnosticsClusterBootReasonEvent { + tlvReader.enterStructure(tlvTag) + val bootReason = tlvReader.getUInt(ContextSpecificTag(TAG_BOOT_REASON)) + + tlvReader.exitContainer() + + return GeneralDiagnosticsClusterBootReasonEvent(bootReason) + } + } +} diff --git a/src/controller/java/generated/java/matter/devicecontroller/cluster/eventstructs/GeneralDiagnosticsClusterHardwareFaultChangeEvent.kt b/src/controller/java/generated/java/matter/devicecontroller/cluster/eventstructs/GeneralDiagnosticsClusterHardwareFaultChangeEvent.kt new file mode 100644 index 00000000000000..b24c90d6904e36 --- /dev/null +++ b/src/controller/java/generated/java/matter/devicecontroller/cluster/eventstructs/GeneralDiagnosticsClusterHardwareFaultChangeEvent.kt @@ -0,0 +1,85 @@ +/* + * + * Copyright (c) 2023 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package matter.devicecontroller.cluster.eventstructs + +import matter.devicecontroller.cluster.* +import matter.tlv.AnonymousTag +import matter.tlv.ContextSpecificTag +import matter.tlv.Tag +import matter.tlv.TlvReader +import matter.tlv.TlvWriter + +class GeneralDiagnosticsClusterHardwareFaultChangeEvent( + val current: List, + val previous: List +) { + override fun toString(): String = buildString { + append("GeneralDiagnosticsClusterHardwareFaultChangeEvent {\n") + append("\tcurrent : $current\n") + append("\tprevious : $previous\n") + append("}\n") + } + + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tlvTag) + startArray(ContextSpecificTag(TAG_CURRENT)) + for (item in current.iterator()) { + put(AnonymousTag, item) + } + endArray() + startArray(ContextSpecificTag(TAG_PREVIOUS)) + for (item in previous.iterator()) { + put(AnonymousTag, item) + } + endArray() + endStructure() + } + } + + companion object { + private const val TAG_CURRENT = 0 + private const val TAG_PREVIOUS = 1 + + fun fromTlv( + tlvTag: Tag, + tlvReader: TlvReader + ): GeneralDiagnosticsClusterHardwareFaultChangeEvent { + tlvReader.enterStructure(tlvTag) + val current = + buildList { + tlvReader.enterArray(ContextSpecificTag(TAG_CURRENT)) + while (!tlvReader.isEndOfContainer()) { + this.add(tlvReader.getUInt(AnonymousTag)) + } + tlvReader.exitContainer() + } + val previous = + buildList { + tlvReader.enterArray(ContextSpecificTag(TAG_PREVIOUS)) + while (!tlvReader.isEndOfContainer()) { + this.add(tlvReader.getUInt(AnonymousTag)) + } + tlvReader.exitContainer() + } + + tlvReader.exitContainer() + + return GeneralDiagnosticsClusterHardwareFaultChangeEvent(current, previous) + } + } +} diff --git a/src/controller/java/generated/java/matter/devicecontroller/cluster/eventstructs/GeneralDiagnosticsClusterNetworkFaultChangeEvent.kt b/src/controller/java/generated/java/matter/devicecontroller/cluster/eventstructs/GeneralDiagnosticsClusterNetworkFaultChangeEvent.kt new file mode 100644 index 00000000000000..f4423fa23b3783 --- /dev/null +++ b/src/controller/java/generated/java/matter/devicecontroller/cluster/eventstructs/GeneralDiagnosticsClusterNetworkFaultChangeEvent.kt @@ -0,0 +1,85 @@ +/* + * + * Copyright (c) 2023 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package matter.devicecontroller.cluster.eventstructs + +import matter.devicecontroller.cluster.* +import matter.tlv.AnonymousTag +import matter.tlv.ContextSpecificTag +import matter.tlv.Tag +import matter.tlv.TlvReader +import matter.tlv.TlvWriter + +class GeneralDiagnosticsClusterNetworkFaultChangeEvent( + val current: List, + val previous: List +) { + override fun toString(): String = buildString { + append("GeneralDiagnosticsClusterNetworkFaultChangeEvent {\n") + append("\tcurrent : $current\n") + append("\tprevious : $previous\n") + append("}\n") + } + + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tlvTag) + startArray(ContextSpecificTag(TAG_CURRENT)) + for (item in current.iterator()) { + put(AnonymousTag, item) + } + endArray() + startArray(ContextSpecificTag(TAG_PREVIOUS)) + for (item in previous.iterator()) { + put(AnonymousTag, item) + } + endArray() + endStructure() + } + } + + companion object { + private const val TAG_CURRENT = 0 + private const val TAG_PREVIOUS = 1 + + fun fromTlv( + tlvTag: Tag, + tlvReader: TlvReader + ): GeneralDiagnosticsClusterNetworkFaultChangeEvent { + tlvReader.enterStructure(tlvTag) + val current = + buildList { + tlvReader.enterArray(ContextSpecificTag(TAG_CURRENT)) + while (!tlvReader.isEndOfContainer()) { + this.add(tlvReader.getUInt(AnonymousTag)) + } + tlvReader.exitContainer() + } + val previous = + buildList { + tlvReader.enterArray(ContextSpecificTag(TAG_PREVIOUS)) + while (!tlvReader.isEndOfContainer()) { + this.add(tlvReader.getUInt(AnonymousTag)) + } + tlvReader.exitContainer() + } + + tlvReader.exitContainer() + + return GeneralDiagnosticsClusterNetworkFaultChangeEvent(current, previous) + } + } +} diff --git a/src/controller/java/generated/java/matter/devicecontroller/cluster/eventstructs/GeneralDiagnosticsClusterRadioFaultChangeEvent.kt b/src/controller/java/generated/java/matter/devicecontroller/cluster/eventstructs/GeneralDiagnosticsClusterRadioFaultChangeEvent.kt new file mode 100644 index 00000000000000..f42f34f9689d63 --- /dev/null +++ b/src/controller/java/generated/java/matter/devicecontroller/cluster/eventstructs/GeneralDiagnosticsClusterRadioFaultChangeEvent.kt @@ -0,0 +1,82 @@ +/* + * + * Copyright (c) 2023 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package matter.devicecontroller.cluster.eventstructs + +import matter.devicecontroller.cluster.* +import matter.tlv.AnonymousTag +import matter.tlv.ContextSpecificTag +import matter.tlv.Tag +import matter.tlv.TlvReader +import matter.tlv.TlvWriter + +class GeneralDiagnosticsClusterRadioFaultChangeEvent( + val current: List, + val previous: List +) { + override fun toString(): String = buildString { + append("GeneralDiagnosticsClusterRadioFaultChangeEvent {\n") + append("\tcurrent : $current\n") + append("\tprevious : $previous\n") + append("}\n") + } + + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tlvTag) + startArray(ContextSpecificTag(TAG_CURRENT)) + for (item in current.iterator()) { + put(AnonymousTag, item) + } + endArray() + startArray(ContextSpecificTag(TAG_PREVIOUS)) + for (item in previous.iterator()) { + put(AnonymousTag, item) + } + endArray() + endStructure() + } + } + + companion object { + private const val TAG_CURRENT = 0 + private const val TAG_PREVIOUS = 1 + + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): GeneralDiagnosticsClusterRadioFaultChangeEvent { + tlvReader.enterStructure(tlvTag) + val current = + buildList { + tlvReader.enterArray(ContextSpecificTag(TAG_CURRENT)) + while (!tlvReader.isEndOfContainer()) { + this.add(tlvReader.getUInt(AnonymousTag)) + } + tlvReader.exitContainer() + } + val previous = + buildList { + tlvReader.enterArray(ContextSpecificTag(TAG_PREVIOUS)) + while (!tlvReader.isEndOfContainer()) { + this.add(tlvReader.getUInt(AnonymousTag)) + } + tlvReader.exitContainer() + } + + tlvReader.exitContainer() + + return GeneralDiagnosticsClusterRadioFaultChangeEvent(current, previous) + } + } +} diff --git a/src/controller/java/generated/java/matter/devicecontroller/cluster/eventstructs/OperationalStateClusterOperationCompletionEvent.kt b/src/controller/java/generated/java/matter/devicecontroller/cluster/eventstructs/OperationalStateClusterOperationCompletionEvent.kt new file mode 100644 index 00000000000000..f2f65bc0d0e509 --- /dev/null +++ b/src/controller/java/generated/java/matter/devicecontroller/cluster/eventstructs/OperationalStateClusterOperationCompletionEvent.kt @@ -0,0 +1,106 @@ +/* + * + * Copyright (c) 2023 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package matter.devicecontroller.cluster.eventstructs + +import java.util.Optional +import matter.devicecontroller.cluster.* +import matter.tlv.ContextSpecificTag +import matter.tlv.Tag +import matter.tlv.TlvReader +import matter.tlv.TlvWriter + +class OperationalStateClusterOperationCompletionEvent( + val completionErrorCode: UInt, + val totalOperationalTime: Optional?, + val pausedTime: Optional? +) { + override fun toString(): String = buildString { + append("OperationalStateClusterOperationCompletionEvent {\n") + append("\tcompletionErrorCode : $completionErrorCode\n") + append("\ttotalOperationalTime : $totalOperationalTime\n") + append("\tpausedTime : $pausedTime\n") + append("}\n") + } + + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tlvTag) + put(ContextSpecificTag(TAG_COMPLETION_ERROR_CODE), completionErrorCode) + if (totalOperationalTime != null) { + if (totalOperationalTime.isPresent) { + val opttotalOperationalTime = totalOperationalTime.get() + put(ContextSpecificTag(TAG_TOTAL_OPERATIONAL_TIME), opttotalOperationalTime) + } + } else { + putNull(ContextSpecificTag(TAG_TOTAL_OPERATIONAL_TIME)) + } + if (pausedTime != null) { + if (pausedTime.isPresent) { + val optpausedTime = pausedTime.get() + put(ContextSpecificTag(TAG_PAUSED_TIME), optpausedTime) + } + } else { + putNull(ContextSpecificTag(TAG_PAUSED_TIME)) + } + endStructure() + } + } + + companion object { + private const val TAG_COMPLETION_ERROR_CODE = 0 + private const val TAG_TOTAL_OPERATIONAL_TIME = 1 + private const val TAG_PAUSED_TIME = 2 + + fun fromTlv( + tlvTag: Tag, + tlvReader: TlvReader + ): OperationalStateClusterOperationCompletionEvent { + tlvReader.enterStructure(tlvTag) + val completionErrorCode = tlvReader.getUInt(ContextSpecificTag(TAG_COMPLETION_ERROR_CODE)) + val totalOperationalTime = + if (!tlvReader.isNull()) { + if (tlvReader.isNextTag(ContextSpecificTag(TAG_TOTAL_OPERATIONAL_TIME))) { + Optional.of(tlvReader.getUInt(ContextSpecificTag(TAG_TOTAL_OPERATIONAL_TIME))) + } else { + Optional.empty() + } + } else { + tlvReader.getNull(ContextSpecificTag(TAG_TOTAL_OPERATIONAL_TIME)) + null + } + val pausedTime = + if (!tlvReader.isNull()) { + if (tlvReader.isNextTag(ContextSpecificTag(TAG_PAUSED_TIME))) { + Optional.of(tlvReader.getUInt(ContextSpecificTag(TAG_PAUSED_TIME))) + } else { + Optional.empty() + } + } else { + tlvReader.getNull(ContextSpecificTag(TAG_PAUSED_TIME)) + null + } + + tlvReader.exitContainer() + + return OperationalStateClusterOperationCompletionEvent( + completionErrorCode, + totalOperationalTime, + pausedTime + ) + } + } +} diff --git a/src/controller/java/generated/java/matter/devicecontroller/cluster/eventstructs/OperationalStateClusterOperationalErrorEvent.kt b/src/controller/java/generated/java/matter/devicecontroller/cluster/eventstructs/OperationalStateClusterOperationalErrorEvent.kt new file mode 100644 index 00000000000000..802e306c594c80 --- /dev/null +++ b/src/controller/java/generated/java/matter/devicecontroller/cluster/eventstructs/OperationalStateClusterOperationalErrorEvent.kt @@ -0,0 +1,58 @@ +/* + * + * Copyright (c) 2023 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package matter.devicecontroller.cluster.eventstructs + +import matter.devicecontroller.cluster.* +import matter.tlv.ContextSpecificTag +import matter.tlv.Tag +import matter.tlv.TlvReader +import matter.tlv.TlvWriter + +class OperationalStateClusterOperationalErrorEvent( + val errorState: matter.devicecontroller.cluster.structs.OperationalStateClusterErrorStateStruct +) { + override fun toString(): String = buildString { + append("OperationalStateClusterOperationalErrorEvent {\n") + append("\terrorState : $errorState\n") + append("}\n") + } + + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tlvTag) + errorState.toTlv(ContextSpecificTag(TAG_ERROR_STATE), this) + endStructure() + } + } + + companion object { + private const val TAG_ERROR_STATE = 0 + + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): OperationalStateClusterOperationalErrorEvent { + tlvReader.enterStructure(tlvTag) + val errorState = + matter.devicecontroller.cluster.structs.OperationalStateClusterErrorStateStruct.fromTlv( + ContextSpecificTag(TAG_ERROR_STATE), + tlvReader + ) + + tlvReader.exitContainer() + + return OperationalStateClusterOperationalErrorEvent(errorState) + } + } +} diff --git a/src/controller/java/generated/java/matter/devicecontroller/cluster/eventstructs/OtaSoftwareUpdateRequestorClusterDownloadErrorEvent.kt b/src/controller/java/generated/java/matter/devicecontroller/cluster/eventstructs/OtaSoftwareUpdateRequestorClusterDownloadErrorEvent.kt new file mode 100644 index 00000000000000..a36f9161a81b62 --- /dev/null +++ b/src/controller/java/generated/java/matter/devicecontroller/cluster/eventstructs/OtaSoftwareUpdateRequestorClusterDownloadErrorEvent.kt @@ -0,0 +1,97 @@ +/* + * + * Copyright (c) 2023 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package matter.devicecontroller.cluster.eventstructs + +import matter.devicecontroller.cluster.* +import matter.tlv.ContextSpecificTag +import matter.tlv.Tag +import matter.tlv.TlvReader +import matter.tlv.TlvWriter + +class OtaSoftwareUpdateRequestorClusterDownloadErrorEvent( + val softwareVersion: UInt, + val bytesDownloaded: ULong, + val progressPercent: UByte?, + val platformCode: Long? +) { + override fun toString(): String = buildString { + append("OtaSoftwareUpdateRequestorClusterDownloadErrorEvent {\n") + append("\tsoftwareVersion : $softwareVersion\n") + append("\tbytesDownloaded : $bytesDownloaded\n") + append("\tprogressPercent : $progressPercent\n") + append("\tplatformCode : $platformCode\n") + append("}\n") + } + + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tlvTag) + put(ContextSpecificTag(TAG_SOFTWARE_VERSION), softwareVersion) + put(ContextSpecificTag(TAG_BYTES_DOWNLOADED), bytesDownloaded) + if (progressPercent != null) { + put(ContextSpecificTag(TAG_PROGRESS_PERCENT), progressPercent) + } else { + putNull(ContextSpecificTag(TAG_PROGRESS_PERCENT)) + } + if (platformCode != null) { + put(ContextSpecificTag(TAG_PLATFORM_CODE), platformCode) + } else { + putNull(ContextSpecificTag(TAG_PLATFORM_CODE)) + } + endStructure() + } + } + + companion object { + private const val TAG_SOFTWARE_VERSION = 0 + private const val TAG_BYTES_DOWNLOADED = 1 + private const val TAG_PROGRESS_PERCENT = 2 + private const val TAG_PLATFORM_CODE = 3 + + fun fromTlv( + tlvTag: Tag, + tlvReader: TlvReader + ): OtaSoftwareUpdateRequestorClusterDownloadErrorEvent { + tlvReader.enterStructure(tlvTag) + val softwareVersion = tlvReader.getUInt(ContextSpecificTag(TAG_SOFTWARE_VERSION)) + val bytesDownloaded = tlvReader.getULong(ContextSpecificTag(TAG_BYTES_DOWNLOADED)) + val progressPercent = + if (!tlvReader.isNull()) { + tlvReader.getUByte(ContextSpecificTag(TAG_PROGRESS_PERCENT)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_PROGRESS_PERCENT)) + null + } + val platformCode = + if (!tlvReader.isNull()) { + tlvReader.getLong(ContextSpecificTag(TAG_PLATFORM_CODE)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_PLATFORM_CODE)) + null + } + + tlvReader.exitContainer() + + return OtaSoftwareUpdateRequestorClusterDownloadErrorEvent( + softwareVersion, + bytesDownloaded, + progressPercent, + platformCode + ) + } + } +} diff --git a/src/controller/java/generated/java/matter/devicecontroller/cluster/eventstructs/OtaSoftwareUpdateRequestorClusterStateTransitionEvent.kt b/src/controller/java/generated/java/matter/devicecontroller/cluster/eventstructs/OtaSoftwareUpdateRequestorClusterStateTransitionEvent.kt new file mode 100644 index 00000000000000..993efa8e9c93fc --- /dev/null +++ b/src/controller/java/generated/java/matter/devicecontroller/cluster/eventstructs/OtaSoftwareUpdateRequestorClusterStateTransitionEvent.kt @@ -0,0 +1,87 @@ +/* + * + * Copyright (c) 2023 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package matter.devicecontroller.cluster.eventstructs + +import matter.devicecontroller.cluster.* +import matter.tlv.ContextSpecificTag +import matter.tlv.Tag +import matter.tlv.TlvReader +import matter.tlv.TlvWriter + +class OtaSoftwareUpdateRequestorClusterStateTransitionEvent( + val previousState: UInt, + val newState: UInt, + val reason: UInt, + val targetSoftwareVersion: UInt? +) { + override fun toString(): String = buildString { + append("OtaSoftwareUpdateRequestorClusterStateTransitionEvent {\n") + append("\tpreviousState : $previousState\n") + append("\tnewState : $newState\n") + append("\treason : $reason\n") + append("\ttargetSoftwareVersion : $targetSoftwareVersion\n") + append("}\n") + } + + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tlvTag) + put(ContextSpecificTag(TAG_PREVIOUS_STATE), previousState) + put(ContextSpecificTag(TAG_NEW_STATE), newState) + put(ContextSpecificTag(TAG_REASON), reason) + if (targetSoftwareVersion != null) { + put(ContextSpecificTag(TAG_TARGET_SOFTWARE_VERSION), targetSoftwareVersion) + } else { + putNull(ContextSpecificTag(TAG_TARGET_SOFTWARE_VERSION)) + } + endStructure() + } + } + + companion object { + private const val TAG_PREVIOUS_STATE = 0 + private const val TAG_NEW_STATE = 1 + private const val TAG_REASON = 2 + private const val TAG_TARGET_SOFTWARE_VERSION = 3 + + fun fromTlv( + tlvTag: Tag, + tlvReader: TlvReader + ): OtaSoftwareUpdateRequestorClusterStateTransitionEvent { + tlvReader.enterStructure(tlvTag) + val previousState = tlvReader.getUInt(ContextSpecificTag(TAG_PREVIOUS_STATE)) + val newState = tlvReader.getUInt(ContextSpecificTag(TAG_NEW_STATE)) + val reason = tlvReader.getUInt(ContextSpecificTag(TAG_REASON)) + val targetSoftwareVersion = + if (!tlvReader.isNull()) { + tlvReader.getUInt(ContextSpecificTag(TAG_TARGET_SOFTWARE_VERSION)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_TARGET_SOFTWARE_VERSION)) + null + } + + tlvReader.exitContainer() + + return OtaSoftwareUpdateRequestorClusterStateTransitionEvent( + previousState, + newState, + reason, + targetSoftwareVersion + ) + } + } +} diff --git a/src/controller/java/generated/java/matter/devicecontroller/cluster/eventstructs/OtaSoftwareUpdateRequestorClusterVersionAppliedEvent.kt b/src/controller/java/generated/java/matter/devicecontroller/cluster/eventstructs/OtaSoftwareUpdateRequestorClusterVersionAppliedEvent.kt new file mode 100644 index 00000000000000..f8b32d0d560892 --- /dev/null +++ b/src/controller/java/generated/java/matter/devicecontroller/cluster/eventstructs/OtaSoftwareUpdateRequestorClusterVersionAppliedEvent.kt @@ -0,0 +1,62 @@ +/* + * + * Copyright (c) 2023 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package matter.devicecontroller.cluster.eventstructs + +import matter.devicecontroller.cluster.* +import matter.tlv.ContextSpecificTag +import matter.tlv.Tag +import matter.tlv.TlvReader +import matter.tlv.TlvWriter + +class OtaSoftwareUpdateRequestorClusterVersionAppliedEvent( + val softwareVersion: UInt, + val productID: UShort +) { + override fun toString(): String = buildString { + append("OtaSoftwareUpdateRequestorClusterVersionAppliedEvent {\n") + append("\tsoftwareVersion : $softwareVersion\n") + append("\tproductID : $productID\n") + append("}\n") + } + + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tlvTag) + put(ContextSpecificTag(TAG_SOFTWARE_VERSION), softwareVersion) + put(ContextSpecificTag(TAG_PRODUCT_I_D), productID) + endStructure() + } + } + + companion object { + private const val TAG_SOFTWARE_VERSION = 0 + private const val TAG_PRODUCT_I_D = 1 + + fun fromTlv( + tlvTag: Tag, + tlvReader: TlvReader + ): OtaSoftwareUpdateRequestorClusterVersionAppliedEvent { + tlvReader.enterStructure(tlvTag) + val softwareVersion = tlvReader.getUInt(ContextSpecificTag(TAG_SOFTWARE_VERSION)) + val productID = tlvReader.getUShort(ContextSpecificTag(TAG_PRODUCT_I_D)) + + tlvReader.exitContainer() + + return OtaSoftwareUpdateRequestorClusterVersionAppliedEvent(softwareVersion, productID) + } + } +} diff --git a/src/controller/java/generated/java/matter/devicecontroller/cluster/eventstructs/PowerSourceClusterBatChargeFaultChangeEvent.kt b/src/controller/java/generated/java/matter/devicecontroller/cluster/eventstructs/PowerSourceClusterBatChargeFaultChangeEvent.kt new file mode 100644 index 00000000000000..21cdcf674fa338 --- /dev/null +++ b/src/controller/java/generated/java/matter/devicecontroller/cluster/eventstructs/PowerSourceClusterBatChargeFaultChangeEvent.kt @@ -0,0 +1,82 @@ +/* + * + * Copyright (c) 2023 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package matter.devicecontroller.cluster.eventstructs + +import matter.devicecontroller.cluster.* +import matter.tlv.AnonymousTag +import matter.tlv.ContextSpecificTag +import matter.tlv.Tag +import matter.tlv.TlvReader +import matter.tlv.TlvWriter + +class PowerSourceClusterBatChargeFaultChangeEvent( + val current: List, + val previous: List +) { + override fun toString(): String = buildString { + append("PowerSourceClusterBatChargeFaultChangeEvent {\n") + append("\tcurrent : $current\n") + append("\tprevious : $previous\n") + append("}\n") + } + + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tlvTag) + startArray(ContextSpecificTag(TAG_CURRENT)) + for (item in current.iterator()) { + put(AnonymousTag, item) + } + endArray() + startArray(ContextSpecificTag(TAG_PREVIOUS)) + for (item in previous.iterator()) { + put(AnonymousTag, item) + } + endArray() + endStructure() + } + } + + companion object { + private const val TAG_CURRENT = 0 + private const val TAG_PREVIOUS = 1 + + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): PowerSourceClusterBatChargeFaultChangeEvent { + tlvReader.enterStructure(tlvTag) + val current = + buildList { + tlvReader.enterArray(ContextSpecificTag(TAG_CURRENT)) + while (!tlvReader.isEndOfContainer()) { + this.add(tlvReader.getUInt(AnonymousTag)) + } + tlvReader.exitContainer() + } + val previous = + buildList { + tlvReader.enterArray(ContextSpecificTag(TAG_PREVIOUS)) + while (!tlvReader.isEndOfContainer()) { + this.add(tlvReader.getUInt(AnonymousTag)) + } + tlvReader.exitContainer() + } + + tlvReader.exitContainer() + + return PowerSourceClusterBatChargeFaultChangeEvent(current, previous) + } + } +} diff --git a/src/controller/java/generated/java/matter/devicecontroller/cluster/eventstructs/PowerSourceClusterBatFaultChangeEvent.kt b/src/controller/java/generated/java/matter/devicecontroller/cluster/eventstructs/PowerSourceClusterBatFaultChangeEvent.kt new file mode 100644 index 00000000000000..d1fd41e582dc94 --- /dev/null +++ b/src/controller/java/generated/java/matter/devicecontroller/cluster/eventstructs/PowerSourceClusterBatFaultChangeEvent.kt @@ -0,0 +1,79 @@ +/* + * + * Copyright (c) 2023 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package matter.devicecontroller.cluster.eventstructs + +import matter.devicecontroller.cluster.* +import matter.tlv.AnonymousTag +import matter.tlv.ContextSpecificTag +import matter.tlv.Tag +import matter.tlv.TlvReader +import matter.tlv.TlvWriter + +class PowerSourceClusterBatFaultChangeEvent(val current: List, val previous: List) { + override fun toString(): String = buildString { + append("PowerSourceClusterBatFaultChangeEvent {\n") + append("\tcurrent : $current\n") + append("\tprevious : $previous\n") + append("}\n") + } + + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tlvTag) + startArray(ContextSpecificTag(TAG_CURRENT)) + for (item in current.iterator()) { + put(AnonymousTag, item) + } + endArray() + startArray(ContextSpecificTag(TAG_PREVIOUS)) + for (item in previous.iterator()) { + put(AnonymousTag, item) + } + endArray() + endStructure() + } + } + + companion object { + private const val TAG_CURRENT = 0 + private const val TAG_PREVIOUS = 1 + + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): PowerSourceClusterBatFaultChangeEvent { + tlvReader.enterStructure(tlvTag) + val current = + buildList { + tlvReader.enterArray(ContextSpecificTag(TAG_CURRENT)) + while (!tlvReader.isEndOfContainer()) { + this.add(tlvReader.getUInt(AnonymousTag)) + } + tlvReader.exitContainer() + } + val previous = + buildList { + tlvReader.enterArray(ContextSpecificTag(TAG_PREVIOUS)) + while (!tlvReader.isEndOfContainer()) { + this.add(tlvReader.getUInt(AnonymousTag)) + } + tlvReader.exitContainer() + } + + tlvReader.exitContainer() + + return PowerSourceClusterBatFaultChangeEvent(current, previous) + } + } +} diff --git a/src/controller/java/generated/java/matter/devicecontroller/cluster/eventstructs/PowerSourceClusterWiredFaultChangeEvent.kt b/src/controller/java/generated/java/matter/devicecontroller/cluster/eventstructs/PowerSourceClusterWiredFaultChangeEvent.kt new file mode 100644 index 00000000000000..8aaacc0cb49fc4 --- /dev/null +++ b/src/controller/java/generated/java/matter/devicecontroller/cluster/eventstructs/PowerSourceClusterWiredFaultChangeEvent.kt @@ -0,0 +1,79 @@ +/* + * + * Copyright (c) 2023 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package matter.devicecontroller.cluster.eventstructs + +import matter.devicecontroller.cluster.* +import matter.tlv.AnonymousTag +import matter.tlv.ContextSpecificTag +import matter.tlv.Tag +import matter.tlv.TlvReader +import matter.tlv.TlvWriter + +class PowerSourceClusterWiredFaultChangeEvent(val current: List, val previous: List) { + override fun toString(): String = buildString { + append("PowerSourceClusterWiredFaultChangeEvent {\n") + append("\tcurrent : $current\n") + append("\tprevious : $previous\n") + append("}\n") + } + + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tlvTag) + startArray(ContextSpecificTag(TAG_CURRENT)) + for (item in current.iterator()) { + put(AnonymousTag, item) + } + endArray() + startArray(ContextSpecificTag(TAG_PREVIOUS)) + for (item in previous.iterator()) { + put(AnonymousTag, item) + } + endArray() + endStructure() + } + } + + companion object { + private const val TAG_CURRENT = 0 + private const val TAG_PREVIOUS = 1 + + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): PowerSourceClusterWiredFaultChangeEvent { + tlvReader.enterStructure(tlvTag) + val current = + buildList { + tlvReader.enterArray(ContextSpecificTag(TAG_CURRENT)) + while (!tlvReader.isEndOfContainer()) { + this.add(tlvReader.getUInt(AnonymousTag)) + } + tlvReader.exitContainer() + } + val previous = + buildList { + tlvReader.enterArray(ContextSpecificTag(TAG_PREVIOUS)) + while (!tlvReader.isEndOfContainer()) { + this.add(tlvReader.getUInt(AnonymousTag)) + } + tlvReader.exitContainer() + } + + tlvReader.exitContainer() + + return PowerSourceClusterWiredFaultChangeEvent(current, previous) + } + } +} diff --git a/src/controller/java/generated/java/matter/devicecontroller/cluster/eventstructs/RefrigeratorAlarmClusterNotifyEvent.kt b/src/controller/java/generated/java/matter/devicecontroller/cluster/eventstructs/RefrigeratorAlarmClusterNotifyEvent.kt new file mode 100644 index 00000000000000..ee7c9b8ebfaae6 --- /dev/null +++ b/src/controller/java/generated/java/matter/devicecontroller/cluster/eventstructs/RefrigeratorAlarmClusterNotifyEvent.kt @@ -0,0 +1,69 @@ +/* + * + * Copyright (c) 2023 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package matter.devicecontroller.cluster.eventstructs + +import matter.devicecontroller.cluster.* +import matter.tlv.ContextSpecificTag +import matter.tlv.Tag +import matter.tlv.TlvReader +import matter.tlv.TlvWriter + +class RefrigeratorAlarmClusterNotifyEvent( + val active: ULong, + val inactive: ULong, + val state: ULong, + val mask: ULong +) { + override fun toString(): String = buildString { + append("RefrigeratorAlarmClusterNotifyEvent {\n") + append("\tactive : $active\n") + append("\tinactive : $inactive\n") + append("\tstate : $state\n") + append("\tmask : $mask\n") + append("}\n") + } + + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tlvTag) + put(ContextSpecificTag(TAG_ACTIVE), active) + put(ContextSpecificTag(TAG_INACTIVE), inactive) + put(ContextSpecificTag(TAG_STATE), state) + put(ContextSpecificTag(TAG_MASK), mask) + endStructure() + } + } + + companion object { + private const val TAG_ACTIVE = 0 + private const val TAG_INACTIVE = 1 + private const val TAG_STATE = 2 + private const val TAG_MASK = 3 + + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): RefrigeratorAlarmClusterNotifyEvent { + tlvReader.enterStructure(tlvTag) + val active = tlvReader.getULong(ContextSpecificTag(TAG_ACTIVE)) + val inactive = tlvReader.getULong(ContextSpecificTag(TAG_INACTIVE)) + val state = tlvReader.getULong(ContextSpecificTag(TAG_STATE)) + val mask = tlvReader.getULong(ContextSpecificTag(TAG_MASK)) + + tlvReader.exitContainer() + + return RefrigeratorAlarmClusterNotifyEvent(active, inactive, state, mask) + } + } +} diff --git a/src/controller/java/generated/java/matter/devicecontroller/cluster/eventstructs/RvcOperationalStateClusterOperationCompletionEvent.kt b/src/controller/java/generated/java/matter/devicecontroller/cluster/eventstructs/RvcOperationalStateClusterOperationCompletionEvent.kt new file mode 100644 index 00000000000000..3004686f8b67d8 --- /dev/null +++ b/src/controller/java/generated/java/matter/devicecontroller/cluster/eventstructs/RvcOperationalStateClusterOperationCompletionEvent.kt @@ -0,0 +1,106 @@ +/* + * + * Copyright (c) 2023 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package matter.devicecontroller.cluster.eventstructs + +import java.util.Optional +import matter.devicecontroller.cluster.* +import matter.tlv.ContextSpecificTag +import matter.tlv.Tag +import matter.tlv.TlvReader +import matter.tlv.TlvWriter + +class RvcOperationalStateClusterOperationCompletionEvent( + val completionErrorCode: UInt, + val totalOperationalTime: Optional?, + val pausedTime: Optional? +) { + override fun toString(): String = buildString { + append("RvcOperationalStateClusterOperationCompletionEvent {\n") + append("\tcompletionErrorCode : $completionErrorCode\n") + append("\ttotalOperationalTime : $totalOperationalTime\n") + append("\tpausedTime : $pausedTime\n") + append("}\n") + } + + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tlvTag) + put(ContextSpecificTag(TAG_COMPLETION_ERROR_CODE), completionErrorCode) + if (totalOperationalTime != null) { + if (totalOperationalTime.isPresent) { + val opttotalOperationalTime = totalOperationalTime.get() + put(ContextSpecificTag(TAG_TOTAL_OPERATIONAL_TIME), opttotalOperationalTime) + } + } else { + putNull(ContextSpecificTag(TAG_TOTAL_OPERATIONAL_TIME)) + } + if (pausedTime != null) { + if (pausedTime.isPresent) { + val optpausedTime = pausedTime.get() + put(ContextSpecificTag(TAG_PAUSED_TIME), optpausedTime) + } + } else { + putNull(ContextSpecificTag(TAG_PAUSED_TIME)) + } + endStructure() + } + } + + companion object { + private const val TAG_COMPLETION_ERROR_CODE = 0 + private const val TAG_TOTAL_OPERATIONAL_TIME = 1 + private const val TAG_PAUSED_TIME = 2 + + fun fromTlv( + tlvTag: Tag, + tlvReader: TlvReader + ): RvcOperationalStateClusterOperationCompletionEvent { + tlvReader.enterStructure(tlvTag) + val completionErrorCode = tlvReader.getUInt(ContextSpecificTag(TAG_COMPLETION_ERROR_CODE)) + val totalOperationalTime = + if (!tlvReader.isNull()) { + if (tlvReader.isNextTag(ContextSpecificTag(TAG_TOTAL_OPERATIONAL_TIME))) { + Optional.of(tlvReader.getUInt(ContextSpecificTag(TAG_TOTAL_OPERATIONAL_TIME))) + } else { + Optional.empty() + } + } else { + tlvReader.getNull(ContextSpecificTag(TAG_TOTAL_OPERATIONAL_TIME)) + null + } + val pausedTime = + if (!tlvReader.isNull()) { + if (tlvReader.isNextTag(ContextSpecificTag(TAG_PAUSED_TIME))) { + Optional.of(tlvReader.getUInt(ContextSpecificTag(TAG_PAUSED_TIME))) + } else { + Optional.empty() + } + } else { + tlvReader.getNull(ContextSpecificTag(TAG_PAUSED_TIME)) + null + } + + tlvReader.exitContainer() + + return RvcOperationalStateClusterOperationCompletionEvent( + completionErrorCode, + totalOperationalTime, + pausedTime + ) + } + } +} diff --git a/src/controller/java/generated/java/matter/devicecontroller/cluster/eventstructs/RvcOperationalStateClusterOperationalErrorEvent.kt b/src/controller/java/generated/java/matter/devicecontroller/cluster/eventstructs/RvcOperationalStateClusterOperationalErrorEvent.kt new file mode 100644 index 00000000000000..ff973d17fe9684 --- /dev/null +++ b/src/controller/java/generated/java/matter/devicecontroller/cluster/eventstructs/RvcOperationalStateClusterOperationalErrorEvent.kt @@ -0,0 +1,61 @@ +/* + * + * Copyright (c) 2023 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package matter.devicecontroller.cluster.eventstructs + +import matter.devicecontroller.cluster.* +import matter.tlv.ContextSpecificTag +import matter.tlv.Tag +import matter.tlv.TlvReader +import matter.tlv.TlvWriter + +class RvcOperationalStateClusterOperationalErrorEvent( + val errorState: matter.devicecontroller.cluster.structs.RvcOperationalStateClusterErrorStateStruct +) { + override fun toString(): String = buildString { + append("RvcOperationalStateClusterOperationalErrorEvent {\n") + append("\terrorState : $errorState\n") + append("}\n") + } + + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tlvTag) + errorState.toTlv(ContextSpecificTag(TAG_ERROR_STATE), this) + endStructure() + } + } + + companion object { + private const val TAG_ERROR_STATE = 0 + + fun fromTlv( + tlvTag: Tag, + tlvReader: TlvReader + ): RvcOperationalStateClusterOperationalErrorEvent { + tlvReader.enterStructure(tlvTag) + val errorState = + matter.devicecontroller.cluster.structs.RvcOperationalStateClusterErrorStateStruct.fromTlv( + ContextSpecificTag(TAG_ERROR_STATE), + tlvReader + ) + + tlvReader.exitContainer() + + return RvcOperationalStateClusterOperationalErrorEvent(errorState) + } + } +} diff --git a/src/controller/java/generated/java/matter/devicecontroller/cluster/eventstructs/SmokeCoAlarmClusterCOAlarmEvent.kt b/src/controller/java/generated/java/matter/devicecontroller/cluster/eventstructs/SmokeCoAlarmClusterCOAlarmEvent.kt new file mode 100644 index 00000000000000..e70b19a92636d3 --- /dev/null +++ b/src/controller/java/generated/java/matter/devicecontroller/cluster/eventstructs/SmokeCoAlarmClusterCOAlarmEvent.kt @@ -0,0 +1,52 @@ +/* + * + * Copyright (c) 2023 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package matter.devicecontroller.cluster.eventstructs + +import matter.devicecontroller.cluster.* +import matter.tlv.ContextSpecificTag +import matter.tlv.Tag +import matter.tlv.TlvReader +import matter.tlv.TlvWriter + +class SmokeCoAlarmClusterCOAlarmEvent(val alarmSeverityLevel: UInt) { + override fun toString(): String = buildString { + append("SmokeCoAlarmClusterCOAlarmEvent {\n") + append("\talarmSeverityLevel : $alarmSeverityLevel\n") + append("}\n") + } + + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tlvTag) + put(ContextSpecificTag(TAG_ALARM_SEVERITY_LEVEL), alarmSeverityLevel) + endStructure() + } + } + + companion object { + private const val TAG_ALARM_SEVERITY_LEVEL = 0 + + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): SmokeCoAlarmClusterCOAlarmEvent { + tlvReader.enterStructure(tlvTag) + val alarmSeverityLevel = tlvReader.getUInt(ContextSpecificTag(TAG_ALARM_SEVERITY_LEVEL)) + + tlvReader.exitContainer() + + return SmokeCoAlarmClusterCOAlarmEvent(alarmSeverityLevel) + } + } +} diff --git a/src/controller/java/generated/java/matter/devicecontroller/cluster/eventstructs/SmokeCoAlarmClusterInterconnectCOAlarmEvent.kt b/src/controller/java/generated/java/matter/devicecontroller/cluster/eventstructs/SmokeCoAlarmClusterInterconnectCOAlarmEvent.kt new file mode 100644 index 00000000000000..51aa58966bfd4c --- /dev/null +++ b/src/controller/java/generated/java/matter/devicecontroller/cluster/eventstructs/SmokeCoAlarmClusterInterconnectCOAlarmEvent.kt @@ -0,0 +1,52 @@ +/* + * + * Copyright (c) 2023 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package matter.devicecontroller.cluster.eventstructs + +import matter.devicecontroller.cluster.* +import matter.tlv.ContextSpecificTag +import matter.tlv.Tag +import matter.tlv.TlvReader +import matter.tlv.TlvWriter + +class SmokeCoAlarmClusterInterconnectCOAlarmEvent(val alarmSeverityLevel: UInt) { + override fun toString(): String = buildString { + append("SmokeCoAlarmClusterInterconnectCOAlarmEvent {\n") + append("\talarmSeverityLevel : $alarmSeverityLevel\n") + append("}\n") + } + + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tlvTag) + put(ContextSpecificTag(TAG_ALARM_SEVERITY_LEVEL), alarmSeverityLevel) + endStructure() + } + } + + companion object { + private const val TAG_ALARM_SEVERITY_LEVEL = 0 + + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): SmokeCoAlarmClusterInterconnectCOAlarmEvent { + tlvReader.enterStructure(tlvTag) + val alarmSeverityLevel = tlvReader.getUInt(ContextSpecificTag(TAG_ALARM_SEVERITY_LEVEL)) + + tlvReader.exitContainer() + + return SmokeCoAlarmClusterInterconnectCOAlarmEvent(alarmSeverityLevel) + } + } +} diff --git a/src/controller/java/generated/java/matter/devicecontroller/cluster/eventstructs/SmokeCoAlarmClusterInterconnectSmokeAlarmEvent.kt b/src/controller/java/generated/java/matter/devicecontroller/cluster/eventstructs/SmokeCoAlarmClusterInterconnectSmokeAlarmEvent.kt new file mode 100644 index 00000000000000..4f2f7187caaa90 --- /dev/null +++ b/src/controller/java/generated/java/matter/devicecontroller/cluster/eventstructs/SmokeCoAlarmClusterInterconnectSmokeAlarmEvent.kt @@ -0,0 +1,52 @@ +/* + * + * Copyright (c) 2023 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package matter.devicecontroller.cluster.eventstructs + +import matter.devicecontroller.cluster.* +import matter.tlv.ContextSpecificTag +import matter.tlv.Tag +import matter.tlv.TlvReader +import matter.tlv.TlvWriter + +class SmokeCoAlarmClusterInterconnectSmokeAlarmEvent(val alarmSeverityLevel: UInt) { + override fun toString(): String = buildString { + append("SmokeCoAlarmClusterInterconnectSmokeAlarmEvent {\n") + append("\talarmSeverityLevel : $alarmSeverityLevel\n") + append("}\n") + } + + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tlvTag) + put(ContextSpecificTag(TAG_ALARM_SEVERITY_LEVEL), alarmSeverityLevel) + endStructure() + } + } + + companion object { + private const val TAG_ALARM_SEVERITY_LEVEL = 0 + + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): SmokeCoAlarmClusterInterconnectSmokeAlarmEvent { + tlvReader.enterStructure(tlvTag) + val alarmSeverityLevel = tlvReader.getUInt(ContextSpecificTag(TAG_ALARM_SEVERITY_LEVEL)) + + tlvReader.exitContainer() + + return SmokeCoAlarmClusterInterconnectSmokeAlarmEvent(alarmSeverityLevel) + } + } +} diff --git a/src/controller/java/generated/java/matter/devicecontroller/cluster/eventstructs/SmokeCoAlarmClusterLowBatteryEvent.kt b/src/controller/java/generated/java/matter/devicecontroller/cluster/eventstructs/SmokeCoAlarmClusterLowBatteryEvent.kt new file mode 100644 index 00000000000000..0fd098880eddcf --- /dev/null +++ b/src/controller/java/generated/java/matter/devicecontroller/cluster/eventstructs/SmokeCoAlarmClusterLowBatteryEvent.kt @@ -0,0 +1,52 @@ +/* + * + * Copyright (c) 2023 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package matter.devicecontroller.cluster.eventstructs + +import matter.devicecontroller.cluster.* +import matter.tlv.ContextSpecificTag +import matter.tlv.Tag +import matter.tlv.TlvReader +import matter.tlv.TlvWriter + +class SmokeCoAlarmClusterLowBatteryEvent(val alarmSeverityLevel: UInt) { + override fun toString(): String = buildString { + append("SmokeCoAlarmClusterLowBatteryEvent {\n") + append("\talarmSeverityLevel : $alarmSeverityLevel\n") + append("}\n") + } + + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tlvTag) + put(ContextSpecificTag(TAG_ALARM_SEVERITY_LEVEL), alarmSeverityLevel) + endStructure() + } + } + + companion object { + private const val TAG_ALARM_SEVERITY_LEVEL = 0 + + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): SmokeCoAlarmClusterLowBatteryEvent { + tlvReader.enterStructure(tlvTag) + val alarmSeverityLevel = tlvReader.getUInt(ContextSpecificTag(TAG_ALARM_SEVERITY_LEVEL)) + + tlvReader.exitContainer() + + return SmokeCoAlarmClusterLowBatteryEvent(alarmSeverityLevel) + } + } +} diff --git a/src/controller/java/generated/java/matter/devicecontroller/cluster/eventstructs/SmokeCoAlarmClusterSmokeAlarmEvent.kt b/src/controller/java/generated/java/matter/devicecontroller/cluster/eventstructs/SmokeCoAlarmClusterSmokeAlarmEvent.kt new file mode 100644 index 00000000000000..f2b985b06eb48f --- /dev/null +++ b/src/controller/java/generated/java/matter/devicecontroller/cluster/eventstructs/SmokeCoAlarmClusterSmokeAlarmEvent.kt @@ -0,0 +1,52 @@ +/* + * + * Copyright (c) 2023 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package matter.devicecontroller.cluster.eventstructs + +import matter.devicecontroller.cluster.* +import matter.tlv.ContextSpecificTag +import matter.tlv.Tag +import matter.tlv.TlvReader +import matter.tlv.TlvWriter + +class SmokeCoAlarmClusterSmokeAlarmEvent(val alarmSeverityLevel: UInt) { + override fun toString(): String = buildString { + append("SmokeCoAlarmClusterSmokeAlarmEvent {\n") + append("\talarmSeverityLevel : $alarmSeverityLevel\n") + append("}\n") + } + + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tlvTag) + put(ContextSpecificTag(TAG_ALARM_SEVERITY_LEVEL), alarmSeverityLevel) + endStructure() + } + } + + companion object { + private const val TAG_ALARM_SEVERITY_LEVEL = 0 + + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): SmokeCoAlarmClusterSmokeAlarmEvent { + tlvReader.enterStructure(tlvTag) + val alarmSeverityLevel = tlvReader.getUInt(ContextSpecificTag(TAG_ALARM_SEVERITY_LEVEL)) + + tlvReader.exitContainer() + + return SmokeCoAlarmClusterSmokeAlarmEvent(alarmSeverityLevel) + } + } +} diff --git a/src/controller/java/generated/java/matter/devicecontroller/cluster/eventstructs/SoftwareDiagnosticsClusterSoftwareFaultEvent.kt b/src/controller/java/generated/java/matter/devicecontroller/cluster/eventstructs/SoftwareDiagnosticsClusterSoftwareFaultEvent.kt new file mode 100644 index 00000000000000..f7e1378e5ed2b7 --- /dev/null +++ b/src/controller/java/generated/java/matter/devicecontroller/cluster/eventstructs/SoftwareDiagnosticsClusterSoftwareFaultEvent.kt @@ -0,0 +1,81 @@ +/* + * + * Copyright (c) 2023 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package matter.devicecontroller.cluster.eventstructs + +import java.util.Optional +import matter.devicecontroller.cluster.* +import matter.tlv.ContextSpecificTag +import matter.tlv.Tag +import matter.tlv.TlvReader +import matter.tlv.TlvWriter + +class SoftwareDiagnosticsClusterSoftwareFaultEvent( + val id: ULong, + val name: Optional, + val faultRecording: Optional +) { + override fun toString(): String = buildString { + append("SoftwareDiagnosticsClusterSoftwareFaultEvent {\n") + append("\tid : $id\n") + append("\tname : $name\n") + append("\tfaultRecording : $faultRecording\n") + append("}\n") + } + + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tlvTag) + put(ContextSpecificTag(TAG_ID), id) + if (name.isPresent) { + val optname = name.get() + put(ContextSpecificTag(TAG_NAME), optname) + } + if (faultRecording.isPresent) { + val optfaultRecording = faultRecording.get() + put(ContextSpecificTag(TAG_FAULT_RECORDING), optfaultRecording) + } + endStructure() + } + } + + companion object { + private const val TAG_ID = 0 + private const val TAG_NAME = 1 + private const val TAG_FAULT_RECORDING = 2 + + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): SoftwareDiagnosticsClusterSoftwareFaultEvent { + tlvReader.enterStructure(tlvTag) + val id = tlvReader.getULong(ContextSpecificTag(TAG_ID)) + val name = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_NAME))) { + Optional.of(tlvReader.getString(ContextSpecificTag(TAG_NAME))) + } else { + Optional.empty() + } + val faultRecording = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_FAULT_RECORDING))) { + Optional.of(tlvReader.getByteArray(ContextSpecificTag(TAG_FAULT_RECORDING))) + } else { + Optional.empty() + } + + tlvReader.exitContainer() + + return SoftwareDiagnosticsClusterSoftwareFaultEvent(id, name, faultRecording) + } + } +} diff --git a/src/controller/java/generated/java/matter/devicecontroller/cluster/eventstructs/SwitchClusterInitialPressEvent.kt b/src/controller/java/generated/java/matter/devicecontroller/cluster/eventstructs/SwitchClusterInitialPressEvent.kt new file mode 100644 index 00000000000000..630fd921464fad --- /dev/null +++ b/src/controller/java/generated/java/matter/devicecontroller/cluster/eventstructs/SwitchClusterInitialPressEvent.kt @@ -0,0 +1,52 @@ +/* + * + * Copyright (c) 2023 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package matter.devicecontroller.cluster.eventstructs + +import matter.devicecontroller.cluster.* +import matter.tlv.ContextSpecificTag +import matter.tlv.Tag +import matter.tlv.TlvReader +import matter.tlv.TlvWriter + +class SwitchClusterInitialPressEvent(val newPosition: UByte) { + override fun toString(): String = buildString { + append("SwitchClusterInitialPressEvent {\n") + append("\tnewPosition : $newPosition\n") + append("}\n") + } + + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tlvTag) + put(ContextSpecificTag(TAG_NEW_POSITION), newPosition) + endStructure() + } + } + + companion object { + private const val TAG_NEW_POSITION = 0 + + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): SwitchClusterInitialPressEvent { + tlvReader.enterStructure(tlvTag) + val newPosition = tlvReader.getUByte(ContextSpecificTag(TAG_NEW_POSITION)) + + tlvReader.exitContainer() + + return SwitchClusterInitialPressEvent(newPosition) + } + } +} diff --git a/src/controller/java/generated/java/matter/devicecontroller/cluster/eventstructs/SwitchClusterLongPressEvent.kt b/src/controller/java/generated/java/matter/devicecontroller/cluster/eventstructs/SwitchClusterLongPressEvent.kt new file mode 100644 index 00000000000000..b586d1687d64a9 --- /dev/null +++ b/src/controller/java/generated/java/matter/devicecontroller/cluster/eventstructs/SwitchClusterLongPressEvent.kt @@ -0,0 +1,52 @@ +/* + * + * Copyright (c) 2023 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package matter.devicecontroller.cluster.eventstructs + +import matter.devicecontroller.cluster.* +import matter.tlv.ContextSpecificTag +import matter.tlv.Tag +import matter.tlv.TlvReader +import matter.tlv.TlvWriter + +class SwitchClusterLongPressEvent(val newPosition: UByte) { + override fun toString(): String = buildString { + append("SwitchClusterLongPressEvent {\n") + append("\tnewPosition : $newPosition\n") + append("}\n") + } + + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tlvTag) + put(ContextSpecificTag(TAG_NEW_POSITION), newPosition) + endStructure() + } + } + + companion object { + private const val TAG_NEW_POSITION = 0 + + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): SwitchClusterLongPressEvent { + tlvReader.enterStructure(tlvTag) + val newPosition = tlvReader.getUByte(ContextSpecificTag(TAG_NEW_POSITION)) + + tlvReader.exitContainer() + + return SwitchClusterLongPressEvent(newPosition) + } + } +} diff --git a/src/controller/java/generated/java/matter/devicecontroller/cluster/eventstructs/SwitchClusterLongReleaseEvent.kt b/src/controller/java/generated/java/matter/devicecontroller/cluster/eventstructs/SwitchClusterLongReleaseEvent.kt new file mode 100644 index 00000000000000..6b7ea992a3821e --- /dev/null +++ b/src/controller/java/generated/java/matter/devicecontroller/cluster/eventstructs/SwitchClusterLongReleaseEvent.kt @@ -0,0 +1,52 @@ +/* + * + * Copyright (c) 2023 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package matter.devicecontroller.cluster.eventstructs + +import matter.devicecontroller.cluster.* +import matter.tlv.ContextSpecificTag +import matter.tlv.Tag +import matter.tlv.TlvReader +import matter.tlv.TlvWriter + +class SwitchClusterLongReleaseEvent(val previousPosition: UByte) { + override fun toString(): String = buildString { + append("SwitchClusterLongReleaseEvent {\n") + append("\tpreviousPosition : $previousPosition\n") + append("}\n") + } + + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tlvTag) + put(ContextSpecificTag(TAG_PREVIOUS_POSITION), previousPosition) + endStructure() + } + } + + companion object { + private const val TAG_PREVIOUS_POSITION = 0 + + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): SwitchClusterLongReleaseEvent { + tlvReader.enterStructure(tlvTag) + val previousPosition = tlvReader.getUByte(ContextSpecificTag(TAG_PREVIOUS_POSITION)) + + tlvReader.exitContainer() + + return SwitchClusterLongReleaseEvent(previousPosition) + } + } +} diff --git a/src/controller/java/generated/java/matter/devicecontroller/cluster/eventstructs/SwitchClusterMultiPressCompleteEvent.kt b/src/controller/java/generated/java/matter/devicecontroller/cluster/eventstructs/SwitchClusterMultiPressCompleteEvent.kt new file mode 100644 index 00000000000000..79bbef0ee9dd7d --- /dev/null +++ b/src/controller/java/generated/java/matter/devicecontroller/cluster/eventstructs/SwitchClusterMultiPressCompleteEvent.kt @@ -0,0 +1,60 @@ +/* + * + * Copyright (c) 2023 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package matter.devicecontroller.cluster.eventstructs + +import matter.devicecontroller.cluster.* +import matter.tlv.ContextSpecificTag +import matter.tlv.Tag +import matter.tlv.TlvReader +import matter.tlv.TlvWriter + +class SwitchClusterMultiPressCompleteEvent( + val previousPosition: UByte, + val totalNumberOfPressesCounted: UByte +) { + override fun toString(): String = buildString { + append("SwitchClusterMultiPressCompleteEvent {\n") + append("\tpreviousPosition : $previousPosition\n") + append("\ttotalNumberOfPressesCounted : $totalNumberOfPressesCounted\n") + append("}\n") + } + + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tlvTag) + put(ContextSpecificTag(TAG_PREVIOUS_POSITION), previousPosition) + put(ContextSpecificTag(TAG_TOTAL_NUMBER_OF_PRESSES_COUNTED), totalNumberOfPressesCounted) + endStructure() + } + } + + companion object { + private const val TAG_PREVIOUS_POSITION = 0 + private const val TAG_TOTAL_NUMBER_OF_PRESSES_COUNTED = 1 + + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): SwitchClusterMultiPressCompleteEvent { + tlvReader.enterStructure(tlvTag) + val previousPosition = tlvReader.getUByte(ContextSpecificTag(TAG_PREVIOUS_POSITION)) + val totalNumberOfPressesCounted = + tlvReader.getUByte(ContextSpecificTag(TAG_TOTAL_NUMBER_OF_PRESSES_COUNTED)) + + tlvReader.exitContainer() + + return SwitchClusterMultiPressCompleteEvent(previousPosition, totalNumberOfPressesCounted) + } + } +} diff --git a/src/controller/java/generated/java/matter/devicecontroller/cluster/eventstructs/SwitchClusterMultiPressOngoingEvent.kt b/src/controller/java/generated/java/matter/devicecontroller/cluster/eventstructs/SwitchClusterMultiPressOngoingEvent.kt new file mode 100644 index 00000000000000..bced01633d76ef --- /dev/null +++ b/src/controller/java/generated/java/matter/devicecontroller/cluster/eventstructs/SwitchClusterMultiPressOngoingEvent.kt @@ -0,0 +1,60 @@ +/* + * + * Copyright (c) 2023 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package matter.devicecontroller.cluster.eventstructs + +import matter.devicecontroller.cluster.* +import matter.tlv.ContextSpecificTag +import matter.tlv.Tag +import matter.tlv.TlvReader +import matter.tlv.TlvWriter + +class SwitchClusterMultiPressOngoingEvent( + val newPosition: UByte, + val currentNumberOfPressesCounted: UByte +) { + override fun toString(): String = buildString { + append("SwitchClusterMultiPressOngoingEvent {\n") + append("\tnewPosition : $newPosition\n") + append("\tcurrentNumberOfPressesCounted : $currentNumberOfPressesCounted\n") + append("}\n") + } + + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tlvTag) + put(ContextSpecificTag(TAG_NEW_POSITION), newPosition) + put(ContextSpecificTag(TAG_CURRENT_NUMBER_OF_PRESSES_COUNTED), currentNumberOfPressesCounted) + endStructure() + } + } + + companion object { + private const val TAG_NEW_POSITION = 0 + private const val TAG_CURRENT_NUMBER_OF_PRESSES_COUNTED = 1 + + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): SwitchClusterMultiPressOngoingEvent { + tlvReader.enterStructure(tlvTag) + val newPosition = tlvReader.getUByte(ContextSpecificTag(TAG_NEW_POSITION)) + val currentNumberOfPressesCounted = + tlvReader.getUByte(ContextSpecificTag(TAG_CURRENT_NUMBER_OF_PRESSES_COUNTED)) + + tlvReader.exitContainer() + + return SwitchClusterMultiPressOngoingEvent(newPosition, currentNumberOfPressesCounted) + } + } +} diff --git a/src/controller/java/generated/java/matter/devicecontroller/cluster/eventstructs/SwitchClusterShortReleaseEvent.kt b/src/controller/java/generated/java/matter/devicecontroller/cluster/eventstructs/SwitchClusterShortReleaseEvent.kt new file mode 100644 index 00000000000000..6c9c2272f2ab38 --- /dev/null +++ b/src/controller/java/generated/java/matter/devicecontroller/cluster/eventstructs/SwitchClusterShortReleaseEvent.kt @@ -0,0 +1,52 @@ +/* + * + * Copyright (c) 2023 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package matter.devicecontroller.cluster.eventstructs + +import matter.devicecontroller.cluster.* +import matter.tlv.ContextSpecificTag +import matter.tlv.Tag +import matter.tlv.TlvReader +import matter.tlv.TlvWriter + +class SwitchClusterShortReleaseEvent(val previousPosition: UByte) { + override fun toString(): String = buildString { + append("SwitchClusterShortReleaseEvent {\n") + append("\tpreviousPosition : $previousPosition\n") + append("}\n") + } + + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tlvTag) + put(ContextSpecificTag(TAG_PREVIOUS_POSITION), previousPosition) + endStructure() + } + } + + companion object { + private const val TAG_PREVIOUS_POSITION = 0 + + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): SwitchClusterShortReleaseEvent { + tlvReader.enterStructure(tlvTag) + val previousPosition = tlvReader.getUByte(ContextSpecificTag(TAG_PREVIOUS_POSITION)) + + tlvReader.exitContainer() + + return SwitchClusterShortReleaseEvent(previousPosition) + } + } +} diff --git a/src/controller/java/generated/java/matter/devicecontroller/cluster/eventstructs/SwitchClusterSwitchLatchedEvent.kt b/src/controller/java/generated/java/matter/devicecontroller/cluster/eventstructs/SwitchClusterSwitchLatchedEvent.kt new file mode 100644 index 00000000000000..8c5ee4f9f83edf --- /dev/null +++ b/src/controller/java/generated/java/matter/devicecontroller/cluster/eventstructs/SwitchClusterSwitchLatchedEvent.kt @@ -0,0 +1,52 @@ +/* + * + * Copyright (c) 2023 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package matter.devicecontroller.cluster.eventstructs + +import matter.devicecontroller.cluster.* +import matter.tlv.ContextSpecificTag +import matter.tlv.Tag +import matter.tlv.TlvReader +import matter.tlv.TlvWriter + +class SwitchClusterSwitchLatchedEvent(val newPosition: UByte) { + override fun toString(): String = buildString { + append("SwitchClusterSwitchLatchedEvent {\n") + append("\tnewPosition : $newPosition\n") + append("}\n") + } + + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tlvTag) + put(ContextSpecificTag(TAG_NEW_POSITION), newPosition) + endStructure() + } + } + + companion object { + private const val TAG_NEW_POSITION = 0 + + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): SwitchClusterSwitchLatchedEvent { + tlvReader.enterStructure(tlvTag) + val newPosition = tlvReader.getUByte(ContextSpecificTag(TAG_NEW_POSITION)) + + tlvReader.exitContainer() + + return SwitchClusterSwitchLatchedEvent(newPosition) + } + } +} diff --git a/src/controller/java/generated/java/matter/devicecontroller/cluster/eventstructs/ThreadNetworkDiagnosticsClusterConnectionStatusEvent.kt b/src/controller/java/generated/java/matter/devicecontroller/cluster/eventstructs/ThreadNetworkDiagnosticsClusterConnectionStatusEvent.kt new file mode 100644 index 00000000000000..b771bd2b0f402c --- /dev/null +++ b/src/controller/java/generated/java/matter/devicecontroller/cluster/eventstructs/ThreadNetworkDiagnosticsClusterConnectionStatusEvent.kt @@ -0,0 +1,55 @@ +/* + * + * Copyright (c) 2023 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package matter.devicecontroller.cluster.eventstructs + +import matter.devicecontroller.cluster.* +import matter.tlv.ContextSpecificTag +import matter.tlv.Tag +import matter.tlv.TlvReader +import matter.tlv.TlvWriter + +class ThreadNetworkDiagnosticsClusterConnectionStatusEvent(val connectionStatus: UInt) { + override fun toString(): String = buildString { + append("ThreadNetworkDiagnosticsClusterConnectionStatusEvent {\n") + append("\tconnectionStatus : $connectionStatus\n") + append("}\n") + } + + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tlvTag) + put(ContextSpecificTag(TAG_CONNECTION_STATUS), connectionStatus) + endStructure() + } + } + + companion object { + private const val TAG_CONNECTION_STATUS = 0 + + fun fromTlv( + tlvTag: Tag, + tlvReader: TlvReader + ): ThreadNetworkDiagnosticsClusterConnectionStatusEvent { + tlvReader.enterStructure(tlvTag) + val connectionStatus = tlvReader.getUInt(ContextSpecificTag(TAG_CONNECTION_STATUS)) + + tlvReader.exitContainer() + + return ThreadNetworkDiagnosticsClusterConnectionStatusEvent(connectionStatus) + } + } +} diff --git a/src/controller/java/generated/java/matter/devicecontroller/cluster/eventstructs/ThreadNetworkDiagnosticsClusterNetworkFaultChangeEvent.kt b/src/controller/java/generated/java/matter/devicecontroller/cluster/eventstructs/ThreadNetworkDiagnosticsClusterNetworkFaultChangeEvent.kt new file mode 100644 index 00000000000000..827abfa1377c6a --- /dev/null +++ b/src/controller/java/generated/java/matter/devicecontroller/cluster/eventstructs/ThreadNetworkDiagnosticsClusterNetworkFaultChangeEvent.kt @@ -0,0 +1,85 @@ +/* + * + * Copyright (c) 2023 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package matter.devicecontroller.cluster.eventstructs + +import matter.devicecontroller.cluster.* +import matter.tlv.AnonymousTag +import matter.tlv.ContextSpecificTag +import matter.tlv.Tag +import matter.tlv.TlvReader +import matter.tlv.TlvWriter + +class ThreadNetworkDiagnosticsClusterNetworkFaultChangeEvent( + val current: List, + val previous: List +) { + override fun toString(): String = buildString { + append("ThreadNetworkDiagnosticsClusterNetworkFaultChangeEvent {\n") + append("\tcurrent : $current\n") + append("\tprevious : $previous\n") + append("}\n") + } + + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tlvTag) + startArray(ContextSpecificTag(TAG_CURRENT)) + for (item in current.iterator()) { + put(AnonymousTag, item) + } + endArray() + startArray(ContextSpecificTag(TAG_PREVIOUS)) + for (item in previous.iterator()) { + put(AnonymousTag, item) + } + endArray() + endStructure() + } + } + + companion object { + private const val TAG_CURRENT = 0 + private const val TAG_PREVIOUS = 1 + + fun fromTlv( + tlvTag: Tag, + tlvReader: TlvReader + ): ThreadNetworkDiagnosticsClusterNetworkFaultChangeEvent { + tlvReader.enterStructure(tlvTag) + val current = + buildList { + tlvReader.enterArray(ContextSpecificTag(TAG_CURRENT)) + while (!tlvReader.isEndOfContainer()) { + this.add(tlvReader.getUInt(AnonymousTag)) + } + tlvReader.exitContainer() + } + val previous = + buildList { + tlvReader.enterArray(ContextSpecificTag(TAG_PREVIOUS)) + while (!tlvReader.isEndOfContainer()) { + this.add(tlvReader.getUInt(AnonymousTag)) + } + tlvReader.exitContainer() + } + + tlvReader.exitContainer() + + return ThreadNetworkDiagnosticsClusterNetworkFaultChangeEvent(current, previous) + } + } +} diff --git a/src/controller/java/generated/java/matter/devicecontroller/cluster/eventstructs/TimeSynchronizationClusterDSTStatusEvent.kt b/src/controller/java/generated/java/matter/devicecontroller/cluster/eventstructs/TimeSynchronizationClusterDSTStatusEvent.kt new file mode 100644 index 00000000000000..e20bc34335426f --- /dev/null +++ b/src/controller/java/generated/java/matter/devicecontroller/cluster/eventstructs/TimeSynchronizationClusterDSTStatusEvent.kt @@ -0,0 +1,52 @@ +/* + * + * Copyright (c) 2023 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package matter.devicecontroller.cluster.eventstructs + +import matter.devicecontroller.cluster.* +import matter.tlv.ContextSpecificTag +import matter.tlv.Tag +import matter.tlv.TlvReader +import matter.tlv.TlvWriter + +class TimeSynchronizationClusterDSTStatusEvent(val DSTOffsetActive: Boolean) { + override fun toString(): String = buildString { + append("TimeSynchronizationClusterDSTStatusEvent {\n") + append("\tDSTOffsetActive : $DSTOffsetActive\n") + append("}\n") + } + + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tlvTag) + put(ContextSpecificTag(TAG_D_S_T_OFFSET_ACTIVE), DSTOffsetActive) + endStructure() + } + } + + companion object { + private const val TAG_D_S_T_OFFSET_ACTIVE = 0 + + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): TimeSynchronizationClusterDSTStatusEvent { + tlvReader.enterStructure(tlvTag) + val DSTOffsetActive = tlvReader.getBoolean(ContextSpecificTag(TAG_D_S_T_OFFSET_ACTIVE)) + + tlvReader.exitContainer() + + return TimeSynchronizationClusterDSTStatusEvent(DSTOffsetActive) + } + } +} diff --git a/src/controller/java/generated/java/matter/devicecontroller/cluster/eventstructs/TimeSynchronizationClusterTimeZoneStatusEvent.kt b/src/controller/java/generated/java/matter/devicecontroller/cluster/eventstructs/TimeSynchronizationClusterTimeZoneStatusEvent.kt new file mode 100644 index 00000000000000..552027845f991d --- /dev/null +++ b/src/controller/java/generated/java/matter/devicecontroller/cluster/eventstructs/TimeSynchronizationClusterTimeZoneStatusEvent.kt @@ -0,0 +1,65 @@ +/* + * + * Copyright (c) 2023 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package matter.devicecontroller.cluster.eventstructs + +import java.util.Optional +import matter.devicecontroller.cluster.* +import matter.tlv.ContextSpecificTag +import matter.tlv.Tag +import matter.tlv.TlvReader +import matter.tlv.TlvWriter + +class TimeSynchronizationClusterTimeZoneStatusEvent(val offset: Int, val name: Optional) { + override fun toString(): String = buildString { + append("TimeSynchronizationClusterTimeZoneStatusEvent {\n") + append("\toffset : $offset\n") + append("\tname : $name\n") + append("}\n") + } + + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tlvTag) + put(ContextSpecificTag(TAG_OFFSET), offset) + if (name.isPresent) { + val optname = name.get() + put(ContextSpecificTag(TAG_NAME), optname) + } + endStructure() + } + } + + companion object { + private const val TAG_OFFSET = 0 + private const val TAG_NAME = 1 + + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): TimeSynchronizationClusterTimeZoneStatusEvent { + tlvReader.enterStructure(tlvTag) + val offset = tlvReader.getInt(ContextSpecificTag(TAG_OFFSET)) + val name = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_NAME))) { + Optional.of(tlvReader.getString(ContextSpecificTag(TAG_NAME))) + } else { + Optional.empty() + } + + tlvReader.exitContainer() + + return TimeSynchronizationClusterTimeZoneStatusEvent(offset, name) + } + } +} diff --git a/src/controller/java/generated/java/matter/devicecontroller/cluster/eventstructs/UnitTestingClusterTestEventEvent.kt b/src/controller/java/generated/java/matter/devicecontroller/cluster/eventstructs/UnitTestingClusterTestEventEvent.kt new file mode 100644 index 00000000000000..2993e43dedc6cd --- /dev/null +++ b/src/controller/java/generated/java/matter/devicecontroller/cluster/eventstructs/UnitTestingClusterTestEventEvent.kt @@ -0,0 +1,111 @@ +/* + * + * Copyright (c) 2023 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package matter.devicecontroller.cluster.eventstructs + +import matter.devicecontroller.cluster.* +import matter.tlv.AnonymousTag +import matter.tlv.ContextSpecificTag +import matter.tlv.Tag +import matter.tlv.TlvReader +import matter.tlv.TlvWriter + +class UnitTestingClusterTestEventEvent( + val arg1: UByte, + val arg2: UInt, + val arg3: Boolean, + val arg4: matter.devicecontroller.cluster.structs.UnitTestingClusterSimpleStruct, + val arg5: List, + val arg6: List +) { + override fun toString(): String = buildString { + append("UnitTestingClusterTestEventEvent {\n") + append("\targ1 : $arg1\n") + append("\targ2 : $arg2\n") + append("\targ3 : $arg3\n") + append("\targ4 : $arg4\n") + append("\targ5 : $arg5\n") + append("\targ6 : $arg6\n") + append("}\n") + } + + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tlvTag) + put(ContextSpecificTag(TAG_ARG1), arg1) + put(ContextSpecificTag(TAG_ARG2), arg2) + put(ContextSpecificTag(TAG_ARG3), arg3) + arg4.toTlv(ContextSpecificTag(TAG_ARG4), this) + startArray(ContextSpecificTag(TAG_ARG5)) + for (item in arg5.iterator()) { + item.toTlv(AnonymousTag, this) + } + endArray() + startArray(ContextSpecificTag(TAG_ARG6)) + for (item in arg6.iterator()) { + put(AnonymousTag, item) + } + endArray() + endStructure() + } + } + + companion object { + private const val TAG_ARG1 = 1 + private const val TAG_ARG2 = 2 + private const val TAG_ARG3 = 3 + private const val TAG_ARG4 = 4 + private const val TAG_ARG5 = 5 + private const val TAG_ARG6 = 6 + + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): UnitTestingClusterTestEventEvent { + tlvReader.enterStructure(tlvTag) + val arg1 = tlvReader.getUByte(ContextSpecificTag(TAG_ARG1)) + val arg2 = tlvReader.getUInt(ContextSpecificTag(TAG_ARG2)) + val arg3 = tlvReader.getBoolean(ContextSpecificTag(TAG_ARG3)) + val arg4 = + matter.devicecontroller.cluster.structs.UnitTestingClusterSimpleStruct.fromTlv( + ContextSpecificTag(TAG_ARG4), + tlvReader + ) + val arg5 = + buildList { + tlvReader.enterArray(ContextSpecificTag(TAG_ARG5)) + while (!tlvReader.isEndOfContainer()) { + this.add( + matter.devicecontroller.cluster.structs.UnitTestingClusterSimpleStruct.fromTlv( + AnonymousTag, + tlvReader + ) + ) + } + tlvReader.exitContainer() + } + val arg6 = + buildList { + tlvReader.enterArray(ContextSpecificTag(TAG_ARG6)) + while (!tlvReader.isEndOfContainer()) { + this.add(tlvReader.getUInt(AnonymousTag)) + } + tlvReader.exitContainer() + } + + tlvReader.exitContainer() + + return UnitTestingClusterTestEventEvent(arg1, arg2, arg3, arg4, arg5, arg6) + } + } +} diff --git a/src/controller/java/generated/java/matter/devicecontroller/cluster/eventstructs/UnitTestingClusterTestFabricScopedEventEvent.kt b/src/controller/java/generated/java/matter/devicecontroller/cluster/eventstructs/UnitTestingClusterTestFabricScopedEventEvent.kt new file mode 100644 index 00000000000000..bdf1b54a00b31f --- /dev/null +++ b/src/controller/java/generated/java/matter/devicecontroller/cluster/eventstructs/UnitTestingClusterTestFabricScopedEventEvent.kt @@ -0,0 +1,52 @@ +/* + * + * Copyright (c) 2023 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package matter.devicecontroller.cluster.eventstructs + +import matter.devicecontroller.cluster.* +import matter.tlv.ContextSpecificTag +import matter.tlv.Tag +import matter.tlv.TlvReader +import matter.tlv.TlvWriter + +class UnitTestingClusterTestFabricScopedEventEvent(val fabricIndex: UByte) { + override fun toString(): String = buildString { + append("UnitTestingClusterTestFabricScopedEventEvent {\n") + append("\tfabricIndex : $fabricIndex\n") + append("}\n") + } + + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tlvTag) + put(ContextSpecificTag(TAG_FABRIC_INDEX), fabricIndex) + endStructure() + } + } + + companion object { + private const val TAG_FABRIC_INDEX = 254 + + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): UnitTestingClusterTestFabricScopedEventEvent { + tlvReader.enterStructure(tlvTag) + val fabricIndex = tlvReader.getUByte(ContextSpecificTag(TAG_FABRIC_INDEX)) + + tlvReader.exitContainer() + + return UnitTestingClusterTestFabricScopedEventEvent(fabricIndex) + } + } +} diff --git a/src/controller/java/generated/java/matter/devicecontroller/cluster/eventstructs/WiFiNetworkDiagnosticsClusterAssociationFailureEvent.kt b/src/controller/java/generated/java/matter/devicecontroller/cluster/eventstructs/WiFiNetworkDiagnosticsClusterAssociationFailureEvent.kt new file mode 100644 index 00000000000000..7848c8b2ba73a4 --- /dev/null +++ b/src/controller/java/generated/java/matter/devicecontroller/cluster/eventstructs/WiFiNetworkDiagnosticsClusterAssociationFailureEvent.kt @@ -0,0 +1,62 @@ +/* + * + * Copyright (c) 2023 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package matter.devicecontroller.cluster.eventstructs + +import matter.devicecontroller.cluster.* +import matter.tlv.ContextSpecificTag +import matter.tlv.Tag +import matter.tlv.TlvReader +import matter.tlv.TlvWriter + +class WiFiNetworkDiagnosticsClusterAssociationFailureEvent( + val associationFailure: UInt, + val status: UShort +) { + override fun toString(): String = buildString { + append("WiFiNetworkDiagnosticsClusterAssociationFailureEvent {\n") + append("\tassociationFailure : $associationFailure\n") + append("\tstatus : $status\n") + append("}\n") + } + + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tlvTag) + put(ContextSpecificTag(TAG_ASSOCIATION_FAILURE), associationFailure) + put(ContextSpecificTag(TAG_STATUS), status) + endStructure() + } + } + + companion object { + private const val TAG_ASSOCIATION_FAILURE = 0 + private const val TAG_STATUS = 1 + + fun fromTlv( + tlvTag: Tag, + tlvReader: TlvReader + ): WiFiNetworkDiagnosticsClusterAssociationFailureEvent { + tlvReader.enterStructure(tlvTag) + val associationFailure = tlvReader.getUInt(ContextSpecificTag(TAG_ASSOCIATION_FAILURE)) + val status = tlvReader.getUShort(ContextSpecificTag(TAG_STATUS)) + + tlvReader.exitContainer() + + return WiFiNetworkDiagnosticsClusterAssociationFailureEvent(associationFailure, status) + } + } +} diff --git a/src/controller/java/generated/java/matter/devicecontroller/cluster/eventstructs/WiFiNetworkDiagnosticsClusterConnectionStatusEvent.kt b/src/controller/java/generated/java/matter/devicecontroller/cluster/eventstructs/WiFiNetworkDiagnosticsClusterConnectionStatusEvent.kt new file mode 100644 index 00000000000000..653e02a013159d --- /dev/null +++ b/src/controller/java/generated/java/matter/devicecontroller/cluster/eventstructs/WiFiNetworkDiagnosticsClusterConnectionStatusEvent.kt @@ -0,0 +1,55 @@ +/* + * + * Copyright (c) 2023 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package matter.devicecontroller.cluster.eventstructs + +import matter.devicecontroller.cluster.* +import matter.tlv.ContextSpecificTag +import matter.tlv.Tag +import matter.tlv.TlvReader +import matter.tlv.TlvWriter + +class WiFiNetworkDiagnosticsClusterConnectionStatusEvent(val connectionStatus: UInt) { + override fun toString(): String = buildString { + append("WiFiNetworkDiagnosticsClusterConnectionStatusEvent {\n") + append("\tconnectionStatus : $connectionStatus\n") + append("}\n") + } + + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tlvTag) + put(ContextSpecificTag(TAG_CONNECTION_STATUS), connectionStatus) + endStructure() + } + } + + companion object { + private const val TAG_CONNECTION_STATUS = 0 + + fun fromTlv( + tlvTag: Tag, + tlvReader: TlvReader + ): WiFiNetworkDiagnosticsClusterConnectionStatusEvent { + tlvReader.enterStructure(tlvTag) + val connectionStatus = tlvReader.getUInt(ContextSpecificTag(TAG_CONNECTION_STATUS)) + + tlvReader.exitContainer() + + return WiFiNetworkDiagnosticsClusterConnectionStatusEvent(connectionStatus) + } + } +} diff --git a/src/controller/java/generated/java/matter/devicecontroller/cluster/eventstructs/WiFiNetworkDiagnosticsClusterDisconnectionEvent.kt b/src/controller/java/generated/java/matter/devicecontroller/cluster/eventstructs/WiFiNetworkDiagnosticsClusterDisconnectionEvent.kt new file mode 100644 index 00000000000000..518f3ece0161d2 --- /dev/null +++ b/src/controller/java/generated/java/matter/devicecontroller/cluster/eventstructs/WiFiNetworkDiagnosticsClusterDisconnectionEvent.kt @@ -0,0 +1,55 @@ +/* + * + * Copyright (c) 2023 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package matter.devicecontroller.cluster.eventstructs + +import matter.devicecontroller.cluster.* +import matter.tlv.ContextSpecificTag +import matter.tlv.Tag +import matter.tlv.TlvReader +import matter.tlv.TlvWriter + +class WiFiNetworkDiagnosticsClusterDisconnectionEvent(val reasonCode: UShort) { + override fun toString(): String = buildString { + append("WiFiNetworkDiagnosticsClusterDisconnectionEvent {\n") + append("\treasonCode : $reasonCode\n") + append("}\n") + } + + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tlvTag) + put(ContextSpecificTag(TAG_REASON_CODE), reasonCode) + endStructure() + } + } + + companion object { + private const val TAG_REASON_CODE = 0 + + fun fromTlv( + tlvTag: Tag, + tlvReader: TlvReader + ): WiFiNetworkDiagnosticsClusterDisconnectionEvent { + tlvReader.enterStructure(tlvTag) + val reasonCode = tlvReader.getUShort(ContextSpecificTag(TAG_REASON_CODE)) + + tlvReader.exitContainer() + + return WiFiNetworkDiagnosticsClusterDisconnectionEvent(reasonCode) + } + } +} diff --git a/src/controller/java/generated/java/matter/devicecontroller/cluster/files.gni b/src/controller/java/generated/java/matter/devicecontroller/cluster/files.gni index 62be491751fec7..0788d700b4f130 100644 --- a/src/controller/java/generated/java/matter/devicecontroller/cluster/files.gni +++ b/src/controller/java/generated/java/matter/devicecontroller/cluster/files.gni @@ -1,6 +1,146 @@ import("//build_overrides/build.gni") import("//build_overrides/chip.gni") +matter_structs_sources = [ + "${chip_root}/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/AccessControlClusterAccessControlEntryStruct.kt", + "${chip_root}/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/AccessControlClusterAccessControlExtensionStruct.kt", + "${chip_root}/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/AccessControlClusterAccessControlTargetStruct.kt", + "${chip_root}/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/ActionsClusterActionStruct.kt", + "${chip_root}/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/ActionsClusterEndpointListStruct.kt", + "${chip_root}/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/ActivatedCarbonFilterMonitoringClusterReplacementProductStruct.kt", + "${chip_root}/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/ApplicationBasicClusterApplicationStruct.kt", + "${chip_root}/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/ApplicationLauncherClusterApplicationEPStruct.kt", + "${chip_root}/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/ApplicationLauncherClusterApplicationStruct.kt", + "${chip_root}/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/AudioOutputClusterOutputInfoStruct.kt", + "${chip_root}/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/BasicInformationClusterCapabilityMinimaStruct.kt", + "${chip_root}/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/BasicInformationClusterProductAppearanceStruct.kt", + "${chip_root}/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/BindingClusterTargetStruct.kt", + "${chip_root}/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/BridgedDeviceBasicInformationClusterProductAppearanceStruct.kt", + "${chip_root}/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/ChannelClusterChannelInfoStruct.kt", + "${chip_root}/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/ChannelClusterLineupInfoStruct.kt", + "${chip_root}/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/ContentLauncherClusterAdditionalInfoStruct.kt", + "${chip_root}/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/ContentLauncherClusterBrandingInformationStruct.kt", + "${chip_root}/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/ContentLauncherClusterContentSearchStruct.kt", + "${chip_root}/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/ContentLauncherClusterDimensionStruct.kt", + "${chip_root}/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/ContentLauncherClusterParameterStruct.kt", + "${chip_root}/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/ContentLauncherClusterStyleInformationStruct.kt", + "${chip_root}/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/DescriptorClusterDeviceTypeStruct.kt", + "${chip_root}/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/DescriptorClusterSemanticTagStruct.kt", + "${chip_root}/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/DishwasherModeClusterModeOptionStruct.kt", + "${chip_root}/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/DishwasherModeClusterModeTagStruct.kt", + "${chip_root}/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/DoorLockClusterCredentialStruct.kt", + "${chip_root}/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/FixedLabelClusterLabelStruct.kt", + "${chip_root}/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/GeneralCommissioningClusterBasicCommissioningInfo.kt", + "${chip_root}/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/GeneralDiagnosticsClusterNetworkInterface.kt", + "${chip_root}/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/GroupKeyManagementClusterGroupInfoMapStruct.kt", + "${chip_root}/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/GroupKeyManagementClusterGroupKeyMapStruct.kt", + "${chip_root}/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/GroupKeyManagementClusterGroupKeySetStruct.kt", + "${chip_root}/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/HepaFilterMonitoringClusterReplacementProductStruct.kt", + "${chip_root}/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/IcdManagementClusterMonitoringRegistrationStruct.kt", + "${chip_root}/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/LaundryWasherModeClusterModeOptionStruct.kt", + "${chip_root}/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/LaundryWasherModeClusterModeTagStruct.kt", + "${chip_root}/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/MediaInputClusterInputInfoStruct.kt", + "${chip_root}/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/MediaPlaybackClusterPlaybackPositionStruct.kt", + "${chip_root}/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/ModeSelectClusterModeOptionStruct.kt", + "${chip_root}/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/ModeSelectClusterSemanticTagStruct.kt", + "${chip_root}/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/NetworkCommissioningClusterNetworkInfoStruct.kt", + "${chip_root}/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/NetworkCommissioningClusterThreadInterfaceScanResultStruct.kt", + "${chip_root}/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/NetworkCommissioningClusterWiFiInterfaceScanResultStruct.kt", + "${chip_root}/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/OperationalCredentialsClusterFabricDescriptorStruct.kt", + "${chip_root}/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/OperationalCredentialsClusterNOCStruct.kt", + "${chip_root}/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/OperationalStateClusterErrorStateStruct.kt", + "${chip_root}/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/OperationalStateClusterOperationalStateStruct.kt", + "${chip_root}/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/OtaSoftwareUpdateRequestorClusterProviderLocation.kt", + "${chip_root}/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/PowerSourceClusterBatChargeFaultChangeType.kt", + "${chip_root}/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/PowerSourceClusterBatFaultChangeType.kt", + "${chip_root}/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/PowerSourceClusterWiredFaultChangeType.kt", + "${chip_root}/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/RefrigeratorAndTemperatureControlledCabinetModeClusterModeOptionStruct.kt", + "${chip_root}/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/RefrigeratorAndTemperatureControlledCabinetModeClusterModeTagStruct.kt", + "${chip_root}/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/RvcCleanModeClusterModeOptionStruct.kt", + "${chip_root}/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/RvcCleanModeClusterModeTagStruct.kt", + "${chip_root}/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/RvcOperationalStateClusterErrorStateStruct.kt", + "${chip_root}/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/RvcOperationalStateClusterOperationalStateStruct.kt", + "${chip_root}/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/RvcRunModeClusterModeOptionStruct.kt", + "${chip_root}/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/RvcRunModeClusterModeTagStruct.kt", + "${chip_root}/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/ScenesClusterAttributeValuePair.kt", + "${chip_root}/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/ScenesClusterExtensionFieldSet.kt", + "${chip_root}/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/SoftwareDiagnosticsClusterThreadMetricsStruct.kt", + "${chip_root}/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/TargetNavigatorClusterTargetInfoStruct.kt", + "${chip_root}/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/ThermostatClusterThermostatScheduleTransition.kt", + "${chip_root}/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/ThreadNetworkDiagnosticsClusterNeighborTableStruct.kt", + "${chip_root}/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/ThreadNetworkDiagnosticsClusterOperationalDatasetComponents.kt", + "${chip_root}/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/ThreadNetworkDiagnosticsClusterRouteTableStruct.kt", + "${chip_root}/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/ThreadNetworkDiagnosticsClusterSecurityPolicy.kt", + "${chip_root}/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/TimeSynchronizationClusterDSTOffsetStruct.kt", + "${chip_root}/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/TimeSynchronizationClusterFabricScopedTrustedTimeSourceStruct.kt", + "${chip_root}/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/TimeSynchronizationClusterTimeZoneStruct.kt", + "${chip_root}/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/TimeSynchronizationClusterTrustedTimeSourceStruct.kt", + "${chip_root}/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/UnitTestingClusterDoubleNestedStructList.kt", + "${chip_root}/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/UnitTestingClusterNestedStruct.kt", + "${chip_root}/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/UnitTestingClusterNestedStructList.kt", + "${chip_root}/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/UnitTestingClusterNullablesAndOptionalsStruct.kt", + "${chip_root}/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/UnitTestingClusterSimpleStruct.kt", + "${chip_root}/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/UnitTestingClusterTestFabricScoped.kt", + "${chip_root}/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/UnitTestingClusterTestListStructOctet.kt", + "${chip_root}/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/UserLabelClusterLabelStruct.kt", +] + +matter_eventstructs_sources = [ + "${chip_root}/src/controller/java/generated/java/matter/devicecontroller/cluster/eventstructs/AccessControlClusterAccessControlEntryChangedEvent.kt", + "${chip_root}/src/controller/java/generated/java/matter/devicecontroller/cluster/eventstructs/AccessControlClusterAccessControlExtensionChangedEvent.kt", + "${chip_root}/src/controller/java/generated/java/matter/devicecontroller/cluster/eventstructs/ActionsClusterActionFailedEvent.kt", + "${chip_root}/src/controller/java/generated/java/matter/devicecontroller/cluster/eventstructs/ActionsClusterStateChangedEvent.kt", + "${chip_root}/src/controller/java/generated/java/matter/devicecontroller/cluster/eventstructs/BasicInformationClusterLeaveEvent.kt", + "${chip_root}/src/controller/java/generated/java/matter/devicecontroller/cluster/eventstructs/BasicInformationClusterReachableChangedEvent.kt", + "${chip_root}/src/controller/java/generated/java/matter/devicecontroller/cluster/eventstructs/BasicInformationClusterStartUpEvent.kt", + "${chip_root}/src/controller/java/generated/java/matter/devicecontroller/cluster/eventstructs/BooleanStateClusterStateChangeEvent.kt", + "${chip_root}/src/controller/java/generated/java/matter/devicecontroller/cluster/eventstructs/BridgedDeviceBasicInformationClusterReachableChangedEvent.kt", + "${chip_root}/src/controller/java/generated/java/matter/devicecontroller/cluster/eventstructs/BridgedDeviceBasicInformationClusterStartUpEvent.kt", + "${chip_root}/src/controller/java/generated/java/matter/devicecontroller/cluster/eventstructs/DishwasherAlarmClusterNotifyEvent.kt", + "${chip_root}/src/controller/java/generated/java/matter/devicecontroller/cluster/eventstructs/DoorLockClusterDoorLockAlarmEvent.kt", + "${chip_root}/src/controller/java/generated/java/matter/devicecontroller/cluster/eventstructs/DoorLockClusterDoorStateChangeEvent.kt", + "${chip_root}/src/controller/java/generated/java/matter/devicecontroller/cluster/eventstructs/DoorLockClusterLockOperationEvent.kt", + "${chip_root}/src/controller/java/generated/java/matter/devicecontroller/cluster/eventstructs/DoorLockClusterLockOperationErrorEvent.kt", + "${chip_root}/src/controller/java/generated/java/matter/devicecontroller/cluster/eventstructs/DoorLockClusterLockUserChangeEvent.kt", + "${chip_root}/src/controller/java/generated/java/matter/devicecontroller/cluster/eventstructs/GeneralDiagnosticsClusterBootReasonEvent.kt", + "${chip_root}/src/controller/java/generated/java/matter/devicecontroller/cluster/eventstructs/GeneralDiagnosticsClusterHardwareFaultChangeEvent.kt", + "${chip_root}/src/controller/java/generated/java/matter/devicecontroller/cluster/eventstructs/GeneralDiagnosticsClusterNetworkFaultChangeEvent.kt", + "${chip_root}/src/controller/java/generated/java/matter/devicecontroller/cluster/eventstructs/GeneralDiagnosticsClusterRadioFaultChangeEvent.kt", + "${chip_root}/src/controller/java/generated/java/matter/devicecontroller/cluster/eventstructs/OperationalStateClusterOperationalErrorEvent.kt", + "${chip_root}/src/controller/java/generated/java/matter/devicecontroller/cluster/eventstructs/OperationalStateClusterOperationCompletionEvent.kt", + "${chip_root}/src/controller/java/generated/java/matter/devicecontroller/cluster/eventstructs/OtaSoftwareUpdateRequestorClusterDownloadErrorEvent.kt", + "${chip_root}/src/controller/java/generated/java/matter/devicecontroller/cluster/eventstructs/OtaSoftwareUpdateRequestorClusterStateTransitionEvent.kt", + "${chip_root}/src/controller/java/generated/java/matter/devicecontroller/cluster/eventstructs/OtaSoftwareUpdateRequestorClusterVersionAppliedEvent.kt", + "${chip_root}/src/controller/java/generated/java/matter/devicecontroller/cluster/eventstructs/PowerSourceClusterBatChargeFaultChangeEvent.kt", + "${chip_root}/src/controller/java/generated/java/matter/devicecontroller/cluster/eventstructs/PowerSourceClusterBatFaultChangeEvent.kt", + "${chip_root}/src/controller/java/generated/java/matter/devicecontroller/cluster/eventstructs/PowerSourceClusterWiredFaultChangeEvent.kt", + "${chip_root}/src/controller/java/generated/java/matter/devicecontroller/cluster/eventstructs/RefrigeratorAlarmClusterNotifyEvent.kt", + "${chip_root}/src/controller/java/generated/java/matter/devicecontroller/cluster/eventstructs/RvcOperationalStateClusterOperationalErrorEvent.kt", + "${chip_root}/src/controller/java/generated/java/matter/devicecontroller/cluster/eventstructs/RvcOperationalStateClusterOperationCompletionEvent.kt", + "${chip_root}/src/controller/java/generated/java/matter/devicecontroller/cluster/eventstructs/SmokeCoAlarmClusterCOAlarmEvent.kt", + "${chip_root}/src/controller/java/generated/java/matter/devicecontroller/cluster/eventstructs/SmokeCoAlarmClusterInterconnectCOAlarmEvent.kt", + "${chip_root}/src/controller/java/generated/java/matter/devicecontroller/cluster/eventstructs/SmokeCoAlarmClusterInterconnectSmokeAlarmEvent.kt", + "${chip_root}/src/controller/java/generated/java/matter/devicecontroller/cluster/eventstructs/SmokeCoAlarmClusterLowBatteryEvent.kt", + "${chip_root}/src/controller/java/generated/java/matter/devicecontroller/cluster/eventstructs/SmokeCoAlarmClusterSmokeAlarmEvent.kt", + "${chip_root}/src/controller/java/generated/java/matter/devicecontroller/cluster/eventstructs/SoftwareDiagnosticsClusterSoftwareFaultEvent.kt", + "${chip_root}/src/controller/java/generated/java/matter/devicecontroller/cluster/eventstructs/SwitchClusterInitialPressEvent.kt", + "${chip_root}/src/controller/java/generated/java/matter/devicecontroller/cluster/eventstructs/SwitchClusterLongPressEvent.kt", + "${chip_root}/src/controller/java/generated/java/matter/devicecontroller/cluster/eventstructs/SwitchClusterLongReleaseEvent.kt", + "${chip_root}/src/controller/java/generated/java/matter/devicecontroller/cluster/eventstructs/SwitchClusterMultiPressCompleteEvent.kt", + "${chip_root}/src/controller/java/generated/java/matter/devicecontroller/cluster/eventstructs/SwitchClusterMultiPressOngoingEvent.kt", + "${chip_root}/src/controller/java/generated/java/matter/devicecontroller/cluster/eventstructs/SwitchClusterShortReleaseEvent.kt", + "${chip_root}/src/controller/java/generated/java/matter/devicecontroller/cluster/eventstructs/SwitchClusterSwitchLatchedEvent.kt", + "${chip_root}/src/controller/java/generated/java/matter/devicecontroller/cluster/eventstructs/ThreadNetworkDiagnosticsClusterConnectionStatusEvent.kt", + "${chip_root}/src/controller/java/generated/java/matter/devicecontroller/cluster/eventstructs/ThreadNetworkDiagnosticsClusterNetworkFaultChangeEvent.kt", + "${chip_root}/src/controller/java/generated/java/matter/devicecontroller/cluster/eventstructs/TimeSynchronizationClusterDSTStatusEvent.kt", + "${chip_root}/src/controller/java/generated/java/matter/devicecontroller/cluster/eventstructs/TimeSynchronizationClusterTimeZoneStatusEvent.kt", + "${chip_root}/src/controller/java/generated/java/matter/devicecontroller/cluster/eventstructs/UnitTestingClusterTestEventEvent.kt", + "${chip_root}/src/controller/java/generated/java/matter/devicecontroller/cluster/eventstructs/UnitTestingClusterTestFabricScopedEventEvent.kt", + "${chip_root}/src/controller/java/generated/java/matter/devicecontroller/cluster/eventstructs/WiFiNetworkDiagnosticsClusterAssociationFailureEvent.kt", + "${chip_root}/src/controller/java/generated/java/matter/devicecontroller/cluster/eventstructs/WiFiNetworkDiagnosticsClusterConnectionStatusEvent.kt", + "${chip_root}/src/controller/java/generated/java/matter/devicecontroller/cluster/eventstructs/WiFiNetworkDiagnosticsClusterDisconnectionEvent.kt", +] + matter_clusters_sources = [ "${chip_root}/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/AccessControlCluster.kt", "${chip_root}/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/AccountLoginCluster.kt", @@ -51,6 +191,7 @@ matter_clusters_sources = [ "${chip_root}/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/LowPowerCluster.kt", "${chip_root}/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/MediaInputCluster.kt", "${chip_root}/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/MediaPlaybackCluster.kt", + "${chip_root}/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/MicrowaveOvenControlCluster.kt", "${chip_root}/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/ModeSelectCluster.kt", "${chip_root}/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/NetworkCommissioningCluster.kt", "${chip_root}/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/NitrogenDioxideConcentrationMeasurementCluster.kt", diff --git a/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/AccessControlClusterAccessControlEntryStruct.kt b/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/AccessControlClusterAccessControlEntryStruct.kt new file mode 100644 index 00000000000000..7160b776b170fb --- /dev/null +++ b/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/AccessControlClusterAccessControlEntryStruct.kt @@ -0,0 +1,121 @@ +/* + * + * Copyright (c) 2023 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package matter.devicecontroller.cluster.structs + +import matter.devicecontroller.cluster.* +import matter.tlv.AnonymousTag +import matter.tlv.ContextSpecificTag +import matter.tlv.Tag +import matter.tlv.TlvReader +import matter.tlv.TlvWriter + +class AccessControlClusterAccessControlEntryStruct( + val privilege: UInt, + val authMode: UInt, + val subjects: List?, + val targets: List?, + val fabricIndex: UByte +) { + override fun toString(): String = buildString { + append("AccessControlClusterAccessControlEntryStruct {\n") + append("\tprivilege : $privilege\n") + append("\tauthMode : $authMode\n") + append("\tsubjects : $subjects\n") + append("\ttargets : $targets\n") + append("\tfabricIndex : $fabricIndex\n") + append("}\n") + } + + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tlvTag) + put(ContextSpecificTag(TAG_PRIVILEGE), privilege) + put(ContextSpecificTag(TAG_AUTH_MODE), authMode) + if (subjects != null) { + startArray(ContextSpecificTag(TAG_SUBJECTS)) + for (item in subjects.iterator()) { + put(AnonymousTag, item) + } + endArray() + } else { + putNull(ContextSpecificTag(TAG_SUBJECTS)) + } + if (targets != null) { + startArray(ContextSpecificTag(TAG_TARGETS)) + for (item in targets.iterator()) { + item.toTlv(AnonymousTag, this) + } + endArray() + } else { + putNull(ContextSpecificTag(TAG_TARGETS)) + } + put(ContextSpecificTag(TAG_FABRIC_INDEX), fabricIndex) + endStructure() + } + } + + companion object { + private const val TAG_PRIVILEGE = 1 + private const val TAG_AUTH_MODE = 2 + private const val TAG_SUBJECTS = 3 + private const val TAG_TARGETS = 4 + private const val TAG_FABRIC_INDEX = 254 + + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): AccessControlClusterAccessControlEntryStruct { + tlvReader.enterStructure(tlvTag) + val privilege = tlvReader.getUInt(ContextSpecificTag(TAG_PRIVILEGE)) + val authMode = tlvReader.getUInt(ContextSpecificTag(TAG_AUTH_MODE)) + val subjects = + if (!tlvReader.isNull()) { + buildList { + tlvReader.enterArray(ContextSpecificTag(TAG_SUBJECTS)) + while (!tlvReader.isEndOfContainer()) { + add(tlvReader.getULong(AnonymousTag)) + } + tlvReader.exitContainer() + } + } else { + tlvReader.getNull(ContextSpecificTag(TAG_SUBJECTS)) + null + } + val targets = + if (!tlvReader.isNull()) { + buildList { + tlvReader.enterArray(ContextSpecificTag(TAG_TARGETS)) + while (!tlvReader.isEndOfContainer()) { + add(AccessControlClusterAccessControlTargetStruct.fromTlv(AnonymousTag, tlvReader)) + } + tlvReader.exitContainer() + } + } else { + tlvReader.getNull(ContextSpecificTag(TAG_TARGETS)) + null + } + val fabricIndex = tlvReader.getUByte(ContextSpecificTag(TAG_FABRIC_INDEX)) + + tlvReader.exitContainer() + + return AccessControlClusterAccessControlEntryStruct( + privilege, + authMode, + subjects, + targets, + fabricIndex + ) + } + } +} diff --git a/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/AccessControlClusterAccessControlExtensionStruct.kt b/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/AccessControlClusterAccessControlExtensionStruct.kt new file mode 100644 index 00000000000000..92f871d9cc054d --- /dev/null +++ b/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/AccessControlClusterAccessControlExtensionStruct.kt @@ -0,0 +1,62 @@ +/* + * + * Copyright (c) 2023 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package matter.devicecontroller.cluster.structs + +import matter.devicecontroller.cluster.* +import matter.tlv.ContextSpecificTag +import matter.tlv.Tag +import matter.tlv.TlvReader +import matter.tlv.TlvWriter + +class AccessControlClusterAccessControlExtensionStruct( + val data: ByteArray, + val fabricIndex: UByte +) { + override fun toString(): String = buildString { + append("AccessControlClusterAccessControlExtensionStruct {\n") + append("\tdata : $data\n") + append("\tfabricIndex : $fabricIndex\n") + append("}\n") + } + + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tlvTag) + put(ContextSpecificTag(TAG_DATA), data) + put(ContextSpecificTag(TAG_FABRIC_INDEX), fabricIndex) + endStructure() + } + } + + companion object { + private const val TAG_DATA = 1 + private const val TAG_FABRIC_INDEX = 254 + + fun fromTlv( + tlvTag: Tag, + tlvReader: TlvReader + ): AccessControlClusterAccessControlExtensionStruct { + tlvReader.enterStructure(tlvTag) + val data = tlvReader.getByteArray(ContextSpecificTag(TAG_DATA)) + val fabricIndex = tlvReader.getUByte(ContextSpecificTag(TAG_FABRIC_INDEX)) + + tlvReader.exitContainer() + + return AccessControlClusterAccessControlExtensionStruct(data, fabricIndex) + } + } +} diff --git a/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/AccessControlClusterAccessControlTargetStruct.kt b/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/AccessControlClusterAccessControlTargetStruct.kt new file mode 100644 index 00000000000000..24905a80d950d9 --- /dev/null +++ b/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/AccessControlClusterAccessControlTargetStruct.kt @@ -0,0 +1,94 @@ +/* + * + * Copyright (c) 2023 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package matter.devicecontroller.cluster.structs + +import matter.devicecontroller.cluster.* +import matter.tlv.ContextSpecificTag +import matter.tlv.Tag +import matter.tlv.TlvReader +import matter.tlv.TlvWriter + +class AccessControlClusterAccessControlTargetStruct( + val cluster: UInt?, + val endpoint: UShort?, + val deviceType: UInt? +) { + override fun toString(): String = buildString { + append("AccessControlClusterAccessControlTargetStruct {\n") + append("\tcluster : $cluster\n") + append("\tendpoint : $endpoint\n") + append("\tdeviceType : $deviceType\n") + append("}\n") + } + + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tlvTag) + if (cluster != null) { + put(ContextSpecificTag(TAG_CLUSTER), cluster) + } else { + putNull(ContextSpecificTag(TAG_CLUSTER)) + } + if (endpoint != null) { + put(ContextSpecificTag(TAG_ENDPOINT), endpoint) + } else { + putNull(ContextSpecificTag(TAG_ENDPOINT)) + } + if (deviceType != null) { + put(ContextSpecificTag(TAG_DEVICE_TYPE), deviceType) + } else { + putNull(ContextSpecificTag(TAG_DEVICE_TYPE)) + } + endStructure() + } + } + + companion object { + private const val TAG_CLUSTER = 0 + private const val TAG_ENDPOINT = 1 + private const val TAG_DEVICE_TYPE = 2 + + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): AccessControlClusterAccessControlTargetStruct { + tlvReader.enterStructure(tlvTag) + val cluster = + if (!tlvReader.isNull()) { + tlvReader.getUInt(ContextSpecificTag(TAG_CLUSTER)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_CLUSTER)) + null + } + val endpoint = + if (!tlvReader.isNull()) { + tlvReader.getUShort(ContextSpecificTag(TAG_ENDPOINT)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_ENDPOINT)) + null + } + val deviceType = + if (!tlvReader.isNull()) { + tlvReader.getUInt(ContextSpecificTag(TAG_DEVICE_TYPE)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_DEVICE_TYPE)) + null + } + + tlvReader.exitContainer() + + return AccessControlClusterAccessControlTargetStruct(cluster, endpoint, deviceType) + } + } +} diff --git a/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/ActionsClusterActionStruct.kt b/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/ActionsClusterActionStruct.kt new file mode 100644 index 00000000000000..43a6ed963d8b52 --- /dev/null +++ b/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/ActionsClusterActionStruct.kt @@ -0,0 +1,86 @@ +/* + * + * Copyright (c) 2023 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package matter.devicecontroller.cluster.structs + +import matter.devicecontroller.cluster.* +import matter.tlv.ContextSpecificTag +import matter.tlv.Tag +import matter.tlv.TlvReader +import matter.tlv.TlvWriter + +class ActionsClusterActionStruct( + val actionID: UShort, + val name: String, + val type: UInt, + val endpointListID: UShort, + val supportedCommands: UInt, + val state: UInt +) { + override fun toString(): String = buildString { + append("ActionsClusterActionStruct {\n") + append("\tactionID : $actionID\n") + append("\tname : $name\n") + append("\ttype : $type\n") + append("\tendpointListID : $endpointListID\n") + append("\tsupportedCommands : $supportedCommands\n") + append("\tstate : $state\n") + append("}\n") + } + + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tlvTag) + put(ContextSpecificTag(TAG_ACTION_I_D), actionID) + put(ContextSpecificTag(TAG_NAME), name) + put(ContextSpecificTag(TAG_TYPE), type) + put(ContextSpecificTag(TAG_ENDPOINT_LIST_I_D), endpointListID) + put(ContextSpecificTag(TAG_SUPPORTED_COMMANDS), supportedCommands) + put(ContextSpecificTag(TAG_STATE), state) + endStructure() + } + } + + companion object { + private const val TAG_ACTION_I_D = 0 + private const val TAG_NAME = 1 + private const val TAG_TYPE = 2 + private const val TAG_ENDPOINT_LIST_I_D = 3 + private const val TAG_SUPPORTED_COMMANDS = 4 + private const val TAG_STATE = 5 + + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): ActionsClusterActionStruct { + tlvReader.enterStructure(tlvTag) + val actionID = tlvReader.getUShort(ContextSpecificTag(TAG_ACTION_I_D)) + val name = tlvReader.getString(ContextSpecificTag(TAG_NAME)) + val type = tlvReader.getUInt(ContextSpecificTag(TAG_TYPE)) + val endpointListID = tlvReader.getUShort(ContextSpecificTag(TAG_ENDPOINT_LIST_I_D)) + val supportedCommands = tlvReader.getUInt(ContextSpecificTag(TAG_SUPPORTED_COMMANDS)) + val state = tlvReader.getUInt(ContextSpecificTag(TAG_STATE)) + + tlvReader.exitContainer() + + return ActionsClusterActionStruct( + actionID, + name, + type, + endpointListID, + supportedCommands, + state + ) + } + } +} diff --git a/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/ActionsClusterEndpointListStruct.kt b/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/ActionsClusterEndpointListStruct.kt new file mode 100644 index 00000000000000..7b0f6a5616f52f --- /dev/null +++ b/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/ActionsClusterEndpointListStruct.kt @@ -0,0 +1,81 @@ +/* + * + * Copyright (c) 2023 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package matter.devicecontroller.cluster.structs + +import matter.devicecontroller.cluster.* +import matter.tlv.AnonymousTag +import matter.tlv.ContextSpecificTag +import matter.tlv.Tag +import matter.tlv.TlvReader +import matter.tlv.TlvWriter + +class ActionsClusterEndpointListStruct( + val endpointListID: UShort, + val name: String, + val type: UInt, + val endpoints: List +) { + override fun toString(): String = buildString { + append("ActionsClusterEndpointListStruct {\n") + append("\tendpointListID : $endpointListID\n") + append("\tname : $name\n") + append("\ttype : $type\n") + append("\tendpoints : $endpoints\n") + append("}\n") + } + + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tlvTag) + put(ContextSpecificTag(TAG_ENDPOINT_LIST_I_D), endpointListID) + put(ContextSpecificTag(TAG_NAME), name) + put(ContextSpecificTag(TAG_TYPE), type) + startArray(ContextSpecificTag(TAG_ENDPOINTS)) + for (item in endpoints.iterator()) { + put(AnonymousTag, item) + } + endArray() + endStructure() + } + } + + companion object { + private const val TAG_ENDPOINT_LIST_I_D = 0 + private const val TAG_NAME = 1 + private const val TAG_TYPE = 2 + private const val TAG_ENDPOINTS = 3 + + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): ActionsClusterEndpointListStruct { + tlvReader.enterStructure(tlvTag) + val endpointListID = tlvReader.getUShort(ContextSpecificTag(TAG_ENDPOINT_LIST_I_D)) + val name = tlvReader.getString(ContextSpecificTag(TAG_NAME)) + val type = tlvReader.getUInt(ContextSpecificTag(TAG_TYPE)) + val endpoints = + buildList { + tlvReader.enterArray(ContextSpecificTag(TAG_ENDPOINTS)) + while (!tlvReader.isEndOfContainer()) { + add(tlvReader.getUShort(AnonymousTag)) + } + tlvReader.exitContainer() + } + + tlvReader.exitContainer() + + return ActionsClusterEndpointListStruct(endpointListID, name, type, endpoints) + } + } +} diff --git a/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/ActivatedCarbonFilterMonitoringClusterReplacementProductStruct.kt b/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/ActivatedCarbonFilterMonitoringClusterReplacementProductStruct.kt new file mode 100644 index 00000000000000..3f3b66764532b4 --- /dev/null +++ b/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/ActivatedCarbonFilterMonitoringClusterReplacementProductStruct.kt @@ -0,0 +1,66 @@ +/* + * + * Copyright (c) 2023 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package matter.devicecontroller.cluster.structs + +import matter.devicecontroller.cluster.* +import matter.tlv.ContextSpecificTag +import matter.tlv.Tag +import matter.tlv.TlvReader +import matter.tlv.TlvWriter + +class ActivatedCarbonFilterMonitoringClusterReplacementProductStruct( + val productIdentifierType: UInt, + val productIdentifierValue: String +) { + override fun toString(): String = buildString { + append("ActivatedCarbonFilterMonitoringClusterReplacementProductStruct {\n") + append("\tproductIdentifierType : $productIdentifierType\n") + append("\tproductIdentifierValue : $productIdentifierValue\n") + append("}\n") + } + + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tlvTag) + put(ContextSpecificTag(TAG_PRODUCT_IDENTIFIER_TYPE), productIdentifierType) + put(ContextSpecificTag(TAG_PRODUCT_IDENTIFIER_VALUE), productIdentifierValue) + endStructure() + } + } + + companion object { + private const val TAG_PRODUCT_IDENTIFIER_TYPE = 0 + private const val TAG_PRODUCT_IDENTIFIER_VALUE = 1 + + fun fromTlv( + tlvTag: Tag, + tlvReader: TlvReader + ): ActivatedCarbonFilterMonitoringClusterReplacementProductStruct { + tlvReader.enterStructure(tlvTag) + val productIdentifierType = tlvReader.getUInt(ContextSpecificTag(TAG_PRODUCT_IDENTIFIER_TYPE)) + val productIdentifierValue = + tlvReader.getString(ContextSpecificTag(TAG_PRODUCT_IDENTIFIER_VALUE)) + + tlvReader.exitContainer() + + return ActivatedCarbonFilterMonitoringClusterReplacementProductStruct( + productIdentifierType, + productIdentifierValue + ) + } + } +} diff --git a/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/ApplicationBasicClusterApplicationStruct.kt b/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/ApplicationBasicClusterApplicationStruct.kt new file mode 100644 index 00000000000000..90dae8f1054f47 --- /dev/null +++ b/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/ApplicationBasicClusterApplicationStruct.kt @@ -0,0 +1,59 @@ +/* + * + * Copyright (c) 2023 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package matter.devicecontroller.cluster.structs + +import matter.devicecontroller.cluster.* +import matter.tlv.ContextSpecificTag +import matter.tlv.Tag +import matter.tlv.TlvReader +import matter.tlv.TlvWriter + +class ApplicationBasicClusterApplicationStruct( + val catalogVendorID: UShort, + val applicationID: String +) { + override fun toString(): String = buildString { + append("ApplicationBasicClusterApplicationStruct {\n") + append("\tcatalogVendorID : $catalogVendorID\n") + append("\tapplicationID : $applicationID\n") + append("}\n") + } + + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tlvTag) + put(ContextSpecificTag(TAG_CATALOG_VENDOR_I_D), catalogVendorID) + put(ContextSpecificTag(TAG_APPLICATION_I_D), applicationID) + endStructure() + } + } + + companion object { + private const val TAG_CATALOG_VENDOR_I_D = 0 + private const val TAG_APPLICATION_I_D = 1 + + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): ApplicationBasicClusterApplicationStruct { + tlvReader.enterStructure(tlvTag) + val catalogVendorID = tlvReader.getUShort(ContextSpecificTag(TAG_CATALOG_VENDOR_I_D)) + val applicationID = tlvReader.getString(ContextSpecificTag(TAG_APPLICATION_I_D)) + + tlvReader.exitContainer() + + return ApplicationBasicClusterApplicationStruct(catalogVendorID, applicationID) + } + } +} diff --git a/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/ApplicationLauncherClusterApplicationEPStruct.kt b/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/ApplicationLauncherClusterApplicationEPStruct.kt new file mode 100644 index 00000000000000..62fc820b748084 --- /dev/null +++ b/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/ApplicationLauncherClusterApplicationEPStruct.kt @@ -0,0 +1,72 @@ +/* + * + * Copyright (c) 2023 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package matter.devicecontroller.cluster.structs + +import java.util.Optional +import matter.devicecontroller.cluster.* +import matter.tlv.ContextSpecificTag +import matter.tlv.Tag +import matter.tlv.TlvReader +import matter.tlv.TlvWriter + +class ApplicationLauncherClusterApplicationEPStruct( + val application: ApplicationLauncherClusterApplicationStruct, + val endpoint: Optional +) { + override fun toString(): String = buildString { + append("ApplicationLauncherClusterApplicationEPStruct {\n") + append("\tapplication : $application\n") + append("\tendpoint : $endpoint\n") + append("}\n") + } + + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tlvTag) + application.toTlv(ContextSpecificTag(TAG_APPLICATION), this) + if (endpoint.isPresent) { + val optendpoint = endpoint.get() + put(ContextSpecificTag(TAG_ENDPOINT), optendpoint) + } + endStructure() + } + } + + companion object { + private const val TAG_APPLICATION = 0 + private const val TAG_ENDPOINT = 1 + + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): ApplicationLauncherClusterApplicationEPStruct { + tlvReader.enterStructure(tlvTag) + val application = + ApplicationLauncherClusterApplicationStruct.fromTlv( + ContextSpecificTag(TAG_APPLICATION), + tlvReader + ) + val endpoint = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_ENDPOINT))) { + Optional.of(tlvReader.getUShort(ContextSpecificTag(TAG_ENDPOINT))) + } else { + Optional.empty() + } + + tlvReader.exitContainer() + + return ApplicationLauncherClusterApplicationEPStruct(application, endpoint) + } + } +} diff --git a/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/ApplicationLauncherClusterApplicationStruct.kt b/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/ApplicationLauncherClusterApplicationStruct.kt new file mode 100644 index 00000000000000..39fa26c5279bbc --- /dev/null +++ b/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/ApplicationLauncherClusterApplicationStruct.kt @@ -0,0 +1,59 @@ +/* + * + * Copyright (c) 2023 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package matter.devicecontroller.cluster.structs + +import matter.devicecontroller.cluster.* +import matter.tlv.ContextSpecificTag +import matter.tlv.Tag +import matter.tlv.TlvReader +import matter.tlv.TlvWriter + +class ApplicationLauncherClusterApplicationStruct( + val catalogVendorID: UShort, + val applicationID: String +) { + override fun toString(): String = buildString { + append("ApplicationLauncherClusterApplicationStruct {\n") + append("\tcatalogVendorID : $catalogVendorID\n") + append("\tapplicationID : $applicationID\n") + append("}\n") + } + + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tlvTag) + put(ContextSpecificTag(TAG_CATALOG_VENDOR_I_D), catalogVendorID) + put(ContextSpecificTag(TAG_APPLICATION_I_D), applicationID) + endStructure() + } + } + + companion object { + private const val TAG_CATALOG_VENDOR_I_D = 0 + private const val TAG_APPLICATION_I_D = 1 + + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): ApplicationLauncherClusterApplicationStruct { + tlvReader.enterStructure(tlvTag) + val catalogVendorID = tlvReader.getUShort(ContextSpecificTag(TAG_CATALOG_VENDOR_I_D)) + val applicationID = tlvReader.getString(ContextSpecificTag(TAG_APPLICATION_I_D)) + + tlvReader.exitContainer() + + return ApplicationLauncherClusterApplicationStruct(catalogVendorID, applicationID) + } + } +} diff --git a/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/AudioOutputClusterOutputInfoStruct.kt b/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/AudioOutputClusterOutputInfoStruct.kt new file mode 100644 index 00000000000000..07c6c02e0e16af --- /dev/null +++ b/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/AudioOutputClusterOutputInfoStruct.kt @@ -0,0 +1,60 @@ +/* + * + * Copyright (c) 2023 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package matter.devicecontroller.cluster.structs + +import matter.devicecontroller.cluster.* +import matter.tlv.ContextSpecificTag +import matter.tlv.Tag +import matter.tlv.TlvReader +import matter.tlv.TlvWriter + +class AudioOutputClusterOutputInfoStruct(val index: UByte, val outputType: UInt, val name: String) { + override fun toString(): String = buildString { + append("AudioOutputClusterOutputInfoStruct {\n") + append("\tindex : $index\n") + append("\toutputType : $outputType\n") + append("\tname : $name\n") + append("}\n") + } + + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tlvTag) + put(ContextSpecificTag(TAG_INDEX), index) + put(ContextSpecificTag(TAG_OUTPUT_TYPE), outputType) + put(ContextSpecificTag(TAG_NAME), name) + endStructure() + } + } + + companion object { + private const val TAG_INDEX = 0 + private const val TAG_OUTPUT_TYPE = 1 + private const val TAG_NAME = 2 + + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): AudioOutputClusterOutputInfoStruct { + tlvReader.enterStructure(tlvTag) + val index = tlvReader.getUByte(ContextSpecificTag(TAG_INDEX)) + val outputType = tlvReader.getUInt(ContextSpecificTag(TAG_OUTPUT_TYPE)) + val name = tlvReader.getString(ContextSpecificTag(TAG_NAME)) + + tlvReader.exitContainer() + + return AudioOutputClusterOutputInfoStruct(index, outputType, name) + } + } +} diff --git a/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/BasicInformationClusterCapabilityMinimaStruct.kt b/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/BasicInformationClusterCapabilityMinimaStruct.kt new file mode 100644 index 00000000000000..57ffe931e64877 --- /dev/null +++ b/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/BasicInformationClusterCapabilityMinimaStruct.kt @@ -0,0 +1,64 @@ +/* + * + * Copyright (c) 2023 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package matter.devicecontroller.cluster.structs + +import matter.devicecontroller.cluster.* +import matter.tlv.ContextSpecificTag +import matter.tlv.Tag +import matter.tlv.TlvReader +import matter.tlv.TlvWriter + +class BasicInformationClusterCapabilityMinimaStruct( + val caseSessionsPerFabric: UShort, + val subscriptionsPerFabric: UShort +) { + override fun toString(): String = buildString { + append("BasicInformationClusterCapabilityMinimaStruct {\n") + append("\tcaseSessionsPerFabric : $caseSessionsPerFabric\n") + append("\tsubscriptionsPerFabric : $subscriptionsPerFabric\n") + append("}\n") + } + + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tlvTag) + put(ContextSpecificTag(TAG_CASE_SESSIONS_PER_FABRIC), caseSessionsPerFabric) + put(ContextSpecificTag(TAG_SUBSCRIPTIONS_PER_FABRIC), subscriptionsPerFabric) + endStructure() + } + } + + companion object { + private const val TAG_CASE_SESSIONS_PER_FABRIC = 0 + private const val TAG_SUBSCRIPTIONS_PER_FABRIC = 1 + + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): BasicInformationClusterCapabilityMinimaStruct { + tlvReader.enterStructure(tlvTag) + val caseSessionsPerFabric = + tlvReader.getUShort(ContextSpecificTag(TAG_CASE_SESSIONS_PER_FABRIC)) + val subscriptionsPerFabric = + tlvReader.getUShort(ContextSpecificTag(TAG_SUBSCRIPTIONS_PER_FABRIC)) + + tlvReader.exitContainer() + + return BasicInformationClusterCapabilityMinimaStruct( + caseSessionsPerFabric, + subscriptionsPerFabric + ) + } + } +} diff --git a/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/BasicInformationClusterProductAppearanceStruct.kt b/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/BasicInformationClusterProductAppearanceStruct.kt new file mode 100644 index 00000000000000..b1bd7ea2c5599b --- /dev/null +++ b/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/BasicInformationClusterProductAppearanceStruct.kt @@ -0,0 +1,66 @@ +/* + * + * Copyright (c) 2023 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package matter.devicecontroller.cluster.structs + +import matter.devicecontroller.cluster.* +import matter.tlv.ContextSpecificTag +import matter.tlv.Tag +import matter.tlv.TlvReader +import matter.tlv.TlvWriter + +class BasicInformationClusterProductAppearanceStruct(val finish: UInt, val primaryColor: UInt?) { + override fun toString(): String = buildString { + append("BasicInformationClusterProductAppearanceStruct {\n") + append("\tfinish : $finish\n") + append("\tprimaryColor : $primaryColor\n") + append("}\n") + } + + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tlvTag) + put(ContextSpecificTag(TAG_FINISH), finish) + if (primaryColor != null) { + put(ContextSpecificTag(TAG_PRIMARY_COLOR), primaryColor) + } else { + putNull(ContextSpecificTag(TAG_PRIMARY_COLOR)) + } + endStructure() + } + } + + companion object { + private const val TAG_FINISH = 0 + private const val TAG_PRIMARY_COLOR = 1 + + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): BasicInformationClusterProductAppearanceStruct { + tlvReader.enterStructure(tlvTag) + val finish = tlvReader.getUInt(ContextSpecificTag(TAG_FINISH)) + val primaryColor = + if (!tlvReader.isNull()) { + tlvReader.getUInt(ContextSpecificTag(TAG_PRIMARY_COLOR)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_PRIMARY_COLOR)) + null + } + + tlvReader.exitContainer() + + return BasicInformationClusterProductAppearanceStruct(finish, primaryColor) + } + } +} diff --git a/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/BindingClusterTargetStruct.kt b/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/BindingClusterTargetStruct.kt new file mode 100644 index 00000000000000..2f41f19897474b --- /dev/null +++ b/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/BindingClusterTargetStruct.kt @@ -0,0 +1,107 @@ +/* + * + * Copyright (c) 2023 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package matter.devicecontroller.cluster.structs + +import java.util.Optional +import matter.devicecontroller.cluster.* +import matter.tlv.ContextSpecificTag +import matter.tlv.Tag +import matter.tlv.TlvReader +import matter.tlv.TlvWriter + +class BindingClusterTargetStruct( + val node: Optional, + val group: Optional, + val endpoint: Optional, + val cluster: Optional, + val fabricIndex: UByte +) { + override fun toString(): String = buildString { + append("BindingClusterTargetStruct {\n") + append("\tnode : $node\n") + append("\tgroup : $group\n") + append("\tendpoint : $endpoint\n") + append("\tcluster : $cluster\n") + append("\tfabricIndex : $fabricIndex\n") + append("}\n") + } + + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tlvTag) + if (node.isPresent) { + val optnode = node.get() + put(ContextSpecificTag(TAG_NODE), optnode) + } + if (group.isPresent) { + val optgroup = group.get() + put(ContextSpecificTag(TAG_GROUP), optgroup) + } + if (endpoint.isPresent) { + val optendpoint = endpoint.get() + put(ContextSpecificTag(TAG_ENDPOINT), optendpoint) + } + if (cluster.isPresent) { + val optcluster = cluster.get() + put(ContextSpecificTag(TAG_CLUSTER), optcluster) + } + put(ContextSpecificTag(TAG_FABRIC_INDEX), fabricIndex) + endStructure() + } + } + + companion object { + private const val TAG_NODE = 1 + private const val TAG_GROUP = 2 + private const val TAG_ENDPOINT = 3 + private const val TAG_CLUSTER = 4 + private const val TAG_FABRIC_INDEX = 254 + + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): BindingClusterTargetStruct { + tlvReader.enterStructure(tlvTag) + val node = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_NODE))) { + Optional.of(tlvReader.getULong(ContextSpecificTag(TAG_NODE))) + } else { + Optional.empty() + } + val group = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_GROUP))) { + Optional.of(tlvReader.getUShort(ContextSpecificTag(TAG_GROUP))) + } else { + Optional.empty() + } + val endpoint = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_ENDPOINT))) { + Optional.of(tlvReader.getUShort(ContextSpecificTag(TAG_ENDPOINT))) + } else { + Optional.empty() + } + val cluster = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_CLUSTER))) { + Optional.of(tlvReader.getUInt(ContextSpecificTag(TAG_CLUSTER))) + } else { + Optional.empty() + } + val fabricIndex = tlvReader.getUByte(ContextSpecificTag(TAG_FABRIC_INDEX)) + + tlvReader.exitContainer() + + return BindingClusterTargetStruct(node, group, endpoint, cluster, fabricIndex) + } + } +} diff --git a/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/BridgedDeviceBasicInformationClusterProductAppearanceStruct.kt b/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/BridgedDeviceBasicInformationClusterProductAppearanceStruct.kt new file mode 100644 index 00000000000000..c6b0dea505512d --- /dev/null +++ b/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/BridgedDeviceBasicInformationClusterProductAppearanceStruct.kt @@ -0,0 +1,72 @@ +/* + * + * Copyright (c) 2023 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package matter.devicecontroller.cluster.structs + +import matter.devicecontroller.cluster.* +import matter.tlv.ContextSpecificTag +import matter.tlv.Tag +import matter.tlv.TlvReader +import matter.tlv.TlvWriter + +class BridgedDeviceBasicInformationClusterProductAppearanceStruct( + val finish: UInt, + val primaryColor: UInt? +) { + override fun toString(): String = buildString { + append("BridgedDeviceBasicInformationClusterProductAppearanceStruct {\n") + append("\tfinish : $finish\n") + append("\tprimaryColor : $primaryColor\n") + append("}\n") + } + + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tlvTag) + put(ContextSpecificTag(TAG_FINISH), finish) + if (primaryColor != null) { + put(ContextSpecificTag(TAG_PRIMARY_COLOR), primaryColor) + } else { + putNull(ContextSpecificTag(TAG_PRIMARY_COLOR)) + } + endStructure() + } + } + + companion object { + private const val TAG_FINISH = 0 + private const val TAG_PRIMARY_COLOR = 1 + + fun fromTlv( + tlvTag: Tag, + tlvReader: TlvReader + ): BridgedDeviceBasicInformationClusterProductAppearanceStruct { + tlvReader.enterStructure(tlvTag) + val finish = tlvReader.getUInt(ContextSpecificTag(TAG_FINISH)) + val primaryColor = + if (!tlvReader.isNull()) { + tlvReader.getUInt(ContextSpecificTag(TAG_PRIMARY_COLOR)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_PRIMARY_COLOR)) + null + } + + tlvReader.exitContainer() + + return BridgedDeviceBasicInformationClusterProductAppearanceStruct(finish, primaryColor) + } + } +} diff --git a/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/ChannelClusterChannelInfoStruct.kt b/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/ChannelClusterChannelInfoStruct.kt new file mode 100644 index 00000000000000..78dbdfba00b026 --- /dev/null +++ b/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/ChannelClusterChannelInfoStruct.kt @@ -0,0 +1,105 @@ +/* + * + * Copyright (c) 2023 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package matter.devicecontroller.cluster.structs + +import java.util.Optional +import matter.devicecontroller.cluster.* +import matter.tlv.ContextSpecificTag +import matter.tlv.Tag +import matter.tlv.TlvReader +import matter.tlv.TlvWriter + +class ChannelClusterChannelInfoStruct( + val majorNumber: UShort, + val minorNumber: UShort, + val name: Optional, + val callSign: Optional, + val affiliateCallSign: Optional +) { + override fun toString(): String = buildString { + append("ChannelClusterChannelInfoStruct {\n") + append("\tmajorNumber : $majorNumber\n") + append("\tminorNumber : $minorNumber\n") + append("\tname : $name\n") + append("\tcallSign : $callSign\n") + append("\taffiliateCallSign : $affiliateCallSign\n") + append("}\n") + } + + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tlvTag) + put(ContextSpecificTag(TAG_MAJOR_NUMBER), majorNumber) + put(ContextSpecificTag(TAG_MINOR_NUMBER), minorNumber) + if (name.isPresent) { + val optname = name.get() + put(ContextSpecificTag(TAG_NAME), optname) + } + if (callSign.isPresent) { + val optcallSign = callSign.get() + put(ContextSpecificTag(TAG_CALL_SIGN), optcallSign) + } + if (affiliateCallSign.isPresent) { + val optaffiliateCallSign = affiliateCallSign.get() + put(ContextSpecificTag(TAG_AFFILIATE_CALL_SIGN), optaffiliateCallSign) + } + endStructure() + } + } + + companion object { + private const val TAG_MAJOR_NUMBER = 0 + private const val TAG_MINOR_NUMBER = 1 + private const val TAG_NAME = 2 + private const val TAG_CALL_SIGN = 3 + private const val TAG_AFFILIATE_CALL_SIGN = 4 + + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): ChannelClusterChannelInfoStruct { + tlvReader.enterStructure(tlvTag) + val majorNumber = tlvReader.getUShort(ContextSpecificTag(TAG_MAJOR_NUMBER)) + val minorNumber = tlvReader.getUShort(ContextSpecificTag(TAG_MINOR_NUMBER)) + val name = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_NAME))) { + Optional.of(tlvReader.getString(ContextSpecificTag(TAG_NAME))) + } else { + Optional.empty() + } + val callSign = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_CALL_SIGN))) { + Optional.of(tlvReader.getString(ContextSpecificTag(TAG_CALL_SIGN))) + } else { + Optional.empty() + } + val affiliateCallSign = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_AFFILIATE_CALL_SIGN))) { + Optional.of(tlvReader.getString(ContextSpecificTag(TAG_AFFILIATE_CALL_SIGN))) + } else { + Optional.empty() + } + + tlvReader.exitContainer() + + return ChannelClusterChannelInfoStruct( + majorNumber, + minorNumber, + name, + callSign, + affiliateCallSign + ) + } + } +} diff --git a/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/ChannelClusterLineupInfoStruct.kt b/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/ChannelClusterLineupInfoStruct.kt new file mode 100644 index 00000000000000..cb1ab50c1e95db --- /dev/null +++ b/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/ChannelClusterLineupInfoStruct.kt @@ -0,0 +1,86 @@ +/* + * + * Copyright (c) 2023 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package matter.devicecontroller.cluster.structs + +import java.util.Optional +import matter.devicecontroller.cluster.* +import matter.tlv.ContextSpecificTag +import matter.tlv.Tag +import matter.tlv.TlvReader +import matter.tlv.TlvWriter + +class ChannelClusterLineupInfoStruct( + val operatorName: String, + val lineupName: Optional, + val postalCode: Optional, + val lineupInfoType: UInt +) { + override fun toString(): String = buildString { + append("ChannelClusterLineupInfoStruct {\n") + append("\toperatorName : $operatorName\n") + append("\tlineupName : $lineupName\n") + append("\tpostalCode : $postalCode\n") + append("\tlineupInfoType : $lineupInfoType\n") + append("}\n") + } + + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tlvTag) + put(ContextSpecificTag(TAG_OPERATOR_NAME), operatorName) + if (lineupName.isPresent) { + val optlineupName = lineupName.get() + put(ContextSpecificTag(TAG_LINEUP_NAME), optlineupName) + } + if (postalCode.isPresent) { + val optpostalCode = postalCode.get() + put(ContextSpecificTag(TAG_POSTAL_CODE), optpostalCode) + } + put(ContextSpecificTag(TAG_LINEUP_INFO_TYPE), lineupInfoType) + endStructure() + } + } + + companion object { + private const val TAG_OPERATOR_NAME = 0 + private const val TAG_LINEUP_NAME = 1 + private const val TAG_POSTAL_CODE = 2 + private const val TAG_LINEUP_INFO_TYPE = 3 + + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): ChannelClusterLineupInfoStruct { + tlvReader.enterStructure(tlvTag) + val operatorName = tlvReader.getString(ContextSpecificTag(TAG_OPERATOR_NAME)) + val lineupName = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_LINEUP_NAME))) { + Optional.of(tlvReader.getString(ContextSpecificTag(TAG_LINEUP_NAME))) + } else { + Optional.empty() + } + val postalCode = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_POSTAL_CODE))) { + Optional.of(tlvReader.getString(ContextSpecificTag(TAG_POSTAL_CODE))) + } else { + Optional.empty() + } + val lineupInfoType = tlvReader.getUInt(ContextSpecificTag(TAG_LINEUP_INFO_TYPE)) + + tlvReader.exitContainer() + + return ChannelClusterLineupInfoStruct(operatorName, lineupName, postalCode, lineupInfoType) + } + } +} diff --git a/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/ContentLauncherClusterAdditionalInfoStruct.kt b/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/ContentLauncherClusterAdditionalInfoStruct.kt new file mode 100644 index 00000000000000..e58a8923415e3b --- /dev/null +++ b/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/ContentLauncherClusterAdditionalInfoStruct.kt @@ -0,0 +1,56 @@ +/* + * + * Copyright (c) 2023 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package matter.devicecontroller.cluster.structs + +import matter.devicecontroller.cluster.* +import matter.tlv.ContextSpecificTag +import matter.tlv.Tag +import matter.tlv.TlvReader +import matter.tlv.TlvWriter + +class ContentLauncherClusterAdditionalInfoStruct(val name: String, val value: String) { + override fun toString(): String = buildString { + append("ContentLauncherClusterAdditionalInfoStruct {\n") + append("\tname : $name\n") + append("\tvalue : $value\n") + append("}\n") + } + + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tlvTag) + put(ContextSpecificTag(TAG_NAME), name) + put(ContextSpecificTag(TAG_VALUE), value) + endStructure() + } + } + + companion object { + private const val TAG_NAME = 0 + private const val TAG_VALUE = 1 + + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): ContentLauncherClusterAdditionalInfoStruct { + tlvReader.enterStructure(tlvTag) + val name = tlvReader.getString(ContextSpecificTag(TAG_NAME)) + val value = tlvReader.getString(ContextSpecificTag(TAG_VALUE)) + + tlvReader.exitContainer() + + return ContentLauncherClusterAdditionalInfoStruct(name, value) + } + } +} diff --git a/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/ContentLauncherClusterBrandingInformationStruct.kt b/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/ContentLauncherClusterBrandingInformationStruct.kt new file mode 100644 index 00000000000000..7fc9456852969f --- /dev/null +++ b/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/ContentLauncherClusterBrandingInformationStruct.kt @@ -0,0 +1,155 @@ +/* + * + * Copyright (c) 2023 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package matter.devicecontroller.cluster.structs + +import java.util.Optional +import matter.devicecontroller.cluster.* +import matter.tlv.ContextSpecificTag +import matter.tlv.Tag +import matter.tlv.TlvReader +import matter.tlv.TlvWriter + +class ContentLauncherClusterBrandingInformationStruct( + val providerName: String, + val background: Optional, + val logo: Optional, + val progressBar: Optional, + val splash: Optional, + val waterMark: Optional +) { + override fun toString(): String = buildString { + append("ContentLauncherClusterBrandingInformationStruct {\n") + append("\tproviderName : $providerName\n") + append("\tbackground : $background\n") + append("\tlogo : $logo\n") + append("\tprogressBar : $progressBar\n") + append("\tsplash : $splash\n") + append("\twaterMark : $waterMark\n") + append("}\n") + } + + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tlvTag) + put(ContextSpecificTag(TAG_PROVIDER_NAME), providerName) + if (background.isPresent) { + val optbackground = background.get() + optbackground.toTlv(ContextSpecificTag(TAG_BACKGROUND), this) + } + if (logo.isPresent) { + val optlogo = logo.get() + optlogo.toTlv(ContextSpecificTag(TAG_LOGO), this) + } + if (progressBar.isPresent) { + val optprogressBar = progressBar.get() + optprogressBar.toTlv(ContextSpecificTag(TAG_PROGRESS_BAR), this) + } + if (splash.isPresent) { + val optsplash = splash.get() + optsplash.toTlv(ContextSpecificTag(TAG_SPLASH), this) + } + if (waterMark.isPresent) { + val optwaterMark = waterMark.get() + optwaterMark.toTlv(ContextSpecificTag(TAG_WATER_MARK), this) + } + endStructure() + } + } + + companion object { + private const val TAG_PROVIDER_NAME = 0 + private const val TAG_BACKGROUND = 1 + private const val TAG_LOGO = 2 + private const val TAG_PROGRESS_BAR = 3 + private const val TAG_SPLASH = 4 + private const val TAG_WATER_MARK = 5 + + fun fromTlv( + tlvTag: Tag, + tlvReader: TlvReader + ): ContentLauncherClusterBrandingInformationStruct { + tlvReader.enterStructure(tlvTag) + val providerName = tlvReader.getString(ContextSpecificTag(TAG_PROVIDER_NAME)) + val background = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_BACKGROUND))) { + Optional.of( + ContentLauncherClusterStyleInformationStruct.fromTlv( + ContextSpecificTag(TAG_BACKGROUND), + tlvReader + ) + ) + } else { + Optional.empty() + } + val logo = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_LOGO))) { + Optional.of( + ContentLauncherClusterStyleInformationStruct.fromTlv( + ContextSpecificTag(TAG_LOGO), + tlvReader + ) + ) + } else { + Optional.empty() + } + val progressBar = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_PROGRESS_BAR))) { + Optional.of( + ContentLauncherClusterStyleInformationStruct.fromTlv( + ContextSpecificTag(TAG_PROGRESS_BAR), + tlvReader + ) + ) + } else { + Optional.empty() + } + val splash = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_SPLASH))) { + Optional.of( + ContentLauncherClusterStyleInformationStruct.fromTlv( + ContextSpecificTag(TAG_SPLASH), + tlvReader + ) + ) + } else { + Optional.empty() + } + val waterMark = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_WATER_MARK))) { + Optional.of( + ContentLauncherClusterStyleInformationStruct.fromTlv( + ContextSpecificTag(TAG_WATER_MARK), + tlvReader + ) + ) + } else { + Optional.empty() + } + + tlvReader.exitContainer() + + return ContentLauncherClusterBrandingInformationStruct( + providerName, + background, + logo, + progressBar, + splash, + waterMark + ) + } + } +} diff --git a/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/ContentLauncherClusterContentSearchStruct.kt b/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/ContentLauncherClusterContentSearchStruct.kt new file mode 100644 index 00000000000000..edb9b9abc81976 --- /dev/null +++ b/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/ContentLauncherClusterContentSearchStruct.kt @@ -0,0 +1,66 @@ +/* + * + * Copyright (c) 2023 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package matter.devicecontroller.cluster.structs + +import matter.devicecontroller.cluster.* +import matter.tlv.AnonymousTag +import matter.tlv.ContextSpecificTag +import matter.tlv.Tag +import matter.tlv.TlvReader +import matter.tlv.TlvWriter + +class ContentLauncherClusterContentSearchStruct( + val parameterList: List +) { + override fun toString(): String = buildString { + append("ContentLauncherClusterContentSearchStruct {\n") + append("\tparameterList : $parameterList\n") + append("}\n") + } + + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tlvTag) + startArray(ContextSpecificTag(TAG_PARAMETER_LIST)) + for (item in parameterList.iterator()) { + item.toTlv(AnonymousTag, this) + } + endArray() + endStructure() + } + } + + companion object { + private const val TAG_PARAMETER_LIST = 0 + + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): ContentLauncherClusterContentSearchStruct { + tlvReader.enterStructure(tlvTag) + val parameterList = + buildList { + tlvReader.enterArray(ContextSpecificTag(TAG_PARAMETER_LIST)) + while (!tlvReader.isEndOfContainer()) { + add(ContentLauncherClusterParameterStruct.fromTlv(AnonymousTag, tlvReader)) + } + tlvReader.exitContainer() + } + + tlvReader.exitContainer() + + return ContentLauncherClusterContentSearchStruct(parameterList) + } + } +} diff --git a/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/ContentLauncherClusterDimensionStruct.kt b/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/ContentLauncherClusterDimensionStruct.kt new file mode 100644 index 00000000000000..02b1322f5f9f17 --- /dev/null +++ b/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/ContentLauncherClusterDimensionStruct.kt @@ -0,0 +1,64 @@ +/* + * + * Copyright (c) 2023 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package matter.devicecontroller.cluster.structs + +import matter.devicecontroller.cluster.* +import matter.tlv.ContextSpecificTag +import matter.tlv.Tag +import matter.tlv.TlvReader +import matter.tlv.TlvWriter + +class ContentLauncherClusterDimensionStruct( + val width: Double, + val height: Double, + val metric: UInt +) { + override fun toString(): String = buildString { + append("ContentLauncherClusterDimensionStruct {\n") + append("\twidth : $width\n") + append("\theight : $height\n") + append("\tmetric : $metric\n") + append("}\n") + } + + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tlvTag) + put(ContextSpecificTag(TAG_WIDTH), width) + put(ContextSpecificTag(TAG_HEIGHT), height) + put(ContextSpecificTag(TAG_METRIC), metric) + endStructure() + } + } + + companion object { + private const val TAG_WIDTH = 0 + private const val TAG_HEIGHT = 1 + private const val TAG_METRIC = 2 + + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): ContentLauncherClusterDimensionStruct { + tlvReader.enterStructure(tlvTag) + val width = tlvReader.getDouble(ContextSpecificTag(TAG_WIDTH)) + val height = tlvReader.getDouble(ContextSpecificTag(TAG_HEIGHT)) + val metric = tlvReader.getUInt(ContextSpecificTag(TAG_METRIC)) + + tlvReader.exitContainer() + + return ContentLauncherClusterDimensionStruct(width, height, metric) + } + } +} diff --git a/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/ContentLauncherClusterParameterStruct.kt b/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/ContentLauncherClusterParameterStruct.kt new file mode 100644 index 00000000000000..ee1efa7365917b --- /dev/null +++ b/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/ContentLauncherClusterParameterStruct.kt @@ -0,0 +1,86 @@ +/* + * + * Copyright (c) 2023 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package matter.devicecontroller.cluster.structs + +import java.util.Optional +import matter.devicecontroller.cluster.* +import matter.tlv.AnonymousTag +import matter.tlv.ContextSpecificTag +import matter.tlv.Tag +import matter.tlv.TlvReader +import matter.tlv.TlvWriter + +class ContentLauncherClusterParameterStruct( + val type: UInt, + val value: String, + val externalIDList: Optional> +) { + override fun toString(): String = buildString { + append("ContentLauncherClusterParameterStruct {\n") + append("\ttype : $type\n") + append("\tvalue : $value\n") + append("\texternalIDList : $externalIDList\n") + append("}\n") + } + + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tlvTag) + put(ContextSpecificTag(TAG_TYPE), type) + put(ContextSpecificTag(TAG_VALUE), value) + if (externalIDList.isPresent) { + val optexternalIDList = externalIDList.get() + startArray(ContextSpecificTag(TAG_EXTERNAL_I_D_LIST)) + for (item in optexternalIDList.iterator()) { + item.toTlv(AnonymousTag, this) + } + endArray() + } + endStructure() + } + } + + companion object { + private const val TAG_TYPE = 0 + private const val TAG_VALUE = 1 + private const val TAG_EXTERNAL_I_D_LIST = 2 + + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): ContentLauncherClusterParameterStruct { + tlvReader.enterStructure(tlvTag) + val type = tlvReader.getUInt(ContextSpecificTag(TAG_TYPE)) + val value = tlvReader.getString(ContextSpecificTag(TAG_VALUE)) + val externalIDList = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_EXTERNAL_I_D_LIST))) { + Optional.of( + buildList { + tlvReader.enterArray(ContextSpecificTag(TAG_EXTERNAL_I_D_LIST)) + while (!tlvReader.isEndOfContainer()) { + add(ContentLauncherClusterAdditionalInfoStruct.fromTlv(AnonymousTag, tlvReader)) + } + tlvReader.exitContainer() + } + ) + } else { + Optional.empty() + } + + tlvReader.exitContainer() + + return ContentLauncherClusterParameterStruct(type, value, externalIDList) + } + } +} diff --git a/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/ContentLauncherClusterStyleInformationStruct.kt b/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/ContentLauncherClusterStyleInformationStruct.kt new file mode 100644 index 00000000000000..217d11a7712d03 --- /dev/null +++ b/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/ContentLauncherClusterStyleInformationStruct.kt @@ -0,0 +1,91 @@ +/* + * + * Copyright (c) 2023 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package matter.devicecontroller.cluster.structs + +import java.util.Optional +import matter.devicecontroller.cluster.* +import matter.tlv.ContextSpecificTag +import matter.tlv.Tag +import matter.tlv.TlvReader +import matter.tlv.TlvWriter + +class ContentLauncherClusterStyleInformationStruct( + val imageURL: Optional, + val color: Optional, + val size: Optional +) { + override fun toString(): String = buildString { + append("ContentLauncherClusterStyleInformationStruct {\n") + append("\timageURL : $imageURL\n") + append("\tcolor : $color\n") + append("\tsize : $size\n") + append("}\n") + } + + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tlvTag) + if (imageURL.isPresent) { + val optimageURL = imageURL.get() + put(ContextSpecificTag(TAG_IMAGE_U_R_L), optimageURL) + } + if (color.isPresent) { + val optcolor = color.get() + put(ContextSpecificTag(TAG_COLOR), optcolor) + } + if (size.isPresent) { + val optsize = size.get() + optsize.toTlv(ContextSpecificTag(TAG_SIZE), this) + } + endStructure() + } + } + + companion object { + private const val TAG_IMAGE_U_R_L = 0 + private const val TAG_COLOR = 1 + private const val TAG_SIZE = 2 + + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): ContentLauncherClusterStyleInformationStruct { + tlvReader.enterStructure(tlvTag) + val imageURL = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_IMAGE_U_R_L))) { + Optional.of(tlvReader.getString(ContextSpecificTag(TAG_IMAGE_U_R_L))) + } else { + Optional.empty() + } + val color = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_COLOR))) { + Optional.of(tlvReader.getString(ContextSpecificTag(TAG_COLOR))) + } else { + Optional.empty() + } + val size = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_SIZE))) { + Optional.of( + ContentLauncherClusterDimensionStruct.fromTlv(ContextSpecificTag(TAG_SIZE), tlvReader) + ) + } else { + Optional.empty() + } + + tlvReader.exitContainer() + + return ContentLauncherClusterStyleInformationStruct(imageURL, color, size) + } + } +} diff --git a/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/DescriptorClusterDeviceTypeStruct.kt b/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/DescriptorClusterDeviceTypeStruct.kt new file mode 100644 index 00000000000000..b7b19082af7379 --- /dev/null +++ b/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/DescriptorClusterDeviceTypeStruct.kt @@ -0,0 +1,56 @@ +/* + * + * Copyright (c) 2023 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package matter.devicecontroller.cluster.structs + +import matter.devicecontroller.cluster.* +import matter.tlv.ContextSpecificTag +import matter.tlv.Tag +import matter.tlv.TlvReader +import matter.tlv.TlvWriter + +class DescriptorClusterDeviceTypeStruct(val deviceType: UInt, val revision: UShort) { + override fun toString(): String = buildString { + append("DescriptorClusterDeviceTypeStruct {\n") + append("\tdeviceType : $deviceType\n") + append("\trevision : $revision\n") + append("}\n") + } + + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tlvTag) + put(ContextSpecificTag(TAG_DEVICE_TYPE), deviceType) + put(ContextSpecificTag(TAG_REVISION), revision) + endStructure() + } + } + + companion object { + private const val TAG_DEVICE_TYPE = 0 + private const val TAG_REVISION = 1 + + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): DescriptorClusterDeviceTypeStruct { + tlvReader.enterStructure(tlvTag) + val deviceType = tlvReader.getUInt(ContextSpecificTag(TAG_DEVICE_TYPE)) + val revision = tlvReader.getUShort(ContextSpecificTag(TAG_REVISION)) + + tlvReader.exitContainer() + + return DescriptorClusterDeviceTypeStruct(deviceType, revision) + } + } +} diff --git a/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/DescriptorClusterSemanticTagStruct.kt b/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/DescriptorClusterSemanticTagStruct.kt new file mode 100644 index 00000000000000..2dd5869528c27f --- /dev/null +++ b/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/DescriptorClusterSemanticTagStruct.kt @@ -0,0 +1,97 @@ +/* + * + * Copyright (c) 2023 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package matter.devicecontroller.cluster.structs + +import java.util.Optional +import matter.devicecontroller.cluster.* +import matter.tlv.ContextSpecificTag +import matter.tlv.Tag +import matter.tlv.TlvReader +import matter.tlv.TlvWriter + +class DescriptorClusterSemanticTagStruct( + val mfgCode: UShort?, + val namespaceID: UInt, + val tag: UInt, + val label: Optional? +) { + override fun toString(): String = buildString { + append("DescriptorClusterSemanticTagStruct {\n") + append("\tmfgCode : $mfgCode\n") + append("\tnamespaceID : $namespaceID\n") + append("\ttag : $tag\n") + append("\tlabel : $label\n") + append("}\n") + } + + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tlvTag) + if (mfgCode != null) { + put(ContextSpecificTag(TAG_MFG_CODE), mfgCode) + } else { + putNull(ContextSpecificTag(TAG_MFG_CODE)) + } + put(ContextSpecificTag(TAG_NAMESPACE_I_D), namespaceID) + put(ContextSpecificTag(TAG_TAG), tag) + if (label != null) { + if (label.isPresent) { + val optlabel = label.get() + put(ContextSpecificTag(TAG_LABEL), optlabel) + } + } else { + putNull(ContextSpecificTag(TAG_LABEL)) + } + endStructure() + } + } + + companion object { + private const val TAG_MFG_CODE = 0 + private const val TAG_NAMESPACE_I_D = 1 + private const val TAG_TAG = 2 + private const val TAG_LABEL = 3 + + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): DescriptorClusterSemanticTagStruct { + tlvReader.enterStructure(tlvTag) + val mfgCode = + if (!tlvReader.isNull()) { + tlvReader.getUShort(ContextSpecificTag(TAG_MFG_CODE)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_MFG_CODE)) + null + } + val namespaceID = tlvReader.getUInt(ContextSpecificTag(TAG_NAMESPACE_I_D)) + val tag = tlvReader.getUInt(ContextSpecificTag(TAG_TAG)) + val label = + if (!tlvReader.isNull()) { + if (tlvReader.isNextTag(ContextSpecificTag(TAG_LABEL))) { + Optional.of(tlvReader.getString(ContextSpecificTag(TAG_LABEL))) + } else { + Optional.empty() + } + } else { + tlvReader.getNull(ContextSpecificTag(TAG_LABEL)) + null + } + + tlvReader.exitContainer() + + return DescriptorClusterSemanticTagStruct(mfgCode, namespaceID, tag, label) + } + } +} diff --git a/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/DishwasherModeClusterModeOptionStruct.kt b/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/DishwasherModeClusterModeOptionStruct.kt new file mode 100644 index 00000000000000..d35df126ab13bd --- /dev/null +++ b/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/DishwasherModeClusterModeOptionStruct.kt @@ -0,0 +1,76 @@ +/* + * + * Copyright (c) 2023 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package matter.devicecontroller.cluster.structs + +import matter.devicecontroller.cluster.* +import matter.tlv.AnonymousTag +import matter.tlv.ContextSpecificTag +import matter.tlv.Tag +import matter.tlv.TlvReader +import matter.tlv.TlvWriter + +class DishwasherModeClusterModeOptionStruct( + val label: String, + val mode: UByte, + val modeTags: List +) { + override fun toString(): String = buildString { + append("DishwasherModeClusterModeOptionStruct {\n") + append("\tlabel : $label\n") + append("\tmode : $mode\n") + append("\tmodeTags : $modeTags\n") + append("}\n") + } + + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tlvTag) + put(ContextSpecificTag(TAG_LABEL), label) + put(ContextSpecificTag(TAG_MODE), mode) + startArray(ContextSpecificTag(TAG_MODE_TAGS)) + for (item in modeTags.iterator()) { + item.toTlv(AnonymousTag, this) + } + endArray() + endStructure() + } + } + + companion object { + private const val TAG_LABEL = 0 + private const val TAG_MODE = 1 + private const val TAG_MODE_TAGS = 2 + + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): DishwasherModeClusterModeOptionStruct { + tlvReader.enterStructure(tlvTag) + val label = tlvReader.getString(ContextSpecificTag(TAG_LABEL)) + val mode = tlvReader.getUByte(ContextSpecificTag(TAG_MODE)) + val modeTags = + buildList { + tlvReader.enterArray(ContextSpecificTag(TAG_MODE_TAGS)) + while (!tlvReader.isEndOfContainer()) { + add(DishwasherModeClusterModeTagStruct.fromTlv(AnonymousTag, tlvReader)) + } + tlvReader.exitContainer() + } + + tlvReader.exitContainer() + + return DishwasherModeClusterModeOptionStruct(label, mode, modeTags) + } + } +} diff --git a/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/DishwasherModeClusterModeTagStruct.kt b/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/DishwasherModeClusterModeTagStruct.kt new file mode 100644 index 00000000000000..7e3d6bbe24ecdb --- /dev/null +++ b/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/DishwasherModeClusterModeTagStruct.kt @@ -0,0 +1,65 @@ +/* + * + * Copyright (c) 2023 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package matter.devicecontroller.cluster.structs + +import java.util.Optional +import matter.devicecontroller.cluster.* +import matter.tlv.ContextSpecificTag +import matter.tlv.Tag +import matter.tlv.TlvReader +import matter.tlv.TlvWriter + +class DishwasherModeClusterModeTagStruct(val mfgCode: Optional, val value: UInt) { + override fun toString(): String = buildString { + append("DishwasherModeClusterModeTagStruct {\n") + append("\tmfgCode : $mfgCode\n") + append("\tvalue : $value\n") + append("}\n") + } + + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tlvTag) + if (mfgCode.isPresent) { + val optmfgCode = mfgCode.get() + put(ContextSpecificTag(TAG_MFG_CODE), optmfgCode) + } + put(ContextSpecificTag(TAG_VALUE), value) + endStructure() + } + } + + companion object { + private const val TAG_MFG_CODE = 0 + private const val TAG_VALUE = 1 + + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): DishwasherModeClusterModeTagStruct { + tlvReader.enterStructure(tlvTag) + val mfgCode = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_MFG_CODE))) { + Optional.of(tlvReader.getUShort(ContextSpecificTag(TAG_MFG_CODE))) + } else { + Optional.empty() + } + val value = tlvReader.getUInt(ContextSpecificTag(TAG_VALUE)) + + tlvReader.exitContainer() + + return DishwasherModeClusterModeTagStruct(mfgCode, value) + } + } +} diff --git a/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/DoorLockClusterCredentialStruct.kt b/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/DoorLockClusterCredentialStruct.kt new file mode 100644 index 00000000000000..4ee0122fa76b0c --- /dev/null +++ b/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/DoorLockClusterCredentialStruct.kt @@ -0,0 +1,56 @@ +/* + * + * Copyright (c) 2023 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package matter.devicecontroller.cluster.structs + +import matter.devicecontroller.cluster.* +import matter.tlv.ContextSpecificTag +import matter.tlv.Tag +import matter.tlv.TlvReader +import matter.tlv.TlvWriter + +class DoorLockClusterCredentialStruct(val credentialType: UInt, val credentialIndex: UShort) { + override fun toString(): String = buildString { + append("DoorLockClusterCredentialStruct {\n") + append("\tcredentialType : $credentialType\n") + append("\tcredentialIndex : $credentialIndex\n") + append("}\n") + } + + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tlvTag) + put(ContextSpecificTag(TAG_CREDENTIAL_TYPE), credentialType) + put(ContextSpecificTag(TAG_CREDENTIAL_INDEX), credentialIndex) + endStructure() + } + } + + companion object { + private const val TAG_CREDENTIAL_TYPE = 0 + private const val TAG_CREDENTIAL_INDEX = 1 + + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): DoorLockClusterCredentialStruct { + tlvReader.enterStructure(tlvTag) + val credentialType = tlvReader.getUInt(ContextSpecificTag(TAG_CREDENTIAL_TYPE)) + val credentialIndex = tlvReader.getUShort(ContextSpecificTag(TAG_CREDENTIAL_INDEX)) + + tlvReader.exitContainer() + + return DoorLockClusterCredentialStruct(credentialType, credentialIndex) + } + } +} diff --git a/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/FixedLabelClusterLabelStruct.kt b/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/FixedLabelClusterLabelStruct.kt new file mode 100644 index 00000000000000..07a231555999fa --- /dev/null +++ b/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/FixedLabelClusterLabelStruct.kt @@ -0,0 +1,56 @@ +/* + * + * Copyright (c) 2023 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package matter.devicecontroller.cluster.structs + +import matter.devicecontroller.cluster.* +import matter.tlv.ContextSpecificTag +import matter.tlv.Tag +import matter.tlv.TlvReader +import matter.tlv.TlvWriter + +class FixedLabelClusterLabelStruct(val label: String, val value: String) { + override fun toString(): String = buildString { + append("FixedLabelClusterLabelStruct {\n") + append("\tlabel : $label\n") + append("\tvalue : $value\n") + append("}\n") + } + + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tlvTag) + put(ContextSpecificTag(TAG_LABEL), label) + put(ContextSpecificTag(TAG_VALUE), value) + endStructure() + } + } + + companion object { + private const val TAG_LABEL = 0 + private const val TAG_VALUE = 1 + + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): FixedLabelClusterLabelStruct { + tlvReader.enterStructure(tlvTag) + val label = tlvReader.getString(ContextSpecificTag(TAG_LABEL)) + val value = tlvReader.getString(ContextSpecificTag(TAG_VALUE)) + + tlvReader.exitContainer() + + return FixedLabelClusterLabelStruct(label, value) + } + } +} diff --git a/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/GeneralCommissioningClusterBasicCommissioningInfo.kt b/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/GeneralCommissioningClusterBasicCommissioningInfo.kt new file mode 100644 index 00000000000000..e8638055916ae0 --- /dev/null +++ b/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/GeneralCommissioningClusterBasicCommissioningInfo.kt @@ -0,0 +1,67 @@ +/* + * + * Copyright (c) 2023 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package matter.devicecontroller.cluster.structs + +import matter.devicecontroller.cluster.* +import matter.tlv.ContextSpecificTag +import matter.tlv.Tag +import matter.tlv.TlvReader +import matter.tlv.TlvWriter + +class GeneralCommissioningClusterBasicCommissioningInfo( + val failSafeExpiryLengthSeconds: UShort, + val maxCumulativeFailsafeSeconds: UShort +) { + override fun toString(): String = buildString { + append("GeneralCommissioningClusterBasicCommissioningInfo {\n") + append("\tfailSafeExpiryLengthSeconds : $failSafeExpiryLengthSeconds\n") + append("\tmaxCumulativeFailsafeSeconds : $maxCumulativeFailsafeSeconds\n") + append("}\n") + } + + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tlvTag) + put(ContextSpecificTag(TAG_FAIL_SAFE_EXPIRY_LENGTH_SECONDS), failSafeExpiryLengthSeconds) + put(ContextSpecificTag(TAG_MAX_CUMULATIVE_FAILSAFE_SECONDS), maxCumulativeFailsafeSeconds) + endStructure() + } + } + + companion object { + private const val TAG_FAIL_SAFE_EXPIRY_LENGTH_SECONDS = 0 + private const val TAG_MAX_CUMULATIVE_FAILSAFE_SECONDS = 1 + + fun fromTlv( + tlvTag: Tag, + tlvReader: TlvReader + ): GeneralCommissioningClusterBasicCommissioningInfo { + tlvReader.enterStructure(tlvTag) + val failSafeExpiryLengthSeconds = + tlvReader.getUShort(ContextSpecificTag(TAG_FAIL_SAFE_EXPIRY_LENGTH_SECONDS)) + val maxCumulativeFailsafeSeconds = + tlvReader.getUShort(ContextSpecificTag(TAG_MAX_CUMULATIVE_FAILSAFE_SECONDS)) + + tlvReader.exitContainer() + + return GeneralCommissioningClusterBasicCommissioningInfo( + failSafeExpiryLengthSeconds, + maxCumulativeFailsafeSeconds + ) + } + } +} diff --git a/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/GeneralDiagnosticsClusterNetworkInterface.kt b/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/GeneralDiagnosticsClusterNetworkInterface.kt new file mode 100644 index 00000000000000..900e71adea7c6d --- /dev/null +++ b/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/GeneralDiagnosticsClusterNetworkInterface.kt @@ -0,0 +1,147 @@ +/* + * + * Copyright (c) 2023 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package matter.devicecontroller.cluster.structs + +import matter.devicecontroller.cluster.* +import matter.tlv.AnonymousTag +import matter.tlv.ContextSpecificTag +import matter.tlv.Tag +import matter.tlv.TlvReader +import matter.tlv.TlvWriter + +class GeneralDiagnosticsClusterNetworkInterface( + val name: String, + val isOperational: Boolean, + val offPremiseServicesReachableIPv4: Boolean?, + val offPremiseServicesReachableIPv6: Boolean?, + val hardwareAddress: ByteArray, + val IPv4Addresses: List, + val IPv6Addresses: List, + val type: UInt +) { + override fun toString(): String = buildString { + append("GeneralDiagnosticsClusterNetworkInterface {\n") + append("\tname : $name\n") + append("\tisOperational : $isOperational\n") + append("\toffPremiseServicesReachableIPv4 : $offPremiseServicesReachableIPv4\n") + append("\toffPremiseServicesReachableIPv6 : $offPremiseServicesReachableIPv6\n") + append("\thardwareAddress : $hardwareAddress\n") + append("\tIPv4Addresses : $IPv4Addresses\n") + append("\tIPv6Addresses : $IPv6Addresses\n") + append("\ttype : $type\n") + append("}\n") + } + + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tlvTag) + put(ContextSpecificTag(TAG_NAME), name) + put(ContextSpecificTag(TAG_IS_OPERATIONAL), isOperational) + if (offPremiseServicesReachableIPv4 != null) { + put( + ContextSpecificTag(TAG_OFF_PREMISE_SERVICES_REACHABLE_I_PV4), + offPremiseServicesReachableIPv4 + ) + } else { + putNull(ContextSpecificTag(TAG_OFF_PREMISE_SERVICES_REACHABLE_I_PV4)) + } + if (offPremiseServicesReachableIPv6 != null) { + put( + ContextSpecificTag(TAG_OFF_PREMISE_SERVICES_REACHABLE_I_PV6), + offPremiseServicesReachableIPv6 + ) + } else { + putNull(ContextSpecificTag(TAG_OFF_PREMISE_SERVICES_REACHABLE_I_PV6)) + } + put(ContextSpecificTag(TAG_HARDWARE_ADDRESS), hardwareAddress) + startArray(ContextSpecificTag(TAG_I_PV4_ADDRESSES)) + for (item in IPv4Addresses.iterator()) { + put(AnonymousTag, item) + } + endArray() + startArray(ContextSpecificTag(TAG_I_PV6_ADDRESSES)) + for (item in IPv6Addresses.iterator()) { + put(AnonymousTag, item) + } + endArray() + put(ContextSpecificTag(TAG_TYPE), type) + endStructure() + } + } + + companion object { + private const val TAG_NAME = 0 + private const val TAG_IS_OPERATIONAL = 1 + private const val TAG_OFF_PREMISE_SERVICES_REACHABLE_I_PV4 = 2 + private const val TAG_OFF_PREMISE_SERVICES_REACHABLE_I_PV6 = 3 + private const val TAG_HARDWARE_ADDRESS = 4 + private const val TAG_I_PV4_ADDRESSES = 5 + private const val TAG_I_PV6_ADDRESSES = 6 + private const val TAG_TYPE = 7 + + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): GeneralDiagnosticsClusterNetworkInterface { + tlvReader.enterStructure(tlvTag) + val name = tlvReader.getString(ContextSpecificTag(TAG_NAME)) + val isOperational = tlvReader.getBoolean(ContextSpecificTag(TAG_IS_OPERATIONAL)) + val offPremiseServicesReachableIPv4 = + if (!tlvReader.isNull()) { + tlvReader.getBoolean(ContextSpecificTag(TAG_OFF_PREMISE_SERVICES_REACHABLE_I_PV4)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_OFF_PREMISE_SERVICES_REACHABLE_I_PV4)) + null + } + val offPremiseServicesReachableIPv6 = + if (!tlvReader.isNull()) { + tlvReader.getBoolean(ContextSpecificTag(TAG_OFF_PREMISE_SERVICES_REACHABLE_I_PV6)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_OFF_PREMISE_SERVICES_REACHABLE_I_PV6)) + null + } + val hardwareAddress = tlvReader.getByteArray(ContextSpecificTag(TAG_HARDWARE_ADDRESS)) + val IPv4Addresses = + buildList { + tlvReader.enterArray(ContextSpecificTag(TAG_I_PV4_ADDRESSES)) + while (!tlvReader.isEndOfContainer()) { + add(tlvReader.getByteArray(AnonymousTag)) + } + tlvReader.exitContainer() + } + val IPv6Addresses = + buildList { + tlvReader.enterArray(ContextSpecificTag(TAG_I_PV6_ADDRESSES)) + while (!tlvReader.isEndOfContainer()) { + add(tlvReader.getByteArray(AnonymousTag)) + } + tlvReader.exitContainer() + } + val type = tlvReader.getUInt(ContextSpecificTag(TAG_TYPE)) + + tlvReader.exitContainer() + + return GeneralDiagnosticsClusterNetworkInterface( + name, + isOperational, + offPremiseServicesReachableIPv4, + offPremiseServicesReachableIPv6, + hardwareAddress, + IPv4Addresses, + IPv6Addresses, + type + ) + } + } +} diff --git a/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/GroupKeyManagementClusterGroupInfoMapStruct.kt b/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/GroupKeyManagementClusterGroupInfoMapStruct.kt new file mode 100644 index 00000000000000..cfa9eb7e88060c --- /dev/null +++ b/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/GroupKeyManagementClusterGroupInfoMapStruct.kt @@ -0,0 +1,90 @@ +/* + * + * Copyright (c) 2023 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package matter.devicecontroller.cluster.structs + +import java.util.Optional +import matter.devicecontroller.cluster.* +import matter.tlv.AnonymousTag +import matter.tlv.ContextSpecificTag +import matter.tlv.Tag +import matter.tlv.TlvReader +import matter.tlv.TlvWriter + +class GroupKeyManagementClusterGroupInfoMapStruct( + val groupId: UShort, + val endpoints: List, + val groupName: Optional, + val fabricIndex: UByte +) { + override fun toString(): String = buildString { + append("GroupKeyManagementClusterGroupInfoMapStruct {\n") + append("\tgroupId : $groupId\n") + append("\tendpoints : $endpoints\n") + append("\tgroupName : $groupName\n") + append("\tfabricIndex : $fabricIndex\n") + append("}\n") + } + + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tlvTag) + put(ContextSpecificTag(TAG_GROUP_ID), groupId) + startArray(ContextSpecificTag(TAG_ENDPOINTS)) + for (item in endpoints.iterator()) { + put(AnonymousTag, item) + } + endArray() + if (groupName.isPresent) { + val optgroupName = groupName.get() + put(ContextSpecificTag(TAG_GROUP_NAME), optgroupName) + } + put(ContextSpecificTag(TAG_FABRIC_INDEX), fabricIndex) + endStructure() + } + } + + companion object { + private const val TAG_GROUP_ID = 1 + private const val TAG_ENDPOINTS = 2 + private const val TAG_GROUP_NAME = 3 + private const val TAG_FABRIC_INDEX = 254 + + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): GroupKeyManagementClusterGroupInfoMapStruct { + tlvReader.enterStructure(tlvTag) + val groupId = tlvReader.getUShort(ContextSpecificTag(TAG_GROUP_ID)) + val endpoints = + buildList { + tlvReader.enterArray(ContextSpecificTag(TAG_ENDPOINTS)) + while (!tlvReader.isEndOfContainer()) { + add(tlvReader.getUShort(AnonymousTag)) + } + tlvReader.exitContainer() + } + val groupName = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_GROUP_NAME))) { + Optional.of(tlvReader.getString(ContextSpecificTag(TAG_GROUP_NAME))) + } else { + Optional.empty() + } + val fabricIndex = tlvReader.getUByte(ContextSpecificTag(TAG_FABRIC_INDEX)) + + tlvReader.exitContainer() + + return GroupKeyManagementClusterGroupInfoMapStruct(groupId, endpoints, groupName, fabricIndex) + } + } +} diff --git a/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/GroupKeyManagementClusterGroupKeyMapStruct.kt b/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/GroupKeyManagementClusterGroupKeyMapStruct.kt new file mode 100644 index 00000000000000..96460161128bbe --- /dev/null +++ b/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/GroupKeyManagementClusterGroupKeyMapStruct.kt @@ -0,0 +1,64 @@ +/* + * + * Copyright (c) 2023 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package matter.devicecontroller.cluster.structs + +import matter.devicecontroller.cluster.* +import matter.tlv.ContextSpecificTag +import matter.tlv.Tag +import matter.tlv.TlvReader +import matter.tlv.TlvWriter + +class GroupKeyManagementClusterGroupKeyMapStruct( + val groupId: UShort, + val groupKeySetID: UShort, + val fabricIndex: UByte +) { + override fun toString(): String = buildString { + append("GroupKeyManagementClusterGroupKeyMapStruct {\n") + append("\tgroupId : $groupId\n") + append("\tgroupKeySetID : $groupKeySetID\n") + append("\tfabricIndex : $fabricIndex\n") + append("}\n") + } + + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tlvTag) + put(ContextSpecificTag(TAG_GROUP_ID), groupId) + put(ContextSpecificTag(TAG_GROUP_KEY_SET_I_D), groupKeySetID) + put(ContextSpecificTag(TAG_FABRIC_INDEX), fabricIndex) + endStructure() + } + } + + companion object { + private const val TAG_GROUP_ID = 1 + private const val TAG_GROUP_KEY_SET_I_D = 2 + private const val TAG_FABRIC_INDEX = 254 + + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): GroupKeyManagementClusterGroupKeyMapStruct { + tlvReader.enterStructure(tlvTag) + val groupId = tlvReader.getUShort(ContextSpecificTag(TAG_GROUP_ID)) + val groupKeySetID = tlvReader.getUShort(ContextSpecificTag(TAG_GROUP_KEY_SET_I_D)) + val fabricIndex = tlvReader.getUByte(ContextSpecificTag(TAG_FABRIC_INDEX)) + + tlvReader.exitContainer() + + return GroupKeyManagementClusterGroupKeyMapStruct(groupId, groupKeySetID, fabricIndex) + } + } +} diff --git a/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/GroupKeyManagementClusterGroupKeySetStruct.kt b/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/GroupKeyManagementClusterGroupKeySetStruct.kt new file mode 100644 index 00000000000000..2c8d334a4cffd9 --- /dev/null +++ b/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/GroupKeyManagementClusterGroupKeySetStruct.kt @@ -0,0 +1,159 @@ +/* + * + * Copyright (c) 2023 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package matter.devicecontroller.cluster.structs + +import matter.devicecontroller.cluster.* +import matter.tlv.ContextSpecificTag +import matter.tlv.Tag +import matter.tlv.TlvReader +import matter.tlv.TlvWriter + +class GroupKeyManagementClusterGroupKeySetStruct( + val groupKeySetID: UShort, + val groupKeySecurityPolicy: UInt, + val epochKey0: ByteArray?, + val epochStartTime0: ULong?, + val epochKey1: ByteArray?, + val epochStartTime1: ULong?, + val epochKey2: ByteArray?, + val epochStartTime2: ULong? +) { + override fun toString(): String = buildString { + append("GroupKeyManagementClusterGroupKeySetStruct {\n") + append("\tgroupKeySetID : $groupKeySetID\n") + append("\tgroupKeySecurityPolicy : $groupKeySecurityPolicy\n") + append("\tepochKey0 : $epochKey0\n") + append("\tepochStartTime0 : $epochStartTime0\n") + append("\tepochKey1 : $epochKey1\n") + append("\tepochStartTime1 : $epochStartTime1\n") + append("\tepochKey2 : $epochKey2\n") + append("\tepochStartTime2 : $epochStartTime2\n") + append("}\n") + } + + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tlvTag) + put(ContextSpecificTag(TAG_GROUP_KEY_SET_I_D), groupKeySetID) + put(ContextSpecificTag(TAG_GROUP_KEY_SECURITY_POLICY), groupKeySecurityPolicy) + if (epochKey0 != null) { + put(ContextSpecificTag(TAG_EPOCH_KEY0), epochKey0) + } else { + putNull(ContextSpecificTag(TAG_EPOCH_KEY0)) + } + if (epochStartTime0 != null) { + put(ContextSpecificTag(TAG_EPOCH_START_TIME0), epochStartTime0) + } else { + putNull(ContextSpecificTag(TAG_EPOCH_START_TIME0)) + } + if (epochKey1 != null) { + put(ContextSpecificTag(TAG_EPOCH_KEY1), epochKey1) + } else { + putNull(ContextSpecificTag(TAG_EPOCH_KEY1)) + } + if (epochStartTime1 != null) { + put(ContextSpecificTag(TAG_EPOCH_START_TIME1), epochStartTime1) + } else { + putNull(ContextSpecificTag(TAG_EPOCH_START_TIME1)) + } + if (epochKey2 != null) { + put(ContextSpecificTag(TAG_EPOCH_KEY2), epochKey2) + } else { + putNull(ContextSpecificTag(TAG_EPOCH_KEY2)) + } + if (epochStartTime2 != null) { + put(ContextSpecificTag(TAG_EPOCH_START_TIME2), epochStartTime2) + } else { + putNull(ContextSpecificTag(TAG_EPOCH_START_TIME2)) + } + endStructure() + } + } + + companion object { + private const val TAG_GROUP_KEY_SET_I_D = 0 + private const val TAG_GROUP_KEY_SECURITY_POLICY = 1 + private const val TAG_EPOCH_KEY0 = 2 + private const val TAG_EPOCH_START_TIME0 = 3 + private const val TAG_EPOCH_KEY1 = 4 + private const val TAG_EPOCH_START_TIME1 = 5 + private const val TAG_EPOCH_KEY2 = 6 + private const val TAG_EPOCH_START_TIME2 = 7 + + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): GroupKeyManagementClusterGroupKeySetStruct { + tlvReader.enterStructure(tlvTag) + val groupKeySetID = tlvReader.getUShort(ContextSpecificTag(TAG_GROUP_KEY_SET_I_D)) + val groupKeySecurityPolicy = + tlvReader.getUInt(ContextSpecificTag(TAG_GROUP_KEY_SECURITY_POLICY)) + val epochKey0 = + if (!tlvReader.isNull()) { + tlvReader.getByteArray(ContextSpecificTag(TAG_EPOCH_KEY0)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_EPOCH_KEY0)) + null + } + val epochStartTime0 = + if (!tlvReader.isNull()) { + tlvReader.getULong(ContextSpecificTag(TAG_EPOCH_START_TIME0)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_EPOCH_START_TIME0)) + null + } + val epochKey1 = + if (!tlvReader.isNull()) { + tlvReader.getByteArray(ContextSpecificTag(TAG_EPOCH_KEY1)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_EPOCH_KEY1)) + null + } + val epochStartTime1 = + if (!tlvReader.isNull()) { + tlvReader.getULong(ContextSpecificTag(TAG_EPOCH_START_TIME1)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_EPOCH_START_TIME1)) + null + } + val epochKey2 = + if (!tlvReader.isNull()) { + tlvReader.getByteArray(ContextSpecificTag(TAG_EPOCH_KEY2)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_EPOCH_KEY2)) + null + } + val epochStartTime2 = + if (!tlvReader.isNull()) { + tlvReader.getULong(ContextSpecificTag(TAG_EPOCH_START_TIME2)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_EPOCH_START_TIME2)) + null + } + + tlvReader.exitContainer() + + return GroupKeyManagementClusterGroupKeySetStruct( + groupKeySetID, + groupKeySecurityPolicy, + epochKey0, + epochStartTime0, + epochKey1, + epochStartTime1, + epochKey2, + epochStartTime2 + ) + } + } +} diff --git a/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/HepaFilterMonitoringClusterReplacementProductStruct.kt b/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/HepaFilterMonitoringClusterReplacementProductStruct.kt new file mode 100644 index 00000000000000..32ce0e6298f485 --- /dev/null +++ b/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/HepaFilterMonitoringClusterReplacementProductStruct.kt @@ -0,0 +1,66 @@ +/* + * + * Copyright (c) 2023 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package matter.devicecontroller.cluster.structs + +import matter.devicecontroller.cluster.* +import matter.tlv.ContextSpecificTag +import matter.tlv.Tag +import matter.tlv.TlvReader +import matter.tlv.TlvWriter + +class HepaFilterMonitoringClusterReplacementProductStruct( + val productIdentifierType: UInt, + val productIdentifierValue: String +) { + override fun toString(): String = buildString { + append("HepaFilterMonitoringClusterReplacementProductStruct {\n") + append("\tproductIdentifierType : $productIdentifierType\n") + append("\tproductIdentifierValue : $productIdentifierValue\n") + append("}\n") + } + + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tlvTag) + put(ContextSpecificTag(TAG_PRODUCT_IDENTIFIER_TYPE), productIdentifierType) + put(ContextSpecificTag(TAG_PRODUCT_IDENTIFIER_VALUE), productIdentifierValue) + endStructure() + } + } + + companion object { + private const val TAG_PRODUCT_IDENTIFIER_TYPE = 0 + private const val TAG_PRODUCT_IDENTIFIER_VALUE = 1 + + fun fromTlv( + tlvTag: Tag, + tlvReader: TlvReader + ): HepaFilterMonitoringClusterReplacementProductStruct { + tlvReader.enterStructure(tlvTag) + val productIdentifierType = tlvReader.getUInt(ContextSpecificTag(TAG_PRODUCT_IDENTIFIER_TYPE)) + val productIdentifierValue = + tlvReader.getString(ContextSpecificTag(TAG_PRODUCT_IDENTIFIER_VALUE)) + + tlvReader.exitContainer() + + return HepaFilterMonitoringClusterReplacementProductStruct( + productIdentifierType, + productIdentifierValue + ) + } + } +} diff --git a/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/IcdManagementClusterMonitoringRegistrationStruct.kt b/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/IcdManagementClusterMonitoringRegistrationStruct.kt new file mode 100644 index 00000000000000..2a7a56c9a650dd --- /dev/null +++ b/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/IcdManagementClusterMonitoringRegistrationStruct.kt @@ -0,0 +1,71 @@ +/* + * + * Copyright (c) 2023 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package matter.devicecontroller.cluster.structs + +import matter.devicecontroller.cluster.* +import matter.tlv.ContextSpecificTag +import matter.tlv.Tag +import matter.tlv.TlvReader +import matter.tlv.TlvWriter + +class IcdManagementClusterMonitoringRegistrationStruct( + val checkInNodeID: ULong, + val monitoredSubject: ULong, + val fabricIndex: UByte +) { + override fun toString(): String = buildString { + append("IcdManagementClusterMonitoringRegistrationStruct {\n") + append("\tcheckInNodeID : $checkInNodeID\n") + append("\tmonitoredSubject : $monitoredSubject\n") + append("\tfabricIndex : $fabricIndex\n") + append("}\n") + } + + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tlvTag) + put(ContextSpecificTag(TAG_CHECK_IN_NODE_I_D), checkInNodeID) + put(ContextSpecificTag(TAG_MONITORED_SUBJECT), monitoredSubject) + put(ContextSpecificTag(TAG_FABRIC_INDEX), fabricIndex) + endStructure() + } + } + + companion object { + private const val TAG_CHECK_IN_NODE_I_D = 1 + private const val TAG_MONITORED_SUBJECT = 2 + private const val TAG_FABRIC_INDEX = 254 + + fun fromTlv( + tlvTag: Tag, + tlvReader: TlvReader + ): IcdManagementClusterMonitoringRegistrationStruct { + tlvReader.enterStructure(tlvTag) + val checkInNodeID = tlvReader.getULong(ContextSpecificTag(TAG_CHECK_IN_NODE_I_D)) + val monitoredSubject = tlvReader.getULong(ContextSpecificTag(TAG_MONITORED_SUBJECT)) + val fabricIndex = tlvReader.getUByte(ContextSpecificTag(TAG_FABRIC_INDEX)) + + tlvReader.exitContainer() + + return IcdManagementClusterMonitoringRegistrationStruct( + checkInNodeID, + monitoredSubject, + fabricIndex + ) + } + } +} diff --git a/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/LaundryWasherModeClusterModeOptionStruct.kt b/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/LaundryWasherModeClusterModeOptionStruct.kt new file mode 100644 index 00000000000000..08988b2b2dfa27 --- /dev/null +++ b/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/LaundryWasherModeClusterModeOptionStruct.kt @@ -0,0 +1,76 @@ +/* + * + * Copyright (c) 2023 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package matter.devicecontroller.cluster.structs + +import matter.devicecontroller.cluster.* +import matter.tlv.AnonymousTag +import matter.tlv.ContextSpecificTag +import matter.tlv.Tag +import matter.tlv.TlvReader +import matter.tlv.TlvWriter + +class LaundryWasherModeClusterModeOptionStruct( + val label: String, + val mode: UByte, + val modeTags: List +) { + override fun toString(): String = buildString { + append("LaundryWasherModeClusterModeOptionStruct {\n") + append("\tlabel : $label\n") + append("\tmode : $mode\n") + append("\tmodeTags : $modeTags\n") + append("}\n") + } + + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tlvTag) + put(ContextSpecificTag(TAG_LABEL), label) + put(ContextSpecificTag(TAG_MODE), mode) + startArray(ContextSpecificTag(TAG_MODE_TAGS)) + for (item in modeTags.iterator()) { + item.toTlv(AnonymousTag, this) + } + endArray() + endStructure() + } + } + + companion object { + private const val TAG_LABEL = 0 + private const val TAG_MODE = 1 + private const val TAG_MODE_TAGS = 2 + + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): LaundryWasherModeClusterModeOptionStruct { + tlvReader.enterStructure(tlvTag) + val label = tlvReader.getString(ContextSpecificTag(TAG_LABEL)) + val mode = tlvReader.getUByte(ContextSpecificTag(TAG_MODE)) + val modeTags = + buildList { + tlvReader.enterArray(ContextSpecificTag(TAG_MODE_TAGS)) + while (!tlvReader.isEndOfContainer()) { + add(LaundryWasherModeClusterModeTagStruct.fromTlv(AnonymousTag, tlvReader)) + } + tlvReader.exitContainer() + } + + tlvReader.exitContainer() + + return LaundryWasherModeClusterModeOptionStruct(label, mode, modeTags) + } + } +} diff --git a/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/LaundryWasherModeClusterModeTagStruct.kt b/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/LaundryWasherModeClusterModeTagStruct.kt new file mode 100644 index 00000000000000..0284a239b9b610 --- /dev/null +++ b/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/LaundryWasherModeClusterModeTagStruct.kt @@ -0,0 +1,65 @@ +/* + * + * Copyright (c) 2023 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package matter.devicecontroller.cluster.structs + +import java.util.Optional +import matter.devicecontroller.cluster.* +import matter.tlv.ContextSpecificTag +import matter.tlv.Tag +import matter.tlv.TlvReader +import matter.tlv.TlvWriter + +class LaundryWasherModeClusterModeTagStruct(val mfgCode: Optional, val value: UInt) { + override fun toString(): String = buildString { + append("LaundryWasherModeClusterModeTagStruct {\n") + append("\tmfgCode : $mfgCode\n") + append("\tvalue : $value\n") + append("}\n") + } + + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tlvTag) + if (mfgCode.isPresent) { + val optmfgCode = mfgCode.get() + put(ContextSpecificTag(TAG_MFG_CODE), optmfgCode) + } + put(ContextSpecificTag(TAG_VALUE), value) + endStructure() + } + } + + companion object { + private const val TAG_MFG_CODE = 0 + private const val TAG_VALUE = 1 + + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): LaundryWasherModeClusterModeTagStruct { + tlvReader.enterStructure(tlvTag) + val mfgCode = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_MFG_CODE))) { + Optional.of(tlvReader.getUShort(ContextSpecificTag(TAG_MFG_CODE))) + } else { + Optional.empty() + } + val value = tlvReader.getUInt(ContextSpecificTag(TAG_VALUE)) + + tlvReader.exitContainer() + + return LaundryWasherModeClusterModeTagStruct(mfgCode, value) + } + } +} diff --git a/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/MediaInputClusterInputInfoStruct.kt b/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/MediaInputClusterInputInfoStruct.kt new file mode 100644 index 00000000000000..ef3a028b680b8a --- /dev/null +++ b/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/MediaInputClusterInputInfoStruct.kt @@ -0,0 +1,69 @@ +/* + * + * Copyright (c) 2023 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package matter.devicecontroller.cluster.structs + +import matter.devicecontroller.cluster.* +import matter.tlv.ContextSpecificTag +import matter.tlv.Tag +import matter.tlv.TlvReader +import matter.tlv.TlvWriter + +class MediaInputClusterInputInfoStruct( + val index: UByte, + val inputType: UInt, + val name: String, + val description: String +) { + override fun toString(): String = buildString { + append("MediaInputClusterInputInfoStruct {\n") + append("\tindex : $index\n") + append("\tinputType : $inputType\n") + append("\tname : $name\n") + append("\tdescription : $description\n") + append("}\n") + } + + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tlvTag) + put(ContextSpecificTag(TAG_INDEX), index) + put(ContextSpecificTag(TAG_INPUT_TYPE), inputType) + put(ContextSpecificTag(TAG_NAME), name) + put(ContextSpecificTag(TAG_DESCRIPTION), description) + endStructure() + } + } + + companion object { + private const val TAG_INDEX = 0 + private const val TAG_INPUT_TYPE = 1 + private const val TAG_NAME = 2 + private const val TAG_DESCRIPTION = 3 + + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): MediaInputClusterInputInfoStruct { + tlvReader.enterStructure(tlvTag) + val index = tlvReader.getUByte(ContextSpecificTag(TAG_INDEX)) + val inputType = tlvReader.getUInt(ContextSpecificTag(TAG_INPUT_TYPE)) + val name = tlvReader.getString(ContextSpecificTag(TAG_NAME)) + val description = tlvReader.getString(ContextSpecificTag(TAG_DESCRIPTION)) + + tlvReader.exitContainer() + + return MediaInputClusterInputInfoStruct(index, inputType, name, description) + } + } +} diff --git a/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/MediaPlaybackClusterPlaybackPositionStruct.kt b/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/MediaPlaybackClusterPlaybackPositionStruct.kt new file mode 100644 index 00000000000000..3052f1984c2412 --- /dev/null +++ b/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/MediaPlaybackClusterPlaybackPositionStruct.kt @@ -0,0 +1,66 @@ +/* + * + * Copyright (c) 2023 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package matter.devicecontroller.cluster.structs + +import matter.devicecontroller.cluster.* +import matter.tlv.ContextSpecificTag +import matter.tlv.Tag +import matter.tlv.TlvReader +import matter.tlv.TlvWriter + +class MediaPlaybackClusterPlaybackPositionStruct(val updatedAt: ULong, val position: ULong?) { + override fun toString(): String = buildString { + append("MediaPlaybackClusterPlaybackPositionStruct {\n") + append("\tupdatedAt : $updatedAt\n") + append("\tposition : $position\n") + append("}\n") + } + + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tlvTag) + put(ContextSpecificTag(TAG_UPDATED_AT), updatedAt) + if (position != null) { + put(ContextSpecificTag(TAG_POSITION), position) + } else { + putNull(ContextSpecificTag(TAG_POSITION)) + } + endStructure() + } + } + + companion object { + private const val TAG_UPDATED_AT = 0 + private const val TAG_POSITION = 1 + + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): MediaPlaybackClusterPlaybackPositionStruct { + tlvReader.enterStructure(tlvTag) + val updatedAt = tlvReader.getULong(ContextSpecificTag(TAG_UPDATED_AT)) + val position = + if (!tlvReader.isNull()) { + tlvReader.getULong(ContextSpecificTag(TAG_POSITION)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_POSITION)) + null + } + + tlvReader.exitContainer() + + return MediaPlaybackClusterPlaybackPositionStruct(updatedAt, position) + } + } +} diff --git a/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/ModeSelectClusterModeOptionStruct.kt b/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/ModeSelectClusterModeOptionStruct.kt new file mode 100644 index 00000000000000..8cb331e77ade86 --- /dev/null +++ b/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/ModeSelectClusterModeOptionStruct.kt @@ -0,0 +1,76 @@ +/* + * + * Copyright (c) 2023 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package matter.devicecontroller.cluster.structs + +import matter.devicecontroller.cluster.* +import matter.tlv.AnonymousTag +import matter.tlv.ContextSpecificTag +import matter.tlv.Tag +import matter.tlv.TlvReader +import matter.tlv.TlvWriter + +class ModeSelectClusterModeOptionStruct( + val label: String, + val mode: UByte, + val semanticTags: List +) { + override fun toString(): String = buildString { + append("ModeSelectClusterModeOptionStruct {\n") + append("\tlabel : $label\n") + append("\tmode : $mode\n") + append("\tsemanticTags : $semanticTags\n") + append("}\n") + } + + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tlvTag) + put(ContextSpecificTag(TAG_LABEL), label) + put(ContextSpecificTag(TAG_MODE), mode) + startArray(ContextSpecificTag(TAG_SEMANTIC_TAGS)) + for (item in semanticTags.iterator()) { + item.toTlv(AnonymousTag, this) + } + endArray() + endStructure() + } + } + + companion object { + private const val TAG_LABEL = 0 + private const val TAG_MODE = 1 + private const val TAG_SEMANTIC_TAGS = 2 + + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): ModeSelectClusterModeOptionStruct { + tlvReader.enterStructure(tlvTag) + val label = tlvReader.getString(ContextSpecificTag(TAG_LABEL)) + val mode = tlvReader.getUByte(ContextSpecificTag(TAG_MODE)) + val semanticTags = + buildList { + tlvReader.enterArray(ContextSpecificTag(TAG_SEMANTIC_TAGS)) + while (!tlvReader.isEndOfContainer()) { + add(ModeSelectClusterSemanticTagStruct.fromTlv(AnonymousTag, tlvReader)) + } + tlvReader.exitContainer() + } + + tlvReader.exitContainer() + + return ModeSelectClusterModeOptionStruct(label, mode, semanticTags) + } + } +} diff --git a/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/ModeSelectClusterSemanticTagStruct.kt b/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/ModeSelectClusterSemanticTagStruct.kt new file mode 100644 index 00000000000000..5b6d1ae0fb71f0 --- /dev/null +++ b/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/ModeSelectClusterSemanticTagStruct.kt @@ -0,0 +1,56 @@ +/* + * + * Copyright (c) 2023 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package matter.devicecontroller.cluster.structs + +import matter.devicecontroller.cluster.* +import matter.tlv.ContextSpecificTag +import matter.tlv.Tag +import matter.tlv.TlvReader +import matter.tlv.TlvWriter + +class ModeSelectClusterSemanticTagStruct(val mfgCode: UShort, val value: UInt) { + override fun toString(): String = buildString { + append("ModeSelectClusterSemanticTagStruct {\n") + append("\tmfgCode : $mfgCode\n") + append("\tvalue : $value\n") + append("}\n") + } + + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tlvTag) + put(ContextSpecificTag(TAG_MFG_CODE), mfgCode) + put(ContextSpecificTag(TAG_VALUE), value) + endStructure() + } + } + + companion object { + private const val TAG_MFG_CODE = 0 + private const val TAG_VALUE = 1 + + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): ModeSelectClusterSemanticTagStruct { + tlvReader.enterStructure(tlvTag) + val mfgCode = tlvReader.getUShort(ContextSpecificTag(TAG_MFG_CODE)) + val value = tlvReader.getUInt(ContextSpecificTag(TAG_VALUE)) + + tlvReader.exitContainer() + + return ModeSelectClusterSemanticTagStruct(mfgCode, value) + } + } +} diff --git a/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/NetworkCommissioningClusterNetworkInfoStruct.kt b/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/NetworkCommissioningClusterNetworkInfoStruct.kt new file mode 100644 index 00000000000000..856ed9943059b0 --- /dev/null +++ b/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/NetworkCommissioningClusterNetworkInfoStruct.kt @@ -0,0 +1,59 @@ +/* + * + * Copyright (c) 2023 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package matter.devicecontroller.cluster.structs + +import matter.devicecontroller.cluster.* +import matter.tlv.ContextSpecificTag +import matter.tlv.Tag +import matter.tlv.TlvReader +import matter.tlv.TlvWriter + +class NetworkCommissioningClusterNetworkInfoStruct( + val networkID: ByteArray, + val connected: Boolean +) { + override fun toString(): String = buildString { + append("NetworkCommissioningClusterNetworkInfoStruct {\n") + append("\tnetworkID : $networkID\n") + append("\tconnected : $connected\n") + append("}\n") + } + + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tlvTag) + put(ContextSpecificTag(TAG_NETWORK_I_D), networkID) + put(ContextSpecificTag(TAG_CONNECTED), connected) + endStructure() + } + } + + companion object { + private const val TAG_NETWORK_I_D = 0 + private const val TAG_CONNECTED = 1 + + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): NetworkCommissioningClusterNetworkInfoStruct { + tlvReader.enterStructure(tlvTag) + val networkID = tlvReader.getByteArray(ContextSpecificTag(TAG_NETWORK_I_D)) + val connected = tlvReader.getBoolean(ContextSpecificTag(TAG_CONNECTED)) + + tlvReader.exitContainer() + + return NetworkCommissioningClusterNetworkInfoStruct(networkID, connected) + } + } +} diff --git a/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/NetworkCommissioningClusterThreadInterfaceScanResultStruct.kt b/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/NetworkCommissioningClusterThreadInterfaceScanResultStruct.kt new file mode 100644 index 00000000000000..5057fa34bc1cbe --- /dev/null +++ b/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/NetworkCommissioningClusterThreadInterfaceScanResultStruct.kt @@ -0,0 +1,101 @@ +/* + * + * Copyright (c) 2023 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package matter.devicecontroller.cluster.structs + +import matter.devicecontroller.cluster.* +import matter.tlv.ContextSpecificTag +import matter.tlv.Tag +import matter.tlv.TlvReader +import matter.tlv.TlvWriter + +class NetworkCommissioningClusterThreadInterfaceScanResultStruct( + val panId: UShort, + val extendedPanId: ULong, + val networkName: String, + val channel: UShort, + val version: UByte, + val extendedAddress: ByteArray, + val rssi: Byte, + val lqi: UByte +) { + override fun toString(): String = buildString { + append("NetworkCommissioningClusterThreadInterfaceScanResultStruct {\n") + append("\tpanId : $panId\n") + append("\textendedPanId : $extendedPanId\n") + append("\tnetworkName : $networkName\n") + append("\tchannel : $channel\n") + append("\tversion : $version\n") + append("\textendedAddress : $extendedAddress\n") + append("\trssi : $rssi\n") + append("\tlqi : $lqi\n") + append("}\n") + } + + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tlvTag) + put(ContextSpecificTag(TAG_PAN_ID), panId) + put(ContextSpecificTag(TAG_EXTENDED_PAN_ID), extendedPanId) + put(ContextSpecificTag(TAG_NETWORK_NAME), networkName) + put(ContextSpecificTag(TAG_CHANNEL), channel) + put(ContextSpecificTag(TAG_VERSION), version) + put(ContextSpecificTag(TAG_EXTENDED_ADDRESS), extendedAddress) + put(ContextSpecificTag(TAG_RSSI), rssi) + put(ContextSpecificTag(TAG_LQI), lqi) + endStructure() + } + } + + companion object { + private const val TAG_PAN_ID = 0 + private const val TAG_EXTENDED_PAN_ID = 1 + private const val TAG_NETWORK_NAME = 2 + private const val TAG_CHANNEL = 3 + private const val TAG_VERSION = 4 + private const val TAG_EXTENDED_ADDRESS = 5 + private const val TAG_RSSI = 6 + private const val TAG_LQI = 7 + + fun fromTlv( + tlvTag: Tag, + tlvReader: TlvReader + ): NetworkCommissioningClusterThreadInterfaceScanResultStruct { + tlvReader.enterStructure(tlvTag) + val panId = tlvReader.getUShort(ContextSpecificTag(TAG_PAN_ID)) + val extendedPanId = tlvReader.getULong(ContextSpecificTag(TAG_EXTENDED_PAN_ID)) + val networkName = tlvReader.getString(ContextSpecificTag(TAG_NETWORK_NAME)) + val channel = tlvReader.getUShort(ContextSpecificTag(TAG_CHANNEL)) + val version = tlvReader.getUByte(ContextSpecificTag(TAG_VERSION)) + val extendedAddress = tlvReader.getByteArray(ContextSpecificTag(TAG_EXTENDED_ADDRESS)) + val rssi = tlvReader.getByte(ContextSpecificTag(TAG_RSSI)) + val lqi = tlvReader.getUByte(ContextSpecificTag(TAG_LQI)) + + tlvReader.exitContainer() + + return NetworkCommissioningClusterThreadInterfaceScanResultStruct( + panId, + extendedPanId, + networkName, + channel, + version, + extendedAddress, + rssi, + lqi + ) + } + } +} diff --git a/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/NetworkCommissioningClusterWiFiInterfaceScanResultStruct.kt b/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/NetworkCommissioningClusterWiFiInterfaceScanResultStruct.kt new file mode 100644 index 00000000000000..3d2c8ea65a32bd --- /dev/null +++ b/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/NetworkCommissioningClusterWiFiInterfaceScanResultStruct.kt @@ -0,0 +1,89 @@ +/* + * + * Copyright (c) 2023 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package matter.devicecontroller.cluster.structs + +import matter.devicecontroller.cluster.* +import matter.tlv.ContextSpecificTag +import matter.tlv.Tag +import matter.tlv.TlvReader +import matter.tlv.TlvWriter + +class NetworkCommissioningClusterWiFiInterfaceScanResultStruct( + val security: UInt, + val ssid: ByteArray, + val bssid: ByteArray, + val channel: UShort, + val wiFiBand: UInt, + val rssi: Byte +) { + override fun toString(): String = buildString { + append("NetworkCommissioningClusterWiFiInterfaceScanResultStruct {\n") + append("\tsecurity : $security\n") + append("\tssid : $ssid\n") + append("\tbssid : $bssid\n") + append("\tchannel : $channel\n") + append("\twiFiBand : $wiFiBand\n") + append("\trssi : $rssi\n") + append("}\n") + } + + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tlvTag) + put(ContextSpecificTag(TAG_SECURITY), security) + put(ContextSpecificTag(TAG_SSID), ssid) + put(ContextSpecificTag(TAG_BSSID), bssid) + put(ContextSpecificTag(TAG_CHANNEL), channel) + put(ContextSpecificTag(TAG_WI_FI_BAND), wiFiBand) + put(ContextSpecificTag(TAG_RSSI), rssi) + endStructure() + } + } + + companion object { + private const val TAG_SECURITY = 0 + private const val TAG_SSID = 1 + private const val TAG_BSSID = 2 + private const val TAG_CHANNEL = 3 + private const val TAG_WI_FI_BAND = 4 + private const val TAG_RSSI = 5 + + fun fromTlv( + tlvTag: Tag, + tlvReader: TlvReader + ): NetworkCommissioningClusterWiFiInterfaceScanResultStruct { + tlvReader.enterStructure(tlvTag) + val security = tlvReader.getUInt(ContextSpecificTag(TAG_SECURITY)) + val ssid = tlvReader.getByteArray(ContextSpecificTag(TAG_SSID)) + val bssid = tlvReader.getByteArray(ContextSpecificTag(TAG_BSSID)) + val channel = tlvReader.getUShort(ContextSpecificTag(TAG_CHANNEL)) + val wiFiBand = tlvReader.getUInt(ContextSpecificTag(TAG_WI_FI_BAND)) + val rssi = tlvReader.getByte(ContextSpecificTag(TAG_RSSI)) + + tlvReader.exitContainer() + + return NetworkCommissioningClusterWiFiInterfaceScanResultStruct( + security, + ssid, + bssid, + channel, + wiFiBand, + rssi + ) + } + } +} diff --git a/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/OperationalCredentialsClusterFabricDescriptorStruct.kt b/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/OperationalCredentialsClusterFabricDescriptorStruct.kt new file mode 100644 index 00000000000000..66de75d6e3efc1 --- /dev/null +++ b/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/OperationalCredentialsClusterFabricDescriptorStruct.kt @@ -0,0 +1,89 @@ +/* + * + * Copyright (c) 2023 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package matter.devicecontroller.cluster.structs + +import matter.devicecontroller.cluster.* +import matter.tlv.ContextSpecificTag +import matter.tlv.Tag +import matter.tlv.TlvReader +import matter.tlv.TlvWriter + +class OperationalCredentialsClusterFabricDescriptorStruct( + val rootPublicKey: ByteArray, + val vendorID: UShort, + val fabricID: ULong, + val nodeID: ULong, + val label: String, + val fabricIndex: UByte +) { + override fun toString(): String = buildString { + append("OperationalCredentialsClusterFabricDescriptorStruct {\n") + append("\trootPublicKey : $rootPublicKey\n") + append("\tvendorID : $vendorID\n") + append("\tfabricID : $fabricID\n") + append("\tnodeID : $nodeID\n") + append("\tlabel : $label\n") + append("\tfabricIndex : $fabricIndex\n") + append("}\n") + } + + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tlvTag) + put(ContextSpecificTag(TAG_ROOT_PUBLIC_KEY), rootPublicKey) + put(ContextSpecificTag(TAG_VENDOR_I_D), vendorID) + put(ContextSpecificTag(TAG_FABRIC_I_D), fabricID) + put(ContextSpecificTag(TAG_NODE_I_D), nodeID) + put(ContextSpecificTag(TAG_LABEL), label) + put(ContextSpecificTag(TAG_FABRIC_INDEX), fabricIndex) + endStructure() + } + } + + companion object { + private const val TAG_ROOT_PUBLIC_KEY = 1 + private const val TAG_VENDOR_I_D = 2 + private const val TAG_FABRIC_I_D = 3 + private const val TAG_NODE_I_D = 4 + private const val TAG_LABEL = 5 + private const val TAG_FABRIC_INDEX = 254 + + fun fromTlv( + tlvTag: Tag, + tlvReader: TlvReader + ): OperationalCredentialsClusterFabricDescriptorStruct { + tlvReader.enterStructure(tlvTag) + val rootPublicKey = tlvReader.getByteArray(ContextSpecificTag(TAG_ROOT_PUBLIC_KEY)) + val vendorID = tlvReader.getUShort(ContextSpecificTag(TAG_VENDOR_I_D)) + val fabricID = tlvReader.getULong(ContextSpecificTag(TAG_FABRIC_I_D)) + val nodeID = tlvReader.getULong(ContextSpecificTag(TAG_NODE_I_D)) + val label = tlvReader.getString(ContextSpecificTag(TAG_LABEL)) + val fabricIndex = tlvReader.getUByte(ContextSpecificTag(TAG_FABRIC_INDEX)) + + tlvReader.exitContainer() + + return OperationalCredentialsClusterFabricDescriptorStruct( + rootPublicKey, + vendorID, + fabricID, + nodeID, + label, + fabricIndex + ) + } + } +} diff --git a/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/OperationalCredentialsClusterNOCStruct.kt b/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/OperationalCredentialsClusterNOCStruct.kt new file mode 100644 index 00000000000000..ab86611164d93d --- /dev/null +++ b/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/OperationalCredentialsClusterNOCStruct.kt @@ -0,0 +1,74 @@ +/* + * + * Copyright (c) 2023 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package matter.devicecontroller.cluster.structs + +import matter.devicecontroller.cluster.* +import matter.tlv.ContextSpecificTag +import matter.tlv.Tag +import matter.tlv.TlvReader +import matter.tlv.TlvWriter + +class OperationalCredentialsClusterNOCStruct( + val noc: ByteArray, + val icac: ByteArray?, + val fabricIndex: UByte +) { + override fun toString(): String = buildString { + append("OperationalCredentialsClusterNOCStruct {\n") + append("\tnoc : $noc\n") + append("\ticac : $icac\n") + append("\tfabricIndex : $fabricIndex\n") + append("}\n") + } + + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tlvTag) + put(ContextSpecificTag(TAG_NOC), noc) + if (icac != null) { + put(ContextSpecificTag(TAG_ICAC), icac) + } else { + putNull(ContextSpecificTag(TAG_ICAC)) + } + put(ContextSpecificTag(TAG_FABRIC_INDEX), fabricIndex) + endStructure() + } + } + + companion object { + private const val TAG_NOC = 1 + private const val TAG_ICAC = 2 + private const val TAG_FABRIC_INDEX = 254 + + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): OperationalCredentialsClusterNOCStruct { + tlvReader.enterStructure(tlvTag) + val noc = tlvReader.getByteArray(ContextSpecificTag(TAG_NOC)) + val icac = + if (!tlvReader.isNull()) { + tlvReader.getByteArray(ContextSpecificTag(TAG_ICAC)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_ICAC)) + null + } + val fabricIndex = tlvReader.getUByte(ContextSpecificTag(TAG_FABRIC_INDEX)) + + tlvReader.exitContainer() + + return OperationalCredentialsClusterNOCStruct(noc, icac, fabricIndex) + } + } +} diff --git a/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/OperationalStateClusterErrorStateStruct.kt b/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/OperationalStateClusterErrorStateStruct.kt new file mode 100644 index 00000000000000..f49646d015d186 --- /dev/null +++ b/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/OperationalStateClusterErrorStateStruct.kt @@ -0,0 +1,85 @@ +/* + * + * Copyright (c) 2023 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package matter.devicecontroller.cluster.structs + +import java.util.Optional +import matter.devicecontroller.cluster.* +import matter.tlv.ContextSpecificTag +import matter.tlv.Tag +import matter.tlv.TlvReader +import matter.tlv.TlvWriter + +class OperationalStateClusterErrorStateStruct( + val errorStateID: UInt, + val errorStateLabel: Optional, + val errorStateDetails: Optional +) { + override fun toString(): String = buildString { + append("OperationalStateClusterErrorStateStruct {\n") + append("\terrorStateID : $errorStateID\n") + append("\terrorStateLabel : $errorStateLabel\n") + append("\terrorStateDetails : $errorStateDetails\n") + append("}\n") + } + + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tlvTag) + put(ContextSpecificTag(TAG_ERROR_STATE_I_D), errorStateID) + if (errorStateLabel.isPresent) { + val opterrorStateLabel = errorStateLabel.get() + put(ContextSpecificTag(TAG_ERROR_STATE_LABEL), opterrorStateLabel) + } + if (errorStateDetails.isPresent) { + val opterrorStateDetails = errorStateDetails.get() + put(ContextSpecificTag(TAG_ERROR_STATE_DETAILS), opterrorStateDetails) + } + endStructure() + } + } + + companion object { + private const val TAG_ERROR_STATE_I_D = 0 + private const val TAG_ERROR_STATE_LABEL = 1 + private const val TAG_ERROR_STATE_DETAILS = 2 + + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): OperationalStateClusterErrorStateStruct { + tlvReader.enterStructure(tlvTag) + val errorStateID = tlvReader.getUInt(ContextSpecificTag(TAG_ERROR_STATE_I_D)) + val errorStateLabel = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_ERROR_STATE_LABEL))) { + Optional.of(tlvReader.getString(ContextSpecificTag(TAG_ERROR_STATE_LABEL))) + } else { + Optional.empty() + } + val errorStateDetails = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_ERROR_STATE_DETAILS))) { + Optional.of(tlvReader.getString(ContextSpecificTag(TAG_ERROR_STATE_DETAILS))) + } else { + Optional.empty() + } + + tlvReader.exitContainer() + + return OperationalStateClusterErrorStateStruct( + errorStateID, + errorStateLabel, + errorStateDetails + ) + } + } +} diff --git a/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/OperationalStateClusterOperationalStateStruct.kt b/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/OperationalStateClusterOperationalStateStruct.kt new file mode 100644 index 00000000000000..238035d38a060e --- /dev/null +++ b/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/OperationalStateClusterOperationalStateStruct.kt @@ -0,0 +1,71 @@ +/* + * + * Copyright (c) 2023 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package matter.devicecontroller.cluster.structs + +import java.util.Optional +import matter.devicecontroller.cluster.* +import matter.tlv.ContextSpecificTag +import matter.tlv.Tag +import matter.tlv.TlvReader +import matter.tlv.TlvWriter + +class OperationalStateClusterOperationalStateStruct( + val operationalStateID: UInt, + val operationalStateLabel: Optional +) { + override fun toString(): String = buildString { + append("OperationalStateClusterOperationalStateStruct {\n") + append("\toperationalStateID : $operationalStateID\n") + append("\toperationalStateLabel : $operationalStateLabel\n") + append("}\n") + } + + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tlvTag) + put(ContextSpecificTag(TAG_OPERATIONAL_STATE_I_D), operationalStateID) + if (operationalStateLabel.isPresent) { + val optoperationalStateLabel = operationalStateLabel.get() + put(ContextSpecificTag(TAG_OPERATIONAL_STATE_LABEL), optoperationalStateLabel) + } + endStructure() + } + } + + companion object { + private const val TAG_OPERATIONAL_STATE_I_D = 0 + private const val TAG_OPERATIONAL_STATE_LABEL = 1 + + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): OperationalStateClusterOperationalStateStruct { + tlvReader.enterStructure(tlvTag) + val operationalStateID = tlvReader.getUInt(ContextSpecificTag(TAG_OPERATIONAL_STATE_I_D)) + val operationalStateLabel = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_OPERATIONAL_STATE_LABEL))) { + Optional.of(tlvReader.getString(ContextSpecificTag(TAG_OPERATIONAL_STATE_LABEL))) + } else { + Optional.empty() + } + + tlvReader.exitContainer() + + return OperationalStateClusterOperationalStateStruct( + operationalStateID, + operationalStateLabel + ) + } + } +} diff --git a/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/OtaSoftwareUpdateRequestorClusterProviderLocation.kt b/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/OtaSoftwareUpdateRequestorClusterProviderLocation.kt new file mode 100644 index 00000000000000..1fe882a3da1674 --- /dev/null +++ b/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/OtaSoftwareUpdateRequestorClusterProviderLocation.kt @@ -0,0 +1,71 @@ +/* + * + * Copyright (c) 2023 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package matter.devicecontroller.cluster.structs + +import matter.devicecontroller.cluster.* +import matter.tlv.ContextSpecificTag +import matter.tlv.Tag +import matter.tlv.TlvReader +import matter.tlv.TlvWriter + +class OtaSoftwareUpdateRequestorClusterProviderLocation( + val providerNodeID: ULong, + val endpoint: UShort, + val fabricIndex: UByte +) { + override fun toString(): String = buildString { + append("OtaSoftwareUpdateRequestorClusterProviderLocation {\n") + append("\tproviderNodeID : $providerNodeID\n") + append("\tendpoint : $endpoint\n") + append("\tfabricIndex : $fabricIndex\n") + append("}\n") + } + + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tlvTag) + put(ContextSpecificTag(TAG_PROVIDER_NODE_I_D), providerNodeID) + put(ContextSpecificTag(TAG_ENDPOINT), endpoint) + put(ContextSpecificTag(TAG_FABRIC_INDEX), fabricIndex) + endStructure() + } + } + + companion object { + private const val TAG_PROVIDER_NODE_I_D = 1 + private const val TAG_ENDPOINT = 2 + private const val TAG_FABRIC_INDEX = 254 + + fun fromTlv( + tlvTag: Tag, + tlvReader: TlvReader + ): OtaSoftwareUpdateRequestorClusterProviderLocation { + tlvReader.enterStructure(tlvTag) + val providerNodeID = tlvReader.getULong(ContextSpecificTag(TAG_PROVIDER_NODE_I_D)) + val endpoint = tlvReader.getUShort(ContextSpecificTag(TAG_ENDPOINT)) + val fabricIndex = tlvReader.getUByte(ContextSpecificTag(TAG_FABRIC_INDEX)) + + tlvReader.exitContainer() + + return OtaSoftwareUpdateRequestorClusterProviderLocation( + providerNodeID, + endpoint, + fabricIndex + ) + } + } +} diff --git a/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/PowerSourceClusterBatChargeFaultChangeType.kt b/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/PowerSourceClusterBatChargeFaultChangeType.kt new file mode 100644 index 00000000000000..b052cd4bd801ed --- /dev/null +++ b/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/PowerSourceClusterBatChargeFaultChangeType.kt @@ -0,0 +1,82 @@ +/* + * + * Copyright (c) 2023 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package matter.devicecontroller.cluster.structs + +import matter.devicecontroller.cluster.* +import matter.tlv.AnonymousTag +import matter.tlv.ContextSpecificTag +import matter.tlv.Tag +import matter.tlv.TlvReader +import matter.tlv.TlvWriter + +class PowerSourceClusterBatChargeFaultChangeType( + val current: List, + val previous: List +) { + override fun toString(): String = buildString { + append("PowerSourceClusterBatChargeFaultChangeType {\n") + append("\tcurrent : $current\n") + append("\tprevious : $previous\n") + append("}\n") + } + + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tlvTag) + startArray(ContextSpecificTag(TAG_CURRENT)) + for (item in current.iterator()) { + put(AnonymousTag, item) + } + endArray() + startArray(ContextSpecificTag(TAG_PREVIOUS)) + for (item in previous.iterator()) { + put(AnonymousTag, item) + } + endArray() + endStructure() + } + } + + companion object { + private const val TAG_CURRENT = 0 + private const val TAG_PREVIOUS = 1 + + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): PowerSourceClusterBatChargeFaultChangeType { + tlvReader.enterStructure(tlvTag) + val current = + buildList { + tlvReader.enterArray(ContextSpecificTag(TAG_CURRENT)) + while (!tlvReader.isEndOfContainer()) { + add(tlvReader.getUInt(AnonymousTag)) + } + tlvReader.exitContainer() + } + val previous = + buildList { + tlvReader.enterArray(ContextSpecificTag(TAG_PREVIOUS)) + while (!tlvReader.isEndOfContainer()) { + add(tlvReader.getUInt(AnonymousTag)) + } + tlvReader.exitContainer() + } + + tlvReader.exitContainer() + + return PowerSourceClusterBatChargeFaultChangeType(current, previous) + } + } +} diff --git a/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/PowerSourceClusterBatFaultChangeType.kt b/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/PowerSourceClusterBatFaultChangeType.kt new file mode 100644 index 00000000000000..e6ed2093eea21a --- /dev/null +++ b/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/PowerSourceClusterBatFaultChangeType.kt @@ -0,0 +1,79 @@ +/* + * + * Copyright (c) 2023 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package matter.devicecontroller.cluster.structs + +import matter.devicecontroller.cluster.* +import matter.tlv.AnonymousTag +import matter.tlv.ContextSpecificTag +import matter.tlv.Tag +import matter.tlv.TlvReader +import matter.tlv.TlvWriter + +class PowerSourceClusterBatFaultChangeType(val current: List, val previous: List) { + override fun toString(): String = buildString { + append("PowerSourceClusterBatFaultChangeType {\n") + append("\tcurrent : $current\n") + append("\tprevious : $previous\n") + append("}\n") + } + + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tlvTag) + startArray(ContextSpecificTag(TAG_CURRENT)) + for (item in current.iterator()) { + put(AnonymousTag, item) + } + endArray() + startArray(ContextSpecificTag(TAG_PREVIOUS)) + for (item in previous.iterator()) { + put(AnonymousTag, item) + } + endArray() + endStructure() + } + } + + companion object { + private const val TAG_CURRENT = 0 + private const val TAG_PREVIOUS = 1 + + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): PowerSourceClusterBatFaultChangeType { + tlvReader.enterStructure(tlvTag) + val current = + buildList { + tlvReader.enterArray(ContextSpecificTag(TAG_CURRENT)) + while (!tlvReader.isEndOfContainer()) { + add(tlvReader.getUInt(AnonymousTag)) + } + tlvReader.exitContainer() + } + val previous = + buildList { + tlvReader.enterArray(ContextSpecificTag(TAG_PREVIOUS)) + while (!tlvReader.isEndOfContainer()) { + add(tlvReader.getUInt(AnonymousTag)) + } + tlvReader.exitContainer() + } + + tlvReader.exitContainer() + + return PowerSourceClusterBatFaultChangeType(current, previous) + } + } +} diff --git a/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/PowerSourceClusterWiredFaultChangeType.kt b/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/PowerSourceClusterWiredFaultChangeType.kt new file mode 100644 index 00000000000000..e2849017a263c9 --- /dev/null +++ b/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/PowerSourceClusterWiredFaultChangeType.kt @@ -0,0 +1,79 @@ +/* + * + * Copyright (c) 2023 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package matter.devicecontroller.cluster.structs + +import matter.devicecontroller.cluster.* +import matter.tlv.AnonymousTag +import matter.tlv.ContextSpecificTag +import matter.tlv.Tag +import matter.tlv.TlvReader +import matter.tlv.TlvWriter + +class PowerSourceClusterWiredFaultChangeType(val current: List, val previous: List) { + override fun toString(): String = buildString { + append("PowerSourceClusterWiredFaultChangeType {\n") + append("\tcurrent : $current\n") + append("\tprevious : $previous\n") + append("}\n") + } + + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tlvTag) + startArray(ContextSpecificTag(TAG_CURRENT)) + for (item in current.iterator()) { + put(AnonymousTag, item) + } + endArray() + startArray(ContextSpecificTag(TAG_PREVIOUS)) + for (item in previous.iterator()) { + put(AnonymousTag, item) + } + endArray() + endStructure() + } + } + + companion object { + private const val TAG_CURRENT = 0 + private const val TAG_PREVIOUS = 1 + + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): PowerSourceClusterWiredFaultChangeType { + tlvReader.enterStructure(tlvTag) + val current = + buildList { + tlvReader.enterArray(ContextSpecificTag(TAG_CURRENT)) + while (!tlvReader.isEndOfContainer()) { + add(tlvReader.getUInt(AnonymousTag)) + } + tlvReader.exitContainer() + } + val previous = + buildList { + tlvReader.enterArray(ContextSpecificTag(TAG_PREVIOUS)) + while (!tlvReader.isEndOfContainer()) { + add(tlvReader.getUInt(AnonymousTag)) + } + tlvReader.exitContainer() + } + + tlvReader.exitContainer() + + return PowerSourceClusterWiredFaultChangeType(current, previous) + } + } +} diff --git a/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/RefrigeratorAndTemperatureControlledCabinetModeClusterModeOptionStruct.kt b/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/RefrigeratorAndTemperatureControlledCabinetModeClusterModeOptionStruct.kt new file mode 100644 index 00000000000000..41c4276b72942a --- /dev/null +++ b/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/RefrigeratorAndTemperatureControlledCabinetModeClusterModeOptionStruct.kt @@ -0,0 +1,88 @@ +/* + * + * Copyright (c) 2023 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package matter.devicecontroller.cluster.structs + +import matter.devicecontroller.cluster.* +import matter.tlv.AnonymousTag +import matter.tlv.ContextSpecificTag +import matter.tlv.Tag +import matter.tlv.TlvReader +import matter.tlv.TlvWriter + +class RefrigeratorAndTemperatureControlledCabinetModeClusterModeOptionStruct( + val label: String, + val mode: UByte, + val modeTags: List +) { + override fun toString(): String = buildString { + append("RefrigeratorAndTemperatureControlledCabinetModeClusterModeOptionStruct {\n") + append("\tlabel : $label\n") + append("\tmode : $mode\n") + append("\tmodeTags : $modeTags\n") + append("}\n") + } + + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tlvTag) + put(ContextSpecificTag(TAG_LABEL), label) + put(ContextSpecificTag(TAG_MODE), mode) + startArray(ContextSpecificTag(TAG_MODE_TAGS)) + for (item in modeTags.iterator()) { + item.toTlv(AnonymousTag, this) + } + endArray() + endStructure() + } + } + + companion object { + private const val TAG_LABEL = 0 + private const val TAG_MODE = 1 + private const val TAG_MODE_TAGS = 2 + + fun fromTlv( + tlvTag: Tag, + tlvReader: TlvReader + ): RefrigeratorAndTemperatureControlledCabinetModeClusterModeOptionStruct { + tlvReader.enterStructure(tlvTag) + val label = tlvReader.getString(ContextSpecificTag(TAG_LABEL)) + val mode = tlvReader.getUByte(ContextSpecificTag(TAG_MODE)) + val modeTags = + buildList { + tlvReader.enterArray(ContextSpecificTag(TAG_MODE_TAGS)) + while (!tlvReader.isEndOfContainer()) { + add( + RefrigeratorAndTemperatureControlledCabinetModeClusterModeTagStruct.fromTlv( + AnonymousTag, + tlvReader + ) + ) + } + tlvReader.exitContainer() + } + + tlvReader.exitContainer() + + return RefrigeratorAndTemperatureControlledCabinetModeClusterModeOptionStruct( + label, + mode, + modeTags + ) + } + } +} diff --git a/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/RefrigeratorAndTemperatureControlledCabinetModeClusterModeTagStruct.kt b/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/RefrigeratorAndTemperatureControlledCabinetModeClusterModeTagStruct.kt new file mode 100644 index 00000000000000..66ac75104984a2 --- /dev/null +++ b/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/RefrigeratorAndTemperatureControlledCabinetModeClusterModeTagStruct.kt @@ -0,0 +1,71 @@ +/* + * + * Copyright (c) 2023 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package matter.devicecontroller.cluster.structs + +import java.util.Optional +import matter.devicecontroller.cluster.* +import matter.tlv.ContextSpecificTag +import matter.tlv.Tag +import matter.tlv.TlvReader +import matter.tlv.TlvWriter + +class RefrigeratorAndTemperatureControlledCabinetModeClusterModeTagStruct( + val mfgCode: Optional, + val value: UInt +) { + override fun toString(): String = buildString { + append("RefrigeratorAndTemperatureControlledCabinetModeClusterModeTagStruct {\n") + append("\tmfgCode : $mfgCode\n") + append("\tvalue : $value\n") + append("}\n") + } + + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tlvTag) + if (mfgCode.isPresent) { + val optmfgCode = mfgCode.get() + put(ContextSpecificTag(TAG_MFG_CODE), optmfgCode) + } + put(ContextSpecificTag(TAG_VALUE), value) + endStructure() + } + } + + companion object { + private const val TAG_MFG_CODE = 0 + private const val TAG_VALUE = 1 + + fun fromTlv( + tlvTag: Tag, + tlvReader: TlvReader + ): RefrigeratorAndTemperatureControlledCabinetModeClusterModeTagStruct { + tlvReader.enterStructure(tlvTag) + val mfgCode = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_MFG_CODE))) { + Optional.of(tlvReader.getUShort(ContextSpecificTag(TAG_MFG_CODE))) + } else { + Optional.empty() + } + val value = tlvReader.getUInt(ContextSpecificTag(TAG_VALUE)) + + tlvReader.exitContainer() + + return RefrigeratorAndTemperatureControlledCabinetModeClusterModeTagStruct(mfgCode, value) + } + } +} diff --git a/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/RvcCleanModeClusterModeOptionStruct.kt b/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/RvcCleanModeClusterModeOptionStruct.kt new file mode 100644 index 00000000000000..b718ee935b7990 --- /dev/null +++ b/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/RvcCleanModeClusterModeOptionStruct.kt @@ -0,0 +1,76 @@ +/* + * + * Copyright (c) 2023 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package matter.devicecontroller.cluster.structs + +import matter.devicecontroller.cluster.* +import matter.tlv.AnonymousTag +import matter.tlv.ContextSpecificTag +import matter.tlv.Tag +import matter.tlv.TlvReader +import matter.tlv.TlvWriter + +class RvcCleanModeClusterModeOptionStruct( + val label: String, + val mode: UByte, + val modeTags: List +) { + override fun toString(): String = buildString { + append("RvcCleanModeClusterModeOptionStruct {\n") + append("\tlabel : $label\n") + append("\tmode : $mode\n") + append("\tmodeTags : $modeTags\n") + append("}\n") + } + + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tlvTag) + put(ContextSpecificTag(TAG_LABEL), label) + put(ContextSpecificTag(TAG_MODE), mode) + startArray(ContextSpecificTag(TAG_MODE_TAGS)) + for (item in modeTags.iterator()) { + item.toTlv(AnonymousTag, this) + } + endArray() + endStructure() + } + } + + companion object { + private const val TAG_LABEL = 0 + private const val TAG_MODE = 1 + private const val TAG_MODE_TAGS = 2 + + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): RvcCleanModeClusterModeOptionStruct { + tlvReader.enterStructure(tlvTag) + val label = tlvReader.getString(ContextSpecificTag(TAG_LABEL)) + val mode = tlvReader.getUByte(ContextSpecificTag(TAG_MODE)) + val modeTags = + buildList { + tlvReader.enterArray(ContextSpecificTag(TAG_MODE_TAGS)) + while (!tlvReader.isEndOfContainer()) { + add(RvcCleanModeClusterModeTagStruct.fromTlv(AnonymousTag, tlvReader)) + } + tlvReader.exitContainer() + } + + tlvReader.exitContainer() + + return RvcCleanModeClusterModeOptionStruct(label, mode, modeTags) + } + } +} diff --git a/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/RvcCleanModeClusterModeTagStruct.kt b/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/RvcCleanModeClusterModeTagStruct.kt new file mode 100644 index 00000000000000..b6670bdcd7b955 --- /dev/null +++ b/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/RvcCleanModeClusterModeTagStruct.kt @@ -0,0 +1,65 @@ +/* + * + * Copyright (c) 2023 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package matter.devicecontroller.cluster.structs + +import java.util.Optional +import matter.devicecontroller.cluster.* +import matter.tlv.ContextSpecificTag +import matter.tlv.Tag +import matter.tlv.TlvReader +import matter.tlv.TlvWriter + +class RvcCleanModeClusterModeTagStruct(val mfgCode: Optional, val value: UInt) { + override fun toString(): String = buildString { + append("RvcCleanModeClusterModeTagStruct {\n") + append("\tmfgCode : $mfgCode\n") + append("\tvalue : $value\n") + append("}\n") + } + + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tlvTag) + if (mfgCode.isPresent) { + val optmfgCode = mfgCode.get() + put(ContextSpecificTag(TAG_MFG_CODE), optmfgCode) + } + put(ContextSpecificTag(TAG_VALUE), value) + endStructure() + } + } + + companion object { + private const val TAG_MFG_CODE = 0 + private const val TAG_VALUE = 1 + + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): RvcCleanModeClusterModeTagStruct { + tlvReader.enterStructure(tlvTag) + val mfgCode = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_MFG_CODE))) { + Optional.of(tlvReader.getUShort(ContextSpecificTag(TAG_MFG_CODE))) + } else { + Optional.empty() + } + val value = tlvReader.getUInt(ContextSpecificTag(TAG_VALUE)) + + tlvReader.exitContainer() + + return RvcCleanModeClusterModeTagStruct(mfgCode, value) + } + } +} diff --git a/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/RvcOperationalStateClusterErrorStateStruct.kt b/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/RvcOperationalStateClusterErrorStateStruct.kt new file mode 100644 index 00000000000000..4907820103b662 --- /dev/null +++ b/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/RvcOperationalStateClusterErrorStateStruct.kt @@ -0,0 +1,85 @@ +/* + * + * Copyright (c) 2023 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package matter.devicecontroller.cluster.structs + +import java.util.Optional +import matter.devicecontroller.cluster.* +import matter.tlv.ContextSpecificTag +import matter.tlv.Tag +import matter.tlv.TlvReader +import matter.tlv.TlvWriter + +class RvcOperationalStateClusterErrorStateStruct( + val errorStateID: UInt, + val errorStateLabel: Optional, + val errorStateDetails: Optional +) { + override fun toString(): String = buildString { + append("RvcOperationalStateClusterErrorStateStruct {\n") + append("\terrorStateID : $errorStateID\n") + append("\terrorStateLabel : $errorStateLabel\n") + append("\terrorStateDetails : $errorStateDetails\n") + append("}\n") + } + + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tlvTag) + put(ContextSpecificTag(TAG_ERROR_STATE_I_D), errorStateID) + if (errorStateLabel.isPresent) { + val opterrorStateLabel = errorStateLabel.get() + put(ContextSpecificTag(TAG_ERROR_STATE_LABEL), opterrorStateLabel) + } + if (errorStateDetails.isPresent) { + val opterrorStateDetails = errorStateDetails.get() + put(ContextSpecificTag(TAG_ERROR_STATE_DETAILS), opterrorStateDetails) + } + endStructure() + } + } + + companion object { + private const val TAG_ERROR_STATE_I_D = 0 + private const val TAG_ERROR_STATE_LABEL = 1 + private const val TAG_ERROR_STATE_DETAILS = 2 + + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): RvcOperationalStateClusterErrorStateStruct { + tlvReader.enterStructure(tlvTag) + val errorStateID = tlvReader.getUInt(ContextSpecificTag(TAG_ERROR_STATE_I_D)) + val errorStateLabel = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_ERROR_STATE_LABEL))) { + Optional.of(tlvReader.getString(ContextSpecificTag(TAG_ERROR_STATE_LABEL))) + } else { + Optional.empty() + } + val errorStateDetails = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_ERROR_STATE_DETAILS))) { + Optional.of(tlvReader.getString(ContextSpecificTag(TAG_ERROR_STATE_DETAILS))) + } else { + Optional.empty() + } + + tlvReader.exitContainer() + + return RvcOperationalStateClusterErrorStateStruct( + errorStateID, + errorStateLabel, + errorStateDetails + ) + } + } +} diff --git a/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/RvcOperationalStateClusterOperationalStateStruct.kt b/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/RvcOperationalStateClusterOperationalStateStruct.kt new file mode 100644 index 00000000000000..1e5548ff7677a9 --- /dev/null +++ b/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/RvcOperationalStateClusterOperationalStateStruct.kt @@ -0,0 +1,74 @@ +/* + * + * Copyright (c) 2023 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package matter.devicecontroller.cluster.structs + +import java.util.Optional +import matter.devicecontroller.cluster.* +import matter.tlv.ContextSpecificTag +import matter.tlv.Tag +import matter.tlv.TlvReader +import matter.tlv.TlvWriter + +class RvcOperationalStateClusterOperationalStateStruct( + val operationalStateID: UInt, + val operationalStateLabel: Optional +) { + override fun toString(): String = buildString { + append("RvcOperationalStateClusterOperationalStateStruct {\n") + append("\toperationalStateID : $operationalStateID\n") + append("\toperationalStateLabel : $operationalStateLabel\n") + append("}\n") + } + + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tlvTag) + put(ContextSpecificTag(TAG_OPERATIONAL_STATE_I_D), operationalStateID) + if (operationalStateLabel.isPresent) { + val optoperationalStateLabel = operationalStateLabel.get() + put(ContextSpecificTag(TAG_OPERATIONAL_STATE_LABEL), optoperationalStateLabel) + } + endStructure() + } + } + + companion object { + private const val TAG_OPERATIONAL_STATE_I_D = 0 + private const val TAG_OPERATIONAL_STATE_LABEL = 1 + + fun fromTlv( + tlvTag: Tag, + tlvReader: TlvReader + ): RvcOperationalStateClusterOperationalStateStruct { + tlvReader.enterStructure(tlvTag) + val operationalStateID = tlvReader.getUInt(ContextSpecificTag(TAG_OPERATIONAL_STATE_I_D)) + val operationalStateLabel = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_OPERATIONAL_STATE_LABEL))) { + Optional.of(tlvReader.getString(ContextSpecificTag(TAG_OPERATIONAL_STATE_LABEL))) + } else { + Optional.empty() + } + + tlvReader.exitContainer() + + return RvcOperationalStateClusterOperationalStateStruct( + operationalStateID, + operationalStateLabel + ) + } + } +} diff --git a/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/RvcRunModeClusterModeOptionStruct.kt b/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/RvcRunModeClusterModeOptionStruct.kt new file mode 100644 index 00000000000000..937a0303a98b04 --- /dev/null +++ b/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/RvcRunModeClusterModeOptionStruct.kt @@ -0,0 +1,76 @@ +/* + * + * Copyright (c) 2023 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package matter.devicecontroller.cluster.structs + +import matter.devicecontroller.cluster.* +import matter.tlv.AnonymousTag +import matter.tlv.ContextSpecificTag +import matter.tlv.Tag +import matter.tlv.TlvReader +import matter.tlv.TlvWriter + +class RvcRunModeClusterModeOptionStruct( + val label: String, + val mode: UByte, + val modeTags: List +) { + override fun toString(): String = buildString { + append("RvcRunModeClusterModeOptionStruct {\n") + append("\tlabel : $label\n") + append("\tmode : $mode\n") + append("\tmodeTags : $modeTags\n") + append("}\n") + } + + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tlvTag) + put(ContextSpecificTag(TAG_LABEL), label) + put(ContextSpecificTag(TAG_MODE), mode) + startArray(ContextSpecificTag(TAG_MODE_TAGS)) + for (item in modeTags.iterator()) { + item.toTlv(AnonymousTag, this) + } + endArray() + endStructure() + } + } + + companion object { + private const val TAG_LABEL = 0 + private const val TAG_MODE = 1 + private const val TAG_MODE_TAGS = 2 + + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): RvcRunModeClusterModeOptionStruct { + tlvReader.enterStructure(tlvTag) + val label = tlvReader.getString(ContextSpecificTag(TAG_LABEL)) + val mode = tlvReader.getUByte(ContextSpecificTag(TAG_MODE)) + val modeTags = + buildList { + tlvReader.enterArray(ContextSpecificTag(TAG_MODE_TAGS)) + while (!tlvReader.isEndOfContainer()) { + add(RvcRunModeClusterModeTagStruct.fromTlv(AnonymousTag, tlvReader)) + } + tlvReader.exitContainer() + } + + tlvReader.exitContainer() + + return RvcRunModeClusterModeOptionStruct(label, mode, modeTags) + } + } +} diff --git a/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/RvcRunModeClusterModeTagStruct.kt b/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/RvcRunModeClusterModeTagStruct.kt new file mode 100644 index 00000000000000..055336e7a1e250 --- /dev/null +++ b/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/RvcRunModeClusterModeTagStruct.kt @@ -0,0 +1,65 @@ +/* + * + * Copyright (c) 2023 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package matter.devicecontroller.cluster.structs + +import java.util.Optional +import matter.devicecontroller.cluster.* +import matter.tlv.ContextSpecificTag +import matter.tlv.Tag +import matter.tlv.TlvReader +import matter.tlv.TlvWriter + +class RvcRunModeClusterModeTagStruct(val mfgCode: Optional, val value: UInt) { + override fun toString(): String = buildString { + append("RvcRunModeClusterModeTagStruct {\n") + append("\tmfgCode : $mfgCode\n") + append("\tvalue : $value\n") + append("}\n") + } + + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tlvTag) + if (mfgCode.isPresent) { + val optmfgCode = mfgCode.get() + put(ContextSpecificTag(TAG_MFG_CODE), optmfgCode) + } + put(ContextSpecificTag(TAG_VALUE), value) + endStructure() + } + } + + companion object { + private const val TAG_MFG_CODE = 0 + private const val TAG_VALUE = 1 + + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): RvcRunModeClusterModeTagStruct { + tlvReader.enterStructure(tlvTag) + val mfgCode = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_MFG_CODE))) { + Optional.of(tlvReader.getUShort(ContextSpecificTag(TAG_MFG_CODE))) + } else { + Optional.empty() + } + val value = tlvReader.getUInt(ContextSpecificTag(TAG_VALUE)) + + tlvReader.exitContainer() + + return RvcRunModeClusterModeTagStruct(mfgCode, value) + } + } +} diff --git a/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/ScenesClusterAttributeValuePair.kt b/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/ScenesClusterAttributeValuePair.kt new file mode 100644 index 00000000000000..df599d883e82ca --- /dev/null +++ b/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/ScenesClusterAttributeValuePair.kt @@ -0,0 +1,56 @@ +/* + * + * Copyright (c) 2023 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package matter.devicecontroller.cluster.structs + +import matter.devicecontroller.cluster.* +import matter.tlv.ContextSpecificTag +import matter.tlv.Tag +import matter.tlv.TlvReader +import matter.tlv.TlvWriter + +class ScenesClusterAttributeValuePair(val attributeID: UInt, val attributeValue: UInt) { + override fun toString(): String = buildString { + append("ScenesClusterAttributeValuePair {\n") + append("\tattributeID : $attributeID\n") + append("\tattributeValue : $attributeValue\n") + append("}\n") + } + + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tlvTag) + put(ContextSpecificTag(TAG_ATTRIBUTE_I_D), attributeID) + put(ContextSpecificTag(TAG_ATTRIBUTE_VALUE), attributeValue) + endStructure() + } + } + + companion object { + private const val TAG_ATTRIBUTE_I_D = 0 + private const val TAG_ATTRIBUTE_VALUE = 1 + + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): ScenesClusterAttributeValuePair { + tlvReader.enterStructure(tlvTag) + val attributeID = tlvReader.getUInt(ContextSpecificTag(TAG_ATTRIBUTE_I_D)) + val attributeValue = tlvReader.getUInt(ContextSpecificTag(TAG_ATTRIBUTE_VALUE)) + + tlvReader.exitContainer() + + return ScenesClusterAttributeValuePair(attributeID, attributeValue) + } + } +} diff --git a/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/ScenesClusterExtensionFieldSet.kt b/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/ScenesClusterExtensionFieldSet.kt new file mode 100644 index 00000000000000..88d60856d7460b --- /dev/null +++ b/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/ScenesClusterExtensionFieldSet.kt @@ -0,0 +1,71 @@ +/* + * + * Copyright (c) 2023 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package matter.devicecontroller.cluster.structs + +import matter.devicecontroller.cluster.* +import matter.tlv.AnonymousTag +import matter.tlv.ContextSpecificTag +import matter.tlv.Tag +import matter.tlv.TlvReader +import matter.tlv.TlvWriter + +class ScenesClusterExtensionFieldSet( + val clusterID: UInt, + val attributeValueList: List +) { + override fun toString(): String = buildString { + append("ScenesClusterExtensionFieldSet {\n") + append("\tclusterID : $clusterID\n") + append("\tattributeValueList : $attributeValueList\n") + append("}\n") + } + + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tlvTag) + put(ContextSpecificTag(TAG_CLUSTER_I_D), clusterID) + startArray(ContextSpecificTag(TAG_ATTRIBUTE_VALUE_LIST)) + for (item in attributeValueList.iterator()) { + item.toTlv(AnonymousTag, this) + } + endArray() + endStructure() + } + } + + companion object { + private const val TAG_CLUSTER_I_D = 0 + private const val TAG_ATTRIBUTE_VALUE_LIST = 1 + + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): ScenesClusterExtensionFieldSet { + tlvReader.enterStructure(tlvTag) + val clusterID = tlvReader.getUInt(ContextSpecificTag(TAG_CLUSTER_I_D)) + val attributeValueList = + buildList { + tlvReader.enterArray(ContextSpecificTag(TAG_ATTRIBUTE_VALUE_LIST)) + while (!tlvReader.isEndOfContainer()) { + add(ScenesClusterAttributeValuePair.fromTlv(AnonymousTag, tlvReader)) + } + tlvReader.exitContainer() + } + + tlvReader.exitContainer() + + return ScenesClusterExtensionFieldSet(clusterID, attributeValueList) + } + } +} diff --git a/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/SoftwareDiagnosticsClusterThreadMetricsStruct.kt b/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/SoftwareDiagnosticsClusterThreadMetricsStruct.kt new file mode 100644 index 00000000000000..c5f2429f4af83b --- /dev/null +++ b/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/SoftwareDiagnosticsClusterThreadMetricsStruct.kt @@ -0,0 +1,113 @@ +/* + * + * Copyright (c) 2023 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package matter.devicecontroller.cluster.structs + +import java.util.Optional +import matter.devicecontroller.cluster.* +import matter.tlv.ContextSpecificTag +import matter.tlv.Tag +import matter.tlv.TlvReader +import matter.tlv.TlvWriter + +class SoftwareDiagnosticsClusterThreadMetricsStruct( + val id: ULong, + val name: Optional, + val stackFreeCurrent: Optional, + val stackFreeMinimum: Optional, + val stackSize: Optional +) { + override fun toString(): String = buildString { + append("SoftwareDiagnosticsClusterThreadMetricsStruct {\n") + append("\tid : $id\n") + append("\tname : $name\n") + append("\tstackFreeCurrent : $stackFreeCurrent\n") + append("\tstackFreeMinimum : $stackFreeMinimum\n") + append("\tstackSize : $stackSize\n") + append("}\n") + } + + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tlvTag) + put(ContextSpecificTag(TAG_ID), id) + if (name.isPresent) { + val optname = name.get() + put(ContextSpecificTag(TAG_NAME), optname) + } + if (stackFreeCurrent.isPresent) { + val optstackFreeCurrent = stackFreeCurrent.get() + put(ContextSpecificTag(TAG_STACK_FREE_CURRENT), optstackFreeCurrent) + } + if (stackFreeMinimum.isPresent) { + val optstackFreeMinimum = stackFreeMinimum.get() + put(ContextSpecificTag(TAG_STACK_FREE_MINIMUM), optstackFreeMinimum) + } + if (stackSize.isPresent) { + val optstackSize = stackSize.get() + put(ContextSpecificTag(TAG_STACK_SIZE), optstackSize) + } + endStructure() + } + } + + companion object { + private const val TAG_ID = 0 + private const val TAG_NAME = 1 + private const val TAG_STACK_FREE_CURRENT = 2 + private const val TAG_STACK_FREE_MINIMUM = 3 + private const val TAG_STACK_SIZE = 4 + + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): SoftwareDiagnosticsClusterThreadMetricsStruct { + tlvReader.enterStructure(tlvTag) + val id = tlvReader.getULong(ContextSpecificTag(TAG_ID)) + val name = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_NAME))) { + Optional.of(tlvReader.getString(ContextSpecificTag(TAG_NAME))) + } else { + Optional.empty() + } + val stackFreeCurrent = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_STACK_FREE_CURRENT))) { + Optional.of(tlvReader.getUInt(ContextSpecificTag(TAG_STACK_FREE_CURRENT))) + } else { + Optional.empty() + } + val stackFreeMinimum = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_STACK_FREE_MINIMUM))) { + Optional.of(tlvReader.getUInt(ContextSpecificTag(TAG_STACK_FREE_MINIMUM))) + } else { + Optional.empty() + } + val stackSize = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_STACK_SIZE))) { + Optional.of(tlvReader.getUInt(ContextSpecificTag(TAG_STACK_SIZE))) + } else { + Optional.empty() + } + + tlvReader.exitContainer() + + return SoftwareDiagnosticsClusterThreadMetricsStruct( + id, + name, + stackFreeCurrent, + stackFreeMinimum, + stackSize + ) + } + } +} diff --git a/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/TargetNavigatorClusterTargetInfoStruct.kt b/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/TargetNavigatorClusterTargetInfoStruct.kt new file mode 100644 index 00000000000000..14c27a55df4da9 --- /dev/null +++ b/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/TargetNavigatorClusterTargetInfoStruct.kt @@ -0,0 +1,56 @@ +/* + * + * Copyright (c) 2023 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package matter.devicecontroller.cluster.structs + +import matter.devicecontroller.cluster.* +import matter.tlv.ContextSpecificTag +import matter.tlv.Tag +import matter.tlv.TlvReader +import matter.tlv.TlvWriter + +class TargetNavigatorClusterTargetInfoStruct(val identifier: UByte, val name: String) { + override fun toString(): String = buildString { + append("TargetNavigatorClusterTargetInfoStruct {\n") + append("\tidentifier : $identifier\n") + append("\tname : $name\n") + append("}\n") + } + + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tlvTag) + put(ContextSpecificTag(TAG_IDENTIFIER), identifier) + put(ContextSpecificTag(TAG_NAME), name) + endStructure() + } + } + + companion object { + private const val TAG_IDENTIFIER = 0 + private const val TAG_NAME = 1 + + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): TargetNavigatorClusterTargetInfoStruct { + tlvReader.enterStructure(tlvTag) + val identifier = tlvReader.getUByte(ContextSpecificTag(TAG_IDENTIFIER)) + val name = tlvReader.getString(ContextSpecificTag(TAG_NAME)) + + tlvReader.exitContainer() + + return TargetNavigatorClusterTargetInfoStruct(identifier, name) + } + } +} diff --git a/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/ThermostatClusterThermostatScheduleTransition.kt b/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/ThermostatClusterThermostatScheduleTransition.kt new file mode 100644 index 00000000000000..ecd2bf08eb8fcb --- /dev/null +++ b/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/ThermostatClusterThermostatScheduleTransition.kt @@ -0,0 +1,88 @@ +/* + * + * Copyright (c) 2023 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package matter.devicecontroller.cluster.structs + +import matter.devicecontroller.cluster.* +import matter.tlv.ContextSpecificTag +import matter.tlv.Tag +import matter.tlv.TlvReader +import matter.tlv.TlvWriter + +class ThermostatClusterThermostatScheduleTransition( + val transitionTime: UShort, + val heatSetpoint: Short?, + val coolSetpoint: Short? +) { + override fun toString(): String = buildString { + append("ThermostatClusterThermostatScheduleTransition {\n") + append("\ttransitionTime : $transitionTime\n") + append("\theatSetpoint : $heatSetpoint\n") + append("\tcoolSetpoint : $coolSetpoint\n") + append("}\n") + } + + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tlvTag) + put(ContextSpecificTag(TAG_TRANSITION_TIME), transitionTime) + if (heatSetpoint != null) { + put(ContextSpecificTag(TAG_HEAT_SETPOINT), heatSetpoint) + } else { + putNull(ContextSpecificTag(TAG_HEAT_SETPOINT)) + } + if (coolSetpoint != null) { + put(ContextSpecificTag(TAG_COOL_SETPOINT), coolSetpoint) + } else { + putNull(ContextSpecificTag(TAG_COOL_SETPOINT)) + } + endStructure() + } + } + + companion object { + private const val TAG_TRANSITION_TIME = 0 + private const val TAG_HEAT_SETPOINT = 1 + private const val TAG_COOL_SETPOINT = 2 + + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): ThermostatClusterThermostatScheduleTransition { + tlvReader.enterStructure(tlvTag) + val transitionTime = tlvReader.getUShort(ContextSpecificTag(TAG_TRANSITION_TIME)) + val heatSetpoint = + if (!tlvReader.isNull()) { + tlvReader.getShort(ContextSpecificTag(TAG_HEAT_SETPOINT)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_HEAT_SETPOINT)) + null + } + val coolSetpoint = + if (!tlvReader.isNull()) { + tlvReader.getShort(ContextSpecificTag(TAG_COOL_SETPOINT)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_COOL_SETPOINT)) + null + } + + tlvReader.exitContainer() + + return ThermostatClusterThermostatScheduleTransition( + transitionTime, + heatSetpoint, + coolSetpoint + ) + } + } +} diff --git a/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/ThreadNetworkDiagnosticsClusterNeighborTableStruct.kt b/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/ThreadNetworkDiagnosticsClusterNeighborTableStruct.kt new file mode 100644 index 00000000000000..001698e66b5dce --- /dev/null +++ b/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/ThreadNetworkDiagnosticsClusterNeighborTableStruct.kt @@ -0,0 +1,157 @@ +/* + * + * Copyright (c) 2023 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package matter.devicecontroller.cluster.structs + +import matter.devicecontroller.cluster.* +import matter.tlv.ContextSpecificTag +import matter.tlv.Tag +import matter.tlv.TlvReader +import matter.tlv.TlvWriter + +class ThreadNetworkDiagnosticsClusterNeighborTableStruct( + val extAddress: ULong, + val age: UInt, + val rloc16: UShort, + val linkFrameCounter: UInt, + val mleFrameCounter: UInt, + val lqi: UByte, + val averageRssi: Byte?, + val lastRssi: Byte?, + val frameErrorRate: UByte, + val messageErrorRate: UByte, + val rxOnWhenIdle: Boolean, + val fullThreadDevice: Boolean, + val fullNetworkData: Boolean, + val isChild: Boolean +) { + override fun toString(): String = buildString { + append("ThreadNetworkDiagnosticsClusterNeighborTableStruct {\n") + append("\textAddress : $extAddress\n") + append("\tage : $age\n") + append("\trloc16 : $rloc16\n") + append("\tlinkFrameCounter : $linkFrameCounter\n") + append("\tmleFrameCounter : $mleFrameCounter\n") + append("\tlqi : $lqi\n") + append("\taverageRssi : $averageRssi\n") + append("\tlastRssi : $lastRssi\n") + append("\tframeErrorRate : $frameErrorRate\n") + append("\tmessageErrorRate : $messageErrorRate\n") + append("\trxOnWhenIdle : $rxOnWhenIdle\n") + append("\tfullThreadDevice : $fullThreadDevice\n") + append("\tfullNetworkData : $fullNetworkData\n") + append("\tisChild : $isChild\n") + append("}\n") + } + + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tlvTag) + put(ContextSpecificTag(TAG_EXT_ADDRESS), extAddress) + put(ContextSpecificTag(TAG_AGE), age) + put(ContextSpecificTag(TAG_RLOC16), rloc16) + put(ContextSpecificTag(TAG_LINK_FRAME_COUNTER), linkFrameCounter) + put(ContextSpecificTag(TAG_MLE_FRAME_COUNTER), mleFrameCounter) + put(ContextSpecificTag(TAG_LQI), lqi) + if (averageRssi != null) { + put(ContextSpecificTag(TAG_AVERAGE_RSSI), averageRssi) + } else { + putNull(ContextSpecificTag(TAG_AVERAGE_RSSI)) + } + if (lastRssi != null) { + put(ContextSpecificTag(TAG_LAST_RSSI), lastRssi) + } else { + putNull(ContextSpecificTag(TAG_LAST_RSSI)) + } + put(ContextSpecificTag(TAG_FRAME_ERROR_RATE), frameErrorRate) + put(ContextSpecificTag(TAG_MESSAGE_ERROR_RATE), messageErrorRate) + put(ContextSpecificTag(TAG_RX_ON_WHEN_IDLE), rxOnWhenIdle) + put(ContextSpecificTag(TAG_FULL_THREAD_DEVICE), fullThreadDevice) + put(ContextSpecificTag(TAG_FULL_NETWORK_DATA), fullNetworkData) + put(ContextSpecificTag(TAG_IS_CHILD), isChild) + endStructure() + } + } + + companion object { + private const val TAG_EXT_ADDRESS = 0 + private const val TAG_AGE = 1 + private const val TAG_RLOC16 = 2 + private const val TAG_LINK_FRAME_COUNTER = 3 + private const val TAG_MLE_FRAME_COUNTER = 4 + private const val TAG_LQI = 5 + private const val TAG_AVERAGE_RSSI = 6 + private const val TAG_LAST_RSSI = 7 + private const val TAG_FRAME_ERROR_RATE = 8 + private const val TAG_MESSAGE_ERROR_RATE = 9 + private const val TAG_RX_ON_WHEN_IDLE = 10 + private const val TAG_FULL_THREAD_DEVICE = 11 + private const val TAG_FULL_NETWORK_DATA = 12 + private const val TAG_IS_CHILD = 13 + + fun fromTlv( + tlvTag: Tag, + tlvReader: TlvReader + ): ThreadNetworkDiagnosticsClusterNeighborTableStruct { + tlvReader.enterStructure(tlvTag) + val extAddress = tlvReader.getULong(ContextSpecificTag(TAG_EXT_ADDRESS)) + val age = tlvReader.getUInt(ContextSpecificTag(TAG_AGE)) + val rloc16 = tlvReader.getUShort(ContextSpecificTag(TAG_RLOC16)) + val linkFrameCounter = tlvReader.getUInt(ContextSpecificTag(TAG_LINK_FRAME_COUNTER)) + val mleFrameCounter = tlvReader.getUInt(ContextSpecificTag(TAG_MLE_FRAME_COUNTER)) + val lqi = tlvReader.getUByte(ContextSpecificTag(TAG_LQI)) + val averageRssi = + if (!tlvReader.isNull()) { + tlvReader.getByte(ContextSpecificTag(TAG_AVERAGE_RSSI)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_AVERAGE_RSSI)) + null + } + val lastRssi = + if (!tlvReader.isNull()) { + tlvReader.getByte(ContextSpecificTag(TAG_LAST_RSSI)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_LAST_RSSI)) + null + } + val frameErrorRate = tlvReader.getUByte(ContextSpecificTag(TAG_FRAME_ERROR_RATE)) + val messageErrorRate = tlvReader.getUByte(ContextSpecificTag(TAG_MESSAGE_ERROR_RATE)) + val rxOnWhenIdle = tlvReader.getBoolean(ContextSpecificTag(TAG_RX_ON_WHEN_IDLE)) + val fullThreadDevice = tlvReader.getBoolean(ContextSpecificTag(TAG_FULL_THREAD_DEVICE)) + val fullNetworkData = tlvReader.getBoolean(ContextSpecificTag(TAG_FULL_NETWORK_DATA)) + val isChild = tlvReader.getBoolean(ContextSpecificTag(TAG_IS_CHILD)) + + tlvReader.exitContainer() + + return ThreadNetworkDiagnosticsClusterNeighborTableStruct( + extAddress, + age, + rloc16, + linkFrameCounter, + mleFrameCounter, + lqi, + averageRssi, + lastRssi, + frameErrorRate, + messageErrorRate, + rxOnWhenIdle, + fullThreadDevice, + fullNetworkData, + isChild + ) + } + } +} diff --git a/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/ThreadNetworkDiagnosticsClusterOperationalDatasetComponents.kt b/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/ThreadNetworkDiagnosticsClusterOperationalDatasetComponents.kt new file mode 100644 index 00000000000000..7aa8d606fbcc21 --- /dev/null +++ b/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/ThreadNetworkDiagnosticsClusterOperationalDatasetComponents.kt @@ -0,0 +1,130 @@ +/* + * + * Copyright (c) 2023 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package matter.devicecontroller.cluster.structs + +import matter.devicecontroller.cluster.* +import matter.tlv.ContextSpecificTag +import matter.tlv.Tag +import matter.tlv.TlvReader +import matter.tlv.TlvWriter + +class ThreadNetworkDiagnosticsClusterOperationalDatasetComponents( + val activeTimestampPresent: Boolean, + val pendingTimestampPresent: Boolean, + val masterKeyPresent: Boolean, + val networkNamePresent: Boolean, + val extendedPanIdPresent: Boolean, + val meshLocalPrefixPresent: Boolean, + val delayPresent: Boolean, + val panIdPresent: Boolean, + val channelPresent: Boolean, + val pskcPresent: Boolean, + val securityPolicyPresent: Boolean, + val channelMaskPresent: Boolean +) { + override fun toString(): String = buildString { + append("ThreadNetworkDiagnosticsClusterOperationalDatasetComponents {\n") + append("\tactiveTimestampPresent : $activeTimestampPresent\n") + append("\tpendingTimestampPresent : $pendingTimestampPresent\n") + append("\tmasterKeyPresent : $masterKeyPresent\n") + append("\tnetworkNamePresent : $networkNamePresent\n") + append("\textendedPanIdPresent : $extendedPanIdPresent\n") + append("\tmeshLocalPrefixPresent : $meshLocalPrefixPresent\n") + append("\tdelayPresent : $delayPresent\n") + append("\tpanIdPresent : $panIdPresent\n") + append("\tchannelPresent : $channelPresent\n") + append("\tpskcPresent : $pskcPresent\n") + append("\tsecurityPolicyPresent : $securityPolicyPresent\n") + append("\tchannelMaskPresent : $channelMaskPresent\n") + append("}\n") + } + + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tlvTag) + put(ContextSpecificTag(TAG_ACTIVE_TIMESTAMP_PRESENT), activeTimestampPresent) + put(ContextSpecificTag(TAG_PENDING_TIMESTAMP_PRESENT), pendingTimestampPresent) + put(ContextSpecificTag(TAG_MASTER_KEY_PRESENT), masterKeyPresent) + put(ContextSpecificTag(TAG_NETWORK_NAME_PRESENT), networkNamePresent) + put(ContextSpecificTag(TAG_EXTENDED_PAN_ID_PRESENT), extendedPanIdPresent) + put(ContextSpecificTag(TAG_MESH_LOCAL_PREFIX_PRESENT), meshLocalPrefixPresent) + put(ContextSpecificTag(TAG_DELAY_PRESENT), delayPresent) + put(ContextSpecificTag(TAG_PAN_ID_PRESENT), panIdPresent) + put(ContextSpecificTag(TAG_CHANNEL_PRESENT), channelPresent) + put(ContextSpecificTag(TAG_PSKC_PRESENT), pskcPresent) + put(ContextSpecificTag(TAG_SECURITY_POLICY_PRESENT), securityPolicyPresent) + put(ContextSpecificTag(TAG_CHANNEL_MASK_PRESENT), channelMaskPresent) + endStructure() + } + } + + companion object { + private const val TAG_ACTIVE_TIMESTAMP_PRESENT = 0 + private const val TAG_PENDING_TIMESTAMP_PRESENT = 1 + private const val TAG_MASTER_KEY_PRESENT = 2 + private const val TAG_NETWORK_NAME_PRESENT = 3 + private const val TAG_EXTENDED_PAN_ID_PRESENT = 4 + private const val TAG_MESH_LOCAL_PREFIX_PRESENT = 5 + private const val TAG_DELAY_PRESENT = 6 + private const val TAG_PAN_ID_PRESENT = 7 + private const val TAG_CHANNEL_PRESENT = 8 + private const val TAG_PSKC_PRESENT = 9 + private const val TAG_SECURITY_POLICY_PRESENT = 10 + private const val TAG_CHANNEL_MASK_PRESENT = 11 + + fun fromTlv( + tlvTag: Tag, + tlvReader: TlvReader + ): ThreadNetworkDiagnosticsClusterOperationalDatasetComponents { + tlvReader.enterStructure(tlvTag) + val activeTimestampPresent = + tlvReader.getBoolean(ContextSpecificTag(TAG_ACTIVE_TIMESTAMP_PRESENT)) + val pendingTimestampPresent = + tlvReader.getBoolean(ContextSpecificTag(TAG_PENDING_TIMESTAMP_PRESENT)) + val masterKeyPresent = tlvReader.getBoolean(ContextSpecificTag(TAG_MASTER_KEY_PRESENT)) + val networkNamePresent = tlvReader.getBoolean(ContextSpecificTag(TAG_NETWORK_NAME_PRESENT)) + val extendedPanIdPresent = + tlvReader.getBoolean(ContextSpecificTag(TAG_EXTENDED_PAN_ID_PRESENT)) + val meshLocalPrefixPresent = + tlvReader.getBoolean(ContextSpecificTag(TAG_MESH_LOCAL_PREFIX_PRESENT)) + val delayPresent = tlvReader.getBoolean(ContextSpecificTag(TAG_DELAY_PRESENT)) + val panIdPresent = tlvReader.getBoolean(ContextSpecificTag(TAG_PAN_ID_PRESENT)) + val channelPresent = tlvReader.getBoolean(ContextSpecificTag(TAG_CHANNEL_PRESENT)) + val pskcPresent = tlvReader.getBoolean(ContextSpecificTag(TAG_PSKC_PRESENT)) + val securityPolicyPresent = + tlvReader.getBoolean(ContextSpecificTag(TAG_SECURITY_POLICY_PRESENT)) + val channelMaskPresent = tlvReader.getBoolean(ContextSpecificTag(TAG_CHANNEL_MASK_PRESENT)) + + tlvReader.exitContainer() + + return ThreadNetworkDiagnosticsClusterOperationalDatasetComponents( + activeTimestampPresent, + pendingTimestampPresent, + masterKeyPresent, + networkNamePresent, + extendedPanIdPresent, + meshLocalPrefixPresent, + delayPresent, + panIdPresent, + channelPresent, + pskcPresent, + securityPolicyPresent, + channelMaskPresent + ) + } + } +} diff --git a/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/ThreadNetworkDiagnosticsClusterRouteTableStruct.kt b/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/ThreadNetworkDiagnosticsClusterRouteTableStruct.kt new file mode 100644 index 00000000000000..58a9599025b985 --- /dev/null +++ b/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/ThreadNetworkDiagnosticsClusterRouteTableStruct.kt @@ -0,0 +1,113 @@ +/* + * + * Copyright (c) 2023 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package matter.devicecontroller.cluster.structs + +import matter.devicecontroller.cluster.* +import matter.tlv.ContextSpecificTag +import matter.tlv.Tag +import matter.tlv.TlvReader +import matter.tlv.TlvWriter + +class ThreadNetworkDiagnosticsClusterRouteTableStruct( + val extAddress: ULong, + val rloc16: UShort, + val routerId: UByte, + val nextHop: UByte, + val pathCost: UByte, + val LQIIn: UByte, + val LQIOut: UByte, + val age: UByte, + val allocated: Boolean, + val linkEstablished: Boolean +) { + override fun toString(): String = buildString { + append("ThreadNetworkDiagnosticsClusterRouteTableStruct {\n") + append("\textAddress : $extAddress\n") + append("\trloc16 : $rloc16\n") + append("\trouterId : $routerId\n") + append("\tnextHop : $nextHop\n") + append("\tpathCost : $pathCost\n") + append("\tLQIIn : $LQIIn\n") + append("\tLQIOut : $LQIOut\n") + append("\tage : $age\n") + append("\tallocated : $allocated\n") + append("\tlinkEstablished : $linkEstablished\n") + append("}\n") + } + + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tlvTag) + put(ContextSpecificTag(TAG_EXT_ADDRESS), extAddress) + put(ContextSpecificTag(TAG_RLOC16), rloc16) + put(ContextSpecificTag(TAG_ROUTER_ID), routerId) + put(ContextSpecificTag(TAG_NEXT_HOP), nextHop) + put(ContextSpecificTag(TAG_PATH_COST), pathCost) + put(ContextSpecificTag(TAG_L_Q_I_IN), LQIIn) + put(ContextSpecificTag(TAG_L_Q_I_OUT), LQIOut) + put(ContextSpecificTag(TAG_AGE), age) + put(ContextSpecificTag(TAG_ALLOCATED), allocated) + put(ContextSpecificTag(TAG_LINK_ESTABLISHED), linkEstablished) + endStructure() + } + } + + companion object { + private const val TAG_EXT_ADDRESS = 0 + private const val TAG_RLOC16 = 1 + private const val TAG_ROUTER_ID = 2 + private const val TAG_NEXT_HOP = 3 + private const val TAG_PATH_COST = 4 + private const val TAG_L_Q_I_IN = 5 + private const val TAG_L_Q_I_OUT = 6 + private const val TAG_AGE = 7 + private const val TAG_ALLOCATED = 8 + private const val TAG_LINK_ESTABLISHED = 9 + + fun fromTlv( + tlvTag: Tag, + tlvReader: TlvReader + ): ThreadNetworkDiagnosticsClusterRouteTableStruct { + tlvReader.enterStructure(tlvTag) + val extAddress = tlvReader.getULong(ContextSpecificTag(TAG_EXT_ADDRESS)) + val rloc16 = tlvReader.getUShort(ContextSpecificTag(TAG_RLOC16)) + val routerId = tlvReader.getUByte(ContextSpecificTag(TAG_ROUTER_ID)) + val nextHop = tlvReader.getUByte(ContextSpecificTag(TAG_NEXT_HOP)) + val pathCost = tlvReader.getUByte(ContextSpecificTag(TAG_PATH_COST)) + val LQIIn = tlvReader.getUByte(ContextSpecificTag(TAG_L_Q_I_IN)) + val LQIOut = tlvReader.getUByte(ContextSpecificTag(TAG_L_Q_I_OUT)) + val age = tlvReader.getUByte(ContextSpecificTag(TAG_AGE)) + val allocated = tlvReader.getBoolean(ContextSpecificTag(TAG_ALLOCATED)) + val linkEstablished = tlvReader.getBoolean(ContextSpecificTag(TAG_LINK_ESTABLISHED)) + + tlvReader.exitContainer() + + return ThreadNetworkDiagnosticsClusterRouteTableStruct( + extAddress, + rloc16, + routerId, + nextHop, + pathCost, + LQIIn, + LQIOut, + age, + allocated, + linkEstablished + ) + } + } +} diff --git a/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/ThreadNetworkDiagnosticsClusterSecurityPolicy.kt b/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/ThreadNetworkDiagnosticsClusterSecurityPolicy.kt new file mode 100644 index 00000000000000..313ac3dda11319 --- /dev/null +++ b/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/ThreadNetworkDiagnosticsClusterSecurityPolicy.kt @@ -0,0 +1,56 @@ +/* + * + * Copyright (c) 2023 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package matter.devicecontroller.cluster.structs + +import matter.devicecontroller.cluster.* +import matter.tlv.ContextSpecificTag +import matter.tlv.Tag +import matter.tlv.TlvReader +import matter.tlv.TlvWriter + +class ThreadNetworkDiagnosticsClusterSecurityPolicy(val rotationTime: UShort, val flags: UShort) { + override fun toString(): String = buildString { + append("ThreadNetworkDiagnosticsClusterSecurityPolicy {\n") + append("\trotationTime : $rotationTime\n") + append("\tflags : $flags\n") + append("}\n") + } + + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tlvTag) + put(ContextSpecificTag(TAG_ROTATION_TIME), rotationTime) + put(ContextSpecificTag(TAG_FLAGS), flags) + endStructure() + } + } + + companion object { + private const val TAG_ROTATION_TIME = 0 + private const val TAG_FLAGS = 1 + + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): ThreadNetworkDiagnosticsClusterSecurityPolicy { + tlvReader.enterStructure(tlvTag) + val rotationTime = tlvReader.getUShort(ContextSpecificTag(TAG_ROTATION_TIME)) + val flags = tlvReader.getUShort(ContextSpecificTag(TAG_FLAGS)) + + tlvReader.exitContainer() + + return ThreadNetworkDiagnosticsClusterSecurityPolicy(rotationTime, flags) + } + } +} diff --git a/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/TimeSynchronizationClusterDSTOffsetStruct.kt b/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/TimeSynchronizationClusterDSTOffsetStruct.kt new file mode 100644 index 00000000000000..a3b6fd3d55188f --- /dev/null +++ b/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/TimeSynchronizationClusterDSTOffsetStruct.kt @@ -0,0 +1,74 @@ +/* + * + * Copyright (c) 2023 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package matter.devicecontroller.cluster.structs + +import matter.devicecontroller.cluster.* +import matter.tlv.ContextSpecificTag +import matter.tlv.Tag +import matter.tlv.TlvReader +import matter.tlv.TlvWriter + +class TimeSynchronizationClusterDSTOffsetStruct( + val offset: Int, + val validStarting: ULong, + val validUntil: ULong? +) { + override fun toString(): String = buildString { + append("TimeSynchronizationClusterDSTOffsetStruct {\n") + append("\toffset : $offset\n") + append("\tvalidStarting : $validStarting\n") + append("\tvalidUntil : $validUntil\n") + append("}\n") + } + + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tlvTag) + put(ContextSpecificTag(TAG_OFFSET), offset) + put(ContextSpecificTag(TAG_VALID_STARTING), validStarting) + if (validUntil != null) { + put(ContextSpecificTag(TAG_VALID_UNTIL), validUntil) + } else { + putNull(ContextSpecificTag(TAG_VALID_UNTIL)) + } + endStructure() + } + } + + companion object { + private const val TAG_OFFSET = 0 + private const val TAG_VALID_STARTING = 1 + private const val TAG_VALID_UNTIL = 2 + + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): TimeSynchronizationClusterDSTOffsetStruct { + tlvReader.enterStructure(tlvTag) + val offset = tlvReader.getInt(ContextSpecificTag(TAG_OFFSET)) + val validStarting = tlvReader.getULong(ContextSpecificTag(TAG_VALID_STARTING)) + val validUntil = + if (!tlvReader.isNull()) { + tlvReader.getULong(ContextSpecificTag(TAG_VALID_UNTIL)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_VALID_UNTIL)) + null + } + + tlvReader.exitContainer() + + return TimeSynchronizationClusterDSTOffsetStruct(offset, validStarting, validUntil) + } + } +} diff --git a/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/TimeSynchronizationClusterFabricScopedTrustedTimeSourceStruct.kt b/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/TimeSynchronizationClusterFabricScopedTrustedTimeSourceStruct.kt new file mode 100644 index 00000000000000..152f42081f7ab8 --- /dev/null +++ b/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/TimeSynchronizationClusterFabricScopedTrustedTimeSourceStruct.kt @@ -0,0 +1,62 @@ +/* + * + * Copyright (c) 2023 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package matter.devicecontroller.cluster.structs + +import matter.devicecontroller.cluster.* +import matter.tlv.ContextSpecificTag +import matter.tlv.Tag +import matter.tlv.TlvReader +import matter.tlv.TlvWriter + +class TimeSynchronizationClusterFabricScopedTrustedTimeSourceStruct( + val nodeID: ULong, + val endpoint: UShort +) { + override fun toString(): String = buildString { + append("TimeSynchronizationClusterFabricScopedTrustedTimeSourceStruct {\n") + append("\tnodeID : $nodeID\n") + append("\tendpoint : $endpoint\n") + append("}\n") + } + + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tlvTag) + put(ContextSpecificTag(TAG_NODE_I_D), nodeID) + put(ContextSpecificTag(TAG_ENDPOINT), endpoint) + endStructure() + } + } + + companion object { + private const val TAG_NODE_I_D = 0 + private const val TAG_ENDPOINT = 1 + + fun fromTlv( + tlvTag: Tag, + tlvReader: TlvReader + ): TimeSynchronizationClusterFabricScopedTrustedTimeSourceStruct { + tlvReader.enterStructure(tlvTag) + val nodeID = tlvReader.getULong(ContextSpecificTag(TAG_NODE_I_D)) + val endpoint = tlvReader.getUShort(ContextSpecificTag(TAG_ENDPOINT)) + + tlvReader.exitContainer() + + return TimeSynchronizationClusterFabricScopedTrustedTimeSourceStruct(nodeID, endpoint) + } + } +} diff --git a/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/TimeSynchronizationClusterTimeZoneStruct.kt b/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/TimeSynchronizationClusterTimeZoneStruct.kt new file mode 100644 index 00000000000000..4dd53317007f70 --- /dev/null +++ b/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/TimeSynchronizationClusterTimeZoneStruct.kt @@ -0,0 +1,73 @@ +/* + * + * Copyright (c) 2023 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package matter.devicecontroller.cluster.structs + +import java.util.Optional +import matter.devicecontroller.cluster.* +import matter.tlv.ContextSpecificTag +import matter.tlv.Tag +import matter.tlv.TlvReader +import matter.tlv.TlvWriter + +class TimeSynchronizationClusterTimeZoneStruct( + val offset: Int, + val validAt: ULong, + val name: Optional +) { + override fun toString(): String = buildString { + append("TimeSynchronizationClusterTimeZoneStruct {\n") + append("\toffset : $offset\n") + append("\tvalidAt : $validAt\n") + append("\tname : $name\n") + append("}\n") + } + + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tlvTag) + put(ContextSpecificTag(TAG_OFFSET), offset) + put(ContextSpecificTag(TAG_VALID_AT), validAt) + if (name.isPresent) { + val optname = name.get() + put(ContextSpecificTag(TAG_NAME), optname) + } + endStructure() + } + } + + companion object { + private const val TAG_OFFSET = 0 + private const val TAG_VALID_AT = 1 + private const val TAG_NAME = 2 + + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): TimeSynchronizationClusterTimeZoneStruct { + tlvReader.enterStructure(tlvTag) + val offset = tlvReader.getInt(ContextSpecificTag(TAG_OFFSET)) + val validAt = tlvReader.getULong(ContextSpecificTag(TAG_VALID_AT)) + val name = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_NAME))) { + Optional.of(tlvReader.getString(ContextSpecificTag(TAG_NAME))) + } else { + Optional.empty() + } + + tlvReader.exitContainer() + + return TimeSynchronizationClusterTimeZoneStruct(offset, validAt, name) + } + } +} diff --git a/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/TimeSynchronizationClusterTrustedTimeSourceStruct.kt b/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/TimeSynchronizationClusterTrustedTimeSourceStruct.kt new file mode 100644 index 00000000000000..034d6d0d7e21e3 --- /dev/null +++ b/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/TimeSynchronizationClusterTrustedTimeSourceStruct.kt @@ -0,0 +1,67 @@ +/* + * + * Copyright (c) 2023 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package matter.devicecontroller.cluster.structs + +import matter.devicecontroller.cluster.* +import matter.tlv.ContextSpecificTag +import matter.tlv.Tag +import matter.tlv.TlvReader +import matter.tlv.TlvWriter + +class TimeSynchronizationClusterTrustedTimeSourceStruct( + val fabricIndex: UByte, + val nodeID: ULong, + val endpoint: UShort +) { + override fun toString(): String = buildString { + append("TimeSynchronizationClusterTrustedTimeSourceStruct {\n") + append("\tfabricIndex : $fabricIndex\n") + append("\tnodeID : $nodeID\n") + append("\tendpoint : $endpoint\n") + append("}\n") + } + + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tlvTag) + put(ContextSpecificTag(TAG_FABRIC_INDEX), fabricIndex) + put(ContextSpecificTag(TAG_NODE_I_D), nodeID) + put(ContextSpecificTag(TAG_ENDPOINT), endpoint) + endStructure() + } + } + + companion object { + private const val TAG_FABRIC_INDEX = 0 + private const val TAG_NODE_I_D = 1 + private const val TAG_ENDPOINT = 2 + + fun fromTlv( + tlvTag: Tag, + tlvReader: TlvReader + ): TimeSynchronizationClusterTrustedTimeSourceStruct { + tlvReader.enterStructure(tlvTag) + val fabricIndex = tlvReader.getUByte(ContextSpecificTag(TAG_FABRIC_INDEX)) + val nodeID = tlvReader.getULong(ContextSpecificTag(TAG_NODE_I_D)) + val endpoint = tlvReader.getUShort(ContextSpecificTag(TAG_ENDPOINT)) + + tlvReader.exitContainer() + + return TimeSynchronizationClusterTrustedTimeSourceStruct(fabricIndex, nodeID, endpoint) + } + } +} diff --git a/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/UnitTestingClusterDoubleNestedStructList.kt b/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/UnitTestingClusterDoubleNestedStructList.kt new file mode 100644 index 00000000000000..546255c64a2d1b --- /dev/null +++ b/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/UnitTestingClusterDoubleNestedStructList.kt @@ -0,0 +1,64 @@ +/* + * + * Copyright (c) 2023 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package matter.devicecontroller.cluster.structs + +import matter.devicecontroller.cluster.* +import matter.tlv.AnonymousTag +import matter.tlv.ContextSpecificTag +import matter.tlv.Tag +import matter.tlv.TlvReader +import matter.tlv.TlvWriter + +class UnitTestingClusterDoubleNestedStructList(val a: List) { + override fun toString(): String = buildString { + append("UnitTestingClusterDoubleNestedStructList {\n") + append("\ta : $a\n") + append("}\n") + } + + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tlvTag) + startArray(ContextSpecificTag(TAG_A)) + for (item in a.iterator()) { + item.toTlv(AnonymousTag, this) + } + endArray() + endStructure() + } + } + + companion object { + private const val TAG_A = 0 + + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): UnitTestingClusterDoubleNestedStructList { + tlvReader.enterStructure(tlvTag) + val a = + buildList { + tlvReader.enterArray(ContextSpecificTag(TAG_A)) + while (!tlvReader.isEndOfContainer()) { + add(UnitTestingClusterNestedStructList.fromTlv(AnonymousTag, tlvReader)) + } + tlvReader.exitContainer() + } + + tlvReader.exitContainer() + + return UnitTestingClusterDoubleNestedStructList(a) + } + } +} diff --git a/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/UnitTestingClusterNestedStruct.kt b/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/UnitTestingClusterNestedStruct.kt new file mode 100644 index 00000000000000..0891c3106fbadf --- /dev/null +++ b/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/UnitTestingClusterNestedStruct.kt @@ -0,0 +1,64 @@ +/* + * + * Copyright (c) 2023 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package matter.devicecontroller.cluster.structs + +import matter.devicecontroller.cluster.* +import matter.tlv.ContextSpecificTag +import matter.tlv.Tag +import matter.tlv.TlvReader +import matter.tlv.TlvWriter + +class UnitTestingClusterNestedStruct( + val a: UByte, + val b: Boolean, + val c: UnitTestingClusterSimpleStruct +) { + override fun toString(): String = buildString { + append("UnitTestingClusterNestedStruct {\n") + append("\ta : $a\n") + append("\tb : $b\n") + append("\tc : $c\n") + append("}\n") + } + + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tlvTag) + put(ContextSpecificTag(TAG_A), a) + put(ContextSpecificTag(TAG_B), b) + c.toTlv(ContextSpecificTag(TAG_C), this) + endStructure() + } + } + + companion object { + private const val TAG_A = 0 + private const val TAG_B = 1 + private const val TAG_C = 2 + + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): UnitTestingClusterNestedStruct { + tlvReader.enterStructure(tlvTag) + val a = tlvReader.getUByte(ContextSpecificTag(TAG_A)) + val b = tlvReader.getBoolean(ContextSpecificTag(TAG_B)) + val c = UnitTestingClusterSimpleStruct.fromTlv(ContextSpecificTag(TAG_C), tlvReader) + + tlvReader.exitContainer() + + return UnitTestingClusterNestedStruct(a, b, c) + } + } +} diff --git a/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/UnitTestingClusterNestedStructList.kt b/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/UnitTestingClusterNestedStructList.kt new file mode 100644 index 00000000000000..b22100fdf31dda --- /dev/null +++ b/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/UnitTestingClusterNestedStructList.kt @@ -0,0 +1,129 @@ +/* + * + * Copyright (c) 2023 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package matter.devicecontroller.cluster.structs + +import matter.devicecontroller.cluster.* +import matter.tlv.AnonymousTag +import matter.tlv.ContextSpecificTag +import matter.tlv.Tag +import matter.tlv.TlvReader +import matter.tlv.TlvWriter + +class UnitTestingClusterNestedStructList( + val a: UByte, + val b: Boolean, + val c: UnitTestingClusterSimpleStruct, + val d: List, + val e: List, + val f: List, + val g: List +) { + override fun toString(): String = buildString { + append("UnitTestingClusterNestedStructList {\n") + append("\ta : $a\n") + append("\tb : $b\n") + append("\tc : $c\n") + append("\td : $d\n") + append("\te : $e\n") + append("\tf : $f\n") + append("\tg : $g\n") + append("}\n") + } + + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tlvTag) + put(ContextSpecificTag(TAG_A), a) + put(ContextSpecificTag(TAG_B), b) + c.toTlv(ContextSpecificTag(TAG_C), this) + startArray(ContextSpecificTag(TAG_D)) + for (item in d.iterator()) { + item.toTlv(AnonymousTag, this) + } + endArray() + startArray(ContextSpecificTag(TAG_E)) + for (item in e.iterator()) { + put(AnonymousTag, item) + } + endArray() + startArray(ContextSpecificTag(TAG_F)) + for (item in f.iterator()) { + put(AnonymousTag, item) + } + endArray() + startArray(ContextSpecificTag(TAG_G)) + for (item in g.iterator()) { + put(AnonymousTag, item) + } + endArray() + endStructure() + } + } + + companion object { + private const val TAG_A = 0 + private const val TAG_B = 1 + private const val TAG_C = 2 + private const val TAG_D = 3 + private const val TAG_E = 4 + private const val TAG_F = 5 + private const val TAG_G = 6 + + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): UnitTestingClusterNestedStructList { + tlvReader.enterStructure(tlvTag) + val a = tlvReader.getUByte(ContextSpecificTag(TAG_A)) + val b = tlvReader.getBoolean(ContextSpecificTag(TAG_B)) + val c = UnitTestingClusterSimpleStruct.fromTlv(ContextSpecificTag(TAG_C), tlvReader) + val d = + buildList { + tlvReader.enterArray(ContextSpecificTag(TAG_D)) + while (!tlvReader.isEndOfContainer()) { + add(UnitTestingClusterSimpleStruct.fromTlv(AnonymousTag, tlvReader)) + } + tlvReader.exitContainer() + } + val e = + buildList { + tlvReader.enterArray(ContextSpecificTag(TAG_E)) + while (!tlvReader.isEndOfContainer()) { + add(tlvReader.getUInt(AnonymousTag)) + } + tlvReader.exitContainer() + } + val f = + buildList { + tlvReader.enterArray(ContextSpecificTag(TAG_F)) + while (!tlvReader.isEndOfContainer()) { + add(tlvReader.getByteArray(AnonymousTag)) + } + tlvReader.exitContainer() + } + val g = + buildList { + tlvReader.enterArray(ContextSpecificTag(TAG_G)) + while (!tlvReader.isEndOfContainer()) { + add(tlvReader.getUByte(AnonymousTag)) + } + tlvReader.exitContainer() + } + + tlvReader.exitContainer() + + return UnitTestingClusterNestedStructList(a, b, c, d, e, f, g) + } + } +} diff --git a/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/UnitTestingClusterNullablesAndOptionalsStruct.kt b/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/UnitTestingClusterNullablesAndOptionalsStruct.kt new file mode 100644 index 00000000000000..5098411f07e58d --- /dev/null +++ b/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/UnitTestingClusterNullablesAndOptionalsStruct.kt @@ -0,0 +1,308 @@ +/* + * + * Copyright (c) 2023 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package matter.devicecontroller.cluster.structs + +import java.util.Optional +import matter.devicecontroller.cluster.* +import matter.tlv.AnonymousTag +import matter.tlv.ContextSpecificTag +import matter.tlv.Tag +import matter.tlv.TlvReader +import matter.tlv.TlvWriter + +class UnitTestingClusterNullablesAndOptionalsStruct( + val nullableInt: UShort?, + val optionalInt: Optional, + val nullableOptionalInt: Optional?, + val nullableString: String?, + val optionalString: Optional, + val nullableOptionalString: Optional?, + val nullableStruct: UnitTestingClusterSimpleStruct?, + val optionalStruct: Optional, + val nullableOptionalStruct: Optional?, + val nullableList: List?, + val optionalList: Optional>, + val nullableOptionalList: Optional>? +) { + override fun toString(): String = buildString { + append("UnitTestingClusterNullablesAndOptionalsStruct {\n") + append("\tnullableInt : $nullableInt\n") + append("\toptionalInt : $optionalInt\n") + append("\tnullableOptionalInt : $nullableOptionalInt\n") + append("\tnullableString : $nullableString\n") + append("\toptionalString : $optionalString\n") + append("\tnullableOptionalString : $nullableOptionalString\n") + append("\tnullableStruct : $nullableStruct\n") + append("\toptionalStruct : $optionalStruct\n") + append("\tnullableOptionalStruct : $nullableOptionalStruct\n") + append("\tnullableList : $nullableList\n") + append("\toptionalList : $optionalList\n") + append("\tnullableOptionalList : $nullableOptionalList\n") + append("}\n") + } + + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tlvTag) + if (nullableInt != null) { + put(ContextSpecificTag(TAG_NULLABLE_INT), nullableInt) + } else { + putNull(ContextSpecificTag(TAG_NULLABLE_INT)) + } + if (optionalInt.isPresent) { + val optoptionalInt = optionalInt.get() + put(ContextSpecificTag(TAG_OPTIONAL_INT), optoptionalInt) + } + if (nullableOptionalInt != null) { + if (nullableOptionalInt.isPresent) { + val optnullableOptionalInt = nullableOptionalInt.get() + put(ContextSpecificTag(TAG_NULLABLE_OPTIONAL_INT), optnullableOptionalInt) + } + } else { + putNull(ContextSpecificTag(TAG_NULLABLE_OPTIONAL_INT)) + } + if (nullableString != null) { + put(ContextSpecificTag(TAG_NULLABLE_STRING), nullableString) + } else { + putNull(ContextSpecificTag(TAG_NULLABLE_STRING)) + } + if (optionalString.isPresent) { + val optoptionalString = optionalString.get() + put(ContextSpecificTag(TAG_OPTIONAL_STRING), optoptionalString) + } + if (nullableOptionalString != null) { + if (nullableOptionalString.isPresent) { + val optnullableOptionalString = nullableOptionalString.get() + put(ContextSpecificTag(TAG_NULLABLE_OPTIONAL_STRING), optnullableOptionalString) + } + } else { + putNull(ContextSpecificTag(TAG_NULLABLE_OPTIONAL_STRING)) + } + if (nullableStruct != null) { + nullableStruct.toTlv(ContextSpecificTag(TAG_NULLABLE_STRUCT), this) + } else { + putNull(ContextSpecificTag(TAG_NULLABLE_STRUCT)) + } + if (optionalStruct.isPresent) { + val optoptionalStruct = optionalStruct.get() + optoptionalStruct.toTlv(ContextSpecificTag(TAG_OPTIONAL_STRUCT), this) + } + if (nullableOptionalStruct != null) { + if (nullableOptionalStruct.isPresent) { + val optnullableOptionalStruct = nullableOptionalStruct.get() + optnullableOptionalStruct.toTlv(ContextSpecificTag(TAG_NULLABLE_OPTIONAL_STRUCT), this) + } + } else { + putNull(ContextSpecificTag(TAG_NULLABLE_OPTIONAL_STRUCT)) + } + if (nullableList != null) { + startArray(ContextSpecificTag(TAG_NULLABLE_LIST)) + for (item in nullableList.iterator()) { + put(AnonymousTag, item) + } + endArray() + } else { + putNull(ContextSpecificTag(TAG_NULLABLE_LIST)) + } + if (optionalList.isPresent) { + val optoptionalList = optionalList.get() + startArray(ContextSpecificTag(TAG_OPTIONAL_LIST)) + for (item in optoptionalList.iterator()) { + put(AnonymousTag, item) + } + endArray() + } + if (nullableOptionalList != null) { + if (nullableOptionalList.isPresent) { + val optnullableOptionalList = nullableOptionalList.get() + startArray(ContextSpecificTag(TAG_NULLABLE_OPTIONAL_LIST)) + for (item in optnullableOptionalList.iterator()) { + put(AnonymousTag, item) + } + endArray() + } + } else { + putNull(ContextSpecificTag(TAG_NULLABLE_OPTIONAL_LIST)) + } + endStructure() + } + } + + companion object { + private const val TAG_NULLABLE_INT = 0 + private const val TAG_OPTIONAL_INT = 1 + private const val TAG_NULLABLE_OPTIONAL_INT = 2 + private const val TAG_NULLABLE_STRING = 3 + private const val TAG_OPTIONAL_STRING = 4 + private const val TAG_NULLABLE_OPTIONAL_STRING = 5 + private const val TAG_NULLABLE_STRUCT = 6 + private const val TAG_OPTIONAL_STRUCT = 7 + private const val TAG_NULLABLE_OPTIONAL_STRUCT = 8 + private const val TAG_NULLABLE_LIST = 9 + private const val TAG_OPTIONAL_LIST = 10 + private const val TAG_NULLABLE_OPTIONAL_LIST = 11 + + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): UnitTestingClusterNullablesAndOptionalsStruct { + tlvReader.enterStructure(tlvTag) + val nullableInt = + if (!tlvReader.isNull()) { + tlvReader.getUShort(ContextSpecificTag(TAG_NULLABLE_INT)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_NULLABLE_INT)) + null + } + val optionalInt = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_OPTIONAL_INT))) { + Optional.of(tlvReader.getUShort(ContextSpecificTag(TAG_OPTIONAL_INT))) + } else { + Optional.empty() + } + val nullableOptionalInt = + if (!tlvReader.isNull()) { + if (tlvReader.isNextTag(ContextSpecificTag(TAG_NULLABLE_OPTIONAL_INT))) { + Optional.of(tlvReader.getUShort(ContextSpecificTag(TAG_NULLABLE_OPTIONAL_INT))) + } else { + Optional.empty() + } + } else { + tlvReader.getNull(ContextSpecificTag(TAG_NULLABLE_OPTIONAL_INT)) + null + } + val nullableString = + if (!tlvReader.isNull()) { + tlvReader.getString(ContextSpecificTag(TAG_NULLABLE_STRING)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_NULLABLE_STRING)) + null + } + val optionalString = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_OPTIONAL_STRING))) { + Optional.of(tlvReader.getString(ContextSpecificTag(TAG_OPTIONAL_STRING))) + } else { + Optional.empty() + } + val nullableOptionalString = + if (!tlvReader.isNull()) { + if (tlvReader.isNextTag(ContextSpecificTag(TAG_NULLABLE_OPTIONAL_STRING))) { + Optional.of(tlvReader.getString(ContextSpecificTag(TAG_NULLABLE_OPTIONAL_STRING))) + } else { + Optional.empty() + } + } else { + tlvReader.getNull(ContextSpecificTag(TAG_NULLABLE_OPTIONAL_STRING)) + null + } + val nullableStruct = + if (!tlvReader.isNull()) { + UnitTestingClusterSimpleStruct.fromTlv(ContextSpecificTag(TAG_NULLABLE_STRUCT), tlvReader) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_NULLABLE_STRUCT)) + null + } + val optionalStruct = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_OPTIONAL_STRUCT))) { + Optional.of( + UnitTestingClusterSimpleStruct.fromTlv( + ContextSpecificTag(TAG_OPTIONAL_STRUCT), + tlvReader + ) + ) + } else { + Optional.empty() + } + val nullableOptionalStruct = + if (!tlvReader.isNull()) { + if (tlvReader.isNextTag(ContextSpecificTag(TAG_NULLABLE_OPTIONAL_STRUCT))) { + Optional.of( + UnitTestingClusterSimpleStruct.fromTlv( + ContextSpecificTag(TAG_NULLABLE_OPTIONAL_STRUCT), + tlvReader + ) + ) + } else { + Optional.empty() + } + } else { + tlvReader.getNull(ContextSpecificTag(TAG_NULLABLE_OPTIONAL_STRUCT)) + null + } + val nullableList = + if (!tlvReader.isNull()) { + buildList { + tlvReader.enterArray(ContextSpecificTag(TAG_NULLABLE_LIST)) + while (!tlvReader.isEndOfContainer()) { + add(tlvReader.getUInt(AnonymousTag)) + } + tlvReader.exitContainer() + } + } else { + tlvReader.getNull(ContextSpecificTag(TAG_NULLABLE_LIST)) + null + } + val optionalList = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_OPTIONAL_LIST))) { + Optional.of( + buildList { + tlvReader.enterArray(ContextSpecificTag(TAG_OPTIONAL_LIST)) + while (!tlvReader.isEndOfContainer()) { + add(tlvReader.getUInt(AnonymousTag)) + } + tlvReader.exitContainer() + } + ) + } else { + Optional.empty() + } + val nullableOptionalList = + if (!tlvReader.isNull()) { + if (tlvReader.isNextTag(ContextSpecificTag(TAG_NULLABLE_OPTIONAL_LIST))) { + Optional.of( + buildList { + tlvReader.enterArray(ContextSpecificTag(TAG_NULLABLE_OPTIONAL_LIST)) + while (!tlvReader.isEndOfContainer()) { + add(tlvReader.getUInt(AnonymousTag)) + } + tlvReader.exitContainer() + } + ) + } else { + Optional.empty() + } + } else { + tlvReader.getNull(ContextSpecificTag(TAG_NULLABLE_OPTIONAL_LIST)) + null + } + + tlvReader.exitContainer() + + return UnitTestingClusterNullablesAndOptionalsStruct( + nullableInt, + optionalInt, + nullableOptionalInt, + nullableString, + optionalString, + nullableOptionalString, + nullableStruct, + optionalStruct, + nullableOptionalStruct, + nullableList, + optionalList, + nullableOptionalList + ) + } + } +} diff --git a/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/UnitTestingClusterSimpleStruct.kt b/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/UnitTestingClusterSimpleStruct.kt new file mode 100644 index 00000000000000..4c1dfe9e93b76e --- /dev/null +++ b/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/UnitTestingClusterSimpleStruct.kt @@ -0,0 +1,89 @@ +/* + * + * Copyright (c) 2023 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package matter.devicecontroller.cluster.structs + +import matter.devicecontroller.cluster.* +import matter.tlv.ContextSpecificTag +import matter.tlv.Tag +import matter.tlv.TlvReader +import matter.tlv.TlvWriter + +class UnitTestingClusterSimpleStruct( + val a: UByte, + val b: Boolean, + val c: UInt, + val d: ByteArray, + val e: String, + val f: UInt, + val g: Float, + val h: Double +) { + override fun toString(): String = buildString { + append("UnitTestingClusterSimpleStruct {\n") + append("\ta : $a\n") + append("\tb : $b\n") + append("\tc : $c\n") + append("\td : $d\n") + append("\te : $e\n") + append("\tf : $f\n") + append("\tg : $g\n") + append("\th : $h\n") + append("}\n") + } + + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tlvTag) + put(ContextSpecificTag(TAG_A), a) + put(ContextSpecificTag(TAG_B), b) + put(ContextSpecificTag(TAG_C), c) + put(ContextSpecificTag(TAG_D), d) + put(ContextSpecificTag(TAG_E), e) + put(ContextSpecificTag(TAG_F), f) + put(ContextSpecificTag(TAG_G), g) + put(ContextSpecificTag(TAG_H), h) + endStructure() + } + } + + companion object { + private const val TAG_A = 0 + private const val TAG_B = 1 + private const val TAG_C = 2 + private const val TAG_D = 3 + private const val TAG_E = 4 + private const val TAG_F = 5 + private const val TAG_G = 6 + private const val TAG_H = 7 + + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): UnitTestingClusterSimpleStruct { + tlvReader.enterStructure(tlvTag) + val a = tlvReader.getUByte(ContextSpecificTag(TAG_A)) + val b = tlvReader.getBoolean(ContextSpecificTag(TAG_B)) + val c = tlvReader.getUInt(ContextSpecificTag(TAG_C)) + val d = tlvReader.getByteArray(ContextSpecificTag(TAG_D)) + val e = tlvReader.getString(ContextSpecificTag(TAG_E)) + val f = tlvReader.getUInt(ContextSpecificTag(TAG_F)) + val g = tlvReader.getFloat(ContextSpecificTag(TAG_G)) + val h = tlvReader.getDouble(ContextSpecificTag(TAG_H)) + + tlvReader.exitContainer() + + return UnitTestingClusterSimpleStruct(a, b, c, d, e, f, g, h) + } + } +} diff --git a/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/UnitTestingClusterTestFabricScoped.kt b/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/UnitTestingClusterTestFabricScoped.kt new file mode 100644 index 00000000000000..0fae66d5d86dc0 --- /dev/null +++ b/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/UnitTestingClusterTestFabricScoped.kt @@ -0,0 +1,161 @@ +/* + * + * Copyright (c) 2023 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package matter.devicecontroller.cluster.structs + +import java.util.Optional +import matter.devicecontroller.cluster.* +import matter.tlv.AnonymousTag +import matter.tlv.ContextSpecificTag +import matter.tlv.Tag +import matter.tlv.TlvReader +import matter.tlv.TlvWriter + +class UnitTestingClusterTestFabricScoped( + val fabricSensitiveInt8u: UByte, + val optionalFabricSensitiveInt8u: Optional, + val nullableFabricSensitiveInt8u: UByte?, + val nullableOptionalFabricSensitiveInt8u: Optional?, + val fabricSensitiveCharString: String, + val fabricSensitiveStruct: UnitTestingClusterSimpleStruct, + val fabricSensitiveInt8uList: List, + val fabricIndex: UByte +) { + override fun toString(): String = buildString { + append("UnitTestingClusterTestFabricScoped {\n") + append("\tfabricSensitiveInt8u : $fabricSensitiveInt8u\n") + append("\toptionalFabricSensitiveInt8u : $optionalFabricSensitiveInt8u\n") + append("\tnullableFabricSensitiveInt8u : $nullableFabricSensitiveInt8u\n") + append("\tnullableOptionalFabricSensitiveInt8u : $nullableOptionalFabricSensitiveInt8u\n") + append("\tfabricSensitiveCharString : $fabricSensitiveCharString\n") + append("\tfabricSensitiveStruct : $fabricSensitiveStruct\n") + append("\tfabricSensitiveInt8uList : $fabricSensitiveInt8uList\n") + append("\tfabricIndex : $fabricIndex\n") + append("}\n") + } + + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tlvTag) + put(ContextSpecificTag(TAG_FABRIC_SENSITIVE_INT8U), fabricSensitiveInt8u) + if (optionalFabricSensitiveInt8u.isPresent) { + val optoptionalFabricSensitiveInt8u = optionalFabricSensitiveInt8u.get() + put( + ContextSpecificTag(TAG_OPTIONAL_FABRIC_SENSITIVE_INT8U), + optoptionalFabricSensitiveInt8u + ) + } + if (nullableFabricSensitiveInt8u != null) { + put(ContextSpecificTag(TAG_NULLABLE_FABRIC_SENSITIVE_INT8U), nullableFabricSensitiveInt8u) + } else { + putNull(ContextSpecificTag(TAG_NULLABLE_FABRIC_SENSITIVE_INT8U)) + } + if (nullableOptionalFabricSensitiveInt8u != null) { + if (nullableOptionalFabricSensitiveInt8u.isPresent) { + val optnullableOptionalFabricSensitiveInt8u = nullableOptionalFabricSensitiveInt8u.get() + put( + ContextSpecificTag(TAG_NULLABLE_OPTIONAL_FABRIC_SENSITIVE_INT8U), + optnullableOptionalFabricSensitiveInt8u + ) + } + } else { + putNull(ContextSpecificTag(TAG_NULLABLE_OPTIONAL_FABRIC_SENSITIVE_INT8U)) + } + put(ContextSpecificTag(TAG_FABRIC_SENSITIVE_CHAR_STRING), fabricSensitiveCharString) + fabricSensitiveStruct.toTlv(ContextSpecificTag(TAG_FABRIC_SENSITIVE_STRUCT), this) + startArray(ContextSpecificTag(TAG_FABRIC_SENSITIVE_INT8U_LIST)) + for (item in fabricSensitiveInt8uList.iterator()) { + put(AnonymousTag, item) + } + endArray() + put(ContextSpecificTag(TAG_FABRIC_INDEX), fabricIndex) + endStructure() + } + } + + companion object { + private const val TAG_FABRIC_SENSITIVE_INT8U = 1 + private const val TAG_OPTIONAL_FABRIC_SENSITIVE_INT8U = 2 + private const val TAG_NULLABLE_FABRIC_SENSITIVE_INT8U = 3 + private const val TAG_NULLABLE_OPTIONAL_FABRIC_SENSITIVE_INT8U = 4 + private const val TAG_FABRIC_SENSITIVE_CHAR_STRING = 5 + private const val TAG_FABRIC_SENSITIVE_STRUCT = 6 + private const val TAG_FABRIC_SENSITIVE_INT8U_LIST = 7 + private const val TAG_FABRIC_INDEX = 254 + + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): UnitTestingClusterTestFabricScoped { + tlvReader.enterStructure(tlvTag) + val fabricSensitiveInt8u = tlvReader.getUByte(ContextSpecificTag(TAG_FABRIC_SENSITIVE_INT8U)) + val optionalFabricSensitiveInt8u = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_OPTIONAL_FABRIC_SENSITIVE_INT8U))) { + Optional.of(tlvReader.getUByte(ContextSpecificTag(TAG_OPTIONAL_FABRIC_SENSITIVE_INT8U))) + } else { + Optional.empty() + } + val nullableFabricSensitiveInt8u = + if (!tlvReader.isNull()) { + tlvReader.getUByte(ContextSpecificTag(TAG_NULLABLE_FABRIC_SENSITIVE_INT8U)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_NULLABLE_FABRIC_SENSITIVE_INT8U)) + null + } + val nullableOptionalFabricSensitiveInt8u = + if (!tlvReader.isNull()) { + if ( + tlvReader.isNextTag(ContextSpecificTag(TAG_NULLABLE_OPTIONAL_FABRIC_SENSITIVE_INT8U)) + ) { + Optional.of( + tlvReader.getUByte(ContextSpecificTag(TAG_NULLABLE_OPTIONAL_FABRIC_SENSITIVE_INT8U)) + ) + } else { + Optional.empty() + } + } else { + tlvReader.getNull(ContextSpecificTag(TAG_NULLABLE_OPTIONAL_FABRIC_SENSITIVE_INT8U)) + null + } + val fabricSensitiveCharString = + tlvReader.getString(ContextSpecificTag(TAG_FABRIC_SENSITIVE_CHAR_STRING)) + val fabricSensitiveStruct = + UnitTestingClusterSimpleStruct.fromTlv( + ContextSpecificTag(TAG_FABRIC_SENSITIVE_STRUCT), + tlvReader + ) + val fabricSensitiveInt8uList = + buildList { + tlvReader.enterArray(ContextSpecificTag(TAG_FABRIC_SENSITIVE_INT8U_LIST)) + while (!tlvReader.isEndOfContainer()) { + add(tlvReader.getUByte(AnonymousTag)) + } + tlvReader.exitContainer() + } + val fabricIndex = tlvReader.getUByte(ContextSpecificTag(TAG_FABRIC_INDEX)) + + tlvReader.exitContainer() + + return UnitTestingClusterTestFabricScoped( + fabricSensitiveInt8u, + optionalFabricSensitiveInt8u, + nullableFabricSensitiveInt8u, + nullableOptionalFabricSensitiveInt8u, + fabricSensitiveCharString, + fabricSensitiveStruct, + fabricSensitiveInt8uList, + fabricIndex + ) + } + } +} diff --git a/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/UnitTestingClusterTestListStructOctet.kt b/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/UnitTestingClusterTestListStructOctet.kt new file mode 100644 index 00000000000000..9e49970a89db9c --- /dev/null +++ b/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/UnitTestingClusterTestListStructOctet.kt @@ -0,0 +1,56 @@ +/* + * + * Copyright (c) 2023 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package matter.devicecontroller.cluster.structs + +import matter.devicecontroller.cluster.* +import matter.tlv.ContextSpecificTag +import matter.tlv.Tag +import matter.tlv.TlvReader +import matter.tlv.TlvWriter + +class UnitTestingClusterTestListStructOctet(val member1: ULong, val member2: ByteArray) { + override fun toString(): String = buildString { + append("UnitTestingClusterTestListStructOctet {\n") + append("\tmember1 : $member1\n") + append("\tmember2 : $member2\n") + append("}\n") + } + + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tlvTag) + put(ContextSpecificTag(TAG_MEMBER1), member1) + put(ContextSpecificTag(TAG_MEMBER2), member2) + endStructure() + } + } + + companion object { + private const val TAG_MEMBER1 = 0 + private const val TAG_MEMBER2 = 1 + + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): UnitTestingClusterTestListStructOctet { + tlvReader.enterStructure(tlvTag) + val member1 = tlvReader.getULong(ContextSpecificTag(TAG_MEMBER1)) + val member2 = tlvReader.getByteArray(ContextSpecificTag(TAG_MEMBER2)) + + tlvReader.exitContainer() + + return UnitTestingClusterTestListStructOctet(member1, member2) + } + } +} diff --git a/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/UserLabelClusterLabelStruct.kt b/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/UserLabelClusterLabelStruct.kt new file mode 100644 index 00000000000000..ffc34fe8515c2c --- /dev/null +++ b/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/UserLabelClusterLabelStruct.kt @@ -0,0 +1,56 @@ +/* + * + * Copyright (c) 2023 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package matter.devicecontroller.cluster.structs + +import matter.devicecontroller.cluster.* +import matter.tlv.ContextSpecificTag +import matter.tlv.Tag +import matter.tlv.TlvReader +import matter.tlv.TlvWriter + +class UserLabelClusterLabelStruct(val label: String, val value: String) { + override fun toString(): String = buildString { + append("UserLabelClusterLabelStruct {\n") + append("\tlabel : $label\n") + append("\tvalue : $value\n") + append("}\n") + } + + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tlvTag) + put(ContextSpecificTag(TAG_LABEL), label) + put(ContextSpecificTag(TAG_VALUE), value) + endStructure() + } + } + + companion object { + private const val TAG_LABEL = 0 + private const val TAG_VALUE = 1 + + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): UserLabelClusterLabelStruct { + tlvReader.enterStructure(tlvTag) + val label = tlvReader.getString(ContextSpecificTag(TAG_LABEL)) + val value = tlvReader.getString(ContextSpecificTag(TAG_VALUE)) + + tlvReader.exitContainer() + + return UserLabelClusterLabelStruct(label, value) + } + } +}