From 23107041c1a1539729fc52500ec032dc7db273c6 Mon Sep 17 00:00:00 2001 From: joonhaengHeo <85541460+joonhaengHeo@users.noreply.github.com> Date: Fri, 22 Sep 2023 08:17:48 +0900 Subject: [PATCH] [Android] Fix generated struct variable type (#29360) * Fix generated struct variable type * generated files.gni * Update Struct Class for avoiding build error * Update unit test * update kotlin codestyle * Add jinja test file * Update script test code --- .../generators/java/ChipEventStructs.jinja | 14 +-- .../generators/java/ChipStructFiles_gni.jinja | 24 +++++ .../generators/java/ChipStructs.jinja | 14 +-- .../matter_idl/generators/java/__init__.py | 29 +++-- .../matter_idl/tests/available_tests.yaml | 1 + .../SecondClusterFabricDescriptorStruct.kt | 24 ++--- .../outputs/several_clusters/java/files.gni | 9 ++ src/controller/java/BUILD.gn | 2 +- ...olClusterAccessControlEntryChangedEvent.kt | 24 ++--- ...usterAccessControlExtensionChangedEvent.kt | 24 ++--- .../ActionsClusterActionFailedEvent.kt | 24 ++--- .../ActionsClusterStateChangedEvent.kt | 16 +-- .../BasicInformationClusterLeaveEvent.kt | 12 +-- ...InformationClusterReachableChangedEvent.kt | 8 +- .../BasicInformationClusterStartUpEvent.kt | 12 +-- .../BooleanStateClusterStateChangeEvent.kt | 8 +- ...InformationClusterReachableChangedEvent.kt | 8 +- ...viceBasicInformationClusterStartUpEvent.kt | 15 +-- .../DishwasherAlarmClusterNotifyEvent.kt | 24 ++--- .../DoorLockClusterDoorLockAlarmEvent.kt | 12 +-- .../DoorLockClusterDoorStateChangeEvent.kt | 12 +-- .../DoorLockClusterLockOperationErrorEvent.kt | 38 +++---- .../DoorLockClusterLockOperationEvent.kt | 34 +++--- .../DoorLockClusterLockUserChangeEvent.kt | 36 +++---- ...eneralDiagnosticsClusterBootReasonEvent.kt | 12 +-- ...gnosticsClusterHardwareFaultChangeEvent.kt | 35 +++--- ...agnosticsClusterNetworkFaultChangeEvent.kt | 35 +++--- ...DiagnosticsClusterRadioFaultChangeEvent.kt | 32 +++--- ...nalStateClusterOperationCompletionEvent.kt | 23 ++-- ...tionalStateClusterOperationalErrorEvent.kt | 8 +- ...pdateRequestorClusterDownloadErrorEvent.kt | 20 ++-- ...ateRequestorClusterStateTransitionEvent.kt | 24 ++--- ...dateRequestorClusterVersionAppliedEvent.kt | 16 +-- ...rSourceClusterBatChargeFaultChangeEvent.kt | 33 +++--- .../PowerSourceClusterBatFaultChangeEvent.kt | 30 +++--- ...PowerSourceClusterWiredFaultChangeEvent.kt | 30 +++--- .../RefrigeratorAlarmClusterNotifyEvent.kt | 24 ++--- ...nalStateClusterOperationCompletionEvent.kt | 20 ++-- ...tionalStateClusterOperationalErrorEvent.kt | 11 +- .../SmokeCoAlarmClusterCOAlarmEvent.kt | 12 +-- ...eCoAlarmClusterInterconnectCOAlarmEvent.kt | 12 +-- ...AlarmClusterInterconnectSmokeAlarmEvent.kt | 12 +-- .../SmokeCoAlarmClusterLowBatteryEvent.kt | 12 +-- .../SmokeCoAlarmClusterSmokeAlarmEvent.kt | 12 +-- ...areDiagnosticsClusterSoftwareFaultEvent.kt | 12 +-- .../SwitchClusterInitialPressEvent.kt | 12 +-- .../SwitchClusterLongPressEvent.kt | 12 +-- .../SwitchClusterLongReleaseEvent.kt | 12 +-- .../SwitchClusterMultiPressCompleteEvent.kt | 16 +-- .../SwitchClusterMultiPressOngoingEvent.kt | 16 +-- .../SwitchClusterShortReleaseEvent.kt | 12 +-- .../SwitchClusterSwitchLatchedEvent.kt | 12 +-- ...DiagnosticsClusterConnectionStatusEvent.kt | 12 +-- ...agnosticsClusterNetworkFaultChangeEvent.kt | 32 +++--- ...imeSynchronizationClusterDSTStatusEvent.kt | 8 +- ...nchronizationClusterTimeZoneStatusEvent.kt | 8 +- .../UnitTestingClusterTestEventEvent.kt | 34 +++--- ...estingClusterTestFabricScopedEventEvent.kt | 12 +-- ...agnosticsClusterAssociationFailureEvent.kt | 16 +-- ...DiagnosticsClusterConnectionStatusEvent.kt | 12 +-- ...orkDiagnosticsClusterDisconnectionEvent.kt | 15 +-- .../chip/devicecontroller/cluster/files.gni | 19 +--- ...sControlClusterAccessControlEntryStruct.kt | 38 +++---- ...trolClusterAccessControlExtensionStruct.kt | 15 +-- ...ControlClusterAccessControlTargetStruct.kt | 20 ++-- .../structs/ActionsClusterActionStruct.kt | 28 ++--- .../ActionsClusterEndpointListStruct.kt | 28 ++--- ...nitoringClusterReplacementProductStruct.kt | 12 +-- ...pplicationBasicClusterApplicationStruct.kt | 12 +-- ...ationLauncherClusterApplicationEPStruct.kt | 12 +-- ...icationLauncherClusterApplicationStruct.kt | 12 +-- .../AudioOutputClusterOutputInfoStruct.kt | 14 +-- ...nformationClusterCapabilityMinimaStruct.kt | 17 +-- ...formationClusterProductAppearanceStruct.kt | 14 +-- .../structs/BindingClusterTargetStruct.kt | 28 ++--- ...formationClusterProductAppearanceStruct.kt | 16 +-- ...nitoringClusterReplacementProductStruct.kt | 66 ------------ .../ChannelClusterChannelInfoStruct.kt | 16 +-- .../structs/ChannelClusterLineupInfoStruct.kt | 12 +-- ...tentLauncherClusterAdditionalInfoStruct.kt | 8 +- ...auncherClusterBrandingInformationStruct.kt | 11 +- ...ntentLauncherClusterContentSearchStruct.kt | 14 +-- .../ContentLauncherClusterDimensionStruct.kt | 12 +-- .../ContentLauncherClusterParameterStruct.kt | 18 ++-- ...ntLauncherClusterStyleInformationStruct.kt | 8 +- .../DescriptorClusterDeviceTypeStruct.kt | 14 +-- .../DescriptorClusterSemanticTagStruct.kt | 20 ++-- .../DishwasherModeClusterModeOptionStruct.kt | 18 ++-- .../DishwasherModeClusterModeTagStruct.kt | 14 +-- .../DoorLockClusterCredentialStruct.kt | 14 +-- ...nitoringClusterReplacementProductStruct.kt | 66 ------------ .../structs/FixedLabelClusterLabelStruct.kt | 8 +- ...nitoringClusterReplacementProductStruct.kt | 63 ----------- ...missioningClusterBasicCommissioningInfo.kt | 19 ++-- ...neralDiagnosticsClusterNetworkInterface.kt | 24 ++--- ...pKeyManagementClusterGroupInfoMapStruct.kt | 28 ++--- ...upKeyManagementClusterGroupKeyMapStruct.kt | 20 ++-- ...upKeyManagementClusterGroupKeySetStruct.kt | 28 ++--- ...nitoringClusterReplacementProductStruct.kt | 12 +-- ...mentClusterMonitoringRegistrationStruct.kt | 23 ++-- ...nitoringClusterReplacementProductStruct.kt | 66 ------------ ...nitoringClusterReplacementProductStruct.kt | 66 ------------ ...aundryWasherModeClusterModeOptionStruct.kt | 18 ++-- .../LaundryWasherModeClusterModeTagStruct.kt | 14 +-- .../MediaInputClusterInputInfoStruct.kt | 16 +-- ...iaPlaybackClusterPlaybackPositionStruct.kt | 14 +-- .../ModeSelectClusterModeOptionStruct.kt | 18 ++-- .../ModeSelectClusterSemanticTagStruct.kt | 14 +-- ...rkCommissioningClusterNetworkInfoStruct.kt | 8 +- ...gClusterThreadInterfaceScanResultStruct.kt | 28 ++--- ...ingClusterWiFiInterfaceScanResultStruct.kt | 20 ++-- ...redentialsClusterFabricDescriptorStruct.kt | 24 ++--- .../OperationalCredentialsClusterNOCStruct.kt | 12 +-- ...OperationalStateClusterErrorStateStruct.kt | 12 +-- ...ionalStateClusterOperationalStateStruct.kt | 12 +-- ...eUpdateRequestorClusterProviderLocation.kt | 23 ++-- ...nitoringClusterReplacementProductStruct.kt | 66 ------------ ...erSourceClusterBatChargeFaultChangeType.kt | 33 +++--- .../PowerSourceClusterBatFaultChangeType.kt | 30 +++--- .../PowerSourceClusterWiredFaultChangeType.kt | 30 +++--- ...olledCabinetModeClusterModeOptionStruct.kt | 18 ++-- ...ntrolledCabinetModeClusterModeTagStruct.kt | 16 +-- .../RvcCleanModeClusterModeOptionStruct.kt | 18 ++-- .../RvcCleanModeClusterModeTagStruct.kt | 14 +-- ...OperationalStateClusterErrorStateStruct.kt | 12 +-- ...ionalStateClusterOperationalStateStruct.kt | 15 +-- .../RvcRunModeClusterModeOptionStruct.kt | 18 ++-- .../structs/RvcRunModeClusterModeTagStruct.kt | 14 +-- .../ScenesClusterAttributeValuePair.kt | 14 +-- .../structs/ScenesClusterExtensionFieldSet.kt | 18 ++-- ...reDiagnosticsClusterThreadMetricsStruct.kt | 24 ++--- .../TargetNavigatorClusterTargetInfoStruct.kt | 12 +-- ...statClusterThermostatScheduleTransition.kt | 12 +-- ...rkDiagnosticsClusterNeighborTableStruct.kt | 40 +++---- ...ticsClusterOperationalDatasetComponents.kt | 8 +- ...tworkDiagnosticsClusterRouteTableStruct.kt | 43 ++++---- ...NetworkDiagnosticsClusterSecurityPolicy.kt | 14 +-- ...meSynchronizationClusterDSTOffsetStruct.kt | 16 +-- ...sterFabricScopedTrustedTimeSourceStruct.kt | 16 +-- ...imeSynchronizationClusterTimeZoneStruct.kt | 12 +-- ...onizationClusterTrustedTimeSourceStruct.kt | 23 ++-- ...nitoringClusterReplacementProductStruct.kt | 66 ------------ ...nitTestingClusterDoubleNestedStructList.kt | 14 +-- .../structs/UnitTestingClusterNestedStruct.kt | 12 +-- .../UnitTestingClusterNestedStructList.kt | 48 ++++----- ...stingClusterNullablesAndOptionalsStruct.kt | 56 +++++----- .../structs/UnitTestingClusterSimpleStruct.kt | 20 ++-- .../UnitTestingClusterTestFabricScoped.kt | 40 +++---- .../UnitTestingClusterTestListStructOctet.kt | 12 +-- .../structs/UserLabelClusterLabelStruct.kt | 8 +- ...nitoringClusterReplacementProductStruct.kt | 63 ----------- ...nitoringClusterReplacementProductStruct.kt | 66 ------------ ...nitoringClusterReplacementProductStruct.kt | 66 ------------ .../cluster/ChipClusterEventStructTest.kt | 12 +-- .../cluster/ChipClusterStructTest.kt | 102 +++++++++--------- 155 files changed, 1416 insertions(+), 1981 deletions(-) create mode 100644 scripts/py_matter_idl/matter_idl/generators/java/ChipStructFiles_gni.jinja create mode 100644 scripts/py_matter_idl/matter_idl/tests/outputs/several_clusters/java/files.gni rename src/controller/java/{src => generated/java}/chip/devicecontroller/cluster/files.gni (92%) delete mode 100644 src/controller/java/generated/java/chip/devicecontroller/cluster/structs/CeramicFilterMonitoringClusterReplacementProductStruct.kt delete mode 100644 src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ElectrostaticFilterMonitoringClusterReplacementProductStruct.kt delete mode 100644 src/controller/java/generated/java/chip/devicecontroller/cluster/structs/FuelTankMonitoringClusterReplacementProductStruct.kt delete mode 100644 src/controller/java/generated/java/chip/devicecontroller/cluster/structs/InkCartridgeMonitoringClusterReplacementProductStruct.kt delete mode 100644 src/controller/java/generated/java/chip/devicecontroller/cluster/structs/IonizingFilterMonitoringClusterReplacementProductStruct.kt delete mode 100644 src/controller/java/generated/java/chip/devicecontroller/cluster/structs/OzoneFilterMonitoringClusterReplacementProductStruct.kt delete mode 100644 src/controller/java/generated/java/chip/devicecontroller/cluster/structs/TonerCartridgeMonitoringClusterReplacementProductStruct.kt delete mode 100644 src/controller/java/generated/java/chip/devicecontroller/cluster/structs/UvFilterMonitoringClusterReplacementProductStruct.kt delete mode 100644 src/controller/java/generated/java/chip/devicecontroller/cluster/structs/WaterTankMonitoringClusterReplacementProductStruct.kt delete mode 100644 src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ZeoliteFilterMonitoringClusterReplacementProductStruct.kt diff --git a/scripts/py_matter_idl/matter_idl/generators/java/ChipEventStructs.jinja b/scripts/py_matter_idl/matter_idl/generators/java/ChipEventStructs.jinja index 4ce1f2f19d5861..7732cf7baa933a 100644 --- a/scripts/py_matter_idl/matter_idl/generators/java/ChipEventStructs.jinja +++ b/scripts/py_matter_idl/matter_idl/generators/java/ChipEventStructs.jinja @@ -26,11 +26,11 @@ {{encode_tlv(encodable.without_optional(), tag, "opt" + name, depth + 1)}} } {%- elif encodable.is_list -%} - startList({{tag}}) + startArray({{tag}}) for (item in {{name}}.iterator()) { {{encode_tlv(encodable.without_list(), "AnonymousTag", "item", depth + 1)}} } - endList() + endArray() {%- elif encodable.is_struct -%} {{name}}.toTlv({{tag}}, this) {%- else -%} @@ -55,7 +55,7 @@ {%- elif encodable.is_list -%} {%- set encodablewithoutlist = encodable.without_list() -%} buildList <{{encode_value(source, encodablewithoutlist, depth + 1)}}> { - tlvReader.enterList({{tag}}) + tlvReader.enterArray({{tag}}) while(!tlvReader.isEndOfContainer()) { this.add({{decode_tlv(source, encodablewithoutlist, "AnonymousTag", depth + 1)}}) } @@ -115,9 +115,9 @@ class {{cluster.name}}Cluster{{event.name}}Event ( append("}\n") } - fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { tlvWriter.apply { - startStructure(tag) + startStructure(tlvTag) {% for field in event.fields %} {%- set encodable = field | asEncodable(typeLookup) %} {%- set tag = contextSpecificTag(field) -%} @@ -132,8 +132,8 @@ class {{cluster.name}}Cluster{{event.name}}Event ( private const val TAG_{{field.name | constcase}} = {{field.code}} {%- endfor %} - fun fromTlv(tag: Tag, tlvReader: TlvReader) : {{cluster.name}}Cluster{{event.name}}Event { - tlvReader.enterStructure(tag) + 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) -%} diff --git a/scripts/py_matter_idl/matter_idl/generators/java/ChipStructFiles_gni.jinja b/scripts/py_matter_idl/matter_idl/generators/java/ChipStructFiles_gni.jinja new file mode 100644 index 00000000000000..1f7ed53781e30e --- /dev/null +++ b/scripts/py_matter_idl/matter_idl/generators/java/ChipStructFiles_gni.jinja @@ -0,0 +1,24 @@ +import("//build_overrides/build.gni") +import("//build_overrides/chip.gni") + +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/chip/devicecontroller/cluster/structs/{{cluster.name}}Cluster{{struct.name}}.kt", +{%- endif %} +{%- endfor %} +{%- endfor %} +] + +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/chip/devicecontroller/cluster/eventstructs/{{cluster.name}}Cluster{{event.name}}Event.kt", +{%- endif %} +{%- endfor %} +{%- endfor %} +] \ No newline at end of file diff --git a/scripts/py_matter_idl/matter_idl/generators/java/ChipStructs.jinja b/scripts/py_matter_idl/matter_idl/generators/java/ChipStructs.jinja index 7463e6f26c7a2c..a5b0a6374fe862 100644 --- a/scripts/py_matter_idl/matter_idl/generators/java/ChipStructs.jinja +++ b/scripts/py_matter_idl/matter_idl/generators/java/ChipStructs.jinja @@ -26,11 +26,11 @@ {{encode_tlv(encodable.without_optional(), tag, "opt" + name, depth + 1)}} } {%- elif encodable.is_list -%} - startList({{tag}}) + startArray({{tag}}) for (item in {{name}}.iterator()) { {{encode_tlv(encodable.without_list(), "AnonymousTag", "item", depth + 1)}} } - endList() + endArray() {%- elif encodable.is_struct -%} {{name}}.toTlv({{tag}}, this) {%- else -%} @@ -55,7 +55,7 @@ {%- elif encodable.is_list -%} {%- set encodablewithoutlist = encodable.without_list() -%} buildList<{{encode_value(source, encodablewithoutlist, depth + 1)}}> { - tlvReader.enterList({{tag}}) + tlvReader.enterArray({{tag}}) while(!tlvReader.isEndOfContainer()) { add({{decode_tlv(source, encodablewithoutlist, "AnonymousTag", depth + 1)}}) } @@ -115,9 +115,9 @@ class {{cluster.name}}Cluster{{struct.name}} ( append("}\n") } - fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { tlvWriter.apply { - startStructure(tag) + startStructure(tlvTag) {% for field in struct.fields %} {%- set encodable = field | asEncodable(typeLookup) %} {%- set tag = contextSpecificTag(field) -%} @@ -132,8 +132,8 @@ class {{cluster.name}}Cluster{{struct.name}} ( private const val TAG_{{field.name | constcase}} = {{field.code}} {%- endfor %} - fun fromTlv(tag: Tag, tlvReader: TlvReader) : {{cluster.name}}Cluster{{struct.name}} { - tlvReader.enterStructure(tag) + 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) -%} diff --git a/scripts/py_matter_idl/matter_idl/generators/java/__init__.py b/scripts/py_matter_idl/matter_idl/generators/java/__init__.py index 5abc912ebabd34..4fa6b90c7ce64b 100644 --- a/scripts/py_matter_idl/matter_idl/generators/java/__init__.py +++ b/scripts/py_matter_idl/matter_idl/generators/java/__init__.py @@ -493,10 +493,16 @@ def kotlin_type(self): raise Exception("Unknown fundamental type") elif isinstance(t, BasicInteger): # the >= 3 will include int24_t to be considered "long" - if t.byte_count >= 3: - return "Long" + if t.is_signed: + if t.byte_count >= 3: + return "Long" + else: + return "Int" else: - return "Int" + if t.byte_count >= 3: + return "ULong" + else: + return "UInt" elif isinstance(t, BasicString): if t.is_binary: return "ByteArray" @@ -504,14 +510,14 @@ def kotlin_type(self): return "String" elif isinstance(t, IdlEnumType): if t.base_type.byte_count >= 3: - return "Long" + return "ULong" else: - return "Int" + return "UInt" elif isinstance(t, IdlBitmapType): if t.base_type.byte_count >= 3: - return "Long" + return "ULong" else: - return "Int" + return "UInt" else: return "Any" @@ -790,6 +796,15 @@ def internal_render_all(self): } ) + self.internal_render_one_output( + template_path="ChipStructFiles_gni.jinja", + output_file_name="java/chip/devicecontroller/cluster/files.gni", + vars={ + 'idl': self.idl, + 'clientClusters': clientClusters, + } + ) + # Every cluster has its own impl, to avoid # very large compilations (running out of RAM) for cluster in self.idl.clusters: diff --git a/scripts/py_matter_idl/matter_idl/tests/available_tests.yaml b/scripts/py_matter_idl/matter_idl/tests/available_tests.yaml index de117835790d10..e561d1331d6eed 100644 --- a/scripts/py_matter_idl/matter_idl/tests/available_tests.yaml +++ b/scripts/py_matter_idl/matter_idl/tests/available_tests.yaml @@ -56,6 +56,7 @@ java-class: java/chip/devicecontroller/ClusterWriteMapping.java: outputs/several_clusters/java/ClusterWriteMapping.java java/chip/devicecontroller/ClusterReadMapping.java: outputs/several_clusters/java/ClusterReadMapping.java java/chip/devicecontroller/ClusterIDMapping.java: outputs/several_clusters/java/ClusterIDMapping.java + java/chip/devicecontroller/cluster/files.gni: outputs/several_clusters/java/files.gni cpp-app: inputs/several_clusters.matter: diff --git a/scripts/py_matter_idl/matter_idl/tests/outputs/several_clusters/java/SecondClusterFabricDescriptorStruct.kt b/scripts/py_matter_idl/matter_idl/tests/outputs/several_clusters/java/SecondClusterFabricDescriptorStruct.kt index e86ce5788fd642..0afa531389faa6 100644 --- a/scripts/py_matter_idl/matter_idl/tests/outputs/several_clusters/java/SecondClusterFabricDescriptorStruct.kt +++ b/scripts/py_matter_idl/matter_idl/tests/outputs/several_clusters/java/SecondClusterFabricDescriptorStruct.kt @@ -28,11 +28,11 @@ import java.util.Optional class SecondClusterFabricDescriptorStruct ( val rootPublicKey: ByteArray, - val vendorID: Int, - val fabricID: Long, - val nodeID: Long, + val vendorID: UInt, + val fabricID: ULong, + val nodeID: ULong, val label: String, - val fabricIndex: Int) { + val fabricIndex: UInt) { override fun toString(): String = buildString { append("SecondClusterFabricDescriptorStruct {\n") append("\trootPublicKey : $rootPublicKey\n") @@ -44,9 +44,9 @@ class SecondClusterFabricDescriptorStruct ( append("}\n") } - fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { tlvWriter.apply { - startStructure(tag) + startStructure(tlvTag) put(ContextSpecificTag(TAG_ROOT_PUBLIC_KEY), rootPublicKey) put(ContextSpecificTag(TAG_VENDOR_I_D), vendorID) put(ContextSpecificTag(TAG_FABRIC_I_D), fabricID) @@ -65,14 +65,14 @@ class SecondClusterFabricDescriptorStruct ( private const val TAG_LABEL = 5 private const val TAG_FABRIC_INDEX = 254 - fun fromTlv(tag: Tag, tlvReader: TlvReader) : SecondClusterFabricDescriptorStruct { - tlvReader.enterStructure(tag) + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader) : SecondClusterFabricDescriptorStruct { + tlvReader.enterStructure(tlvTag) val rootPublicKey = tlvReader.getByteArray(ContextSpecificTag(TAG_ROOT_PUBLIC_KEY)) - val vendorID = tlvReader.getInt(ContextSpecificTag(TAG_VENDOR_I_D)) - val fabricID = tlvReader.getLong(ContextSpecificTag(TAG_FABRIC_I_D)) - val nodeID = tlvReader.getLong(ContextSpecificTag(TAG_NODE_I_D)) + val vendorID = tlvReader.getUInt(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.getInt(ContextSpecificTag(TAG_FABRIC_INDEX)) + val fabricIndex = tlvReader.getUInt(ContextSpecificTag(TAG_FABRIC_INDEX)) tlvReader.exitContainer() diff --git a/scripts/py_matter_idl/matter_idl/tests/outputs/several_clusters/java/files.gni b/scripts/py_matter_idl/matter_idl/tests/outputs/several_clusters/java/files.gni new file mode 100644 index 00000000000000..b333d60d486cfe --- /dev/null +++ b/scripts/py_matter_idl/matter_idl/tests/outputs/several_clusters/java/files.gni @@ -0,0 +1,9 @@ +import("//build_overrides/build.gni") +import("//build_overrides/chip.gni") + +structs_sources = [ + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/SecondClusterFabricDescriptorStruct.kt", +] + +eventstructs_sources = [ +] \ No newline at end of file diff --git a/src/controller/java/BUILD.gn b/src/controller/java/BUILD.gn index 5afa13c7f092a0..42537a968ae0f0 100644 --- a/src/controller/java/BUILD.gn +++ b/src/controller/java/BUILD.gn @@ -314,7 +314,7 @@ kotlin_library("onboardingpayload_qr_code_test") { kotlin_library("chipcluster") { import( - "${chip_root}/src/controller/java/src/chip/devicecontroller/cluster/files.gni") + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/files.gni") output_name = "CHIPClusters.jar" diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/AccessControlClusterAccessControlEntryChangedEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/AccessControlClusterAccessControlEntryChangedEvent.kt index e926e70d861c20..0bd50dd6621eb5 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/AccessControlClusterAccessControlEntryChangedEvent.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/AccessControlClusterAccessControlEntryChangedEvent.kt @@ -23,12 +23,12 @@ import chip.tlv.TlvReader import chip.tlv.TlvWriter class AccessControlClusterAccessControlEntryChangedEvent( - val adminNodeID: Long?, - val adminPasscodeID: Int?, - val changeType: Int, + val adminNodeID: ULong?, + val adminPasscodeID: UInt?, + val changeType: UInt, val latestValue: chip.devicecontroller.cluster.structs.AccessControlClusterAccessControlEntryStruct?, - val fabricIndex: Int + val fabricIndex: UInt ) { override fun toString(): String = buildString { append("AccessControlClusterAccessControlEntryChangedEvent {\n") @@ -40,9 +40,9 @@ class AccessControlClusterAccessControlEntryChangedEvent( append("}\n") } - fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { tlvWriter.apply { - startStructure(tag) + startStructure(tlvTag) if (adminNodeID != null) { put(ContextSpecificTag(TAG_ADMIN_NODE_I_D), adminNodeID) } else { @@ -72,25 +72,25 @@ class AccessControlClusterAccessControlEntryChangedEvent( private const val TAG_FABRIC_INDEX = 254 fun fromTlv( - tag: Tag, + tlvTag: Tag, tlvReader: TlvReader ): AccessControlClusterAccessControlEntryChangedEvent { - tlvReader.enterStructure(tag) + tlvReader.enterStructure(tlvTag) val adminNodeID = if (!tlvReader.isNull()) { - tlvReader.getLong(ContextSpecificTag(TAG_ADMIN_NODE_I_D)) + tlvReader.getULong(ContextSpecificTag(TAG_ADMIN_NODE_I_D)) } else { tlvReader.getNull(ContextSpecificTag(TAG_ADMIN_NODE_I_D)) null } val adminPasscodeID = if (!tlvReader.isNull()) { - tlvReader.getInt(ContextSpecificTag(TAG_ADMIN_PASSCODE_I_D)) + tlvReader.getUInt(ContextSpecificTag(TAG_ADMIN_PASSCODE_I_D)) } else { tlvReader.getNull(ContextSpecificTag(TAG_ADMIN_PASSCODE_I_D)) null } - val changeType = tlvReader.getInt(ContextSpecificTag(TAG_CHANGE_TYPE)) + val changeType = tlvReader.getUInt(ContextSpecificTag(TAG_CHANGE_TYPE)) val latestValue = if (!tlvReader.isNull()) { chip.devicecontroller.cluster.structs.AccessControlClusterAccessControlEntryStruct @@ -99,7 +99,7 @@ class AccessControlClusterAccessControlEntryChangedEvent( tlvReader.getNull(ContextSpecificTag(TAG_LATEST_VALUE)) null } - val fabricIndex = tlvReader.getInt(ContextSpecificTag(TAG_FABRIC_INDEX)) + val fabricIndex = tlvReader.getUInt(ContextSpecificTag(TAG_FABRIC_INDEX)) tlvReader.exitContainer() diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/AccessControlClusterAccessControlExtensionChangedEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/AccessControlClusterAccessControlExtensionChangedEvent.kt index e01b81cec705bb..25df77d26fe2a6 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/AccessControlClusterAccessControlExtensionChangedEvent.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/AccessControlClusterAccessControlExtensionChangedEvent.kt @@ -23,12 +23,12 @@ import chip.tlv.TlvReader import chip.tlv.TlvWriter class AccessControlClusterAccessControlExtensionChangedEvent( - val adminNodeID: Long?, - val adminPasscodeID: Int?, - val changeType: Int, + val adminNodeID: ULong?, + val adminPasscodeID: UInt?, + val changeType: UInt, val latestValue: chip.devicecontroller.cluster.structs.AccessControlClusterAccessControlExtensionStruct?, - val fabricIndex: Int + val fabricIndex: UInt ) { override fun toString(): String = buildString { append("AccessControlClusterAccessControlExtensionChangedEvent {\n") @@ -40,9 +40,9 @@ class AccessControlClusterAccessControlExtensionChangedEvent( append("}\n") } - fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { tlvWriter.apply { - startStructure(tag) + startStructure(tlvTag) if (adminNodeID != null) { put(ContextSpecificTag(TAG_ADMIN_NODE_I_D), adminNodeID) } else { @@ -72,25 +72,25 @@ class AccessControlClusterAccessControlExtensionChangedEvent( private const val TAG_FABRIC_INDEX = 254 fun fromTlv( - tag: Tag, + tlvTag: Tag, tlvReader: TlvReader ): AccessControlClusterAccessControlExtensionChangedEvent { - tlvReader.enterStructure(tag) + tlvReader.enterStructure(tlvTag) val adminNodeID = if (!tlvReader.isNull()) { - tlvReader.getLong(ContextSpecificTag(TAG_ADMIN_NODE_I_D)) + tlvReader.getULong(ContextSpecificTag(TAG_ADMIN_NODE_I_D)) } else { tlvReader.getNull(ContextSpecificTag(TAG_ADMIN_NODE_I_D)) null } val adminPasscodeID = if (!tlvReader.isNull()) { - tlvReader.getInt(ContextSpecificTag(TAG_ADMIN_PASSCODE_I_D)) + tlvReader.getUInt(ContextSpecificTag(TAG_ADMIN_PASSCODE_I_D)) } else { tlvReader.getNull(ContextSpecificTag(TAG_ADMIN_PASSCODE_I_D)) null } - val changeType = tlvReader.getInt(ContextSpecificTag(TAG_CHANGE_TYPE)) + val changeType = tlvReader.getUInt(ContextSpecificTag(TAG_CHANGE_TYPE)) val latestValue = if (!tlvReader.isNull()) { chip.devicecontroller.cluster.structs.AccessControlClusterAccessControlExtensionStruct @@ -99,7 +99,7 @@ class AccessControlClusterAccessControlExtensionChangedEvent( tlvReader.getNull(ContextSpecificTag(TAG_LATEST_VALUE)) null } - val fabricIndex = tlvReader.getInt(ContextSpecificTag(TAG_FABRIC_INDEX)) + val fabricIndex = tlvReader.getUInt(ContextSpecificTag(TAG_FABRIC_INDEX)) tlvReader.exitContainer() diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/ActionsClusterActionFailedEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/ActionsClusterActionFailedEvent.kt index d2e375338f705d..b53c0695c1fdc9 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/ActionsClusterActionFailedEvent.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/ActionsClusterActionFailedEvent.kt @@ -23,10 +23,10 @@ import chip.tlv.TlvReader import chip.tlv.TlvWriter class ActionsClusterActionFailedEvent( - val actionID: Int, - val invokeID: Long, - val newState: Int, - val error: Int + val actionID: UInt, + val invokeID: ULong, + val newState: UInt, + val error: UInt ) { override fun toString(): String = buildString { append("ActionsClusterActionFailedEvent {\n") @@ -37,9 +37,9 @@ class ActionsClusterActionFailedEvent( append("}\n") } - fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { tlvWriter.apply { - startStructure(tag) + startStructure(tlvTag) put(ContextSpecificTag(TAG_ACTION_I_D), actionID) put(ContextSpecificTag(TAG_INVOKE_I_D), invokeID) put(ContextSpecificTag(TAG_NEW_STATE), newState) @@ -54,12 +54,12 @@ class ActionsClusterActionFailedEvent( private const val TAG_NEW_STATE = 2 private const val TAG_ERROR = 3 - fun fromTlv(tag: Tag, tlvReader: TlvReader): ActionsClusterActionFailedEvent { - tlvReader.enterStructure(tag) - val actionID = tlvReader.getInt(ContextSpecificTag(TAG_ACTION_I_D)) - val invokeID = tlvReader.getLong(ContextSpecificTag(TAG_INVOKE_I_D)) - val newState = tlvReader.getInt(ContextSpecificTag(TAG_NEW_STATE)) - val error = tlvReader.getInt(ContextSpecificTag(TAG_ERROR)) + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): ActionsClusterActionFailedEvent { + tlvReader.enterStructure(tlvTag) + val actionID = tlvReader.getUInt(ContextSpecificTag(TAG_ACTION_I_D)) + val invokeID = tlvReader.getULong(ContextSpecificTag(TAG_INVOKE_I_D)) + val newState = tlvReader.getUInt(ContextSpecificTag(TAG_NEW_STATE)) + val error = tlvReader.getUInt(ContextSpecificTag(TAG_ERROR)) tlvReader.exitContainer() diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/ActionsClusterStateChangedEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/ActionsClusterStateChangedEvent.kt index 05ad68aae272ea..88b00efa98afb1 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/ActionsClusterStateChangedEvent.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/ActionsClusterStateChangedEvent.kt @@ -22,7 +22,7 @@ import chip.tlv.Tag import chip.tlv.TlvReader import chip.tlv.TlvWriter -class ActionsClusterStateChangedEvent(val actionID: Int, val invokeID: Long, val newState: Int) { +class ActionsClusterStateChangedEvent(val actionID: UInt, val invokeID: ULong, val newState: UInt) { override fun toString(): String = buildString { append("ActionsClusterStateChangedEvent {\n") append("\tactionID : $actionID\n") @@ -31,9 +31,9 @@ class ActionsClusterStateChangedEvent(val actionID: Int, val invokeID: Long, val append("}\n") } - fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { tlvWriter.apply { - startStructure(tag) + startStructure(tlvTag) put(ContextSpecificTag(TAG_ACTION_I_D), actionID) put(ContextSpecificTag(TAG_INVOKE_I_D), invokeID) put(ContextSpecificTag(TAG_NEW_STATE), newState) @@ -46,11 +46,11 @@ class ActionsClusterStateChangedEvent(val actionID: Int, val invokeID: Long, val private const val TAG_INVOKE_I_D = 1 private const val TAG_NEW_STATE = 2 - fun fromTlv(tag: Tag, tlvReader: TlvReader): ActionsClusterStateChangedEvent { - tlvReader.enterStructure(tag) - val actionID = tlvReader.getInt(ContextSpecificTag(TAG_ACTION_I_D)) - val invokeID = tlvReader.getLong(ContextSpecificTag(TAG_INVOKE_I_D)) - val newState = tlvReader.getInt(ContextSpecificTag(TAG_NEW_STATE)) + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): ActionsClusterStateChangedEvent { + tlvReader.enterStructure(tlvTag) + val actionID = tlvReader.getUInt(ContextSpecificTag(TAG_ACTION_I_D)) + val invokeID = tlvReader.getULong(ContextSpecificTag(TAG_INVOKE_I_D)) + val newState = tlvReader.getUInt(ContextSpecificTag(TAG_NEW_STATE)) tlvReader.exitContainer() diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/BasicInformationClusterLeaveEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/BasicInformationClusterLeaveEvent.kt index 962ed26cddb40d..8205d49b66b962 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/BasicInformationClusterLeaveEvent.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/BasicInformationClusterLeaveEvent.kt @@ -22,16 +22,16 @@ import chip.tlv.Tag import chip.tlv.TlvReader import chip.tlv.TlvWriter -class BasicInformationClusterLeaveEvent(val fabricIndex: Int) { +class BasicInformationClusterLeaveEvent(val fabricIndex: UInt) { override fun toString(): String = buildString { append("BasicInformationClusterLeaveEvent {\n") append("\tfabricIndex : $fabricIndex\n") append("}\n") } - fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { tlvWriter.apply { - startStructure(tag) + startStructure(tlvTag) put(ContextSpecificTag(TAG_FABRIC_INDEX), fabricIndex) endStructure() } @@ -40,9 +40,9 @@ class BasicInformationClusterLeaveEvent(val fabricIndex: Int) { companion object { private const val TAG_FABRIC_INDEX = 0 - fun fromTlv(tag: Tag, tlvReader: TlvReader): BasicInformationClusterLeaveEvent { - tlvReader.enterStructure(tag) - val fabricIndex = tlvReader.getInt(ContextSpecificTag(TAG_FABRIC_INDEX)) + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): BasicInformationClusterLeaveEvent { + tlvReader.enterStructure(tlvTag) + val fabricIndex = tlvReader.getUInt(ContextSpecificTag(TAG_FABRIC_INDEX)) tlvReader.exitContainer() diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/BasicInformationClusterReachableChangedEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/BasicInformationClusterReachableChangedEvent.kt index c40211aa617dcc..831b10b53fc552 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/BasicInformationClusterReachableChangedEvent.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/BasicInformationClusterReachableChangedEvent.kt @@ -29,9 +29,9 @@ class BasicInformationClusterReachableChangedEvent(val reachableNewValue: Boolea append("}\n") } - fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { tlvWriter.apply { - startStructure(tag) + startStructure(tlvTag) put(ContextSpecificTag(TAG_REACHABLE_NEW_VALUE), reachableNewValue) endStructure() } @@ -40,8 +40,8 @@ class BasicInformationClusterReachableChangedEvent(val reachableNewValue: Boolea companion object { private const val TAG_REACHABLE_NEW_VALUE = 0 - fun fromTlv(tag: Tag, tlvReader: TlvReader): BasicInformationClusterReachableChangedEvent { - tlvReader.enterStructure(tag) + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): BasicInformationClusterReachableChangedEvent { + tlvReader.enterStructure(tlvTag) val reachableNewValue = tlvReader.getBoolean(ContextSpecificTag(TAG_REACHABLE_NEW_VALUE)) tlvReader.exitContainer() diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/BasicInformationClusterStartUpEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/BasicInformationClusterStartUpEvent.kt index 23082666b05cae..f9a26f3926b372 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/BasicInformationClusterStartUpEvent.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/BasicInformationClusterStartUpEvent.kt @@ -22,16 +22,16 @@ import chip.tlv.Tag import chip.tlv.TlvReader import chip.tlv.TlvWriter -class BasicInformationClusterStartUpEvent(val softwareVersion: Long) { +class BasicInformationClusterStartUpEvent(val softwareVersion: ULong) { override fun toString(): String = buildString { append("BasicInformationClusterStartUpEvent {\n") append("\tsoftwareVersion : $softwareVersion\n") append("}\n") } - fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { tlvWriter.apply { - startStructure(tag) + startStructure(tlvTag) put(ContextSpecificTag(TAG_SOFTWARE_VERSION), softwareVersion) endStructure() } @@ -40,9 +40,9 @@ class BasicInformationClusterStartUpEvent(val softwareVersion: Long) { companion object { private const val TAG_SOFTWARE_VERSION = 0 - fun fromTlv(tag: Tag, tlvReader: TlvReader): BasicInformationClusterStartUpEvent { - tlvReader.enterStructure(tag) - val softwareVersion = tlvReader.getLong(ContextSpecificTag(TAG_SOFTWARE_VERSION)) + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): BasicInformationClusterStartUpEvent { + tlvReader.enterStructure(tlvTag) + val softwareVersion = tlvReader.getULong(ContextSpecificTag(TAG_SOFTWARE_VERSION)) tlvReader.exitContainer() diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/BooleanStateClusterStateChangeEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/BooleanStateClusterStateChangeEvent.kt index a0ecfb76141580..e39fd94d4e7ee5 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/BooleanStateClusterStateChangeEvent.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/BooleanStateClusterStateChangeEvent.kt @@ -29,9 +29,9 @@ class BooleanStateClusterStateChangeEvent(val stateValue: Boolean) { append("}\n") } - fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { tlvWriter.apply { - startStructure(tag) + startStructure(tlvTag) put(ContextSpecificTag(TAG_STATE_VALUE), stateValue) endStructure() } @@ -40,8 +40,8 @@ class BooleanStateClusterStateChangeEvent(val stateValue: Boolean) { companion object { private const val TAG_STATE_VALUE = 0 - fun fromTlv(tag: Tag, tlvReader: TlvReader): BooleanStateClusterStateChangeEvent { - tlvReader.enterStructure(tag) + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): BooleanStateClusterStateChangeEvent { + tlvReader.enterStructure(tlvTag) val stateValue = tlvReader.getBoolean(ContextSpecificTag(TAG_STATE_VALUE)) tlvReader.exitContainer() diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/BridgedDeviceBasicInformationClusterReachableChangedEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/BridgedDeviceBasicInformationClusterReachableChangedEvent.kt index e75b2f7af96f93..b41e5dc45cfdcc 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/BridgedDeviceBasicInformationClusterReachableChangedEvent.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/BridgedDeviceBasicInformationClusterReachableChangedEvent.kt @@ -29,9 +29,9 @@ class BridgedDeviceBasicInformationClusterReachableChangedEvent(val reachableNew append("}\n") } - fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { tlvWriter.apply { - startStructure(tag) + startStructure(tlvTag) put(ContextSpecificTag(TAG_REACHABLE_NEW_VALUE), reachableNewValue) endStructure() } @@ -41,10 +41,10 @@ class BridgedDeviceBasicInformationClusterReachableChangedEvent(val reachableNew private const val TAG_REACHABLE_NEW_VALUE = 0 fun fromTlv( - tag: Tag, + tlvTag: Tag, tlvReader: TlvReader ): BridgedDeviceBasicInformationClusterReachableChangedEvent { - tlvReader.enterStructure(tag) + tlvReader.enterStructure(tlvTag) val reachableNewValue = tlvReader.getBoolean(ContextSpecificTag(TAG_REACHABLE_NEW_VALUE)) tlvReader.exitContainer() diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/BridgedDeviceBasicInformationClusterStartUpEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/BridgedDeviceBasicInformationClusterStartUpEvent.kt index 80c60be6847056..2d885e12e526a1 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/BridgedDeviceBasicInformationClusterStartUpEvent.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/BridgedDeviceBasicInformationClusterStartUpEvent.kt @@ -22,16 +22,16 @@ import chip.tlv.Tag import chip.tlv.TlvReader import chip.tlv.TlvWriter -class BridgedDeviceBasicInformationClusterStartUpEvent(val softwareVersion: Long) { +class BridgedDeviceBasicInformationClusterStartUpEvent(val softwareVersion: ULong) { override fun toString(): String = buildString { append("BridgedDeviceBasicInformationClusterStartUpEvent {\n") append("\tsoftwareVersion : $softwareVersion\n") append("}\n") } - fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { tlvWriter.apply { - startStructure(tag) + startStructure(tlvTag) put(ContextSpecificTag(TAG_SOFTWARE_VERSION), softwareVersion) endStructure() } @@ -40,9 +40,12 @@ class BridgedDeviceBasicInformationClusterStartUpEvent(val softwareVersion: Long companion object { private const val TAG_SOFTWARE_VERSION = 0 - fun fromTlv(tag: Tag, tlvReader: TlvReader): BridgedDeviceBasicInformationClusterStartUpEvent { - tlvReader.enterStructure(tag) - val softwareVersion = tlvReader.getLong(ContextSpecificTag(TAG_SOFTWARE_VERSION)) + fun fromTlv( + tlvTag: Tag, + tlvReader: TlvReader + ): BridgedDeviceBasicInformationClusterStartUpEvent { + tlvReader.enterStructure(tlvTag) + val softwareVersion = tlvReader.getULong(ContextSpecificTag(TAG_SOFTWARE_VERSION)) tlvReader.exitContainer() diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/DishwasherAlarmClusterNotifyEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/DishwasherAlarmClusterNotifyEvent.kt index 0b7206788e842a..54a228620a151f 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/DishwasherAlarmClusterNotifyEvent.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/DishwasherAlarmClusterNotifyEvent.kt @@ -23,10 +23,10 @@ import chip.tlv.TlvReader import chip.tlv.TlvWriter class DishwasherAlarmClusterNotifyEvent( - val active: Long, - val inactive: Long, - val state: Long, - val mask: Long + val active: ULong, + val inactive: ULong, + val state: ULong, + val mask: ULong ) { override fun toString(): String = buildString { append("DishwasherAlarmClusterNotifyEvent {\n") @@ -37,9 +37,9 @@ class DishwasherAlarmClusterNotifyEvent( append("}\n") } - fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { tlvWriter.apply { - startStructure(tag) + startStructure(tlvTag) put(ContextSpecificTag(TAG_ACTIVE), active) put(ContextSpecificTag(TAG_INACTIVE), inactive) put(ContextSpecificTag(TAG_STATE), state) @@ -54,12 +54,12 @@ class DishwasherAlarmClusterNotifyEvent( private const val TAG_STATE = 2 private const val TAG_MASK = 3 - fun fromTlv(tag: Tag, tlvReader: TlvReader): DishwasherAlarmClusterNotifyEvent { - tlvReader.enterStructure(tag) - val active = tlvReader.getLong(ContextSpecificTag(TAG_ACTIVE)) - val inactive = tlvReader.getLong(ContextSpecificTag(TAG_INACTIVE)) - val state = tlvReader.getLong(ContextSpecificTag(TAG_STATE)) - val mask = tlvReader.getLong(ContextSpecificTag(TAG_MASK)) + 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() diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/DoorLockClusterDoorLockAlarmEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/DoorLockClusterDoorLockAlarmEvent.kt index 6417fb85009e88..4b85d263e23807 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/DoorLockClusterDoorLockAlarmEvent.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/DoorLockClusterDoorLockAlarmEvent.kt @@ -22,16 +22,16 @@ import chip.tlv.Tag import chip.tlv.TlvReader import chip.tlv.TlvWriter -class DoorLockClusterDoorLockAlarmEvent(val alarmCode: Int) { +class DoorLockClusterDoorLockAlarmEvent(val alarmCode: UInt) { override fun toString(): String = buildString { append("DoorLockClusterDoorLockAlarmEvent {\n") append("\talarmCode : $alarmCode\n") append("}\n") } - fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { tlvWriter.apply { - startStructure(tag) + startStructure(tlvTag) put(ContextSpecificTag(TAG_ALARM_CODE), alarmCode) endStructure() } @@ -40,9 +40,9 @@ class DoorLockClusterDoorLockAlarmEvent(val alarmCode: Int) { companion object { private const val TAG_ALARM_CODE = 0 - fun fromTlv(tag: Tag, tlvReader: TlvReader): DoorLockClusterDoorLockAlarmEvent { - tlvReader.enterStructure(tag) - val alarmCode = tlvReader.getInt(ContextSpecificTag(TAG_ALARM_CODE)) + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): DoorLockClusterDoorLockAlarmEvent { + tlvReader.enterStructure(tlvTag) + val alarmCode = tlvReader.getUInt(ContextSpecificTag(TAG_ALARM_CODE)) tlvReader.exitContainer() diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/DoorLockClusterDoorStateChangeEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/DoorLockClusterDoorStateChangeEvent.kt index d0b6acbe7ea227..a76da923dce2a8 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/DoorLockClusterDoorStateChangeEvent.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/DoorLockClusterDoorStateChangeEvent.kt @@ -22,16 +22,16 @@ import chip.tlv.Tag import chip.tlv.TlvReader import chip.tlv.TlvWriter -class DoorLockClusterDoorStateChangeEvent(val doorState: Int) { +class DoorLockClusterDoorStateChangeEvent(val doorState: UInt) { override fun toString(): String = buildString { append("DoorLockClusterDoorStateChangeEvent {\n") append("\tdoorState : $doorState\n") append("}\n") } - fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { tlvWriter.apply { - startStructure(tag) + startStructure(tlvTag) put(ContextSpecificTag(TAG_DOOR_STATE), doorState) endStructure() } @@ -40,9 +40,9 @@ class DoorLockClusterDoorStateChangeEvent(val doorState: Int) { companion object { private const val TAG_DOOR_STATE = 0 - fun fromTlv(tag: Tag, tlvReader: TlvReader): DoorLockClusterDoorStateChangeEvent { - tlvReader.enterStructure(tag) - val doorState = tlvReader.getInt(ContextSpecificTag(TAG_DOOR_STATE)) + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): DoorLockClusterDoorStateChangeEvent { + tlvReader.enterStructure(tlvTag) + val doorState = tlvReader.getUInt(ContextSpecificTag(TAG_DOOR_STATE)) tlvReader.exitContainer() diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/DoorLockClusterLockOperationErrorEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/DoorLockClusterLockOperationErrorEvent.kt index 59e38fa054dd87..0ed53ef5426906 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/DoorLockClusterLockOperationErrorEvent.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/DoorLockClusterLockOperationErrorEvent.kt @@ -25,12 +25,12 @@ import chip.tlv.TlvWriter import java.util.Optional class DoorLockClusterLockOperationErrorEvent( - val lockOperationType: Int, - val operationSource: Int, - val operationError: Int, - val userIndex: Int?, - val fabricIndex: Int?, - val sourceNode: Long?, + val lockOperationType: UInt, + val operationSource: UInt, + val operationError: UInt, + val userIndex: UInt?, + val fabricIndex: UInt?, + val sourceNode: ULong?, val credentials: Optional>? ) { @@ -46,9 +46,9 @@ class DoorLockClusterLockOperationErrorEvent( append("}\n") } - fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { tlvWriter.apply { - startStructure(tag) + startStructure(tlvTag) put(ContextSpecificTag(TAG_LOCK_OPERATION_TYPE), lockOperationType) put(ContextSpecificTag(TAG_OPERATION_SOURCE), operationSource) put(ContextSpecificTag(TAG_OPERATION_ERROR), operationError) @@ -70,11 +70,11 @@ class DoorLockClusterLockOperationErrorEvent( if (credentials != null) { if (credentials.isPresent) { val optcredentials = credentials.get() - startList(ContextSpecificTag(TAG_CREDENTIALS)) + startArray(ContextSpecificTag(TAG_CREDENTIALS)) for (item in optcredentials.iterator()) { item.toTlv(AnonymousTag, this) } - endList() + endArray() } } else { putNull(ContextSpecificTag(TAG_CREDENTIALS)) @@ -92,28 +92,28 @@ class DoorLockClusterLockOperationErrorEvent( private const val TAG_SOURCE_NODE = 5 private const val TAG_CREDENTIALS = 6 - fun fromTlv(tag: Tag, tlvReader: TlvReader): DoorLockClusterLockOperationErrorEvent { - tlvReader.enterStructure(tag) - val lockOperationType = tlvReader.getInt(ContextSpecificTag(TAG_LOCK_OPERATION_TYPE)) - val operationSource = tlvReader.getInt(ContextSpecificTag(TAG_OPERATION_SOURCE)) - val operationError = tlvReader.getInt(ContextSpecificTag(TAG_OPERATION_ERROR)) + 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.getInt(ContextSpecificTag(TAG_USER_INDEX)) + tlvReader.getUInt(ContextSpecificTag(TAG_USER_INDEX)) } else { tlvReader.getNull(ContextSpecificTag(TAG_USER_INDEX)) null } val fabricIndex = if (!tlvReader.isNull()) { - tlvReader.getInt(ContextSpecificTag(TAG_FABRIC_INDEX)) + tlvReader.getUInt(ContextSpecificTag(TAG_FABRIC_INDEX)) } else { tlvReader.getNull(ContextSpecificTag(TAG_FABRIC_INDEX)) null } val sourceNode = if (!tlvReader.isNull()) { - tlvReader.getLong(ContextSpecificTag(TAG_SOURCE_NODE)) + tlvReader.getULong(ContextSpecificTag(TAG_SOURCE_NODE)) } else { tlvReader.getNull(ContextSpecificTag(TAG_SOURCE_NODE)) null @@ -123,7 +123,7 @@ class DoorLockClusterLockOperationErrorEvent( if (tlvReader.isNextTag(ContextSpecificTag(TAG_CREDENTIALS))) { Optional.of( buildList { - tlvReader.enterList(ContextSpecificTag(TAG_CREDENTIALS)) + tlvReader.enterArray(ContextSpecificTag(TAG_CREDENTIALS)) while (!tlvReader.isEndOfContainer()) { this.add( chip.devicecontroller.cluster.structs.DoorLockClusterCredentialStruct.fromTlv( diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/DoorLockClusterLockOperationEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/DoorLockClusterLockOperationEvent.kt index 4fbf71082c7adc..338201ef0a1633 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/DoorLockClusterLockOperationEvent.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/DoorLockClusterLockOperationEvent.kt @@ -25,11 +25,11 @@ import chip.tlv.TlvWriter import java.util.Optional class DoorLockClusterLockOperationEvent( - val lockOperationType: Int, - val operationSource: Int, - val userIndex: Int?, - val fabricIndex: Int?, - val sourceNode: Long?, + val lockOperationType: UInt, + val operationSource: UInt, + val userIndex: UInt?, + val fabricIndex: UInt?, + val sourceNode: ULong?, val credentials: Optional>? ) { @@ -44,9 +44,9 @@ class DoorLockClusterLockOperationEvent( append("}\n") } - fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { tlvWriter.apply { - startStructure(tag) + startStructure(tlvTag) put(ContextSpecificTag(TAG_LOCK_OPERATION_TYPE), lockOperationType) put(ContextSpecificTag(TAG_OPERATION_SOURCE), operationSource) if (userIndex != null) { @@ -67,11 +67,11 @@ class DoorLockClusterLockOperationEvent( if (credentials != null) { if (credentials.isPresent) { val optcredentials = credentials.get() - startList(ContextSpecificTag(TAG_CREDENTIALS)) + startArray(ContextSpecificTag(TAG_CREDENTIALS)) for (item in optcredentials.iterator()) { item.toTlv(AnonymousTag, this) } - endList() + endArray() } } else { putNull(ContextSpecificTag(TAG_CREDENTIALS)) @@ -88,27 +88,27 @@ class DoorLockClusterLockOperationEvent( private const val TAG_SOURCE_NODE = 4 private const val TAG_CREDENTIALS = 5 - fun fromTlv(tag: Tag, tlvReader: TlvReader): DoorLockClusterLockOperationEvent { - tlvReader.enterStructure(tag) - val lockOperationType = tlvReader.getInt(ContextSpecificTag(TAG_LOCK_OPERATION_TYPE)) - val operationSource = tlvReader.getInt(ContextSpecificTag(TAG_OPERATION_SOURCE)) + 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.getInt(ContextSpecificTag(TAG_USER_INDEX)) + tlvReader.getUInt(ContextSpecificTag(TAG_USER_INDEX)) } else { tlvReader.getNull(ContextSpecificTag(TAG_USER_INDEX)) null } val fabricIndex = if (!tlvReader.isNull()) { - tlvReader.getInt(ContextSpecificTag(TAG_FABRIC_INDEX)) + tlvReader.getUInt(ContextSpecificTag(TAG_FABRIC_INDEX)) } else { tlvReader.getNull(ContextSpecificTag(TAG_FABRIC_INDEX)) null } val sourceNode = if (!tlvReader.isNull()) { - tlvReader.getLong(ContextSpecificTag(TAG_SOURCE_NODE)) + tlvReader.getULong(ContextSpecificTag(TAG_SOURCE_NODE)) } else { tlvReader.getNull(ContextSpecificTag(TAG_SOURCE_NODE)) null @@ -118,7 +118,7 @@ class DoorLockClusterLockOperationEvent( if (tlvReader.isNextTag(ContextSpecificTag(TAG_CREDENTIALS))) { Optional.of( buildList { - tlvReader.enterList(ContextSpecificTag(TAG_CREDENTIALS)) + tlvReader.enterArray(ContextSpecificTag(TAG_CREDENTIALS)) while (!tlvReader.isEndOfContainer()) { this.add( chip.devicecontroller.cluster.structs.DoorLockClusterCredentialStruct.fromTlv( diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/DoorLockClusterLockUserChangeEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/DoorLockClusterLockUserChangeEvent.kt index 6fc562b39959ff..8308f267b5933a 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/DoorLockClusterLockUserChangeEvent.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/DoorLockClusterLockUserChangeEvent.kt @@ -23,13 +23,13 @@ import chip.tlv.TlvReader import chip.tlv.TlvWriter class DoorLockClusterLockUserChangeEvent( - val lockDataType: Int, - val dataOperationType: Int, - val operationSource: Int, - val userIndex: Int?, - val fabricIndex: Int?, - val sourceNode: Long?, - val dataIndex: Int? + val lockDataType: UInt, + val dataOperationType: UInt, + val operationSource: UInt, + val userIndex: UInt?, + val fabricIndex: UInt?, + val sourceNode: ULong?, + val dataIndex: UInt? ) { override fun toString(): String = buildString { append("DoorLockClusterLockUserChangeEvent {\n") @@ -43,9 +43,9 @@ class DoorLockClusterLockUserChangeEvent( append("}\n") } - fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { tlvWriter.apply { - startStructure(tag) + startStructure(tlvTag) put(ContextSpecificTag(TAG_LOCK_DATA_TYPE), lockDataType) put(ContextSpecificTag(TAG_DATA_OPERATION_TYPE), dataOperationType) put(ContextSpecificTag(TAG_OPERATION_SOURCE), operationSource) @@ -82,35 +82,35 @@ class DoorLockClusterLockUserChangeEvent( private const val TAG_SOURCE_NODE = 5 private const val TAG_DATA_INDEX = 6 - fun fromTlv(tag: Tag, tlvReader: TlvReader): DoorLockClusterLockUserChangeEvent { - tlvReader.enterStructure(tag) - val lockDataType = tlvReader.getInt(ContextSpecificTag(TAG_LOCK_DATA_TYPE)) - val dataOperationType = tlvReader.getInt(ContextSpecificTag(TAG_DATA_OPERATION_TYPE)) - val operationSource = tlvReader.getInt(ContextSpecificTag(TAG_OPERATION_SOURCE)) + 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.getInt(ContextSpecificTag(TAG_USER_INDEX)) + tlvReader.getUInt(ContextSpecificTag(TAG_USER_INDEX)) } else { tlvReader.getNull(ContextSpecificTag(TAG_USER_INDEX)) null } val fabricIndex = if (!tlvReader.isNull()) { - tlvReader.getInt(ContextSpecificTag(TAG_FABRIC_INDEX)) + tlvReader.getUInt(ContextSpecificTag(TAG_FABRIC_INDEX)) } else { tlvReader.getNull(ContextSpecificTag(TAG_FABRIC_INDEX)) null } val sourceNode = if (!tlvReader.isNull()) { - tlvReader.getLong(ContextSpecificTag(TAG_SOURCE_NODE)) + tlvReader.getULong(ContextSpecificTag(TAG_SOURCE_NODE)) } else { tlvReader.getNull(ContextSpecificTag(TAG_SOURCE_NODE)) null } val dataIndex = if (!tlvReader.isNull()) { - tlvReader.getInt(ContextSpecificTag(TAG_DATA_INDEX)) + tlvReader.getUInt(ContextSpecificTag(TAG_DATA_INDEX)) } else { tlvReader.getNull(ContextSpecificTag(TAG_DATA_INDEX)) null diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/GeneralDiagnosticsClusterBootReasonEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/GeneralDiagnosticsClusterBootReasonEvent.kt index 3d743983f1a00f..4c465958211d43 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/GeneralDiagnosticsClusterBootReasonEvent.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/GeneralDiagnosticsClusterBootReasonEvent.kt @@ -22,16 +22,16 @@ import chip.tlv.Tag import chip.tlv.TlvReader import chip.tlv.TlvWriter -class GeneralDiagnosticsClusterBootReasonEvent(val bootReason: Int) { +class GeneralDiagnosticsClusterBootReasonEvent(val bootReason: UInt) { override fun toString(): String = buildString { append("GeneralDiagnosticsClusterBootReasonEvent {\n") append("\tbootReason : $bootReason\n") append("}\n") } - fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { tlvWriter.apply { - startStructure(tag) + startStructure(tlvTag) put(ContextSpecificTag(TAG_BOOT_REASON), bootReason) endStructure() } @@ -40,9 +40,9 @@ class GeneralDiagnosticsClusterBootReasonEvent(val bootReason: Int) { companion object { private const val TAG_BOOT_REASON = 0 - fun fromTlv(tag: Tag, tlvReader: TlvReader): GeneralDiagnosticsClusterBootReasonEvent { - tlvReader.enterStructure(tag) - val bootReason = tlvReader.getInt(ContextSpecificTag(TAG_BOOT_REASON)) + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): GeneralDiagnosticsClusterBootReasonEvent { + tlvReader.enterStructure(tlvTag) + val bootReason = tlvReader.getUInt(ContextSpecificTag(TAG_BOOT_REASON)) tlvReader.exitContainer() diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/GeneralDiagnosticsClusterHardwareFaultChangeEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/GeneralDiagnosticsClusterHardwareFaultChangeEvent.kt index 1287eba322b742..fc0b76ef132018 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/GeneralDiagnosticsClusterHardwareFaultChangeEvent.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/GeneralDiagnosticsClusterHardwareFaultChangeEvent.kt @@ -24,8 +24,8 @@ import chip.tlv.TlvReader import chip.tlv.TlvWriter class GeneralDiagnosticsClusterHardwareFaultChangeEvent( - val current: List, - val previous: List + val current: List, + val previous: List ) { override fun toString(): String = buildString { append("GeneralDiagnosticsClusterHardwareFaultChangeEvent {\n") @@ -34,19 +34,19 @@ class GeneralDiagnosticsClusterHardwareFaultChangeEvent( append("}\n") } - fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { tlvWriter.apply { - startStructure(tag) - startList(ContextSpecificTag(TAG_CURRENT)) + startStructure(tlvTag) + startArray(ContextSpecificTag(TAG_CURRENT)) for (item in current.iterator()) { put(AnonymousTag, item) } - endList() - startList(ContextSpecificTag(TAG_PREVIOUS)) + endArray() + startArray(ContextSpecificTag(TAG_PREVIOUS)) for (item in previous.iterator()) { put(AnonymousTag, item) } - endList() + endArray() endStructure() } } @@ -55,21 +55,24 @@ class GeneralDiagnosticsClusterHardwareFaultChangeEvent( private const val TAG_CURRENT = 0 private const val TAG_PREVIOUS = 1 - fun fromTlv(tag: Tag, tlvReader: TlvReader): GeneralDiagnosticsClusterHardwareFaultChangeEvent { - tlvReader.enterStructure(tag) + fun fromTlv( + tlvTag: Tag, + tlvReader: TlvReader + ): GeneralDiagnosticsClusterHardwareFaultChangeEvent { + tlvReader.enterStructure(tlvTag) val current = - buildList { - tlvReader.enterList(ContextSpecificTag(TAG_CURRENT)) + buildList { + tlvReader.enterArray(ContextSpecificTag(TAG_CURRENT)) while (!tlvReader.isEndOfContainer()) { - this.add(tlvReader.getInt(AnonymousTag)) + this.add(tlvReader.getUInt(AnonymousTag)) } tlvReader.exitContainer() } val previous = - buildList { - tlvReader.enterList(ContextSpecificTag(TAG_PREVIOUS)) + buildList { + tlvReader.enterArray(ContextSpecificTag(TAG_PREVIOUS)) while (!tlvReader.isEndOfContainer()) { - this.add(tlvReader.getInt(AnonymousTag)) + this.add(tlvReader.getUInt(AnonymousTag)) } tlvReader.exitContainer() } diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/GeneralDiagnosticsClusterNetworkFaultChangeEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/GeneralDiagnosticsClusterNetworkFaultChangeEvent.kt index f9fc3cadc8b934..833c4c913ed254 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/GeneralDiagnosticsClusterNetworkFaultChangeEvent.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/GeneralDiagnosticsClusterNetworkFaultChangeEvent.kt @@ -24,8 +24,8 @@ import chip.tlv.TlvReader import chip.tlv.TlvWriter class GeneralDiagnosticsClusterNetworkFaultChangeEvent( - val current: List, - val previous: List + val current: List, + val previous: List ) { override fun toString(): String = buildString { append("GeneralDiagnosticsClusterNetworkFaultChangeEvent {\n") @@ -34,19 +34,19 @@ class GeneralDiagnosticsClusterNetworkFaultChangeEvent( append("}\n") } - fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { tlvWriter.apply { - startStructure(tag) - startList(ContextSpecificTag(TAG_CURRENT)) + startStructure(tlvTag) + startArray(ContextSpecificTag(TAG_CURRENT)) for (item in current.iterator()) { put(AnonymousTag, item) } - endList() - startList(ContextSpecificTag(TAG_PREVIOUS)) + endArray() + startArray(ContextSpecificTag(TAG_PREVIOUS)) for (item in previous.iterator()) { put(AnonymousTag, item) } - endList() + endArray() endStructure() } } @@ -55,21 +55,24 @@ class GeneralDiagnosticsClusterNetworkFaultChangeEvent( private const val TAG_CURRENT = 0 private const val TAG_PREVIOUS = 1 - fun fromTlv(tag: Tag, tlvReader: TlvReader): GeneralDiagnosticsClusterNetworkFaultChangeEvent { - tlvReader.enterStructure(tag) + fun fromTlv( + tlvTag: Tag, + tlvReader: TlvReader + ): GeneralDiagnosticsClusterNetworkFaultChangeEvent { + tlvReader.enterStructure(tlvTag) val current = - buildList { - tlvReader.enterList(ContextSpecificTag(TAG_CURRENT)) + buildList { + tlvReader.enterArray(ContextSpecificTag(TAG_CURRENT)) while (!tlvReader.isEndOfContainer()) { - this.add(tlvReader.getInt(AnonymousTag)) + this.add(tlvReader.getUInt(AnonymousTag)) } tlvReader.exitContainer() } val previous = - buildList { - tlvReader.enterList(ContextSpecificTag(TAG_PREVIOUS)) + buildList { + tlvReader.enterArray(ContextSpecificTag(TAG_PREVIOUS)) while (!tlvReader.isEndOfContainer()) { - this.add(tlvReader.getInt(AnonymousTag)) + this.add(tlvReader.getUInt(AnonymousTag)) } tlvReader.exitContainer() } diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/GeneralDiagnosticsClusterRadioFaultChangeEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/GeneralDiagnosticsClusterRadioFaultChangeEvent.kt index 35daf8dd691bf5..84f3f9de9871ed 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/GeneralDiagnosticsClusterRadioFaultChangeEvent.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/GeneralDiagnosticsClusterRadioFaultChangeEvent.kt @@ -24,8 +24,8 @@ import chip.tlv.TlvReader import chip.tlv.TlvWriter class GeneralDiagnosticsClusterRadioFaultChangeEvent( - val current: List, - val previous: List + val current: List, + val previous: List ) { override fun toString(): String = buildString { append("GeneralDiagnosticsClusterRadioFaultChangeEvent {\n") @@ -34,19 +34,19 @@ class GeneralDiagnosticsClusterRadioFaultChangeEvent( append("}\n") } - fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { tlvWriter.apply { - startStructure(tag) - startList(ContextSpecificTag(TAG_CURRENT)) + startStructure(tlvTag) + startArray(ContextSpecificTag(TAG_CURRENT)) for (item in current.iterator()) { put(AnonymousTag, item) } - endList() - startList(ContextSpecificTag(TAG_PREVIOUS)) + endArray() + startArray(ContextSpecificTag(TAG_PREVIOUS)) for (item in previous.iterator()) { put(AnonymousTag, item) } - endList() + endArray() endStructure() } } @@ -55,21 +55,21 @@ class GeneralDiagnosticsClusterRadioFaultChangeEvent( private const val TAG_CURRENT = 0 private const val TAG_PREVIOUS = 1 - fun fromTlv(tag: Tag, tlvReader: TlvReader): GeneralDiagnosticsClusterRadioFaultChangeEvent { - tlvReader.enterStructure(tag) + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): GeneralDiagnosticsClusterRadioFaultChangeEvent { + tlvReader.enterStructure(tlvTag) val current = - buildList { - tlvReader.enterList(ContextSpecificTag(TAG_CURRENT)) + buildList { + tlvReader.enterArray(ContextSpecificTag(TAG_CURRENT)) while (!tlvReader.isEndOfContainer()) { - this.add(tlvReader.getInt(AnonymousTag)) + this.add(tlvReader.getUInt(AnonymousTag)) } tlvReader.exitContainer() } val previous = - buildList { - tlvReader.enterList(ContextSpecificTag(TAG_PREVIOUS)) + buildList { + tlvReader.enterArray(ContextSpecificTag(TAG_PREVIOUS)) while (!tlvReader.isEndOfContainer()) { - this.add(tlvReader.getInt(AnonymousTag)) + this.add(tlvReader.getUInt(AnonymousTag)) } tlvReader.exitContainer() } diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/OperationalStateClusterOperationCompletionEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/OperationalStateClusterOperationCompletionEvent.kt index 092e062784a118..964febc8880806 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/OperationalStateClusterOperationCompletionEvent.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/OperationalStateClusterOperationCompletionEvent.kt @@ -24,9 +24,9 @@ import chip.tlv.TlvWriter import java.util.Optional class OperationalStateClusterOperationCompletionEvent( - val completionErrorCode: Int, - val totalOperationalTime: Optional?, - val pausedTime: Optional? + val completionErrorCode: UInt, + val totalOperationalTime: Optional?, + val pausedTime: Optional? ) { override fun toString(): String = buildString { append("OperationalStateClusterOperationCompletionEvent {\n") @@ -36,9 +36,9 @@ class OperationalStateClusterOperationCompletionEvent( append("}\n") } - fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { tlvWriter.apply { - startStructure(tag) + startStructure(tlvTag) put(ContextSpecificTag(TAG_COMPLETION_ERROR_CODE), completionErrorCode) if (totalOperationalTime != null) { if (totalOperationalTime.isPresent) { @@ -65,13 +65,16 @@ class OperationalStateClusterOperationCompletionEvent( private const val TAG_TOTAL_OPERATIONAL_TIME = 1 private const val TAG_PAUSED_TIME = 2 - fun fromTlv(tag: Tag, tlvReader: TlvReader): OperationalStateClusterOperationCompletionEvent { - tlvReader.enterStructure(tag) - val completionErrorCode = tlvReader.getInt(ContextSpecificTag(TAG_COMPLETION_ERROR_CODE)) + 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.getLong(ContextSpecificTag(TAG_TOTAL_OPERATIONAL_TIME))) + Optional.of(tlvReader.getULong(ContextSpecificTag(TAG_TOTAL_OPERATIONAL_TIME))) } else { Optional.empty() } @@ -82,7 +85,7 @@ class OperationalStateClusterOperationCompletionEvent( val pausedTime = if (!tlvReader.isNull()) { if (tlvReader.isNextTag(ContextSpecificTag(TAG_PAUSED_TIME))) { - Optional.of(tlvReader.getLong(ContextSpecificTag(TAG_PAUSED_TIME))) + Optional.of(tlvReader.getULong(ContextSpecificTag(TAG_PAUSED_TIME))) } else { Optional.empty() } diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/OperationalStateClusterOperationalErrorEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/OperationalStateClusterOperationalErrorEvent.kt index b5623a0d701579..2e59748ac177bc 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/OperationalStateClusterOperationalErrorEvent.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/OperationalStateClusterOperationalErrorEvent.kt @@ -31,9 +31,9 @@ class OperationalStateClusterOperationalErrorEvent( append("}\n") } - fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { tlvWriter.apply { - startStructure(tag) + startStructure(tlvTag) errorState.toTlv(ContextSpecificTag(TAG_ERROR_STATE), this) endStructure() } @@ -42,8 +42,8 @@ class OperationalStateClusterOperationalErrorEvent( companion object { private const val TAG_ERROR_STATE = 0 - fun fromTlv(tag: Tag, tlvReader: TlvReader): OperationalStateClusterOperationalErrorEvent { - tlvReader.enterStructure(tag) + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): OperationalStateClusterOperationalErrorEvent { + tlvReader.enterStructure(tlvTag) val errorState = chip.devicecontroller.cluster.structs.OperationalStateClusterErrorStateStruct.fromTlv( ContextSpecificTag(TAG_ERROR_STATE), diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/OtaSoftwareUpdateRequestorClusterDownloadErrorEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/OtaSoftwareUpdateRequestorClusterDownloadErrorEvent.kt index 8a82cbf93c9f1f..b06cb961d04a0d 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/OtaSoftwareUpdateRequestorClusterDownloadErrorEvent.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/OtaSoftwareUpdateRequestorClusterDownloadErrorEvent.kt @@ -23,9 +23,9 @@ import chip.tlv.TlvReader import chip.tlv.TlvWriter class OtaSoftwareUpdateRequestorClusterDownloadErrorEvent( - val softwareVersion: Long, - val bytesDownloaded: Long, - val progressPercent: Int?, + val softwareVersion: ULong, + val bytesDownloaded: ULong, + val progressPercent: UInt?, val platformCode: Long? ) { override fun toString(): String = buildString { @@ -37,9 +37,9 @@ class OtaSoftwareUpdateRequestorClusterDownloadErrorEvent( append("}\n") } - fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { tlvWriter.apply { - startStructure(tag) + startStructure(tlvTag) put(ContextSpecificTag(TAG_SOFTWARE_VERSION), softwareVersion) put(ContextSpecificTag(TAG_BYTES_DOWNLOADED), bytesDownloaded) if (progressPercent != null) { @@ -63,15 +63,15 @@ class OtaSoftwareUpdateRequestorClusterDownloadErrorEvent( private const val TAG_PLATFORM_CODE = 3 fun fromTlv( - tag: Tag, + tlvTag: Tag, tlvReader: TlvReader ): OtaSoftwareUpdateRequestorClusterDownloadErrorEvent { - tlvReader.enterStructure(tag) - val softwareVersion = tlvReader.getLong(ContextSpecificTag(TAG_SOFTWARE_VERSION)) - val bytesDownloaded = tlvReader.getLong(ContextSpecificTag(TAG_BYTES_DOWNLOADED)) + tlvReader.enterStructure(tlvTag) + val softwareVersion = tlvReader.getULong(ContextSpecificTag(TAG_SOFTWARE_VERSION)) + val bytesDownloaded = tlvReader.getULong(ContextSpecificTag(TAG_BYTES_DOWNLOADED)) val progressPercent = if (!tlvReader.isNull()) { - tlvReader.getInt(ContextSpecificTag(TAG_PROGRESS_PERCENT)) + tlvReader.getUInt(ContextSpecificTag(TAG_PROGRESS_PERCENT)) } else { tlvReader.getNull(ContextSpecificTag(TAG_PROGRESS_PERCENT)) null diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/OtaSoftwareUpdateRequestorClusterStateTransitionEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/OtaSoftwareUpdateRequestorClusterStateTransitionEvent.kt index b0b075689fc3be..fff2c21bcd7384 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/OtaSoftwareUpdateRequestorClusterStateTransitionEvent.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/OtaSoftwareUpdateRequestorClusterStateTransitionEvent.kt @@ -23,10 +23,10 @@ import chip.tlv.TlvReader import chip.tlv.TlvWriter class OtaSoftwareUpdateRequestorClusterStateTransitionEvent( - val previousState: Int, - val newState: Int, - val reason: Int, - val targetSoftwareVersion: Long? + val previousState: UInt, + val newState: UInt, + val reason: UInt, + val targetSoftwareVersion: ULong? ) { override fun toString(): String = buildString { append("OtaSoftwareUpdateRequestorClusterStateTransitionEvent {\n") @@ -37,9 +37,9 @@ class OtaSoftwareUpdateRequestorClusterStateTransitionEvent( append("}\n") } - fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { tlvWriter.apply { - startStructure(tag) + startStructure(tlvTag) put(ContextSpecificTag(TAG_PREVIOUS_STATE), previousState) put(ContextSpecificTag(TAG_NEW_STATE), newState) put(ContextSpecificTag(TAG_REASON), reason) @@ -59,16 +59,16 @@ class OtaSoftwareUpdateRequestorClusterStateTransitionEvent( private const val TAG_TARGET_SOFTWARE_VERSION = 3 fun fromTlv( - tag: Tag, + tlvTag: Tag, tlvReader: TlvReader ): OtaSoftwareUpdateRequestorClusterStateTransitionEvent { - tlvReader.enterStructure(tag) - val previousState = tlvReader.getInt(ContextSpecificTag(TAG_PREVIOUS_STATE)) - val newState = tlvReader.getInt(ContextSpecificTag(TAG_NEW_STATE)) - val reason = tlvReader.getInt(ContextSpecificTag(TAG_REASON)) + 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.getLong(ContextSpecificTag(TAG_TARGET_SOFTWARE_VERSION)) + tlvReader.getULong(ContextSpecificTag(TAG_TARGET_SOFTWARE_VERSION)) } else { tlvReader.getNull(ContextSpecificTag(TAG_TARGET_SOFTWARE_VERSION)) null diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/OtaSoftwareUpdateRequestorClusterVersionAppliedEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/OtaSoftwareUpdateRequestorClusterVersionAppliedEvent.kt index ff1034ace97e31..c4f72f4eee07f4 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/OtaSoftwareUpdateRequestorClusterVersionAppliedEvent.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/OtaSoftwareUpdateRequestorClusterVersionAppliedEvent.kt @@ -23,8 +23,8 @@ import chip.tlv.TlvReader import chip.tlv.TlvWriter class OtaSoftwareUpdateRequestorClusterVersionAppliedEvent( - val softwareVersion: Long, - val productID: Int + val softwareVersion: ULong, + val productID: UInt ) { override fun toString(): String = buildString { append("OtaSoftwareUpdateRequestorClusterVersionAppliedEvent {\n") @@ -33,9 +33,9 @@ class OtaSoftwareUpdateRequestorClusterVersionAppliedEvent( append("}\n") } - fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { tlvWriter.apply { - startStructure(tag) + startStructure(tlvTag) put(ContextSpecificTag(TAG_SOFTWARE_VERSION), softwareVersion) put(ContextSpecificTag(TAG_PRODUCT_I_D), productID) endStructure() @@ -47,12 +47,12 @@ class OtaSoftwareUpdateRequestorClusterVersionAppliedEvent( private const val TAG_PRODUCT_I_D = 1 fun fromTlv( - tag: Tag, + tlvTag: Tag, tlvReader: TlvReader ): OtaSoftwareUpdateRequestorClusterVersionAppliedEvent { - tlvReader.enterStructure(tag) - val softwareVersion = tlvReader.getLong(ContextSpecificTag(TAG_SOFTWARE_VERSION)) - val productID = tlvReader.getInt(ContextSpecificTag(TAG_PRODUCT_I_D)) + tlvReader.enterStructure(tlvTag) + val softwareVersion = tlvReader.getULong(ContextSpecificTag(TAG_SOFTWARE_VERSION)) + val productID = tlvReader.getUInt(ContextSpecificTag(TAG_PRODUCT_I_D)) tlvReader.exitContainer() diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/PowerSourceClusterBatChargeFaultChangeEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/PowerSourceClusterBatChargeFaultChangeEvent.kt index c3eb0d1e658b56..861736ae115cb5 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/PowerSourceClusterBatChargeFaultChangeEvent.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/PowerSourceClusterBatChargeFaultChangeEvent.kt @@ -23,7 +23,10 @@ import chip.tlv.Tag import chip.tlv.TlvReader import chip.tlv.TlvWriter -class PowerSourceClusterBatChargeFaultChangeEvent(val current: List, val previous: List) { +class PowerSourceClusterBatChargeFaultChangeEvent( + val current: List, + val previous: List +) { override fun toString(): String = buildString { append("PowerSourceClusterBatChargeFaultChangeEvent {\n") append("\tcurrent : $current\n") @@ -31,19 +34,19 @@ class PowerSourceClusterBatChargeFaultChangeEvent(val current: List, val pr append("}\n") } - fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { tlvWriter.apply { - startStructure(tag) - startList(ContextSpecificTag(TAG_CURRENT)) + startStructure(tlvTag) + startArray(ContextSpecificTag(TAG_CURRENT)) for (item in current.iterator()) { put(AnonymousTag, item) } - endList() - startList(ContextSpecificTag(TAG_PREVIOUS)) + endArray() + startArray(ContextSpecificTag(TAG_PREVIOUS)) for (item in previous.iterator()) { put(AnonymousTag, item) } - endList() + endArray() endStructure() } } @@ -52,21 +55,21 @@ class PowerSourceClusterBatChargeFaultChangeEvent(val current: List, val pr private const val TAG_CURRENT = 0 private const val TAG_PREVIOUS = 1 - fun fromTlv(tag: Tag, tlvReader: TlvReader): PowerSourceClusterBatChargeFaultChangeEvent { - tlvReader.enterStructure(tag) + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): PowerSourceClusterBatChargeFaultChangeEvent { + tlvReader.enterStructure(tlvTag) val current = - buildList { - tlvReader.enterList(ContextSpecificTag(TAG_CURRENT)) + buildList { + tlvReader.enterArray(ContextSpecificTag(TAG_CURRENT)) while (!tlvReader.isEndOfContainer()) { - this.add(tlvReader.getInt(AnonymousTag)) + this.add(tlvReader.getUInt(AnonymousTag)) } tlvReader.exitContainer() } val previous = - buildList { - tlvReader.enterList(ContextSpecificTag(TAG_PREVIOUS)) + buildList { + tlvReader.enterArray(ContextSpecificTag(TAG_PREVIOUS)) while (!tlvReader.isEndOfContainer()) { - this.add(tlvReader.getInt(AnonymousTag)) + this.add(tlvReader.getUInt(AnonymousTag)) } tlvReader.exitContainer() } diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/PowerSourceClusterBatFaultChangeEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/PowerSourceClusterBatFaultChangeEvent.kt index c010184156ecb3..30711612c0d1d8 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/PowerSourceClusterBatFaultChangeEvent.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/PowerSourceClusterBatFaultChangeEvent.kt @@ -23,7 +23,7 @@ import chip.tlv.Tag import chip.tlv.TlvReader import chip.tlv.TlvWriter -class PowerSourceClusterBatFaultChangeEvent(val current: List, val previous: List) { +class PowerSourceClusterBatFaultChangeEvent(val current: List, val previous: List) { override fun toString(): String = buildString { append("PowerSourceClusterBatFaultChangeEvent {\n") append("\tcurrent : $current\n") @@ -31,19 +31,19 @@ class PowerSourceClusterBatFaultChangeEvent(val current: List, val previous append("}\n") } - fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { tlvWriter.apply { - startStructure(tag) - startList(ContextSpecificTag(TAG_CURRENT)) + startStructure(tlvTag) + startArray(ContextSpecificTag(TAG_CURRENT)) for (item in current.iterator()) { put(AnonymousTag, item) } - endList() - startList(ContextSpecificTag(TAG_PREVIOUS)) + endArray() + startArray(ContextSpecificTag(TAG_PREVIOUS)) for (item in previous.iterator()) { put(AnonymousTag, item) } - endList() + endArray() endStructure() } } @@ -52,21 +52,21 @@ class PowerSourceClusterBatFaultChangeEvent(val current: List, val previous private const val TAG_CURRENT = 0 private const val TAG_PREVIOUS = 1 - fun fromTlv(tag: Tag, tlvReader: TlvReader): PowerSourceClusterBatFaultChangeEvent { - tlvReader.enterStructure(tag) + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): PowerSourceClusterBatFaultChangeEvent { + tlvReader.enterStructure(tlvTag) val current = - buildList { - tlvReader.enterList(ContextSpecificTag(TAG_CURRENT)) + buildList { + tlvReader.enterArray(ContextSpecificTag(TAG_CURRENT)) while (!tlvReader.isEndOfContainer()) { - this.add(tlvReader.getInt(AnonymousTag)) + this.add(tlvReader.getUInt(AnonymousTag)) } tlvReader.exitContainer() } val previous = - buildList { - tlvReader.enterList(ContextSpecificTag(TAG_PREVIOUS)) + buildList { + tlvReader.enterArray(ContextSpecificTag(TAG_PREVIOUS)) while (!tlvReader.isEndOfContainer()) { - this.add(tlvReader.getInt(AnonymousTag)) + this.add(tlvReader.getUInt(AnonymousTag)) } tlvReader.exitContainer() } diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/PowerSourceClusterWiredFaultChangeEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/PowerSourceClusterWiredFaultChangeEvent.kt index 8a06b36fba61d0..dac17ad7574457 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/PowerSourceClusterWiredFaultChangeEvent.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/PowerSourceClusterWiredFaultChangeEvent.kt @@ -23,7 +23,7 @@ import chip.tlv.Tag import chip.tlv.TlvReader import chip.tlv.TlvWriter -class PowerSourceClusterWiredFaultChangeEvent(val current: List, val previous: List) { +class PowerSourceClusterWiredFaultChangeEvent(val current: List, val previous: List) { override fun toString(): String = buildString { append("PowerSourceClusterWiredFaultChangeEvent {\n") append("\tcurrent : $current\n") @@ -31,19 +31,19 @@ class PowerSourceClusterWiredFaultChangeEvent(val current: List, val previo append("}\n") } - fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { tlvWriter.apply { - startStructure(tag) - startList(ContextSpecificTag(TAG_CURRENT)) + startStructure(tlvTag) + startArray(ContextSpecificTag(TAG_CURRENT)) for (item in current.iterator()) { put(AnonymousTag, item) } - endList() - startList(ContextSpecificTag(TAG_PREVIOUS)) + endArray() + startArray(ContextSpecificTag(TAG_PREVIOUS)) for (item in previous.iterator()) { put(AnonymousTag, item) } - endList() + endArray() endStructure() } } @@ -52,21 +52,21 @@ class PowerSourceClusterWiredFaultChangeEvent(val current: List, val previo private const val TAG_CURRENT = 0 private const val TAG_PREVIOUS = 1 - fun fromTlv(tag: Tag, tlvReader: TlvReader): PowerSourceClusterWiredFaultChangeEvent { - tlvReader.enterStructure(tag) + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): PowerSourceClusterWiredFaultChangeEvent { + tlvReader.enterStructure(tlvTag) val current = - buildList { - tlvReader.enterList(ContextSpecificTag(TAG_CURRENT)) + buildList { + tlvReader.enterArray(ContextSpecificTag(TAG_CURRENT)) while (!tlvReader.isEndOfContainer()) { - this.add(tlvReader.getInt(AnonymousTag)) + this.add(tlvReader.getUInt(AnonymousTag)) } tlvReader.exitContainer() } val previous = - buildList { - tlvReader.enterList(ContextSpecificTag(TAG_PREVIOUS)) + buildList { + tlvReader.enterArray(ContextSpecificTag(TAG_PREVIOUS)) while (!tlvReader.isEndOfContainer()) { - this.add(tlvReader.getInt(AnonymousTag)) + this.add(tlvReader.getUInt(AnonymousTag)) } tlvReader.exitContainer() } diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/RefrigeratorAlarmClusterNotifyEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/RefrigeratorAlarmClusterNotifyEvent.kt index c116f16ac73229..f52966b7e0ddeb 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/RefrigeratorAlarmClusterNotifyEvent.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/RefrigeratorAlarmClusterNotifyEvent.kt @@ -23,10 +23,10 @@ import chip.tlv.TlvReader import chip.tlv.TlvWriter class RefrigeratorAlarmClusterNotifyEvent( - val active: Long, - val inactive: Long, - val state: Long, - val mask: Long + val active: ULong, + val inactive: ULong, + val state: ULong, + val mask: ULong ) { override fun toString(): String = buildString { append("RefrigeratorAlarmClusterNotifyEvent {\n") @@ -37,9 +37,9 @@ class RefrigeratorAlarmClusterNotifyEvent( append("}\n") } - fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { tlvWriter.apply { - startStructure(tag) + startStructure(tlvTag) put(ContextSpecificTag(TAG_ACTIVE), active) put(ContextSpecificTag(TAG_INACTIVE), inactive) put(ContextSpecificTag(TAG_STATE), state) @@ -54,12 +54,12 @@ class RefrigeratorAlarmClusterNotifyEvent( private const val TAG_STATE = 2 private const val TAG_MASK = 3 - fun fromTlv(tag: Tag, tlvReader: TlvReader): RefrigeratorAlarmClusterNotifyEvent { - tlvReader.enterStructure(tag) - val active = tlvReader.getLong(ContextSpecificTag(TAG_ACTIVE)) - val inactive = tlvReader.getLong(ContextSpecificTag(TAG_INACTIVE)) - val state = tlvReader.getLong(ContextSpecificTag(TAG_STATE)) - val mask = tlvReader.getLong(ContextSpecificTag(TAG_MASK)) + 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() diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/RvcOperationalStateClusterOperationCompletionEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/RvcOperationalStateClusterOperationCompletionEvent.kt index c6afaa9750adf8..c7735481fd9f57 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/RvcOperationalStateClusterOperationCompletionEvent.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/RvcOperationalStateClusterOperationCompletionEvent.kt @@ -24,9 +24,9 @@ import chip.tlv.TlvWriter import java.util.Optional class RvcOperationalStateClusterOperationCompletionEvent( - val completionErrorCode: Int, - val totalOperationalTime: Optional?, - val pausedTime: Optional? + val completionErrorCode: UInt, + val totalOperationalTime: Optional?, + val pausedTime: Optional? ) { override fun toString(): String = buildString { append("RvcOperationalStateClusterOperationCompletionEvent {\n") @@ -36,9 +36,9 @@ class RvcOperationalStateClusterOperationCompletionEvent( append("}\n") } - fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { tlvWriter.apply { - startStructure(tag) + startStructure(tlvTag) put(ContextSpecificTag(TAG_COMPLETION_ERROR_CODE), completionErrorCode) if (totalOperationalTime != null) { if (totalOperationalTime.isPresent) { @@ -66,15 +66,15 @@ class RvcOperationalStateClusterOperationCompletionEvent( private const val TAG_PAUSED_TIME = 2 fun fromTlv( - tag: Tag, + tlvTag: Tag, tlvReader: TlvReader ): RvcOperationalStateClusterOperationCompletionEvent { - tlvReader.enterStructure(tag) - val completionErrorCode = tlvReader.getInt(ContextSpecificTag(TAG_COMPLETION_ERROR_CODE)) + 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.getLong(ContextSpecificTag(TAG_TOTAL_OPERATIONAL_TIME))) + Optional.of(tlvReader.getULong(ContextSpecificTag(TAG_TOTAL_OPERATIONAL_TIME))) } else { Optional.empty() } @@ -85,7 +85,7 @@ class RvcOperationalStateClusterOperationCompletionEvent( val pausedTime = if (!tlvReader.isNull()) { if (tlvReader.isNextTag(ContextSpecificTag(TAG_PAUSED_TIME))) { - Optional.of(tlvReader.getLong(ContextSpecificTag(TAG_PAUSED_TIME))) + Optional.of(tlvReader.getULong(ContextSpecificTag(TAG_PAUSED_TIME))) } else { Optional.empty() } diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/RvcOperationalStateClusterOperationalErrorEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/RvcOperationalStateClusterOperationalErrorEvent.kt index bf6fed9817f60f..ee8bd3c8dc4a57 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/RvcOperationalStateClusterOperationalErrorEvent.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/RvcOperationalStateClusterOperationalErrorEvent.kt @@ -31,9 +31,9 @@ class RvcOperationalStateClusterOperationalErrorEvent( append("}\n") } - fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { tlvWriter.apply { - startStructure(tag) + startStructure(tlvTag) errorState.toTlv(ContextSpecificTag(TAG_ERROR_STATE), this) endStructure() } @@ -42,8 +42,11 @@ class RvcOperationalStateClusterOperationalErrorEvent( companion object { private const val TAG_ERROR_STATE = 0 - fun fromTlv(tag: Tag, tlvReader: TlvReader): RvcOperationalStateClusterOperationalErrorEvent { - tlvReader.enterStructure(tag) + fun fromTlv( + tlvTag: Tag, + tlvReader: TlvReader + ): RvcOperationalStateClusterOperationalErrorEvent { + tlvReader.enterStructure(tlvTag) val errorState = chip.devicecontroller.cluster.structs.RvcOperationalStateClusterErrorStateStruct.fromTlv( ContextSpecificTag(TAG_ERROR_STATE), diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SmokeCoAlarmClusterCOAlarmEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SmokeCoAlarmClusterCOAlarmEvent.kt index 2bc948e2a667b1..be8db4eadec848 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SmokeCoAlarmClusterCOAlarmEvent.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SmokeCoAlarmClusterCOAlarmEvent.kt @@ -22,16 +22,16 @@ import chip.tlv.Tag import chip.tlv.TlvReader import chip.tlv.TlvWriter -class SmokeCoAlarmClusterCOAlarmEvent(val alarmSeverityLevel: Int) { +class SmokeCoAlarmClusterCOAlarmEvent(val alarmSeverityLevel: UInt) { override fun toString(): String = buildString { append("SmokeCoAlarmClusterCOAlarmEvent {\n") append("\talarmSeverityLevel : $alarmSeverityLevel\n") append("}\n") } - fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { tlvWriter.apply { - startStructure(tag) + startStructure(tlvTag) put(ContextSpecificTag(TAG_ALARM_SEVERITY_LEVEL), alarmSeverityLevel) endStructure() } @@ -40,9 +40,9 @@ class SmokeCoAlarmClusterCOAlarmEvent(val alarmSeverityLevel: Int) { companion object { private const val TAG_ALARM_SEVERITY_LEVEL = 0 - fun fromTlv(tag: Tag, tlvReader: TlvReader): SmokeCoAlarmClusterCOAlarmEvent { - tlvReader.enterStructure(tag) - val alarmSeverityLevel = tlvReader.getInt(ContextSpecificTag(TAG_ALARM_SEVERITY_LEVEL)) + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): SmokeCoAlarmClusterCOAlarmEvent { + tlvReader.enterStructure(tlvTag) + val alarmSeverityLevel = tlvReader.getUInt(ContextSpecificTag(TAG_ALARM_SEVERITY_LEVEL)) tlvReader.exitContainer() diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SmokeCoAlarmClusterInterconnectCOAlarmEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SmokeCoAlarmClusterInterconnectCOAlarmEvent.kt index 19223606c4685d..1300634d16fbff 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SmokeCoAlarmClusterInterconnectCOAlarmEvent.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SmokeCoAlarmClusterInterconnectCOAlarmEvent.kt @@ -22,16 +22,16 @@ import chip.tlv.Tag import chip.tlv.TlvReader import chip.tlv.TlvWriter -class SmokeCoAlarmClusterInterconnectCOAlarmEvent(val alarmSeverityLevel: Int) { +class SmokeCoAlarmClusterInterconnectCOAlarmEvent(val alarmSeverityLevel: UInt) { override fun toString(): String = buildString { append("SmokeCoAlarmClusterInterconnectCOAlarmEvent {\n") append("\talarmSeverityLevel : $alarmSeverityLevel\n") append("}\n") } - fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { tlvWriter.apply { - startStructure(tag) + startStructure(tlvTag) put(ContextSpecificTag(TAG_ALARM_SEVERITY_LEVEL), alarmSeverityLevel) endStructure() } @@ -40,9 +40,9 @@ class SmokeCoAlarmClusterInterconnectCOAlarmEvent(val alarmSeverityLevel: Int) { companion object { private const val TAG_ALARM_SEVERITY_LEVEL = 0 - fun fromTlv(tag: Tag, tlvReader: TlvReader): SmokeCoAlarmClusterInterconnectCOAlarmEvent { - tlvReader.enterStructure(tag) - val alarmSeverityLevel = tlvReader.getInt(ContextSpecificTag(TAG_ALARM_SEVERITY_LEVEL)) + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): SmokeCoAlarmClusterInterconnectCOAlarmEvent { + tlvReader.enterStructure(tlvTag) + val alarmSeverityLevel = tlvReader.getUInt(ContextSpecificTag(TAG_ALARM_SEVERITY_LEVEL)) tlvReader.exitContainer() diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SmokeCoAlarmClusterInterconnectSmokeAlarmEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SmokeCoAlarmClusterInterconnectSmokeAlarmEvent.kt index 38e2fe872915f7..a4a2ca7611e38d 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SmokeCoAlarmClusterInterconnectSmokeAlarmEvent.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SmokeCoAlarmClusterInterconnectSmokeAlarmEvent.kt @@ -22,16 +22,16 @@ import chip.tlv.Tag import chip.tlv.TlvReader import chip.tlv.TlvWriter -class SmokeCoAlarmClusterInterconnectSmokeAlarmEvent(val alarmSeverityLevel: Int) { +class SmokeCoAlarmClusterInterconnectSmokeAlarmEvent(val alarmSeverityLevel: UInt) { override fun toString(): String = buildString { append("SmokeCoAlarmClusterInterconnectSmokeAlarmEvent {\n") append("\talarmSeverityLevel : $alarmSeverityLevel\n") append("}\n") } - fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { tlvWriter.apply { - startStructure(tag) + startStructure(tlvTag) put(ContextSpecificTag(TAG_ALARM_SEVERITY_LEVEL), alarmSeverityLevel) endStructure() } @@ -40,9 +40,9 @@ class SmokeCoAlarmClusterInterconnectSmokeAlarmEvent(val alarmSeverityLevel: Int companion object { private const val TAG_ALARM_SEVERITY_LEVEL = 0 - fun fromTlv(tag: Tag, tlvReader: TlvReader): SmokeCoAlarmClusterInterconnectSmokeAlarmEvent { - tlvReader.enterStructure(tag) - val alarmSeverityLevel = tlvReader.getInt(ContextSpecificTag(TAG_ALARM_SEVERITY_LEVEL)) + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): SmokeCoAlarmClusterInterconnectSmokeAlarmEvent { + tlvReader.enterStructure(tlvTag) + val alarmSeverityLevel = tlvReader.getUInt(ContextSpecificTag(TAG_ALARM_SEVERITY_LEVEL)) tlvReader.exitContainer() diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SmokeCoAlarmClusterLowBatteryEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SmokeCoAlarmClusterLowBatteryEvent.kt index ce2d9ad47341d0..163d29c5a51c35 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SmokeCoAlarmClusterLowBatteryEvent.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SmokeCoAlarmClusterLowBatteryEvent.kt @@ -22,16 +22,16 @@ import chip.tlv.Tag import chip.tlv.TlvReader import chip.tlv.TlvWriter -class SmokeCoAlarmClusterLowBatteryEvent(val alarmSeverityLevel: Int) { +class SmokeCoAlarmClusterLowBatteryEvent(val alarmSeverityLevel: UInt) { override fun toString(): String = buildString { append("SmokeCoAlarmClusterLowBatteryEvent {\n") append("\talarmSeverityLevel : $alarmSeverityLevel\n") append("}\n") } - fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { tlvWriter.apply { - startStructure(tag) + startStructure(tlvTag) put(ContextSpecificTag(TAG_ALARM_SEVERITY_LEVEL), alarmSeverityLevel) endStructure() } @@ -40,9 +40,9 @@ class SmokeCoAlarmClusterLowBatteryEvent(val alarmSeverityLevel: Int) { companion object { private const val TAG_ALARM_SEVERITY_LEVEL = 0 - fun fromTlv(tag: Tag, tlvReader: TlvReader): SmokeCoAlarmClusterLowBatteryEvent { - tlvReader.enterStructure(tag) - val alarmSeverityLevel = tlvReader.getInt(ContextSpecificTag(TAG_ALARM_SEVERITY_LEVEL)) + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): SmokeCoAlarmClusterLowBatteryEvent { + tlvReader.enterStructure(tlvTag) + val alarmSeverityLevel = tlvReader.getUInt(ContextSpecificTag(TAG_ALARM_SEVERITY_LEVEL)) tlvReader.exitContainer() diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SmokeCoAlarmClusterSmokeAlarmEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SmokeCoAlarmClusterSmokeAlarmEvent.kt index 324a5d4461a225..b26dcdd65fb66b 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SmokeCoAlarmClusterSmokeAlarmEvent.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SmokeCoAlarmClusterSmokeAlarmEvent.kt @@ -22,16 +22,16 @@ import chip.tlv.Tag import chip.tlv.TlvReader import chip.tlv.TlvWriter -class SmokeCoAlarmClusterSmokeAlarmEvent(val alarmSeverityLevel: Int) { +class SmokeCoAlarmClusterSmokeAlarmEvent(val alarmSeverityLevel: UInt) { override fun toString(): String = buildString { append("SmokeCoAlarmClusterSmokeAlarmEvent {\n") append("\talarmSeverityLevel : $alarmSeverityLevel\n") append("}\n") } - fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { tlvWriter.apply { - startStructure(tag) + startStructure(tlvTag) put(ContextSpecificTag(TAG_ALARM_SEVERITY_LEVEL), alarmSeverityLevel) endStructure() } @@ -40,9 +40,9 @@ class SmokeCoAlarmClusterSmokeAlarmEvent(val alarmSeverityLevel: Int) { companion object { private const val TAG_ALARM_SEVERITY_LEVEL = 0 - fun fromTlv(tag: Tag, tlvReader: TlvReader): SmokeCoAlarmClusterSmokeAlarmEvent { - tlvReader.enterStructure(tag) - val alarmSeverityLevel = tlvReader.getInt(ContextSpecificTag(TAG_ALARM_SEVERITY_LEVEL)) + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): SmokeCoAlarmClusterSmokeAlarmEvent { + tlvReader.enterStructure(tlvTag) + val alarmSeverityLevel = tlvReader.getUInt(ContextSpecificTag(TAG_ALARM_SEVERITY_LEVEL)) tlvReader.exitContainer() diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SoftwareDiagnosticsClusterSoftwareFaultEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SoftwareDiagnosticsClusterSoftwareFaultEvent.kt index 50b455842e538f..e053514f92cfe5 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SoftwareDiagnosticsClusterSoftwareFaultEvent.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SoftwareDiagnosticsClusterSoftwareFaultEvent.kt @@ -24,7 +24,7 @@ import chip.tlv.TlvWriter import java.util.Optional class SoftwareDiagnosticsClusterSoftwareFaultEvent( - val id: Long, + val id: ULong, val name: Optional, val faultRecording: Optional ) { @@ -36,9 +36,9 @@ class SoftwareDiagnosticsClusterSoftwareFaultEvent( append("}\n") } - fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { tlvWriter.apply { - startStructure(tag) + startStructure(tlvTag) put(ContextSpecificTag(TAG_ID), id) if (name.isPresent) { val optname = name.get() @@ -57,9 +57,9 @@ class SoftwareDiagnosticsClusterSoftwareFaultEvent( private const val TAG_NAME = 1 private const val TAG_FAULT_RECORDING = 2 - fun fromTlv(tag: Tag, tlvReader: TlvReader): SoftwareDiagnosticsClusterSoftwareFaultEvent { - tlvReader.enterStructure(tag) - val id = tlvReader.getLong(ContextSpecificTag(TAG_ID)) + 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))) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SwitchClusterInitialPressEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SwitchClusterInitialPressEvent.kt index 893412c1f25322..4a97cda7a47526 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SwitchClusterInitialPressEvent.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SwitchClusterInitialPressEvent.kt @@ -22,16 +22,16 @@ import chip.tlv.Tag import chip.tlv.TlvReader import chip.tlv.TlvWriter -class SwitchClusterInitialPressEvent(val newPosition: Int) { +class SwitchClusterInitialPressEvent(val newPosition: UInt) { override fun toString(): String = buildString { append("SwitchClusterInitialPressEvent {\n") append("\tnewPosition : $newPosition\n") append("}\n") } - fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { tlvWriter.apply { - startStructure(tag) + startStructure(tlvTag) put(ContextSpecificTag(TAG_NEW_POSITION), newPosition) endStructure() } @@ -40,9 +40,9 @@ class SwitchClusterInitialPressEvent(val newPosition: Int) { companion object { private const val TAG_NEW_POSITION = 0 - fun fromTlv(tag: Tag, tlvReader: TlvReader): SwitchClusterInitialPressEvent { - tlvReader.enterStructure(tag) - val newPosition = tlvReader.getInt(ContextSpecificTag(TAG_NEW_POSITION)) + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): SwitchClusterInitialPressEvent { + tlvReader.enterStructure(tlvTag) + val newPosition = tlvReader.getUInt(ContextSpecificTag(TAG_NEW_POSITION)) tlvReader.exitContainer() diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SwitchClusterLongPressEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SwitchClusterLongPressEvent.kt index 3fa420f46ddec3..aa8c25dfe20895 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SwitchClusterLongPressEvent.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SwitchClusterLongPressEvent.kt @@ -22,16 +22,16 @@ import chip.tlv.Tag import chip.tlv.TlvReader import chip.tlv.TlvWriter -class SwitchClusterLongPressEvent(val newPosition: Int) { +class SwitchClusterLongPressEvent(val newPosition: UInt) { override fun toString(): String = buildString { append("SwitchClusterLongPressEvent {\n") append("\tnewPosition : $newPosition\n") append("}\n") } - fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { tlvWriter.apply { - startStructure(tag) + startStructure(tlvTag) put(ContextSpecificTag(TAG_NEW_POSITION), newPosition) endStructure() } @@ -40,9 +40,9 @@ class SwitchClusterLongPressEvent(val newPosition: Int) { companion object { private const val TAG_NEW_POSITION = 0 - fun fromTlv(tag: Tag, tlvReader: TlvReader): SwitchClusterLongPressEvent { - tlvReader.enterStructure(tag) - val newPosition = tlvReader.getInt(ContextSpecificTag(TAG_NEW_POSITION)) + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): SwitchClusterLongPressEvent { + tlvReader.enterStructure(tlvTag) + val newPosition = tlvReader.getUInt(ContextSpecificTag(TAG_NEW_POSITION)) tlvReader.exitContainer() diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SwitchClusterLongReleaseEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SwitchClusterLongReleaseEvent.kt index eb90698fc735ab..10ba08a0f4eabf 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SwitchClusterLongReleaseEvent.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SwitchClusterLongReleaseEvent.kt @@ -22,16 +22,16 @@ import chip.tlv.Tag import chip.tlv.TlvReader import chip.tlv.TlvWriter -class SwitchClusterLongReleaseEvent(val previousPosition: Int) { +class SwitchClusterLongReleaseEvent(val previousPosition: UInt) { override fun toString(): String = buildString { append("SwitchClusterLongReleaseEvent {\n") append("\tpreviousPosition : $previousPosition\n") append("}\n") } - fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { tlvWriter.apply { - startStructure(tag) + startStructure(tlvTag) put(ContextSpecificTag(TAG_PREVIOUS_POSITION), previousPosition) endStructure() } @@ -40,9 +40,9 @@ class SwitchClusterLongReleaseEvent(val previousPosition: Int) { companion object { private const val TAG_PREVIOUS_POSITION = 0 - fun fromTlv(tag: Tag, tlvReader: TlvReader): SwitchClusterLongReleaseEvent { - tlvReader.enterStructure(tag) - val previousPosition = tlvReader.getInt(ContextSpecificTag(TAG_PREVIOUS_POSITION)) + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): SwitchClusterLongReleaseEvent { + tlvReader.enterStructure(tlvTag) + val previousPosition = tlvReader.getUInt(ContextSpecificTag(TAG_PREVIOUS_POSITION)) tlvReader.exitContainer() diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SwitchClusterMultiPressCompleteEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SwitchClusterMultiPressCompleteEvent.kt index 81141e17424fbb..bc1bab19a93fe4 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SwitchClusterMultiPressCompleteEvent.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SwitchClusterMultiPressCompleteEvent.kt @@ -23,8 +23,8 @@ import chip.tlv.TlvReader import chip.tlv.TlvWriter class SwitchClusterMultiPressCompleteEvent( - val previousPosition: Int, - val totalNumberOfPressesCounted: Int + val previousPosition: UInt, + val totalNumberOfPressesCounted: UInt ) { override fun toString(): String = buildString { append("SwitchClusterMultiPressCompleteEvent {\n") @@ -33,9 +33,9 @@ class SwitchClusterMultiPressCompleteEvent( append("}\n") } - fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { tlvWriter.apply { - startStructure(tag) + startStructure(tlvTag) put(ContextSpecificTag(TAG_PREVIOUS_POSITION), previousPosition) put(ContextSpecificTag(TAG_TOTAL_NUMBER_OF_PRESSES_COUNTED), totalNumberOfPressesCounted) endStructure() @@ -46,11 +46,11 @@ class SwitchClusterMultiPressCompleteEvent( private const val TAG_PREVIOUS_POSITION = 0 private const val TAG_TOTAL_NUMBER_OF_PRESSES_COUNTED = 1 - fun fromTlv(tag: Tag, tlvReader: TlvReader): SwitchClusterMultiPressCompleteEvent { - tlvReader.enterStructure(tag) - val previousPosition = tlvReader.getInt(ContextSpecificTag(TAG_PREVIOUS_POSITION)) + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): SwitchClusterMultiPressCompleteEvent { + tlvReader.enterStructure(tlvTag) + val previousPosition = tlvReader.getUInt(ContextSpecificTag(TAG_PREVIOUS_POSITION)) val totalNumberOfPressesCounted = - tlvReader.getInt(ContextSpecificTag(TAG_TOTAL_NUMBER_OF_PRESSES_COUNTED)) + tlvReader.getUInt(ContextSpecificTag(TAG_TOTAL_NUMBER_OF_PRESSES_COUNTED)) tlvReader.exitContainer() diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SwitchClusterMultiPressOngoingEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SwitchClusterMultiPressOngoingEvent.kt index 11fab26fdfce8e..cf119acd96c073 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SwitchClusterMultiPressOngoingEvent.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SwitchClusterMultiPressOngoingEvent.kt @@ -23,8 +23,8 @@ import chip.tlv.TlvReader import chip.tlv.TlvWriter class SwitchClusterMultiPressOngoingEvent( - val newPosition: Int, - val currentNumberOfPressesCounted: Int + val newPosition: UInt, + val currentNumberOfPressesCounted: UInt ) { override fun toString(): String = buildString { append("SwitchClusterMultiPressOngoingEvent {\n") @@ -33,9 +33,9 @@ class SwitchClusterMultiPressOngoingEvent( append("}\n") } - fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { tlvWriter.apply { - startStructure(tag) + startStructure(tlvTag) put(ContextSpecificTag(TAG_NEW_POSITION), newPosition) put(ContextSpecificTag(TAG_CURRENT_NUMBER_OF_PRESSES_COUNTED), currentNumberOfPressesCounted) endStructure() @@ -46,11 +46,11 @@ class SwitchClusterMultiPressOngoingEvent( private const val TAG_NEW_POSITION = 0 private const val TAG_CURRENT_NUMBER_OF_PRESSES_COUNTED = 1 - fun fromTlv(tag: Tag, tlvReader: TlvReader): SwitchClusterMultiPressOngoingEvent { - tlvReader.enterStructure(tag) - val newPosition = tlvReader.getInt(ContextSpecificTag(TAG_NEW_POSITION)) + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): SwitchClusterMultiPressOngoingEvent { + tlvReader.enterStructure(tlvTag) + val newPosition = tlvReader.getUInt(ContextSpecificTag(TAG_NEW_POSITION)) val currentNumberOfPressesCounted = - tlvReader.getInt(ContextSpecificTag(TAG_CURRENT_NUMBER_OF_PRESSES_COUNTED)) + tlvReader.getUInt(ContextSpecificTag(TAG_CURRENT_NUMBER_OF_PRESSES_COUNTED)) tlvReader.exitContainer() diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SwitchClusterShortReleaseEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SwitchClusterShortReleaseEvent.kt index 0eeb9e2841fd7c..68d59803b7c9e7 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SwitchClusterShortReleaseEvent.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SwitchClusterShortReleaseEvent.kt @@ -22,16 +22,16 @@ import chip.tlv.Tag import chip.tlv.TlvReader import chip.tlv.TlvWriter -class SwitchClusterShortReleaseEvent(val previousPosition: Int) { +class SwitchClusterShortReleaseEvent(val previousPosition: UInt) { override fun toString(): String = buildString { append("SwitchClusterShortReleaseEvent {\n") append("\tpreviousPosition : $previousPosition\n") append("}\n") } - fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { tlvWriter.apply { - startStructure(tag) + startStructure(tlvTag) put(ContextSpecificTag(TAG_PREVIOUS_POSITION), previousPosition) endStructure() } @@ -40,9 +40,9 @@ class SwitchClusterShortReleaseEvent(val previousPosition: Int) { companion object { private const val TAG_PREVIOUS_POSITION = 0 - fun fromTlv(tag: Tag, tlvReader: TlvReader): SwitchClusterShortReleaseEvent { - tlvReader.enterStructure(tag) - val previousPosition = tlvReader.getInt(ContextSpecificTag(TAG_PREVIOUS_POSITION)) + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): SwitchClusterShortReleaseEvent { + tlvReader.enterStructure(tlvTag) + val previousPosition = tlvReader.getUInt(ContextSpecificTag(TAG_PREVIOUS_POSITION)) tlvReader.exitContainer() diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SwitchClusterSwitchLatchedEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SwitchClusterSwitchLatchedEvent.kt index 2b921b37ac6c2b..484b87f3551b2d 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SwitchClusterSwitchLatchedEvent.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SwitchClusterSwitchLatchedEvent.kt @@ -22,16 +22,16 @@ import chip.tlv.Tag import chip.tlv.TlvReader import chip.tlv.TlvWriter -class SwitchClusterSwitchLatchedEvent(val newPosition: Int) { +class SwitchClusterSwitchLatchedEvent(val newPosition: UInt) { override fun toString(): String = buildString { append("SwitchClusterSwitchLatchedEvent {\n") append("\tnewPosition : $newPosition\n") append("}\n") } - fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { tlvWriter.apply { - startStructure(tag) + startStructure(tlvTag) put(ContextSpecificTag(TAG_NEW_POSITION), newPosition) endStructure() } @@ -40,9 +40,9 @@ class SwitchClusterSwitchLatchedEvent(val newPosition: Int) { companion object { private const val TAG_NEW_POSITION = 0 - fun fromTlv(tag: Tag, tlvReader: TlvReader): SwitchClusterSwitchLatchedEvent { - tlvReader.enterStructure(tag) - val newPosition = tlvReader.getInt(ContextSpecificTag(TAG_NEW_POSITION)) + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): SwitchClusterSwitchLatchedEvent { + tlvReader.enterStructure(tlvTag) + val newPosition = tlvReader.getUInt(ContextSpecificTag(TAG_NEW_POSITION)) tlvReader.exitContainer() diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/ThreadNetworkDiagnosticsClusterConnectionStatusEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/ThreadNetworkDiagnosticsClusterConnectionStatusEvent.kt index ffdc72b1e54c89..0ab635e7160ad1 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/ThreadNetworkDiagnosticsClusterConnectionStatusEvent.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/ThreadNetworkDiagnosticsClusterConnectionStatusEvent.kt @@ -22,16 +22,16 @@ import chip.tlv.Tag import chip.tlv.TlvReader import chip.tlv.TlvWriter -class ThreadNetworkDiagnosticsClusterConnectionStatusEvent(val connectionStatus: Int) { +class ThreadNetworkDiagnosticsClusterConnectionStatusEvent(val connectionStatus: UInt) { override fun toString(): String = buildString { append("ThreadNetworkDiagnosticsClusterConnectionStatusEvent {\n") append("\tconnectionStatus : $connectionStatus\n") append("}\n") } - fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { tlvWriter.apply { - startStructure(tag) + startStructure(tlvTag) put(ContextSpecificTag(TAG_CONNECTION_STATUS), connectionStatus) endStructure() } @@ -41,11 +41,11 @@ class ThreadNetworkDiagnosticsClusterConnectionStatusEvent(val connectionStatus: private const val TAG_CONNECTION_STATUS = 0 fun fromTlv( - tag: Tag, + tlvTag: Tag, tlvReader: TlvReader ): ThreadNetworkDiagnosticsClusterConnectionStatusEvent { - tlvReader.enterStructure(tag) - val connectionStatus = tlvReader.getInt(ContextSpecificTag(TAG_CONNECTION_STATUS)) + tlvReader.enterStructure(tlvTag) + val connectionStatus = tlvReader.getUInt(ContextSpecificTag(TAG_CONNECTION_STATUS)) tlvReader.exitContainer() diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/ThreadNetworkDiagnosticsClusterNetworkFaultChangeEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/ThreadNetworkDiagnosticsClusterNetworkFaultChangeEvent.kt index f9110c39fa1d40..9a4be9c84bd8e1 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/ThreadNetworkDiagnosticsClusterNetworkFaultChangeEvent.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/ThreadNetworkDiagnosticsClusterNetworkFaultChangeEvent.kt @@ -24,8 +24,8 @@ import chip.tlv.TlvReader import chip.tlv.TlvWriter class ThreadNetworkDiagnosticsClusterNetworkFaultChangeEvent( - val current: List, - val previous: List + val current: List, + val previous: List ) { override fun toString(): String = buildString { append("ThreadNetworkDiagnosticsClusterNetworkFaultChangeEvent {\n") @@ -34,19 +34,19 @@ class ThreadNetworkDiagnosticsClusterNetworkFaultChangeEvent( append("}\n") } - fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { tlvWriter.apply { - startStructure(tag) - startList(ContextSpecificTag(TAG_CURRENT)) + startStructure(tlvTag) + startArray(ContextSpecificTag(TAG_CURRENT)) for (item in current.iterator()) { put(AnonymousTag, item) } - endList() - startList(ContextSpecificTag(TAG_PREVIOUS)) + endArray() + startArray(ContextSpecificTag(TAG_PREVIOUS)) for (item in previous.iterator()) { put(AnonymousTag, item) } - endList() + endArray() endStructure() } } @@ -56,23 +56,23 @@ class ThreadNetworkDiagnosticsClusterNetworkFaultChangeEvent( private const val TAG_PREVIOUS = 1 fun fromTlv( - tag: Tag, + tlvTag: Tag, tlvReader: TlvReader ): ThreadNetworkDiagnosticsClusterNetworkFaultChangeEvent { - tlvReader.enterStructure(tag) + tlvReader.enterStructure(tlvTag) val current = - buildList { - tlvReader.enterList(ContextSpecificTag(TAG_CURRENT)) + buildList { + tlvReader.enterArray(ContextSpecificTag(TAG_CURRENT)) while (!tlvReader.isEndOfContainer()) { - this.add(tlvReader.getInt(AnonymousTag)) + this.add(tlvReader.getUInt(AnonymousTag)) } tlvReader.exitContainer() } val previous = - buildList { - tlvReader.enterList(ContextSpecificTag(TAG_PREVIOUS)) + buildList { + tlvReader.enterArray(ContextSpecificTag(TAG_PREVIOUS)) while (!tlvReader.isEndOfContainer()) { - this.add(tlvReader.getInt(AnonymousTag)) + this.add(tlvReader.getUInt(AnonymousTag)) } tlvReader.exitContainer() } diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/TimeSynchronizationClusterDSTStatusEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/TimeSynchronizationClusterDSTStatusEvent.kt index 53090f750b4e06..246f8489f5aa84 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/TimeSynchronizationClusterDSTStatusEvent.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/TimeSynchronizationClusterDSTStatusEvent.kt @@ -29,9 +29,9 @@ class TimeSynchronizationClusterDSTStatusEvent(val DSTOffsetActive: Boolean) { append("}\n") } - fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { tlvWriter.apply { - startStructure(tag) + startStructure(tlvTag) put(ContextSpecificTag(TAG_D_S_T_OFFSET_ACTIVE), DSTOffsetActive) endStructure() } @@ -40,8 +40,8 @@ class TimeSynchronizationClusterDSTStatusEvent(val DSTOffsetActive: Boolean) { companion object { private const val TAG_D_S_T_OFFSET_ACTIVE = 0 - fun fromTlv(tag: Tag, tlvReader: TlvReader): TimeSynchronizationClusterDSTStatusEvent { - tlvReader.enterStructure(tag) + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): TimeSynchronizationClusterDSTStatusEvent { + tlvReader.enterStructure(tlvTag) val DSTOffsetActive = tlvReader.getBoolean(ContextSpecificTag(TAG_D_S_T_OFFSET_ACTIVE)) tlvReader.exitContainer() diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/TimeSynchronizationClusterTimeZoneStatusEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/TimeSynchronizationClusterTimeZoneStatusEvent.kt index 452e9d902c4767..1319c6e4551fab 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/TimeSynchronizationClusterTimeZoneStatusEvent.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/TimeSynchronizationClusterTimeZoneStatusEvent.kt @@ -31,9 +31,9 @@ class TimeSynchronizationClusterTimeZoneStatusEvent(val offset: Long, val name: append("}\n") } - fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { tlvWriter.apply { - startStructure(tag) + startStructure(tlvTag) put(ContextSpecificTag(TAG_OFFSET), offset) if (name.isPresent) { val optname = name.get() @@ -47,8 +47,8 @@ class TimeSynchronizationClusterTimeZoneStatusEvent(val offset: Long, val name: private const val TAG_OFFSET = 0 private const val TAG_NAME = 1 - fun fromTlv(tag: Tag, tlvReader: TlvReader): TimeSynchronizationClusterTimeZoneStatusEvent { - tlvReader.enterStructure(tag) + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): TimeSynchronizationClusterTimeZoneStatusEvent { + tlvReader.enterStructure(tlvTag) val offset = tlvReader.getLong(ContextSpecificTag(TAG_OFFSET)) val name = if (tlvReader.isNextTag(ContextSpecificTag(TAG_NAME))) { diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/UnitTestingClusterTestEventEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/UnitTestingClusterTestEventEvent.kt index 8c2e410ab80f6d..37359a5c74780a 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/UnitTestingClusterTestEventEvent.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/UnitTestingClusterTestEventEvent.kt @@ -24,12 +24,12 @@ import chip.tlv.TlvReader import chip.tlv.TlvWriter class UnitTestingClusterTestEventEvent( - val arg1: Int, - val arg2: Int, + val arg1: UInt, + val arg2: UInt, val arg3: Boolean, val arg4: chip.devicecontroller.cluster.structs.UnitTestingClusterSimpleStruct, val arg5: List, - val arg6: List + val arg6: List ) { override fun toString(): String = buildString { append("UnitTestingClusterTestEventEvent {\n") @@ -42,23 +42,23 @@ class UnitTestingClusterTestEventEvent( append("}\n") } - fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { tlvWriter.apply { - startStructure(tag) + startStructure(tlvTag) put(ContextSpecificTag(TAG_ARG1), arg1) put(ContextSpecificTag(TAG_ARG2), arg2) put(ContextSpecificTag(TAG_ARG3), arg3) arg4.toTlv(ContextSpecificTag(TAG_ARG4), this) - startList(ContextSpecificTag(TAG_ARG5)) + startArray(ContextSpecificTag(TAG_ARG5)) for (item in arg5.iterator()) { item.toTlv(AnonymousTag, this) } - endList() - startList(ContextSpecificTag(TAG_ARG6)) + endArray() + startArray(ContextSpecificTag(TAG_ARG6)) for (item in arg6.iterator()) { put(AnonymousTag, item) } - endList() + endArray() endStructure() } } @@ -71,10 +71,10 @@ class UnitTestingClusterTestEventEvent( private const val TAG_ARG5 = 5 private const val TAG_ARG6 = 6 - fun fromTlv(tag: Tag, tlvReader: TlvReader): UnitTestingClusterTestEventEvent { - tlvReader.enterStructure(tag) - val arg1 = tlvReader.getInt(ContextSpecificTag(TAG_ARG1)) - val arg2 = tlvReader.getInt(ContextSpecificTag(TAG_ARG2)) + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): UnitTestingClusterTestEventEvent { + tlvReader.enterStructure(tlvTag) + val arg1 = tlvReader.getUInt(ContextSpecificTag(TAG_ARG1)) + val arg2 = tlvReader.getUInt(ContextSpecificTag(TAG_ARG2)) val arg3 = tlvReader.getBoolean(ContextSpecificTag(TAG_ARG3)) val arg4 = chip.devicecontroller.cluster.structs.UnitTestingClusterSimpleStruct.fromTlv( @@ -83,7 +83,7 @@ class UnitTestingClusterTestEventEvent( ) val arg5 = buildList { - tlvReader.enterList(ContextSpecificTag(TAG_ARG5)) + tlvReader.enterArray(ContextSpecificTag(TAG_ARG5)) while (!tlvReader.isEndOfContainer()) { this.add( chip.devicecontroller.cluster.structs.UnitTestingClusterSimpleStruct.fromTlv( @@ -95,10 +95,10 @@ class UnitTestingClusterTestEventEvent( tlvReader.exitContainer() } val arg6 = - buildList { - tlvReader.enterList(ContextSpecificTag(TAG_ARG6)) + buildList { + tlvReader.enterArray(ContextSpecificTag(TAG_ARG6)) while (!tlvReader.isEndOfContainer()) { - this.add(tlvReader.getInt(AnonymousTag)) + this.add(tlvReader.getUInt(AnonymousTag)) } tlvReader.exitContainer() } diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/UnitTestingClusterTestFabricScopedEventEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/UnitTestingClusterTestFabricScopedEventEvent.kt index d746c65d5ea1f1..4edbfe3a821c4d 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/UnitTestingClusterTestFabricScopedEventEvent.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/UnitTestingClusterTestFabricScopedEventEvent.kt @@ -22,16 +22,16 @@ import chip.tlv.Tag import chip.tlv.TlvReader import chip.tlv.TlvWriter -class UnitTestingClusterTestFabricScopedEventEvent(val fabricIndex: Int) { +class UnitTestingClusterTestFabricScopedEventEvent(val fabricIndex: UInt) { override fun toString(): String = buildString { append("UnitTestingClusterTestFabricScopedEventEvent {\n") append("\tfabricIndex : $fabricIndex\n") append("}\n") } - fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { tlvWriter.apply { - startStructure(tag) + startStructure(tlvTag) put(ContextSpecificTag(TAG_FABRIC_INDEX), fabricIndex) endStructure() } @@ -40,9 +40,9 @@ class UnitTestingClusterTestFabricScopedEventEvent(val fabricIndex: Int) { companion object { private const val TAG_FABRIC_INDEX = 254 - fun fromTlv(tag: Tag, tlvReader: TlvReader): UnitTestingClusterTestFabricScopedEventEvent { - tlvReader.enterStructure(tag) - val fabricIndex = tlvReader.getInt(ContextSpecificTag(TAG_FABRIC_INDEX)) + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): UnitTestingClusterTestFabricScopedEventEvent { + tlvReader.enterStructure(tlvTag) + val fabricIndex = tlvReader.getUInt(ContextSpecificTag(TAG_FABRIC_INDEX)) tlvReader.exitContainer() diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/WiFiNetworkDiagnosticsClusterAssociationFailureEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/WiFiNetworkDiagnosticsClusterAssociationFailureEvent.kt index 087484ef1bfa7b..be16faa067aa42 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/WiFiNetworkDiagnosticsClusterAssociationFailureEvent.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/WiFiNetworkDiagnosticsClusterAssociationFailureEvent.kt @@ -23,8 +23,8 @@ import chip.tlv.TlvReader import chip.tlv.TlvWriter class WiFiNetworkDiagnosticsClusterAssociationFailureEvent( - val associationFailure: Int, - val status: Int + val associationFailure: UInt, + val status: UInt ) { override fun toString(): String = buildString { append("WiFiNetworkDiagnosticsClusterAssociationFailureEvent {\n") @@ -33,9 +33,9 @@ class WiFiNetworkDiagnosticsClusterAssociationFailureEvent( append("}\n") } - fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { tlvWriter.apply { - startStructure(tag) + startStructure(tlvTag) put(ContextSpecificTag(TAG_ASSOCIATION_FAILURE), associationFailure) put(ContextSpecificTag(TAG_STATUS), status) endStructure() @@ -47,12 +47,12 @@ class WiFiNetworkDiagnosticsClusterAssociationFailureEvent( private const val TAG_STATUS = 1 fun fromTlv( - tag: Tag, + tlvTag: Tag, tlvReader: TlvReader ): WiFiNetworkDiagnosticsClusterAssociationFailureEvent { - tlvReader.enterStructure(tag) - val associationFailure = tlvReader.getInt(ContextSpecificTag(TAG_ASSOCIATION_FAILURE)) - val status = tlvReader.getInt(ContextSpecificTag(TAG_STATUS)) + tlvReader.enterStructure(tlvTag) + val associationFailure = tlvReader.getUInt(ContextSpecificTag(TAG_ASSOCIATION_FAILURE)) + val status = tlvReader.getUInt(ContextSpecificTag(TAG_STATUS)) tlvReader.exitContainer() diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/WiFiNetworkDiagnosticsClusterConnectionStatusEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/WiFiNetworkDiagnosticsClusterConnectionStatusEvent.kt index 3599597c99b152..7b11149d69a741 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/WiFiNetworkDiagnosticsClusterConnectionStatusEvent.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/WiFiNetworkDiagnosticsClusterConnectionStatusEvent.kt @@ -22,16 +22,16 @@ import chip.tlv.Tag import chip.tlv.TlvReader import chip.tlv.TlvWriter -class WiFiNetworkDiagnosticsClusterConnectionStatusEvent(val connectionStatus: Int) { +class WiFiNetworkDiagnosticsClusterConnectionStatusEvent(val connectionStatus: UInt) { override fun toString(): String = buildString { append("WiFiNetworkDiagnosticsClusterConnectionStatusEvent {\n") append("\tconnectionStatus : $connectionStatus\n") append("}\n") } - fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { tlvWriter.apply { - startStructure(tag) + startStructure(tlvTag) put(ContextSpecificTag(TAG_CONNECTION_STATUS), connectionStatus) endStructure() } @@ -41,11 +41,11 @@ class WiFiNetworkDiagnosticsClusterConnectionStatusEvent(val connectionStatus: I private const val TAG_CONNECTION_STATUS = 0 fun fromTlv( - tag: Tag, + tlvTag: Tag, tlvReader: TlvReader ): WiFiNetworkDiagnosticsClusterConnectionStatusEvent { - tlvReader.enterStructure(tag) - val connectionStatus = tlvReader.getInt(ContextSpecificTag(TAG_CONNECTION_STATUS)) + tlvReader.enterStructure(tlvTag) + val connectionStatus = tlvReader.getUInt(ContextSpecificTag(TAG_CONNECTION_STATUS)) tlvReader.exitContainer() diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/WiFiNetworkDiagnosticsClusterDisconnectionEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/WiFiNetworkDiagnosticsClusterDisconnectionEvent.kt index 6d54ae4f2bfdcd..84a30a91db72e2 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/WiFiNetworkDiagnosticsClusterDisconnectionEvent.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/WiFiNetworkDiagnosticsClusterDisconnectionEvent.kt @@ -22,16 +22,16 @@ import chip.tlv.Tag import chip.tlv.TlvReader import chip.tlv.TlvWriter -class WiFiNetworkDiagnosticsClusterDisconnectionEvent(val reasonCode: Int) { +class WiFiNetworkDiagnosticsClusterDisconnectionEvent(val reasonCode: UInt) { override fun toString(): String = buildString { append("WiFiNetworkDiagnosticsClusterDisconnectionEvent {\n") append("\treasonCode : $reasonCode\n") append("}\n") } - fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { tlvWriter.apply { - startStructure(tag) + startStructure(tlvTag) put(ContextSpecificTag(TAG_REASON_CODE), reasonCode) endStructure() } @@ -40,9 +40,12 @@ class WiFiNetworkDiagnosticsClusterDisconnectionEvent(val reasonCode: Int) { companion object { private const val TAG_REASON_CODE = 0 - fun fromTlv(tag: Tag, tlvReader: TlvReader): WiFiNetworkDiagnosticsClusterDisconnectionEvent { - tlvReader.enterStructure(tag) - val reasonCode = tlvReader.getInt(ContextSpecificTag(TAG_REASON_CODE)) + fun fromTlv( + tlvTag: Tag, + tlvReader: TlvReader + ): WiFiNetworkDiagnosticsClusterDisconnectionEvent { + tlvReader.enterStructure(tlvTag) + val reasonCode = tlvReader.getUInt(ContextSpecificTag(TAG_REASON_CODE)) tlvReader.exitContainer() diff --git a/src/controller/java/src/chip/devicecontroller/cluster/files.gni b/src/controller/java/generated/java/chip/devicecontroller/cluster/files.gni similarity index 92% rename from src/controller/java/src/chip/devicecontroller/cluster/files.gni rename to src/controller/java/generated/java/chip/devicecontroller/cluster/files.gni index c03d2afad86d59..7b067fdcef6e8b 100644 --- a/src/controller/java/src/chip/devicecontroller/cluster/files.gni +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/files.gni @@ -16,7 +16,6 @@ structs_sources = [ "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/BasicInformationClusterProductAppearanceStruct.kt", "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/BindingClusterTargetStruct.kt", "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/BridgedDeviceBasicInformationClusterProductAppearanceStruct.kt", - "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/CeramicFilterMonitoringClusterReplacementProductStruct.kt", "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ChannelClusterChannelInfoStruct.kt", "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ChannelClusterLineupInfoStruct.kt", "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ContentLauncherClusterAdditionalInfoStruct.kt", @@ -26,12 +25,11 @@ structs_sources = [ "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ContentLauncherClusterParameterStruct.kt", "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ContentLauncherClusterStyleInformationStruct.kt", "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/DescriptorClusterDeviceTypeStruct.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/DescriptorClusterSemanticTagStruct.kt", "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/DishwasherModeClusterModeOptionStruct.kt", "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/DishwasherModeClusterModeTagStruct.kt", "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/DoorLockClusterCredentialStruct.kt", - "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ElectrostaticFilterMonitoringClusterReplacementProductStruct.kt", "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/FixedLabelClusterLabelStruct.kt", - "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/FuelTankMonitoringClusterReplacementProductStruct.kt", "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/GeneralCommissioningClusterBasicCommissioningInfo.kt", "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/GeneralDiagnosticsClusterNetworkInterface.kt", "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/GroupKeyManagementClusterGroupInfoMapStruct.kt", @@ -39,8 +37,6 @@ structs_sources = [ "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/GroupKeyManagementClusterGroupKeySetStruct.kt", "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/HepaFilterMonitoringClusterReplacementProductStruct.kt", "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/IcdManagementClusterMonitoringRegistrationStruct.kt", - "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/InkCartridgeMonitoringClusterReplacementProductStruct.kt", - "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/IonizingFilterMonitoringClusterReplacementProductStruct.kt", "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/LaundryWasherModeClusterModeOptionStruct.kt", "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/LaundryWasherModeClusterModeTagStruct.kt", "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/MediaInputClusterInputInfoStruct.kt", @@ -55,7 +51,6 @@ structs_sources = [ "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/OperationalStateClusterErrorStateStruct.kt", "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/OperationalStateClusterOperationalStateStruct.kt", "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/OtaSoftwareUpdateRequestorClusterProviderLocation.kt", - "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/OzoneFilterMonitoringClusterReplacementProductStruct.kt", "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/PowerSourceClusterBatChargeFaultChangeType.kt", "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/PowerSourceClusterBatFaultChangeType.kt", "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/PowerSourceClusterWiredFaultChangeType.kt", @@ -80,7 +75,6 @@ structs_sources = [ "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/TimeSynchronizationClusterFabricScopedTrustedTimeSourceStruct.kt", "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/TimeSynchronizationClusterTimeZoneStruct.kt", "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/TimeSynchronizationClusterTrustedTimeSourceStruct.kt", - "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/TonerCartridgeMonitoringClusterReplacementProductStruct.kt", "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/UnitTestingClusterDoubleNestedStructList.kt", "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/UnitTestingClusterNestedStruct.kt", "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/UnitTestingClusterNestedStructList.kt", @@ -89,9 +83,6 @@ structs_sources = [ "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/UnitTestingClusterTestFabricScoped.kt", "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/UnitTestingClusterTestListStructOctet.kt", "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/UserLabelClusterLabelStruct.kt", - "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/UvFilterMonitoringClusterReplacementProductStruct.kt", - "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/WaterTankMonitoringClusterReplacementProductStruct.kt", - "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ZeoliteFilterMonitoringClusterReplacementProductStruct.kt", ] eventstructs_sources = [ @@ -108,15 +99,15 @@ eventstructs_sources = [ "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/DishwasherAlarmClusterNotifyEvent.kt", "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/DoorLockClusterDoorLockAlarmEvent.kt", "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/DoorLockClusterDoorStateChangeEvent.kt", - "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/DoorLockClusterLockOperationErrorEvent.kt", "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/DoorLockClusterLockOperationEvent.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/DoorLockClusterLockOperationErrorEvent.kt", "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/DoorLockClusterLockUserChangeEvent.kt", "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/GeneralDiagnosticsClusterBootReasonEvent.kt", "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/GeneralDiagnosticsClusterHardwareFaultChangeEvent.kt", "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/GeneralDiagnosticsClusterNetworkFaultChangeEvent.kt", "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/GeneralDiagnosticsClusterRadioFaultChangeEvent.kt", - "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/OperationalStateClusterOperationCompletionEvent.kt", "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/OperationalStateClusterOperationalErrorEvent.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/OperationalStateClusterOperationCompletionEvent.kt", "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/OtaSoftwareUpdateRequestorClusterDownloadErrorEvent.kt", "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/OtaSoftwareUpdateRequestorClusterStateTransitionEvent.kt", "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/OtaSoftwareUpdateRequestorClusterVersionAppliedEvent.kt", @@ -124,8 +115,8 @@ eventstructs_sources = [ "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/PowerSourceClusterBatFaultChangeEvent.kt", "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/PowerSourceClusterWiredFaultChangeEvent.kt", "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/RefrigeratorAlarmClusterNotifyEvent.kt", - "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/RvcOperationalStateClusterOperationCompletionEvent.kt", "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/RvcOperationalStateClusterOperationalErrorEvent.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/RvcOperationalStateClusterOperationCompletionEvent.kt", "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SmokeCoAlarmClusterCOAlarmEvent.kt", "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SmokeCoAlarmClusterInterconnectCOAlarmEvent.kt", "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SmokeCoAlarmClusterInterconnectSmokeAlarmEvent.kt", @@ -148,4 +139,4 @@ eventstructs_sources = [ "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/WiFiNetworkDiagnosticsClusterAssociationFailureEvent.kt", "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/WiFiNetworkDiagnosticsClusterConnectionStatusEvent.kt", "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/WiFiNetworkDiagnosticsClusterDisconnectionEvent.kt", -] +] \ No newline at end of file diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/AccessControlClusterAccessControlEntryStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/AccessControlClusterAccessControlEntryStruct.kt index 6daac4451c1833..899cd33e3a7971 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/AccessControlClusterAccessControlEntryStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/AccessControlClusterAccessControlEntryStruct.kt @@ -24,11 +24,11 @@ import chip.tlv.TlvReader import chip.tlv.TlvWriter class AccessControlClusterAccessControlEntryStruct( - val privilege: Int, - val authMode: Int, - val subjects: List?, + val privilege: UInt, + val authMode: UInt, + val subjects: List?, val targets: List?, - val fabricIndex: Int + val fabricIndex: UInt ) { override fun toString(): String = buildString { append("AccessControlClusterAccessControlEntryStruct {\n") @@ -40,26 +40,26 @@ class AccessControlClusterAccessControlEntryStruct( append("}\n") } - fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { tlvWriter.apply { - startStructure(tag) + startStructure(tlvTag) put(ContextSpecificTag(TAG_PRIVILEGE), privilege) put(ContextSpecificTag(TAG_AUTH_MODE), authMode) if (subjects != null) { - startList(ContextSpecificTag(TAG_SUBJECTS)) + startArray(ContextSpecificTag(TAG_SUBJECTS)) for (item in subjects.iterator()) { put(AnonymousTag, item) } - endList() + endArray() } else { putNull(ContextSpecificTag(TAG_SUBJECTS)) } if (targets != null) { - startList(ContextSpecificTag(TAG_TARGETS)) + startArray(ContextSpecificTag(TAG_TARGETS)) for (item in targets.iterator()) { item.toTlv(AnonymousTag, this) } - endList() + endArray() } else { putNull(ContextSpecificTag(TAG_TARGETS)) } @@ -75,16 +75,16 @@ class AccessControlClusterAccessControlEntryStruct( private const val TAG_TARGETS = 4 private const val TAG_FABRIC_INDEX = 254 - fun fromTlv(tag: Tag, tlvReader: TlvReader): AccessControlClusterAccessControlEntryStruct { - tlvReader.enterStructure(tag) - val privilege = tlvReader.getInt(ContextSpecificTag(TAG_PRIVILEGE)) - val authMode = tlvReader.getInt(ContextSpecificTag(TAG_AUTH_MODE)) + 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.enterList(ContextSpecificTag(TAG_SUBJECTS)) + buildList { + tlvReader.enterArray(ContextSpecificTag(TAG_SUBJECTS)) while (!tlvReader.isEndOfContainer()) { - add(tlvReader.getLong(AnonymousTag)) + add(tlvReader.getULong(AnonymousTag)) } tlvReader.exitContainer() } @@ -95,7 +95,7 @@ class AccessControlClusterAccessControlEntryStruct( val targets = if (!tlvReader.isNull()) { buildList { - tlvReader.enterList(ContextSpecificTag(TAG_TARGETS)) + tlvReader.enterArray(ContextSpecificTag(TAG_TARGETS)) while (!tlvReader.isEndOfContainer()) { add(AccessControlClusterAccessControlTargetStruct.fromTlv(AnonymousTag, tlvReader)) } @@ -105,7 +105,7 @@ class AccessControlClusterAccessControlEntryStruct( tlvReader.getNull(ContextSpecificTag(TAG_TARGETS)) null } - val fabricIndex = tlvReader.getInt(ContextSpecificTag(TAG_FABRIC_INDEX)) + val fabricIndex = tlvReader.getUInt(ContextSpecificTag(TAG_FABRIC_INDEX)) tlvReader.exitContainer() diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/AccessControlClusterAccessControlExtensionStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/AccessControlClusterAccessControlExtensionStruct.kt index 4a1d95221d816c..e63ac862b669d0 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/AccessControlClusterAccessControlExtensionStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/AccessControlClusterAccessControlExtensionStruct.kt @@ -22,7 +22,7 @@ import chip.tlv.Tag import chip.tlv.TlvReader import chip.tlv.TlvWriter -class AccessControlClusterAccessControlExtensionStruct(val data: ByteArray, val fabricIndex: Int) { +class AccessControlClusterAccessControlExtensionStruct(val data: ByteArray, val fabricIndex: UInt) { override fun toString(): String = buildString { append("AccessControlClusterAccessControlExtensionStruct {\n") append("\tdata : $data\n") @@ -30,9 +30,9 @@ class AccessControlClusterAccessControlExtensionStruct(val data: ByteArray, val append("}\n") } - fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { tlvWriter.apply { - startStructure(tag) + startStructure(tlvTag) put(ContextSpecificTag(TAG_DATA), data) put(ContextSpecificTag(TAG_FABRIC_INDEX), fabricIndex) endStructure() @@ -43,10 +43,13 @@ class AccessControlClusterAccessControlExtensionStruct(val data: ByteArray, val private const val TAG_DATA = 1 private const val TAG_FABRIC_INDEX = 254 - fun fromTlv(tag: Tag, tlvReader: TlvReader): AccessControlClusterAccessControlExtensionStruct { - tlvReader.enterStructure(tag) + fun fromTlv( + tlvTag: Tag, + tlvReader: TlvReader + ): AccessControlClusterAccessControlExtensionStruct { + tlvReader.enterStructure(tlvTag) val data = tlvReader.getByteArray(ContextSpecificTag(TAG_DATA)) - val fabricIndex = tlvReader.getInt(ContextSpecificTag(TAG_FABRIC_INDEX)) + val fabricIndex = tlvReader.getUInt(ContextSpecificTag(TAG_FABRIC_INDEX)) tlvReader.exitContainer() diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/AccessControlClusterAccessControlTargetStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/AccessControlClusterAccessControlTargetStruct.kt index e721aa3fefe91d..66a2934f2e69fa 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/AccessControlClusterAccessControlTargetStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/AccessControlClusterAccessControlTargetStruct.kt @@ -23,9 +23,9 @@ import chip.tlv.TlvReader import chip.tlv.TlvWriter class AccessControlClusterAccessControlTargetStruct( - val cluster: Long?, - val endpoint: Int?, - val deviceType: Long? + val cluster: ULong?, + val endpoint: UInt?, + val deviceType: ULong? ) { override fun toString(): String = buildString { append("AccessControlClusterAccessControlTargetStruct {\n") @@ -35,9 +35,9 @@ class AccessControlClusterAccessControlTargetStruct( append("}\n") } - fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { tlvWriter.apply { - startStructure(tag) + startStructure(tlvTag) if (cluster != null) { put(ContextSpecificTag(TAG_CLUSTER), cluster) } else { @@ -62,25 +62,25 @@ class AccessControlClusterAccessControlTargetStruct( private const val TAG_ENDPOINT = 1 private const val TAG_DEVICE_TYPE = 2 - fun fromTlv(tag: Tag, tlvReader: TlvReader): AccessControlClusterAccessControlTargetStruct { - tlvReader.enterStructure(tag) + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): AccessControlClusterAccessControlTargetStruct { + tlvReader.enterStructure(tlvTag) val cluster = if (!tlvReader.isNull()) { - tlvReader.getLong(ContextSpecificTag(TAG_CLUSTER)) + tlvReader.getULong(ContextSpecificTag(TAG_CLUSTER)) } else { tlvReader.getNull(ContextSpecificTag(TAG_CLUSTER)) null } val endpoint = if (!tlvReader.isNull()) { - tlvReader.getInt(ContextSpecificTag(TAG_ENDPOINT)) + tlvReader.getUInt(ContextSpecificTag(TAG_ENDPOINT)) } else { tlvReader.getNull(ContextSpecificTag(TAG_ENDPOINT)) null } val deviceType = if (!tlvReader.isNull()) { - tlvReader.getLong(ContextSpecificTag(TAG_DEVICE_TYPE)) + tlvReader.getULong(ContextSpecificTag(TAG_DEVICE_TYPE)) } else { tlvReader.getNull(ContextSpecificTag(TAG_DEVICE_TYPE)) null diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ActionsClusterActionStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ActionsClusterActionStruct.kt index 2ed7a3f08152be..b4e4934920d891 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ActionsClusterActionStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ActionsClusterActionStruct.kt @@ -23,12 +23,12 @@ import chip.tlv.TlvReader import chip.tlv.TlvWriter class ActionsClusterActionStruct( - val actionID: Int, + val actionID: UInt, val name: String, - val type: Int, - val endpointListID: Int, - val supportedCommands: Int, - val state: Int + val type: UInt, + val endpointListID: UInt, + val supportedCommands: UInt, + val state: UInt ) { override fun toString(): String = buildString { append("ActionsClusterActionStruct {\n") @@ -41,9 +41,9 @@ class ActionsClusterActionStruct( append("}\n") } - fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { tlvWriter.apply { - startStructure(tag) + startStructure(tlvTag) put(ContextSpecificTag(TAG_ACTION_I_D), actionID) put(ContextSpecificTag(TAG_NAME), name) put(ContextSpecificTag(TAG_TYPE), type) @@ -62,14 +62,14 @@ class ActionsClusterActionStruct( private const val TAG_SUPPORTED_COMMANDS = 4 private const val TAG_STATE = 5 - fun fromTlv(tag: Tag, tlvReader: TlvReader): ActionsClusterActionStruct { - tlvReader.enterStructure(tag) - val actionID = tlvReader.getInt(ContextSpecificTag(TAG_ACTION_I_D)) + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): ActionsClusterActionStruct { + tlvReader.enterStructure(tlvTag) + val actionID = tlvReader.getUInt(ContextSpecificTag(TAG_ACTION_I_D)) val name = tlvReader.getString(ContextSpecificTag(TAG_NAME)) - val type = tlvReader.getInt(ContextSpecificTag(TAG_TYPE)) - val endpointListID = tlvReader.getInt(ContextSpecificTag(TAG_ENDPOINT_LIST_I_D)) - val supportedCommands = tlvReader.getInt(ContextSpecificTag(TAG_SUPPORTED_COMMANDS)) - val state = tlvReader.getInt(ContextSpecificTag(TAG_STATE)) + val type = tlvReader.getUInt(ContextSpecificTag(TAG_TYPE)) + val endpointListID = tlvReader.getUInt(ContextSpecificTag(TAG_ENDPOINT_LIST_I_D)) + val supportedCommands = tlvReader.getUInt(ContextSpecificTag(TAG_SUPPORTED_COMMANDS)) + val state = tlvReader.getUInt(ContextSpecificTag(TAG_STATE)) tlvReader.exitContainer() diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ActionsClusterEndpointListStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ActionsClusterEndpointListStruct.kt index b714e693156957..ec2d01283892a5 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ActionsClusterEndpointListStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ActionsClusterEndpointListStruct.kt @@ -24,10 +24,10 @@ import chip.tlv.TlvReader import chip.tlv.TlvWriter class ActionsClusterEndpointListStruct( - val endpointListID: Int, + val endpointListID: UInt, val name: String, - val type: Int, - val endpoints: List + val type: UInt, + val endpoints: List ) { override fun toString(): String = buildString { append("ActionsClusterEndpointListStruct {\n") @@ -38,17 +38,17 @@ class ActionsClusterEndpointListStruct( append("}\n") } - fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { tlvWriter.apply { - startStructure(tag) + startStructure(tlvTag) put(ContextSpecificTag(TAG_ENDPOINT_LIST_I_D), endpointListID) put(ContextSpecificTag(TAG_NAME), name) put(ContextSpecificTag(TAG_TYPE), type) - startList(ContextSpecificTag(TAG_ENDPOINTS)) + startArray(ContextSpecificTag(TAG_ENDPOINTS)) for (item in endpoints.iterator()) { put(AnonymousTag, item) } - endList() + endArray() endStructure() } } @@ -59,16 +59,16 @@ class ActionsClusterEndpointListStruct( private const val TAG_TYPE = 2 private const val TAG_ENDPOINTS = 3 - fun fromTlv(tag: Tag, tlvReader: TlvReader): ActionsClusterEndpointListStruct { - tlvReader.enterStructure(tag) - val endpointListID = tlvReader.getInt(ContextSpecificTag(TAG_ENDPOINT_LIST_I_D)) + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): ActionsClusterEndpointListStruct { + tlvReader.enterStructure(tlvTag) + val endpointListID = tlvReader.getUInt(ContextSpecificTag(TAG_ENDPOINT_LIST_I_D)) val name = tlvReader.getString(ContextSpecificTag(TAG_NAME)) - val type = tlvReader.getInt(ContextSpecificTag(TAG_TYPE)) + val type = tlvReader.getUInt(ContextSpecificTag(TAG_TYPE)) val endpoints = - buildList { - tlvReader.enterList(ContextSpecificTag(TAG_ENDPOINTS)) + buildList { + tlvReader.enterArray(ContextSpecificTag(TAG_ENDPOINTS)) while (!tlvReader.isEndOfContainer()) { - add(tlvReader.getInt(AnonymousTag)) + add(tlvReader.getUInt(AnonymousTag)) } tlvReader.exitContainer() } diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ActivatedCarbonFilterMonitoringClusterReplacementProductStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ActivatedCarbonFilterMonitoringClusterReplacementProductStruct.kt index 68a44d37dfff0f..f74db41ebb5e47 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ActivatedCarbonFilterMonitoringClusterReplacementProductStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ActivatedCarbonFilterMonitoringClusterReplacementProductStruct.kt @@ -23,7 +23,7 @@ import chip.tlv.TlvReader import chip.tlv.TlvWriter class ActivatedCarbonFilterMonitoringClusterReplacementProductStruct( - val productIdentifierType: Int, + val productIdentifierType: UInt, val productIdentifierValue: String ) { override fun toString(): String = buildString { @@ -33,9 +33,9 @@ class ActivatedCarbonFilterMonitoringClusterReplacementProductStruct( append("}\n") } - fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { tlvWriter.apply { - startStructure(tag) + startStructure(tlvTag) put(ContextSpecificTag(TAG_PRODUCT_IDENTIFIER_TYPE), productIdentifierType) put(ContextSpecificTag(TAG_PRODUCT_IDENTIFIER_VALUE), productIdentifierValue) endStructure() @@ -47,11 +47,11 @@ class ActivatedCarbonFilterMonitoringClusterReplacementProductStruct( private const val TAG_PRODUCT_IDENTIFIER_VALUE = 1 fun fromTlv( - tag: Tag, + tlvTag: Tag, tlvReader: TlvReader ): ActivatedCarbonFilterMonitoringClusterReplacementProductStruct { - tlvReader.enterStructure(tag) - val productIdentifierType = tlvReader.getInt(ContextSpecificTag(TAG_PRODUCT_IDENTIFIER_TYPE)) + tlvReader.enterStructure(tlvTag) + val productIdentifierType = tlvReader.getUInt(ContextSpecificTag(TAG_PRODUCT_IDENTIFIER_TYPE)) val productIdentifierValue = tlvReader.getString(ContextSpecificTag(TAG_PRODUCT_IDENTIFIER_VALUE)) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ApplicationBasicClusterApplicationStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ApplicationBasicClusterApplicationStruct.kt index 21649a8ecc73df..90f30acf293649 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ApplicationBasicClusterApplicationStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ApplicationBasicClusterApplicationStruct.kt @@ -23,7 +23,7 @@ import chip.tlv.TlvReader import chip.tlv.TlvWriter class ApplicationBasicClusterApplicationStruct( - val catalogVendorID: Int, + val catalogVendorID: UInt, val applicationID: String ) { override fun toString(): String = buildString { @@ -33,9 +33,9 @@ class ApplicationBasicClusterApplicationStruct( append("}\n") } - fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { tlvWriter.apply { - startStructure(tag) + startStructure(tlvTag) put(ContextSpecificTag(TAG_CATALOG_VENDOR_I_D), catalogVendorID) put(ContextSpecificTag(TAG_APPLICATION_I_D), applicationID) endStructure() @@ -46,9 +46,9 @@ class ApplicationBasicClusterApplicationStruct( private const val TAG_CATALOG_VENDOR_I_D = 0 private const val TAG_APPLICATION_I_D = 1 - fun fromTlv(tag: Tag, tlvReader: TlvReader): ApplicationBasicClusterApplicationStruct { - tlvReader.enterStructure(tag) - val catalogVendorID = tlvReader.getInt(ContextSpecificTag(TAG_CATALOG_VENDOR_I_D)) + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): ApplicationBasicClusterApplicationStruct { + tlvReader.enterStructure(tlvTag) + val catalogVendorID = tlvReader.getUInt(ContextSpecificTag(TAG_CATALOG_VENDOR_I_D)) val applicationID = tlvReader.getString(ContextSpecificTag(TAG_APPLICATION_I_D)) tlvReader.exitContainer() diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ApplicationLauncherClusterApplicationEPStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ApplicationLauncherClusterApplicationEPStruct.kt index f710204737cb52..5d2150df995154 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ApplicationLauncherClusterApplicationEPStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ApplicationLauncherClusterApplicationEPStruct.kt @@ -25,7 +25,7 @@ import java.util.Optional class ApplicationLauncherClusterApplicationEPStruct( val application: ApplicationLauncherClusterApplicationStruct, - val endpoint: Optional + val endpoint: Optional ) { override fun toString(): String = buildString { append("ApplicationLauncherClusterApplicationEPStruct {\n") @@ -34,9 +34,9 @@ class ApplicationLauncherClusterApplicationEPStruct( append("}\n") } - fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { tlvWriter.apply { - startStructure(tag) + startStructure(tlvTag) application.toTlv(ContextSpecificTag(TAG_APPLICATION), this) if (endpoint.isPresent) { val optendpoint = endpoint.get() @@ -50,8 +50,8 @@ class ApplicationLauncherClusterApplicationEPStruct( private const val TAG_APPLICATION = 0 private const val TAG_ENDPOINT = 1 - fun fromTlv(tag: Tag, tlvReader: TlvReader): ApplicationLauncherClusterApplicationEPStruct { - tlvReader.enterStructure(tag) + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): ApplicationLauncherClusterApplicationEPStruct { + tlvReader.enterStructure(tlvTag) val application = ApplicationLauncherClusterApplicationStruct.fromTlv( ContextSpecificTag(TAG_APPLICATION), @@ -59,7 +59,7 @@ class ApplicationLauncherClusterApplicationEPStruct( ) val endpoint = if (tlvReader.isNextTag(ContextSpecificTag(TAG_ENDPOINT))) { - Optional.of(tlvReader.getInt(ContextSpecificTag(TAG_ENDPOINT))) + Optional.of(tlvReader.getUInt(ContextSpecificTag(TAG_ENDPOINT))) } else { Optional.empty() } diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ApplicationLauncherClusterApplicationStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ApplicationLauncherClusterApplicationStruct.kt index 68e78e31084c04..1c41c195633a7e 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ApplicationLauncherClusterApplicationStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ApplicationLauncherClusterApplicationStruct.kt @@ -23,7 +23,7 @@ import chip.tlv.TlvReader import chip.tlv.TlvWriter class ApplicationLauncherClusterApplicationStruct( - val catalogVendorID: Int, + val catalogVendorID: UInt, val applicationID: String ) { override fun toString(): String = buildString { @@ -33,9 +33,9 @@ class ApplicationLauncherClusterApplicationStruct( append("}\n") } - fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { tlvWriter.apply { - startStructure(tag) + startStructure(tlvTag) put(ContextSpecificTag(TAG_CATALOG_VENDOR_I_D), catalogVendorID) put(ContextSpecificTag(TAG_APPLICATION_I_D), applicationID) endStructure() @@ -46,9 +46,9 @@ class ApplicationLauncherClusterApplicationStruct( private const val TAG_CATALOG_VENDOR_I_D = 0 private const val TAG_APPLICATION_I_D = 1 - fun fromTlv(tag: Tag, tlvReader: TlvReader): ApplicationLauncherClusterApplicationStruct { - tlvReader.enterStructure(tag) - val catalogVendorID = tlvReader.getInt(ContextSpecificTag(TAG_CATALOG_VENDOR_I_D)) + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): ApplicationLauncherClusterApplicationStruct { + tlvReader.enterStructure(tlvTag) + val catalogVendorID = tlvReader.getUInt(ContextSpecificTag(TAG_CATALOG_VENDOR_I_D)) val applicationID = tlvReader.getString(ContextSpecificTag(TAG_APPLICATION_I_D)) tlvReader.exitContainer() diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/AudioOutputClusterOutputInfoStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/AudioOutputClusterOutputInfoStruct.kt index aef8596f19a83c..7779b13ac524a6 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/AudioOutputClusterOutputInfoStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/AudioOutputClusterOutputInfoStruct.kt @@ -22,7 +22,7 @@ import chip.tlv.Tag import chip.tlv.TlvReader import chip.tlv.TlvWriter -class AudioOutputClusterOutputInfoStruct(val index: Int, val outputType: Int, val name: String) { +class AudioOutputClusterOutputInfoStruct(val index: UInt, val outputType: UInt, val name: String) { override fun toString(): String = buildString { append("AudioOutputClusterOutputInfoStruct {\n") append("\tindex : $index\n") @@ -31,9 +31,9 @@ class AudioOutputClusterOutputInfoStruct(val index: Int, val outputType: Int, va append("}\n") } - fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { tlvWriter.apply { - startStructure(tag) + startStructure(tlvTag) put(ContextSpecificTag(TAG_INDEX), index) put(ContextSpecificTag(TAG_OUTPUT_TYPE), outputType) put(ContextSpecificTag(TAG_NAME), name) @@ -46,10 +46,10 @@ class AudioOutputClusterOutputInfoStruct(val index: Int, val outputType: Int, va private const val TAG_OUTPUT_TYPE = 1 private const val TAG_NAME = 2 - fun fromTlv(tag: Tag, tlvReader: TlvReader): AudioOutputClusterOutputInfoStruct { - tlvReader.enterStructure(tag) - val index = tlvReader.getInt(ContextSpecificTag(TAG_INDEX)) - val outputType = tlvReader.getInt(ContextSpecificTag(TAG_OUTPUT_TYPE)) + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): AudioOutputClusterOutputInfoStruct { + tlvReader.enterStructure(tlvTag) + val index = tlvReader.getUInt(ContextSpecificTag(TAG_INDEX)) + val outputType = tlvReader.getUInt(ContextSpecificTag(TAG_OUTPUT_TYPE)) val name = tlvReader.getString(ContextSpecificTag(TAG_NAME)) tlvReader.exitContainer() diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/BasicInformationClusterCapabilityMinimaStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/BasicInformationClusterCapabilityMinimaStruct.kt index e4f323b6321541..bd3aff9a19c4e0 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/BasicInformationClusterCapabilityMinimaStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/BasicInformationClusterCapabilityMinimaStruct.kt @@ -23,8 +23,8 @@ import chip.tlv.TlvReader import chip.tlv.TlvWriter class BasicInformationClusterCapabilityMinimaStruct( - val caseSessionsPerFabric: Int, - val subscriptionsPerFabric: Int + val caseSessionsPerFabric: UInt, + val subscriptionsPerFabric: UInt ) { override fun toString(): String = buildString { append("BasicInformationClusterCapabilityMinimaStruct {\n") @@ -33,9 +33,9 @@ class BasicInformationClusterCapabilityMinimaStruct( append("}\n") } - fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { tlvWriter.apply { - startStructure(tag) + startStructure(tlvTag) put(ContextSpecificTag(TAG_CASE_SESSIONS_PER_FABRIC), caseSessionsPerFabric) put(ContextSpecificTag(TAG_SUBSCRIPTIONS_PER_FABRIC), subscriptionsPerFabric) endStructure() @@ -46,11 +46,12 @@ class BasicInformationClusterCapabilityMinimaStruct( private const val TAG_CASE_SESSIONS_PER_FABRIC = 0 private const val TAG_SUBSCRIPTIONS_PER_FABRIC = 1 - fun fromTlv(tag: Tag, tlvReader: TlvReader): BasicInformationClusterCapabilityMinimaStruct { - tlvReader.enterStructure(tag) - val caseSessionsPerFabric = tlvReader.getInt(ContextSpecificTag(TAG_CASE_SESSIONS_PER_FABRIC)) + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): BasicInformationClusterCapabilityMinimaStruct { + tlvReader.enterStructure(tlvTag) + val caseSessionsPerFabric = + tlvReader.getUInt(ContextSpecificTag(TAG_CASE_SESSIONS_PER_FABRIC)) val subscriptionsPerFabric = - tlvReader.getInt(ContextSpecificTag(TAG_SUBSCRIPTIONS_PER_FABRIC)) + tlvReader.getUInt(ContextSpecificTag(TAG_SUBSCRIPTIONS_PER_FABRIC)) tlvReader.exitContainer() diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/BasicInformationClusterProductAppearanceStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/BasicInformationClusterProductAppearanceStruct.kt index 3678494c7b90fb..f9c7a87e4ae2b3 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/BasicInformationClusterProductAppearanceStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/BasicInformationClusterProductAppearanceStruct.kt @@ -22,7 +22,7 @@ import chip.tlv.Tag import chip.tlv.TlvReader import chip.tlv.TlvWriter -class BasicInformationClusterProductAppearanceStruct(val finish: Int, val primaryColor: Int?) { +class BasicInformationClusterProductAppearanceStruct(val finish: UInt, val primaryColor: UInt?) { override fun toString(): String = buildString { append("BasicInformationClusterProductAppearanceStruct {\n") append("\tfinish : $finish\n") @@ -30,9 +30,9 @@ class BasicInformationClusterProductAppearanceStruct(val finish: Int, val primar append("}\n") } - fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { tlvWriter.apply { - startStructure(tag) + startStructure(tlvTag) put(ContextSpecificTag(TAG_FINISH), finish) if (primaryColor != null) { put(ContextSpecificTag(TAG_PRIMARY_COLOR), primaryColor) @@ -47,12 +47,12 @@ class BasicInformationClusterProductAppearanceStruct(val finish: Int, val primar private const val TAG_FINISH = 0 private const val TAG_PRIMARY_COLOR = 1 - fun fromTlv(tag: Tag, tlvReader: TlvReader): BasicInformationClusterProductAppearanceStruct { - tlvReader.enterStructure(tag) - val finish = tlvReader.getInt(ContextSpecificTag(TAG_FINISH)) + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): BasicInformationClusterProductAppearanceStruct { + tlvReader.enterStructure(tlvTag) + val finish = tlvReader.getUInt(ContextSpecificTag(TAG_FINISH)) val primaryColor = if (!tlvReader.isNull()) { - tlvReader.getInt(ContextSpecificTag(TAG_PRIMARY_COLOR)) + tlvReader.getUInt(ContextSpecificTag(TAG_PRIMARY_COLOR)) } else { tlvReader.getNull(ContextSpecificTag(TAG_PRIMARY_COLOR)) null diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/BindingClusterTargetStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/BindingClusterTargetStruct.kt index 8ab0146b8e95f3..6af724a96da922 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/BindingClusterTargetStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/BindingClusterTargetStruct.kt @@ -24,11 +24,11 @@ import chip.tlv.TlvWriter import java.util.Optional class BindingClusterTargetStruct( - val node: Optional, - val group: Optional, - val endpoint: Optional, - val cluster: Optional, - val fabricIndex: Int + val node: Optional, + val group: Optional, + val endpoint: Optional, + val cluster: Optional, + val fabricIndex: UInt ) { override fun toString(): String = buildString { append("BindingClusterTargetStruct {\n") @@ -40,9 +40,9 @@ class BindingClusterTargetStruct( append("}\n") } - fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { tlvWriter.apply { - startStructure(tag) + startStructure(tlvTag) if (node.isPresent) { val optnode = node.get() put(ContextSpecificTag(TAG_NODE), optnode) @@ -71,33 +71,33 @@ class BindingClusterTargetStruct( private const val TAG_CLUSTER = 4 private const val TAG_FABRIC_INDEX = 254 - fun fromTlv(tag: Tag, tlvReader: TlvReader): BindingClusterTargetStruct { - tlvReader.enterStructure(tag) + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): BindingClusterTargetStruct { + tlvReader.enterStructure(tlvTag) val node = if (tlvReader.isNextTag(ContextSpecificTag(TAG_NODE))) { - Optional.of(tlvReader.getLong(ContextSpecificTag(TAG_NODE))) + Optional.of(tlvReader.getULong(ContextSpecificTag(TAG_NODE))) } else { Optional.empty() } val group = if (tlvReader.isNextTag(ContextSpecificTag(TAG_GROUP))) { - Optional.of(tlvReader.getInt(ContextSpecificTag(TAG_GROUP))) + Optional.of(tlvReader.getUInt(ContextSpecificTag(TAG_GROUP))) } else { Optional.empty() } val endpoint = if (tlvReader.isNextTag(ContextSpecificTag(TAG_ENDPOINT))) { - Optional.of(tlvReader.getInt(ContextSpecificTag(TAG_ENDPOINT))) + Optional.of(tlvReader.getUInt(ContextSpecificTag(TAG_ENDPOINT))) } else { Optional.empty() } val cluster = if (tlvReader.isNextTag(ContextSpecificTag(TAG_CLUSTER))) { - Optional.of(tlvReader.getLong(ContextSpecificTag(TAG_CLUSTER))) + Optional.of(tlvReader.getULong(ContextSpecificTag(TAG_CLUSTER))) } else { Optional.empty() } - val fabricIndex = tlvReader.getInt(ContextSpecificTag(TAG_FABRIC_INDEX)) + val fabricIndex = tlvReader.getUInt(ContextSpecificTag(TAG_FABRIC_INDEX)) tlvReader.exitContainer() diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/BridgedDeviceBasicInformationClusterProductAppearanceStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/BridgedDeviceBasicInformationClusterProductAppearanceStruct.kt index d1426bc0828631..7e6542ac48b265 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/BridgedDeviceBasicInformationClusterProductAppearanceStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/BridgedDeviceBasicInformationClusterProductAppearanceStruct.kt @@ -23,8 +23,8 @@ import chip.tlv.TlvReader import chip.tlv.TlvWriter class BridgedDeviceBasicInformationClusterProductAppearanceStruct( - val finish: Int, - val primaryColor: Int? + val finish: UInt, + val primaryColor: UInt? ) { override fun toString(): String = buildString { append("BridgedDeviceBasicInformationClusterProductAppearanceStruct {\n") @@ -33,9 +33,9 @@ class BridgedDeviceBasicInformationClusterProductAppearanceStruct( append("}\n") } - fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { tlvWriter.apply { - startStructure(tag) + startStructure(tlvTag) put(ContextSpecificTag(TAG_FINISH), finish) if (primaryColor != null) { put(ContextSpecificTag(TAG_PRIMARY_COLOR), primaryColor) @@ -51,14 +51,14 @@ class BridgedDeviceBasicInformationClusterProductAppearanceStruct( private const val TAG_PRIMARY_COLOR = 1 fun fromTlv( - tag: Tag, + tlvTag: Tag, tlvReader: TlvReader ): BridgedDeviceBasicInformationClusterProductAppearanceStruct { - tlvReader.enterStructure(tag) - val finish = tlvReader.getInt(ContextSpecificTag(TAG_FINISH)) + tlvReader.enterStructure(tlvTag) + val finish = tlvReader.getUInt(ContextSpecificTag(TAG_FINISH)) val primaryColor = if (!tlvReader.isNull()) { - tlvReader.getInt(ContextSpecificTag(TAG_PRIMARY_COLOR)) + tlvReader.getUInt(ContextSpecificTag(TAG_PRIMARY_COLOR)) } else { tlvReader.getNull(ContextSpecificTag(TAG_PRIMARY_COLOR)) null diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/CeramicFilterMonitoringClusterReplacementProductStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/CeramicFilterMonitoringClusterReplacementProductStruct.kt deleted file mode 100644 index 391f4d7ed01f40..00000000000000 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/CeramicFilterMonitoringClusterReplacementProductStruct.kt +++ /dev/null @@ -1,66 +0,0 @@ -/* - * - * 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 chip.devicecontroller.cluster.structs - -import chip.devicecontroller.cluster.* -import chip.tlv.ContextSpecificTag -import chip.tlv.Tag -import chip.tlv.TlvReader -import chip.tlv.TlvWriter - -class CeramicFilterMonitoringClusterReplacementProductStruct( - val productIdentifierType: Int, - val productIdentifierValue: String -) { - override fun toString(): String = buildString { - append("CeramicFilterMonitoringClusterReplacementProductStruct {\n") - append("\tproductIdentifierType : $productIdentifierType\n") - append("\tproductIdentifierValue : $productIdentifierValue\n") - append("}\n") - } - - fun toTlv(tag: Tag, tlvWriter: TlvWriter) { - tlvWriter.apply { - startStructure(tag) - 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( - tag: Tag, - tlvReader: TlvReader - ): CeramicFilterMonitoringClusterReplacementProductStruct { - tlvReader.enterStructure(tag) - val productIdentifierType = tlvReader.getInt(ContextSpecificTag(TAG_PRODUCT_IDENTIFIER_TYPE)) - val productIdentifierValue = - tlvReader.getString(ContextSpecificTag(TAG_PRODUCT_IDENTIFIER_VALUE)) - - tlvReader.exitContainer() - - return CeramicFilterMonitoringClusterReplacementProductStruct( - productIdentifierType, - productIdentifierValue - ) - } - } -} diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ChannelClusterChannelInfoStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ChannelClusterChannelInfoStruct.kt index 9d10bf6f24e5fa..e9ab1a0fce105e 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ChannelClusterChannelInfoStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ChannelClusterChannelInfoStruct.kt @@ -24,8 +24,8 @@ import chip.tlv.TlvWriter import java.util.Optional class ChannelClusterChannelInfoStruct( - val majorNumber: Int, - val minorNumber: Int, + val majorNumber: UInt, + val minorNumber: UInt, val name: Optional, val callSign: Optional, val affiliateCallSign: Optional @@ -40,9 +40,9 @@ class ChannelClusterChannelInfoStruct( append("}\n") } - fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { tlvWriter.apply { - startStructure(tag) + startStructure(tlvTag) put(ContextSpecificTag(TAG_MAJOR_NUMBER), majorNumber) put(ContextSpecificTag(TAG_MINOR_NUMBER), minorNumber) if (name.isPresent) { @@ -68,10 +68,10 @@ class ChannelClusterChannelInfoStruct( private const val TAG_CALL_SIGN = 3 private const val TAG_AFFILIATE_CALL_SIGN = 4 - fun fromTlv(tag: Tag, tlvReader: TlvReader): ChannelClusterChannelInfoStruct { - tlvReader.enterStructure(tag) - val majorNumber = tlvReader.getInt(ContextSpecificTag(TAG_MAJOR_NUMBER)) - val minorNumber = tlvReader.getInt(ContextSpecificTag(TAG_MINOR_NUMBER)) + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): ChannelClusterChannelInfoStruct { + tlvReader.enterStructure(tlvTag) + val majorNumber = tlvReader.getUInt(ContextSpecificTag(TAG_MAJOR_NUMBER)) + val minorNumber = tlvReader.getUInt(ContextSpecificTag(TAG_MINOR_NUMBER)) val name = if (tlvReader.isNextTag(ContextSpecificTag(TAG_NAME))) { Optional.of(tlvReader.getString(ContextSpecificTag(TAG_NAME))) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ChannelClusterLineupInfoStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ChannelClusterLineupInfoStruct.kt index edc8f9157db120..5bbb480e3aebd0 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ChannelClusterLineupInfoStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ChannelClusterLineupInfoStruct.kt @@ -27,7 +27,7 @@ class ChannelClusterLineupInfoStruct( val operatorName: String, val lineupName: Optional, val postalCode: Optional, - val lineupInfoType: Int + val lineupInfoType: UInt ) { override fun toString(): String = buildString { append("ChannelClusterLineupInfoStruct {\n") @@ -38,9 +38,9 @@ class ChannelClusterLineupInfoStruct( append("}\n") } - fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { tlvWriter.apply { - startStructure(tag) + startStructure(tlvTag) put(ContextSpecificTag(TAG_OPERATOR_NAME), operatorName) if (lineupName.isPresent) { val optlineupName = lineupName.get() @@ -61,8 +61,8 @@ class ChannelClusterLineupInfoStruct( private const val TAG_POSTAL_CODE = 2 private const val TAG_LINEUP_INFO_TYPE = 3 - fun fromTlv(tag: Tag, tlvReader: TlvReader): ChannelClusterLineupInfoStruct { - tlvReader.enterStructure(tag) + 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))) { @@ -76,7 +76,7 @@ class ChannelClusterLineupInfoStruct( } else { Optional.empty() } - val lineupInfoType = tlvReader.getInt(ContextSpecificTag(TAG_LINEUP_INFO_TYPE)) + val lineupInfoType = tlvReader.getUInt(ContextSpecificTag(TAG_LINEUP_INFO_TYPE)) tlvReader.exitContainer() diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ContentLauncherClusterAdditionalInfoStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ContentLauncherClusterAdditionalInfoStruct.kt index 0e1ebee9f97df2..2cff417bf75909 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ContentLauncherClusterAdditionalInfoStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ContentLauncherClusterAdditionalInfoStruct.kt @@ -30,9 +30,9 @@ class ContentLauncherClusterAdditionalInfoStruct(val name: String, val value: St append("}\n") } - fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { tlvWriter.apply { - startStructure(tag) + startStructure(tlvTag) put(ContextSpecificTag(TAG_NAME), name) put(ContextSpecificTag(TAG_VALUE), value) endStructure() @@ -43,8 +43,8 @@ class ContentLauncherClusterAdditionalInfoStruct(val name: String, val value: St private const val TAG_NAME = 0 private const val TAG_VALUE = 1 - fun fromTlv(tag: Tag, tlvReader: TlvReader): ContentLauncherClusterAdditionalInfoStruct { - tlvReader.enterStructure(tag) + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): ContentLauncherClusterAdditionalInfoStruct { + tlvReader.enterStructure(tlvTag) val name = tlvReader.getString(ContextSpecificTag(TAG_NAME)) val value = tlvReader.getString(ContextSpecificTag(TAG_VALUE)) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ContentLauncherClusterBrandingInformationStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ContentLauncherClusterBrandingInformationStruct.kt index 5f4719e9c00ef8..76b440a23d980f 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ContentLauncherClusterBrandingInformationStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ContentLauncherClusterBrandingInformationStruct.kt @@ -42,9 +42,9 @@ class ContentLauncherClusterBrandingInformationStruct( append("}\n") } - fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { tlvWriter.apply { - startStructure(tag) + startStructure(tlvTag) put(ContextSpecificTag(TAG_PROVIDER_NAME), providerName) if (background.isPresent) { val optbackground = background.get() @@ -78,8 +78,11 @@ class ContentLauncherClusterBrandingInformationStruct( private const val TAG_SPLASH = 4 private const val TAG_WATER_MARK = 5 - fun fromTlv(tag: Tag, tlvReader: TlvReader): ContentLauncherClusterBrandingInformationStruct { - tlvReader.enterStructure(tag) + 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))) { diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ContentLauncherClusterContentSearchStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ContentLauncherClusterContentSearchStruct.kt index 9457b03907a4fb..c75a249792a745 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ContentLauncherClusterContentSearchStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ContentLauncherClusterContentSearchStruct.kt @@ -32,14 +32,14 @@ class ContentLauncherClusterContentSearchStruct( append("}\n") } - fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { tlvWriter.apply { - startStructure(tag) - startList(ContextSpecificTag(TAG_PARAMETER_LIST)) + startStructure(tlvTag) + startArray(ContextSpecificTag(TAG_PARAMETER_LIST)) for (item in parameterList.iterator()) { item.toTlv(AnonymousTag, this) } - endList() + endArray() endStructure() } } @@ -47,11 +47,11 @@ class ContentLauncherClusterContentSearchStruct( companion object { private const val TAG_PARAMETER_LIST = 0 - fun fromTlv(tag: Tag, tlvReader: TlvReader): ContentLauncherClusterContentSearchStruct { - tlvReader.enterStructure(tag) + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): ContentLauncherClusterContentSearchStruct { + tlvReader.enterStructure(tlvTag) val parameterList = buildList { - tlvReader.enterList(ContextSpecificTag(TAG_PARAMETER_LIST)) + tlvReader.enterArray(ContextSpecificTag(TAG_PARAMETER_LIST)) while (!tlvReader.isEndOfContainer()) { add(ContentLauncherClusterParameterStruct.fromTlv(AnonymousTag, tlvReader)) } diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ContentLauncherClusterDimensionStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ContentLauncherClusterDimensionStruct.kt index a38245918bb476..ecfc7c75d7b8c3 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ContentLauncherClusterDimensionStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ContentLauncherClusterDimensionStruct.kt @@ -25,7 +25,7 @@ import chip.tlv.TlvWriter class ContentLauncherClusterDimensionStruct( val width: Double, val height: Double, - val metric: Int + val metric: UInt ) { override fun toString(): String = buildString { append("ContentLauncherClusterDimensionStruct {\n") @@ -35,9 +35,9 @@ class ContentLauncherClusterDimensionStruct( append("}\n") } - fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { tlvWriter.apply { - startStructure(tag) + startStructure(tlvTag) put(ContextSpecificTag(TAG_WIDTH), width) put(ContextSpecificTag(TAG_HEIGHT), height) put(ContextSpecificTag(TAG_METRIC), metric) @@ -50,11 +50,11 @@ class ContentLauncherClusterDimensionStruct( private const val TAG_HEIGHT = 1 private const val TAG_METRIC = 2 - fun fromTlv(tag: Tag, tlvReader: TlvReader): ContentLauncherClusterDimensionStruct { - tlvReader.enterStructure(tag) + 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.getInt(ContextSpecificTag(TAG_METRIC)) + val metric = tlvReader.getUInt(ContextSpecificTag(TAG_METRIC)) tlvReader.exitContainer() diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ContentLauncherClusterParameterStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ContentLauncherClusterParameterStruct.kt index caf0f99848c93c..f2c145c040c253 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ContentLauncherClusterParameterStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ContentLauncherClusterParameterStruct.kt @@ -25,7 +25,7 @@ import chip.tlv.TlvWriter import java.util.Optional class ContentLauncherClusterParameterStruct( - val type: Int, + val type: UInt, val value: String, val externalIDList: Optional> ) { @@ -37,18 +37,18 @@ class ContentLauncherClusterParameterStruct( append("}\n") } - fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { tlvWriter.apply { - startStructure(tag) + startStructure(tlvTag) put(ContextSpecificTag(TAG_TYPE), type) put(ContextSpecificTag(TAG_VALUE), value) if (externalIDList.isPresent) { val optexternalIDList = externalIDList.get() - startList(ContextSpecificTag(TAG_EXTERNAL_I_D_LIST)) + startArray(ContextSpecificTag(TAG_EXTERNAL_I_D_LIST)) for (item in optexternalIDList.iterator()) { item.toTlv(AnonymousTag, this) } - endList() + endArray() } endStructure() } @@ -59,15 +59,15 @@ class ContentLauncherClusterParameterStruct( private const val TAG_VALUE = 1 private const val TAG_EXTERNAL_I_D_LIST = 2 - fun fromTlv(tag: Tag, tlvReader: TlvReader): ContentLauncherClusterParameterStruct { - tlvReader.enterStructure(tag) - val type = tlvReader.getInt(ContextSpecificTag(TAG_TYPE)) + 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.enterList(ContextSpecificTag(TAG_EXTERNAL_I_D_LIST)) + tlvReader.enterArray(ContextSpecificTag(TAG_EXTERNAL_I_D_LIST)) while (!tlvReader.isEndOfContainer()) { add(ContentLauncherClusterAdditionalInfoStruct.fromTlv(AnonymousTag, tlvReader)) } diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ContentLauncherClusterStyleInformationStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ContentLauncherClusterStyleInformationStruct.kt index d5e686bbb5ac45..a6ee4223a61498 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ContentLauncherClusterStyleInformationStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ContentLauncherClusterStyleInformationStruct.kt @@ -36,9 +36,9 @@ class ContentLauncherClusterStyleInformationStruct( append("}\n") } - fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { tlvWriter.apply { - startStructure(tag) + startStructure(tlvTag) if (imageURL.isPresent) { val optimageURL = imageURL.get() put(ContextSpecificTag(TAG_IMAGE_U_R_L), optimageURL) @@ -60,8 +60,8 @@ class ContentLauncherClusterStyleInformationStruct( private const val TAG_COLOR = 1 private const val TAG_SIZE = 2 - fun fromTlv(tag: Tag, tlvReader: TlvReader): ContentLauncherClusterStyleInformationStruct { - tlvReader.enterStructure(tag) + 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))) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/DescriptorClusterDeviceTypeStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/DescriptorClusterDeviceTypeStruct.kt index 75fed36957e726..bea6ea0160ea02 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/DescriptorClusterDeviceTypeStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/DescriptorClusterDeviceTypeStruct.kt @@ -22,7 +22,7 @@ import chip.tlv.Tag import chip.tlv.TlvReader import chip.tlv.TlvWriter -class DescriptorClusterDeviceTypeStruct(val deviceType: Long, val revision: Int) { +class DescriptorClusterDeviceTypeStruct(val deviceType: ULong, val revision: UInt) { override fun toString(): String = buildString { append("DescriptorClusterDeviceTypeStruct {\n") append("\tdeviceType : $deviceType\n") @@ -30,9 +30,9 @@ class DescriptorClusterDeviceTypeStruct(val deviceType: Long, val revision: Int) append("}\n") } - fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { tlvWriter.apply { - startStructure(tag) + startStructure(tlvTag) put(ContextSpecificTag(TAG_DEVICE_TYPE), deviceType) put(ContextSpecificTag(TAG_REVISION), revision) endStructure() @@ -43,10 +43,10 @@ class DescriptorClusterDeviceTypeStruct(val deviceType: Long, val revision: Int) private const val TAG_DEVICE_TYPE = 0 private const val TAG_REVISION = 1 - fun fromTlv(tag: Tag, tlvReader: TlvReader): DescriptorClusterDeviceTypeStruct { - tlvReader.enterStructure(tag) - val deviceType = tlvReader.getLong(ContextSpecificTag(TAG_DEVICE_TYPE)) - val revision = tlvReader.getInt(ContextSpecificTag(TAG_REVISION)) + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): DescriptorClusterDeviceTypeStruct { + tlvReader.enterStructure(tlvTag) + val deviceType = tlvReader.getULong(ContextSpecificTag(TAG_DEVICE_TYPE)) + val revision = tlvReader.getUInt(ContextSpecificTag(TAG_REVISION)) tlvReader.exitContainer() diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/DescriptorClusterSemanticTagStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/DescriptorClusterSemanticTagStruct.kt index abde881ccffcea..89ae4aeaa6191e 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/DescriptorClusterSemanticTagStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/DescriptorClusterSemanticTagStruct.kt @@ -24,9 +24,9 @@ import chip.tlv.TlvWriter import java.util.Optional class DescriptorClusterSemanticTagStruct( - val mfgCode: Int?, - val namespaceID: Int, - val tag: Int, + val mfgCode: UInt?, + val namespaceID: UInt, + val tag: UInt, val label: Optional? ) { override fun toString(): String = buildString { @@ -38,9 +38,9 @@ class DescriptorClusterSemanticTagStruct( append("}\n") } - fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { tlvWriter.apply { - startStructure(tag) + startStructure(tlvTag) if (mfgCode != null) { put(ContextSpecificTag(TAG_MFG_CODE), mfgCode) } else { @@ -66,17 +66,17 @@ class DescriptorClusterSemanticTagStruct( private const val TAG_TAG = 2 private const val TAG_LABEL = 3 - fun fromTlv(tag: Tag, tlvReader: TlvReader): DescriptorClusterSemanticTagStruct { - tlvReader.enterStructure(tag) + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): DescriptorClusterSemanticTagStruct { + tlvReader.enterStructure(tlvTag) val mfgCode = if (!tlvReader.isNull()) { - tlvReader.getInt(ContextSpecificTag(TAG_MFG_CODE)) + tlvReader.getUInt(ContextSpecificTag(TAG_MFG_CODE)) } else { tlvReader.getNull(ContextSpecificTag(TAG_MFG_CODE)) null } - val namespaceID = tlvReader.getInt(ContextSpecificTag(TAG_NAMESPACE_I_D)) - val tag = tlvReader.getInt(ContextSpecificTag(TAG_TAG)) + 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))) { diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/DishwasherModeClusterModeOptionStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/DishwasherModeClusterModeOptionStruct.kt index 423d6a554672ce..4fe2dc62c81d63 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/DishwasherModeClusterModeOptionStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/DishwasherModeClusterModeOptionStruct.kt @@ -25,7 +25,7 @@ import chip.tlv.TlvWriter class DishwasherModeClusterModeOptionStruct( val label: String, - val mode: Int, + val mode: UInt, val modeTags: List ) { override fun toString(): String = buildString { @@ -36,16 +36,16 @@ class DishwasherModeClusterModeOptionStruct( append("}\n") } - fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { tlvWriter.apply { - startStructure(tag) + startStructure(tlvTag) put(ContextSpecificTag(TAG_LABEL), label) put(ContextSpecificTag(TAG_MODE), mode) - startList(ContextSpecificTag(TAG_MODE_TAGS)) + startArray(ContextSpecificTag(TAG_MODE_TAGS)) for (item in modeTags.iterator()) { item.toTlv(AnonymousTag, this) } - endList() + endArray() endStructure() } } @@ -55,13 +55,13 @@ class DishwasherModeClusterModeOptionStruct( private const val TAG_MODE = 1 private const val TAG_MODE_TAGS = 2 - fun fromTlv(tag: Tag, tlvReader: TlvReader): DishwasherModeClusterModeOptionStruct { - tlvReader.enterStructure(tag) + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): DishwasherModeClusterModeOptionStruct { + tlvReader.enterStructure(tlvTag) val label = tlvReader.getString(ContextSpecificTag(TAG_LABEL)) - val mode = tlvReader.getInt(ContextSpecificTag(TAG_MODE)) + val mode = tlvReader.getUInt(ContextSpecificTag(TAG_MODE)) val modeTags = buildList { - tlvReader.enterList(ContextSpecificTag(TAG_MODE_TAGS)) + tlvReader.enterArray(ContextSpecificTag(TAG_MODE_TAGS)) while (!tlvReader.isEndOfContainer()) { add(DishwasherModeClusterModeTagStruct.fromTlv(AnonymousTag, tlvReader)) } diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/DishwasherModeClusterModeTagStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/DishwasherModeClusterModeTagStruct.kt index 33881f4ac00c8d..8dafa12406c31a 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/DishwasherModeClusterModeTagStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/DishwasherModeClusterModeTagStruct.kt @@ -23,7 +23,7 @@ import chip.tlv.TlvReader import chip.tlv.TlvWriter import java.util.Optional -class DishwasherModeClusterModeTagStruct(val mfgCode: Optional, val value: Int) { +class DishwasherModeClusterModeTagStruct(val mfgCode: Optional, val value: UInt) { override fun toString(): String = buildString { append("DishwasherModeClusterModeTagStruct {\n") append("\tmfgCode : $mfgCode\n") @@ -31,9 +31,9 @@ class DishwasherModeClusterModeTagStruct(val mfgCode: Optional, val value: append("}\n") } - fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { tlvWriter.apply { - startStructure(tag) + startStructure(tlvTag) if (mfgCode.isPresent) { val optmfgCode = mfgCode.get() put(ContextSpecificTag(TAG_MFG_CODE), optmfgCode) @@ -47,15 +47,15 @@ class DishwasherModeClusterModeTagStruct(val mfgCode: Optional, val value: private const val TAG_MFG_CODE = 0 private const val TAG_VALUE = 1 - fun fromTlv(tag: Tag, tlvReader: TlvReader): DishwasherModeClusterModeTagStruct { - tlvReader.enterStructure(tag) + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): DishwasherModeClusterModeTagStruct { + tlvReader.enterStructure(tlvTag) val mfgCode = if (tlvReader.isNextTag(ContextSpecificTag(TAG_MFG_CODE))) { - Optional.of(tlvReader.getInt(ContextSpecificTag(TAG_MFG_CODE))) + Optional.of(tlvReader.getUInt(ContextSpecificTag(TAG_MFG_CODE))) } else { Optional.empty() } - val value = tlvReader.getInt(ContextSpecificTag(TAG_VALUE)) + val value = tlvReader.getUInt(ContextSpecificTag(TAG_VALUE)) tlvReader.exitContainer() diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/DoorLockClusterCredentialStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/DoorLockClusterCredentialStruct.kt index da3a551267eb09..7be75f6514b061 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/DoorLockClusterCredentialStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/DoorLockClusterCredentialStruct.kt @@ -22,7 +22,7 @@ import chip.tlv.Tag import chip.tlv.TlvReader import chip.tlv.TlvWriter -class DoorLockClusterCredentialStruct(val credentialType: Int, val credentialIndex: Int) { +class DoorLockClusterCredentialStruct(val credentialType: UInt, val credentialIndex: UInt) { override fun toString(): String = buildString { append("DoorLockClusterCredentialStruct {\n") append("\tcredentialType : $credentialType\n") @@ -30,9 +30,9 @@ class DoorLockClusterCredentialStruct(val credentialType: Int, val credentialInd append("}\n") } - fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { tlvWriter.apply { - startStructure(tag) + startStructure(tlvTag) put(ContextSpecificTag(TAG_CREDENTIAL_TYPE), credentialType) put(ContextSpecificTag(TAG_CREDENTIAL_INDEX), credentialIndex) endStructure() @@ -43,10 +43,10 @@ class DoorLockClusterCredentialStruct(val credentialType: Int, val credentialInd private const val TAG_CREDENTIAL_TYPE = 0 private const val TAG_CREDENTIAL_INDEX = 1 - fun fromTlv(tag: Tag, tlvReader: TlvReader): DoorLockClusterCredentialStruct { - tlvReader.enterStructure(tag) - val credentialType = tlvReader.getInt(ContextSpecificTag(TAG_CREDENTIAL_TYPE)) - val credentialIndex = tlvReader.getInt(ContextSpecificTag(TAG_CREDENTIAL_INDEX)) + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): DoorLockClusterCredentialStruct { + tlvReader.enterStructure(tlvTag) + val credentialType = tlvReader.getUInt(ContextSpecificTag(TAG_CREDENTIAL_TYPE)) + val credentialIndex = tlvReader.getUInt(ContextSpecificTag(TAG_CREDENTIAL_INDEX)) tlvReader.exitContainer() diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ElectrostaticFilterMonitoringClusterReplacementProductStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ElectrostaticFilterMonitoringClusterReplacementProductStruct.kt deleted file mode 100644 index 4997a33f64aebd..00000000000000 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ElectrostaticFilterMonitoringClusterReplacementProductStruct.kt +++ /dev/null @@ -1,66 +0,0 @@ -/* - * - * 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 chip.devicecontroller.cluster.structs - -import chip.devicecontroller.cluster.* -import chip.tlv.ContextSpecificTag -import chip.tlv.Tag -import chip.tlv.TlvReader -import chip.tlv.TlvWriter - -class ElectrostaticFilterMonitoringClusterReplacementProductStruct( - val productIdentifierType: Int, - val productIdentifierValue: String -) { - override fun toString(): String = buildString { - append("ElectrostaticFilterMonitoringClusterReplacementProductStruct {\n") - append("\tproductIdentifierType : $productIdentifierType\n") - append("\tproductIdentifierValue : $productIdentifierValue\n") - append("}\n") - } - - fun toTlv(tag: Tag, tlvWriter: TlvWriter) { - tlvWriter.apply { - startStructure(tag) - 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( - tag: Tag, - tlvReader: TlvReader - ): ElectrostaticFilterMonitoringClusterReplacementProductStruct { - tlvReader.enterStructure(tag) - val productIdentifierType = tlvReader.getInt(ContextSpecificTag(TAG_PRODUCT_IDENTIFIER_TYPE)) - val productIdentifierValue = - tlvReader.getString(ContextSpecificTag(TAG_PRODUCT_IDENTIFIER_VALUE)) - - tlvReader.exitContainer() - - return ElectrostaticFilterMonitoringClusterReplacementProductStruct( - productIdentifierType, - productIdentifierValue - ) - } - } -} diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/FixedLabelClusterLabelStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/FixedLabelClusterLabelStruct.kt index 09292f726d9467..9dec1ea651c3d1 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/FixedLabelClusterLabelStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/FixedLabelClusterLabelStruct.kt @@ -30,9 +30,9 @@ class FixedLabelClusterLabelStruct(val label: String, val value: String) { append("}\n") } - fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { tlvWriter.apply { - startStructure(tag) + startStructure(tlvTag) put(ContextSpecificTag(TAG_LABEL), label) put(ContextSpecificTag(TAG_VALUE), value) endStructure() @@ -43,8 +43,8 @@ class FixedLabelClusterLabelStruct(val label: String, val value: String) { private const val TAG_LABEL = 0 private const val TAG_VALUE = 1 - fun fromTlv(tag: Tag, tlvReader: TlvReader): FixedLabelClusterLabelStruct { - tlvReader.enterStructure(tag) + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): FixedLabelClusterLabelStruct { + tlvReader.enterStructure(tlvTag) val label = tlvReader.getString(ContextSpecificTag(TAG_LABEL)) val value = tlvReader.getString(ContextSpecificTag(TAG_VALUE)) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/FuelTankMonitoringClusterReplacementProductStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/FuelTankMonitoringClusterReplacementProductStruct.kt deleted file mode 100644 index 1df5be4e9e2320..00000000000000 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/FuelTankMonitoringClusterReplacementProductStruct.kt +++ /dev/null @@ -1,63 +0,0 @@ -/* - * - * 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 chip.devicecontroller.cluster.structs - -import chip.devicecontroller.cluster.* -import chip.tlv.ContextSpecificTag -import chip.tlv.Tag -import chip.tlv.TlvReader -import chip.tlv.TlvWriter - -class FuelTankMonitoringClusterReplacementProductStruct( - val productIdentifierType: Int, - val productIdentifierValue: String -) { - override fun toString(): String = buildString { - append("FuelTankMonitoringClusterReplacementProductStruct {\n") - append("\tproductIdentifierType : $productIdentifierType\n") - append("\tproductIdentifierValue : $productIdentifierValue\n") - append("}\n") - } - - fun toTlv(tag: Tag, tlvWriter: TlvWriter) { - tlvWriter.apply { - startStructure(tag) - 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(tag: Tag, tlvReader: TlvReader): FuelTankMonitoringClusterReplacementProductStruct { - tlvReader.enterStructure(tag) - val productIdentifierType = tlvReader.getInt(ContextSpecificTag(TAG_PRODUCT_IDENTIFIER_TYPE)) - val productIdentifierValue = - tlvReader.getString(ContextSpecificTag(TAG_PRODUCT_IDENTIFIER_VALUE)) - - tlvReader.exitContainer() - - return FuelTankMonitoringClusterReplacementProductStruct( - productIdentifierType, - productIdentifierValue - ) - } - } -} diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/GeneralCommissioningClusterBasicCommissioningInfo.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/GeneralCommissioningClusterBasicCommissioningInfo.kt index 60d10b41112a9d..d48e8ea6bc0a94 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/GeneralCommissioningClusterBasicCommissioningInfo.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/GeneralCommissioningClusterBasicCommissioningInfo.kt @@ -23,8 +23,8 @@ import chip.tlv.TlvReader import chip.tlv.TlvWriter class GeneralCommissioningClusterBasicCommissioningInfo( - val failSafeExpiryLengthSeconds: Int, - val maxCumulativeFailsafeSeconds: Int + val failSafeExpiryLengthSeconds: UInt, + val maxCumulativeFailsafeSeconds: UInt ) { override fun toString(): String = buildString { append("GeneralCommissioningClusterBasicCommissioningInfo {\n") @@ -33,9 +33,9 @@ class GeneralCommissioningClusterBasicCommissioningInfo( append("}\n") } - fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { tlvWriter.apply { - startStructure(tag) + startStructure(tlvTag) put(ContextSpecificTag(TAG_FAIL_SAFE_EXPIRY_LENGTH_SECONDS), failSafeExpiryLengthSeconds) put(ContextSpecificTag(TAG_MAX_CUMULATIVE_FAILSAFE_SECONDS), maxCumulativeFailsafeSeconds) endStructure() @@ -46,12 +46,15 @@ class GeneralCommissioningClusterBasicCommissioningInfo( private const val TAG_FAIL_SAFE_EXPIRY_LENGTH_SECONDS = 0 private const val TAG_MAX_CUMULATIVE_FAILSAFE_SECONDS = 1 - fun fromTlv(tag: Tag, tlvReader: TlvReader): GeneralCommissioningClusterBasicCommissioningInfo { - tlvReader.enterStructure(tag) + fun fromTlv( + tlvTag: Tag, + tlvReader: TlvReader + ): GeneralCommissioningClusterBasicCommissioningInfo { + tlvReader.enterStructure(tlvTag) val failSafeExpiryLengthSeconds = - tlvReader.getInt(ContextSpecificTag(TAG_FAIL_SAFE_EXPIRY_LENGTH_SECONDS)) + tlvReader.getUInt(ContextSpecificTag(TAG_FAIL_SAFE_EXPIRY_LENGTH_SECONDS)) val maxCumulativeFailsafeSeconds = - tlvReader.getInt(ContextSpecificTag(TAG_MAX_CUMULATIVE_FAILSAFE_SECONDS)) + tlvReader.getUInt(ContextSpecificTag(TAG_MAX_CUMULATIVE_FAILSAFE_SECONDS)) tlvReader.exitContainer() diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/GeneralDiagnosticsClusterNetworkInterface.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/GeneralDiagnosticsClusterNetworkInterface.kt index d4ff313520e65e..69d00dd8ef95cd 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/GeneralDiagnosticsClusterNetworkInterface.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/GeneralDiagnosticsClusterNetworkInterface.kt @@ -31,7 +31,7 @@ class GeneralDiagnosticsClusterNetworkInterface( val hardwareAddress: ByteArray, val IPv4Addresses: List, val IPv6Addresses: List, - val type: Int + val type: UInt ) { override fun toString(): String = buildString { append("GeneralDiagnosticsClusterNetworkInterface {\n") @@ -46,9 +46,9 @@ class GeneralDiagnosticsClusterNetworkInterface( append("}\n") } - fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { tlvWriter.apply { - startStructure(tag) + startStructure(tlvTag) put(ContextSpecificTag(TAG_NAME), name) put(ContextSpecificTag(TAG_IS_OPERATIONAL), isOperational) if (offPremiseServicesReachableIPv4 != null) { @@ -68,16 +68,16 @@ class GeneralDiagnosticsClusterNetworkInterface( putNull(ContextSpecificTag(TAG_OFF_PREMISE_SERVICES_REACHABLE_I_PV6)) } put(ContextSpecificTag(TAG_HARDWARE_ADDRESS), hardwareAddress) - startList(ContextSpecificTag(TAG_I_PV4_ADDRESSES)) + startArray(ContextSpecificTag(TAG_I_PV4_ADDRESSES)) for (item in IPv4Addresses.iterator()) { put(AnonymousTag, item) } - endList() - startList(ContextSpecificTag(TAG_I_PV6_ADDRESSES)) + endArray() + startArray(ContextSpecificTag(TAG_I_PV6_ADDRESSES)) for (item in IPv6Addresses.iterator()) { put(AnonymousTag, item) } - endList() + endArray() put(ContextSpecificTag(TAG_TYPE), type) endStructure() } @@ -93,8 +93,8 @@ class GeneralDiagnosticsClusterNetworkInterface( private const val TAG_I_PV6_ADDRESSES = 6 private const val TAG_TYPE = 7 - fun fromTlv(tag: Tag, tlvReader: TlvReader): GeneralDiagnosticsClusterNetworkInterface { - tlvReader.enterStructure(tag) + 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 = @@ -114,7 +114,7 @@ class GeneralDiagnosticsClusterNetworkInterface( val hardwareAddress = tlvReader.getByteArray(ContextSpecificTag(TAG_HARDWARE_ADDRESS)) val IPv4Addresses = buildList { - tlvReader.enterList(ContextSpecificTag(TAG_I_PV4_ADDRESSES)) + tlvReader.enterArray(ContextSpecificTag(TAG_I_PV4_ADDRESSES)) while (!tlvReader.isEndOfContainer()) { add(tlvReader.getByteArray(AnonymousTag)) } @@ -122,13 +122,13 @@ class GeneralDiagnosticsClusterNetworkInterface( } val IPv6Addresses = buildList { - tlvReader.enterList(ContextSpecificTag(TAG_I_PV6_ADDRESSES)) + tlvReader.enterArray(ContextSpecificTag(TAG_I_PV6_ADDRESSES)) while (!tlvReader.isEndOfContainer()) { add(tlvReader.getByteArray(AnonymousTag)) } tlvReader.exitContainer() } - val type = tlvReader.getInt(ContextSpecificTag(TAG_TYPE)) + val type = tlvReader.getUInt(ContextSpecificTag(TAG_TYPE)) tlvReader.exitContainer() diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/GroupKeyManagementClusterGroupInfoMapStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/GroupKeyManagementClusterGroupInfoMapStruct.kt index 6038b55d345b75..e9ba1255eae399 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/GroupKeyManagementClusterGroupInfoMapStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/GroupKeyManagementClusterGroupInfoMapStruct.kt @@ -25,10 +25,10 @@ import chip.tlv.TlvWriter import java.util.Optional class GroupKeyManagementClusterGroupInfoMapStruct( - val groupId: Int, - val endpoints: List, + val groupId: UInt, + val endpoints: List, val groupName: Optional, - val fabricIndex: Int + val fabricIndex: UInt ) { override fun toString(): String = buildString { append("GroupKeyManagementClusterGroupInfoMapStruct {\n") @@ -39,15 +39,15 @@ class GroupKeyManagementClusterGroupInfoMapStruct( append("}\n") } - fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { tlvWriter.apply { - startStructure(tag) + startStructure(tlvTag) put(ContextSpecificTag(TAG_GROUP_ID), groupId) - startList(ContextSpecificTag(TAG_ENDPOINTS)) + startArray(ContextSpecificTag(TAG_ENDPOINTS)) for (item in endpoints.iterator()) { put(AnonymousTag, item) } - endList() + endArray() if (groupName.isPresent) { val optgroupName = groupName.get() put(ContextSpecificTag(TAG_GROUP_NAME), optgroupName) @@ -63,14 +63,14 @@ class GroupKeyManagementClusterGroupInfoMapStruct( private const val TAG_GROUP_NAME = 3 private const val TAG_FABRIC_INDEX = 254 - fun fromTlv(tag: Tag, tlvReader: TlvReader): GroupKeyManagementClusterGroupInfoMapStruct { - tlvReader.enterStructure(tag) - val groupId = tlvReader.getInt(ContextSpecificTag(TAG_GROUP_ID)) + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): GroupKeyManagementClusterGroupInfoMapStruct { + tlvReader.enterStructure(tlvTag) + val groupId = tlvReader.getUInt(ContextSpecificTag(TAG_GROUP_ID)) val endpoints = - buildList { - tlvReader.enterList(ContextSpecificTag(TAG_ENDPOINTS)) + buildList { + tlvReader.enterArray(ContextSpecificTag(TAG_ENDPOINTS)) while (!tlvReader.isEndOfContainer()) { - add(tlvReader.getInt(AnonymousTag)) + add(tlvReader.getUInt(AnonymousTag)) } tlvReader.exitContainer() } @@ -80,7 +80,7 @@ class GroupKeyManagementClusterGroupInfoMapStruct( } else { Optional.empty() } - val fabricIndex = tlvReader.getInt(ContextSpecificTag(TAG_FABRIC_INDEX)) + val fabricIndex = tlvReader.getUInt(ContextSpecificTag(TAG_FABRIC_INDEX)) tlvReader.exitContainer() diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/GroupKeyManagementClusterGroupKeyMapStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/GroupKeyManagementClusterGroupKeyMapStruct.kt index d565d70233abc2..28d407c54abc97 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/GroupKeyManagementClusterGroupKeyMapStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/GroupKeyManagementClusterGroupKeyMapStruct.kt @@ -23,9 +23,9 @@ import chip.tlv.TlvReader import chip.tlv.TlvWriter class GroupKeyManagementClusterGroupKeyMapStruct( - val groupId: Int, - val groupKeySetID: Int, - val fabricIndex: Int + val groupId: UInt, + val groupKeySetID: UInt, + val fabricIndex: UInt ) { override fun toString(): String = buildString { append("GroupKeyManagementClusterGroupKeyMapStruct {\n") @@ -35,9 +35,9 @@ class GroupKeyManagementClusterGroupKeyMapStruct( append("}\n") } - fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { tlvWriter.apply { - startStructure(tag) + startStructure(tlvTag) put(ContextSpecificTag(TAG_GROUP_ID), groupId) put(ContextSpecificTag(TAG_GROUP_KEY_SET_I_D), groupKeySetID) put(ContextSpecificTag(TAG_FABRIC_INDEX), fabricIndex) @@ -50,11 +50,11 @@ class GroupKeyManagementClusterGroupKeyMapStruct( private const val TAG_GROUP_KEY_SET_I_D = 2 private const val TAG_FABRIC_INDEX = 254 - fun fromTlv(tag: Tag, tlvReader: TlvReader): GroupKeyManagementClusterGroupKeyMapStruct { - tlvReader.enterStructure(tag) - val groupId = tlvReader.getInt(ContextSpecificTag(TAG_GROUP_ID)) - val groupKeySetID = tlvReader.getInt(ContextSpecificTag(TAG_GROUP_KEY_SET_I_D)) - val fabricIndex = tlvReader.getInt(ContextSpecificTag(TAG_FABRIC_INDEX)) + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): GroupKeyManagementClusterGroupKeyMapStruct { + tlvReader.enterStructure(tlvTag) + val groupId = tlvReader.getUInt(ContextSpecificTag(TAG_GROUP_ID)) + val groupKeySetID = tlvReader.getUInt(ContextSpecificTag(TAG_GROUP_KEY_SET_I_D)) + val fabricIndex = tlvReader.getUInt(ContextSpecificTag(TAG_FABRIC_INDEX)) tlvReader.exitContainer() diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/GroupKeyManagementClusterGroupKeySetStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/GroupKeyManagementClusterGroupKeySetStruct.kt index 418b6037ae46c9..1e08987ed4fbcb 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/GroupKeyManagementClusterGroupKeySetStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/GroupKeyManagementClusterGroupKeySetStruct.kt @@ -23,14 +23,14 @@ import chip.tlv.TlvReader import chip.tlv.TlvWriter class GroupKeyManagementClusterGroupKeySetStruct( - val groupKeySetID: Int, - val groupKeySecurityPolicy: Int, + val groupKeySetID: UInt, + val groupKeySecurityPolicy: UInt, val epochKey0: ByteArray?, - val epochStartTime0: Long?, + val epochStartTime0: ULong?, val epochKey1: ByteArray?, - val epochStartTime1: Long?, + val epochStartTime1: ULong?, val epochKey2: ByteArray?, - val epochStartTime2: Long? + val epochStartTime2: ULong? ) { override fun toString(): String = buildString { append("GroupKeyManagementClusterGroupKeySetStruct {\n") @@ -45,9 +45,9 @@ class GroupKeyManagementClusterGroupKeySetStruct( append("}\n") } - fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { tlvWriter.apply { - startStructure(tag) + startStructure(tlvTag) put(ContextSpecificTag(TAG_GROUP_KEY_SET_I_D), groupKeySetID) put(ContextSpecificTag(TAG_GROUP_KEY_SECURITY_POLICY), groupKeySecurityPolicy) if (epochKey0 != null) { @@ -94,11 +94,11 @@ class GroupKeyManagementClusterGroupKeySetStruct( private const val TAG_EPOCH_KEY2 = 6 private const val TAG_EPOCH_START_TIME2 = 7 - fun fromTlv(tag: Tag, tlvReader: TlvReader): GroupKeyManagementClusterGroupKeySetStruct { - tlvReader.enterStructure(tag) - val groupKeySetID = tlvReader.getInt(ContextSpecificTag(TAG_GROUP_KEY_SET_I_D)) + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): GroupKeyManagementClusterGroupKeySetStruct { + tlvReader.enterStructure(tlvTag) + val groupKeySetID = tlvReader.getUInt(ContextSpecificTag(TAG_GROUP_KEY_SET_I_D)) val groupKeySecurityPolicy = - tlvReader.getInt(ContextSpecificTag(TAG_GROUP_KEY_SECURITY_POLICY)) + tlvReader.getUInt(ContextSpecificTag(TAG_GROUP_KEY_SECURITY_POLICY)) val epochKey0 = if (!tlvReader.isNull()) { tlvReader.getByteArray(ContextSpecificTag(TAG_EPOCH_KEY0)) @@ -108,7 +108,7 @@ class GroupKeyManagementClusterGroupKeySetStruct( } val epochStartTime0 = if (!tlvReader.isNull()) { - tlvReader.getLong(ContextSpecificTag(TAG_EPOCH_START_TIME0)) + tlvReader.getULong(ContextSpecificTag(TAG_EPOCH_START_TIME0)) } else { tlvReader.getNull(ContextSpecificTag(TAG_EPOCH_START_TIME0)) null @@ -122,7 +122,7 @@ class GroupKeyManagementClusterGroupKeySetStruct( } val epochStartTime1 = if (!tlvReader.isNull()) { - tlvReader.getLong(ContextSpecificTag(TAG_EPOCH_START_TIME1)) + tlvReader.getULong(ContextSpecificTag(TAG_EPOCH_START_TIME1)) } else { tlvReader.getNull(ContextSpecificTag(TAG_EPOCH_START_TIME1)) null @@ -136,7 +136,7 @@ class GroupKeyManagementClusterGroupKeySetStruct( } val epochStartTime2 = if (!tlvReader.isNull()) { - tlvReader.getLong(ContextSpecificTag(TAG_EPOCH_START_TIME2)) + tlvReader.getULong(ContextSpecificTag(TAG_EPOCH_START_TIME2)) } else { tlvReader.getNull(ContextSpecificTag(TAG_EPOCH_START_TIME2)) null diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/HepaFilterMonitoringClusterReplacementProductStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/HepaFilterMonitoringClusterReplacementProductStruct.kt index a86ba8db2dee0a..aa6e5b87ff95b1 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/HepaFilterMonitoringClusterReplacementProductStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/HepaFilterMonitoringClusterReplacementProductStruct.kt @@ -23,7 +23,7 @@ import chip.tlv.TlvReader import chip.tlv.TlvWriter class HepaFilterMonitoringClusterReplacementProductStruct( - val productIdentifierType: Int, + val productIdentifierType: UInt, val productIdentifierValue: String ) { override fun toString(): String = buildString { @@ -33,9 +33,9 @@ class HepaFilterMonitoringClusterReplacementProductStruct( append("}\n") } - fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { tlvWriter.apply { - startStructure(tag) + startStructure(tlvTag) put(ContextSpecificTag(TAG_PRODUCT_IDENTIFIER_TYPE), productIdentifierType) put(ContextSpecificTag(TAG_PRODUCT_IDENTIFIER_VALUE), productIdentifierValue) endStructure() @@ -47,11 +47,11 @@ class HepaFilterMonitoringClusterReplacementProductStruct( private const val TAG_PRODUCT_IDENTIFIER_VALUE = 1 fun fromTlv( - tag: Tag, + tlvTag: Tag, tlvReader: TlvReader ): HepaFilterMonitoringClusterReplacementProductStruct { - tlvReader.enterStructure(tag) - val productIdentifierType = tlvReader.getInt(ContextSpecificTag(TAG_PRODUCT_IDENTIFIER_TYPE)) + tlvReader.enterStructure(tlvTag) + val productIdentifierType = tlvReader.getUInt(ContextSpecificTag(TAG_PRODUCT_IDENTIFIER_TYPE)) val productIdentifierValue = tlvReader.getString(ContextSpecificTag(TAG_PRODUCT_IDENTIFIER_VALUE)) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/IcdManagementClusterMonitoringRegistrationStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/IcdManagementClusterMonitoringRegistrationStruct.kt index d380689bed016f..d7b59660342a48 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/IcdManagementClusterMonitoringRegistrationStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/IcdManagementClusterMonitoringRegistrationStruct.kt @@ -23,10 +23,10 @@ import chip.tlv.TlvReader import chip.tlv.TlvWriter class IcdManagementClusterMonitoringRegistrationStruct( - val checkInNodeID: Long, - val monitoredSubject: Long, + val checkInNodeID: ULong, + val monitoredSubject: ULong, val key: ByteArray, - val fabricIndex: Int + val fabricIndex: UInt ) { override fun toString(): String = buildString { append("IcdManagementClusterMonitoringRegistrationStruct {\n") @@ -37,9 +37,9 @@ class IcdManagementClusterMonitoringRegistrationStruct( append("}\n") } - fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { tlvWriter.apply { - startStructure(tag) + startStructure(tlvTag) put(ContextSpecificTag(TAG_CHECK_IN_NODE_I_D), checkInNodeID) put(ContextSpecificTag(TAG_MONITORED_SUBJECT), monitoredSubject) put(ContextSpecificTag(TAG_KEY), key) @@ -54,12 +54,15 @@ class IcdManagementClusterMonitoringRegistrationStruct( private const val TAG_KEY = 3 private const val TAG_FABRIC_INDEX = 254 - fun fromTlv(tag: Tag, tlvReader: TlvReader): IcdManagementClusterMonitoringRegistrationStruct { - tlvReader.enterStructure(tag) - val checkInNodeID = tlvReader.getLong(ContextSpecificTag(TAG_CHECK_IN_NODE_I_D)) - val monitoredSubject = tlvReader.getLong(ContextSpecificTag(TAG_MONITORED_SUBJECT)) + 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 key = tlvReader.getByteArray(ContextSpecificTag(TAG_KEY)) - val fabricIndex = tlvReader.getInt(ContextSpecificTag(TAG_FABRIC_INDEX)) + val fabricIndex = tlvReader.getUInt(ContextSpecificTag(TAG_FABRIC_INDEX)) tlvReader.exitContainer() diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/InkCartridgeMonitoringClusterReplacementProductStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/InkCartridgeMonitoringClusterReplacementProductStruct.kt deleted file mode 100644 index 114ffa845ce245..00000000000000 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/InkCartridgeMonitoringClusterReplacementProductStruct.kt +++ /dev/null @@ -1,66 +0,0 @@ -/* - * - * 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 chip.devicecontroller.cluster.structs - -import chip.devicecontroller.cluster.* -import chip.tlv.ContextSpecificTag -import chip.tlv.Tag -import chip.tlv.TlvReader -import chip.tlv.TlvWriter - -class InkCartridgeMonitoringClusterReplacementProductStruct( - val productIdentifierType: Int, - val productIdentifierValue: String -) { - override fun toString(): String = buildString { - append("InkCartridgeMonitoringClusterReplacementProductStruct {\n") - append("\tproductIdentifierType : $productIdentifierType\n") - append("\tproductIdentifierValue : $productIdentifierValue\n") - append("}\n") - } - - fun toTlv(tag: Tag, tlvWriter: TlvWriter) { - tlvWriter.apply { - startStructure(tag) - 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( - tag: Tag, - tlvReader: TlvReader - ): InkCartridgeMonitoringClusterReplacementProductStruct { - tlvReader.enterStructure(tag) - val productIdentifierType = tlvReader.getInt(ContextSpecificTag(TAG_PRODUCT_IDENTIFIER_TYPE)) - val productIdentifierValue = - tlvReader.getString(ContextSpecificTag(TAG_PRODUCT_IDENTIFIER_VALUE)) - - tlvReader.exitContainer() - - return InkCartridgeMonitoringClusterReplacementProductStruct( - productIdentifierType, - productIdentifierValue - ) - } - } -} diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/IonizingFilterMonitoringClusterReplacementProductStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/IonizingFilterMonitoringClusterReplacementProductStruct.kt deleted file mode 100644 index d90f06e6504f06..00000000000000 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/IonizingFilterMonitoringClusterReplacementProductStruct.kt +++ /dev/null @@ -1,66 +0,0 @@ -/* - * - * 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 chip.devicecontroller.cluster.structs - -import chip.devicecontroller.cluster.* -import chip.tlv.ContextSpecificTag -import chip.tlv.Tag -import chip.tlv.TlvReader -import chip.tlv.TlvWriter - -class IonizingFilterMonitoringClusterReplacementProductStruct( - val productIdentifierType: Int, - val productIdentifierValue: String -) { - override fun toString(): String = buildString { - append("IonizingFilterMonitoringClusterReplacementProductStruct {\n") - append("\tproductIdentifierType : $productIdentifierType\n") - append("\tproductIdentifierValue : $productIdentifierValue\n") - append("}\n") - } - - fun toTlv(tag: Tag, tlvWriter: TlvWriter) { - tlvWriter.apply { - startStructure(tag) - 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( - tag: Tag, - tlvReader: TlvReader - ): IonizingFilterMonitoringClusterReplacementProductStruct { - tlvReader.enterStructure(tag) - val productIdentifierType = tlvReader.getInt(ContextSpecificTag(TAG_PRODUCT_IDENTIFIER_TYPE)) - val productIdentifierValue = - tlvReader.getString(ContextSpecificTag(TAG_PRODUCT_IDENTIFIER_VALUE)) - - tlvReader.exitContainer() - - return IonizingFilterMonitoringClusterReplacementProductStruct( - productIdentifierType, - productIdentifierValue - ) - } - } -} diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/LaundryWasherModeClusterModeOptionStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/LaundryWasherModeClusterModeOptionStruct.kt index eeab9e95eb7cce..1d38d4b031dbac 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/LaundryWasherModeClusterModeOptionStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/LaundryWasherModeClusterModeOptionStruct.kt @@ -25,7 +25,7 @@ import chip.tlv.TlvWriter class LaundryWasherModeClusterModeOptionStruct( val label: String, - val mode: Int, + val mode: UInt, val modeTags: List ) { override fun toString(): String = buildString { @@ -36,16 +36,16 @@ class LaundryWasherModeClusterModeOptionStruct( append("}\n") } - fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { tlvWriter.apply { - startStructure(tag) + startStructure(tlvTag) put(ContextSpecificTag(TAG_LABEL), label) put(ContextSpecificTag(TAG_MODE), mode) - startList(ContextSpecificTag(TAG_MODE_TAGS)) + startArray(ContextSpecificTag(TAG_MODE_TAGS)) for (item in modeTags.iterator()) { item.toTlv(AnonymousTag, this) } - endList() + endArray() endStructure() } } @@ -55,13 +55,13 @@ class LaundryWasherModeClusterModeOptionStruct( private const val TAG_MODE = 1 private const val TAG_MODE_TAGS = 2 - fun fromTlv(tag: Tag, tlvReader: TlvReader): LaundryWasherModeClusterModeOptionStruct { - tlvReader.enterStructure(tag) + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): LaundryWasherModeClusterModeOptionStruct { + tlvReader.enterStructure(tlvTag) val label = tlvReader.getString(ContextSpecificTag(TAG_LABEL)) - val mode = tlvReader.getInt(ContextSpecificTag(TAG_MODE)) + val mode = tlvReader.getUInt(ContextSpecificTag(TAG_MODE)) val modeTags = buildList { - tlvReader.enterList(ContextSpecificTag(TAG_MODE_TAGS)) + tlvReader.enterArray(ContextSpecificTag(TAG_MODE_TAGS)) while (!tlvReader.isEndOfContainer()) { add(LaundryWasherModeClusterModeTagStruct.fromTlv(AnonymousTag, tlvReader)) } diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/LaundryWasherModeClusterModeTagStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/LaundryWasherModeClusterModeTagStruct.kt index eed09912c26a9c..4449be2667b1a7 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/LaundryWasherModeClusterModeTagStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/LaundryWasherModeClusterModeTagStruct.kt @@ -23,7 +23,7 @@ import chip.tlv.TlvReader import chip.tlv.TlvWriter import java.util.Optional -class LaundryWasherModeClusterModeTagStruct(val mfgCode: Optional, val value: Int) { +class LaundryWasherModeClusterModeTagStruct(val mfgCode: Optional, val value: UInt) { override fun toString(): String = buildString { append("LaundryWasherModeClusterModeTagStruct {\n") append("\tmfgCode : $mfgCode\n") @@ -31,9 +31,9 @@ class LaundryWasherModeClusterModeTagStruct(val mfgCode: Optional, val valu append("}\n") } - fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { tlvWriter.apply { - startStructure(tag) + startStructure(tlvTag) if (mfgCode.isPresent) { val optmfgCode = mfgCode.get() put(ContextSpecificTag(TAG_MFG_CODE), optmfgCode) @@ -47,15 +47,15 @@ class LaundryWasherModeClusterModeTagStruct(val mfgCode: Optional, val valu private const val TAG_MFG_CODE = 0 private const val TAG_VALUE = 1 - fun fromTlv(tag: Tag, tlvReader: TlvReader): LaundryWasherModeClusterModeTagStruct { - tlvReader.enterStructure(tag) + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): LaundryWasherModeClusterModeTagStruct { + tlvReader.enterStructure(tlvTag) val mfgCode = if (tlvReader.isNextTag(ContextSpecificTag(TAG_MFG_CODE))) { - Optional.of(tlvReader.getInt(ContextSpecificTag(TAG_MFG_CODE))) + Optional.of(tlvReader.getUInt(ContextSpecificTag(TAG_MFG_CODE))) } else { Optional.empty() } - val value = tlvReader.getInt(ContextSpecificTag(TAG_VALUE)) + val value = tlvReader.getUInt(ContextSpecificTag(TAG_VALUE)) tlvReader.exitContainer() diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/MediaInputClusterInputInfoStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/MediaInputClusterInputInfoStruct.kt index 514c05d19f6fdf..2d2cd6c03d40e2 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/MediaInputClusterInputInfoStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/MediaInputClusterInputInfoStruct.kt @@ -23,8 +23,8 @@ import chip.tlv.TlvReader import chip.tlv.TlvWriter class MediaInputClusterInputInfoStruct( - val index: Int, - val inputType: Int, + val index: UInt, + val inputType: UInt, val name: String, val description: String ) { @@ -37,9 +37,9 @@ class MediaInputClusterInputInfoStruct( append("}\n") } - fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { tlvWriter.apply { - startStructure(tag) + startStructure(tlvTag) put(ContextSpecificTag(TAG_INDEX), index) put(ContextSpecificTag(TAG_INPUT_TYPE), inputType) put(ContextSpecificTag(TAG_NAME), name) @@ -54,10 +54,10 @@ class MediaInputClusterInputInfoStruct( private const val TAG_NAME = 2 private const val TAG_DESCRIPTION = 3 - fun fromTlv(tag: Tag, tlvReader: TlvReader): MediaInputClusterInputInfoStruct { - tlvReader.enterStructure(tag) - val index = tlvReader.getInt(ContextSpecificTag(TAG_INDEX)) - val inputType = tlvReader.getInt(ContextSpecificTag(TAG_INPUT_TYPE)) + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): MediaInputClusterInputInfoStruct { + tlvReader.enterStructure(tlvTag) + val index = tlvReader.getUInt(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)) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/MediaPlaybackClusterPlaybackPositionStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/MediaPlaybackClusterPlaybackPositionStruct.kt index d452d083a73112..576732fe7efbdc 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/MediaPlaybackClusterPlaybackPositionStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/MediaPlaybackClusterPlaybackPositionStruct.kt @@ -22,7 +22,7 @@ import chip.tlv.Tag import chip.tlv.TlvReader import chip.tlv.TlvWriter -class MediaPlaybackClusterPlaybackPositionStruct(val updatedAt: Long, val position: Long?) { +class MediaPlaybackClusterPlaybackPositionStruct(val updatedAt: ULong, val position: ULong?) { override fun toString(): String = buildString { append("MediaPlaybackClusterPlaybackPositionStruct {\n") append("\tupdatedAt : $updatedAt\n") @@ -30,9 +30,9 @@ class MediaPlaybackClusterPlaybackPositionStruct(val updatedAt: Long, val positi append("}\n") } - fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { tlvWriter.apply { - startStructure(tag) + startStructure(tlvTag) put(ContextSpecificTag(TAG_UPDATED_AT), updatedAt) if (position != null) { put(ContextSpecificTag(TAG_POSITION), position) @@ -47,12 +47,12 @@ class MediaPlaybackClusterPlaybackPositionStruct(val updatedAt: Long, val positi private const val TAG_UPDATED_AT = 0 private const val TAG_POSITION = 1 - fun fromTlv(tag: Tag, tlvReader: TlvReader): MediaPlaybackClusterPlaybackPositionStruct { - tlvReader.enterStructure(tag) - val updatedAt = tlvReader.getLong(ContextSpecificTag(TAG_UPDATED_AT)) + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): MediaPlaybackClusterPlaybackPositionStruct { + tlvReader.enterStructure(tlvTag) + val updatedAt = tlvReader.getULong(ContextSpecificTag(TAG_UPDATED_AT)) val position = if (!tlvReader.isNull()) { - tlvReader.getLong(ContextSpecificTag(TAG_POSITION)) + tlvReader.getULong(ContextSpecificTag(TAG_POSITION)) } else { tlvReader.getNull(ContextSpecificTag(TAG_POSITION)) null diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ModeSelectClusterModeOptionStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ModeSelectClusterModeOptionStruct.kt index ac95817519112f..6de2b3fc5eccae 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ModeSelectClusterModeOptionStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ModeSelectClusterModeOptionStruct.kt @@ -25,7 +25,7 @@ import chip.tlv.TlvWriter class ModeSelectClusterModeOptionStruct( val label: String, - val mode: Int, + val mode: UInt, val semanticTags: List ) { override fun toString(): String = buildString { @@ -36,16 +36,16 @@ class ModeSelectClusterModeOptionStruct( append("}\n") } - fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { tlvWriter.apply { - startStructure(tag) + startStructure(tlvTag) put(ContextSpecificTag(TAG_LABEL), label) put(ContextSpecificTag(TAG_MODE), mode) - startList(ContextSpecificTag(TAG_SEMANTIC_TAGS)) + startArray(ContextSpecificTag(TAG_SEMANTIC_TAGS)) for (item in semanticTags.iterator()) { item.toTlv(AnonymousTag, this) } - endList() + endArray() endStructure() } } @@ -55,13 +55,13 @@ class ModeSelectClusterModeOptionStruct( private const val TAG_MODE = 1 private const val TAG_SEMANTIC_TAGS = 2 - fun fromTlv(tag: Tag, tlvReader: TlvReader): ModeSelectClusterModeOptionStruct { - tlvReader.enterStructure(tag) + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): ModeSelectClusterModeOptionStruct { + tlvReader.enterStructure(tlvTag) val label = tlvReader.getString(ContextSpecificTag(TAG_LABEL)) - val mode = tlvReader.getInt(ContextSpecificTag(TAG_MODE)) + val mode = tlvReader.getUInt(ContextSpecificTag(TAG_MODE)) val semanticTags = buildList { - tlvReader.enterList(ContextSpecificTag(TAG_SEMANTIC_TAGS)) + tlvReader.enterArray(ContextSpecificTag(TAG_SEMANTIC_TAGS)) while (!tlvReader.isEndOfContainer()) { add(ModeSelectClusterSemanticTagStruct.fromTlv(AnonymousTag, tlvReader)) } diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ModeSelectClusterSemanticTagStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ModeSelectClusterSemanticTagStruct.kt index 04c893671659d3..5d079d3c72386d 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ModeSelectClusterSemanticTagStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ModeSelectClusterSemanticTagStruct.kt @@ -22,7 +22,7 @@ import chip.tlv.Tag import chip.tlv.TlvReader import chip.tlv.TlvWriter -class ModeSelectClusterSemanticTagStruct(val mfgCode: Int, val value: Int) { +class ModeSelectClusterSemanticTagStruct(val mfgCode: UInt, val value: UInt) { override fun toString(): String = buildString { append("ModeSelectClusterSemanticTagStruct {\n") append("\tmfgCode : $mfgCode\n") @@ -30,9 +30,9 @@ class ModeSelectClusterSemanticTagStruct(val mfgCode: Int, val value: Int) { append("}\n") } - fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { tlvWriter.apply { - startStructure(tag) + startStructure(tlvTag) put(ContextSpecificTag(TAG_MFG_CODE), mfgCode) put(ContextSpecificTag(TAG_VALUE), value) endStructure() @@ -43,10 +43,10 @@ class ModeSelectClusterSemanticTagStruct(val mfgCode: Int, val value: Int) { private const val TAG_MFG_CODE = 0 private const val TAG_VALUE = 1 - fun fromTlv(tag: Tag, tlvReader: TlvReader): ModeSelectClusterSemanticTagStruct { - tlvReader.enterStructure(tag) - val mfgCode = tlvReader.getInt(ContextSpecificTag(TAG_MFG_CODE)) - val value = tlvReader.getInt(ContextSpecificTag(TAG_VALUE)) + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): ModeSelectClusterSemanticTagStruct { + tlvReader.enterStructure(tlvTag) + val mfgCode = tlvReader.getUInt(ContextSpecificTag(TAG_MFG_CODE)) + val value = tlvReader.getUInt(ContextSpecificTag(TAG_VALUE)) tlvReader.exitContainer() diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/NetworkCommissioningClusterNetworkInfoStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/NetworkCommissioningClusterNetworkInfoStruct.kt index 8b942f2a492dd1..61816cf54bafc1 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/NetworkCommissioningClusterNetworkInfoStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/NetworkCommissioningClusterNetworkInfoStruct.kt @@ -33,9 +33,9 @@ class NetworkCommissioningClusterNetworkInfoStruct( append("}\n") } - fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { tlvWriter.apply { - startStructure(tag) + startStructure(tlvTag) put(ContextSpecificTag(TAG_NETWORK_I_D), networkID) put(ContextSpecificTag(TAG_CONNECTED), connected) endStructure() @@ -46,8 +46,8 @@ class NetworkCommissioningClusterNetworkInfoStruct( private const val TAG_NETWORK_I_D = 0 private const val TAG_CONNECTED = 1 - fun fromTlv(tag: Tag, tlvReader: TlvReader): NetworkCommissioningClusterNetworkInfoStruct { - tlvReader.enterStructure(tag) + 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)) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/NetworkCommissioningClusterThreadInterfaceScanResultStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/NetworkCommissioningClusterThreadInterfaceScanResultStruct.kt index 76593b32131477..e5695511fcb5fa 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/NetworkCommissioningClusterThreadInterfaceScanResultStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/NetworkCommissioningClusterThreadInterfaceScanResultStruct.kt @@ -23,14 +23,14 @@ import chip.tlv.TlvReader import chip.tlv.TlvWriter class NetworkCommissioningClusterThreadInterfaceScanResultStruct( - val panId: Int, - val extendedPanId: Long, + val panId: UInt, + val extendedPanId: ULong, val networkName: String, - val channel: Int, - val version: Int, + val channel: UInt, + val version: UInt, val extendedAddress: ByteArray, val rssi: Int, - val lqi: Int + val lqi: UInt ) { override fun toString(): String = buildString { append("NetworkCommissioningClusterThreadInterfaceScanResultStruct {\n") @@ -45,9 +45,9 @@ class NetworkCommissioningClusterThreadInterfaceScanResultStruct( append("}\n") } - fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { tlvWriter.apply { - startStructure(tag) + startStructure(tlvTag) put(ContextSpecificTag(TAG_PAN_ID), panId) put(ContextSpecificTag(TAG_EXTENDED_PAN_ID), extendedPanId) put(ContextSpecificTag(TAG_NETWORK_NAME), networkName) @@ -71,18 +71,18 @@ class NetworkCommissioningClusterThreadInterfaceScanResultStruct( private const val TAG_LQI = 7 fun fromTlv( - tag: Tag, + tlvTag: Tag, tlvReader: TlvReader ): NetworkCommissioningClusterThreadInterfaceScanResultStruct { - tlvReader.enterStructure(tag) - val panId = tlvReader.getInt(ContextSpecificTag(TAG_PAN_ID)) - val extendedPanId = tlvReader.getLong(ContextSpecificTag(TAG_EXTENDED_PAN_ID)) + tlvReader.enterStructure(tlvTag) + val panId = tlvReader.getUInt(ContextSpecificTag(TAG_PAN_ID)) + val extendedPanId = tlvReader.getULong(ContextSpecificTag(TAG_EXTENDED_PAN_ID)) val networkName = tlvReader.getString(ContextSpecificTag(TAG_NETWORK_NAME)) - val channel = tlvReader.getInt(ContextSpecificTag(TAG_CHANNEL)) - val version = tlvReader.getInt(ContextSpecificTag(TAG_VERSION)) + val channel = tlvReader.getUInt(ContextSpecificTag(TAG_CHANNEL)) + val version = tlvReader.getUInt(ContextSpecificTag(TAG_VERSION)) val extendedAddress = tlvReader.getByteArray(ContextSpecificTag(TAG_EXTENDED_ADDRESS)) val rssi = tlvReader.getInt(ContextSpecificTag(TAG_RSSI)) - val lqi = tlvReader.getInt(ContextSpecificTag(TAG_LQI)) + val lqi = tlvReader.getUInt(ContextSpecificTag(TAG_LQI)) tlvReader.exitContainer() diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/NetworkCommissioningClusterWiFiInterfaceScanResultStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/NetworkCommissioningClusterWiFiInterfaceScanResultStruct.kt index d2cf4bcf5b7cb0..099c8cd29eedaa 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/NetworkCommissioningClusterWiFiInterfaceScanResultStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/NetworkCommissioningClusterWiFiInterfaceScanResultStruct.kt @@ -23,11 +23,11 @@ import chip.tlv.TlvReader import chip.tlv.TlvWriter class NetworkCommissioningClusterWiFiInterfaceScanResultStruct( - val security: Int, + val security: UInt, val ssid: ByteArray, val bssid: ByteArray, - val channel: Int, - val wiFiBand: Int, + val channel: UInt, + val wiFiBand: UInt, val rssi: Int ) { override fun toString(): String = buildString { @@ -41,9 +41,9 @@ class NetworkCommissioningClusterWiFiInterfaceScanResultStruct( append("}\n") } - fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { tlvWriter.apply { - startStructure(tag) + startStructure(tlvTag) put(ContextSpecificTag(TAG_SECURITY), security) put(ContextSpecificTag(TAG_SSID), ssid) put(ContextSpecificTag(TAG_BSSID), bssid) @@ -63,15 +63,15 @@ class NetworkCommissioningClusterWiFiInterfaceScanResultStruct( private const val TAG_RSSI = 5 fun fromTlv( - tag: Tag, + tlvTag: Tag, tlvReader: TlvReader ): NetworkCommissioningClusterWiFiInterfaceScanResultStruct { - tlvReader.enterStructure(tag) - val security = tlvReader.getInt(ContextSpecificTag(TAG_SECURITY)) + 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.getInt(ContextSpecificTag(TAG_CHANNEL)) - val wiFiBand = tlvReader.getInt(ContextSpecificTag(TAG_WI_FI_BAND)) + val channel = tlvReader.getUInt(ContextSpecificTag(TAG_CHANNEL)) + val wiFiBand = tlvReader.getUInt(ContextSpecificTag(TAG_WI_FI_BAND)) val rssi = tlvReader.getInt(ContextSpecificTag(TAG_RSSI)) tlvReader.exitContainer() diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/OperationalCredentialsClusterFabricDescriptorStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/OperationalCredentialsClusterFabricDescriptorStruct.kt index 8264e9fa5ee545..06171f9ea565c5 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/OperationalCredentialsClusterFabricDescriptorStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/OperationalCredentialsClusterFabricDescriptorStruct.kt @@ -24,11 +24,11 @@ import chip.tlv.TlvWriter class OperationalCredentialsClusterFabricDescriptorStruct( val rootPublicKey: ByteArray, - val vendorID: Int, - val fabricID: Long, - val nodeID: Long, + val vendorID: UInt, + val fabricID: ULong, + val nodeID: ULong, val label: String, - val fabricIndex: Int + val fabricIndex: UInt ) { override fun toString(): String = buildString { append("OperationalCredentialsClusterFabricDescriptorStruct {\n") @@ -41,9 +41,9 @@ class OperationalCredentialsClusterFabricDescriptorStruct( append("}\n") } - fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { tlvWriter.apply { - startStructure(tag) + startStructure(tlvTag) put(ContextSpecificTag(TAG_ROOT_PUBLIC_KEY), rootPublicKey) put(ContextSpecificTag(TAG_VENDOR_I_D), vendorID) put(ContextSpecificTag(TAG_FABRIC_I_D), fabricID) @@ -63,16 +63,16 @@ class OperationalCredentialsClusterFabricDescriptorStruct( private const val TAG_FABRIC_INDEX = 254 fun fromTlv( - tag: Tag, + tlvTag: Tag, tlvReader: TlvReader ): OperationalCredentialsClusterFabricDescriptorStruct { - tlvReader.enterStructure(tag) + tlvReader.enterStructure(tlvTag) val rootPublicKey = tlvReader.getByteArray(ContextSpecificTag(TAG_ROOT_PUBLIC_KEY)) - val vendorID = tlvReader.getInt(ContextSpecificTag(TAG_VENDOR_I_D)) - val fabricID = tlvReader.getLong(ContextSpecificTag(TAG_FABRIC_I_D)) - val nodeID = tlvReader.getLong(ContextSpecificTag(TAG_NODE_I_D)) + val vendorID = tlvReader.getUInt(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.getInt(ContextSpecificTag(TAG_FABRIC_INDEX)) + val fabricIndex = tlvReader.getUInt(ContextSpecificTag(TAG_FABRIC_INDEX)) tlvReader.exitContainer() diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/OperationalCredentialsClusterNOCStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/OperationalCredentialsClusterNOCStruct.kt index a05f388d1a5e06..76c1abd111fb76 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/OperationalCredentialsClusterNOCStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/OperationalCredentialsClusterNOCStruct.kt @@ -25,7 +25,7 @@ import chip.tlv.TlvWriter class OperationalCredentialsClusterNOCStruct( val noc: ByteArray, val icac: ByteArray?, - val fabricIndex: Int + val fabricIndex: UInt ) { override fun toString(): String = buildString { append("OperationalCredentialsClusterNOCStruct {\n") @@ -35,9 +35,9 @@ class OperationalCredentialsClusterNOCStruct( append("}\n") } - fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { tlvWriter.apply { - startStructure(tag) + startStructure(tlvTag) put(ContextSpecificTag(TAG_NOC), noc) if (icac != null) { put(ContextSpecificTag(TAG_ICAC), icac) @@ -54,8 +54,8 @@ class OperationalCredentialsClusterNOCStruct( private const val TAG_ICAC = 2 private const val TAG_FABRIC_INDEX = 254 - fun fromTlv(tag: Tag, tlvReader: TlvReader): OperationalCredentialsClusterNOCStruct { - tlvReader.enterStructure(tag) + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): OperationalCredentialsClusterNOCStruct { + tlvReader.enterStructure(tlvTag) val noc = tlvReader.getByteArray(ContextSpecificTag(TAG_NOC)) val icac = if (!tlvReader.isNull()) { @@ -64,7 +64,7 @@ class OperationalCredentialsClusterNOCStruct( tlvReader.getNull(ContextSpecificTag(TAG_ICAC)) null } - val fabricIndex = tlvReader.getInt(ContextSpecificTag(TAG_FABRIC_INDEX)) + val fabricIndex = tlvReader.getUInt(ContextSpecificTag(TAG_FABRIC_INDEX)) tlvReader.exitContainer() diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/OperationalStateClusterErrorStateStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/OperationalStateClusterErrorStateStruct.kt index cdbccac37fe63f..bdd7558c9572b0 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/OperationalStateClusterErrorStateStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/OperationalStateClusterErrorStateStruct.kt @@ -24,7 +24,7 @@ import chip.tlv.TlvWriter import java.util.Optional class OperationalStateClusterErrorStateStruct( - val errorStateID: Int, + val errorStateID: UInt, val errorStateLabel: Optional, val errorStateDetails: Optional ) { @@ -36,9 +36,9 @@ class OperationalStateClusterErrorStateStruct( append("}\n") } - fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { tlvWriter.apply { - startStructure(tag) + startStructure(tlvTag) put(ContextSpecificTag(TAG_ERROR_STATE_I_D), errorStateID) if (errorStateLabel.isPresent) { val opterrorStateLabel = errorStateLabel.get() @@ -57,9 +57,9 @@ class OperationalStateClusterErrorStateStruct( private const val TAG_ERROR_STATE_LABEL = 1 private const val TAG_ERROR_STATE_DETAILS = 2 - fun fromTlv(tag: Tag, tlvReader: TlvReader): OperationalStateClusterErrorStateStruct { - tlvReader.enterStructure(tag) - val errorStateID = tlvReader.getInt(ContextSpecificTag(TAG_ERROR_STATE_I_D)) + 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))) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/OperationalStateClusterOperationalStateStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/OperationalStateClusterOperationalStateStruct.kt index 1c55ac8f8927c4..cb197a70929b8b 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/OperationalStateClusterOperationalStateStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/OperationalStateClusterOperationalStateStruct.kt @@ -24,7 +24,7 @@ import chip.tlv.TlvWriter import java.util.Optional class OperationalStateClusterOperationalStateStruct( - val operationalStateID: Int, + val operationalStateID: UInt, val operationalStateLabel: Optional ) { override fun toString(): String = buildString { @@ -34,9 +34,9 @@ class OperationalStateClusterOperationalStateStruct( append("}\n") } - fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { tlvWriter.apply { - startStructure(tag) + startStructure(tlvTag) put(ContextSpecificTag(TAG_OPERATIONAL_STATE_I_D), operationalStateID) if (operationalStateLabel.isPresent) { val optoperationalStateLabel = operationalStateLabel.get() @@ -50,9 +50,9 @@ class OperationalStateClusterOperationalStateStruct( private const val TAG_OPERATIONAL_STATE_I_D = 0 private const val TAG_OPERATIONAL_STATE_LABEL = 1 - fun fromTlv(tag: Tag, tlvReader: TlvReader): OperationalStateClusterOperationalStateStruct { - tlvReader.enterStructure(tag) - val operationalStateID = tlvReader.getInt(ContextSpecificTag(TAG_OPERATIONAL_STATE_I_D)) + 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))) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/OtaSoftwareUpdateRequestorClusterProviderLocation.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/OtaSoftwareUpdateRequestorClusterProviderLocation.kt index 17f95d897b258b..e59e834d55286f 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/OtaSoftwareUpdateRequestorClusterProviderLocation.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/OtaSoftwareUpdateRequestorClusterProviderLocation.kt @@ -23,9 +23,9 @@ import chip.tlv.TlvReader import chip.tlv.TlvWriter class OtaSoftwareUpdateRequestorClusterProviderLocation( - val providerNodeID: Long, - val endpoint: Int, - val fabricIndex: Int + val providerNodeID: ULong, + val endpoint: UInt, + val fabricIndex: UInt ) { override fun toString(): String = buildString { append("OtaSoftwareUpdateRequestorClusterProviderLocation {\n") @@ -35,9 +35,9 @@ class OtaSoftwareUpdateRequestorClusterProviderLocation( append("}\n") } - fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { tlvWriter.apply { - startStructure(tag) + startStructure(tlvTag) put(ContextSpecificTag(TAG_PROVIDER_NODE_I_D), providerNodeID) put(ContextSpecificTag(TAG_ENDPOINT), endpoint) put(ContextSpecificTag(TAG_FABRIC_INDEX), fabricIndex) @@ -50,11 +50,14 @@ class OtaSoftwareUpdateRequestorClusterProviderLocation( private const val TAG_ENDPOINT = 2 private const val TAG_FABRIC_INDEX = 254 - fun fromTlv(tag: Tag, tlvReader: TlvReader): OtaSoftwareUpdateRequestorClusterProviderLocation { - tlvReader.enterStructure(tag) - val providerNodeID = tlvReader.getLong(ContextSpecificTag(TAG_PROVIDER_NODE_I_D)) - val endpoint = tlvReader.getInt(ContextSpecificTag(TAG_ENDPOINT)) - val fabricIndex = tlvReader.getInt(ContextSpecificTag(TAG_FABRIC_INDEX)) + fun fromTlv( + tlvTag: Tag, + tlvReader: TlvReader + ): OtaSoftwareUpdateRequestorClusterProviderLocation { + tlvReader.enterStructure(tlvTag) + val providerNodeID = tlvReader.getULong(ContextSpecificTag(TAG_PROVIDER_NODE_I_D)) + val endpoint = tlvReader.getUInt(ContextSpecificTag(TAG_ENDPOINT)) + val fabricIndex = tlvReader.getUInt(ContextSpecificTag(TAG_FABRIC_INDEX)) tlvReader.exitContainer() diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/OzoneFilterMonitoringClusterReplacementProductStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/OzoneFilterMonitoringClusterReplacementProductStruct.kt deleted file mode 100644 index 52318157e94dc5..00000000000000 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/OzoneFilterMonitoringClusterReplacementProductStruct.kt +++ /dev/null @@ -1,66 +0,0 @@ -/* - * - * 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 chip.devicecontroller.cluster.structs - -import chip.devicecontroller.cluster.* -import chip.tlv.ContextSpecificTag -import chip.tlv.Tag -import chip.tlv.TlvReader -import chip.tlv.TlvWriter - -class OzoneFilterMonitoringClusterReplacementProductStruct( - val productIdentifierType: Int, - val productIdentifierValue: String -) { - override fun toString(): String = buildString { - append("OzoneFilterMonitoringClusterReplacementProductStruct {\n") - append("\tproductIdentifierType : $productIdentifierType\n") - append("\tproductIdentifierValue : $productIdentifierValue\n") - append("}\n") - } - - fun toTlv(tag: Tag, tlvWriter: TlvWriter) { - tlvWriter.apply { - startStructure(tag) - 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( - tag: Tag, - tlvReader: TlvReader - ): OzoneFilterMonitoringClusterReplacementProductStruct { - tlvReader.enterStructure(tag) - val productIdentifierType = tlvReader.getInt(ContextSpecificTag(TAG_PRODUCT_IDENTIFIER_TYPE)) - val productIdentifierValue = - tlvReader.getString(ContextSpecificTag(TAG_PRODUCT_IDENTIFIER_VALUE)) - - tlvReader.exitContainer() - - return OzoneFilterMonitoringClusterReplacementProductStruct( - productIdentifierType, - productIdentifierValue - ) - } - } -} diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/PowerSourceClusterBatChargeFaultChangeType.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/PowerSourceClusterBatChargeFaultChangeType.kt index 6172f21498fdb0..a16cd7c3638134 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/PowerSourceClusterBatChargeFaultChangeType.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/PowerSourceClusterBatChargeFaultChangeType.kt @@ -23,7 +23,10 @@ import chip.tlv.Tag import chip.tlv.TlvReader import chip.tlv.TlvWriter -class PowerSourceClusterBatChargeFaultChangeType(val current: List, val previous: List) { +class PowerSourceClusterBatChargeFaultChangeType( + val current: List, + val previous: List +) { override fun toString(): String = buildString { append("PowerSourceClusterBatChargeFaultChangeType {\n") append("\tcurrent : $current\n") @@ -31,19 +34,19 @@ class PowerSourceClusterBatChargeFaultChangeType(val current: List, val pre append("}\n") } - fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { tlvWriter.apply { - startStructure(tag) - startList(ContextSpecificTag(TAG_CURRENT)) + startStructure(tlvTag) + startArray(ContextSpecificTag(TAG_CURRENT)) for (item in current.iterator()) { put(AnonymousTag, item) } - endList() - startList(ContextSpecificTag(TAG_PREVIOUS)) + endArray() + startArray(ContextSpecificTag(TAG_PREVIOUS)) for (item in previous.iterator()) { put(AnonymousTag, item) } - endList() + endArray() endStructure() } } @@ -52,21 +55,21 @@ class PowerSourceClusterBatChargeFaultChangeType(val current: List, val pre private const val TAG_CURRENT = 0 private const val TAG_PREVIOUS = 1 - fun fromTlv(tag: Tag, tlvReader: TlvReader): PowerSourceClusterBatChargeFaultChangeType { - tlvReader.enterStructure(tag) + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): PowerSourceClusterBatChargeFaultChangeType { + tlvReader.enterStructure(tlvTag) val current = - buildList { - tlvReader.enterList(ContextSpecificTag(TAG_CURRENT)) + buildList { + tlvReader.enterArray(ContextSpecificTag(TAG_CURRENT)) while (!tlvReader.isEndOfContainer()) { - add(tlvReader.getInt(AnonymousTag)) + add(tlvReader.getUInt(AnonymousTag)) } tlvReader.exitContainer() } val previous = - buildList { - tlvReader.enterList(ContextSpecificTag(TAG_PREVIOUS)) + buildList { + tlvReader.enterArray(ContextSpecificTag(TAG_PREVIOUS)) while (!tlvReader.isEndOfContainer()) { - add(tlvReader.getInt(AnonymousTag)) + add(tlvReader.getUInt(AnonymousTag)) } tlvReader.exitContainer() } diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/PowerSourceClusterBatFaultChangeType.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/PowerSourceClusterBatFaultChangeType.kt index 6ef4a63074b8a2..72e7980eed1316 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/PowerSourceClusterBatFaultChangeType.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/PowerSourceClusterBatFaultChangeType.kt @@ -23,7 +23,7 @@ import chip.tlv.Tag import chip.tlv.TlvReader import chip.tlv.TlvWriter -class PowerSourceClusterBatFaultChangeType(val current: List, val previous: List) { +class PowerSourceClusterBatFaultChangeType(val current: List, val previous: List) { override fun toString(): String = buildString { append("PowerSourceClusterBatFaultChangeType {\n") append("\tcurrent : $current\n") @@ -31,19 +31,19 @@ class PowerSourceClusterBatFaultChangeType(val current: List, val previous: append("}\n") } - fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { tlvWriter.apply { - startStructure(tag) - startList(ContextSpecificTag(TAG_CURRENT)) + startStructure(tlvTag) + startArray(ContextSpecificTag(TAG_CURRENT)) for (item in current.iterator()) { put(AnonymousTag, item) } - endList() - startList(ContextSpecificTag(TAG_PREVIOUS)) + endArray() + startArray(ContextSpecificTag(TAG_PREVIOUS)) for (item in previous.iterator()) { put(AnonymousTag, item) } - endList() + endArray() endStructure() } } @@ -52,21 +52,21 @@ class PowerSourceClusterBatFaultChangeType(val current: List, val previous: private const val TAG_CURRENT = 0 private const val TAG_PREVIOUS = 1 - fun fromTlv(tag: Tag, tlvReader: TlvReader): PowerSourceClusterBatFaultChangeType { - tlvReader.enterStructure(tag) + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): PowerSourceClusterBatFaultChangeType { + tlvReader.enterStructure(tlvTag) val current = - buildList { - tlvReader.enterList(ContextSpecificTag(TAG_CURRENT)) + buildList { + tlvReader.enterArray(ContextSpecificTag(TAG_CURRENT)) while (!tlvReader.isEndOfContainer()) { - add(tlvReader.getInt(AnonymousTag)) + add(tlvReader.getUInt(AnonymousTag)) } tlvReader.exitContainer() } val previous = - buildList { - tlvReader.enterList(ContextSpecificTag(TAG_PREVIOUS)) + buildList { + tlvReader.enterArray(ContextSpecificTag(TAG_PREVIOUS)) while (!tlvReader.isEndOfContainer()) { - add(tlvReader.getInt(AnonymousTag)) + add(tlvReader.getUInt(AnonymousTag)) } tlvReader.exitContainer() } diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/PowerSourceClusterWiredFaultChangeType.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/PowerSourceClusterWiredFaultChangeType.kt index 86cdc01f28fd41..98cef72e23a74e 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/PowerSourceClusterWiredFaultChangeType.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/PowerSourceClusterWiredFaultChangeType.kt @@ -23,7 +23,7 @@ import chip.tlv.Tag import chip.tlv.TlvReader import chip.tlv.TlvWriter -class PowerSourceClusterWiredFaultChangeType(val current: List, val previous: List) { +class PowerSourceClusterWiredFaultChangeType(val current: List, val previous: List) { override fun toString(): String = buildString { append("PowerSourceClusterWiredFaultChangeType {\n") append("\tcurrent : $current\n") @@ -31,19 +31,19 @@ class PowerSourceClusterWiredFaultChangeType(val current: List, val previou append("}\n") } - fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { tlvWriter.apply { - startStructure(tag) - startList(ContextSpecificTag(TAG_CURRENT)) + startStructure(tlvTag) + startArray(ContextSpecificTag(TAG_CURRENT)) for (item in current.iterator()) { put(AnonymousTag, item) } - endList() - startList(ContextSpecificTag(TAG_PREVIOUS)) + endArray() + startArray(ContextSpecificTag(TAG_PREVIOUS)) for (item in previous.iterator()) { put(AnonymousTag, item) } - endList() + endArray() endStructure() } } @@ -52,21 +52,21 @@ class PowerSourceClusterWiredFaultChangeType(val current: List, val previou private const val TAG_CURRENT = 0 private const val TAG_PREVIOUS = 1 - fun fromTlv(tag: Tag, tlvReader: TlvReader): PowerSourceClusterWiredFaultChangeType { - tlvReader.enterStructure(tag) + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): PowerSourceClusterWiredFaultChangeType { + tlvReader.enterStructure(tlvTag) val current = - buildList { - tlvReader.enterList(ContextSpecificTag(TAG_CURRENT)) + buildList { + tlvReader.enterArray(ContextSpecificTag(TAG_CURRENT)) while (!tlvReader.isEndOfContainer()) { - add(tlvReader.getInt(AnonymousTag)) + add(tlvReader.getUInt(AnonymousTag)) } tlvReader.exitContainer() } val previous = - buildList { - tlvReader.enterList(ContextSpecificTag(TAG_PREVIOUS)) + buildList { + tlvReader.enterArray(ContextSpecificTag(TAG_PREVIOUS)) while (!tlvReader.isEndOfContainer()) { - add(tlvReader.getInt(AnonymousTag)) + add(tlvReader.getUInt(AnonymousTag)) } tlvReader.exitContainer() } diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/RefrigeratorAndTemperatureControlledCabinetModeClusterModeOptionStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/RefrigeratorAndTemperatureControlledCabinetModeClusterModeOptionStruct.kt index 6632b9581bb508..155dc5a6ee32c3 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/RefrigeratorAndTemperatureControlledCabinetModeClusterModeOptionStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/RefrigeratorAndTemperatureControlledCabinetModeClusterModeOptionStruct.kt @@ -25,7 +25,7 @@ import chip.tlv.TlvWriter class RefrigeratorAndTemperatureControlledCabinetModeClusterModeOptionStruct( val label: String, - val mode: Int, + val mode: UInt, val modeTags: List ) { override fun toString(): String = buildString { @@ -36,16 +36,16 @@ class RefrigeratorAndTemperatureControlledCabinetModeClusterModeOptionStruct( append("}\n") } - fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { tlvWriter.apply { - startStructure(tag) + startStructure(tlvTag) put(ContextSpecificTag(TAG_LABEL), label) put(ContextSpecificTag(TAG_MODE), mode) - startList(ContextSpecificTag(TAG_MODE_TAGS)) + startArray(ContextSpecificTag(TAG_MODE_TAGS)) for (item in modeTags.iterator()) { item.toTlv(AnonymousTag, this) } - endList() + endArray() endStructure() } } @@ -56,15 +56,15 @@ class RefrigeratorAndTemperatureControlledCabinetModeClusterModeOptionStruct( private const val TAG_MODE_TAGS = 2 fun fromTlv( - tag: Tag, + tlvTag: Tag, tlvReader: TlvReader ): RefrigeratorAndTemperatureControlledCabinetModeClusterModeOptionStruct { - tlvReader.enterStructure(tag) + tlvReader.enterStructure(tlvTag) val label = tlvReader.getString(ContextSpecificTag(TAG_LABEL)) - val mode = tlvReader.getInt(ContextSpecificTag(TAG_MODE)) + val mode = tlvReader.getUInt(ContextSpecificTag(TAG_MODE)) val modeTags = buildList { - tlvReader.enterList(ContextSpecificTag(TAG_MODE_TAGS)) + tlvReader.enterArray(ContextSpecificTag(TAG_MODE_TAGS)) while (!tlvReader.isEndOfContainer()) { add( RefrigeratorAndTemperatureControlledCabinetModeClusterModeTagStruct.fromTlv( diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/RefrigeratorAndTemperatureControlledCabinetModeClusterModeTagStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/RefrigeratorAndTemperatureControlledCabinetModeClusterModeTagStruct.kt index 9f806c52fa6fa2..51b7fbc78a1efa 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/RefrigeratorAndTemperatureControlledCabinetModeClusterModeTagStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/RefrigeratorAndTemperatureControlledCabinetModeClusterModeTagStruct.kt @@ -24,8 +24,8 @@ import chip.tlv.TlvWriter import java.util.Optional class RefrigeratorAndTemperatureControlledCabinetModeClusterModeTagStruct( - val mfgCode: Optional, - val value: Int + val mfgCode: Optional, + val value: UInt ) { override fun toString(): String = buildString { append("RefrigeratorAndTemperatureControlledCabinetModeClusterModeTagStruct {\n") @@ -34,9 +34,9 @@ class RefrigeratorAndTemperatureControlledCabinetModeClusterModeTagStruct( append("}\n") } - fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { tlvWriter.apply { - startStructure(tag) + startStructure(tlvTag) if (mfgCode.isPresent) { val optmfgCode = mfgCode.get() put(ContextSpecificTag(TAG_MFG_CODE), optmfgCode) @@ -51,17 +51,17 @@ class RefrigeratorAndTemperatureControlledCabinetModeClusterModeTagStruct( private const val TAG_VALUE = 1 fun fromTlv( - tag: Tag, + tlvTag: Tag, tlvReader: TlvReader ): RefrigeratorAndTemperatureControlledCabinetModeClusterModeTagStruct { - tlvReader.enterStructure(tag) + tlvReader.enterStructure(tlvTag) val mfgCode = if (tlvReader.isNextTag(ContextSpecificTag(TAG_MFG_CODE))) { - Optional.of(tlvReader.getInt(ContextSpecificTag(TAG_MFG_CODE))) + Optional.of(tlvReader.getUInt(ContextSpecificTag(TAG_MFG_CODE))) } else { Optional.empty() } - val value = tlvReader.getInt(ContextSpecificTag(TAG_VALUE)) + val value = tlvReader.getUInt(ContextSpecificTag(TAG_VALUE)) tlvReader.exitContainer() diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/RvcCleanModeClusterModeOptionStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/RvcCleanModeClusterModeOptionStruct.kt index e3f33a1b7dcac5..0e3c822b3d5b50 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/RvcCleanModeClusterModeOptionStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/RvcCleanModeClusterModeOptionStruct.kt @@ -25,7 +25,7 @@ import chip.tlv.TlvWriter class RvcCleanModeClusterModeOptionStruct( val label: String, - val mode: Int, + val mode: UInt, val modeTags: List ) { override fun toString(): String = buildString { @@ -36,16 +36,16 @@ class RvcCleanModeClusterModeOptionStruct( append("}\n") } - fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { tlvWriter.apply { - startStructure(tag) + startStructure(tlvTag) put(ContextSpecificTag(TAG_LABEL), label) put(ContextSpecificTag(TAG_MODE), mode) - startList(ContextSpecificTag(TAG_MODE_TAGS)) + startArray(ContextSpecificTag(TAG_MODE_TAGS)) for (item in modeTags.iterator()) { item.toTlv(AnonymousTag, this) } - endList() + endArray() endStructure() } } @@ -55,13 +55,13 @@ class RvcCleanModeClusterModeOptionStruct( private const val TAG_MODE = 1 private const val TAG_MODE_TAGS = 2 - fun fromTlv(tag: Tag, tlvReader: TlvReader): RvcCleanModeClusterModeOptionStruct { - tlvReader.enterStructure(tag) + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): RvcCleanModeClusterModeOptionStruct { + tlvReader.enterStructure(tlvTag) val label = tlvReader.getString(ContextSpecificTag(TAG_LABEL)) - val mode = tlvReader.getInt(ContextSpecificTag(TAG_MODE)) + val mode = tlvReader.getUInt(ContextSpecificTag(TAG_MODE)) val modeTags = buildList { - tlvReader.enterList(ContextSpecificTag(TAG_MODE_TAGS)) + tlvReader.enterArray(ContextSpecificTag(TAG_MODE_TAGS)) while (!tlvReader.isEndOfContainer()) { add(RvcCleanModeClusterModeTagStruct.fromTlv(AnonymousTag, tlvReader)) } diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/RvcCleanModeClusterModeTagStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/RvcCleanModeClusterModeTagStruct.kt index bc7eb7ed818b41..8114bd42d9d341 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/RvcCleanModeClusterModeTagStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/RvcCleanModeClusterModeTagStruct.kt @@ -23,7 +23,7 @@ import chip.tlv.TlvReader import chip.tlv.TlvWriter import java.util.Optional -class RvcCleanModeClusterModeTagStruct(val mfgCode: Optional, val value: Int) { +class RvcCleanModeClusterModeTagStruct(val mfgCode: Optional, val value: UInt) { override fun toString(): String = buildString { append("RvcCleanModeClusterModeTagStruct {\n") append("\tmfgCode : $mfgCode\n") @@ -31,9 +31,9 @@ class RvcCleanModeClusterModeTagStruct(val mfgCode: Optional, val value: In append("}\n") } - fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { tlvWriter.apply { - startStructure(tag) + startStructure(tlvTag) if (mfgCode.isPresent) { val optmfgCode = mfgCode.get() put(ContextSpecificTag(TAG_MFG_CODE), optmfgCode) @@ -47,15 +47,15 @@ class RvcCleanModeClusterModeTagStruct(val mfgCode: Optional, val value: In private const val TAG_MFG_CODE = 0 private const val TAG_VALUE = 1 - fun fromTlv(tag: Tag, tlvReader: TlvReader): RvcCleanModeClusterModeTagStruct { - tlvReader.enterStructure(tag) + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): RvcCleanModeClusterModeTagStruct { + tlvReader.enterStructure(tlvTag) val mfgCode = if (tlvReader.isNextTag(ContextSpecificTag(TAG_MFG_CODE))) { - Optional.of(tlvReader.getInt(ContextSpecificTag(TAG_MFG_CODE))) + Optional.of(tlvReader.getUInt(ContextSpecificTag(TAG_MFG_CODE))) } else { Optional.empty() } - val value = tlvReader.getInt(ContextSpecificTag(TAG_VALUE)) + val value = tlvReader.getUInt(ContextSpecificTag(TAG_VALUE)) tlvReader.exitContainer() diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/RvcOperationalStateClusterErrorStateStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/RvcOperationalStateClusterErrorStateStruct.kt index f6b9b8b14456f0..9faa885898732d 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/RvcOperationalStateClusterErrorStateStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/RvcOperationalStateClusterErrorStateStruct.kt @@ -24,7 +24,7 @@ import chip.tlv.TlvWriter import java.util.Optional class RvcOperationalStateClusterErrorStateStruct( - val errorStateID: Int, + val errorStateID: UInt, val errorStateLabel: Optional, val errorStateDetails: Optional ) { @@ -36,9 +36,9 @@ class RvcOperationalStateClusterErrorStateStruct( append("}\n") } - fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { tlvWriter.apply { - startStructure(tag) + startStructure(tlvTag) put(ContextSpecificTag(TAG_ERROR_STATE_I_D), errorStateID) if (errorStateLabel.isPresent) { val opterrorStateLabel = errorStateLabel.get() @@ -57,9 +57,9 @@ class RvcOperationalStateClusterErrorStateStruct( private const val TAG_ERROR_STATE_LABEL = 1 private const val TAG_ERROR_STATE_DETAILS = 2 - fun fromTlv(tag: Tag, tlvReader: TlvReader): RvcOperationalStateClusterErrorStateStruct { - tlvReader.enterStructure(tag) - val errorStateID = tlvReader.getInt(ContextSpecificTag(TAG_ERROR_STATE_I_D)) + 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))) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/RvcOperationalStateClusterOperationalStateStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/RvcOperationalStateClusterOperationalStateStruct.kt index 66f2796d71439f..93e2c99c54fb6e 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/RvcOperationalStateClusterOperationalStateStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/RvcOperationalStateClusterOperationalStateStruct.kt @@ -24,7 +24,7 @@ import chip.tlv.TlvWriter import java.util.Optional class RvcOperationalStateClusterOperationalStateStruct( - val operationalStateID: Int, + val operationalStateID: UInt, val operationalStateLabel: Optional ) { override fun toString(): String = buildString { @@ -34,9 +34,9 @@ class RvcOperationalStateClusterOperationalStateStruct( append("}\n") } - fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { tlvWriter.apply { - startStructure(tag) + startStructure(tlvTag) put(ContextSpecificTag(TAG_OPERATIONAL_STATE_I_D), operationalStateID) if (operationalStateLabel.isPresent) { val optoperationalStateLabel = operationalStateLabel.get() @@ -50,9 +50,12 @@ class RvcOperationalStateClusterOperationalStateStruct( private const val TAG_OPERATIONAL_STATE_I_D = 0 private const val TAG_OPERATIONAL_STATE_LABEL = 1 - fun fromTlv(tag: Tag, tlvReader: TlvReader): RvcOperationalStateClusterOperationalStateStruct { - tlvReader.enterStructure(tag) - val operationalStateID = tlvReader.getInt(ContextSpecificTag(TAG_OPERATIONAL_STATE_I_D)) + 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))) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/RvcRunModeClusterModeOptionStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/RvcRunModeClusterModeOptionStruct.kt index 64b272df8e62c2..9c3d65a6414288 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/RvcRunModeClusterModeOptionStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/RvcRunModeClusterModeOptionStruct.kt @@ -25,7 +25,7 @@ import chip.tlv.TlvWriter class RvcRunModeClusterModeOptionStruct( val label: String, - val mode: Int, + val mode: UInt, val modeTags: List ) { override fun toString(): String = buildString { @@ -36,16 +36,16 @@ class RvcRunModeClusterModeOptionStruct( append("}\n") } - fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { tlvWriter.apply { - startStructure(tag) + startStructure(tlvTag) put(ContextSpecificTag(TAG_LABEL), label) put(ContextSpecificTag(TAG_MODE), mode) - startList(ContextSpecificTag(TAG_MODE_TAGS)) + startArray(ContextSpecificTag(TAG_MODE_TAGS)) for (item in modeTags.iterator()) { item.toTlv(AnonymousTag, this) } - endList() + endArray() endStructure() } } @@ -55,13 +55,13 @@ class RvcRunModeClusterModeOptionStruct( private const val TAG_MODE = 1 private const val TAG_MODE_TAGS = 2 - fun fromTlv(tag: Tag, tlvReader: TlvReader): RvcRunModeClusterModeOptionStruct { - tlvReader.enterStructure(tag) + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): RvcRunModeClusterModeOptionStruct { + tlvReader.enterStructure(tlvTag) val label = tlvReader.getString(ContextSpecificTag(TAG_LABEL)) - val mode = tlvReader.getInt(ContextSpecificTag(TAG_MODE)) + val mode = tlvReader.getUInt(ContextSpecificTag(TAG_MODE)) val modeTags = buildList { - tlvReader.enterList(ContextSpecificTag(TAG_MODE_TAGS)) + tlvReader.enterArray(ContextSpecificTag(TAG_MODE_TAGS)) while (!tlvReader.isEndOfContainer()) { add(RvcRunModeClusterModeTagStruct.fromTlv(AnonymousTag, tlvReader)) } diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/RvcRunModeClusterModeTagStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/RvcRunModeClusterModeTagStruct.kt index 3ad4e9aee5ba6d..ecd32762d6f048 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/RvcRunModeClusterModeTagStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/RvcRunModeClusterModeTagStruct.kt @@ -23,7 +23,7 @@ import chip.tlv.TlvReader import chip.tlv.TlvWriter import java.util.Optional -class RvcRunModeClusterModeTagStruct(val mfgCode: Optional, val value: Int) { +class RvcRunModeClusterModeTagStruct(val mfgCode: Optional, val value: UInt) { override fun toString(): String = buildString { append("RvcRunModeClusterModeTagStruct {\n") append("\tmfgCode : $mfgCode\n") @@ -31,9 +31,9 @@ class RvcRunModeClusterModeTagStruct(val mfgCode: Optional, val value: Int) append("}\n") } - fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { tlvWriter.apply { - startStructure(tag) + startStructure(tlvTag) if (mfgCode.isPresent) { val optmfgCode = mfgCode.get() put(ContextSpecificTag(TAG_MFG_CODE), optmfgCode) @@ -47,15 +47,15 @@ class RvcRunModeClusterModeTagStruct(val mfgCode: Optional, val value: Int) private const val TAG_MFG_CODE = 0 private const val TAG_VALUE = 1 - fun fromTlv(tag: Tag, tlvReader: TlvReader): RvcRunModeClusterModeTagStruct { - tlvReader.enterStructure(tag) + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): RvcRunModeClusterModeTagStruct { + tlvReader.enterStructure(tlvTag) val mfgCode = if (tlvReader.isNextTag(ContextSpecificTag(TAG_MFG_CODE))) { - Optional.of(tlvReader.getInt(ContextSpecificTag(TAG_MFG_CODE))) + Optional.of(tlvReader.getUInt(ContextSpecificTag(TAG_MFG_CODE))) } else { Optional.empty() } - val value = tlvReader.getInt(ContextSpecificTag(TAG_VALUE)) + val value = tlvReader.getUInt(ContextSpecificTag(TAG_VALUE)) tlvReader.exitContainer() diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ScenesClusterAttributeValuePair.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ScenesClusterAttributeValuePair.kt index 213d87b9137cf5..821cd4ad83eb2e 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ScenesClusterAttributeValuePair.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ScenesClusterAttributeValuePair.kt @@ -22,7 +22,7 @@ import chip.tlv.Tag import chip.tlv.TlvReader import chip.tlv.TlvWriter -class ScenesClusterAttributeValuePair(val attributeID: Long, val attributeValue: Long) { +class ScenesClusterAttributeValuePair(val attributeID: ULong, val attributeValue: ULong) { override fun toString(): String = buildString { append("ScenesClusterAttributeValuePair {\n") append("\tattributeID : $attributeID\n") @@ -30,9 +30,9 @@ class ScenesClusterAttributeValuePair(val attributeID: Long, val attributeValue: append("}\n") } - fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { tlvWriter.apply { - startStructure(tag) + startStructure(tlvTag) put(ContextSpecificTag(TAG_ATTRIBUTE_I_D), attributeID) put(ContextSpecificTag(TAG_ATTRIBUTE_VALUE), attributeValue) endStructure() @@ -43,10 +43,10 @@ class ScenesClusterAttributeValuePair(val attributeID: Long, val attributeValue: private const val TAG_ATTRIBUTE_I_D = 0 private const val TAG_ATTRIBUTE_VALUE = 1 - fun fromTlv(tag: Tag, tlvReader: TlvReader): ScenesClusterAttributeValuePair { - tlvReader.enterStructure(tag) - val attributeID = tlvReader.getLong(ContextSpecificTag(TAG_ATTRIBUTE_I_D)) - val attributeValue = tlvReader.getLong(ContextSpecificTag(TAG_ATTRIBUTE_VALUE)) + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): ScenesClusterAttributeValuePair { + tlvReader.enterStructure(tlvTag) + val attributeID = tlvReader.getULong(ContextSpecificTag(TAG_ATTRIBUTE_I_D)) + val attributeValue = tlvReader.getULong(ContextSpecificTag(TAG_ATTRIBUTE_VALUE)) tlvReader.exitContainer() diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ScenesClusterExtensionFieldSet.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ScenesClusterExtensionFieldSet.kt index edc04a2084e2fd..0b192a5cbe5696 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ScenesClusterExtensionFieldSet.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ScenesClusterExtensionFieldSet.kt @@ -24,7 +24,7 @@ import chip.tlv.TlvReader import chip.tlv.TlvWriter class ScenesClusterExtensionFieldSet( - val clusterID: Long, + val clusterID: ULong, val attributeValueList: List ) { override fun toString(): String = buildString { @@ -34,15 +34,15 @@ class ScenesClusterExtensionFieldSet( append("}\n") } - fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { tlvWriter.apply { - startStructure(tag) + startStructure(tlvTag) put(ContextSpecificTag(TAG_CLUSTER_I_D), clusterID) - startList(ContextSpecificTag(TAG_ATTRIBUTE_VALUE_LIST)) + startArray(ContextSpecificTag(TAG_ATTRIBUTE_VALUE_LIST)) for (item in attributeValueList.iterator()) { item.toTlv(AnonymousTag, this) } - endList() + endArray() endStructure() } } @@ -51,12 +51,12 @@ class ScenesClusterExtensionFieldSet( private const val TAG_CLUSTER_I_D = 0 private const val TAG_ATTRIBUTE_VALUE_LIST = 1 - fun fromTlv(tag: Tag, tlvReader: TlvReader): ScenesClusterExtensionFieldSet { - tlvReader.enterStructure(tag) - val clusterID = tlvReader.getLong(ContextSpecificTag(TAG_CLUSTER_I_D)) + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): ScenesClusterExtensionFieldSet { + tlvReader.enterStructure(tlvTag) + val clusterID = tlvReader.getULong(ContextSpecificTag(TAG_CLUSTER_I_D)) val attributeValueList = buildList { - tlvReader.enterList(ContextSpecificTag(TAG_ATTRIBUTE_VALUE_LIST)) + tlvReader.enterArray(ContextSpecificTag(TAG_ATTRIBUTE_VALUE_LIST)) while (!tlvReader.isEndOfContainer()) { add(ScenesClusterAttributeValuePair.fromTlv(AnonymousTag, tlvReader)) } diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/SoftwareDiagnosticsClusterThreadMetricsStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/SoftwareDiagnosticsClusterThreadMetricsStruct.kt index 5359b9a4b70a2a..6eefe0f5829d91 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/SoftwareDiagnosticsClusterThreadMetricsStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/SoftwareDiagnosticsClusterThreadMetricsStruct.kt @@ -24,11 +24,11 @@ import chip.tlv.TlvWriter import java.util.Optional class SoftwareDiagnosticsClusterThreadMetricsStruct( - val id: Long, + val id: ULong, val name: Optional, - val stackFreeCurrent: Optional, - val stackFreeMinimum: Optional, - val stackSize: Optional + val stackFreeCurrent: Optional, + val stackFreeMinimum: Optional, + val stackSize: Optional ) { override fun toString(): String = buildString { append("SoftwareDiagnosticsClusterThreadMetricsStruct {\n") @@ -40,9 +40,9 @@ class SoftwareDiagnosticsClusterThreadMetricsStruct( append("}\n") } - fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { tlvWriter.apply { - startStructure(tag) + startStructure(tlvTag) put(ContextSpecificTag(TAG_ID), id) if (name.isPresent) { val optname = name.get() @@ -71,9 +71,9 @@ class SoftwareDiagnosticsClusterThreadMetricsStruct( private const val TAG_STACK_FREE_MINIMUM = 3 private const val TAG_STACK_SIZE = 4 - fun fromTlv(tag: Tag, tlvReader: TlvReader): SoftwareDiagnosticsClusterThreadMetricsStruct { - tlvReader.enterStructure(tag) - val id = tlvReader.getLong(ContextSpecificTag(TAG_ID)) + 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))) @@ -82,19 +82,19 @@ class SoftwareDiagnosticsClusterThreadMetricsStruct( } val stackFreeCurrent = if (tlvReader.isNextTag(ContextSpecificTag(TAG_STACK_FREE_CURRENT))) { - Optional.of(tlvReader.getLong(ContextSpecificTag(TAG_STACK_FREE_CURRENT))) + Optional.of(tlvReader.getULong(ContextSpecificTag(TAG_STACK_FREE_CURRENT))) } else { Optional.empty() } val stackFreeMinimum = if (tlvReader.isNextTag(ContextSpecificTag(TAG_STACK_FREE_MINIMUM))) { - Optional.of(tlvReader.getLong(ContextSpecificTag(TAG_STACK_FREE_MINIMUM))) + Optional.of(tlvReader.getULong(ContextSpecificTag(TAG_STACK_FREE_MINIMUM))) } else { Optional.empty() } val stackSize = if (tlvReader.isNextTag(ContextSpecificTag(TAG_STACK_SIZE))) { - Optional.of(tlvReader.getLong(ContextSpecificTag(TAG_STACK_SIZE))) + Optional.of(tlvReader.getULong(ContextSpecificTag(TAG_STACK_SIZE))) } else { Optional.empty() } diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/TargetNavigatorClusterTargetInfoStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/TargetNavigatorClusterTargetInfoStruct.kt index 403134993beaed..beb8eba911cea8 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/TargetNavigatorClusterTargetInfoStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/TargetNavigatorClusterTargetInfoStruct.kt @@ -22,7 +22,7 @@ import chip.tlv.Tag import chip.tlv.TlvReader import chip.tlv.TlvWriter -class TargetNavigatorClusterTargetInfoStruct(val identifier: Int, val name: String) { +class TargetNavigatorClusterTargetInfoStruct(val identifier: UInt, val name: String) { override fun toString(): String = buildString { append("TargetNavigatorClusterTargetInfoStruct {\n") append("\tidentifier : $identifier\n") @@ -30,9 +30,9 @@ class TargetNavigatorClusterTargetInfoStruct(val identifier: Int, val name: Stri append("}\n") } - fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { tlvWriter.apply { - startStructure(tag) + startStructure(tlvTag) put(ContextSpecificTag(TAG_IDENTIFIER), identifier) put(ContextSpecificTag(TAG_NAME), name) endStructure() @@ -43,9 +43,9 @@ class TargetNavigatorClusterTargetInfoStruct(val identifier: Int, val name: Stri private const val TAG_IDENTIFIER = 0 private const val TAG_NAME = 1 - fun fromTlv(tag: Tag, tlvReader: TlvReader): TargetNavigatorClusterTargetInfoStruct { - tlvReader.enterStructure(tag) - val identifier = tlvReader.getInt(ContextSpecificTag(TAG_IDENTIFIER)) + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): TargetNavigatorClusterTargetInfoStruct { + tlvReader.enterStructure(tlvTag) + val identifier = tlvReader.getUInt(ContextSpecificTag(TAG_IDENTIFIER)) val name = tlvReader.getString(ContextSpecificTag(TAG_NAME)) tlvReader.exitContainer() diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ThermostatClusterThermostatScheduleTransition.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ThermostatClusterThermostatScheduleTransition.kt index cb432fb1e976b4..ac2926bc3078fd 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ThermostatClusterThermostatScheduleTransition.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ThermostatClusterThermostatScheduleTransition.kt @@ -23,7 +23,7 @@ import chip.tlv.TlvReader import chip.tlv.TlvWriter class ThermostatClusterThermostatScheduleTransition( - val transitionTime: Int, + val transitionTime: UInt, val heatSetpoint: Int?, val coolSetpoint: Int? ) { @@ -35,9 +35,9 @@ class ThermostatClusterThermostatScheduleTransition( append("}\n") } - fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { tlvWriter.apply { - startStructure(tag) + startStructure(tlvTag) put(ContextSpecificTag(TAG_TRANSITION_TIME), transitionTime) if (heatSetpoint != null) { put(ContextSpecificTag(TAG_HEAT_SETPOINT), heatSetpoint) @@ -58,9 +58,9 @@ class ThermostatClusterThermostatScheduleTransition( private const val TAG_HEAT_SETPOINT = 1 private const val TAG_COOL_SETPOINT = 2 - fun fromTlv(tag: Tag, tlvReader: TlvReader): ThermostatClusterThermostatScheduleTransition { - tlvReader.enterStructure(tag) - val transitionTime = tlvReader.getInt(ContextSpecificTag(TAG_TRANSITION_TIME)) + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): ThermostatClusterThermostatScheduleTransition { + tlvReader.enterStructure(tlvTag) + val transitionTime = tlvReader.getUInt(ContextSpecificTag(TAG_TRANSITION_TIME)) val heatSetpoint = if (!tlvReader.isNull()) { tlvReader.getInt(ContextSpecificTag(TAG_HEAT_SETPOINT)) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ThreadNetworkDiagnosticsClusterNeighborTableStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ThreadNetworkDiagnosticsClusterNeighborTableStruct.kt index 4a7066df5d7f25..b50edbd5966c03 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ThreadNetworkDiagnosticsClusterNeighborTableStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ThreadNetworkDiagnosticsClusterNeighborTableStruct.kt @@ -23,16 +23,16 @@ import chip.tlv.TlvReader import chip.tlv.TlvWriter class ThreadNetworkDiagnosticsClusterNeighborTableStruct( - val extAddress: Long, - val age: Long, - val rloc16: Int, - val linkFrameCounter: Long, - val mleFrameCounter: Long, - val lqi: Int, + val extAddress: ULong, + val age: ULong, + val rloc16: UInt, + val linkFrameCounter: ULong, + val mleFrameCounter: ULong, + val lqi: UInt, val averageRssi: Int?, val lastRssi: Int?, - val frameErrorRate: Int, - val messageErrorRate: Int, + val frameErrorRate: UInt, + val messageErrorRate: UInt, val rxOnWhenIdle: Boolean, val fullThreadDevice: Boolean, val fullNetworkData: Boolean, @@ -57,9 +57,9 @@ class ThreadNetworkDiagnosticsClusterNeighborTableStruct( append("}\n") } - fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { tlvWriter.apply { - startStructure(tag) + startStructure(tlvTag) put(ContextSpecificTag(TAG_EXT_ADDRESS), extAddress) put(ContextSpecificTag(TAG_AGE), age) put(ContextSpecificTag(TAG_RLOC16), rloc16) @@ -103,16 +103,16 @@ class ThreadNetworkDiagnosticsClusterNeighborTableStruct( private const val TAG_IS_CHILD = 13 fun fromTlv( - tag: Tag, + tlvTag: Tag, tlvReader: TlvReader ): ThreadNetworkDiagnosticsClusterNeighborTableStruct { - tlvReader.enterStructure(tag) - val extAddress = tlvReader.getLong(ContextSpecificTag(TAG_EXT_ADDRESS)) - val age = tlvReader.getLong(ContextSpecificTag(TAG_AGE)) - val rloc16 = tlvReader.getInt(ContextSpecificTag(TAG_RLOC16)) - val linkFrameCounter = tlvReader.getLong(ContextSpecificTag(TAG_LINK_FRAME_COUNTER)) - val mleFrameCounter = tlvReader.getLong(ContextSpecificTag(TAG_MLE_FRAME_COUNTER)) - val lqi = tlvReader.getInt(ContextSpecificTag(TAG_LQI)) + tlvReader.enterStructure(tlvTag) + val extAddress = tlvReader.getULong(ContextSpecificTag(TAG_EXT_ADDRESS)) + val age = tlvReader.getULong(ContextSpecificTag(TAG_AGE)) + val rloc16 = tlvReader.getUInt(ContextSpecificTag(TAG_RLOC16)) + val linkFrameCounter = tlvReader.getULong(ContextSpecificTag(TAG_LINK_FRAME_COUNTER)) + val mleFrameCounter = tlvReader.getULong(ContextSpecificTag(TAG_MLE_FRAME_COUNTER)) + val lqi = tlvReader.getUInt(ContextSpecificTag(TAG_LQI)) val averageRssi = if (!tlvReader.isNull()) { tlvReader.getInt(ContextSpecificTag(TAG_AVERAGE_RSSI)) @@ -127,8 +127,8 @@ class ThreadNetworkDiagnosticsClusterNeighborTableStruct( tlvReader.getNull(ContextSpecificTag(TAG_LAST_RSSI)) null } - val frameErrorRate = tlvReader.getInt(ContextSpecificTag(TAG_FRAME_ERROR_RATE)) - val messageErrorRate = tlvReader.getInt(ContextSpecificTag(TAG_MESSAGE_ERROR_RATE)) + val frameErrorRate = tlvReader.getUInt(ContextSpecificTag(TAG_FRAME_ERROR_RATE)) + val messageErrorRate = tlvReader.getUInt(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)) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ThreadNetworkDiagnosticsClusterOperationalDatasetComponents.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ThreadNetworkDiagnosticsClusterOperationalDatasetComponents.kt index f9764369891073..64bbd5c45f591e 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ThreadNetworkDiagnosticsClusterOperationalDatasetComponents.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ThreadNetworkDiagnosticsClusterOperationalDatasetComponents.kt @@ -53,9 +53,9 @@ class ThreadNetworkDiagnosticsClusterOperationalDatasetComponents( append("}\n") } - fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { tlvWriter.apply { - startStructure(tag) + startStructure(tlvTag) put(ContextSpecificTag(TAG_ACTIVE_TIMESTAMP_PRESENT), activeTimestampPresent) put(ContextSpecificTag(TAG_PENDING_TIMESTAMP_PRESENT), pendingTimestampPresent) put(ContextSpecificTag(TAG_MASTER_KEY_PRESENT), masterKeyPresent) @@ -87,10 +87,10 @@ class ThreadNetworkDiagnosticsClusterOperationalDatasetComponents( private const val TAG_CHANNEL_MASK_PRESENT = 11 fun fromTlv( - tag: Tag, + tlvTag: Tag, tlvReader: TlvReader ): ThreadNetworkDiagnosticsClusterOperationalDatasetComponents { - tlvReader.enterStructure(tag) + tlvReader.enterStructure(tlvTag) val activeTimestampPresent = tlvReader.getBoolean(ContextSpecificTag(TAG_ACTIVE_TIMESTAMP_PRESENT)) val pendingTimestampPresent = diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ThreadNetworkDiagnosticsClusterRouteTableStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ThreadNetworkDiagnosticsClusterRouteTableStruct.kt index 8a7c423f84e6ad..36f9e4eee806b2 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ThreadNetworkDiagnosticsClusterRouteTableStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ThreadNetworkDiagnosticsClusterRouteTableStruct.kt @@ -23,14 +23,14 @@ import chip.tlv.TlvReader import chip.tlv.TlvWriter class ThreadNetworkDiagnosticsClusterRouteTableStruct( - val extAddress: Long, - val rloc16: Int, - val routerId: Int, - val nextHop: Int, - val pathCost: Int, - val LQIIn: Int, - val LQIOut: Int, - val age: Int, + val extAddress: ULong, + val rloc16: UInt, + val routerId: UInt, + val nextHop: UInt, + val pathCost: UInt, + val LQIIn: UInt, + val LQIOut: UInt, + val age: UInt, val allocated: Boolean, val linkEstablished: Boolean ) { @@ -49,9 +49,9 @@ class ThreadNetworkDiagnosticsClusterRouteTableStruct( append("}\n") } - fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { tlvWriter.apply { - startStructure(tag) + startStructure(tlvTag) put(ContextSpecificTag(TAG_EXT_ADDRESS), extAddress) put(ContextSpecificTag(TAG_RLOC16), rloc16) put(ContextSpecificTag(TAG_ROUTER_ID), routerId) @@ -78,16 +78,19 @@ class ThreadNetworkDiagnosticsClusterRouteTableStruct( private const val TAG_ALLOCATED = 8 private const val TAG_LINK_ESTABLISHED = 9 - fun fromTlv(tag: Tag, tlvReader: TlvReader): ThreadNetworkDiagnosticsClusterRouteTableStruct { - tlvReader.enterStructure(tag) - val extAddress = tlvReader.getLong(ContextSpecificTag(TAG_EXT_ADDRESS)) - val rloc16 = tlvReader.getInt(ContextSpecificTag(TAG_RLOC16)) - val routerId = tlvReader.getInt(ContextSpecificTag(TAG_ROUTER_ID)) - val nextHop = tlvReader.getInt(ContextSpecificTag(TAG_NEXT_HOP)) - val pathCost = tlvReader.getInt(ContextSpecificTag(TAG_PATH_COST)) - val LQIIn = tlvReader.getInt(ContextSpecificTag(TAG_L_Q_I_IN)) - val LQIOut = tlvReader.getInt(ContextSpecificTag(TAG_L_Q_I_OUT)) - val age = tlvReader.getInt(ContextSpecificTag(TAG_AGE)) + fun fromTlv( + tlvTag: Tag, + tlvReader: TlvReader + ): ThreadNetworkDiagnosticsClusterRouteTableStruct { + tlvReader.enterStructure(tlvTag) + val extAddress = tlvReader.getULong(ContextSpecificTag(TAG_EXT_ADDRESS)) + val rloc16 = tlvReader.getUInt(ContextSpecificTag(TAG_RLOC16)) + val routerId = tlvReader.getUInt(ContextSpecificTag(TAG_ROUTER_ID)) + val nextHop = tlvReader.getUInt(ContextSpecificTag(TAG_NEXT_HOP)) + val pathCost = tlvReader.getUInt(ContextSpecificTag(TAG_PATH_COST)) + val LQIIn = tlvReader.getUInt(ContextSpecificTag(TAG_L_Q_I_IN)) + val LQIOut = tlvReader.getUInt(ContextSpecificTag(TAG_L_Q_I_OUT)) + val age = tlvReader.getUInt(ContextSpecificTag(TAG_AGE)) val allocated = tlvReader.getBoolean(ContextSpecificTag(TAG_ALLOCATED)) val linkEstablished = tlvReader.getBoolean(ContextSpecificTag(TAG_LINK_ESTABLISHED)) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ThreadNetworkDiagnosticsClusterSecurityPolicy.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ThreadNetworkDiagnosticsClusterSecurityPolicy.kt index 1474db405b9d43..cddaccafae391a 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ThreadNetworkDiagnosticsClusterSecurityPolicy.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ThreadNetworkDiagnosticsClusterSecurityPolicy.kt @@ -22,7 +22,7 @@ import chip.tlv.Tag import chip.tlv.TlvReader import chip.tlv.TlvWriter -class ThreadNetworkDiagnosticsClusterSecurityPolicy(val rotationTime: Int, val flags: Int) { +class ThreadNetworkDiagnosticsClusterSecurityPolicy(val rotationTime: UInt, val flags: UInt) { override fun toString(): String = buildString { append("ThreadNetworkDiagnosticsClusterSecurityPolicy {\n") append("\trotationTime : $rotationTime\n") @@ -30,9 +30,9 @@ class ThreadNetworkDiagnosticsClusterSecurityPolicy(val rotationTime: Int, val f append("}\n") } - fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { tlvWriter.apply { - startStructure(tag) + startStructure(tlvTag) put(ContextSpecificTag(TAG_ROTATION_TIME), rotationTime) put(ContextSpecificTag(TAG_FLAGS), flags) endStructure() @@ -43,10 +43,10 @@ class ThreadNetworkDiagnosticsClusterSecurityPolicy(val rotationTime: Int, val f private const val TAG_ROTATION_TIME = 0 private const val TAG_FLAGS = 1 - fun fromTlv(tag: Tag, tlvReader: TlvReader): ThreadNetworkDiagnosticsClusterSecurityPolicy { - tlvReader.enterStructure(tag) - val rotationTime = tlvReader.getInt(ContextSpecificTag(TAG_ROTATION_TIME)) - val flags = tlvReader.getInt(ContextSpecificTag(TAG_FLAGS)) + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): ThreadNetworkDiagnosticsClusterSecurityPolicy { + tlvReader.enterStructure(tlvTag) + val rotationTime = tlvReader.getUInt(ContextSpecificTag(TAG_ROTATION_TIME)) + val flags = tlvReader.getUInt(ContextSpecificTag(TAG_FLAGS)) tlvReader.exitContainer() diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/TimeSynchronizationClusterDSTOffsetStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/TimeSynchronizationClusterDSTOffsetStruct.kt index d770d7a2ac8e03..15d797445b1c71 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/TimeSynchronizationClusterDSTOffsetStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/TimeSynchronizationClusterDSTOffsetStruct.kt @@ -24,8 +24,8 @@ import chip.tlv.TlvWriter class TimeSynchronizationClusterDSTOffsetStruct( val offset: Long, - val validStarting: Long, - val validUntil: Long? + val validStarting: ULong, + val validUntil: ULong? ) { override fun toString(): String = buildString { append("TimeSynchronizationClusterDSTOffsetStruct {\n") @@ -35,9 +35,9 @@ class TimeSynchronizationClusterDSTOffsetStruct( append("}\n") } - fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { tlvWriter.apply { - startStructure(tag) + startStructure(tlvTag) put(ContextSpecificTag(TAG_OFFSET), offset) put(ContextSpecificTag(TAG_VALID_STARTING), validStarting) if (validUntil != null) { @@ -54,13 +54,13 @@ class TimeSynchronizationClusterDSTOffsetStruct( private const val TAG_VALID_STARTING = 1 private const val TAG_VALID_UNTIL = 2 - fun fromTlv(tag: Tag, tlvReader: TlvReader): TimeSynchronizationClusterDSTOffsetStruct { - tlvReader.enterStructure(tag) + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): TimeSynchronizationClusterDSTOffsetStruct { + tlvReader.enterStructure(tlvTag) val offset = tlvReader.getLong(ContextSpecificTag(TAG_OFFSET)) - val validStarting = tlvReader.getLong(ContextSpecificTag(TAG_VALID_STARTING)) + val validStarting = tlvReader.getULong(ContextSpecificTag(TAG_VALID_STARTING)) val validUntil = if (!tlvReader.isNull()) { - tlvReader.getLong(ContextSpecificTag(TAG_VALID_UNTIL)) + tlvReader.getULong(ContextSpecificTag(TAG_VALID_UNTIL)) } else { tlvReader.getNull(ContextSpecificTag(TAG_VALID_UNTIL)) null diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/TimeSynchronizationClusterFabricScopedTrustedTimeSourceStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/TimeSynchronizationClusterFabricScopedTrustedTimeSourceStruct.kt index 7a2e95c671517a..5d7997c44ac541 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/TimeSynchronizationClusterFabricScopedTrustedTimeSourceStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/TimeSynchronizationClusterFabricScopedTrustedTimeSourceStruct.kt @@ -23,8 +23,8 @@ import chip.tlv.TlvReader import chip.tlv.TlvWriter class TimeSynchronizationClusterFabricScopedTrustedTimeSourceStruct( - val nodeID: Long, - val endpoint: Int + val nodeID: ULong, + val endpoint: UInt ) { override fun toString(): String = buildString { append("TimeSynchronizationClusterFabricScopedTrustedTimeSourceStruct {\n") @@ -33,9 +33,9 @@ class TimeSynchronizationClusterFabricScopedTrustedTimeSourceStruct( append("}\n") } - fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { tlvWriter.apply { - startStructure(tag) + startStructure(tlvTag) put(ContextSpecificTag(TAG_NODE_I_D), nodeID) put(ContextSpecificTag(TAG_ENDPOINT), endpoint) endStructure() @@ -47,12 +47,12 @@ class TimeSynchronizationClusterFabricScopedTrustedTimeSourceStruct( private const val TAG_ENDPOINT = 1 fun fromTlv( - tag: Tag, + tlvTag: Tag, tlvReader: TlvReader ): TimeSynchronizationClusterFabricScopedTrustedTimeSourceStruct { - tlvReader.enterStructure(tag) - val nodeID = tlvReader.getLong(ContextSpecificTag(TAG_NODE_I_D)) - val endpoint = tlvReader.getInt(ContextSpecificTag(TAG_ENDPOINT)) + tlvReader.enterStructure(tlvTag) + val nodeID = tlvReader.getULong(ContextSpecificTag(TAG_NODE_I_D)) + val endpoint = tlvReader.getUInt(ContextSpecificTag(TAG_ENDPOINT)) tlvReader.exitContainer() diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/TimeSynchronizationClusterTimeZoneStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/TimeSynchronizationClusterTimeZoneStruct.kt index 8a256fd7edfefe..c234edca338ea4 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/TimeSynchronizationClusterTimeZoneStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/TimeSynchronizationClusterTimeZoneStruct.kt @@ -25,7 +25,7 @@ import java.util.Optional class TimeSynchronizationClusterTimeZoneStruct( val offset: Long, - val validAt: Long, + val validAt: ULong, val name: Optional ) { override fun toString(): String = buildString { @@ -36,9 +36,9 @@ class TimeSynchronizationClusterTimeZoneStruct( append("}\n") } - fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { tlvWriter.apply { - startStructure(tag) + startStructure(tlvTag) put(ContextSpecificTag(TAG_OFFSET), offset) put(ContextSpecificTag(TAG_VALID_AT), validAt) if (name.isPresent) { @@ -54,10 +54,10 @@ class TimeSynchronizationClusterTimeZoneStruct( private const val TAG_VALID_AT = 1 private const val TAG_NAME = 2 - fun fromTlv(tag: Tag, tlvReader: TlvReader): TimeSynchronizationClusterTimeZoneStruct { - tlvReader.enterStructure(tag) + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): TimeSynchronizationClusterTimeZoneStruct { + tlvReader.enterStructure(tlvTag) val offset = tlvReader.getLong(ContextSpecificTag(TAG_OFFSET)) - val validAt = tlvReader.getLong(ContextSpecificTag(TAG_VALID_AT)) + val validAt = tlvReader.getULong(ContextSpecificTag(TAG_VALID_AT)) val name = if (tlvReader.isNextTag(ContextSpecificTag(TAG_NAME))) { Optional.of(tlvReader.getString(ContextSpecificTag(TAG_NAME))) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/TimeSynchronizationClusterTrustedTimeSourceStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/TimeSynchronizationClusterTrustedTimeSourceStruct.kt index db50619ad5da53..f6d3d1521650e0 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/TimeSynchronizationClusterTrustedTimeSourceStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/TimeSynchronizationClusterTrustedTimeSourceStruct.kt @@ -23,9 +23,9 @@ import chip.tlv.TlvReader import chip.tlv.TlvWriter class TimeSynchronizationClusterTrustedTimeSourceStruct( - val fabricIndex: Int, - val nodeID: Long, - val endpoint: Int + val fabricIndex: UInt, + val nodeID: ULong, + val endpoint: UInt ) { override fun toString(): String = buildString { append("TimeSynchronizationClusterTrustedTimeSourceStruct {\n") @@ -35,9 +35,9 @@ class TimeSynchronizationClusterTrustedTimeSourceStruct( append("}\n") } - fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { tlvWriter.apply { - startStructure(tag) + startStructure(tlvTag) put(ContextSpecificTag(TAG_FABRIC_INDEX), fabricIndex) put(ContextSpecificTag(TAG_NODE_I_D), nodeID) put(ContextSpecificTag(TAG_ENDPOINT), endpoint) @@ -50,11 +50,14 @@ class TimeSynchronizationClusterTrustedTimeSourceStruct( private const val TAG_NODE_I_D = 1 private const val TAG_ENDPOINT = 2 - fun fromTlv(tag: Tag, tlvReader: TlvReader): TimeSynchronizationClusterTrustedTimeSourceStruct { - tlvReader.enterStructure(tag) - val fabricIndex = tlvReader.getInt(ContextSpecificTag(TAG_FABRIC_INDEX)) - val nodeID = tlvReader.getLong(ContextSpecificTag(TAG_NODE_I_D)) - val endpoint = tlvReader.getInt(ContextSpecificTag(TAG_ENDPOINT)) + fun fromTlv( + tlvTag: Tag, + tlvReader: TlvReader + ): TimeSynchronizationClusterTrustedTimeSourceStruct { + tlvReader.enterStructure(tlvTag) + val fabricIndex = tlvReader.getUInt(ContextSpecificTag(TAG_FABRIC_INDEX)) + val nodeID = tlvReader.getULong(ContextSpecificTag(TAG_NODE_I_D)) + val endpoint = tlvReader.getUInt(ContextSpecificTag(TAG_ENDPOINT)) tlvReader.exitContainer() diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/TonerCartridgeMonitoringClusterReplacementProductStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/TonerCartridgeMonitoringClusterReplacementProductStruct.kt deleted file mode 100644 index 3633524a987a8c..00000000000000 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/TonerCartridgeMonitoringClusterReplacementProductStruct.kt +++ /dev/null @@ -1,66 +0,0 @@ -/* - * - * 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 chip.devicecontroller.cluster.structs - -import chip.devicecontroller.cluster.* -import chip.tlv.ContextSpecificTag -import chip.tlv.Tag -import chip.tlv.TlvReader -import chip.tlv.TlvWriter - -class TonerCartridgeMonitoringClusterReplacementProductStruct( - val productIdentifierType: Int, - val productIdentifierValue: String -) { - override fun toString(): String = buildString { - append("TonerCartridgeMonitoringClusterReplacementProductStruct {\n") - append("\tproductIdentifierType : $productIdentifierType\n") - append("\tproductIdentifierValue : $productIdentifierValue\n") - append("}\n") - } - - fun toTlv(tag: Tag, tlvWriter: TlvWriter) { - tlvWriter.apply { - startStructure(tag) - 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( - tag: Tag, - tlvReader: TlvReader - ): TonerCartridgeMonitoringClusterReplacementProductStruct { - tlvReader.enterStructure(tag) - val productIdentifierType = tlvReader.getInt(ContextSpecificTag(TAG_PRODUCT_IDENTIFIER_TYPE)) - val productIdentifierValue = - tlvReader.getString(ContextSpecificTag(TAG_PRODUCT_IDENTIFIER_VALUE)) - - tlvReader.exitContainer() - - return TonerCartridgeMonitoringClusterReplacementProductStruct( - productIdentifierType, - productIdentifierValue - ) - } - } -} diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/UnitTestingClusterDoubleNestedStructList.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/UnitTestingClusterDoubleNestedStructList.kt index bd34e9f5a90c49..057c63e81e830b 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/UnitTestingClusterDoubleNestedStructList.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/UnitTestingClusterDoubleNestedStructList.kt @@ -30,14 +30,14 @@ class UnitTestingClusterDoubleNestedStructList(val a: List { - tlvReader.enterList(ContextSpecificTag(TAG_A)) + tlvReader.enterArray(ContextSpecificTag(TAG_A)) while (!tlvReader.isEndOfContainer()) { add(UnitTestingClusterNestedStructList.fromTlv(AnonymousTag, tlvReader)) } diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/UnitTestingClusterNestedStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/UnitTestingClusterNestedStruct.kt index 7ca3b0b29aab01..707133811b1ba8 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/UnitTestingClusterNestedStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/UnitTestingClusterNestedStruct.kt @@ -23,7 +23,7 @@ import chip.tlv.TlvReader import chip.tlv.TlvWriter class UnitTestingClusterNestedStruct( - val a: Int, + val a: UInt, val b: Boolean, val c: UnitTestingClusterSimpleStruct ) { @@ -35,9 +35,9 @@ class UnitTestingClusterNestedStruct( append("}\n") } - fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { tlvWriter.apply { - startStructure(tag) + startStructure(tlvTag) put(ContextSpecificTag(TAG_A), a) put(ContextSpecificTag(TAG_B), b) c.toTlv(ContextSpecificTag(TAG_C), this) @@ -50,9 +50,9 @@ class UnitTestingClusterNestedStruct( private const val TAG_B = 1 private const val TAG_C = 2 - fun fromTlv(tag: Tag, tlvReader: TlvReader): UnitTestingClusterNestedStruct { - tlvReader.enterStructure(tag) - val a = tlvReader.getInt(ContextSpecificTag(TAG_A)) + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): UnitTestingClusterNestedStruct { + tlvReader.enterStructure(tlvTag) + val a = tlvReader.getUInt(ContextSpecificTag(TAG_A)) val b = tlvReader.getBoolean(ContextSpecificTag(TAG_B)) val c = UnitTestingClusterSimpleStruct.fromTlv(ContextSpecificTag(TAG_C), tlvReader) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/UnitTestingClusterNestedStructList.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/UnitTestingClusterNestedStructList.kt index b954fe0ec9879b..28a0567afcafeb 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/UnitTestingClusterNestedStructList.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/UnitTestingClusterNestedStructList.kt @@ -24,13 +24,13 @@ import chip.tlv.TlvReader import chip.tlv.TlvWriter class UnitTestingClusterNestedStructList( - val a: Int, + val a: UInt, val b: Boolean, val c: UnitTestingClusterSimpleStruct, val d: List, - val e: List, + val e: List, val f: List, - val g: List + val g: List ) { override fun toString(): String = buildString { append("UnitTestingClusterNestedStructList {\n") @@ -44,32 +44,32 @@ class UnitTestingClusterNestedStructList( append("}\n") } - fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { tlvWriter.apply { - startStructure(tag) + startStructure(tlvTag) put(ContextSpecificTag(TAG_A), a) put(ContextSpecificTag(TAG_B), b) c.toTlv(ContextSpecificTag(TAG_C), this) - startList(ContextSpecificTag(TAG_D)) + startArray(ContextSpecificTag(TAG_D)) for (item in d.iterator()) { item.toTlv(AnonymousTag, this) } - endList() - startList(ContextSpecificTag(TAG_E)) + endArray() + startArray(ContextSpecificTag(TAG_E)) for (item in e.iterator()) { put(AnonymousTag, item) } - endList() - startList(ContextSpecificTag(TAG_F)) + endArray() + startArray(ContextSpecificTag(TAG_F)) for (item in f.iterator()) { put(AnonymousTag, item) } - endList() - startList(ContextSpecificTag(TAG_G)) + endArray() + startArray(ContextSpecificTag(TAG_G)) for (item in g.iterator()) { put(AnonymousTag, item) } - endList() + endArray() endStructure() } } @@ -83,40 +83,40 @@ class UnitTestingClusterNestedStructList( private const val TAG_F = 5 private const val TAG_G = 6 - fun fromTlv(tag: Tag, tlvReader: TlvReader): UnitTestingClusterNestedStructList { - tlvReader.enterStructure(tag) - val a = tlvReader.getInt(ContextSpecificTag(TAG_A)) + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): UnitTestingClusterNestedStructList { + tlvReader.enterStructure(tlvTag) + val a = tlvReader.getUInt(ContextSpecificTag(TAG_A)) val b = tlvReader.getBoolean(ContextSpecificTag(TAG_B)) val c = UnitTestingClusterSimpleStruct.fromTlv(ContextSpecificTag(TAG_C), tlvReader) val d = buildList { - tlvReader.enterList(ContextSpecificTag(TAG_D)) + tlvReader.enterArray(ContextSpecificTag(TAG_D)) while (!tlvReader.isEndOfContainer()) { add(UnitTestingClusterSimpleStruct.fromTlv(AnonymousTag, tlvReader)) } tlvReader.exitContainer() } val e = - buildList { - tlvReader.enterList(ContextSpecificTag(TAG_E)) + buildList { + tlvReader.enterArray(ContextSpecificTag(TAG_E)) while (!tlvReader.isEndOfContainer()) { - add(tlvReader.getLong(AnonymousTag)) + add(tlvReader.getULong(AnonymousTag)) } tlvReader.exitContainer() } val f = buildList { - tlvReader.enterList(ContextSpecificTag(TAG_F)) + tlvReader.enterArray(ContextSpecificTag(TAG_F)) while (!tlvReader.isEndOfContainer()) { add(tlvReader.getByteArray(AnonymousTag)) } tlvReader.exitContainer() } val g = - buildList { - tlvReader.enterList(ContextSpecificTag(TAG_G)) + buildList { + tlvReader.enterArray(ContextSpecificTag(TAG_G)) while (!tlvReader.isEndOfContainer()) { - add(tlvReader.getInt(AnonymousTag)) + add(tlvReader.getUInt(AnonymousTag)) } tlvReader.exitContainer() } diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/UnitTestingClusterNullablesAndOptionalsStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/UnitTestingClusterNullablesAndOptionalsStruct.kt index 08a4b642e69d45..2f901d99aa541d 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/UnitTestingClusterNullablesAndOptionalsStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/UnitTestingClusterNullablesAndOptionalsStruct.kt @@ -25,18 +25,18 @@ import chip.tlv.TlvWriter import java.util.Optional class UnitTestingClusterNullablesAndOptionalsStruct( - val nullableInt: Int?, - val optionalInt: Optional, - val nullableOptionalInt: Optional?, + val nullableInt: UInt?, + 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>? + val nullableList: List?, + val optionalList: Optional>, + val nullableOptionalList: Optional>? ) { override fun toString(): String = buildString { append("UnitTestingClusterNullablesAndOptionalsStruct {\n") @@ -55,9 +55,9 @@ class UnitTestingClusterNullablesAndOptionalsStruct( append("}\n") } - fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { tlvWriter.apply { - startStructure(tag) + startStructure(tlvTag) if (nullableInt != null) { put(ContextSpecificTag(TAG_NULLABLE_INT), nullableInt) } else { @@ -110,30 +110,30 @@ class UnitTestingClusterNullablesAndOptionalsStruct( putNull(ContextSpecificTag(TAG_NULLABLE_OPTIONAL_STRUCT)) } if (nullableList != null) { - startList(ContextSpecificTag(TAG_NULLABLE_LIST)) + startArray(ContextSpecificTag(TAG_NULLABLE_LIST)) for (item in nullableList.iterator()) { put(AnonymousTag, item) } - endList() + endArray() } else { putNull(ContextSpecificTag(TAG_NULLABLE_LIST)) } if (optionalList.isPresent) { val optoptionalList = optionalList.get() - startList(ContextSpecificTag(TAG_OPTIONAL_LIST)) + startArray(ContextSpecificTag(TAG_OPTIONAL_LIST)) for (item in optoptionalList.iterator()) { put(AnonymousTag, item) } - endList() + endArray() } if (nullableOptionalList != null) { if (nullableOptionalList.isPresent) { val optnullableOptionalList = nullableOptionalList.get() - startList(ContextSpecificTag(TAG_NULLABLE_OPTIONAL_LIST)) + startArray(ContextSpecificTag(TAG_NULLABLE_OPTIONAL_LIST)) for (item in optnullableOptionalList.iterator()) { put(AnonymousTag, item) } - endList() + endArray() } } else { putNull(ContextSpecificTag(TAG_NULLABLE_OPTIONAL_LIST)) @@ -156,25 +156,25 @@ class UnitTestingClusterNullablesAndOptionalsStruct( private const val TAG_OPTIONAL_LIST = 10 private const val TAG_NULLABLE_OPTIONAL_LIST = 11 - fun fromTlv(tag: Tag, tlvReader: TlvReader): UnitTestingClusterNullablesAndOptionalsStruct { - tlvReader.enterStructure(tag) + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): UnitTestingClusterNullablesAndOptionalsStruct { + tlvReader.enterStructure(tlvTag) val nullableInt = if (!tlvReader.isNull()) { - tlvReader.getInt(ContextSpecificTag(TAG_NULLABLE_INT)) + tlvReader.getUInt(ContextSpecificTag(TAG_NULLABLE_INT)) } else { tlvReader.getNull(ContextSpecificTag(TAG_NULLABLE_INT)) null } val optionalInt = if (tlvReader.isNextTag(ContextSpecificTag(TAG_OPTIONAL_INT))) { - Optional.of(tlvReader.getInt(ContextSpecificTag(TAG_OPTIONAL_INT))) + Optional.of(tlvReader.getUInt(ContextSpecificTag(TAG_OPTIONAL_INT))) } else { Optional.empty() } val nullableOptionalInt = if (!tlvReader.isNull()) { if (tlvReader.isNextTag(ContextSpecificTag(TAG_NULLABLE_OPTIONAL_INT))) { - Optional.of(tlvReader.getInt(ContextSpecificTag(TAG_NULLABLE_OPTIONAL_INT))) + Optional.of(tlvReader.getUInt(ContextSpecificTag(TAG_NULLABLE_OPTIONAL_INT))) } else { Optional.empty() } @@ -242,10 +242,10 @@ class UnitTestingClusterNullablesAndOptionalsStruct( } val nullableList = if (!tlvReader.isNull()) { - buildList { - tlvReader.enterList(ContextSpecificTag(TAG_NULLABLE_LIST)) + buildList { + tlvReader.enterArray(ContextSpecificTag(TAG_NULLABLE_LIST)) while (!tlvReader.isEndOfContainer()) { - add(tlvReader.getInt(AnonymousTag)) + add(tlvReader.getUInt(AnonymousTag)) } tlvReader.exitContainer() } @@ -256,10 +256,10 @@ class UnitTestingClusterNullablesAndOptionalsStruct( val optionalList = if (tlvReader.isNextTag(ContextSpecificTag(TAG_OPTIONAL_LIST))) { Optional.of( - buildList { - tlvReader.enterList(ContextSpecificTag(TAG_OPTIONAL_LIST)) + buildList { + tlvReader.enterArray(ContextSpecificTag(TAG_OPTIONAL_LIST)) while (!tlvReader.isEndOfContainer()) { - add(tlvReader.getInt(AnonymousTag)) + add(tlvReader.getUInt(AnonymousTag)) } tlvReader.exitContainer() } @@ -271,10 +271,10 @@ class UnitTestingClusterNullablesAndOptionalsStruct( if (!tlvReader.isNull()) { if (tlvReader.isNextTag(ContextSpecificTag(TAG_NULLABLE_OPTIONAL_LIST))) { Optional.of( - buildList { - tlvReader.enterList(ContextSpecificTag(TAG_NULLABLE_OPTIONAL_LIST)) + buildList { + tlvReader.enterArray(ContextSpecificTag(TAG_NULLABLE_OPTIONAL_LIST)) while (!tlvReader.isEndOfContainer()) { - add(tlvReader.getInt(AnonymousTag)) + add(tlvReader.getUInt(AnonymousTag)) } tlvReader.exitContainer() } diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/UnitTestingClusterSimpleStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/UnitTestingClusterSimpleStruct.kt index 26bf18a07ed214..e90689364d15e9 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/UnitTestingClusterSimpleStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/UnitTestingClusterSimpleStruct.kt @@ -23,12 +23,12 @@ import chip.tlv.TlvReader import chip.tlv.TlvWriter class UnitTestingClusterSimpleStruct( - val a: Int, + val a: UInt, val b: Boolean, - val c: Int, + val c: UInt, val d: ByteArray, val e: String, - val f: Int, + val f: UInt, val g: Float, val h: Double ) { @@ -45,9 +45,9 @@ class UnitTestingClusterSimpleStruct( append("}\n") } - fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { tlvWriter.apply { - startStructure(tag) + startStructure(tlvTag) put(ContextSpecificTag(TAG_A), a) put(ContextSpecificTag(TAG_B), b) put(ContextSpecificTag(TAG_C), c) @@ -70,14 +70,14 @@ class UnitTestingClusterSimpleStruct( private const val TAG_G = 6 private const val TAG_H = 7 - fun fromTlv(tag: Tag, tlvReader: TlvReader): UnitTestingClusterSimpleStruct { - tlvReader.enterStructure(tag) - val a = tlvReader.getInt(ContextSpecificTag(TAG_A)) + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): UnitTestingClusterSimpleStruct { + tlvReader.enterStructure(tlvTag) + val a = tlvReader.getUInt(ContextSpecificTag(TAG_A)) val b = tlvReader.getBoolean(ContextSpecificTag(TAG_B)) - val c = tlvReader.getInt(ContextSpecificTag(TAG_C)) + val c = tlvReader.getUInt(ContextSpecificTag(TAG_C)) val d = tlvReader.getByteArray(ContextSpecificTag(TAG_D)) val e = tlvReader.getString(ContextSpecificTag(TAG_E)) - val f = tlvReader.getInt(ContextSpecificTag(TAG_F)) + val f = tlvReader.getUInt(ContextSpecificTag(TAG_F)) val g = tlvReader.getFloat(ContextSpecificTag(TAG_G)) val h = tlvReader.getDouble(ContextSpecificTag(TAG_H)) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/UnitTestingClusterTestFabricScoped.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/UnitTestingClusterTestFabricScoped.kt index 6b7273f3172d5d..9b0b230f042a9a 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/UnitTestingClusterTestFabricScoped.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/UnitTestingClusterTestFabricScoped.kt @@ -25,14 +25,14 @@ import chip.tlv.TlvWriter import java.util.Optional class UnitTestingClusterTestFabricScoped( - val fabricSensitiveInt8u: Int, - val optionalFabricSensitiveInt8u: Optional, - val nullableFabricSensitiveInt8u: Int?, - val nullableOptionalFabricSensitiveInt8u: Optional?, + val fabricSensitiveInt8u: UInt, + val optionalFabricSensitiveInt8u: Optional, + val nullableFabricSensitiveInt8u: UInt?, + val nullableOptionalFabricSensitiveInt8u: Optional?, val fabricSensitiveCharString: String, val fabricSensitiveStruct: UnitTestingClusterSimpleStruct, - val fabricSensitiveInt8uList: List, - val fabricIndex: Int + val fabricSensitiveInt8uList: List, + val fabricIndex: UInt ) { override fun toString(): String = buildString { append("UnitTestingClusterTestFabricScoped {\n") @@ -47,9 +47,9 @@ class UnitTestingClusterTestFabricScoped( append("}\n") } - fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { tlvWriter.apply { - startStructure(tag) + startStructure(tlvTag) put(ContextSpecificTag(TAG_FABRIC_SENSITIVE_INT8U), fabricSensitiveInt8u) if (optionalFabricSensitiveInt8u.isPresent) { val optoptionalFabricSensitiveInt8u = optionalFabricSensitiveInt8u.get() @@ -76,11 +76,11 @@ class UnitTestingClusterTestFabricScoped( } put(ContextSpecificTag(TAG_FABRIC_SENSITIVE_CHAR_STRING), fabricSensitiveCharString) fabricSensitiveStruct.toTlv(ContextSpecificTag(TAG_FABRIC_SENSITIVE_STRUCT), this) - startList(ContextSpecificTag(TAG_FABRIC_SENSITIVE_INT8U_LIST)) + startArray(ContextSpecificTag(TAG_FABRIC_SENSITIVE_INT8U_LIST)) for (item in fabricSensitiveInt8uList.iterator()) { put(AnonymousTag, item) } - endList() + endArray() put(ContextSpecificTag(TAG_FABRIC_INDEX), fabricIndex) endStructure() } @@ -96,18 +96,18 @@ class UnitTestingClusterTestFabricScoped( private const val TAG_FABRIC_SENSITIVE_INT8U_LIST = 7 private const val TAG_FABRIC_INDEX = 254 - fun fromTlv(tag: Tag, tlvReader: TlvReader): UnitTestingClusterTestFabricScoped { - tlvReader.enterStructure(tag) - val fabricSensitiveInt8u = tlvReader.getInt(ContextSpecificTag(TAG_FABRIC_SENSITIVE_INT8U)) + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): UnitTestingClusterTestFabricScoped { + tlvReader.enterStructure(tlvTag) + val fabricSensitiveInt8u = tlvReader.getUInt(ContextSpecificTag(TAG_FABRIC_SENSITIVE_INT8U)) val optionalFabricSensitiveInt8u = if (tlvReader.isNextTag(ContextSpecificTag(TAG_OPTIONAL_FABRIC_SENSITIVE_INT8U))) { - Optional.of(tlvReader.getInt(ContextSpecificTag(TAG_OPTIONAL_FABRIC_SENSITIVE_INT8U))) + Optional.of(tlvReader.getUInt(ContextSpecificTag(TAG_OPTIONAL_FABRIC_SENSITIVE_INT8U))) } else { Optional.empty() } val nullableFabricSensitiveInt8u = if (!tlvReader.isNull()) { - tlvReader.getInt(ContextSpecificTag(TAG_NULLABLE_FABRIC_SENSITIVE_INT8U)) + tlvReader.getUInt(ContextSpecificTag(TAG_NULLABLE_FABRIC_SENSITIVE_INT8U)) } else { tlvReader.getNull(ContextSpecificTag(TAG_NULLABLE_FABRIC_SENSITIVE_INT8U)) null @@ -118,7 +118,7 @@ class UnitTestingClusterTestFabricScoped( tlvReader.isNextTag(ContextSpecificTag(TAG_NULLABLE_OPTIONAL_FABRIC_SENSITIVE_INT8U)) ) { Optional.of( - tlvReader.getInt(ContextSpecificTag(TAG_NULLABLE_OPTIONAL_FABRIC_SENSITIVE_INT8U)) + tlvReader.getUInt(ContextSpecificTag(TAG_NULLABLE_OPTIONAL_FABRIC_SENSITIVE_INT8U)) ) } else { Optional.empty() @@ -135,14 +135,14 @@ class UnitTestingClusterTestFabricScoped( tlvReader ) val fabricSensitiveInt8uList = - buildList { - tlvReader.enterList(ContextSpecificTag(TAG_FABRIC_SENSITIVE_INT8U_LIST)) + buildList { + tlvReader.enterArray(ContextSpecificTag(TAG_FABRIC_SENSITIVE_INT8U_LIST)) while (!tlvReader.isEndOfContainer()) { - add(tlvReader.getInt(AnonymousTag)) + add(tlvReader.getUInt(AnonymousTag)) } tlvReader.exitContainer() } - val fabricIndex = tlvReader.getInt(ContextSpecificTag(TAG_FABRIC_INDEX)) + val fabricIndex = tlvReader.getUInt(ContextSpecificTag(TAG_FABRIC_INDEX)) tlvReader.exitContainer() diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/UnitTestingClusterTestListStructOctet.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/UnitTestingClusterTestListStructOctet.kt index 6c5df4cb224166..117c953eabe830 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/UnitTestingClusterTestListStructOctet.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/UnitTestingClusterTestListStructOctet.kt @@ -22,7 +22,7 @@ import chip.tlv.Tag import chip.tlv.TlvReader import chip.tlv.TlvWriter -class UnitTestingClusterTestListStructOctet(val member1: Long, val member2: ByteArray) { +class UnitTestingClusterTestListStructOctet(val member1: ULong, val member2: ByteArray) { override fun toString(): String = buildString { append("UnitTestingClusterTestListStructOctet {\n") append("\tmember1 : $member1\n") @@ -30,9 +30,9 @@ class UnitTestingClusterTestListStructOctet(val member1: Long, val member2: Byte append("}\n") } - fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { tlvWriter.apply { - startStructure(tag) + startStructure(tlvTag) put(ContextSpecificTag(TAG_MEMBER1), member1) put(ContextSpecificTag(TAG_MEMBER2), member2) endStructure() @@ -43,9 +43,9 @@ class UnitTestingClusterTestListStructOctet(val member1: Long, val member2: Byte private const val TAG_MEMBER1 = 0 private const val TAG_MEMBER2 = 1 - fun fromTlv(tag: Tag, tlvReader: TlvReader): UnitTestingClusterTestListStructOctet { - tlvReader.enterStructure(tag) - val member1 = tlvReader.getLong(ContextSpecificTag(TAG_MEMBER1)) + 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() diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/UserLabelClusterLabelStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/UserLabelClusterLabelStruct.kt index d90396f2a010ea..698f9e30607075 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/UserLabelClusterLabelStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/UserLabelClusterLabelStruct.kt @@ -30,9 +30,9 @@ class UserLabelClusterLabelStruct(val label: String, val value: String) { append("}\n") } - fun toTlv(tag: Tag, tlvWriter: TlvWriter) { + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { tlvWriter.apply { - startStructure(tag) + startStructure(tlvTag) put(ContextSpecificTag(TAG_LABEL), label) put(ContextSpecificTag(TAG_VALUE), value) endStructure() @@ -43,8 +43,8 @@ class UserLabelClusterLabelStruct(val label: String, val value: String) { private const val TAG_LABEL = 0 private const val TAG_VALUE = 1 - fun fromTlv(tag: Tag, tlvReader: TlvReader): UserLabelClusterLabelStruct { - tlvReader.enterStructure(tag) + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): UserLabelClusterLabelStruct { + tlvReader.enterStructure(tlvTag) val label = tlvReader.getString(ContextSpecificTag(TAG_LABEL)) val value = tlvReader.getString(ContextSpecificTag(TAG_VALUE)) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/UvFilterMonitoringClusterReplacementProductStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/UvFilterMonitoringClusterReplacementProductStruct.kt deleted file mode 100644 index c8f3fbfd0085f7..00000000000000 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/UvFilterMonitoringClusterReplacementProductStruct.kt +++ /dev/null @@ -1,63 +0,0 @@ -/* - * - * 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 chip.devicecontroller.cluster.structs - -import chip.devicecontroller.cluster.* -import chip.tlv.ContextSpecificTag -import chip.tlv.Tag -import chip.tlv.TlvReader -import chip.tlv.TlvWriter - -class UvFilterMonitoringClusterReplacementProductStruct( - val productIdentifierType: Int, - val productIdentifierValue: String -) { - override fun toString(): String = buildString { - append("UvFilterMonitoringClusterReplacementProductStruct {\n") - append("\tproductIdentifierType : $productIdentifierType\n") - append("\tproductIdentifierValue : $productIdentifierValue\n") - append("}\n") - } - - fun toTlv(tag: Tag, tlvWriter: TlvWriter) { - tlvWriter.apply { - startStructure(tag) - 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(tag: Tag, tlvReader: TlvReader): UvFilterMonitoringClusterReplacementProductStruct { - tlvReader.enterStructure(tag) - val productIdentifierType = tlvReader.getInt(ContextSpecificTag(TAG_PRODUCT_IDENTIFIER_TYPE)) - val productIdentifierValue = - tlvReader.getString(ContextSpecificTag(TAG_PRODUCT_IDENTIFIER_VALUE)) - - tlvReader.exitContainer() - - return UvFilterMonitoringClusterReplacementProductStruct( - productIdentifierType, - productIdentifierValue - ) - } - } -} diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/WaterTankMonitoringClusterReplacementProductStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/WaterTankMonitoringClusterReplacementProductStruct.kt deleted file mode 100644 index 0d0eadde9869da..00000000000000 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/WaterTankMonitoringClusterReplacementProductStruct.kt +++ /dev/null @@ -1,66 +0,0 @@ -/* - * - * 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 chip.devicecontroller.cluster.structs - -import chip.devicecontroller.cluster.* -import chip.tlv.ContextSpecificTag -import chip.tlv.Tag -import chip.tlv.TlvReader -import chip.tlv.TlvWriter - -class WaterTankMonitoringClusterReplacementProductStruct( - val productIdentifierType: Int, - val productIdentifierValue: String -) { - override fun toString(): String = buildString { - append("WaterTankMonitoringClusterReplacementProductStruct {\n") - append("\tproductIdentifierType : $productIdentifierType\n") - append("\tproductIdentifierValue : $productIdentifierValue\n") - append("}\n") - } - - fun toTlv(tag: Tag, tlvWriter: TlvWriter) { - tlvWriter.apply { - startStructure(tag) - 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( - tag: Tag, - tlvReader: TlvReader - ): WaterTankMonitoringClusterReplacementProductStruct { - tlvReader.enterStructure(tag) - val productIdentifierType = tlvReader.getInt(ContextSpecificTag(TAG_PRODUCT_IDENTIFIER_TYPE)) - val productIdentifierValue = - tlvReader.getString(ContextSpecificTag(TAG_PRODUCT_IDENTIFIER_VALUE)) - - tlvReader.exitContainer() - - return WaterTankMonitoringClusterReplacementProductStruct( - productIdentifierType, - productIdentifierValue - ) - } - } -} diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ZeoliteFilterMonitoringClusterReplacementProductStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ZeoliteFilterMonitoringClusterReplacementProductStruct.kt deleted file mode 100644 index a76eb3c119b24b..00000000000000 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ZeoliteFilterMonitoringClusterReplacementProductStruct.kt +++ /dev/null @@ -1,66 +0,0 @@ -/* - * - * 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 chip.devicecontroller.cluster.structs - -import chip.devicecontroller.cluster.* -import chip.tlv.ContextSpecificTag -import chip.tlv.Tag -import chip.tlv.TlvReader -import chip.tlv.TlvWriter - -class ZeoliteFilterMonitoringClusterReplacementProductStruct( - val productIdentifierType: Int, - val productIdentifierValue: String -) { - override fun toString(): String = buildString { - append("ZeoliteFilterMonitoringClusterReplacementProductStruct {\n") - append("\tproductIdentifierType : $productIdentifierType\n") - append("\tproductIdentifierValue : $productIdentifierValue\n") - append("}\n") - } - - fun toTlv(tag: Tag, tlvWriter: TlvWriter) { - tlvWriter.apply { - startStructure(tag) - 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( - tag: Tag, - tlvReader: TlvReader - ): ZeoliteFilterMonitoringClusterReplacementProductStruct { - tlvReader.enterStructure(tag) - val productIdentifierType = tlvReader.getInt(ContextSpecificTag(TAG_PRODUCT_IDENTIFIER_TYPE)) - val productIdentifierValue = - tlvReader.getString(ContextSpecificTag(TAG_PRODUCT_IDENTIFIER_VALUE)) - - tlvReader.exitContainer() - - return ZeoliteFilterMonitoringClusterReplacementProductStruct( - productIdentifierType, - productIdentifierValue - ) - } - } -} diff --git a/src/controller/java/tests/chip/devicecontroller/cluster/ChipClusterEventStructTest.kt b/src/controller/java/tests/chip/devicecontroller/cluster/ChipClusterEventStructTest.kt index a0b83d5dafbff5..addba4aa36138b 100644 --- a/src/controller/java/tests/chip/devicecontroller/cluster/ChipClusterEventStructTest.kt +++ b/src/controller/java/tests/chip/devicecontroller/cluster/ChipClusterEventStructTest.kt @@ -28,17 +28,17 @@ class ChipClusterEventStructTest { @Test fun testEventEventTlvTest() { val simpleStruct = - UnitTestingClusterSimpleStruct(1, true, 2, byteArrayOf(0x00, 0x01), "test", 3, 4.5f, 6.7) + UnitTestingClusterSimpleStruct(1U, true, 2U, byteArrayOf(0x00, 0x01), "test", 3U, 4.5f, 6.7) val simpleStruct2 = - UnitTestingClusterSimpleStruct(8, false, 9, byteArrayOf(0x02, 0x03), "test2", 4, 5.6f, 7.8) + UnitTestingClusterSimpleStruct(8U, false, 9U, byteArrayOf(0x02, 0x03), "test2", 4U, 5.6f, 7.8) val struct = UnitTestingClusterTestEventEvent( - 1, - 2, + 1U, + 2U, true, simpleStruct, listOf(simpleStruct, simpleStruct2), - listOf(3, 4, 5) + listOf(3U, 4U, 5U) ) val tlvWriter = TlvWriter() @@ -60,7 +60,7 @@ class ChipClusterEventStructTest { @Test fun testFabricScopedEventEventTest() { - val struct = UnitTestingClusterTestFabricScopedEventEvent(1) + val struct = UnitTestingClusterTestFabricScopedEventEvent(1U) val tlvWriter = TlvWriter() struct.toTlv(AnonymousTag, tlvWriter) diff --git a/src/controller/java/tests/chip/devicecontroller/cluster/ChipClusterStructTest.kt b/src/controller/java/tests/chip/devicecontroller/cluster/ChipClusterStructTest.kt index 1e5923f41eac9e..1ad779c7817b64 100644 --- a/src/controller/java/tests/chip/devicecontroller/cluster/ChipClusterStructTest.kt +++ b/src/controller/java/tests/chip/devicecontroller/cluster/ChipClusterStructTest.kt @@ -35,28 +35,28 @@ class ChipClusterStructTest { @Test fun doubleNestedStructTlvTest() { val simpleStruct = - UnitTestingClusterSimpleStruct(1, true, 2, byteArrayOf(0x00, 0x01), "test", 3, 4.5f, 6.7) + UnitTestingClusterSimpleStruct(1U, true, 2U, byteArrayOf(0x00, 0x01), "test", 3U, 4.5f, 6.7) val simpleStruct2 = - UnitTestingClusterSimpleStruct(8, false, 9, byteArrayOf(0x02, 0x03), "test2", 4, 5.6f, 7.8) + UnitTestingClusterSimpleStruct(8U, false, 9U, byteArrayOf(0x02, 0x03), "test2", 4U, 5.6f, 7.8) val nestedStructList = UnitTestingClusterNestedStructList( - 1, + 1U, true, simpleStruct, listOf(simpleStruct, simpleStruct2), - listOf(1L, 2L), + listOf(1UL, 2UL), listOf(byteArrayOf(0x02, 0x03), byteArrayOf(0x03, 0x04)), - listOf(1, 2) + listOf(1U, 2U) ) val nestedStructList2 = UnitTestingClusterNestedStructList( - 2, + 2U, false, simpleStruct2, listOf(simpleStruct2, simpleStruct), - listOf(3L, 4L), + listOf(3UL, 4UL), listOf(byteArrayOf(0x04, 0x05), byteArrayOf(0x06, 0x07)), - listOf(3, 4, 5) + listOf(3U, 4U, 5U) ) val testStruct = UnitTestingClusterDoubleNestedStructList(listOf(nestedStructList, nestedStructList2)) @@ -82,21 +82,21 @@ class ChipClusterStructTest { @Test fun nullablesAndOptionalsStructTlvTest1() { val simpleStruct = - UnitTestingClusterSimpleStruct(1, true, 2, byteArrayOf(0x00, 0x01), "test", 3, 4.5f, 6.7) + UnitTestingClusterSimpleStruct(1U, true, 2U, byteArrayOf(0x00, 0x01), "test", 3U, 4.5f, 6.7) val struct = UnitTestingClusterNullablesAndOptionalsStruct( - 1, - Optional.of(2), - Optional.of(3), + 1U, + Optional.of(2U), + Optional.of(3U), "test4", Optional.of("test5"), Optional.of("test6"), simpleStruct, Optional.of(simpleStruct), Optional.of(simpleStruct), - listOf(1, 2, 3), - Optional.of(listOf(4, 5, 6)), - Optional.of(listOf(7, 8, 9)) + listOf(1U, 2U, 3U), + Optional.of(listOf(4U, 5U, 6U)), + Optional.of(listOf(7U, 8U, 9U)) ) val tlvWriter = TlvWriter() @@ -121,10 +121,10 @@ class ChipClusterStructTest { // Optional Check - 1 fun nullablesAndOptionalsStructTlvTest2() { val simpleStruct = - UnitTestingClusterSimpleStruct(1, true, 2, byteArrayOf(0x00, 0x01), "test", 3, 4.5f, 6.7) + UnitTestingClusterSimpleStruct(1U, true, 2U, byteArrayOf(0x00, 0x01), "test", 3U, 4.5f, 6.7) val struct = UnitTestingClusterNullablesAndOptionalsStruct( - 1, + 1U, Optional.empty(), Optional.empty(), "test4", @@ -133,9 +133,9 @@ class ChipClusterStructTest { simpleStruct, Optional.empty(), Optional.empty(), - listOf(1, 2, 3), - Optional.of(listOf(4, 5, 6)), - Optional.of(listOf(7, 8, 9)) + listOf(1U, 2U, 3U), + Optional.of(listOf(4U, 5U, 6U)), + Optional.of(listOf(7U, 8U, 9U)) ) val tlvWriter = TlvWriter() @@ -160,19 +160,19 @@ class ChipClusterStructTest { // Optional Check - 2 fun nullablesAndOptionalsStructTlvTest3() { val simpleStruct = - UnitTestingClusterSimpleStruct(1, true, 2, byteArrayOf(0x00, 0x01), "test", 3, 4.5f, 6.7) + UnitTestingClusterSimpleStruct(1U, true, 2U, byteArrayOf(0x00, 0x01), "test", 3U, 4.5f, 6.7) val struct = UnitTestingClusterNullablesAndOptionalsStruct( - 1, - Optional.of(2), - Optional.of(3), + 1U, + Optional.of(2U), + Optional.of(3U), "test4", Optional.empty(), Optional.empty(), simpleStruct, Optional.of(simpleStruct), Optional.of(simpleStruct), - listOf(1, 2, 3), + listOf(1U, 2U, 3U), Optional.empty(), Optional.empty() ) @@ -199,10 +199,10 @@ class ChipClusterStructTest { // Nullable check - 1 fun nullablesAndOptionalsStructTlvTest4() { val simpleStruct = - UnitTestingClusterSimpleStruct(1, true, 2, byteArrayOf(0x00, 0x01), "test", 3, 4.5f, 6.7) + UnitTestingClusterSimpleStruct(1U, true, 2U, byteArrayOf(0x00, 0x01), "test", 3U, 4.5f, 6.7) val struct = UnitTestingClusterNullablesAndOptionalsStruct( - 1, + 1U, Optional.empty(), null, null, @@ -212,8 +212,8 @@ class ChipClusterStructTest { Optional.empty(), null, null, - Optional.of(listOf(4, 5, 6)), - Optional.of(listOf(7, 8, 9)) + Optional.of(listOf(4U, 5U, 6U)), + Optional.of(listOf(7U, 8U, 9U)) ) val tlvWriter = TlvWriter() @@ -238,19 +238,19 @@ class ChipClusterStructTest { // Nullable check - 2 fun nullablesAndOptionalsStructTlvTest5() { val simpleStruct = - UnitTestingClusterSimpleStruct(1, true, 2, byteArrayOf(0x00, 0x01), "test", 3, 4.5f, 6.7) + UnitTestingClusterSimpleStruct(1U, true, 2U, byteArrayOf(0x00, 0x01), "test", 3U, 4.5f, 6.7) val struct = UnitTestingClusterNullablesAndOptionalsStruct( null, - Optional.of(2), - Optional.of(3), + Optional.of(2U), + Optional.of(3U), "test4", Optional.empty(), null, null, Optional.of(simpleStruct), Optional.of(simpleStruct), - listOf(1, 2, 3), + listOf(1U, 2U, 3U), Optional.empty(), null ) @@ -276,17 +276,17 @@ class ChipClusterStructTest { @Test fun testFabricScopedTlvTest1() { val simpleStruct = - UnitTestingClusterSimpleStruct(1, true, 2, byteArrayOf(0x00, 0x01), "test", 3, 4.5f, 6.7) + UnitTestingClusterSimpleStruct(1U, true, 2U, byteArrayOf(0x00, 0x01), "test", 3U, 4.5f, 6.7) val struct = UnitTestingClusterTestFabricScoped( - 1, - Optional.of(2), - 3, - Optional.of(4), + 1U, + Optional.of(2U), + 3U, + Optional.of(4U), "test1", simpleStruct, - listOf(1, 2, 3), - 4 + listOf(1U, 2U, 3U), + 4U ) val tlvWriter = TlvWriter() @@ -309,17 +309,17 @@ class ChipClusterStructTest { @Test fun testFabricScopedTlvTest2() { val simpleStruct = - UnitTestingClusterSimpleStruct(1, true, 2, byteArrayOf(0x00, 0x01), "test", 3, 4.5f, 6.7) + UnitTestingClusterSimpleStruct(1U, true, 2U, byteArrayOf(0x00, 0x01), "test", 3U, 4.5f, 6.7) val struct = UnitTestingClusterTestFabricScoped( - 1, + 1U, Optional.empty(), - 3, + 3U, null, "test1", simpleStruct, - listOf(1, 2, 3), - 4 + listOf(1U, 2U, 3U), + 4U ) val tlvWriter = TlvWriter() @@ -342,17 +342,17 @@ class ChipClusterStructTest { @Test fun testFabricScopedTlvTest3() { val simpleStruct = - UnitTestingClusterSimpleStruct(1, true, 2, byteArrayOf(0x00, 0x01), "test", 3, 4.5f, 6.7) + UnitTestingClusterSimpleStruct(1U, true, 2U, byteArrayOf(0x00, 0x01), "test", 3U, 4.5f, 6.7) val struct = UnitTestingClusterTestFabricScoped( - 1, - Optional.of(2), + 1U, + Optional.of(2U), null, Optional.empty(), "test1", simpleStruct, - listOf(1, 2, 3), - 4 + listOf(1U, 2U, 3U), + 4U ) val tlvWriter = TlvWriter() @@ -374,7 +374,7 @@ class ChipClusterStructTest { @Test fun testListStructOctetTlvTest() { - val struct = UnitTestingClusterTestListStructOctet(1L, byteArrayOf(0x01, 0x02, 0x03)) + val struct = UnitTestingClusterTestListStructOctet(1UL, byteArrayOf(0x01, 0x02, 0x03)) val tlvWriter = TlvWriter() struct.toTlv(AnonymousTag, tlvWriter)