From 1467862054faec4711b45088b52506c54d1e318c Mon Sep 17 00:00:00 2001 From: Justin Wood Date: Fri, 11 Aug 2023 16:35:26 -0700 Subject: [PATCH] Revert "Adding laundry washer controls to all clusters" (#28670) --- .../all-clusters-app.matter | 39 -- .../all-clusters-common/all-clusters-app.zap | 332 +------------- .../esp32/main/CMakeLists.txt | 1 - ...olClusterAccessControlEntryChangedEvent.kt | 99 +++-- ...usterAccessControlExtensionChangedEvent.kt | 99 +++-- .../ActionsClusterActionFailedEvent.kt | 21 +- .../ActionsClusterStateChangedEvent.kt | 15 +- .../BasicInformationClusterLeaveEvent.kt | 13 +- ...InformationClusterReachableChangedEvent.kt | 13 +- .../BasicInformationClusterStartUpEvent.kt | 13 +- .../BooleanStateClusterStateChangeEvent.kt | 13 +- ...InformationClusterReachableChangedEvent.kt | 16 +- ...viceBasicInformationClusterStartUpEvent.kt | 13 +- .../DishwasherAlarmClusterNotifyEvent.kt | 21 +- .../DoorLockClusterDoorLockAlarmEvent.kt | 13 +- .../DoorLockClusterDoorStateChangeEvent.kt | 13 +- .../DoorLockClusterLockOperationErrorEvent.kt | 159 ++++--- .../DoorLockClusterLockOperationEvent.kt | 156 ++++--- .../DoorLockClusterLockUserChangeEvent.kt | 121 +++--- ...eneralDiagnosticsClusterBootReasonEvent.kt | 13 +- ...gnosticsClusterHardwareFaultChangeEvent.kt | 46 +- ...agnosticsClusterNetworkFaultChangeEvent.kt | 46 +- ...DiagnosticsClusterRadioFaultChangeEvent.kt | 46 +- ...nalStateClusterOperationCompletionEvent.kt | 94 ++-- ...tionalStateClusterOperationalErrorEvent.kt | 21 +- ...pdateRequestorClusterDownloadErrorEvent.kt | 73 ++-- ...ateRequestorClusterStateTransitionEvent.kt | 52 ++- ...dateRequestorClusterVersionAppliedEvent.kt | 20 +- ...rSourceClusterBatChargeFaultChangeEvent.kt | 43 +- .../PowerSourceClusterBatFaultChangeEvent.kt | 43 +- ...PowerSourceClusterWiredFaultChangeEvent.kt | 43 +- .../RefrigeratorAlarmClusterNotifyEvent.kt | 21 +- ...nalStateClusterOperationCompletionEvent.kt | 97 +++-- ...tionalStateClusterOperationalErrorEvent.kt | 21 +- .../SmokeCoAlarmClusterCOAlarmEvent.kt | 13 +- ...eCoAlarmClusterInterconnectCOAlarmEvent.kt | 13 +- ...AlarmClusterInterconnectSmokeAlarmEvent.kt | 13 +- .../SmokeCoAlarmClusterLowBatteryEvent.kt | 13 +- .../SmokeCoAlarmClusterSmokeAlarmEvent.kt | 13 +- ...areDiagnosticsClusterSoftwareFaultEvent.kt | 52 +-- .../SwitchClusterInitialPressEvent.kt | 13 +- .../SwitchClusterLongPressEvent.kt | 13 +- .../SwitchClusterLongReleaseEvent.kt | 13 +- .../SwitchClusterMultiPressCompleteEvent.kt | 20 +- .../SwitchClusterMultiPressOngoingEvent.kt | 20 +- .../SwitchClusterShortReleaseEvent.kt | 13 +- .../SwitchClusterSwitchLatchedEvent.kt | 13 +- ...DiagnosticsClusterConnectionStatusEvent.kt | 16 +- ...agnosticsClusterNetworkFaultChangeEvent.kt | 49 ++- ...imeSynchronizationClusterDSTStatusEvent.kt | 13 +- ...nchronizationClusterTimeZoneStatusEvent.kt | 30 +- .../UnitTestingClusterTestEventEvent.kt | 65 +-- ...estingClusterTestFabricScopedEventEvent.kt | 13 +- ...agnosticsClusterAssociationFailureEvent.kt | 20 +- ...DiagnosticsClusterConnectionStatusEvent.kt | 16 +- ...orkDiagnosticsClusterDisconnectionEvent.kt | 13 +- ...sControlClusterAccessControlEntryStruct.kt | 108 ++--- ...trolClusterAccessControlExtensionStruct.kt | 14 +- ...ControlClusterAccessControlTargetStruct.kt | 82 ++-- .../structs/ActionsClusterActionStruct.kt | 34 +- .../ActionsClusterEndpointListStruct.kt | 35 +- ...nitoringClusterReplacementProductStruct.kt | 28 +- ...pplicationBasicClusterApplicationStruct.kt | 17 +- ...ationLauncherClusterApplicationEPStruct.kt | 39 +- ...icationLauncherClusterApplicationStruct.kt | 17 +- .../AudioOutputClusterOutputInfoStruct.kt | 15 +- ...nformationClusterCapabilityMinimaStruct.kt | 25 +- ...formationClusterProductAppearanceStruct.kt | 35 +- .../structs/BindingClusterTargetStruct.kt | 90 ++-- ...formationClusterProductAppearanceStruct.kt | 41 +- .../ChannelClusterChannelInfoStruct.kt | 81 ++-- .../structs/ChannelClusterLineupInfoStruct.kt | 54 +-- ...tentLauncherClusterAdditionalInfoStruct.kt | 14 +- ...auncherClusterBrandingInformationStruct.kt | 143 +++--- ...ntentLauncherClusterContentSearchStruct.kt | 29 +- .../ContentLauncherClusterDimensionStruct.kt | 19 +- .../ContentLauncherClusterParameterStruct.kt | 54 +-- ...ntLauncherClusterStyleInformationStruct.kt | 71 +-- .../DescriptorClusterDeviceTypeStruct.kt | 14 +- .../DescriptorClusterSemanticTagStruct.kt | 76 ++-- .../DishwasherModeClusterModeOptionStruct.kt | 33 +- .../DishwasherModeClusterModeTagStruct.kt | 30 +- .../DoorLockClusterCredentialStruct.kt | 14 +- .../structs/FixedLabelClusterLabelStruct.kt | 14 +- ...missioningClusterBasicCommissioningInfo.kt | 28 +- ...neralDiagnosticsClusterNetworkInterface.kt | 117 ++--- ...pKeyManagementClusterGroupInfoMapStruct.kt | 51 +-- ...upKeyManagementClusterGroupKeyMapStruct.kt | 19 +- ...upKeyManagementClusterGroupKeySetStruct.kt | 169 ++++---- ...nitoringClusterReplacementProductStruct.kt | 28 +- ...mentClusterMonitoringRegistrationStruct.kt | 28 +- ...aundryWasherModeClusterModeOptionStruct.kt | 33 +- .../LaundryWasherModeClusterModeTagStruct.kt | 30 +- .../MediaInputClusterInputInfoStruct.kt | 21 +- ...iaPlaybackClusterPlaybackPositionStruct.kt | 35 +- .../ModeSelectClusterModeOptionStruct.kt | 33 +- .../ModeSelectClusterSemanticTagStruct.kt | 14 +- ...rkCommissioningClusterNetworkInfoStruct.kt | 17 +- ...gClusterThreadInterfaceScanResultStruct.kt | 43 +- ...ingClusterWiFiInterfaceScanResultStruct.kt | 37 +- ...redentialsClusterFabricDescriptorStruct.kt | 37 +- .../OperationalCredentialsClusterNOCStruct.kt | 40 +- ...OperationalStateClusterErrorStateStruct.kt | 58 +-- ...ionalStateClusterOperationalStateStruct.kt | 38 +- ...eUpdateRequestorClusterProviderLocation.kt | 25 +- ...erSourceClusterBatChargeFaultChangeType.kt | 43 +- .../PowerSourceClusterBatFaultChangeType.kt | 43 +- .../PowerSourceClusterWiredFaultChangeType.kt | 43 +- ...olledCabinetModeClusterModeOptionStruct.kt | 47 +- ...ntrolledCabinetModeClusterModeTagStruct.kt | 36 +- .../RvcCleanModeClusterModeOptionStruct.kt | 33 +- .../RvcCleanModeClusterModeTagStruct.kt | 30 +- ...OperationalStateClusterErrorStateStruct.kt | 58 +-- ...ionalStateClusterOperationalStateStruct.kt | 38 +- .../RvcRunModeClusterModeOptionStruct.kt | 33 +- .../structs/RvcRunModeClusterModeTagStruct.kt | 30 +- .../ScenesClusterAttributeValuePair.kt | 14 +- .../structs/ScenesClusterExtensionFieldSet.kt | 31 +- ...reDiagnosticsClusterThreadMetricsStruct.kt | 98 +++-- .../TargetNavigatorClusterTargetInfoStruct.kt | 14 +- ...statClusterThermostatScheduleTransition.kt | 67 +-- ...rkDiagnosticsClusterNeighborTableStruct.kt | 103 +++-- ...ticsClusterOperationalDatasetComponents.kt | 70 +-- ...tworkDiagnosticsClusterRouteTableStruct.kt | 46 +- ...NetworkDiagnosticsClusterSecurityPolicy.kt | 14 +- ...meSynchronizationClusterDSTOffsetStruct.kt | 40 +- ...sterFabricScopedTrustedTimeSourceStruct.kt | 20 +- ...imeSynchronizationClusterTimeZoneStruct.kt | 35 +- ...onizationClusterTrustedTimeSourceStruct.kt | 19 +- ...nitTestingClusterDoubleNestedStructList.kt | 27 +- .../structs/UnitTestingClusterNestedStruct.kt | 19 +- .../UnitTestingClusterNestedStructList.kt | 86 ++-- ...stingClusterNullablesAndOptionalsStruct.kt | 410 ++++++++++-------- .../structs/UnitTestingClusterSimpleStruct.kt | 29 +- .../UnitTestingClusterTestFabricScoped.kt | 145 ++++--- .../UnitTestingClusterTestListStructOctet.kt | 14 +- .../structs/UserLabelClusterLabelStruct.kt | 14 +- 137 files changed, 2961 insertions(+), 3221 deletions(-) diff --git a/examples/all-clusters-app/all-clusters-common/all-clusters-app.matter b/examples/all-clusters-app/all-clusters-common/all-clusters-app.matter index d3593cf9564395..4510215cc4fa80 100644 --- a/examples/all-clusters-app/all-clusters-common/all-clusters-app.matter +++ b/examples/all-clusters-app/all-clusters-common/all-clusters-app.matter @@ -2589,32 +2589,6 @@ server cluster RefrigeratorAndTemperatureControlledCabinetMode = 82 { command ChangeToMode(ChangeToModeRequest): ChangeToModeResponse = 0; } -/** This cluster supports remotely monitoring and controling the different typs of functionality available to a washing device, such as a washing machine. */ -server cluster LaundryWasherControls = 83 { - enum NumberOfRinsesEnum : ENUM8 { - kNone = 0; - kNormal = 1; - kExtra = 2; - kMax = 3; - } - - bitmap Feature : BITMAP32 { - kSpin = 0x1; - kRinse = 0x2; - } - - readonly attribute CHAR_STRING spinSpeeds[] = 0; - attribute nullable int8u spinSpeedCurrent = 1; - attribute NumberOfRinsesEnum numberOfRinses = 2; - readonly attribute NumberOfRinsesEnum supportedRinses[] = 3; - readonly attribute command_id generatedCommandList[] = 65528; - readonly attribute command_id acceptedCommandList[] = 65529; - readonly attribute event_id eventList[] = 65530; - readonly attribute attrib_id attributeList[] = 65531; - readonly attribute bitmap32 featureMap = 65532; - readonly attribute int16u clusterRevision = 65533; -} - /** Attributes and commands for selecting a mode from a list of supported options. */ server cluster RvcRunMode = 84 { enum ModeTag : ENUM16 { @@ -6647,19 +6621,6 @@ endpoint 1 { ram attribute clusterRevision default = 1; } - server cluster LaundryWasherControls { - callback attribute spinSpeeds; - ram attribute spinSpeedCurrent; - ram attribute numberOfRinses; - callback attribute supportedRinses; - callback attribute generatedCommandList; - callback attribute acceptedCommandList; - callback attribute eventList; - callback attribute attributeList; - ram attribute featureMap default = 3; - ram attribute clusterRevision default = 1; - } - server cluster RvcRunMode { callback attribute supportedModes; callback attribute currentMode; diff --git a/examples/all-clusters-app/all-clusters-common/all-clusters-app.zap b/examples/all-clusters-app/all-clusters-common/all-clusters-app.zap index c3580af95b8741..f7983bd036f737 100644 --- a/examples/all-clusters-app/all-clusters-common/all-clusters-app.zap +++ b/examples/all-clusters-app/all-clusters-common/all-clusters-app.zap @@ -33,33 +33,7 @@ ], "endpointTypes": [ { - "id": 13, "name": "MA-rootdevice", - "deviceTypeRef": { - "id": 177, - "code": 22, - "profileId": 259, - "label": "MA-rootdevice", - "name": "MA-rootdevice" - }, - "deviceTypes": [ - { - "id": 177, - "code": 22, - "profileId": 259, - "label": "MA-rootdevice", - "name": "MA-rootdevice" - } - ], - "deviceTypeRefs": [ - 177 - ], - "deviceVersions": [ - 1 - ], - "deviceIdentifiers": [ - 22 - ], "deviceTypeName": "MA-rootdevice", "deviceTypeCode": 22, "deviceTypeProfileId": 259, @@ -9506,33 +9480,7 @@ ] }, { - "id": 16, "name": "MA-onofflight", - "deviceTypeRef": { - "id": 183, - "code": 256, - "profileId": 259, - "label": "MA-onofflight", - "name": "MA-onofflight" - }, - "deviceTypes": [ - { - "id": 183, - "code": 256, - "profileId": 259, - "label": "MA-onofflight", - "name": "MA-onofflight" - } - ], - "deviceTypeRefs": [ - 183 - ], - "deviceVersions": [ - 1 - ], - "deviceIdentifiers": [ - 256 - ], "deviceTypeName": "MA-onofflight", "deviceTypeCode": 256, "deviceTypeProfileId": 259, @@ -14069,218 +14017,6 @@ } ] }, - { - "name": "Laundry Washer Controls", - "code": 83, - "mfgCode": null, - "define": "LAUNDRY_WASHER_CONTROLS_CLUSTER", - "side": "client", - "enabled": 0, - "attributes": [ - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "client", - "type": "bitmap32", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } - ] - }, - { - "name": "Laundry Washer Controls", - "code": 83, - "mfgCode": null, - "define": "LAUNDRY_WASHER_CONTROLS_CLUSTER", - "side": "server", - "enabled": 1, - "attributes": [ - { - "name": "SpinSpeeds", - "code": 0, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "SpinSpeedCurrent", - "code": 1, - "mfgCode": null, - "side": "server", - "type": "int8u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "NumberOfRinses", - "code": 2, - "mfgCode": null, - "side": "server", - "type": "NumberOfRinsesEnum", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "SupportedRinses", - "code": 3, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "GeneratedCommandList", - "code": 65528, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "AcceptedCommandList", - "code": 65529, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "EventList", - "code": 65530, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "AttributeList", - "code": 65531, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "server", - "type": "bitmap32", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "3", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "server", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } - ] - }, { "name": "RVC Run Mode", "code": 84, @@ -29197,33 +28933,7 @@ ] }, { - "id": 15, "name": "MA-onofflight", - "deviceTypeRef": { - "id": 183, - "code": 256, - "profileId": 259, - "label": "MA-onofflight", - "name": "MA-onofflight" - }, - "deviceTypes": [ - { - "id": 183, - "code": 256, - "profileId": 259, - "label": "MA-onofflight", - "name": "MA-onofflight" - } - ], - "deviceTypeRefs": [ - 183 - ], - "deviceVersions": [ - 1 - ], - "deviceIdentifiers": [ - 256 - ], "deviceTypeName": "MA-onofflight", "deviceTypeCode": 256, "deviceTypeProfileId": 259, @@ -32829,33 +32539,7 @@ ] }, { - "id": 14, "name": "Anonymous Endpoint Type", - "deviceTypeRef": { - "id": 228, - "code": 61442, - "profileId": 259, - "label": "MA-secondary-network-commissioning", - "name": "MA-secondary-network-commissioning" - }, - "deviceTypes": [ - { - "id": 228, - "code": 61442, - "profileId": 259, - "label": "MA-secondary-network-commissioning", - "name": "MA-secondary-network-commissioning" - } - ], - "deviceTypeRefs": [ - 228 - ], - "deviceVersions": [ - 1 - ], - "deviceIdentifiers": [ - 61442 - ], "deviceTypeName": "MA-secondary-network-commissioning", "deviceTypeCode": 61442, "deviceTypeProfileId": 259, @@ -33337,28 +33021,36 @@ "endpointTypeIndex": 0, "profileId": 259, "endpointId": 0, - "networkId": 0 + "networkId": 0, + "endpointVersion": 1, + "deviceIdentifier": 22 }, { "endpointTypeName": "MA-onofflight", "endpointTypeIndex": 1, "profileId": 259, "endpointId": 1, - "networkId": 0 + "networkId": 0, + "endpointVersion": 1, + "deviceIdentifier": 256 }, { "endpointTypeName": "MA-onofflight", "endpointTypeIndex": 2, "profileId": 259, "endpointId": 2, - "networkId": 0 + "networkId": 0, + "endpointVersion": 1, + "deviceIdentifier": 256 }, { "endpointTypeName": "Anonymous Endpoint Type", "endpointTypeIndex": 3, "profileId": 259, "endpointId": 65534, - "networkId": 0 + "networkId": 0, + "endpointVersion": 1, + "deviceIdentifier": 61442 } ], "log": [] diff --git a/examples/all-clusters-app/esp32/main/CMakeLists.txt b/examples/all-clusters-app/esp32/main/CMakeLists.txt index caacc1c5b2acfb..b5435325459417 100644 --- a/examples/all-clusters-app/esp32/main/CMakeLists.txt +++ b/examples/all-clusters-app/esp32/main/CMakeLists.txt @@ -96,7 +96,6 @@ set(SRC_DIRS_LIST "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/temperature-control-server" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/time-synchronization-server" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/dishwasher-alarm-server" - "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/laundry-washer-controls-server" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/all-clusters-app/all-clusters-common/src" ) 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 338c93d265e2c2..e926e70d861c20 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 @@ -17,22 +17,20 @@ package chip.devicecontroller.cluster.eventstructs import chip.devicecontroller.cluster.* -import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag -import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -import java.util.Optional - -class AccessControlClusterAccessControlEntryChangedEvent ( - val adminNodeID: Long?, - val adminPasscodeID: Int?, - val changeType: Int, - val latestValue: chip.devicecontroller.cluster.structs.AccessControlClusterAccessControlEntryStruct?, - val fabricIndex: Int) { - override fun toString(): String = buildString { +class AccessControlClusterAccessControlEntryChangedEvent( + val adminNodeID: Long?, + val adminPasscodeID: Int?, + val changeType: Int, + val latestValue: + chip.devicecontroller.cluster.structs.AccessControlClusterAccessControlEntryStruct?, + val fabricIndex: Int +) { + override fun toString(): String = buildString { append("AccessControlClusterAccessControlEntryChangedEvent {\n") append("\tadminNodeID : $adminNodeID\n") append("\tadminPasscodeID : $adminPasscodeID\n") @@ -46,21 +44,21 @@ class AccessControlClusterAccessControlEntryChangedEvent ( tlvWriter.apply { startStructure(tag) if (adminNodeID != null) { - put(ContextSpecificTag(TAG_ADMIN_NODE_I_D), adminNodeID) - } else { - putNull(ContextSpecificTag(TAG_ADMIN_NODE_I_D)) - } + put(ContextSpecificTag(TAG_ADMIN_NODE_I_D), adminNodeID) + } else { + putNull(ContextSpecificTag(TAG_ADMIN_NODE_I_D)) + } if (adminPasscodeID != null) { - put(ContextSpecificTag(TAG_ADMIN_PASSCODE_I_D), adminPasscodeID) - } else { - putNull(ContextSpecificTag(TAG_ADMIN_PASSCODE_I_D)) - } + put(ContextSpecificTag(TAG_ADMIN_PASSCODE_I_D), adminPasscodeID) + } else { + putNull(ContextSpecificTag(TAG_ADMIN_PASSCODE_I_D)) + } put(ContextSpecificTag(TAG_CHANGE_TYPE), changeType) if (latestValue != null) { - latestValue.toTlv(ContextSpecificTag(TAG_LATEST_VALUE), this) - } else { - putNull(ContextSpecificTag(TAG_LATEST_VALUE)) - } + latestValue.toTlv(ContextSpecificTag(TAG_LATEST_VALUE), this) + } else { + putNull(ContextSpecificTag(TAG_LATEST_VALUE)) + } put(ContextSpecificTag(TAG_FABRIC_INDEX), fabricIndex) endStructure() } @@ -73,32 +71,45 @@ class AccessControlClusterAccessControlEntryChangedEvent ( private const val TAG_LATEST_VALUE = 4 private const val TAG_FABRIC_INDEX = 254 - fun fromTlv(tag: Tag, tlvReader: TlvReader) : AccessControlClusterAccessControlEntryChangedEvent { + fun fromTlv( + tag: Tag, + tlvReader: TlvReader + ): AccessControlClusterAccessControlEntryChangedEvent { tlvReader.enterStructure(tag) - val adminNodeID = if (!tlvReader.isNull()) { - tlvReader.getLong(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)) - } else { - tlvReader.getNull(ContextSpecificTag(TAG_ADMIN_PASSCODE_I_D)) - null - } + val adminNodeID = + if (!tlvReader.isNull()) { + tlvReader.getLong(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)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_ADMIN_PASSCODE_I_D)) + null + } val changeType = tlvReader.getInt(ContextSpecificTag(TAG_CHANGE_TYPE)) - val latestValue = if (!tlvReader.isNull()) { - chip.devicecontroller.cluster.structs.AccessControlClusterAccessControlEntryStruct.fromTlv(ContextSpecificTag(TAG_LATEST_VALUE), tlvReader) - } else { - tlvReader.getNull(ContextSpecificTag(TAG_LATEST_VALUE)) - null - } + val latestValue = + if (!tlvReader.isNull()) { + chip.devicecontroller.cluster.structs.AccessControlClusterAccessControlEntryStruct + .fromTlv(ContextSpecificTag(TAG_LATEST_VALUE), tlvReader) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_LATEST_VALUE)) + null + } val fabricIndex = tlvReader.getInt(ContextSpecificTag(TAG_FABRIC_INDEX)) - + tlvReader.exitContainer() - return AccessControlClusterAccessControlEntryChangedEvent(adminNodeID, adminPasscodeID, changeType, latestValue, fabricIndex) + return AccessControlClusterAccessControlEntryChangedEvent( + adminNodeID, + adminPasscodeID, + changeType, + latestValue, + fabricIndex + ) } } } 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 064b86812956d4..e01b81cec705bb 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 @@ -17,22 +17,20 @@ package chip.devicecontroller.cluster.eventstructs import chip.devicecontroller.cluster.* -import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag -import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -import java.util.Optional - -class AccessControlClusterAccessControlExtensionChangedEvent ( - val adminNodeID: Long?, - val adminPasscodeID: Int?, - val changeType: Int, - val latestValue: chip.devicecontroller.cluster.structs.AccessControlClusterAccessControlExtensionStruct?, - val fabricIndex: Int) { - override fun toString(): String = buildString { +class AccessControlClusterAccessControlExtensionChangedEvent( + val adminNodeID: Long?, + val adminPasscodeID: Int?, + val changeType: Int, + val latestValue: + chip.devicecontroller.cluster.structs.AccessControlClusterAccessControlExtensionStruct?, + val fabricIndex: Int +) { + override fun toString(): String = buildString { append("AccessControlClusterAccessControlExtensionChangedEvent {\n") append("\tadminNodeID : $adminNodeID\n") append("\tadminPasscodeID : $adminPasscodeID\n") @@ -46,21 +44,21 @@ class AccessControlClusterAccessControlExtensionChangedEvent ( tlvWriter.apply { startStructure(tag) if (adminNodeID != null) { - put(ContextSpecificTag(TAG_ADMIN_NODE_I_D), adminNodeID) - } else { - putNull(ContextSpecificTag(TAG_ADMIN_NODE_I_D)) - } + put(ContextSpecificTag(TAG_ADMIN_NODE_I_D), adminNodeID) + } else { + putNull(ContextSpecificTag(TAG_ADMIN_NODE_I_D)) + } if (adminPasscodeID != null) { - put(ContextSpecificTag(TAG_ADMIN_PASSCODE_I_D), adminPasscodeID) - } else { - putNull(ContextSpecificTag(TAG_ADMIN_PASSCODE_I_D)) - } + put(ContextSpecificTag(TAG_ADMIN_PASSCODE_I_D), adminPasscodeID) + } else { + putNull(ContextSpecificTag(TAG_ADMIN_PASSCODE_I_D)) + } put(ContextSpecificTag(TAG_CHANGE_TYPE), changeType) if (latestValue != null) { - latestValue.toTlv(ContextSpecificTag(TAG_LATEST_VALUE), this) - } else { - putNull(ContextSpecificTag(TAG_LATEST_VALUE)) - } + latestValue.toTlv(ContextSpecificTag(TAG_LATEST_VALUE), this) + } else { + putNull(ContextSpecificTag(TAG_LATEST_VALUE)) + } put(ContextSpecificTag(TAG_FABRIC_INDEX), fabricIndex) endStructure() } @@ -73,32 +71,45 @@ class AccessControlClusterAccessControlExtensionChangedEvent ( private const val TAG_LATEST_VALUE = 4 private const val TAG_FABRIC_INDEX = 254 - fun fromTlv(tag: Tag, tlvReader: TlvReader) : AccessControlClusterAccessControlExtensionChangedEvent { + fun fromTlv( + tag: Tag, + tlvReader: TlvReader + ): AccessControlClusterAccessControlExtensionChangedEvent { tlvReader.enterStructure(tag) - val adminNodeID = if (!tlvReader.isNull()) { - tlvReader.getLong(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)) - } else { - tlvReader.getNull(ContextSpecificTag(TAG_ADMIN_PASSCODE_I_D)) - null - } + val adminNodeID = + if (!tlvReader.isNull()) { + tlvReader.getLong(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)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_ADMIN_PASSCODE_I_D)) + null + } val changeType = tlvReader.getInt(ContextSpecificTag(TAG_CHANGE_TYPE)) - val latestValue = if (!tlvReader.isNull()) { - chip.devicecontroller.cluster.structs.AccessControlClusterAccessControlExtensionStruct.fromTlv(ContextSpecificTag(TAG_LATEST_VALUE), tlvReader) - } else { - tlvReader.getNull(ContextSpecificTag(TAG_LATEST_VALUE)) - null - } + val latestValue = + if (!tlvReader.isNull()) { + chip.devicecontroller.cluster.structs.AccessControlClusterAccessControlExtensionStruct + .fromTlv(ContextSpecificTag(TAG_LATEST_VALUE), tlvReader) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_LATEST_VALUE)) + null + } val fabricIndex = tlvReader.getInt(ContextSpecificTag(TAG_FABRIC_INDEX)) - + tlvReader.exitContainer() - return AccessControlClusterAccessControlExtensionChangedEvent(adminNodeID, adminPasscodeID, changeType, latestValue, fabricIndex) + return AccessControlClusterAccessControlExtensionChangedEvent( + adminNodeID, + adminPasscodeID, + changeType, + latestValue, + fabricIndex + ) } } } 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 167cdbeaebfee4..d2e375338f705d 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 @@ -17,21 +17,18 @@ package chip.devicecontroller.cluster.eventstructs import chip.devicecontroller.cluster.* -import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag -import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -import java.util.Optional - -class ActionsClusterActionFailedEvent ( - val actionID: Int, - val invokeID: Long, - val newState: Int, - val error: Int) { - override fun toString(): String = buildString { +class ActionsClusterActionFailedEvent( + val actionID: Int, + val invokeID: Long, + val newState: Int, + val error: Int +) { + override fun toString(): String = buildString { append("ActionsClusterActionFailedEvent {\n") append("\tactionID : $actionID\n") append("\tinvokeID : $invokeID\n") @@ -57,13 +54,13 @@ class ActionsClusterActionFailedEvent ( private const val TAG_NEW_STATE = 2 private const val TAG_ERROR = 3 - fun fromTlv(tag: Tag, tlvReader: TlvReader) : ActionsClusterActionFailedEvent { + 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)) - + tlvReader.exitContainer() return ActionsClusterActionFailedEvent(actionID, invokeID, newState, error) 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 cd461b0ff538ef..05ad68aae272ea 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 @@ -17,20 +17,13 @@ package chip.devicecontroller.cluster.eventstructs import chip.devicecontroller.cluster.* -import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag -import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -import java.util.Optional - -class ActionsClusterStateChangedEvent ( - val actionID: Int, - val invokeID: Long, - val newState: Int) { - override fun toString(): String = buildString { +class ActionsClusterStateChangedEvent(val actionID: Int, val invokeID: Long, val newState: Int) { + override fun toString(): String = buildString { append("ActionsClusterStateChangedEvent {\n") append("\tactionID : $actionID\n") append("\tinvokeID : $invokeID\n") @@ -53,12 +46,12 @@ class ActionsClusterStateChangedEvent ( private const val TAG_INVOKE_I_D = 1 private const val TAG_NEW_STATE = 2 - fun fromTlv(tag: Tag, tlvReader: TlvReader) : ActionsClusterStateChangedEvent { + 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)) - + tlvReader.exitContainer() return ActionsClusterStateChangedEvent(actionID, invokeID, newState) 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 e45d705386325c..962ed26cddb40d 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 @@ -17,18 +17,13 @@ package chip.devicecontroller.cluster.eventstructs import chip.devicecontroller.cluster.* -import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag -import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -import java.util.Optional - -class BasicInformationClusterLeaveEvent ( - val fabricIndex: Int) { - override fun toString(): String = buildString { +class BasicInformationClusterLeaveEvent(val fabricIndex: Int) { + override fun toString(): String = buildString { append("BasicInformationClusterLeaveEvent {\n") append("\tfabricIndex : $fabricIndex\n") append("}\n") @@ -45,10 +40,10 @@ class BasicInformationClusterLeaveEvent ( companion object { private const val TAG_FABRIC_INDEX = 0 - fun fromTlv(tag: Tag, tlvReader: TlvReader) : BasicInformationClusterLeaveEvent { + fun fromTlv(tag: Tag, tlvReader: TlvReader): BasicInformationClusterLeaveEvent { tlvReader.enterStructure(tag) val fabricIndex = tlvReader.getInt(ContextSpecificTag(TAG_FABRIC_INDEX)) - + tlvReader.exitContainer() return BasicInformationClusterLeaveEvent(fabricIndex) 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 025e619be435d4..c40211aa617dcc 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 @@ -17,18 +17,13 @@ package chip.devicecontroller.cluster.eventstructs import chip.devicecontroller.cluster.* -import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag -import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -import java.util.Optional - -class BasicInformationClusterReachableChangedEvent ( - val reachableNewValue: Boolean) { - override fun toString(): String = buildString { +class BasicInformationClusterReachableChangedEvent(val reachableNewValue: Boolean) { + override fun toString(): String = buildString { append("BasicInformationClusterReachableChangedEvent {\n") append("\treachableNewValue : $reachableNewValue\n") append("}\n") @@ -45,10 +40,10 @@ class BasicInformationClusterReachableChangedEvent ( companion object { private const val TAG_REACHABLE_NEW_VALUE = 0 - fun fromTlv(tag: Tag, tlvReader: TlvReader) : BasicInformationClusterReachableChangedEvent { + fun fromTlv(tag: Tag, tlvReader: TlvReader): BasicInformationClusterReachableChangedEvent { tlvReader.enterStructure(tag) val reachableNewValue = tlvReader.getBoolean(ContextSpecificTag(TAG_REACHABLE_NEW_VALUE)) - + tlvReader.exitContainer() return BasicInformationClusterReachableChangedEvent(reachableNewValue) 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 f0ab0ec9b2e99f..23082666b05cae 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 @@ -17,18 +17,13 @@ package chip.devicecontroller.cluster.eventstructs import chip.devicecontroller.cluster.* -import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag -import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -import java.util.Optional - -class BasicInformationClusterStartUpEvent ( - val softwareVersion: Long) { - override fun toString(): String = buildString { +class BasicInformationClusterStartUpEvent(val softwareVersion: Long) { + override fun toString(): String = buildString { append("BasicInformationClusterStartUpEvent {\n") append("\tsoftwareVersion : $softwareVersion\n") append("}\n") @@ -45,10 +40,10 @@ class BasicInformationClusterStartUpEvent ( companion object { private const val TAG_SOFTWARE_VERSION = 0 - fun fromTlv(tag: Tag, tlvReader: TlvReader) : BasicInformationClusterStartUpEvent { + fun fromTlv(tag: Tag, tlvReader: TlvReader): BasicInformationClusterStartUpEvent { tlvReader.enterStructure(tag) val softwareVersion = tlvReader.getLong(ContextSpecificTag(TAG_SOFTWARE_VERSION)) - + tlvReader.exitContainer() return BasicInformationClusterStartUpEvent(softwareVersion) 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 8194ba7d1f742d..a0ecfb76141580 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 @@ -17,18 +17,13 @@ package chip.devicecontroller.cluster.eventstructs import chip.devicecontroller.cluster.* -import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag -import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -import java.util.Optional - -class BooleanStateClusterStateChangeEvent ( - val stateValue: Boolean) { - override fun toString(): String = buildString { +class BooleanStateClusterStateChangeEvent(val stateValue: Boolean) { + override fun toString(): String = buildString { append("BooleanStateClusterStateChangeEvent {\n") append("\tstateValue : $stateValue\n") append("}\n") @@ -45,10 +40,10 @@ class BooleanStateClusterStateChangeEvent ( companion object { private const val TAG_STATE_VALUE = 0 - fun fromTlv(tag: Tag, tlvReader: TlvReader) : BooleanStateClusterStateChangeEvent { + fun fromTlv(tag: Tag, tlvReader: TlvReader): BooleanStateClusterStateChangeEvent { tlvReader.enterStructure(tag) val stateValue = tlvReader.getBoolean(ContextSpecificTag(TAG_STATE_VALUE)) - + tlvReader.exitContainer() return BooleanStateClusterStateChangeEvent(stateValue) 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 c66f3595c88152..e75b2f7af96f93 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 @@ -17,18 +17,13 @@ package chip.devicecontroller.cluster.eventstructs import chip.devicecontroller.cluster.* -import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag -import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -import java.util.Optional - -class BridgedDeviceBasicInformationClusterReachableChangedEvent ( - val reachableNewValue: Boolean) { - override fun toString(): String = buildString { +class BridgedDeviceBasicInformationClusterReachableChangedEvent(val reachableNewValue: Boolean) { + override fun toString(): String = buildString { append("BridgedDeviceBasicInformationClusterReachableChangedEvent {\n") append("\treachableNewValue : $reachableNewValue\n") append("}\n") @@ -45,10 +40,13 @@ class BridgedDeviceBasicInformationClusterReachableChangedEvent ( companion object { private const val TAG_REACHABLE_NEW_VALUE = 0 - fun fromTlv(tag: Tag, tlvReader: TlvReader) : BridgedDeviceBasicInformationClusterReachableChangedEvent { + fun fromTlv( + tag: Tag, + tlvReader: TlvReader + ): BridgedDeviceBasicInformationClusterReachableChangedEvent { tlvReader.enterStructure(tag) val reachableNewValue = tlvReader.getBoolean(ContextSpecificTag(TAG_REACHABLE_NEW_VALUE)) - + tlvReader.exitContainer() return BridgedDeviceBasicInformationClusterReachableChangedEvent(reachableNewValue) 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 9b1e886926c1bd..80c60be6847056 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 @@ -17,18 +17,13 @@ package chip.devicecontroller.cluster.eventstructs import chip.devicecontroller.cluster.* -import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag -import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -import java.util.Optional - -class BridgedDeviceBasicInformationClusterStartUpEvent ( - val softwareVersion: Long) { - override fun toString(): String = buildString { +class BridgedDeviceBasicInformationClusterStartUpEvent(val softwareVersion: Long) { + override fun toString(): String = buildString { append("BridgedDeviceBasicInformationClusterStartUpEvent {\n") append("\tsoftwareVersion : $softwareVersion\n") append("}\n") @@ -45,10 +40,10 @@ class BridgedDeviceBasicInformationClusterStartUpEvent ( companion object { private const val TAG_SOFTWARE_VERSION = 0 - fun fromTlv(tag: Tag, tlvReader: TlvReader) : BridgedDeviceBasicInformationClusterStartUpEvent { + fun fromTlv(tag: Tag, tlvReader: TlvReader): BridgedDeviceBasicInformationClusterStartUpEvent { tlvReader.enterStructure(tag) val softwareVersion = tlvReader.getLong(ContextSpecificTag(TAG_SOFTWARE_VERSION)) - + tlvReader.exitContainer() return BridgedDeviceBasicInformationClusterStartUpEvent(softwareVersion) 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 b2a29696b191a8..0b7206788e842a 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 @@ -17,21 +17,18 @@ package chip.devicecontroller.cluster.eventstructs import chip.devicecontroller.cluster.* -import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag -import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -import java.util.Optional - -class DishwasherAlarmClusterNotifyEvent ( - val active: Long, - val inactive: Long, - val state: Long, - val mask: Long) { - override fun toString(): String = buildString { +class DishwasherAlarmClusterNotifyEvent( + val active: Long, + val inactive: Long, + val state: Long, + val mask: Long +) { + override fun toString(): String = buildString { append("DishwasherAlarmClusterNotifyEvent {\n") append("\tactive : $active\n") append("\tinactive : $inactive\n") @@ -57,13 +54,13 @@ class DishwasherAlarmClusterNotifyEvent ( private const val TAG_STATE = 2 private const val TAG_MASK = 3 - fun fromTlv(tag: Tag, tlvReader: TlvReader) : DishwasherAlarmClusterNotifyEvent { + 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)) - + tlvReader.exitContainer() return DishwasherAlarmClusterNotifyEvent(active, inactive, state, mask) 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 309eb4e52c29f2..6417fb85009e88 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 @@ -17,18 +17,13 @@ package chip.devicecontroller.cluster.eventstructs import chip.devicecontroller.cluster.* -import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag -import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -import java.util.Optional - -class DoorLockClusterDoorLockAlarmEvent ( - val alarmCode: Int) { - override fun toString(): String = buildString { +class DoorLockClusterDoorLockAlarmEvent(val alarmCode: Int) { + override fun toString(): String = buildString { append("DoorLockClusterDoorLockAlarmEvent {\n") append("\talarmCode : $alarmCode\n") append("}\n") @@ -45,10 +40,10 @@ class DoorLockClusterDoorLockAlarmEvent ( companion object { private const val TAG_ALARM_CODE = 0 - fun fromTlv(tag: Tag, tlvReader: TlvReader) : DoorLockClusterDoorLockAlarmEvent { + fun fromTlv(tag: Tag, tlvReader: TlvReader): DoorLockClusterDoorLockAlarmEvent { tlvReader.enterStructure(tag) val alarmCode = tlvReader.getInt(ContextSpecificTag(TAG_ALARM_CODE)) - + tlvReader.exitContainer() return DoorLockClusterDoorLockAlarmEvent(alarmCode) 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 05068118f56c59..d0b6acbe7ea227 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 @@ -17,18 +17,13 @@ package chip.devicecontroller.cluster.eventstructs import chip.devicecontroller.cluster.* -import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag -import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -import java.util.Optional - -class DoorLockClusterDoorStateChangeEvent ( - val doorState: Int) { - override fun toString(): String = buildString { +class DoorLockClusterDoorStateChangeEvent(val doorState: Int) { + override fun toString(): String = buildString { append("DoorLockClusterDoorStateChangeEvent {\n") append("\tdoorState : $doorState\n") append("}\n") @@ -45,10 +40,10 @@ class DoorLockClusterDoorStateChangeEvent ( companion object { private const val TAG_DOOR_STATE = 0 - fun fromTlv(tag: Tag, tlvReader: TlvReader) : DoorLockClusterDoorStateChangeEvent { + fun fromTlv(tag: Tag, tlvReader: TlvReader): DoorLockClusterDoorStateChangeEvent { tlvReader.enterStructure(tag) val doorState = tlvReader.getInt(ContextSpecificTag(TAG_DOOR_STATE)) - + tlvReader.exitContainer() return DoorLockClusterDoorStateChangeEvent(doorState) 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 34dd208597b65e..59e38fa054dd87 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 @@ -20,21 +20,21 @@ import chip.devicecontroller.cluster.* import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag -import chip.tlv.TlvParsingException import chip.tlv.TlvReader 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 credentials: Optional>?) { - override fun toString(): String = buildString { +class DoorLockClusterLockOperationErrorEvent( + val lockOperationType: Int, + val operationSource: Int, + val operationError: Int, + val userIndex: Int?, + val fabricIndex: Int?, + val sourceNode: Long?, + val credentials: + Optional>? +) { + override fun toString(): String = buildString { append("DoorLockClusterLockOperationErrorEvent {\n") append("\tlockOperationType : $lockOperationType\n") append("\toperationSource : $operationSource\n") @@ -53,32 +53,32 @@ class DoorLockClusterLockOperationErrorEvent ( put(ContextSpecificTag(TAG_OPERATION_SOURCE), operationSource) put(ContextSpecificTag(TAG_OPERATION_ERROR), operationError) if (userIndex != null) { - put(ContextSpecificTag(TAG_USER_INDEX), userIndex) - } else { - putNull(ContextSpecificTag(TAG_USER_INDEX)) - } + put(ContextSpecificTag(TAG_USER_INDEX), userIndex) + } else { + putNull(ContextSpecificTag(TAG_USER_INDEX)) + } if (fabricIndex != null) { - put(ContextSpecificTag(TAG_FABRIC_INDEX), fabricIndex) - } else { - putNull(ContextSpecificTag(TAG_FABRIC_INDEX)) - } + put(ContextSpecificTag(TAG_FABRIC_INDEX), fabricIndex) + } else { + putNull(ContextSpecificTag(TAG_FABRIC_INDEX)) + } if (sourceNode != null) { - put(ContextSpecificTag(TAG_SOURCE_NODE), sourceNode) - } else { - putNull(ContextSpecificTag(TAG_SOURCE_NODE)) - } + put(ContextSpecificTag(TAG_SOURCE_NODE), sourceNode) + } else { + putNull(ContextSpecificTag(TAG_SOURCE_NODE)) + } if (credentials != null) { - if (credentials.isPresent) { - val optcredentials = credentials.get() - startList(ContextSpecificTag(TAG_CREDENTIALS)) - for (item in optcredentials.iterator()) { - item.toTlv(AnonymousTag, this) + if (credentials.isPresent) { + val optcredentials = credentials.get() + startList(ContextSpecificTag(TAG_CREDENTIALS)) + for (item in optcredentials.iterator()) { + item.toTlv(AnonymousTag, this) + } + endList() + } + } else { + putNull(ContextSpecificTag(TAG_CREDENTIALS)) } - endList() - } - } else { - putNull(ContextSpecificTag(TAG_CREDENTIALS)) - } endStructure() } } @@ -92,49 +92,68 @@ class DoorLockClusterLockOperationErrorEvent ( private const val TAG_SOURCE_NODE = 5 private const val TAG_CREDENTIALS = 6 - fun fromTlv(tag: Tag, tlvReader: TlvReader) : DoorLockClusterLockOperationErrorEvent { + 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)) - val userIndex = if (!tlvReader.isNull()) { - tlvReader.getInt(ContextSpecificTag(TAG_USER_INDEX)) - } else { - tlvReader.getNull(ContextSpecificTag(TAG_USER_INDEX)) - null - } - val fabricIndex = if (!tlvReader.isNull()) { - tlvReader.getInt(ContextSpecificTag(TAG_FABRIC_INDEX)) - } else { - tlvReader.getNull(ContextSpecificTag(TAG_FABRIC_INDEX)) - null - } - val sourceNode = if (!tlvReader.isNull()) { - tlvReader.getLong(ContextSpecificTag(TAG_SOURCE_NODE)) - } else { - tlvReader.getNull(ContextSpecificTag(TAG_SOURCE_NODE)) - null - } - val credentials = if (!tlvReader.isNull()) { - if (tlvReader.isNextTag(ContextSpecificTag(TAG_CREDENTIALS))) { - Optional.of(buildList { - tlvReader.enterList(ContextSpecificTag(TAG_CREDENTIALS)) - while(!tlvReader.isEndOfContainer()) { - this.add(chip.devicecontroller.cluster.structs.DoorLockClusterCredentialStruct.fromTlv(AnonymousTag, tlvReader)) - } - tlvReader.exitContainer() - }) - } else { - Optional.empty() - } - } else { - tlvReader.getNull(ContextSpecificTag(TAG_CREDENTIALS)) - null - } - + val userIndex = + if (!tlvReader.isNull()) { + tlvReader.getInt(ContextSpecificTag(TAG_USER_INDEX)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_USER_INDEX)) + null + } + val fabricIndex = + if (!tlvReader.isNull()) { + tlvReader.getInt(ContextSpecificTag(TAG_FABRIC_INDEX)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_FABRIC_INDEX)) + null + } + val sourceNode = + if (!tlvReader.isNull()) { + tlvReader.getLong(ContextSpecificTag(TAG_SOURCE_NODE)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_SOURCE_NODE)) + null + } + val credentials = + if (!tlvReader.isNull()) { + if (tlvReader.isNextTag(ContextSpecificTag(TAG_CREDENTIALS))) { + Optional.of( + buildList { + tlvReader.enterList(ContextSpecificTag(TAG_CREDENTIALS)) + while (!tlvReader.isEndOfContainer()) { + this.add( + chip.devicecontroller.cluster.structs.DoorLockClusterCredentialStruct.fromTlv( + AnonymousTag, + tlvReader + ) + ) + } + tlvReader.exitContainer() + } + ) + } else { + Optional.empty() + } + } else { + tlvReader.getNull(ContextSpecificTag(TAG_CREDENTIALS)) + null + } + tlvReader.exitContainer() - return DoorLockClusterLockOperationErrorEvent(lockOperationType, operationSource, operationError, userIndex, fabricIndex, sourceNode, credentials) + return DoorLockClusterLockOperationErrorEvent( + lockOperationType, + operationSource, + operationError, + userIndex, + fabricIndex, + sourceNode, + credentials + ) } } } 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 d1f83b46c08222..4fbf71082c7adc 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 @@ -20,20 +20,20 @@ import chip.devicecontroller.cluster.* import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag -import chip.tlv.TlvParsingException import chip.tlv.TlvReader 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 credentials: Optional>?) { - override fun toString(): String = buildString { +class DoorLockClusterLockOperationEvent( + val lockOperationType: Int, + val operationSource: Int, + val userIndex: Int?, + val fabricIndex: Int?, + val sourceNode: Long?, + val credentials: + Optional>? +) { + override fun toString(): String = buildString { append("DoorLockClusterLockOperationEvent {\n") append("\tlockOperationType : $lockOperationType\n") append("\toperationSource : $operationSource\n") @@ -50,32 +50,32 @@ class DoorLockClusterLockOperationEvent ( put(ContextSpecificTag(TAG_LOCK_OPERATION_TYPE), lockOperationType) put(ContextSpecificTag(TAG_OPERATION_SOURCE), operationSource) if (userIndex != null) { - put(ContextSpecificTag(TAG_USER_INDEX), userIndex) - } else { - putNull(ContextSpecificTag(TAG_USER_INDEX)) - } + put(ContextSpecificTag(TAG_USER_INDEX), userIndex) + } else { + putNull(ContextSpecificTag(TAG_USER_INDEX)) + } if (fabricIndex != null) { - put(ContextSpecificTag(TAG_FABRIC_INDEX), fabricIndex) - } else { - putNull(ContextSpecificTag(TAG_FABRIC_INDEX)) - } + put(ContextSpecificTag(TAG_FABRIC_INDEX), fabricIndex) + } else { + putNull(ContextSpecificTag(TAG_FABRIC_INDEX)) + } if (sourceNode != null) { - put(ContextSpecificTag(TAG_SOURCE_NODE), sourceNode) - } else { - putNull(ContextSpecificTag(TAG_SOURCE_NODE)) - } + put(ContextSpecificTag(TAG_SOURCE_NODE), sourceNode) + } else { + putNull(ContextSpecificTag(TAG_SOURCE_NODE)) + } if (credentials != null) { - if (credentials.isPresent) { - val optcredentials = credentials.get() - startList(ContextSpecificTag(TAG_CREDENTIALS)) - for (item in optcredentials.iterator()) { - item.toTlv(AnonymousTag, this) + if (credentials.isPresent) { + val optcredentials = credentials.get() + startList(ContextSpecificTag(TAG_CREDENTIALS)) + for (item in optcredentials.iterator()) { + item.toTlv(AnonymousTag, this) + } + endList() + } + } else { + putNull(ContextSpecificTag(TAG_CREDENTIALS)) } - endList() - } - } else { - putNull(ContextSpecificTag(TAG_CREDENTIALS)) - } endStructure() } } @@ -88,48 +88,66 @@ class DoorLockClusterLockOperationEvent ( private const val TAG_SOURCE_NODE = 4 private const val TAG_CREDENTIALS = 5 - fun fromTlv(tag: Tag, tlvReader: TlvReader) : DoorLockClusterLockOperationEvent { + 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)) - val userIndex = if (!tlvReader.isNull()) { - tlvReader.getInt(ContextSpecificTag(TAG_USER_INDEX)) - } else { - tlvReader.getNull(ContextSpecificTag(TAG_USER_INDEX)) - null - } - val fabricIndex = if (!tlvReader.isNull()) { - tlvReader.getInt(ContextSpecificTag(TAG_FABRIC_INDEX)) - } else { - tlvReader.getNull(ContextSpecificTag(TAG_FABRIC_INDEX)) - null - } - val sourceNode = if (!tlvReader.isNull()) { - tlvReader.getLong(ContextSpecificTag(TAG_SOURCE_NODE)) - } else { - tlvReader.getNull(ContextSpecificTag(TAG_SOURCE_NODE)) - null - } - val credentials = if (!tlvReader.isNull()) { - if (tlvReader.isNextTag(ContextSpecificTag(TAG_CREDENTIALS))) { - Optional.of(buildList { - tlvReader.enterList(ContextSpecificTag(TAG_CREDENTIALS)) - while(!tlvReader.isEndOfContainer()) { - this.add(chip.devicecontroller.cluster.structs.DoorLockClusterCredentialStruct.fromTlv(AnonymousTag, tlvReader)) - } - tlvReader.exitContainer() - }) - } else { - Optional.empty() - } - } else { - tlvReader.getNull(ContextSpecificTag(TAG_CREDENTIALS)) - null - } - + val userIndex = + if (!tlvReader.isNull()) { + tlvReader.getInt(ContextSpecificTag(TAG_USER_INDEX)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_USER_INDEX)) + null + } + val fabricIndex = + if (!tlvReader.isNull()) { + tlvReader.getInt(ContextSpecificTag(TAG_FABRIC_INDEX)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_FABRIC_INDEX)) + null + } + val sourceNode = + if (!tlvReader.isNull()) { + tlvReader.getLong(ContextSpecificTag(TAG_SOURCE_NODE)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_SOURCE_NODE)) + null + } + val credentials = + if (!tlvReader.isNull()) { + if (tlvReader.isNextTag(ContextSpecificTag(TAG_CREDENTIALS))) { + Optional.of( + buildList { + tlvReader.enterList(ContextSpecificTag(TAG_CREDENTIALS)) + while (!tlvReader.isEndOfContainer()) { + this.add( + chip.devicecontroller.cluster.structs.DoorLockClusterCredentialStruct.fromTlv( + AnonymousTag, + tlvReader + ) + ) + } + tlvReader.exitContainer() + } + ) + } else { + Optional.empty() + } + } else { + tlvReader.getNull(ContextSpecificTag(TAG_CREDENTIALS)) + null + } + tlvReader.exitContainer() - return DoorLockClusterLockOperationEvent(lockOperationType, operationSource, userIndex, fabricIndex, sourceNode, credentials) + return DoorLockClusterLockOperationEvent( + lockOperationType, + operationSource, + userIndex, + fabricIndex, + sourceNode, + credentials + ) } } } 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 c8b7dd9380bb7f..6fc562b39959ff 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 @@ -17,24 +17,21 @@ package chip.devicecontroller.cluster.eventstructs import chip.devicecontroller.cluster.* -import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag -import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -import java.util.Optional - -class DoorLockClusterLockUserChangeEvent ( - val lockDataType: Int, - val dataOperationType: Int, - val operationSource: Int, - val userIndex: Int?, - val fabricIndex: Int?, - val sourceNode: Long?, - val dataIndex: Int?) { - override fun toString(): String = buildString { +class DoorLockClusterLockUserChangeEvent( + val lockDataType: Int, + val dataOperationType: Int, + val operationSource: Int, + val userIndex: Int?, + val fabricIndex: Int?, + val sourceNode: Long?, + val dataIndex: Int? +) { + override fun toString(): String = buildString { append("DoorLockClusterLockUserChangeEvent {\n") append("\tlockDataType : $lockDataType\n") append("\tdataOperationType : $dataOperationType\n") @@ -53,25 +50,25 @@ class DoorLockClusterLockUserChangeEvent ( put(ContextSpecificTag(TAG_DATA_OPERATION_TYPE), dataOperationType) put(ContextSpecificTag(TAG_OPERATION_SOURCE), operationSource) if (userIndex != null) { - put(ContextSpecificTag(TAG_USER_INDEX), userIndex) - } else { - putNull(ContextSpecificTag(TAG_USER_INDEX)) - } + put(ContextSpecificTag(TAG_USER_INDEX), userIndex) + } else { + putNull(ContextSpecificTag(TAG_USER_INDEX)) + } if (fabricIndex != null) { - put(ContextSpecificTag(TAG_FABRIC_INDEX), fabricIndex) - } else { - putNull(ContextSpecificTag(TAG_FABRIC_INDEX)) - } + put(ContextSpecificTag(TAG_FABRIC_INDEX), fabricIndex) + } else { + putNull(ContextSpecificTag(TAG_FABRIC_INDEX)) + } if (sourceNode != null) { - put(ContextSpecificTag(TAG_SOURCE_NODE), sourceNode) - } else { - putNull(ContextSpecificTag(TAG_SOURCE_NODE)) - } + put(ContextSpecificTag(TAG_SOURCE_NODE), sourceNode) + } else { + putNull(ContextSpecificTag(TAG_SOURCE_NODE)) + } if (dataIndex != null) { - put(ContextSpecificTag(TAG_DATA_INDEX), dataIndex) - } else { - putNull(ContextSpecificTag(TAG_DATA_INDEX)) - } + put(ContextSpecificTag(TAG_DATA_INDEX), dataIndex) + } else { + putNull(ContextSpecificTag(TAG_DATA_INDEX)) + } endStructure() } } @@ -85,39 +82,51 @@ class DoorLockClusterLockUserChangeEvent ( private const val TAG_SOURCE_NODE = 5 private const val TAG_DATA_INDEX = 6 - fun fromTlv(tag: Tag, tlvReader: TlvReader) : DoorLockClusterLockUserChangeEvent { + 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)) - val userIndex = if (!tlvReader.isNull()) { - tlvReader.getInt(ContextSpecificTag(TAG_USER_INDEX)) - } else { - tlvReader.getNull(ContextSpecificTag(TAG_USER_INDEX)) - null - } - val fabricIndex = if (!tlvReader.isNull()) { - tlvReader.getInt(ContextSpecificTag(TAG_FABRIC_INDEX)) - } else { - tlvReader.getNull(ContextSpecificTag(TAG_FABRIC_INDEX)) - null - } - val sourceNode = if (!tlvReader.isNull()) { - tlvReader.getLong(ContextSpecificTag(TAG_SOURCE_NODE)) - } else { - tlvReader.getNull(ContextSpecificTag(TAG_SOURCE_NODE)) - null - } - val dataIndex = if (!tlvReader.isNull()) { - tlvReader.getInt(ContextSpecificTag(TAG_DATA_INDEX)) - } else { - tlvReader.getNull(ContextSpecificTag(TAG_DATA_INDEX)) - null - } - + val userIndex = + if (!tlvReader.isNull()) { + tlvReader.getInt(ContextSpecificTag(TAG_USER_INDEX)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_USER_INDEX)) + null + } + val fabricIndex = + if (!tlvReader.isNull()) { + tlvReader.getInt(ContextSpecificTag(TAG_FABRIC_INDEX)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_FABRIC_INDEX)) + null + } + val sourceNode = + if (!tlvReader.isNull()) { + tlvReader.getLong(ContextSpecificTag(TAG_SOURCE_NODE)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_SOURCE_NODE)) + null + } + val dataIndex = + if (!tlvReader.isNull()) { + tlvReader.getInt(ContextSpecificTag(TAG_DATA_INDEX)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_DATA_INDEX)) + null + } + tlvReader.exitContainer() - return DoorLockClusterLockUserChangeEvent(lockDataType, dataOperationType, operationSource, userIndex, fabricIndex, sourceNode, dataIndex) + return DoorLockClusterLockUserChangeEvent( + lockDataType, + dataOperationType, + operationSource, + userIndex, + fabricIndex, + sourceNode, + dataIndex + ) } } } 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 79b58b0d67cdae..3d743983f1a00f 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 @@ -17,18 +17,13 @@ package chip.devicecontroller.cluster.eventstructs import chip.devicecontroller.cluster.* -import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag -import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -import java.util.Optional - -class GeneralDiagnosticsClusterBootReasonEvent ( - val bootReason: Int) { - override fun toString(): String = buildString { +class GeneralDiagnosticsClusterBootReasonEvent(val bootReason: Int) { + override fun toString(): String = buildString { append("GeneralDiagnosticsClusterBootReasonEvent {\n") append("\tbootReason : $bootReason\n") append("}\n") @@ -45,10 +40,10 @@ class GeneralDiagnosticsClusterBootReasonEvent ( companion object { private const val TAG_BOOT_REASON = 0 - fun fromTlv(tag: Tag, tlvReader: TlvReader) : GeneralDiagnosticsClusterBootReasonEvent { + fun fromTlv(tag: Tag, tlvReader: TlvReader): GeneralDiagnosticsClusterBootReasonEvent { tlvReader.enterStructure(tag) val bootReason = tlvReader.getInt(ContextSpecificTag(TAG_BOOT_REASON)) - + tlvReader.exitContainer() return GeneralDiagnosticsClusterBootReasonEvent(bootReason) 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 207d45c24e3c40..1287eba322b742 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 @@ -20,16 +20,14 @@ import chip.devicecontroller.cluster.* import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag -import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -import java.util.Optional - -class GeneralDiagnosticsClusterHardwareFaultChangeEvent ( - val current: List, - val previous: List) { - override fun toString(): String = buildString { +class GeneralDiagnosticsClusterHardwareFaultChangeEvent( + val current: List, + val previous: List +) { + override fun toString(): String = buildString { append("GeneralDiagnosticsClusterHardwareFaultChangeEvent {\n") append("\tcurrent : $current\n") append("\tprevious : $previous\n") @@ -57,23 +55,25 @@ class GeneralDiagnosticsClusterHardwareFaultChangeEvent ( private const val TAG_CURRENT = 0 private const val TAG_PREVIOUS = 1 - fun fromTlv(tag: Tag, tlvReader: TlvReader) : GeneralDiagnosticsClusterHardwareFaultChangeEvent { + fun fromTlv(tag: Tag, tlvReader: TlvReader): GeneralDiagnosticsClusterHardwareFaultChangeEvent { tlvReader.enterStructure(tag) - val current = buildList { - tlvReader.enterList(ContextSpecificTag(TAG_CURRENT)) - while(!tlvReader.isEndOfContainer()) { - this.add(tlvReader.getInt(AnonymousTag)) - } - tlvReader.exitContainer() - } - val previous = buildList { - tlvReader.enterList(ContextSpecificTag(TAG_PREVIOUS)) - while(!tlvReader.isEndOfContainer()) { - this.add(tlvReader.getInt(AnonymousTag)) - } - tlvReader.exitContainer() - } - + val current = + buildList { + tlvReader.enterList(ContextSpecificTag(TAG_CURRENT)) + while (!tlvReader.isEndOfContainer()) { + this.add(tlvReader.getInt(AnonymousTag)) + } + tlvReader.exitContainer() + } + val previous = + buildList { + tlvReader.enterList(ContextSpecificTag(TAG_PREVIOUS)) + while (!tlvReader.isEndOfContainer()) { + this.add(tlvReader.getInt(AnonymousTag)) + } + tlvReader.exitContainer() + } + tlvReader.exitContainer() return GeneralDiagnosticsClusterHardwareFaultChangeEvent(current, previous) 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 5fed1abd0f4c09..f9fc3cadc8b934 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 @@ -20,16 +20,14 @@ import chip.devicecontroller.cluster.* import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag -import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -import java.util.Optional - -class GeneralDiagnosticsClusterNetworkFaultChangeEvent ( - val current: List, - val previous: List) { - override fun toString(): String = buildString { +class GeneralDiagnosticsClusterNetworkFaultChangeEvent( + val current: List, + val previous: List +) { + override fun toString(): String = buildString { append("GeneralDiagnosticsClusterNetworkFaultChangeEvent {\n") append("\tcurrent : $current\n") append("\tprevious : $previous\n") @@ -57,23 +55,25 @@ class GeneralDiagnosticsClusterNetworkFaultChangeEvent ( private const val TAG_CURRENT = 0 private const val TAG_PREVIOUS = 1 - fun fromTlv(tag: Tag, tlvReader: TlvReader) : GeneralDiagnosticsClusterNetworkFaultChangeEvent { + fun fromTlv(tag: Tag, tlvReader: TlvReader): GeneralDiagnosticsClusterNetworkFaultChangeEvent { tlvReader.enterStructure(tag) - val current = buildList { - tlvReader.enterList(ContextSpecificTag(TAG_CURRENT)) - while(!tlvReader.isEndOfContainer()) { - this.add(tlvReader.getInt(AnonymousTag)) - } - tlvReader.exitContainer() - } - val previous = buildList { - tlvReader.enterList(ContextSpecificTag(TAG_PREVIOUS)) - while(!tlvReader.isEndOfContainer()) { - this.add(tlvReader.getInt(AnonymousTag)) - } - tlvReader.exitContainer() - } - + val current = + buildList { + tlvReader.enterList(ContextSpecificTag(TAG_CURRENT)) + while (!tlvReader.isEndOfContainer()) { + this.add(tlvReader.getInt(AnonymousTag)) + } + tlvReader.exitContainer() + } + val previous = + buildList { + tlvReader.enterList(ContextSpecificTag(TAG_PREVIOUS)) + while (!tlvReader.isEndOfContainer()) { + this.add(tlvReader.getInt(AnonymousTag)) + } + tlvReader.exitContainer() + } + tlvReader.exitContainer() return GeneralDiagnosticsClusterNetworkFaultChangeEvent(current, previous) 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 7a0b4e386ca3f9..35daf8dd691bf5 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 @@ -20,16 +20,14 @@ import chip.devicecontroller.cluster.* import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag -import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -import java.util.Optional - -class GeneralDiagnosticsClusterRadioFaultChangeEvent ( - val current: List, - val previous: List) { - override fun toString(): String = buildString { +class GeneralDiagnosticsClusterRadioFaultChangeEvent( + val current: List, + val previous: List +) { + override fun toString(): String = buildString { append("GeneralDiagnosticsClusterRadioFaultChangeEvent {\n") append("\tcurrent : $current\n") append("\tprevious : $previous\n") @@ -57,23 +55,25 @@ class GeneralDiagnosticsClusterRadioFaultChangeEvent ( private const val TAG_CURRENT = 0 private const val TAG_PREVIOUS = 1 - fun fromTlv(tag: Tag, tlvReader: TlvReader) : GeneralDiagnosticsClusterRadioFaultChangeEvent { + fun fromTlv(tag: Tag, tlvReader: TlvReader): GeneralDiagnosticsClusterRadioFaultChangeEvent { tlvReader.enterStructure(tag) - val current = buildList { - tlvReader.enterList(ContextSpecificTag(TAG_CURRENT)) - while(!tlvReader.isEndOfContainer()) { - this.add(tlvReader.getInt(AnonymousTag)) - } - tlvReader.exitContainer() - } - val previous = buildList { - tlvReader.enterList(ContextSpecificTag(TAG_PREVIOUS)) - while(!tlvReader.isEndOfContainer()) { - this.add(tlvReader.getInt(AnonymousTag)) - } - tlvReader.exitContainer() - } - + val current = + buildList { + tlvReader.enterList(ContextSpecificTag(TAG_CURRENT)) + while (!tlvReader.isEndOfContainer()) { + this.add(tlvReader.getInt(AnonymousTag)) + } + tlvReader.exitContainer() + } + val previous = + buildList { + tlvReader.enterList(ContextSpecificTag(TAG_PREVIOUS)) + while (!tlvReader.isEndOfContainer()) { + this.add(tlvReader.getInt(AnonymousTag)) + } + tlvReader.exitContainer() + } + tlvReader.exitContainer() return GeneralDiagnosticsClusterRadioFaultChangeEvent(current, previous) 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 8e0999dbb5eed6..092e062784a118 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 @@ -17,20 +17,18 @@ package chip.devicecontroller.cluster.eventstructs import chip.devicecontroller.cluster.* -import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag -import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter - import java.util.Optional -class OperationalStateClusterOperationCompletionEvent ( - val completionErrorCode: Int, - val totalOperationalTime: Optional?, - val pausedTime: Optional?) { - override fun toString(): String = buildString { +class OperationalStateClusterOperationCompletionEvent( + val completionErrorCode: Int, + val totalOperationalTime: Optional?, + val pausedTime: Optional? +) { + override fun toString(): String = buildString { append("OperationalStateClusterOperationCompletionEvent {\n") append("\tcompletionErrorCode : $completionErrorCode\n") append("\ttotalOperationalTime : $totalOperationalTime\n") @@ -43,21 +41,21 @@ class OperationalStateClusterOperationCompletionEvent ( startStructure(tag) put(ContextSpecificTag(TAG_COMPLETION_ERROR_CODE), completionErrorCode) if (totalOperationalTime != null) { - if (totalOperationalTime.isPresent) { - val opttotalOperationalTime = totalOperationalTime.get() - put(ContextSpecificTag(TAG_TOTAL_OPERATIONAL_TIME), opttotalOperationalTime) - } - } else { - putNull(ContextSpecificTag(TAG_TOTAL_OPERATIONAL_TIME)) - } + if (totalOperationalTime.isPresent) { + val opttotalOperationalTime = totalOperationalTime.get() + put(ContextSpecificTag(TAG_TOTAL_OPERATIONAL_TIME), opttotalOperationalTime) + } + } else { + putNull(ContextSpecificTag(TAG_TOTAL_OPERATIONAL_TIME)) + } if (pausedTime != null) { - if (pausedTime.isPresent) { - val optpausedTime = pausedTime.get() - put(ContextSpecificTag(TAG_PAUSED_TIME), optpausedTime) - } - } else { - putNull(ContextSpecificTag(TAG_PAUSED_TIME)) - } + if (pausedTime.isPresent) { + val optpausedTime = pausedTime.get() + put(ContextSpecificTag(TAG_PAUSED_TIME), optpausedTime) + } + } else { + putNull(ContextSpecificTag(TAG_PAUSED_TIME)) + } endStructure() } } @@ -67,33 +65,39 @@ class OperationalStateClusterOperationCompletionEvent ( private const val TAG_TOTAL_OPERATIONAL_TIME = 1 private const val TAG_PAUSED_TIME = 2 - fun fromTlv(tag: Tag, tlvReader: TlvReader) : OperationalStateClusterOperationCompletionEvent { + fun fromTlv(tag: Tag, tlvReader: TlvReader): OperationalStateClusterOperationCompletionEvent { tlvReader.enterStructure(tag) val completionErrorCode = tlvReader.getInt(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))) - } else { - Optional.empty() - } - } else { - tlvReader.getNull(ContextSpecificTag(TAG_TOTAL_OPERATIONAL_TIME)) - null - } - val pausedTime = if (!tlvReader.isNull()) { - if (tlvReader.isNextTag(ContextSpecificTag(TAG_PAUSED_TIME))) { - Optional.of(tlvReader.getLong(ContextSpecificTag(TAG_PAUSED_TIME))) - } else { - Optional.empty() - } - } else { - tlvReader.getNull(ContextSpecificTag(TAG_PAUSED_TIME)) - null - } - + val totalOperationalTime = + if (!tlvReader.isNull()) { + if (tlvReader.isNextTag(ContextSpecificTag(TAG_TOTAL_OPERATIONAL_TIME))) { + Optional.of(tlvReader.getLong(ContextSpecificTag(TAG_TOTAL_OPERATIONAL_TIME))) + } else { + Optional.empty() + } + } else { + tlvReader.getNull(ContextSpecificTag(TAG_TOTAL_OPERATIONAL_TIME)) + null + } + val pausedTime = + if (!tlvReader.isNull()) { + if (tlvReader.isNextTag(ContextSpecificTag(TAG_PAUSED_TIME))) { + Optional.of(tlvReader.getLong(ContextSpecificTag(TAG_PAUSED_TIME))) + } else { + Optional.empty() + } + } else { + tlvReader.getNull(ContextSpecificTag(TAG_PAUSED_TIME)) + null + } + tlvReader.exitContainer() - return OperationalStateClusterOperationCompletionEvent(completionErrorCode, totalOperationalTime, pausedTime) + return OperationalStateClusterOperationCompletionEvent( + completionErrorCode, + totalOperationalTime, + pausedTime + ) } } } 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 ef4633c2ffe087..b5623a0d701579 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 @@ -17,18 +17,15 @@ package chip.devicecontroller.cluster.eventstructs import chip.devicecontroller.cluster.* -import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag -import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -import java.util.Optional - -class OperationalStateClusterOperationalErrorEvent ( - val errorState: chip.devicecontroller.cluster.structs.OperationalStateClusterErrorStateStruct) { - override fun toString(): String = buildString { +class OperationalStateClusterOperationalErrorEvent( + val errorState: chip.devicecontroller.cluster.structs.OperationalStateClusterErrorStateStruct +) { + override fun toString(): String = buildString { append("OperationalStateClusterOperationalErrorEvent {\n") append("\terrorState : $errorState\n") append("}\n") @@ -45,10 +42,14 @@ class OperationalStateClusterOperationalErrorEvent ( companion object { private const val TAG_ERROR_STATE = 0 - fun fromTlv(tag: Tag, tlvReader: TlvReader) : OperationalStateClusterOperationalErrorEvent { + fun fromTlv(tag: Tag, tlvReader: TlvReader): OperationalStateClusterOperationalErrorEvent { tlvReader.enterStructure(tag) - val errorState = chip.devicecontroller.cluster.structs.OperationalStateClusterErrorStateStruct.fromTlv(ContextSpecificTag(TAG_ERROR_STATE), tlvReader) - + val errorState = + chip.devicecontroller.cluster.structs.OperationalStateClusterErrorStateStruct.fromTlv( + ContextSpecificTag(TAG_ERROR_STATE), + tlvReader + ) + tlvReader.exitContainer() return OperationalStateClusterOperationalErrorEvent(errorState) 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 3e7ac690e0fbab..8a82cbf93c9f1f 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 @@ -17,21 +17,18 @@ package chip.devicecontroller.cluster.eventstructs import chip.devicecontroller.cluster.* -import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag -import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -import java.util.Optional - -class OtaSoftwareUpdateRequestorClusterDownloadErrorEvent ( - val softwareVersion: Long, - val bytesDownloaded: Long, - val progressPercent: Int?, - val platformCode: Long?) { - override fun toString(): String = buildString { +class OtaSoftwareUpdateRequestorClusterDownloadErrorEvent( + val softwareVersion: Long, + val bytesDownloaded: Long, + val progressPercent: Int?, + val platformCode: Long? +) { + override fun toString(): String = buildString { append("OtaSoftwareUpdateRequestorClusterDownloadErrorEvent {\n") append("\tsoftwareVersion : $softwareVersion\n") append("\tbytesDownloaded : $bytesDownloaded\n") @@ -46,15 +43,15 @@ class OtaSoftwareUpdateRequestorClusterDownloadErrorEvent ( put(ContextSpecificTag(TAG_SOFTWARE_VERSION), softwareVersion) put(ContextSpecificTag(TAG_BYTES_DOWNLOADED), bytesDownloaded) if (progressPercent != null) { - put(ContextSpecificTag(TAG_PROGRESS_PERCENT), progressPercent) - } else { - putNull(ContextSpecificTag(TAG_PROGRESS_PERCENT)) - } + put(ContextSpecificTag(TAG_PROGRESS_PERCENT), progressPercent) + } else { + putNull(ContextSpecificTag(TAG_PROGRESS_PERCENT)) + } if (platformCode != null) { - put(ContextSpecificTag(TAG_PLATFORM_CODE), platformCode) - } else { - putNull(ContextSpecificTag(TAG_PLATFORM_CODE)) - } + put(ContextSpecificTag(TAG_PLATFORM_CODE), platformCode) + } else { + putNull(ContextSpecificTag(TAG_PLATFORM_CODE)) + } endStructure() } } @@ -65,26 +62,36 @@ class OtaSoftwareUpdateRequestorClusterDownloadErrorEvent ( private const val TAG_PROGRESS_PERCENT = 2 private const val TAG_PLATFORM_CODE = 3 - fun fromTlv(tag: Tag, tlvReader: TlvReader) : OtaSoftwareUpdateRequestorClusterDownloadErrorEvent { + fun fromTlv( + tag: Tag, + tlvReader: TlvReader + ): OtaSoftwareUpdateRequestorClusterDownloadErrorEvent { tlvReader.enterStructure(tag) val softwareVersion = tlvReader.getLong(ContextSpecificTag(TAG_SOFTWARE_VERSION)) val bytesDownloaded = tlvReader.getLong(ContextSpecificTag(TAG_BYTES_DOWNLOADED)) - val progressPercent = if (!tlvReader.isNull()) { - tlvReader.getInt(ContextSpecificTag(TAG_PROGRESS_PERCENT)) - } else { - tlvReader.getNull(ContextSpecificTag(TAG_PROGRESS_PERCENT)) - null - } - val platformCode = if (!tlvReader.isNull()) { - tlvReader.getLong(ContextSpecificTag(TAG_PLATFORM_CODE)) - } else { - tlvReader.getNull(ContextSpecificTag(TAG_PLATFORM_CODE)) - null - } - + val progressPercent = + if (!tlvReader.isNull()) { + tlvReader.getInt(ContextSpecificTag(TAG_PROGRESS_PERCENT)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_PROGRESS_PERCENT)) + null + } + val platformCode = + if (!tlvReader.isNull()) { + tlvReader.getLong(ContextSpecificTag(TAG_PLATFORM_CODE)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_PLATFORM_CODE)) + null + } + tlvReader.exitContainer() - return OtaSoftwareUpdateRequestorClusterDownloadErrorEvent(softwareVersion, bytesDownloaded, progressPercent, platformCode) + return OtaSoftwareUpdateRequestorClusterDownloadErrorEvent( + softwareVersion, + bytesDownloaded, + progressPercent, + platformCode + ) } } } 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 bcd1db0f6990bf..b0b075689fc3be 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 @@ -17,21 +17,18 @@ package chip.devicecontroller.cluster.eventstructs import chip.devicecontroller.cluster.* -import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag -import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -import java.util.Optional - -class OtaSoftwareUpdateRequestorClusterStateTransitionEvent ( - val previousState: Int, - val newState: Int, - val reason: Int, - val targetSoftwareVersion: Long?) { - override fun toString(): String = buildString { +class OtaSoftwareUpdateRequestorClusterStateTransitionEvent( + val previousState: Int, + val newState: Int, + val reason: Int, + val targetSoftwareVersion: Long? +) { + override fun toString(): String = buildString { append("OtaSoftwareUpdateRequestorClusterStateTransitionEvent {\n") append("\tpreviousState : $previousState\n") append("\tnewState : $newState\n") @@ -47,10 +44,10 @@ class OtaSoftwareUpdateRequestorClusterStateTransitionEvent ( put(ContextSpecificTag(TAG_NEW_STATE), newState) put(ContextSpecificTag(TAG_REASON), reason) if (targetSoftwareVersion != null) { - put(ContextSpecificTag(TAG_TARGET_SOFTWARE_VERSION), targetSoftwareVersion) - } else { - putNull(ContextSpecificTag(TAG_TARGET_SOFTWARE_VERSION)) - } + put(ContextSpecificTag(TAG_TARGET_SOFTWARE_VERSION), targetSoftwareVersion) + } else { + putNull(ContextSpecificTag(TAG_TARGET_SOFTWARE_VERSION)) + } endStructure() } } @@ -61,21 +58,30 @@ class OtaSoftwareUpdateRequestorClusterStateTransitionEvent ( private const val TAG_REASON = 2 private const val TAG_TARGET_SOFTWARE_VERSION = 3 - fun fromTlv(tag: Tag, tlvReader: TlvReader) : OtaSoftwareUpdateRequestorClusterStateTransitionEvent { + fun fromTlv( + tag: 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)) - val targetSoftwareVersion = if (!tlvReader.isNull()) { - tlvReader.getLong(ContextSpecificTag(TAG_TARGET_SOFTWARE_VERSION)) - } else { - tlvReader.getNull(ContextSpecificTag(TAG_TARGET_SOFTWARE_VERSION)) - null - } - + val targetSoftwareVersion = + if (!tlvReader.isNull()) { + tlvReader.getLong(ContextSpecificTag(TAG_TARGET_SOFTWARE_VERSION)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_TARGET_SOFTWARE_VERSION)) + null + } + tlvReader.exitContainer() - return OtaSoftwareUpdateRequestorClusterStateTransitionEvent(previousState, newState, reason, targetSoftwareVersion) + return OtaSoftwareUpdateRequestorClusterStateTransitionEvent( + previousState, + newState, + reason, + targetSoftwareVersion + ) } } } 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 96bb018c4e0bd0..ff1034ace97e31 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 @@ -17,19 +17,16 @@ package chip.devicecontroller.cluster.eventstructs import chip.devicecontroller.cluster.* -import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag -import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -import java.util.Optional - -class OtaSoftwareUpdateRequestorClusterVersionAppliedEvent ( - val softwareVersion: Long, - val productID: Int) { - override fun toString(): String = buildString { +class OtaSoftwareUpdateRequestorClusterVersionAppliedEvent( + val softwareVersion: Long, + val productID: Int +) { + override fun toString(): String = buildString { append("OtaSoftwareUpdateRequestorClusterVersionAppliedEvent {\n") append("\tsoftwareVersion : $softwareVersion\n") append("\tproductID : $productID\n") @@ -49,11 +46,14 @@ class OtaSoftwareUpdateRequestorClusterVersionAppliedEvent ( private const val TAG_SOFTWARE_VERSION = 0 private const val TAG_PRODUCT_I_D = 1 - fun fromTlv(tag: Tag, tlvReader: TlvReader) : OtaSoftwareUpdateRequestorClusterVersionAppliedEvent { + fun fromTlv( + tag: 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.exitContainer() return OtaSoftwareUpdateRequestorClusterVersionAppliedEvent(softwareVersion, productID) 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 eb8be2f538a999..c3eb0d1e658b56 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 @@ -20,16 +20,11 @@ import chip.devicecontroller.cluster.* import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag -import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -import java.util.Optional - -class PowerSourceClusterBatChargeFaultChangeEvent ( - val current: List, - val previous: List) { - override fun toString(): String = buildString { +class PowerSourceClusterBatChargeFaultChangeEvent(val current: List, val previous: List) { + override fun toString(): String = buildString { append("PowerSourceClusterBatChargeFaultChangeEvent {\n") append("\tcurrent : $current\n") append("\tprevious : $previous\n") @@ -57,23 +52,25 @@ class PowerSourceClusterBatChargeFaultChangeEvent ( private const val TAG_CURRENT = 0 private const val TAG_PREVIOUS = 1 - fun fromTlv(tag: Tag, tlvReader: TlvReader) : PowerSourceClusterBatChargeFaultChangeEvent { + fun fromTlv(tag: Tag, tlvReader: TlvReader): PowerSourceClusterBatChargeFaultChangeEvent { tlvReader.enterStructure(tag) - val current = buildList { - tlvReader.enterList(ContextSpecificTag(TAG_CURRENT)) - while(!tlvReader.isEndOfContainer()) { - this.add(tlvReader.getInt(AnonymousTag)) - } - tlvReader.exitContainer() - } - val previous = buildList { - tlvReader.enterList(ContextSpecificTag(TAG_PREVIOUS)) - while(!tlvReader.isEndOfContainer()) { - this.add(tlvReader.getInt(AnonymousTag)) - } - tlvReader.exitContainer() - } - + val current = + buildList { + tlvReader.enterList(ContextSpecificTag(TAG_CURRENT)) + while (!tlvReader.isEndOfContainer()) { + this.add(tlvReader.getInt(AnonymousTag)) + } + tlvReader.exitContainer() + } + val previous = + buildList { + tlvReader.enterList(ContextSpecificTag(TAG_PREVIOUS)) + while (!tlvReader.isEndOfContainer()) { + this.add(tlvReader.getInt(AnonymousTag)) + } + tlvReader.exitContainer() + } + tlvReader.exitContainer() return PowerSourceClusterBatChargeFaultChangeEvent(current, previous) 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 782fba2707b2f5..c010184156ecb3 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 @@ -20,16 +20,11 @@ import chip.devicecontroller.cluster.* import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag -import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -import java.util.Optional - -class PowerSourceClusterBatFaultChangeEvent ( - val current: List, - val previous: List) { - override fun toString(): String = buildString { +class PowerSourceClusterBatFaultChangeEvent(val current: List, val previous: List) { + override fun toString(): String = buildString { append("PowerSourceClusterBatFaultChangeEvent {\n") append("\tcurrent : $current\n") append("\tprevious : $previous\n") @@ -57,23 +52,25 @@ class PowerSourceClusterBatFaultChangeEvent ( private const val TAG_CURRENT = 0 private const val TAG_PREVIOUS = 1 - fun fromTlv(tag: Tag, tlvReader: TlvReader) : PowerSourceClusterBatFaultChangeEvent { + fun fromTlv(tag: Tag, tlvReader: TlvReader): PowerSourceClusterBatFaultChangeEvent { tlvReader.enterStructure(tag) - val current = buildList { - tlvReader.enterList(ContextSpecificTag(TAG_CURRENT)) - while(!tlvReader.isEndOfContainer()) { - this.add(tlvReader.getInt(AnonymousTag)) - } - tlvReader.exitContainer() - } - val previous = buildList { - tlvReader.enterList(ContextSpecificTag(TAG_PREVIOUS)) - while(!tlvReader.isEndOfContainer()) { - this.add(tlvReader.getInt(AnonymousTag)) - } - tlvReader.exitContainer() - } - + val current = + buildList { + tlvReader.enterList(ContextSpecificTag(TAG_CURRENT)) + while (!tlvReader.isEndOfContainer()) { + this.add(tlvReader.getInt(AnonymousTag)) + } + tlvReader.exitContainer() + } + val previous = + buildList { + tlvReader.enterList(ContextSpecificTag(TAG_PREVIOUS)) + while (!tlvReader.isEndOfContainer()) { + this.add(tlvReader.getInt(AnonymousTag)) + } + tlvReader.exitContainer() + } + tlvReader.exitContainer() return PowerSourceClusterBatFaultChangeEvent(current, previous) 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 1906ef9014899d..8a06b36fba61d0 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 @@ -20,16 +20,11 @@ import chip.devicecontroller.cluster.* import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag -import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -import java.util.Optional - -class PowerSourceClusterWiredFaultChangeEvent ( - val current: List, - val previous: List) { - override fun toString(): String = buildString { +class PowerSourceClusterWiredFaultChangeEvent(val current: List, val previous: List) { + override fun toString(): String = buildString { append("PowerSourceClusterWiredFaultChangeEvent {\n") append("\tcurrent : $current\n") append("\tprevious : $previous\n") @@ -57,23 +52,25 @@ class PowerSourceClusterWiredFaultChangeEvent ( private const val TAG_CURRENT = 0 private const val TAG_PREVIOUS = 1 - fun fromTlv(tag: Tag, tlvReader: TlvReader) : PowerSourceClusterWiredFaultChangeEvent { + fun fromTlv(tag: Tag, tlvReader: TlvReader): PowerSourceClusterWiredFaultChangeEvent { tlvReader.enterStructure(tag) - val current = buildList { - tlvReader.enterList(ContextSpecificTag(TAG_CURRENT)) - while(!tlvReader.isEndOfContainer()) { - this.add(tlvReader.getInt(AnonymousTag)) - } - tlvReader.exitContainer() - } - val previous = buildList { - tlvReader.enterList(ContextSpecificTag(TAG_PREVIOUS)) - while(!tlvReader.isEndOfContainer()) { - this.add(tlvReader.getInt(AnonymousTag)) - } - tlvReader.exitContainer() - } - + val current = + buildList { + tlvReader.enterList(ContextSpecificTag(TAG_CURRENT)) + while (!tlvReader.isEndOfContainer()) { + this.add(tlvReader.getInt(AnonymousTag)) + } + tlvReader.exitContainer() + } + val previous = + buildList { + tlvReader.enterList(ContextSpecificTag(TAG_PREVIOUS)) + while (!tlvReader.isEndOfContainer()) { + this.add(tlvReader.getInt(AnonymousTag)) + } + tlvReader.exitContainer() + } + tlvReader.exitContainer() return PowerSourceClusterWiredFaultChangeEvent(current, previous) 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 a67296515fc256..c116f16ac73229 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 @@ -17,21 +17,18 @@ package chip.devicecontroller.cluster.eventstructs import chip.devicecontroller.cluster.* -import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag -import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -import java.util.Optional - -class RefrigeratorAlarmClusterNotifyEvent ( - val active: Long, - val inactive: Long, - val state: Long, - val mask: Long) { - override fun toString(): String = buildString { +class RefrigeratorAlarmClusterNotifyEvent( + val active: Long, + val inactive: Long, + val state: Long, + val mask: Long +) { + override fun toString(): String = buildString { append("RefrigeratorAlarmClusterNotifyEvent {\n") append("\tactive : $active\n") append("\tinactive : $inactive\n") @@ -57,13 +54,13 @@ class RefrigeratorAlarmClusterNotifyEvent ( private const val TAG_STATE = 2 private const val TAG_MASK = 3 - fun fromTlv(tag: Tag, tlvReader: TlvReader) : RefrigeratorAlarmClusterNotifyEvent { + 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)) - + tlvReader.exitContainer() return RefrigeratorAlarmClusterNotifyEvent(active, inactive, state, mask) 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 f43dd669cf87ca..c6afaa9750adf8 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 @@ -17,20 +17,18 @@ package chip.devicecontroller.cluster.eventstructs import chip.devicecontroller.cluster.* -import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag -import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter - import java.util.Optional -class RvcOperationalStateClusterOperationCompletionEvent ( - val completionErrorCode: Int, - val totalOperationalTime: Optional?, - val pausedTime: Optional?) { - override fun toString(): String = buildString { +class RvcOperationalStateClusterOperationCompletionEvent( + val completionErrorCode: Int, + val totalOperationalTime: Optional?, + val pausedTime: Optional? +) { + override fun toString(): String = buildString { append("RvcOperationalStateClusterOperationCompletionEvent {\n") append("\tcompletionErrorCode : $completionErrorCode\n") append("\ttotalOperationalTime : $totalOperationalTime\n") @@ -43,21 +41,21 @@ class RvcOperationalStateClusterOperationCompletionEvent ( startStructure(tag) put(ContextSpecificTag(TAG_COMPLETION_ERROR_CODE), completionErrorCode) if (totalOperationalTime != null) { - if (totalOperationalTime.isPresent) { - val opttotalOperationalTime = totalOperationalTime.get() - put(ContextSpecificTag(TAG_TOTAL_OPERATIONAL_TIME), opttotalOperationalTime) - } - } else { - putNull(ContextSpecificTag(TAG_TOTAL_OPERATIONAL_TIME)) - } + if (totalOperationalTime.isPresent) { + val opttotalOperationalTime = totalOperationalTime.get() + put(ContextSpecificTag(TAG_TOTAL_OPERATIONAL_TIME), opttotalOperationalTime) + } + } else { + putNull(ContextSpecificTag(TAG_TOTAL_OPERATIONAL_TIME)) + } if (pausedTime != null) { - if (pausedTime.isPresent) { - val optpausedTime = pausedTime.get() - put(ContextSpecificTag(TAG_PAUSED_TIME), optpausedTime) - } - } else { - putNull(ContextSpecificTag(TAG_PAUSED_TIME)) - } + if (pausedTime.isPresent) { + val optpausedTime = pausedTime.get() + put(ContextSpecificTag(TAG_PAUSED_TIME), optpausedTime) + } + } else { + putNull(ContextSpecificTag(TAG_PAUSED_TIME)) + } endStructure() } } @@ -67,33 +65,42 @@ class RvcOperationalStateClusterOperationCompletionEvent ( private const val TAG_TOTAL_OPERATIONAL_TIME = 1 private const val TAG_PAUSED_TIME = 2 - fun fromTlv(tag: Tag, tlvReader: TlvReader) : RvcOperationalStateClusterOperationCompletionEvent { + fun fromTlv( + tag: Tag, + tlvReader: TlvReader + ): RvcOperationalStateClusterOperationCompletionEvent { tlvReader.enterStructure(tag) val completionErrorCode = tlvReader.getInt(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))) - } else { - Optional.empty() - } - } else { - tlvReader.getNull(ContextSpecificTag(TAG_TOTAL_OPERATIONAL_TIME)) - null - } - val pausedTime = if (!tlvReader.isNull()) { - if (tlvReader.isNextTag(ContextSpecificTag(TAG_PAUSED_TIME))) { - Optional.of(tlvReader.getLong(ContextSpecificTag(TAG_PAUSED_TIME))) - } else { - Optional.empty() - } - } else { - tlvReader.getNull(ContextSpecificTag(TAG_PAUSED_TIME)) - null - } - + val totalOperationalTime = + if (!tlvReader.isNull()) { + if (tlvReader.isNextTag(ContextSpecificTag(TAG_TOTAL_OPERATIONAL_TIME))) { + Optional.of(tlvReader.getLong(ContextSpecificTag(TAG_TOTAL_OPERATIONAL_TIME))) + } else { + Optional.empty() + } + } else { + tlvReader.getNull(ContextSpecificTag(TAG_TOTAL_OPERATIONAL_TIME)) + null + } + val pausedTime = + if (!tlvReader.isNull()) { + if (tlvReader.isNextTag(ContextSpecificTag(TAG_PAUSED_TIME))) { + Optional.of(tlvReader.getLong(ContextSpecificTag(TAG_PAUSED_TIME))) + } else { + Optional.empty() + } + } else { + tlvReader.getNull(ContextSpecificTag(TAG_PAUSED_TIME)) + null + } + tlvReader.exitContainer() - return RvcOperationalStateClusterOperationCompletionEvent(completionErrorCode, totalOperationalTime, pausedTime) + return RvcOperationalStateClusterOperationCompletionEvent( + completionErrorCode, + totalOperationalTime, + pausedTime + ) } } } 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 ee80a6e06fb3a6..bf6fed9817f60f 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 @@ -17,18 +17,15 @@ package chip.devicecontroller.cluster.eventstructs import chip.devicecontroller.cluster.* -import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag -import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -import java.util.Optional - -class RvcOperationalStateClusterOperationalErrorEvent ( - val errorState: chip.devicecontroller.cluster.structs.RvcOperationalStateClusterErrorStateStruct) { - override fun toString(): String = buildString { +class RvcOperationalStateClusterOperationalErrorEvent( + val errorState: chip.devicecontroller.cluster.structs.RvcOperationalStateClusterErrorStateStruct +) { + override fun toString(): String = buildString { append("RvcOperationalStateClusterOperationalErrorEvent {\n") append("\terrorState : $errorState\n") append("}\n") @@ -45,10 +42,14 @@ class RvcOperationalStateClusterOperationalErrorEvent ( companion object { private const val TAG_ERROR_STATE = 0 - fun fromTlv(tag: Tag, tlvReader: TlvReader) : RvcOperationalStateClusterOperationalErrorEvent { + fun fromTlv(tag: Tag, tlvReader: TlvReader): RvcOperationalStateClusterOperationalErrorEvent { tlvReader.enterStructure(tag) - val errorState = chip.devicecontroller.cluster.structs.RvcOperationalStateClusterErrorStateStruct.fromTlv(ContextSpecificTag(TAG_ERROR_STATE), tlvReader) - + val errorState = + chip.devicecontroller.cluster.structs.RvcOperationalStateClusterErrorStateStruct.fromTlv( + ContextSpecificTag(TAG_ERROR_STATE), + tlvReader + ) + tlvReader.exitContainer() return RvcOperationalStateClusterOperationalErrorEvent(errorState) 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 0c2e543c57451c..2bc948e2a667b1 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 @@ -17,18 +17,13 @@ package chip.devicecontroller.cluster.eventstructs import chip.devicecontroller.cluster.* -import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag -import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -import java.util.Optional - -class SmokeCoAlarmClusterCOAlarmEvent ( - val alarmSeverityLevel: Int) { - override fun toString(): String = buildString { +class SmokeCoAlarmClusterCOAlarmEvent(val alarmSeverityLevel: Int) { + override fun toString(): String = buildString { append("SmokeCoAlarmClusterCOAlarmEvent {\n") append("\talarmSeverityLevel : $alarmSeverityLevel\n") append("}\n") @@ -45,10 +40,10 @@ class SmokeCoAlarmClusterCOAlarmEvent ( companion object { private const val TAG_ALARM_SEVERITY_LEVEL = 0 - fun fromTlv(tag: Tag, tlvReader: TlvReader) : SmokeCoAlarmClusterCOAlarmEvent { + fun fromTlv(tag: Tag, tlvReader: TlvReader): SmokeCoAlarmClusterCOAlarmEvent { tlvReader.enterStructure(tag) val alarmSeverityLevel = tlvReader.getInt(ContextSpecificTag(TAG_ALARM_SEVERITY_LEVEL)) - + tlvReader.exitContainer() return SmokeCoAlarmClusterCOAlarmEvent(alarmSeverityLevel) 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 6ddfb212cc0515..19223606c4685d 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 @@ -17,18 +17,13 @@ package chip.devicecontroller.cluster.eventstructs import chip.devicecontroller.cluster.* -import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag -import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -import java.util.Optional - -class SmokeCoAlarmClusterInterconnectCOAlarmEvent ( - val alarmSeverityLevel: Int) { - override fun toString(): String = buildString { +class SmokeCoAlarmClusterInterconnectCOAlarmEvent(val alarmSeverityLevel: Int) { + override fun toString(): String = buildString { append("SmokeCoAlarmClusterInterconnectCOAlarmEvent {\n") append("\talarmSeverityLevel : $alarmSeverityLevel\n") append("}\n") @@ -45,10 +40,10 @@ class SmokeCoAlarmClusterInterconnectCOAlarmEvent ( companion object { private const val TAG_ALARM_SEVERITY_LEVEL = 0 - fun fromTlv(tag: Tag, tlvReader: TlvReader) : SmokeCoAlarmClusterInterconnectCOAlarmEvent { + fun fromTlv(tag: Tag, tlvReader: TlvReader): SmokeCoAlarmClusterInterconnectCOAlarmEvent { tlvReader.enterStructure(tag) val alarmSeverityLevel = tlvReader.getInt(ContextSpecificTag(TAG_ALARM_SEVERITY_LEVEL)) - + tlvReader.exitContainer() return SmokeCoAlarmClusterInterconnectCOAlarmEvent(alarmSeverityLevel) 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 c3ada5b8d56ba2..38e2fe872915f7 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 @@ -17,18 +17,13 @@ package chip.devicecontroller.cluster.eventstructs import chip.devicecontroller.cluster.* -import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag -import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -import java.util.Optional - -class SmokeCoAlarmClusterInterconnectSmokeAlarmEvent ( - val alarmSeverityLevel: Int) { - override fun toString(): String = buildString { +class SmokeCoAlarmClusterInterconnectSmokeAlarmEvent(val alarmSeverityLevel: Int) { + override fun toString(): String = buildString { append("SmokeCoAlarmClusterInterconnectSmokeAlarmEvent {\n") append("\talarmSeverityLevel : $alarmSeverityLevel\n") append("}\n") @@ -45,10 +40,10 @@ class SmokeCoAlarmClusterInterconnectSmokeAlarmEvent ( companion object { private const val TAG_ALARM_SEVERITY_LEVEL = 0 - fun fromTlv(tag: Tag, tlvReader: TlvReader) : SmokeCoAlarmClusterInterconnectSmokeAlarmEvent { + fun fromTlv(tag: Tag, tlvReader: TlvReader): SmokeCoAlarmClusterInterconnectSmokeAlarmEvent { tlvReader.enterStructure(tag) val alarmSeverityLevel = tlvReader.getInt(ContextSpecificTag(TAG_ALARM_SEVERITY_LEVEL)) - + tlvReader.exitContainer() return SmokeCoAlarmClusterInterconnectSmokeAlarmEvent(alarmSeverityLevel) 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 a1b2573db15fb6..ce2d9ad47341d0 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 @@ -17,18 +17,13 @@ package chip.devicecontroller.cluster.eventstructs import chip.devicecontroller.cluster.* -import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag -import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -import java.util.Optional - -class SmokeCoAlarmClusterLowBatteryEvent ( - val alarmSeverityLevel: Int) { - override fun toString(): String = buildString { +class SmokeCoAlarmClusterLowBatteryEvent(val alarmSeverityLevel: Int) { + override fun toString(): String = buildString { append("SmokeCoAlarmClusterLowBatteryEvent {\n") append("\talarmSeverityLevel : $alarmSeverityLevel\n") append("}\n") @@ -45,10 +40,10 @@ class SmokeCoAlarmClusterLowBatteryEvent ( companion object { private const val TAG_ALARM_SEVERITY_LEVEL = 0 - fun fromTlv(tag: Tag, tlvReader: TlvReader) : SmokeCoAlarmClusterLowBatteryEvent { + fun fromTlv(tag: Tag, tlvReader: TlvReader): SmokeCoAlarmClusterLowBatteryEvent { tlvReader.enterStructure(tag) val alarmSeverityLevel = tlvReader.getInt(ContextSpecificTag(TAG_ALARM_SEVERITY_LEVEL)) - + tlvReader.exitContainer() return SmokeCoAlarmClusterLowBatteryEvent(alarmSeverityLevel) 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 01753b1e77aa97..324a5d4461a225 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 @@ -17,18 +17,13 @@ package chip.devicecontroller.cluster.eventstructs import chip.devicecontroller.cluster.* -import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag -import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -import java.util.Optional - -class SmokeCoAlarmClusterSmokeAlarmEvent ( - val alarmSeverityLevel: Int) { - override fun toString(): String = buildString { +class SmokeCoAlarmClusterSmokeAlarmEvent(val alarmSeverityLevel: Int) { + override fun toString(): String = buildString { append("SmokeCoAlarmClusterSmokeAlarmEvent {\n") append("\talarmSeverityLevel : $alarmSeverityLevel\n") append("}\n") @@ -45,10 +40,10 @@ class SmokeCoAlarmClusterSmokeAlarmEvent ( companion object { private const val TAG_ALARM_SEVERITY_LEVEL = 0 - fun fromTlv(tag: Tag, tlvReader: TlvReader) : SmokeCoAlarmClusterSmokeAlarmEvent { + fun fromTlv(tag: Tag, tlvReader: TlvReader): SmokeCoAlarmClusterSmokeAlarmEvent { tlvReader.enterStructure(tag) val alarmSeverityLevel = tlvReader.getInt(ContextSpecificTag(TAG_ALARM_SEVERITY_LEVEL)) - + tlvReader.exitContainer() return SmokeCoAlarmClusterSmokeAlarmEvent(alarmSeverityLevel) 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 1ae05ccf0043b2..50b455842e538f 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 @@ -17,20 +17,18 @@ package chip.devicecontroller.cluster.eventstructs import chip.devicecontroller.cluster.* -import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag -import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter - import java.util.Optional -class SoftwareDiagnosticsClusterSoftwareFaultEvent ( - val id: Long, - val name: Optional, - val faultRecording: Optional) { - override fun toString(): String = buildString { +class SoftwareDiagnosticsClusterSoftwareFaultEvent( + val id: Long, + val name: Optional, + val faultRecording: Optional +) { + override fun toString(): String = buildString { append("SoftwareDiagnosticsClusterSoftwareFaultEvent {\n") append("\tid : $id\n") append("\tname : $name\n") @@ -43,13 +41,13 @@ class SoftwareDiagnosticsClusterSoftwareFaultEvent ( startStructure(tag) put(ContextSpecificTag(TAG_ID), id) if (name.isPresent) { - val optname = name.get() - put(ContextSpecificTag(TAG_NAME), optname) - } + val optname = name.get() + put(ContextSpecificTag(TAG_NAME), optname) + } if (faultRecording.isPresent) { - val optfaultRecording = faultRecording.get() - put(ContextSpecificTag(TAG_FAULT_RECORDING), optfaultRecording) - } + val optfaultRecording = faultRecording.get() + put(ContextSpecificTag(TAG_FAULT_RECORDING), optfaultRecording) + } endStructure() } } @@ -59,20 +57,22 @@ class SoftwareDiagnosticsClusterSoftwareFaultEvent ( private const val TAG_NAME = 1 private const val TAG_FAULT_RECORDING = 2 - fun fromTlv(tag: Tag, tlvReader: TlvReader) : SoftwareDiagnosticsClusterSoftwareFaultEvent { + fun fromTlv(tag: Tag, tlvReader: TlvReader): SoftwareDiagnosticsClusterSoftwareFaultEvent { tlvReader.enterStructure(tag) val id = tlvReader.getLong(ContextSpecificTag(TAG_ID)) - val name = if (tlvReader.isNextTag(ContextSpecificTag(TAG_NAME))) { - Optional.of(tlvReader.getString(ContextSpecificTag(TAG_NAME))) - } else { - Optional.empty() - } - val faultRecording = if (tlvReader.isNextTag(ContextSpecificTag(TAG_FAULT_RECORDING))) { - Optional.of(tlvReader.getByteArray(ContextSpecificTag(TAG_FAULT_RECORDING))) - } else { - Optional.empty() - } - + val name = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_NAME))) { + Optional.of(tlvReader.getString(ContextSpecificTag(TAG_NAME))) + } else { + Optional.empty() + } + val faultRecording = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_FAULT_RECORDING))) { + Optional.of(tlvReader.getByteArray(ContextSpecificTag(TAG_FAULT_RECORDING))) + } else { + Optional.empty() + } + tlvReader.exitContainer() return SoftwareDiagnosticsClusterSoftwareFaultEvent(id, name, faultRecording) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SwitchClusterInitialPressEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/SwitchClusterInitialPressEvent.kt index 62973598b9aff5..893412c1f25322 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 @@ -17,18 +17,13 @@ package chip.devicecontroller.cluster.eventstructs import chip.devicecontroller.cluster.* -import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag -import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -import java.util.Optional - -class SwitchClusterInitialPressEvent ( - val newPosition: Int) { - override fun toString(): String = buildString { +class SwitchClusterInitialPressEvent(val newPosition: Int) { + override fun toString(): String = buildString { append("SwitchClusterInitialPressEvent {\n") append("\tnewPosition : $newPosition\n") append("}\n") @@ -45,10 +40,10 @@ class SwitchClusterInitialPressEvent ( companion object { private const val TAG_NEW_POSITION = 0 - fun fromTlv(tag: Tag, tlvReader: TlvReader) : SwitchClusterInitialPressEvent { + fun fromTlv(tag: Tag, tlvReader: TlvReader): SwitchClusterInitialPressEvent { tlvReader.enterStructure(tag) val newPosition = tlvReader.getInt(ContextSpecificTag(TAG_NEW_POSITION)) - + tlvReader.exitContainer() return SwitchClusterInitialPressEvent(newPosition) 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 d67e1ba0076ca9..3fa420f46ddec3 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 @@ -17,18 +17,13 @@ package chip.devicecontroller.cluster.eventstructs import chip.devicecontroller.cluster.* -import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag -import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -import java.util.Optional - -class SwitchClusterLongPressEvent ( - val newPosition: Int) { - override fun toString(): String = buildString { +class SwitchClusterLongPressEvent(val newPosition: Int) { + override fun toString(): String = buildString { append("SwitchClusterLongPressEvent {\n") append("\tnewPosition : $newPosition\n") append("}\n") @@ -45,10 +40,10 @@ class SwitchClusterLongPressEvent ( companion object { private const val TAG_NEW_POSITION = 0 - fun fromTlv(tag: Tag, tlvReader: TlvReader) : SwitchClusterLongPressEvent { + fun fromTlv(tag: Tag, tlvReader: TlvReader): SwitchClusterLongPressEvent { tlvReader.enterStructure(tag) val newPosition = tlvReader.getInt(ContextSpecificTag(TAG_NEW_POSITION)) - + tlvReader.exitContainer() return SwitchClusterLongPressEvent(newPosition) 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 c26312888c3d2d..eb90698fc735ab 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 @@ -17,18 +17,13 @@ package chip.devicecontroller.cluster.eventstructs import chip.devicecontroller.cluster.* -import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag -import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -import java.util.Optional - -class SwitchClusterLongReleaseEvent ( - val previousPosition: Int) { - override fun toString(): String = buildString { +class SwitchClusterLongReleaseEvent(val previousPosition: Int) { + override fun toString(): String = buildString { append("SwitchClusterLongReleaseEvent {\n") append("\tpreviousPosition : $previousPosition\n") append("}\n") @@ -45,10 +40,10 @@ class SwitchClusterLongReleaseEvent ( companion object { private const val TAG_PREVIOUS_POSITION = 0 - fun fromTlv(tag: Tag, tlvReader: TlvReader) : SwitchClusterLongReleaseEvent { + fun fromTlv(tag: Tag, tlvReader: TlvReader): SwitchClusterLongReleaseEvent { tlvReader.enterStructure(tag) val previousPosition = tlvReader.getInt(ContextSpecificTag(TAG_PREVIOUS_POSITION)) - + tlvReader.exitContainer() return SwitchClusterLongReleaseEvent(previousPosition) 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 1e7eb6055668a6..81141e17424fbb 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 @@ -17,19 +17,16 @@ package chip.devicecontroller.cluster.eventstructs import chip.devicecontroller.cluster.* -import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag -import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -import java.util.Optional - -class SwitchClusterMultiPressCompleteEvent ( - val previousPosition: Int, - val totalNumberOfPressesCounted: Int) { - override fun toString(): String = buildString { +class SwitchClusterMultiPressCompleteEvent( + val previousPosition: Int, + val totalNumberOfPressesCounted: Int +) { + override fun toString(): String = buildString { append("SwitchClusterMultiPressCompleteEvent {\n") append("\tpreviousPosition : $previousPosition\n") append("\ttotalNumberOfPressesCounted : $totalNumberOfPressesCounted\n") @@ -49,11 +46,12 @@ 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 { + fun fromTlv(tag: Tag, tlvReader: TlvReader): SwitchClusterMultiPressCompleteEvent { tlvReader.enterStructure(tag) val previousPosition = tlvReader.getInt(ContextSpecificTag(TAG_PREVIOUS_POSITION)) - val totalNumberOfPressesCounted = tlvReader.getInt(ContextSpecificTag(TAG_TOTAL_NUMBER_OF_PRESSES_COUNTED)) - + val totalNumberOfPressesCounted = + tlvReader.getInt(ContextSpecificTag(TAG_TOTAL_NUMBER_OF_PRESSES_COUNTED)) + tlvReader.exitContainer() return SwitchClusterMultiPressCompleteEvent(previousPosition, totalNumberOfPressesCounted) 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 0500e314f696ef..11fab26fdfce8e 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 @@ -17,19 +17,16 @@ package chip.devicecontroller.cluster.eventstructs import chip.devicecontroller.cluster.* -import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag -import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -import java.util.Optional - -class SwitchClusterMultiPressOngoingEvent ( - val newPosition: Int, - val currentNumberOfPressesCounted: Int) { - override fun toString(): String = buildString { +class SwitchClusterMultiPressOngoingEvent( + val newPosition: Int, + val currentNumberOfPressesCounted: Int +) { + override fun toString(): String = buildString { append("SwitchClusterMultiPressOngoingEvent {\n") append("\tnewPosition : $newPosition\n") append("\tcurrentNumberOfPressesCounted : $currentNumberOfPressesCounted\n") @@ -49,11 +46,12 @@ 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 { + fun fromTlv(tag: Tag, tlvReader: TlvReader): SwitchClusterMultiPressOngoingEvent { tlvReader.enterStructure(tag) val newPosition = tlvReader.getInt(ContextSpecificTag(TAG_NEW_POSITION)) - val currentNumberOfPressesCounted = tlvReader.getInt(ContextSpecificTag(TAG_CURRENT_NUMBER_OF_PRESSES_COUNTED)) - + val currentNumberOfPressesCounted = + tlvReader.getInt(ContextSpecificTag(TAG_CURRENT_NUMBER_OF_PRESSES_COUNTED)) + tlvReader.exitContainer() return SwitchClusterMultiPressOngoingEvent(newPosition, currentNumberOfPressesCounted) 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 5d3e2f26c7fd0c..0eeb9e2841fd7c 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 @@ -17,18 +17,13 @@ package chip.devicecontroller.cluster.eventstructs import chip.devicecontroller.cluster.* -import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag -import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -import java.util.Optional - -class SwitchClusterShortReleaseEvent ( - val previousPosition: Int) { - override fun toString(): String = buildString { +class SwitchClusterShortReleaseEvent(val previousPosition: Int) { + override fun toString(): String = buildString { append("SwitchClusterShortReleaseEvent {\n") append("\tpreviousPosition : $previousPosition\n") append("}\n") @@ -45,10 +40,10 @@ class SwitchClusterShortReleaseEvent ( companion object { private const val TAG_PREVIOUS_POSITION = 0 - fun fromTlv(tag: Tag, tlvReader: TlvReader) : SwitchClusterShortReleaseEvent { + fun fromTlv(tag: Tag, tlvReader: TlvReader): SwitchClusterShortReleaseEvent { tlvReader.enterStructure(tag) val previousPosition = tlvReader.getInt(ContextSpecificTag(TAG_PREVIOUS_POSITION)) - + tlvReader.exitContainer() return SwitchClusterShortReleaseEvent(previousPosition) 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 ec54e50aae31af..2b921b37ac6c2b 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 @@ -17,18 +17,13 @@ package chip.devicecontroller.cluster.eventstructs import chip.devicecontroller.cluster.* -import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag -import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -import java.util.Optional - -class SwitchClusterSwitchLatchedEvent ( - val newPosition: Int) { - override fun toString(): String = buildString { +class SwitchClusterSwitchLatchedEvent(val newPosition: Int) { + override fun toString(): String = buildString { append("SwitchClusterSwitchLatchedEvent {\n") append("\tnewPosition : $newPosition\n") append("}\n") @@ -45,10 +40,10 @@ class SwitchClusterSwitchLatchedEvent ( companion object { private const val TAG_NEW_POSITION = 0 - fun fromTlv(tag: Tag, tlvReader: TlvReader) : SwitchClusterSwitchLatchedEvent { + fun fromTlv(tag: Tag, tlvReader: TlvReader): SwitchClusterSwitchLatchedEvent { tlvReader.enterStructure(tag) val newPosition = tlvReader.getInt(ContextSpecificTag(TAG_NEW_POSITION)) - + tlvReader.exitContainer() return SwitchClusterSwitchLatchedEvent(newPosition) 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 cca6b8f8499a17..ffdc72b1e54c89 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 @@ -17,18 +17,13 @@ package chip.devicecontroller.cluster.eventstructs import chip.devicecontroller.cluster.* -import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag -import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -import java.util.Optional - -class ThreadNetworkDiagnosticsClusterConnectionStatusEvent ( - val connectionStatus: Int) { - override fun toString(): String = buildString { +class ThreadNetworkDiagnosticsClusterConnectionStatusEvent(val connectionStatus: Int) { + override fun toString(): String = buildString { append("ThreadNetworkDiagnosticsClusterConnectionStatusEvent {\n") append("\tconnectionStatus : $connectionStatus\n") append("}\n") @@ -45,10 +40,13 @@ class ThreadNetworkDiagnosticsClusterConnectionStatusEvent ( companion object { private const val TAG_CONNECTION_STATUS = 0 - fun fromTlv(tag: Tag, tlvReader: TlvReader) : ThreadNetworkDiagnosticsClusterConnectionStatusEvent { + fun fromTlv( + tag: Tag, + tlvReader: TlvReader + ): ThreadNetworkDiagnosticsClusterConnectionStatusEvent { tlvReader.enterStructure(tag) val connectionStatus = tlvReader.getInt(ContextSpecificTag(TAG_CONNECTION_STATUS)) - + tlvReader.exitContainer() return ThreadNetworkDiagnosticsClusterConnectionStatusEvent(connectionStatus) 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 ef103a4821a3e2..f9110c39fa1d40 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 @@ -20,16 +20,14 @@ import chip.devicecontroller.cluster.* import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag -import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -import java.util.Optional - -class ThreadNetworkDiagnosticsClusterNetworkFaultChangeEvent ( - val current: List, - val previous: List) { - override fun toString(): String = buildString { +class ThreadNetworkDiagnosticsClusterNetworkFaultChangeEvent( + val current: List, + val previous: List +) { + override fun toString(): String = buildString { append("ThreadNetworkDiagnosticsClusterNetworkFaultChangeEvent {\n") append("\tcurrent : $current\n") append("\tprevious : $previous\n") @@ -57,23 +55,28 @@ class ThreadNetworkDiagnosticsClusterNetworkFaultChangeEvent ( private const val TAG_CURRENT = 0 private const val TAG_PREVIOUS = 1 - fun fromTlv(tag: Tag, tlvReader: TlvReader) : ThreadNetworkDiagnosticsClusterNetworkFaultChangeEvent { + fun fromTlv( + tag: Tag, + tlvReader: TlvReader + ): ThreadNetworkDiagnosticsClusterNetworkFaultChangeEvent { tlvReader.enterStructure(tag) - val current = buildList { - tlvReader.enterList(ContextSpecificTag(TAG_CURRENT)) - while(!tlvReader.isEndOfContainer()) { - this.add(tlvReader.getInt(AnonymousTag)) - } - tlvReader.exitContainer() - } - val previous = buildList { - tlvReader.enterList(ContextSpecificTag(TAG_PREVIOUS)) - while(!tlvReader.isEndOfContainer()) { - this.add(tlvReader.getInt(AnonymousTag)) - } - tlvReader.exitContainer() - } - + val current = + buildList { + tlvReader.enterList(ContextSpecificTag(TAG_CURRENT)) + while (!tlvReader.isEndOfContainer()) { + this.add(tlvReader.getInt(AnonymousTag)) + } + tlvReader.exitContainer() + } + val previous = + buildList { + tlvReader.enterList(ContextSpecificTag(TAG_PREVIOUS)) + while (!tlvReader.isEndOfContainer()) { + this.add(tlvReader.getInt(AnonymousTag)) + } + tlvReader.exitContainer() + } + tlvReader.exitContainer() return ThreadNetworkDiagnosticsClusterNetworkFaultChangeEvent(current, previous) 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 b66f227f0d07fe..53090f750b4e06 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 @@ -17,18 +17,13 @@ package chip.devicecontroller.cluster.eventstructs import chip.devicecontroller.cluster.* -import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag -import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -import java.util.Optional - -class TimeSynchronizationClusterDSTStatusEvent ( - val DSTOffsetActive: Boolean) { - override fun toString(): String = buildString { +class TimeSynchronizationClusterDSTStatusEvent(val DSTOffsetActive: Boolean) { + override fun toString(): String = buildString { append("TimeSynchronizationClusterDSTStatusEvent {\n") append("\tDSTOffsetActive : $DSTOffsetActive\n") append("}\n") @@ -45,10 +40,10 @@ class TimeSynchronizationClusterDSTStatusEvent ( companion object { private const val TAG_D_S_T_OFFSET_ACTIVE = 0 - fun fromTlv(tag: Tag, tlvReader: TlvReader) : TimeSynchronizationClusterDSTStatusEvent { + fun fromTlv(tag: Tag, tlvReader: TlvReader): TimeSynchronizationClusterDSTStatusEvent { tlvReader.enterStructure(tag) val DSTOffsetActive = tlvReader.getBoolean(ContextSpecificTag(TAG_D_S_T_OFFSET_ACTIVE)) - + tlvReader.exitContainer() return TimeSynchronizationClusterDSTStatusEvent(DSTOffsetActive) 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 2ccb1685646258..452e9d902c4767 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 @@ -17,19 +17,14 @@ package chip.devicecontroller.cluster.eventstructs import chip.devicecontroller.cluster.* -import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag -import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter - import java.util.Optional -class TimeSynchronizationClusterTimeZoneStatusEvent ( - val offset: Long, - val name: Optional) { - override fun toString(): String = buildString { +class TimeSynchronizationClusterTimeZoneStatusEvent(val offset: Long, val name: Optional) { + override fun toString(): String = buildString { append("TimeSynchronizationClusterTimeZoneStatusEvent {\n") append("\toffset : $offset\n") append("\tname : $name\n") @@ -41,9 +36,9 @@ class TimeSynchronizationClusterTimeZoneStatusEvent ( startStructure(tag) put(ContextSpecificTag(TAG_OFFSET), offset) if (name.isPresent) { - val optname = name.get() - put(ContextSpecificTag(TAG_NAME), optname) - } + val optname = name.get() + put(ContextSpecificTag(TAG_NAME), optname) + } endStructure() } } @@ -52,15 +47,16 @@ class TimeSynchronizationClusterTimeZoneStatusEvent ( private const val TAG_OFFSET = 0 private const val TAG_NAME = 1 - fun fromTlv(tag: Tag, tlvReader: TlvReader) : TimeSynchronizationClusterTimeZoneStatusEvent { + fun fromTlv(tag: Tag, tlvReader: TlvReader): TimeSynchronizationClusterTimeZoneStatusEvent { tlvReader.enterStructure(tag) val offset = tlvReader.getLong(ContextSpecificTag(TAG_OFFSET)) - val name = if (tlvReader.isNextTag(ContextSpecificTag(TAG_NAME))) { - Optional.of(tlvReader.getString(ContextSpecificTag(TAG_NAME))) - } else { - Optional.empty() - } - + val name = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_NAME))) { + Optional.of(tlvReader.getString(ContextSpecificTag(TAG_NAME))) + } else { + Optional.empty() + } + tlvReader.exitContainer() return TimeSynchronizationClusterTimeZoneStatusEvent(offset, name) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/UnitTestingClusterTestEventEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/UnitTestingClusterTestEventEvent.kt index 1787e26580dba6..8c2e410ab80f6d 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 @@ -20,20 +20,18 @@ import chip.devicecontroller.cluster.* import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag -import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -import java.util.Optional - -class UnitTestingClusterTestEventEvent ( - val arg1: Int, - val arg2: Int, - val arg3: Boolean, - val arg4: chip.devicecontroller.cluster.structs.UnitTestingClusterSimpleStruct, - val arg5: List, - val arg6: List) { - override fun toString(): String = buildString { +class UnitTestingClusterTestEventEvent( + val arg1: Int, + val arg2: Int, + val arg3: Boolean, + val arg4: chip.devicecontroller.cluster.structs.UnitTestingClusterSimpleStruct, + val arg5: List, + val arg6: List +) { + override fun toString(): String = buildString { append("UnitTestingClusterTestEventEvent {\n") append("\targ1 : $arg1\n") append("\targ2 : $arg2\n") @@ -73,27 +71,38 @@ class UnitTestingClusterTestEventEvent ( private const val TAG_ARG5 = 5 private const val TAG_ARG6 = 6 - fun fromTlv(tag: Tag, tlvReader: TlvReader) : UnitTestingClusterTestEventEvent { + fun fromTlv(tag: Tag, tlvReader: TlvReader): UnitTestingClusterTestEventEvent { tlvReader.enterStructure(tag) val arg1 = tlvReader.getInt(ContextSpecificTag(TAG_ARG1)) val arg2 = tlvReader.getInt(ContextSpecificTag(TAG_ARG2)) val arg3 = tlvReader.getBoolean(ContextSpecificTag(TAG_ARG3)) - val arg4 = chip.devicecontroller.cluster.structs.UnitTestingClusterSimpleStruct.fromTlv(ContextSpecificTag(TAG_ARG4), tlvReader) - val arg5 = buildList { - tlvReader.enterList(ContextSpecificTag(TAG_ARG5)) - while(!tlvReader.isEndOfContainer()) { - this.add(chip.devicecontroller.cluster.structs.UnitTestingClusterSimpleStruct.fromTlv(AnonymousTag, tlvReader)) - } - tlvReader.exitContainer() - } - val arg6 = buildList { - tlvReader.enterList(ContextSpecificTag(TAG_ARG6)) - while(!tlvReader.isEndOfContainer()) { - this.add(tlvReader.getInt(AnonymousTag)) - } - tlvReader.exitContainer() - } - + val arg4 = + chip.devicecontroller.cluster.structs.UnitTestingClusterSimpleStruct.fromTlv( + ContextSpecificTag(TAG_ARG4), + tlvReader + ) + val arg5 = + buildList { + tlvReader.enterList(ContextSpecificTag(TAG_ARG5)) + while (!tlvReader.isEndOfContainer()) { + this.add( + chip.devicecontroller.cluster.structs.UnitTestingClusterSimpleStruct.fromTlv( + AnonymousTag, + tlvReader + ) + ) + } + tlvReader.exitContainer() + } + val arg6 = + buildList { + tlvReader.enterList(ContextSpecificTag(TAG_ARG6)) + while (!tlvReader.isEndOfContainer()) { + this.add(tlvReader.getInt(AnonymousTag)) + } + tlvReader.exitContainer() + } + tlvReader.exitContainer() return UnitTestingClusterTestEventEvent(arg1, arg2, arg3, arg4, arg5, arg6) 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 1995cf80a3b1fc..d746c65d5ea1f1 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 @@ -17,18 +17,13 @@ package chip.devicecontroller.cluster.eventstructs import chip.devicecontroller.cluster.* -import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag -import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -import java.util.Optional - -class UnitTestingClusterTestFabricScopedEventEvent ( - val fabricIndex: Int) { - override fun toString(): String = buildString { +class UnitTestingClusterTestFabricScopedEventEvent(val fabricIndex: Int) { + override fun toString(): String = buildString { append("UnitTestingClusterTestFabricScopedEventEvent {\n") append("\tfabricIndex : $fabricIndex\n") append("}\n") @@ -45,10 +40,10 @@ class UnitTestingClusterTestFabricScopedEventEvent ( companion object { private const val TAG_FABRIC_INDEX = 254 - fun fromTlv(tag: Tag, tlvReader: TlvReader) : UnitTestingClusterTestFabricScopedEventEvent { + fun fromTlv(tag: Tag, tlvReader: TlvReader): UnitTestingClusterTestFabricScopedEventEvent { tlvReader.enterStructure(tag) val fabricIndex = tlvReader.getInt(ContextSpecificTag(TAG_FABRIC_INDEX)) - + tlvReader.exitContainer() return UnitTestingClusterTestFabricScopedEventEvent(fabricIndex) 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 5db782d0005a54..087484ef1bfa7b 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 @@ -17,19 +17,16 @@ package chip.devicecontroller.cluster.eventstructs import chip.devicecontroller.cluster.* -import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag -import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -import java.util.Optional - -class WiFiNetworkDiagnosticsClusterAssociationFailureEvent ( - val associationFailure: Int, - val status: Int) { - override fun toString(): String = buildString { +class WiFiNetworkDiagnosticsClusterAssociationFailureEvent( + val associationFailure: Int, + val status: Int +) { + override fun toString(): String = buildString { append("WiFiNetworkDiagnosticsClusterAssociationFailureEvent {\n") append("\tassociationFailure : $associationFailure\n") append("\tstatus : $status\n") @@ -49,11 +46,14 @@ class WiFiNetworkDiagnosticsClusterAssociationFailureEvent ( private const val TAG_ASSOCIATION_FAILURE = 0 private const val TAG_STATUS = 1 - fun fromTlv(tag: Tag, tlvReader: TlvReader) : WiFiNetworkDiagnosticsClusterAssociationFailureEvent { + fun fromTlv( + tag: Tag, + tlvReader: TlvReader + ): WiFiNetworkDiagnosticsClusterAssociationFailureEvent { tlvReader.enterStructure(tag) val associationFailure = tlvReader.getInt(ContextSpecificTag(TAG_ASSOCIATION_FAILURE)) val status = tlvReader.getInt(ContextSpecificTag(TAG_STATUS)) - + tlvReader.exitContainer() return WiFiNetworkDiagnosticsClusterAssociationFailureEvent(associationFailure, status) 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 762339bde4f556..3599597c99b152 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 @@ -17,18 +17,13 @@ package chip.devicecontroller.cluster.eventstructs import chip.devicecontroller.cluster.* -import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag -import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -import java.util.Optional - -class WiFiNetworkDiagnosticsClusterConnectionStatusEvent ( - val connectionStatus: Int) { - override fun toString(): String = buildString { +class WiFiNetworkDiagnosticsClusterConnectionStatusEvent(val connectionStatus: Int) { + override fun toString(): String = buildString { append("WiFiNetworkDiagnosticsClusterConnectionStatusEvent {\n") append("\tconnectionStatus : $connectionStatus\n") append("}\n") @@ -45,10 +40,13 @@ class WiFiNetworkDiagnosticsClusterConnectionStatusEvent ( companion object { private const val TAG_CONNECTION_STATUS = 0 - fun fromTlv(tag: Tag, tlvReader: TlvReader) : WiFiNetworkDiagnosticsClusterConnectionStatusEvent { + fun fromTlv( + tag: Tag, + tlvReader: TlvReader + ): WiFiNetworkDiagnosticsClusterConnectionStatusEvent { tlvReader.enterStructure(tag) val connectionStatus = tlvReader.getInt(ContextSpecificTag(TAG_CONNECTION_STATUS)) - + tlvReader.exitContainer() return WiFiNetworkDiagnosticsClusterConnectionStatusEvent(connectionStatus) 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 2a702882f2557a..6d54ae4f2bfdcd 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 @@ -17,18 +17,13 @@ package chip.devicecontroller.cluster.eventstructs import chip.devicecontroller.cluster.* -import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag -import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -import java.util.Optional - -class WiFiNetworkDiagnosticsClusterDisconnectionEvent ( - val reasonCode: Int) { - override fun toString(): String = buildString { +class WiFiNetworkDiagnosticsClusterDisconnectionEvent(val reasonCode: Int) { + override fun toString(): String = buildString { append("WiFiNetworkDiagnosticsClusterDisconnectionEvent {\n") append("\treasonCode : $reasonCode\n") append("}\n") @@ -45,10 +40,10 @@ class WiFiNetworkDiagnosticsClusterDisconnectionEvent ( companion object { private const val TAG_REASON_CODE = 0 - fun fromTlv(tag: Tag, tlvReader: TlvReader) : WiFiNetworkDiagnosticsClusterDisconnectionEvent { + fun fromTlv(tag: Tag, tlvReader: TlvReader): WiFiNetworkDiagnosticsClusterDisconnectionEvent { tlvReader.enterStructure(tag) val reasonCode = tlvReader.getInt(ContextSpecificTag(TAG_REASON_CODE)) - + tlvReader.exitContainer() return WiFiNetworkDiagnosticsClusterDisconnectionEvent(reasonCode) 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 a526275e085718..6daac4451c1833 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 @@ -20,19 +20,17 @@ import chip.devicecontroller.cluster.* import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag -import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -import java.util.Optional - -class AccessControlClusterAccessControlEntryStruct ( - val privilege: Int, - val authMode: Int, - val subjects: List?, - val targets: List?, - val fabricIndex: Int) { - override fun toString(): String = buildString { +class AccessControlClusterAccessControlEntryStruct( + val privilege: Int, + val authMode: Int, + val subjects: List?, + val targets: List?, + val fabricIndex: Int +) { + override fun toString(): String = buildString { append("AccessControlClusterAccessControlEntryStruct {\n") append("\tprivilege : $privilege\n") append("\tauthMode : $authMode\n") @@ -48,23 +46,23 @@ class AccessControlClusterAccessControlEntryStruct ( put(ContextSpecificTag(TAG_PRIVILEGE), privilege) put(ContextSpecificTag(TAG_AUTH_MODE), authMode) if (subjects != null) { - startList(ContextSpecificTag(TAG_SUBJECTS)) - for (item in subjects.iterator()) { - put(AnonymousTag, item) + startList(ContextSpecificTag(TAG_SUBJECTS)) + for (item in subjects.iterator()) { + put(AnonymousTag, item) + } + endList() + } else { + putNull(ContextSpecificTag(TAG_SUBJECTS)) } - endList() - } else { - putNull(ContextSpecificTag(TAG_SUBJECTS)) - } if (targets != null) { - startList(ContextSpecificTag(TAG_TARGETS)) - for (item in targets.iterator()) { - item.toTlv(AnonymousTag, this) + startList(ContextSpecificTag(TAG_TARGETS)) + for (item in targets.iterator()) { + item.toTlv(AnonymousTag, this) + } + endList() + } else { + putNull(ContextSpecificTag(TAG_TARGETS)) } - endList() - } else { - putNull(ContextSpecificTag(TAG_TARGETS)) - } put(ContextSpecificTag(TAG_FABRIC_INDEX), fabricIndex) endStructure() } @@ -77,39 +75,47 @@ class AccessControlClusterAccessControlEntryStruct ( private const val TAG_TARGETS = 4 private const val TAG_FABRIC_INDEX = 254 - fun fromTlv(tag: Tag, tlvReader: TlvReader) : AccessControlClusterAccessControlEntryStruct { + 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)) - val subjects = if (!tlvReader.isNull()) { - buildList { - tlvReader.enterList(ContextSpecificTag(TAG_SUBJECTS)) - while(!tlvReader.isEndOfContainer()) { - add(tlvReader.getLong(AnonymousTag)) - } - tlvReader.exitContainer() - } - } else { - tlvReader.getNull(ContextSpecificTag(TAG_SUBJECTS)) - null - } - val targets = if (!tlvReader.isNull()) { - buildList { - tlvReader.enterList(ContextSpecificTag(TAG_TARGETS)) - while(!tlvReader.isEndOfContainer()) { - add(AccessControlClusterAccessControlTargetStruct.fromTlv(AnonymousTag, tlvReader)) - } - tlvReader.exitContainer() - } - } else { - tlvReader.getNull(ContextSpecificTag(TAG_TARGETS)) - null - } + val subjects = + if (!tlvReader.isNull()) { + buildList { + tlvReader.enterList(ContextSpecificTag(TAG_SUBJECTS)) + while (!tlvReader.isEndOfContainer()) { + add(tlvReader.getLong(AnonymousTag)) + } + tlvReader.exitContainer() + } + } else { + tlvReader.getNull(ContextSpecificTag(TAG_SUBJECTS)) + null + } + val targets = + if (!tlvReader.isNull()) { + buildList { + tlvReader.enterList(ContextSpecificTag(TAG_TARGETS)) + while (!tlvReader.isEndOfContainer()) { + add(AccessControlClusterAccessControlTargetStruct.fromTlv(AnonymousTag, tlvReader)) + } + tlvReader.exitContainer() + } + } else { + tlvReader.getNull(ContextSpecificTag(TAG_TARGETS)) + null + } val fabricIndex = tlvReader.getInt(ContextSpecificTag(TAG_FABRIC_INDEX)) - + tlvReader.exitContainer() - return AccessControlClusterAccessControlEntryStruct(privilege, authMode, subjects, targets, fabricIndex) + return AccessControlClusterAccessControlEntryStruct( + privilege, + authMode, + subjects, + targets, + fabricIndex + ) } } } 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 9b832daa283b9f..4a1d95221d816c 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 @@ -17,19 +17,13 @@ package chip.devicecontroller.cluster.structs import chip.devicecontroller.cluster.* -import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag -import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -import java.util.Optional - -class AccessControlClusterAccessControlExtensionStruct ( - val data: ByteArray, - val fabricIndex: Int) { - override fun toString(): String = buildString { +class AccessControlClusterAccessControlExtensionStruct(val data: ByteArray, val fabricIndex: Int) { + override fun toString(): String = buildString { append("AccessControlClusterAccessControlExtensionStruct {\n") append("\tdata : $data\n") append("\tfabricIndex : $fabricIndex\n") @@ -49,11 +43,11 @@ class AccessControlClusterAccessControlExtensionStruct ( private const val TAG_DATA = 1 private const val TAG_FABRIC_INDEX = 254 - fun fromTlv(tag: Tag, tlvReader: TlvReader) : AccessControlClusterAccessControlExtensionStruct { + fun fromTlv(tag: Tag, tlvReader: TlvReader): AccessControlClusterAccessControlExtensionStruct { tlvReader.enterStructure(tag) val data = tlvReader.getByteArray(ContextSpecificTag(TAG_DATA)) val fabricIndex = tlvReader.getInt(ContextSpecificTag(TAG_FABRIC_INDEX)) - + tlvReader.exitContainer() return AccessControlClusterAccessControlExtensionStruct(data, fabricIndex) 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 8070aecfe241b5..e721aa3fefe91d 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 @@ -17,20 +17,17 @@ package chip.devicecontroller.cluster.structs import chip.devicecontroller.cluster.* -import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag -import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -import java.util.Optional - -class AccessControlClusterAccessControlTargetStruct ( - val cluster: Long?, - val endpoint: Int?, - val deviceType: Long?) { - override fun toString(): String = buildString { +class AccessControlClusterAccessControlTargetStruct( + val cluster: Long?, + val endpoint: Int?, + val deviceType: Long? +) { + override fun toString(): String = buildString { append("AccessControlClusterAccessControlTargetStruct {\n") append("\tcluster : $cluster\n") append("\tendpoint : $endpoint\n") @@ -42,20 +39,20 @@ class AccessControlClusterAccessControlTargetStruct ( tlvWriter.apply { startStructure(tag) if (cluster != null) { - put(ContextSpecificTag(TAG_CLUSTER), cluster) - } else { - putNull(ContextSpecificTag(TAG_CLUSTER)) - } + put(ContextSpecificTag(TAG_CLUSTER), cluster) + } else { + putNull(ContextSpecificTag(TAG_CLUSTER)) + } if (endpoint != null) { - put(ContextSpecificTag(TAG_ENDPOINT), endpoint) - } else { - putNull(ContextSpecificTag(TAG_ENDPOINT)) - } + put(ContextSpecificTag(TAG_ENDPOINT), endpoint) + } else { + putNull(ContextSpecificTag(TAG_ENDPOINT)) + } if (deviceType != null) { - put(ContextSpecificTag(TAG_DEVICE_TYPE), deviceType) - } else { - putNull(ContextSpecificTag(TAG_DEVICE_TYPE)) - } + put(ContextSpecificTag(TAG_DEVICE_TYPE), deviceType) + } else { + putNull(ContextSpecificTag(TAG_DEVICE_TYPE)) + } endStructure() } } @@ -65,27 +62,30 @@ class AccessControlClusterAccessControlTargetStruct ( private const val TAG_ENDPOINT = 1 private const val TAG_DEVICE_TYPE = 2 - fun fromTlv(tag: Tag, tlvReader: TlvReader) : AccessControlClusterAccessControlTargetStruct { + fun fromTlv(tag: Tag, tlvReader: TlvReader): AccessControlClusterAccessControlTargetStruct { tlvReader.enterStructure(tag) - val cluster = if (!tlvReader.isNull()) { - tlvReader.getLong(ContextSpecificTag(TAG_CLUSTER)) - } else { - tlvReader.getNull(ContextSpecificTag(TAG_CLUSTER)) - null - } - val endpoint = if (!tlvReader.isNull()) { - tlvReader.getInt(ContextSpecificTag(TAG_ENDPOINT)) - } else { - tlvReader.getNull(ContextSpecificTag(TAG_ENDPOINT)) - null - } - val deviceType = if (!tlvReader.isNull()) { - tlvReader.getLong(ContextSpecificTag(TAG_DEVICE_TYPE)) - } else { - tlvReader.getNull(ContextSpecificTag(TAG_DEVICE_TYPE)) - null - } - + val cluster = + if (!tlvReader.isNull()) { + tlvReader.getLong(ContextSpecificTag(TAG_CLUSTER)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_CLUSTER)) + null + } + val endpoint = + if (!tlvReader.isNull()) { + tlvReader.getInt(ContextSpecificTag(TAG_ENDPOINT)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_ENDPOINT)) + null + } + val deviceType = + if (!tlvReader.isNull()) { + tlvReader.getLong(ContextSpecificTag(TAG_DEVICE_TYPE)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_DEVICE_TYPE)) + null + } + tlvReader.exitContainer() return AccessControlClusterAccessControlTargetStruct(cluster, endpoint, deviceType) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ActionsClusterActionStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ActionsClusterActionStruct.kt index 9dc8c67a270df1..2ed7a3f08152be 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 @@ -17,23 +17,20 @@ package chip.devicecontroller.cluster.structs import chip.devicecontroller.cluster.* -import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag -import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -import java.util.Optional - -class ActionsClusterActionStruct ( - val actionID: Int, - val name: String, - val type: Int, - val endpointListID: Int, - val supportedCommands: Int, - val state: Int) { - override fun toString(): String = buildString { +class ActionsClusterActionStruct( + val actionID: Int, + val name: String, + val type: Int, + val endpointListID: Int, + val supportedCommands: Int, + val state: Int +) { + override fun toString(): String = buildString { append("ActionsClusterActionStruct {\n") append("\tactionID : $actionID\n") append("\tname : $name\n") @@ -65,7 +62,7 @@ class ActionsClusterActionStruct ( private const val TAG_SUPPORTED_COMMANDS = 4 private const val TAG_STATE = 5 - fun fromTlv(tag: Tag, tlvReader: TlvReader) : ActionsClusterActionStruct { + fun fromTlv(tag: Tag, tlvReader: TlvReader): ActionsClusterActionStruct { tlvReader.enterStructure(tag) val actionID = tlvReader.getInt(ContextSpecificTag(TAG_ACTION_I_D)) val name = tlvReader.getString(ContextSpecificTag(TAG_NAME)) @@ -73,10 +70,17 @@ class ActionsClusterActionStruct ( 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)) - + tlvReader.exitContainer() - return ActionsClusterActionStruct(actionID, name, type, endpointListID, supportedCommands, state) + return ActionsClusterActionStruct( + actionID, + name, + type, + endpointListID, + supportedCommands, + state + ) } } } 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 5d46b079c5e9bf..b714e693156957 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 @@ -20,18 +20,16 @@ import chip.devicecontroller.cluster.* import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag -import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -import java.util.Optional - -class ActionsClusterEndpointListStruct ( - val endpointListID: Int, - val name: String, - val type: Int, - val endpoints: List) { - override fun toString(): String = buildString { +class ActionsClusterEndpointListStruct( + val endpointListID: Int, + val name: String, + val type: Int, + val endpoints: List +) { + override fun toString(): String = buildString { append("ActionsClusterEndpointListStruct {\n") append("\tendpointListID : $endpointListID\n") append("\tname : $name\n") @@ -61,19 +59,20 @@ class ActionsClusterEndpointListStruct ( private const val TAG_TYPE = 2 private const val TAG_ENDPOINTS = 3 - fun fromTlv(tag: Tag, tlvReader: TlvReader) : ActionsClusterEndpointListStruct { + fun fromTlv(tag: Tag, tlvReader: TlvReader): ActionsClusterEndpointListStruct { tlvReader.enterStructure(tag) val endpointListID = tlvReader.getInt(ContextSpecificTag(TAG_ENDPOINT_LIST_I_D)) val name = tlvReader.getString(ContextSpecificTag(TAG_NAME)) val type = tlvReader.getInt(ContextSpecificTag(TAG_TYPE)) - val endpoints = buildList { - tlvReader.enterList(ContextSpecificTag(TAG_ENDPOINTS)) - while(!tlvReader.isEndOfContainer()) { - add(tlvReader.getInt(AnonymousTag)) - } - tlvReader.exitContainer() - } - + val endpoints = + buildList { + tlvReader.enterList(ContextSpecificTag(TAG_ENDPOINTS)) + while (!tlvReader.isEndOfContainer()) { + add(tlvReader.getInt(AnonymousTag)) + } + tlvReader.exitContainer() + } + tlvReader.exitContainer() return ActionsClusterEndpointListStruct(endpointListID, name, type, endpoints) 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 f4f298dadf0fcc..68a44d37dfff0f 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 @@ -17,19 +17,16 @@ package chip.devicecontroller.cluster.structs import chip.devicecontroller.cluster.* -import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag -import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -import java.util.Optional - -class ActivatedCarbonFilterMonitoringClusterReplacementProductStruct ( - val productIdentifierType: Int, - val productIdentifierValue: String) { - override fun toString(): String = buildString { +class ActivatedCarbonFilterMonitoringClusterReplacementProductStruct( + val productIdentifierType: Int, + val productIdentifierValue: String +) { + override fun toString(): String = buildString { append("ActivatedCarbonFilterMonitoringClusterReplacementProductStruct {\n") append("\tproductIdentifierType : $productIdentifierType\n") append("\tproductIdentifierValue : $productIdentifierValue\n") @@ -49,14 +46,21 @@ class ActivatedCarbonFilterMonitoringClusterReplacementProductStruct ( private const val TAG_PRODUCT_IDENTIFIER_TYPE = 0 private const val TAG_PRODUCT_IDENTIFIER_VALUE = 1 - fun fromTlv(tag: Tag, tlvReader: TlvReader) : ActivatedCarbonFilterMonitoringClusterReplacementProductStruct { + fun fromTlv( + tag: Tag, + tlvReader: TlvReader + ): ActivatedCarbonFilterMonitoringClusterReplacementProductStruct { tlvReader.enterStructure(tag) val productIdentifierType = tlvReader.getInt(ContextSpecificTag(TAG_PRODUCT_IDENTIFIER_TYPE)) - val productIdentifierValue = tlvReader.getString(ContextSpecificTag(TAG_PRODUCT_IDENTIFIER_VALUE)) - + val productIdentifierValue = + tlvReader.getString(ContextSpecificTag(TAG_PRODUCT_IDENTIFIER_VALUE)) + tlvReader.exitContainer() - return ActivatedCarbonFilterMonitoringClusterReplacementProductStruct(productIdentifierType, productIdentifierValue) + return ActivatedCarbonFilterMonitoringClusterReplacementProductStruct( + productIdentifierType, + productIdentifierValue + ) } } } 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 aa1effe8df43cd..21649a8ecc73df 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 @@ -17,19 +17,16 @@ package chip.devicecontroller.cluster.structs import chip.devicecontroller.cluster.* -import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag -import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -import java.util.Optional - -class ApplicationBasicClusterApplicationStruct ( - val catalogVendorID: Int, - val applicationID: String) { - override fun toString(): String = buildString { +class ApplicationBasicClusterApplicationStruct( + val catalogVendorID: Int, + val applicationID: String +) { + override fun toString(): String = buildString { append("ApplicationBasicClusterApplicationStruct {\n") append("\tcatalogVendorID : $catalogVendorID\n") append("\tapplicationID : $applicationID\n") @@ -49,11 +46,11 @@ 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 { + fun fromTlv(tag: Tag, tlvReader: TlvReader): ApplicationBasicClusterApplicationStruct { tlvReader.enterStructure(tag) val catalogVendorID = tlvReader.getInt(ContextSpecificTag(TAG_CATALOG_VENDOR_I_D)) val applicationID = tlvReader.getString(ContextSpecificTag(TAG_APPLICATION_I_D)) - + tlvReader.exitContainer() return ApplicationBasicClusterApplicationStruct(catalogVendorID, applicationID) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ApplicationLauncherClusterApplicationEPStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ApplicationLauncherClusterApplicationEPStruct.kt index cf701fb6c1a094..f710204737cb52 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 @@ -17,19 +17,17 @@ package chip.devicecontroller.cluster.structs import chip.devicecontroller.cluster.* -import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag -import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter - import java.util.Optional -class ApplicationLauncherClusterApplicationEPStruct ( - val application: ApplicationLauncherClusterApplicationStruct, - val endpoint: Optional) { - override fun toString(): String = buildString { +class ApplicationLauncherClusterApplicationEPStruct( + val application: ApplicationLauncherClusterApplicationStruct, + val endpoint: Optional +) { + override fun toString(): String = buildString { append("ApplicationLauncherClusterApplicationEPStruct {\n") append("\tapplication : $application\n") append("\tendpoint : $endpoint\n") @@ -41,9 +39,9 @@ class ApplicationLauncherClusterApplicationEPStruct ( startStructure(tag) application.toTlv(ContextSpecificTag(TAG_APPLICATION), this) if (endpoint.isPresent) { - val optendpoint = endpoint.get() - put(ContextSpecificTag(TAG_ENDPOINT), optendpoint) - } + val optendpoint = endpoint.get() + put(ContextSpecificTag(TAG_ENDPOINT), optendpoint) + } endStructure() } } @@ -52,15 +50,20 @@ class ApplicationLauncherClusterApplicationEPStruct ( private const val TAG_APPLICATION = 0 private const val TAG_ENDPOINT = 1 - fun fromTlv(tag: Tag, tlvReader: TlvReader) : ApplicationLauncherClusterApplicationEPStruct { + fun fromTlv(tag: Tag, tlvReader: TlvReader): ApplicationLauncherClusterApplicationEPStruct { tlvReader.enterStructure(tag) - val application = ApplicationLauncherClusterApplicationStruct.fromTlv(ContextSpecificTag(TAG_APPLICATION), tlvReader) - val endpoint = if (tlvReader.isNextTag(ContextSpecificTag(TAG_ENDPOINT))) { - Optional.of(tlvReader.getInt(ContextSpecificTag(TAG_ENDPOINT))) - } else { - Optional.empty() - } - + val application = + ApplicationLauncherClusterApplicationStruct.fromTlv( + ContextSpecificTag(TAG_APPLICATION), + tlvReader + ) + val endpoint = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_ENDPOINT))) { + Optional.of(tlvReader.getInt(ContextSpecificTag(TAG_ENDPOINT))) + } else { + Optional.empty() + } + tlvReader.exitContainer() return ApplicationLauncherClusterApplicationEPStruct(application, endpoint) 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 b9b7f772372d19..68e78e31084c04 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 @@ -17,19 +17,16 @@ package chip.devicecontroller.cluster.structs import chip.devicecontroller.cluster.* -import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag -import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -import java.util.Optional - -class ApplicationLauncherClusterApplicationStruct ( - val catalogVendorID: Int, - val applicationID: String) { - override fun toString(): String = buildString { +class ApplicationLauncherClusterApplicationStruct( + val catalogVendorID: Int, + val applicationID: String +) { + override fun toString(): String = buildString { append("ApplicationLauncherClusterApplicationStruct {\n") append("\tcatalogVendorID : $catalogVendorID\n") append("\tapplicationID : $applicationID\n") @@ -49,11 +46,11 @@ 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 { + fun fromTlv(tag: Tag, tlvReader: TlvReader): ApplicationLauncherClusterApplicationStruct { tlvReader.enterStructure(tag) val catalogVendorID = tlvReader.getInt(ContextSpecificTag(TAG_CATALOG_VENDOR_I_D)) val applicationID = tlvReader.getString(ContextSpecificTag(TAG_APPLICATION_I_D)) - + tlvReader.exitContainer() return ApplicationLauncherClusterApplicationStruct(catalogVendorID, applicationID) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/AudioOutputClusterOutputInfoStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/AudioOutputClusterOutputInfoStruct.kt index 028781fa7acfb5..aef8596f19a83c 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 @@ -17,20 +17,13 @@ package chip.devicecontroller.cluster.structs import chip.devicecontroller.cluster.* -import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag -import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -import java.util.Optional - -class AudioOutputClusterOutputInfoStruct ( - val index: Int, - val outputType: Int, - val name: String) { - override fun toString(): String = buildString { +class AudioOutputClusterOutputInfoStruct(val index: Int, val outputType: Int, val name: String) { + override fun toString(): String = buildString { append("AudioOutputClusterOutputInfoStruct {\n") append("\tindex : $index\n") append("\toutputType : $outputType\n") @@ -53,12 +46,12 @@ class AudioOutputClusterOutputInfoStruct ( private const val TAG_OUTPUT_TYPE = 1 private const val TAG_NAME = 2 - fun fromTlv(tag: Tag, tlvReader: TlvReader) : AudioOutputClusterOutputInfoStruct { + 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)) val name = tlvReader.getString(ContextSpecificTag(TAG_NAME)) - + tlvReader.exitContainer() return AudioOutputClusterOutputInfoStruct(index, outputType, name) 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 8a58e9a242ed40..e4f323b6321541 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 @@ -17,19 +17,16 @@ package chip.devicecontroller.cluster.structs import chip.devicecontroller.cluster.* -import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag -import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -import java.util.Optional - -class BasicInformationClusterCapabilityMinimaStruct ( - val caseSessionsPerFabric: Int, - val subscriptionsPerFabric: Int) { - override fun toString(): String = buildString { +class BasicInformationClusterCapabilityMinimaStruct( + val caseSessionsPerFabric: Int, + val subscriptionsPerFabric: Int +) { + override fun toString(): String = buildString { append("BasicInformationClusterCapabilityMinimaStruct {\n") append("\tcaseSessionsPerFabric : $caseSessionsPerFabric\n") append("\tsubscriptionsPerFabric : $subscriptionsPerFabric\n") @@ -49,14 +46,18 @@ 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 { + fun fromTlv(tag: Tag, tlvReader: TlvReader): BasicInformationClusterCapabilityMinimaStruct { tlvReader.enterStructure(tag) val caseSessionsPerFabric = tlvReader.getInt(ContextSpecificTag(TAG_CASE_SESSIONS_PER_FABRIC)) - val subscriptionsPerFabric = tlvReader.getInt(ContextSpecificTag(TAG_SUBSCRIPTIONS_PER_FABRIC)) - + val subscriptionsPerFabric = + tlvReader.getInt(ContextSpecificTag(TAG_SUBSCRIPTIONS_PER_FABRIC)) + tlvReader.exitContainer() - return BasicInformationClusterCapabilityMinimaStruct(caseSessionsPerFabric, subscriptionsPerFabric) + return BasicInformationClusterCapabilityMinimaStruct( + caseSessionsPerFabric, + subscriptionsPerFabric + ) } } } 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 e01685c44e3566..3678494c7b90fb 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 @@ -17,19 +17,13 @@ package chip.devicecontroller.cluster.structs import chip.devicecontroller.cluster.* -import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag -import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -import java.util.Optional - -class BasicInformationClusterProductAppearanceStruct ( - val finish: Int, - val primaryColor: Int?) { - override fun toString(): String = buildString { +class BasicInformationClusterProductAppearanceStruct(val finish: Int, val primaryColor: Int?) { + override fun toString(): String = buildString { append("BasicInformationClusterProductAppearanceStruct {\n") append("\tfinish : $finish\n") append("\tprimaryColor : $primaryColor\n") @@ -41,10 +35,10 @@ class BasicInformationClusterProductAppearanceStruct ( startStructure(tag) put(ContextSpecificTag(TAG_FINISH), finish) if (primaryColor != null) { - put(ContextSpecificTag(TAG_PRIMARY_COLOR), primaryColor) - } else { - putNull(ContextSpecificTag(TAG_PRIMARY_COLOR)) - } + put(ContextSpecificTag(TAG_PRIMARY_COLOR), primaryColor) + } else { + putNull(ContextSpecificTag(TAG_PRIMARY_COLOR)) + } endStructure() } } @@ -53,16 +47,17 @@ class BasicInformationClusterProductAppearanceStruct ( private const val TAG_FINISH = 0 private const val TAG_PRIMARY_COLOR = 1 - fun fromTlv(tag: Tag, tlvReader: TlvReader) : BasicInformationClusterProductAppearanceStruct { + fun fromTlv(tag: Tag, tlvReader: TlvReader): BasicInformationClusterProductAppearanceStruct { tlvReader.enterStructure(tag) val finish = tlvReader.getInt(ContextSpecificTag(TAG_FINISH)) - val primaryColor = if (!tlvReader.isNull()) { - tlvReader.getInt(ContextSpecificTag(TAG_PRIMARY_COLOR)) - } else { - tlvReader.getNull(ContextSpecificTag(TAG_PRIMARY_COLOR)) - null - } - + val primaryColor = + if (!tlvReader.isNull()) { + tlvReader.getInt(ContextSpecificTag(TAG_PRIMARY_COLOR)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_PRIMARY_COLOR)) + null + } + tlvReader.exitContainer() return BasicInformationClusterProductAppearanceStruct(finish, primaryColor) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/BindingClusterTargetStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/BindingClusterTargetStruct.kt index 861ebbd1875f58..8ab0146b8e95f3 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 @@ -17,22 +17,20 @@ package chip.devicecontroller.cluster.structs import chip.devicecontroller.cluster.* -import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag -import chip.tlv.TlvParsingException import chip.tlv.TlvReader 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) { - override fun toString(): String = buildString { +class BindingClusterTargetStruct( + val node: Optional, + val group: Optional, + val endpoint: Optional, + val cluster: Optional, + val fabricIndex: Int +) { + override fun toString(): String = buildString { append("BindingClusterTargetStruct {\n") append("\tnode : $node\n") append("\tgroup : $group\n") @@ -46,21 +44,21 @@ class BindingClusterTargetStruct ( tlvWriter.apply { startStructure(tag) if (node.isPresent) { - val optnode = node.get() - put(ContextSpecificTag(TAG_NODE), optnode) - } + val optnode = node.get() + put(ContextSpecificTag(TAG_NODE), optnode) + } if (group.isPresent) { - val optgroup = group.get() - put(ContextSpecificTag(TAG_GROUP), optgroup) - } + val optgroup = group.get() + put(ContextSpecificTag(TAG_GROUP), optgroup) + } if (endpoint.isPresent) { - val optendpoint = endpoint.get() - put(ContextSpecificTag(TAG_ENDPOINT), optendpoint) - } + val optendpoint = endpoint.get() + put(ContextSpecificTag(TAG_ENDPOINT), optendpoint) + } if (cluster.isPresent) { - val optcluster = cluster.get() - put(ContextSpecificTag(TAG_CLUSTER), optcluster) - } + val optcluster = cluster.get() + put(ContextSpecificTag(TAG_CLUSTER), optcluster) + } put(ContextSpecificTag(TAG_FABRIC_INDEX), fabricIndex) endStructure() } @@ -73,30 +71,34 @@ class BindingClusterTargetStruct ( private const val TAG_CLUSTER = 4 private const val TAG_FABRIC_INDEX = 254 - fun fromTlv(tag: Tag, tlvReader: TlvReader) : BindingClusterTargetStruct { + fun fromTlv(tag: Tag, tlvReader: TlvReader): BindingClusterTargetStruct { tlvReader.enterStructure(tag) - val node = if (tlvReader.isNextTag(ContextSpecificTag(TAG_NODE))) { - Optional.of(tlvReader.getLong(ContextSpecificTag(TAG_NODE))) - } else { - Optional.empty() - } - val group = if (tlvReader.isNextTag(ContextSpecificTag(TAG_GROUP))) { - Optional.of(tlvReader.getInt(ContextSpecificTag(TAG_GROUP))) - } else { - Optional.empty() - } - val endpoint = if (tlvReader.isNextTag(ContextSpecificTag(TAG_ENDPOINT))) { - Optional.of(tlvReader.getInt(ContextSpecificTag(TAG_ENDPOINT))) - } else { - Optional.empty() - } - val cluster = if (tlvReader.isNextTag(ContextSpecificTag(TAG_CLUSTER))) { - Optional.of(tlvReader.getLong(ContextSpecificTag(TAG_CLUSTER))) - } else { - Optional.empty() - } + val node = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_NODE))) { + Optional.of(tlvReader.getLong(ContextSpecificTag(TAG_NODE))) + } else { + Optional.empty() + } + val group = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_GROUP))) { + Optional.of(tlvReader.getInt(ContextSpecificTag(TAG_GROUP))) + } else { + Optional.empty() + } + val endpoint = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_ENDPOINT))) { + Optional.of(tlvReader.getInt(ContextSpecificTag(TAG_ENDPOINT))) + } else { + Optional.empty() + } + val cluster = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_CLUSTER))) { + Optional.of(tlvReader.getLong(ContextSpecificTag(TAG_CLUSTER))) + } else { + Optional.empty() + } val fabricIndex = tlvReader.getInt(ContextSpecificTag(TAG_FABRIC_INDEX)) - + tlvReader.exitContainer() return BindingClusterTargetStruct(node, group, endpoint, cluster, fabricIndex) 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 778935a86e9455..d1426bc0828631 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 @@ -17,19 +17,16 @@ package chip.devicecontroller.cluster.structs import chip.devicecontroller.cluster.* -import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag -import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -import java.util.Optional - -class BridgedDeviceBasicInformationClusterProductAppearanceStruct ( - val finish: Int, - val primaryColor: Int?) { - override fun toString(): String = buildString { +class BridgedDeviceBasicInformationClusterProductAppearanceStruct( + val finish: Int, + val primaryColor: Int? +) { + override fun toString(): String = buildString { append("BridgedDeviceBasicInformationClusterProductAppearanceStruct {\n") append("\tfinish : $finish\n") append("\tprimaryColor : $primaryColor\n") @@ -41,10 +38,10 @@ class BridgedDeviceBasicInformationClusterProductAppearanceStruct ( startStructure(tag) put(ContextSpecificTag(TAG_FINISH), finish) if (primaryColor != null) { - put(ContextSpecificTag(TAG_PRIMARY_COLOR), primaryColor) - } else { - putNull(ContextSpecificTag(TAG_PRIMARY_COLOR)) - } + put(ContextSpecificTag(TAG_PRIMARY_COLOR), primaryColor) + } else { + putNull(ContextSpecificTag(TAG_PRIMARY_COLOR)) + } endStructure() } } @@ -53,16 +50,20 @@ class BridgedDeviceBasicInformationClusterProductAppearanceStruct ( private const val TAG_FINISH = 0 private const val TAG_PRIMARY_COLOR = 1 - fun fromTlv(tag: Tag, tlvReader: TlvReader) : BridgedDeviceBasicInformationClusterProductAppearanceStruct { + fun fromTlv( + tag: Tag, + tlvReader: TlvReader + ): BridgedDeviceBasicInformationClusterProductAppearanceStruct { tlvReader.enterStructure(tag) val finish = tlvReader.getInt(ContextSpecificTag(TAG_FINISH)) - val primaryColor = if (!tlvReader.isNull()) { - tlvReader.getInt(ContextSpecificTag(TAG_PRIMARY_COLOR)) - } else { - tlvReader.getNull(ContextSpecificTag(TAG_PRIMARY_COLOR)) - null - } - + val primaryColor = + if (!tlvReader.isNull()) { + tlvReader.getInt(ContextSpecificTag(TAG_PRIMARY_COLOR)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_PRIMARY_COLOR)) + null + } + tlvReader.exitContainer() return BridgedDeviceBasicInformationClusterProductAppearanceStruct(finish, primaryColor) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ChannelClusterChannelInfoStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ChannelClusterChannelInfoStruct.kt index acfddff56c75cb..9d10bf6f24e5fa 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 @@ -17,22 +17,20 @@ package chip.devicecontroller.cluster.structs import chip.devicecontroller.cluster.* -import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag -import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter - import java.util.Optional -class ChannelClusterChannelInfoStruct ( - val majorNumber: Int, - val minorNumber: Int, - val name: Optional, - val callSign: Optional, - val affiliateCallSign: Optional) { - override fun toString(): String = buildString { +class ChannelClusterChannelInfoStruct( + val majorNumber: Int, + val minorNumber: Int, + val name: Optional, + val callSign: Optional, + val affiliateCallSign: Optional +) { + override fun toString(): String = buildString { append("ChannelClusterChannelInfoStruct {\n") append("\tmajorNumber : $majorNumber\n") append("\tminorNumber : $minorNumber\n") @@ -48,17 +46,17 @@ class ChannelClusterChannelInfoStruct ( put(ContextSpecificTag(TAG_MAJOR_NUMBER), majorNumber) put(ContextSpecificTag(TAG_MINOR_NUMBER), minorNumber) if (name.isPresent) { - val optname = name.get() - put(ContextSpecificTag(TAG_NAME), optname) - } + val optname = name.get() + put(ContextSpecificTag(TAG_NAME), optname) + } if (callSign.isPresent) { - val optcallSign = callSign.get() - put(ContextSpecificTag(TAG_CALL_SIGN), optcallSign) - } + val optcallSign = callSign.get() + put(ContextSpecificTag(TAG_CALL_SIGN), optcallSign) + } if (affiliateCallSign.isPresent) { - val optaffiliateCallSign = affiliateCallSign.get() - put(ContextSpecificTag(TAG_AFFILIATE_CALL_SIGN), optaffiliateCallSign) - } + val optaffiliateCallSign = affiliateCallSign.get() + put(ContextSpecificTag(TAG_AFFILIATE_CALL_SIGN), optaffiliateCallSign) + } endStructure() } } @@ -70,29 +68,38 @@ class ChannelClusterChannelInfoStruct ( private const val TAG_CALL_SIGN = 3 private const val TAG_AFFILIATE_CALL_SIGN = 4 - fun fromTlv(tag: Tag, tlvReader: TlvReader) : ChannelClusterChannelInfoStruct { + 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)) - val name = if (tlvReader.isNextTag(ContextSpecificTag(TAG_NAME))) { - Optional.of(tlvReader.getString(ContextSpecificTag(TAG_NAME))) - } else { - Optional.empty() - } - val callSign = if (tlvReader.isNextTag(ContextSpecificTag(TAG_CALL_SIGN))) { - Optional.of(tlvReader.getString(ContextSpecificTag(TAG_CALL_SIGN))) - } else { - Optional.empty() - } - val affiliateCallSign = if (tlvReader.isNextTag(ContextSpecificTag(TAG_AFFILIATE_CALL_SIGN))) { - Optional.of(tlvReader.getString(ContextSpecificTag(TAG_AFFILIATE_CALL_SIGN))) - } else { - Optional.empty() - } - + val name = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_NAME))) { + Optional.of(tlvReader.getString(ContextSpecificTag(TAG_NAME))) + } else { + Optional.empty() + } + val callSign = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_CALL_SIGN))) { + Optional.of(tlvReader.getString(ContextSpecificTag(TAG_CALL_SIGN))) + } else { + Optional.empty() + } + val affiliateCallSign = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_AFFILIATE_CALL_SIGN))) { + Optional.of(tlvReader.getString(ContextSpecificTag(TAG_AFFILIATE_CALL_SIGN))) + } else { + Optional.empty() + } + tlvReader.exitContainer() - return ChannelClusterChannelInfoStruct(majorNumber, minorNumber, name, callSign, affiliateCallSign) + return ChannelClusterChannelInfoStruct( + majorNumber, + minorNumber, + name, + callSign, + affiliateCallSign + ) } } } 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 0010ae68479954..edc8f9157db120 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 @@ -17,21 +17,19 @@ package chip.devicecontroller.cluster.structs import chip.devicecontroller.cluster.* -import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag -import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter - import java.util.Optional -class ChannelClusterLineupInfoStruct ( - val operatorName: String, - val lineupName: Optional, - val postalCode: Optional, - val lineupInfoType: Int) { - override fun toString(): String = buildString { +class ChannelClusterLineupInfoStruct( + val operatorName: String, + val lineupName: Optional, + val postalCode: Optional, + val lineupInfoType: Int +) { + override fun toString(): String = buildString { append("ChannelClusterLineupInfoStruct {\n") append("\toperatorName : $operatorName\n") append("\tlineupName : $lineupName\n") @@ -45,13 +43,13 @@ class ChannelClusterLineupInfoStruct ( startStructure(tag) put(ContextSpecificTag(TAG_OPERATOR_NAME), operatorName) if (lineupName.isPresent) { - val optlineupName = lineupName.get() - put(ContextSpecificTag(TAG_LINEUP_NAME), optlineupName) - } + val optlineupName = lineupName.get() + put(ContextSpecificTag(TAG_LINEUP_NAME), optlineupName) + } if (postalCode.isPresent) { - val optpostalCode = postalCode.get() - put(ContextSpecificTag(TAG_POSTAL_CODE), optpostalCode) - } + val optpostalCode = postalCode.get() + put(ContextSpecificTag(TAG_POSTAL_CODE), optpostalCode) + } put(ContextSpecificTag(TAG_LINEUP_INFO_TYPE), lineupInfoType) endStructure() } @@ -63,21 +61,23 @@ class ChannelClusterLineupInfoStruct ( private const val TAG_POSTAL_CODE = 2 private const val TAG_LINEUP_INFO_TYPE = 3 - fun fromTlv(tag: Tag, tlvReader: TlvReader) : ChannelClusterLineupInfoStruct { + fun fromTlv(tag: Tag, tlvReader: TlvReader): ChannelClusterLineupInfoStruct { tlvReader.enterStructure(tag) val operatorName = tlvReader.getString(ContextSpecificTag(TAG_OPERATOR_NAME)) - val lineupName = if (tlvReader.isNextTag(ContextSpecificTag(TAG_LINEUP_NAME))) { - Optional.of(tlvReader.getString(ContextSpecificTag(TAG_LINEUP_NAME))) - } else { - Optional.empty() - } - val postalCode = if (tlvReader.isNextTag(ContextSpecificTag(TAG_POSTAL_CODE))) { - Optional.of(tlvReader.getString(ContextSpecificTag(TAG_POSTAL_CODE))) - } else { - Optional.empty() - } + val lineupName = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_LINEUP_NAME))) { + Optional.of(tlvReader.getString(ContextSpecificTag(TAG_LINEUP_NAME))) + } else { + Optional.empty() + } + val postalCode = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_POSTAL_CODE))) { + Optional.of(tlvReader.getString(ContextSpecificTag(TAG_POSTAL_CODE))) + } else { + Optional.empty() + } val lineupInfoType = tlvReader.getInt(ContextSpecificTag(TAG_LINEUP_INFO_TYPE)) - + tlvReader.exitContainer() return ChannelClusterLineupInfoStruct(operatorName, lineupName, postalCode, lineupInfoType) 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 0e54edff044225..0e1ebee9f97df2 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 @@ -17,19 +17,13 @@ package chip.devicecontroller.cluster.structs import chip.devicecontroller.cluster.* -import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag -import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -import java.util.Optional - -class ContentLauncherClusterAdditionalInfoStruct ( - val name: String, - val value: String) { - override fun toString(): String = buildString { +class ContentLauncherClusterAdditionalInfoStruct(val name: String, val value: String) { + override fun toString(): String = buildString { append("ContentLauncherClusterAdditionalInfoStruct {\n") append("\tname : $name\n") append("\tvalue : $value\n") @@ -49,11 +43,11 @@ class ContentLauncherClusterAdditionalInfoStruct ( private const val TAG_NAME = 0 private const val TAG_VALUE = 1 - fun fromTlv(tag: Tag, tlvReader: TlvReader) : ContentLauncherClusterAdditionalInfoStruct { + fun fromTlv(tag: Tag, tlvReader: TlvReader): ContentLauncherClusterAdditionalInfoStruct { tlvReader.enterStructure(tag) val name = tlvReader.getString(ContextSpecificTag(TAG_NAME)) val value = tlvReader.getString(ContextSpecificTag(TAG_VALUE)) - + tlvReader.exitContainer() return ContentLauncherClusterAdditionalInfoStruct(name, value) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ContentLauncherClusterBrandingInformationStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ContentLauncherClusterBrandingInformationStruct.kt index 993719fc427de5..5f4719e9c00ef8 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 @@ -17,23 +17,21 @@ package chip.devicecontroller.cluster.structs import chip.devicecontroller.cluster.* -import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag -import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter - import java.util.Optional -class ContentLauncherClusterBrandingInformationStruct ( - val providerName: String, - val background: Optional, - val logo: Optional, - val progressBar: Optional, - val splash: Optional, - val waterMark: Optional) { - override fun toString(): String = buildString { +class ContentLauncherClusterBrandingInformationStruct( + val providerName: String, + val background: Optional, + val logo: Optional, + val progressBar: Optional, + val splash: Optional, + val waterMark: Optional +) { + override fun toString(): String = buildString { append("ContentLauncherClusterBrandingInformationStruct {\n") append("\tproviderName : $providerName\n") append("\tbackground : $background\n") @@ -49,25 +47,25 @@ class ContentLauncherClusterBrandingInformationStruct ( startStructure(tag) put(ContextSpecificTag(TAG_PROVIDER_NAME), providerName) if (background.isPresent) { - val optbackground = background.get() - optbackground.toTlv(ContextSpecificTag(TAG_BACKGROUND), this) - } + val optbackground = background.get() + optbackground.toTlv(ContextSpecificTag(TAG_BACKGROUND), this) + } if (logo.isPresent) { - val optlogo = logo.get() - optlogo.toTlv(ContextSpecificTag(TAG_LOGO), this) - } + val optlogo = logo.get() + optlogo.toTlv(ContextSpecificTag(TAG_LOGO), this) + } if (progressBar.isPresent) { - val optprogressBar = progressBar.get() - optprogressBar.toTlv(ContextSpecificTag(TAG_PROGRESS_BAR), this) - } + val optprogressBar = progressBar.get() + optprogressBar.toTlv(ContextSpecificTag(TAG_PROGRESS_BAR), this) + } if (splash.isPresent) { - val optsplash = splash.get() - optsplash.toTlv(ContextSpecificTag(TAG_SPLASH), this) - } + val optsplash = splash.get() + optsplash.toTlv(ContextSpecificTag(TAG_SPLASH), this) + } if (waterMark.isPresent) { - val optwaterMark = waterMark.get() - optwaterMark.toTlv(ContextSpecificTag(TAG_WATER_MARK), this) - } + val optwaterMark = waterMark.get() + optwaterMark.toTlv(ContextSpecificTag(TAG_WATER_MARK), this) + } endStructure() } } @@ -80,38 +78,75 @@ class ContentLauncherClusterBrandingInformationStruct ( private const val TAG_SPLASH = 4 private const val TAG_WATER_MARK = 5 - fun fromTlv(tag: Tag, tlvReader: TlvReader) : ContentLauncherClusterBrandingInformationStruct { + fun fromTlv(tag: Tag, tlvReader: TlvReader): ContentLauncherClusterBrandingInformationStruct { tlvReader.enterStructure(tag) val providerName = tlvReader.getString(ContextSpecificTag(TAG_PROVIDER_NAME)) - val background = if (tlvReader.isNextTag(ContextSpecificTag(TAG_BACKGROUND))) { - Optional.of(ContentLauncherClusterStyleInformationStruct.fromTlv(ContextSpecificTag(TAG_BACKGROUND), tlvReader)) - } else { - Optional.empty() - } - val logo = if (tlvReader.isNextTag(ContextSpecificTag(TAG_LOGO))) { - Optional.of(ContentLauncherClusterStyleInformationStruct.fromTlv(ContextSpecificTag(TAG_LOGO), tlvReader)) - } else { - Optional.empty() - } - val progressBar = if (tlvReader.isNextTag(ContextSpecificTag(TAG_PROGRESS_BAR))) { - Optional.of(ContentLauncherClusterStyleInformationStruct.fromTlv(ContextSpecificTag(TAG_PROGRESS_BAR), tlvReader)) - } else { - Optional.empty() - } - val splash = if (tlvReader.isNextTag(ContextSpecificTag(TAG_SPLASH))) { - Optional.of(ContentLauncherClusterStyleInformationStruct.fromTlv(ContextSpecificTag(TAG_SPLASH), tlvReader)) - } else { - Optional.empty() - } - val waterMark = if (tlvReader.isNextTag(ContextSpecificTag(TAG_WATER_MARK))) { - Optional.of(ContentLauncherClusterStyleInformationStruct.fromTlv(ContextSpecificTag(TAG_WATER_MARK), tlvReader)) - } else { - Optional.empty() - } - + val background = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_BACKGROUND))) { + Optional.of( + ContentLauncherClusterStyleInformationStruct.fromTlv( + ContextSpecificTag(TAG_BACKGROUND), + tlvReader + ) + ) + } else { + Optional.empty() + } + val logo = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_LOGO))) { + Optional.of( + ContentLauncherClusterStyleInformationStruct.fromTlv( + ContextSpecificTag(TAG_LOGO), + tlvReader + ) + ) + } else { + Optional.empty() + } + val progressBar = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_PROGRESS_BAR))) { + Optional.of( + ContentLauncherClusterStyleInformationStruct.fromTlv( + ContextSpecificTag(TAG_PROGRESS_BAR), + tlvReader + ) + ) + } else { + Optional.empty() + } + val splash = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_SPLASH))) { + Optional.of( + ContentLauncherClusterStyleInformationStruct.fromTlv( + ContextSpecificTag(TAG_SPLASH), + tlvReader + ) + ) + } else { + Optional.empty() + } + val waterMark = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_WATER_MARK))) { + Optional.of( + ContentLauncherClusterStyleInformationStruct.fromTlv( + ContextSpecificTag(TAG_WATER_MARK), + tlvReader + ) + ) + } else { + Optional.empty() + } + tlvReader.exitContainer() - return ContentLauncherClusterBrandingInformationStruct(providerName, background, logo, progressBar, splash, waterMark) + return ContentLauncherClusterBrandingInformationStruct( + providerName, + background, + logo, + progressBar, + splash, + waterMark + ) } } } 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 b3b713ba8e8079..9457b03907a4fb 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 @@ -20,15 +20,13 @@ import chip.devicecontroller.cluster.* import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag -import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -import java.util.Optional - -class ContentLauncherClusterContentSearchStruct ( - val parameterList: List) { - override fun toString(): String = buildString { +class ContentLauncherClusterContentSearchStruct( + val parameterList: List +) { + override fun toString(): String = buildString { append("ContentLauncherClusterContentSearchStruct {\n") append("\tparameterList : $parameterList\n") append("}\n") @@ -49,16 +47,17 @@ class ContentLauncherClusterContentSearchStruct ( companion object { private const val TAG_PARAMETER_LIST = 0 - fun fromTlv(tag: Tag, tlvReader: TlvReader) : ContentLauncherClusterContentSearchStruct { + fun fromTlv(tag: Tag, tlvReader: TlvReader): ContentLauncherClusterContentSearchStruct { tlvReader.enterStructure(tag) - val parameterList = buildList { - tlvReader.enterList(ContextSpecificTag(TAG_PARAMETER_LIST)) - while(!tlvReader.isEndOfContainer()) { - add(ContentLauncherClusterParameterStruct.fromTlv(AnonymousTag, tlvReader)) - } - tlvReader.exitContainer() - } - + val parameterList = + buildList { + tlvReader.enterList(ContextSpecificTag(TAG_PARAMETER_LIST)) + while (!tlvReader.isEndOfContainer()) { + add(ContentLauncherClusterParameterStruct.fromTlv(AnonymousTag, tlvReader)) + } + tlvReader.exitContainer() + } + tlvReader.exitContainer() return ContentLauncherClusterContentSearchStruct(parameterList) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ContentLauncherClusterDimensionStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ContentLauncherClusterDimensionStruct.kt index 2bf3ed85bae436..a38245918bb476 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 @@ -17,20 +17,17 @@ package chip.devicecontroller.cluster.structs import chip.devicecontroller.cluster.* -import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag -import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -import java.util.Optional - -class ContentLauncherClusterDimensionStruct ( - val width: Double, - val height: Double, - val metric: Int) { - override fun toString(): String = buildString { +class ContentLauncherClusterDimensionStruct( + val width: Double, + val height: Double, + val metric: Int +) { + override fun toString(): String = buildString { append("ContentLauncherClusterDimensionStruct {\n") append("\twidth : $width\n") append("\theight : $height\n") @@ -53,12 +50,12 @@ class ContentLauncherClusterDimensionStruct ( private const val TAG_HEIGHT = 1 private const val TAG_METRIC = 2 - fun fromTlv(tag: Tag, tlvReader: TlvReader) : ContentLauncherClusterDimensionStruct { + fun fromTlv(tag: Tag, tlvReader: TlvReader): ContentLauncherClusterDimensionStruct { tlvReader.enterStructure(tag) val width = tlvReader.getDouble(ContextSpecificTag(TAG_WIDTH)) val height = tlvReader.getDouble(ContextSpecificTag(TAG_HEIGHT)) val metric = tlvReader.getInt(ContextSpecificTag(TAG_METRIC)) - + tlvReader.exitContainer() return ContentLauncherClusterDimensionStruct(width, height, metric) 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 19f4e650b0615b..caf0f99848c93c 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 @@ -20,17 +20,16 @@ import chip.devicecontroller.cluster.* import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag -import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter - import java.util.Optional -class ContentLauncherClusterParameterStruct ( - val type: Int, - val value: String, - val externalIDList: Optional>) { - override fun toString(): String = buildString { +class ContentLauncherClusterParameterStruct( + val type: Int, + val value: String, + val externalIDList: Optional> +) { + override fun toString(): String = buildString { append("ContentLauncherClusterParameterStruct {\n") append("\ttype : $type\n") append("\tvalue : $value\n") @@ -44,13 +43,13 @@ class ContentLauncherClusterParameterStruct ( put(ContextSpecificTag(TAG_TYPE), type) put(ContextSpecificTag(TAG_VALUE), value) if (externalIDList.isPresent) { - val optexternalIDList = externalIDList.get() - startList(ContextSpecificTag(TAG_EXTERNAL_I_D_LIST)) - for (item in optexternalIDList.iterator()) { - item.toTlv(AnonymousTag, this) + val optexternalIDList = externalIDList.get() + startList(ContextSpecificTag(TAG_EXTERNAL_I_D_LIST)) + for (item in optexternalIDList.iterator()) { + item.toTlv(AnonymousTag, this) + } + endList() } - endList() - } endStructure() } } @@ -60,22 +59,25 @@ class ContentLauncherClusterParameterStruct ( private const val TAG_VALUE = 1 private const val TAG_EXTERNAL_I_D_LIST = 2 - fun fromTlv(tag: Tag, tlvReader: TlvReader) : ContentLauncherClusterParameterStruct { + fun fromTlv(tag: Tag, tlvReader: TlvReader): ContentLauncherClusterParameterStruct { tlvReader.enterStructure(tag) val type = tlvReader.getInt(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)) - while(!tlvReader.isEndOfContainer()) { - add(ContentLauncherClusterAdditionalInfoStruct.fromTlv(AnonymousTag, tlvReader)) - } - tlvReader.exitContainer() - }) - } else { - Optional.empty() - } - + val externalIDList = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_EXTERNAL_I_D_LIST))) { + Optional.of( + buildList { + tlvReader.enterList(ContextSpecificTag(TAG_EXTERNAL_I_D_LIST)) + while (!tlvReader.isEndOfContainer()) { + add(ContentLauncherClusterAdditionalInfoStruct.fromTlv(AnonymousTag, tlvReader)) + } + tlvReader.exitContainer() + } + ) + } else { + Optional.empty() + } + tlvReader.exitContainer() return ContentLauncherClusterParameterStruct(type, value, externalIDList) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ContentLauncherClusterStyleInformationStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ContentLauncherClusterStyleInformationStruct.kt index b9f2044614dd71..d5e686bbb5ac45 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 @@ -17,20 +17,18 @@ package chip.devicecontroller.cluster.structs import chip.devicecontroller.cluster.* -import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag -import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter - import java.util.Optional -class ContentLauncherClusterStyleInformationStruct ( - val imageURL: Optional, - val color: Optional, - val size: Optional) { - override fun toString(): String = buildString { +class ContentLauncherClusterStyleInformationStruct( + val imageURL: Optional, + val color: Optional, + val size: Optional +) { + override fun toString(): String = buildString { append("ContentLauncherClusterStyleInformationStruct {\n") append("\timageURL : $imageURL\n") append("\tcolor : $color\n") @@ -42,17 +40,17 @@ class ContentLauncherClusterStyleInformationStruct ( tlvWriter.apply { startStructure(tag) if (imageURL.isPresent) { - val optimageURL = imageURL.get() - put(ContextSpecificTag(TAG_IMAGE_U_R_L), optimageURL) - } + val optimageURL = imageURL.get() + put(ContextSpecificTag(TAG_IMAGE_U_R_L), optimageURL) + } if (color.isPresent) { - val optcolor = color.get() - put(ContextSpecificTag(TAG_COLOR), optcolor) - } + val optcolor = color.get() + put(ContextSpecificTag(TAG_COLOR), optcolor) + } if (size.isPresent) { - val optsize = size.get() - optsize.toTlv(ContextSpecificTag(TAG_SIZE), this) - } + val optsize = size.get() + optsize.toTlv(ContextSpecificTag(TAG_SIZE), this) + } endStructure() } } @@ -62,24 +60,29 @@ class ContentLauncherClusterStyleInformationStruct ( private const val TAG_COLOR = 1 private const val TAG_SIZE = 2 - fun fromTlv(tag: Tag, tlvReader: TlvReader) : ContentLauncherClusterStyleInformationStruct { + fun fromTlv(tag: Tag, tlvReader: TlvReader): ContentLauncherClusterStyleInformationStruct { tlvReader.enterStructure(tag) - val imageURL = if (tlvReader.isNextTag(ContextSpecificTag(TAG_IMAGE_U_R_L))) { - Optional.of(tlvReader.getString(ContextSpecificTag(TAG_IMAGE_U_R_L))) - } else { - Optional.empty() - } - val color = if (tlvReader.isNextTag(ContextSpecificTag(TAG_COLOR))) { - Optional.of(tlvReader.getString(ContextSpecificTag(TAG_COLOR))) - } else { - Optional.empty() - } - val size = if (tlvReader.isNextTag(ContextSpecificTag(TAG_SIZE))) { - Optional.of(ContentLauncherClusterDimensionStruct.fromTlv(ContextSpecificTag(TAG_SIZE), tlvReader)) - } else { - Optional.empty() - } - + val imageURL = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_IMAGE_U_R_L))) { + Optional.of(tlvReader.getString(ContextSpecificTag(TAG_IMAGE_U_R_L))) + } else { + Optional.empty() + } + val color = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_COLOR))) { + Optional.of(tlvReader.getString(ContextSpecificTag(TAG_COLOR))) + } else { + Optional.empty() + } + val size = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_SIZE))) { + Optional.of( + ContentLauncherClusterDimensionStruct.fromTlv(ContextSpecificTag(TAG_SIZE), tlvReader) + ) + } else { + Optional.empty() + } + tlvReader.exitContainer() return ContentLauncherClusterStyleInformationStruct(imageURL, color, size) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/DescriptorClusterDeviceTypeStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/DescriptorClusterDeviceTypeStruct.kt index d76de77105ded9..75fed36957e726 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 @@ -17,19 +17,13 @@ package chip.devicecontroller.cluster.structs import chip.devicecontroller.cluster.* -import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag -import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -import java.util.Optional - -class DescriptorClusterDeviceTypeStruct ( - val deviceType: Long, - val revision: Int) { - override fun toString(): String = buildString { +class DescriptorClusterDeviceTypeStruct(val deviceType: Long, val revision: Int) { + override fun toString(): String = buildString { append("DescriptorClusterDeviceTypeStruct {\n") append("\tdeviceType : $deviceType\n") append("\trevision : $revision\n") @@ -49,11 +43,11 @@ class DescriptorClusterDeviceTypeStruct ( private const val TAG_DEVICE_TYPE = 0 private const val TAG_REVISION = 1 - fun fromTlv(tag: Tag, tlvReader: TlvReader) : DescriptorClusterDeviceTypeStruct { + 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)) - + tlvReader.exitContainer() return DescriptorClusterDeviceTypeStruct(deviceType, revision) 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 8c5fc527b8a5e5..abde881ccffcea 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 @@ -17,21 +17,19 @@ package chip.devicecontroller.cluster.structs import chip.devicecontroller.cluster.* -import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag -import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter - import java.util.Optional -class DescriptorClusterSemanticTagStruct ( - val mfgCode: Int?, - val namespaceID: Int, - val tag: Int, - val label: Optional?) { - override fun toString(): String = buildString { +class DescriptorClusterSemanticTagStruct( + val mfgCode: Int?, + val namespaceID: Int, + val tag: Int, + val label: Optional? +) { + override fun toString(): String = buildString { append("DescriptorClusterSemanticTagStruct {\n") append("\tmfgCode : $mfgCode\n") append("\tnamespaceID : $namespaceID\n") @@ -44,20 +42,20 @@ class DescriptorClusterSemanticTagStruct ( tlvWriter.apply { startStructure(tag) if (mfgCode != null) { - put(ContextSpecificTag(TAG_MFG_CODE), mfgCode) - } else { - putNull(ContextSpecificTag(TAG_MFG_CODE)) - } + put(ContextSpecificTag(TAG_MFG_CODE), mfgCode) + } else { + putNull(ContextSpecificTag(TAG_MFG_CODE)) + } put(ContextSpecificTag(TAG_NAMESPACE_I_D), namespaceID) put(ContextSpecificTag(TAG_TAG), tag) if (label != null) { - if (label.isPresent) { - val optlabel = label.get() - put(ContextSpecificTag(TAG_LABEL), optlabel) - } - } else { - putNull(ContextSpecificTag(TAG_LABEL)) - } + if (label.isPresent) { + val optlabel = label.get() + put(ContextSpecificTag(TAG_LABEL), optlabel) + } + } else { + putNull(ContextSpecificTag(TAG_LABEL)) + } endStructure() } } @@ -68,27 +66,29 @@ class DescriptorClusterSemanticTagStruct ( private const val TAG_TAG = 2 private const val TAG_LABEL = 3 - fun fromTlv(tag: Tag, tlvReader: TlvReader) : DescriptorClusterSemanticTagStruct { + fun fromTlv(tag: Tag, tlvReader: TlvReader): DescriptorClusterSemanticTagStruct { tlvReader.enterStructure(tag) - val mfgCode = if (!tlvReader.isNull()) { - tlvReader.getInt(ContextSpecificTag(TAG_MFG_CODE)) - } else { - tlvReader.getNull(ContextSpecificTag(TAG_MFG_CODE)) - null - } + val mfgCode = + if (!tlvReader.isNull()) { + tlvReader.getInt(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 label = if (!tlvReader.isNull()) { - if (tlvReader.isNextTag(ContextSpecificTag(TAG_LABEL))) { - Optional.of(tlvReader.getString(ContextSpecificTag(TAG_LABEL))) - } else { - Optional.empty() - } - } else { - tlvReader.getNull(ContextSpecificTag(TAG_LABEL)) - null - } - + val label = + if (!tlvReader.isNull()) { + if (tlvReader.isNextTag(ContextSpecificTag(TAG_LABEL))) { + Optional.of(tlvReader.getString(ContextSpecificTag(TAG_LABEL))) + } else { + Optional.empty() + } + } else { + tlvReader.getNull(ContextSpecificTag(TAG_LABEL)) + null + } + tlvReader.exitContainer() return DescriptorClusterSemanticTagStruct(mfgCode, namespaceID, tag, label) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/DishwasherModeClusterModeOptionStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/DishwasherModeClusterModeOptionStruct.kt index d7004fbfc53590..423d6a554672ce 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 @@ -20,17 +20,15 @@ import chip.devicecontroller.cluster.* import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag -import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -import java.util.Optional - -class DishwasherModeClusterModeOptionStruct ( - val label: String, - val mode: Int, - val modeTags: List) { - override fun toString(): String = buildString { +class DishwasherModeClusterModeOptionStruct( + val label: String, + val mode: Int, + val modeTags: List +) { + override fun toString(): String = buildString { append("DishwasherModeClusterModeOptionStruct {\n") append("\tlabel : $label\n") append("\tmode : $mode\n") @@ -57,18 +55,19 @@ class DishwasherModeClusterModeOptionStruct ( private const val TAG_MODE = 1 private const val TAG_MODE_TAGS = 2 - fun fromTlv(tag: Tag, tlvReader: TlvReader) : DishwasherModeClusterModeOptionStruct { + fun fromTlv(tag: Tag, tlvReader: TlvReader): DishwasherModeClusterModeOptionStruct { tlvReader.enterStructure(tag) val label = tlvReader.getString(ContextSpecificTag(TAG_LABEL)) val mode = tlvReader.getInt(ContextSpecificTag(TAG_MODE)) - val modeTags = buildList { - tlvReader.enterList(ContextSpecificTag(TAG_MODE_TAGS)) - while(!tlvReader.isEndOfContainer()) { - add(DishwasherModeClusterModeTagStruct.fromTlv(AnonymousTag, tlvReader)) - } - tlvReader.exitContainer() - } - + val modeTags = + buildList { + tlvReader.enterList(ContextSpecificTag(TAG_MODE_TAGS)) + while (!tlvReader.isEndOfContainer()) { + add(DishwasherModeClusterModeTagStruct.fromTlv(AnonymousTag, tlvReader)) + } + tlvReader.exitContainer() + } + tlvReader.exitContainer() return DishwasherModeClusterModeOptionStruct(label, mode, modeTags) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/DishwasherModeClusterModeTagStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/DishwasherModeClusterModeTagStruct.kt index 110964c9ed2cf6..33881f4ac00c8d 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 @@ -17,19 +17,14 @@ package chip.devicecontroller.cluster.structs import chip.devicecontroller.cluster.* -import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag -import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter - import java.util.Optional -class DishwasherModeClusterModeTagStruct ( - val mfgCode: Optional, - val value: Int) { - override fun toString(): String = buildString { +class DishwasherModeClusterModeTagStruct(val mfgCode: Optional, val value: Int) { + override fun toString(): String = buildString { append("DishwasherModeClusterModeTagStruct {\n") append("\tmfgCode : $mfgCode\n") append("\tvalue : $value\n") @@ -40,9 +35,9 @@ class DishwasherModeClusterModeTagStruct ( tlvWriter.apply { startStructure(tag) if (mfgCode.isPresent) { - val optmfgCode = mfgCode.get() - put(ContextSpecificTag(TAG_MFG_CODE), optmfgCode) - } + val optmfgCode = mfgCode.get() + put(ContextSpecificTag(TAG_MFG_CODE), optmfgCode) + } put(ContextSpecificTag(TAG_VALUE), value) endStructure() } @@ -52,15 +47,16 @@ class DishwasherModeClusterModeTagStruct ( private const val TAG_MFG_CODE = 0 private const val TAG_VALUE = 1 - fun fromTlv(tag: Tag, tlvReader: TlvReader) : DishwasherModeClusterModeTagStruct { + fun fromTlv(tag: Tag, tlvReader: TlvReader): DishwasherModeClusterModeTagStruct { tlvReader.enterStructure(tag) - val mfgCode = if (tlvReader.isNextTag(ContextSpecificTag(TAG_MFG_CODE))) { - Optional.of(tlvReader.getInt(ContextSpecificTag(TAG_MFG_CODE))) - } else { - Optional.empty() - } + val mfgCode = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_MFG_CODE))) { + Optional.of(tlvReader.getInt(ContextSpecificTag(TAG_MFG_CODE))) + } else { + Optional.empty() + } val value = tlvReader.getInt(ContextSpecificTag(TAG_VALUE)) - + tlvReader.exitContainer() return DishwasherModeClusterModeTagStruct(mfgCode, value) 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 de3654516fc946..da3a551267eb09 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 @@ -17,19 +17,13 @@ package chip.devicecontroller.cluster.structs import chip.devicecontroller.cluster.* -import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag -import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -import java.util.Optional - -class DoorLockClusterCredentialStruct ( - val credentialType: Int, - val credentialIndex: Int) { - override fun toString(): String = buildString { +class DoorLockClusterCredentialStruct(val credentialType: Int, val credentialIndex: Int) { + override fun toString(): String = buildString { append("DoorLockClusterCredentialStruct {\n") append("\tcredentialType : $credentialType\n") append("\tcredentialIndex : $credentialIndex\n") @@ -49,11 +43,11 @@ class DoorLockClusterCredentialStruct ( private const val TAG_CREDENTIAL_TYPE = 0 private const val TAG_CREDENTIAL_INDEX = 1 - fun fromTlv(tag: Tag, tlvReader: TlvReader) : DoorLockClusterCredentialStruct { + 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)) - + tlvReader.exitContainer() return DoorLockClusterCredentialStruct(credentialType, credentialIndex) 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 16567ccab1ce30..09292f726d9467 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 @@ -17,19 +17,13 @@ package chip.devicecontroller.cluster.structs import chip.devicecontroller.cluster.* -import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag -import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -import java.util.Optional - -class FixedLabelClusterLabelStruct ( - val label: String, - val value: String) { - override fun toString(): String = buildString { +class FixedLabelClusterLabelStruct(val label: String, val value: String) { + override fun toString(): String = buildString { append("FixedLabelClusterLabelStruct {\n") append("\tlabel : $label\n") append("\tvalue : $value\n") @@ -49,11 +43,11 @@ class FixedLabelClusterLabelStruct ( private const val TAG_LABEL = 0 private const val TAG_VALUE = 1 - fun fromTlv(tag: Tag, tlvReader: TlvReader) : FixedLabelClusterLabelStruct { + fun fromTlv(tag: Tag, tlvReader: TlvReader): FixedLabelClusterLabelStruct { tlvReader.enterStructure(tag) val label = tlvReader.getString(ContextSpecificTag(TAG_LABEL)) val value = tlvReader.getString(ContextSpecificTag(TAG_VALUE)) - + tlvReader.exitContainer() return FixedLabelClusterLabelStruct(label, value) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/GeneralCommissioningClusterBasicCommissioningInfo.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/GeneralCommissioningClusterBasicCommissioningInfo.kt index 2153c5ea32fc7d..60d10b41112a9d 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 @@ -17,19 +17,16 @@ package chip.devicecontroller.cluster.structs import chip.devicecontroller.cluster.* -import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag -import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -import java.util.Optional - -class GeneralCommissioningClusterBasicCommissioningInfo ( - val failSafeExpiryLengthSeconds: Int, - val maxCumulativeFailsafeSeconds: Int) { - override fun toString(): String = buildString { +class GeneralCommissioningClusterBasicCommissioningInfo( + val failSafeExpiryLengthSeconds: Int, + val maxCumulativeFailsafeSeconds: Int +) { + override fun toString(): String = buildString { append("GeneralCommissioningClusterBasicCommissioningInfo {\n") append("\tfailSafeExpiryLengthSeconds : $failSafeExpiryLengthSeconds\n") append("\tmaxCumulativeFailsafeSeconds : $maxCumulativeFailsafeSeconds\n") @@ -49,14 +46,19 @@ 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 { + fun fromTlv(tag: Tag, tlvReader: TlvReader): GeneralCommissioningClusterBasicCommissioningInfo { tlvReader.enterStructure(tag) - val failSafeExpiryLengthSeconds = tlvReader.getInt(ContextSpecificTag(TAG_FAIL_SAFE_EXPIRY_LENGTH_SECONDS)) - val maxCumulativeFailsafeSeconds = tlvReader.getInt(ContextSpecificTag(TAG_MAX_CUMULATIVE_FAILSAFE_SECONDS)) - + val failSafeExpiryLengthSeconds = + tlvReader.getInt(ContextSpecificTag(TAG_FAIL_SAFE_EXPIRY_LENGTH_SECONDS)) + val maxCumulativeFailsafeSeconds = + tlvReader.getInt(ContextSpecificTag(TAG_MAX_CUMULATIVE_FAILSAFE_SECONDS)) + tlvReader.exitContainer() - return GeneralCommissioningClusterBasicCommissioningInfo(failSafeExpiryLengthSeconds, maxCumulativeFailsafeSeconds) + return GeneralCommissioningClusterBasicCommissioningInfo( + failSafeExpiryLengthSeconds, + maxCumulativeFailsafeSeconds + ) } } } 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 2813b085912e48..d4ff313520e65e 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 @@ -20,22 +20,20 @@ import chip.devicecontroller.cluster.* import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag -import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -import java.util.Optional - -class GeneralDiagnosticsClusterNetworkInterface ( - val name: String, - val isOperational: Boolean, - val offPremiseServicesReachableIPv4: Boolean?, - val offPremiseServicesReachableIPv6: Boolean?, - val hardwareAddress: ByteArray, - val IPv4Addresses: List, - val IPv6Addresses: List, - val type: Int) { - override fun toString(): String = buildString { +class GeneralDiagnosticsClusterNetworkInterface( + val name: String, + val isOperational: Boolean, + val offPremiseServicesReachableIPv4: Boolean?, + val offPremiseServicesReachableIPv6: Boolean?, + val hardwareAddress: ByteArray, + val IPv4Addresses: List, + val IPv6Addresses: List, + val type: Int +) { + override fun toString(): String = buildString { append("GeneralDiagnosticsClusterNetworkInterface {\n") append("\tname : $name\n") append("\tisOperational : $isOperational\n") @@ -54,15 +52,21 @@ class GeneralDiagnosticsClusterNetworkInterface ( put(ContextSpecificTag(TAG_NAME), name) put(ContextSpecificTag(TAG_IS_OPERATIONAL), isOperational) if (offPremiseServicesReachableIPv4 != null) { - put(ContextSpecificTag(TAG_OFF_PREMISE_SERVICES_REACHABLE_I_PV4), offPremiseServicesReachableIPv4) - } else { - putNull(ContextSpecificTag(TAG_OFF_PREMISE_SERVICES_REACHABLE_I_PV4)) - } + put( + ContextSpecificTag(TAG_OFF_PREMISE_SERVICES_REACHABLE_I_PV4), + offPremiseServicesReachableIPv4 + ) + } else { + putNull(ContextSpecificTag(TAG_OFF_PREMISE_SERVICES_REACHABLE_I_PV4)) + } if (offPremiseServicesReachableIPv6 != null) { - put(ContextSpecificTag(TAG_OFF_PREMISE_SERVICES_REACHABLE_I_PV6), offPremiseServicesReachableIPv6) - } else { - putNull(ContextSpecificTag(TAG_OFF_PREMISE_SERVICES_REACHABLE_I_PV6)) - } + put( + ContextSpecificTag(TAG_OFF_PREMISE_SERVICES_REACHABLE_I_PV6), + offPremiseServicesReachableIPv6 + ) + } else { + putNull(ContextSpecificTag(TAG_OFF_PREMISE_SERVICES_REACHABLE_I_PV6)) + } put(ContextSpecificTag(TAG_HARDWARE_ADDRESS), hardwareAddress) startList(ContextSpecificTag(TAG_I_PV4_ADDRESSES)) for (item in IPv4Addresses.iterator()) { @@ -89,42 +93,55 @@ class GeneralDiagnosticsClusterNetworkInterface ( private const val TAG_I_PV6_ADDRESSES = 6 private const val TAG_TYPE = 7 - fun fromTlv(tag: Tag, tlvReader: TlvReader) : GeneralDiagnosticsClusterNetworkInterface { + fun fromTlv(tag: Tag, tlvReader: TlvReader): GeneralDiagnosticsClusterNetworkInterface { tlvReader.enterStructure(tag) val name = tlvReader.getString(ContextSpecificTag(TAG_NAME)) val isOperational = tlvReader.getBoolean(ContextSpecificTag(TAG_IS_OPERATIONAL)) - val offPremiseServicesReachableIPv4 = if (!tlvReader.isNull()) { - tlvReader.getBoolean(ContextSpecificTag(TAG_OFF_PREMISE_SERVICES_REACHABLE_I_PV4)) - } else { - tlvReader.getNull(ContextSpecificTag(TAG_OFF_PREMISE_SERVICES_REACHABLE_I_PV4)) - null - } - val offPremiseServicesReachableIPv6 = if (!tlvReader.isNull()) { - tlvReader.getBoolean(ContextSpecificTag(TAG_OFF_PREMISE_SERVICES_REACHABLE_I_PV6)) - } else { - tlvReader.getNull(ContextSpecificTag(TAG_OFF_PREMISE_SERVICES_REACHABLE_I_PV6)) - null - } + val offPremiseServicesReachableIPv4 = + if (!tlvReader.isNull()) { + tlvReader.getBoolean(ContextSpecificTag(TAG_OFF_PREMISE_SERVICES_REACHABLE_I_PV4)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_OFF_PREMISE_SERVICES_REACHABLE_I_PV4)) + null + } + val offPremiseServicesReachableIPv6 = + if (!tlvReader.isNull()) { + tlvReader.getBoolean(ContextSpecificTag(TAG_OFF_PREMISE_SERVICES_REACHABLE_I_PV6)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_OFF_PREMISE_SERVICES_REACHABLE_I_PV6)) + null + } val hardwareAddress = tlvReader.getByteArray(ContextSpecificTag(TAG_HARDWARE_ADDRESS)) - val IPv4Addresses = buildList { - tlvReader.enterList(ContextSpecificTag(TAG_I_PV4_ADDRESSES)) - while(!tlvReader.isEndOfContainer()) { - add(tlvReader.getByteArray(AnonymousTag)) - } - tlvReader.exitContainer() - } - val IPv6Addresses = buildList { - tlvReader.enterList(ContextSpecificTag(TAG_I_PV6_ADDRESSES)) - while(!tlvReader.isEndOfContainer()) { - add(tlvReader.getByteArray(AnonymousTag)) - } - tlvReader.exitContainer() - } + val IPv4Addresses = + buildList { + tlvReader.enterList(ContextSpecificTag(TAG_I_PV4_ADDRESSES)) + while (!tlvReader.isEndOfContainer()) { + add(tlvReader.getByteArray(AnonymousTag)) + } + tlvReader.exitContainer() + } + val IPv6Addresses = + buildList { + tlvReader.enterList(ContextSpecificTag(TAG_I_PV6_ADDRESSES)) + while (!tlvReader.isEndOfContainer()) { + add(tlvReader.getByteArray(AnonymousTag)) + } + tlvReader.exitContainer() + } val type = tlvReader.getInt(ContextSpecificTag(TAG_TYPE)) - + tlvReader.exitContainer() - return GeneralDiagnosticsClusterNetworkInterface(name, isOperational, offPremiseServicesReachableIPv4, offPremiseServicesReachableIPv6, hardwareAddress, IPv4Addresses, IPv6Addresses, type) + return GeneralDiagnosticsClusterNetworkInterface( + name, + isOperational, + offPremiseServicesReachableIPv4, + offPremiseServicesReachableIPv6, + hardwareAddress, + IPv4Addresses, + IPv6Addresses, + type + ) } } } 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 c6ecaa9eb20014..6038b55d345b75 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 @@ -20,18 +20,17 @@ import chip.devicecontroller.cluster.* import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag -import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter - import java.util.Optional -class GroupKeyManagementClusterGroupInfoMapStruct ( - val groupId: Int, - val endpoints: List, - val groupName: Optional, - val fabricIndex: Int) { - override fun toString(): String = buildString { +class GroupKeyManagementClusterGroupInfoMapStruct( + val groupId: Int, + val endpoints: List, + val groupName: Optional, + val fabricIndex: Int +) { + override fun toString(): String = buildString { append("GroupKeyManagementClusterGroupInfoMapStruct {\n") append("\tgroupId : $groupId\n") append("\tendpoints : $endpoints\n") @@ -50,9 +49,9 @@ class GroupKeyManagementClusterGroupInfoMapStruct ( } endList() if (groupName.isPresent) { - val optgroupName = groupName.get() - put(ContextSpecificTag(TAG_GROUP_NAME), optgroupName) - } + val optgroupName = groupName.get() + put(ContextSpecificTag(TAG_GROUP_NAME), optgroupName) + } put(ContextSpecificTag(TAG_FABRIC_INDEX), fabricIndex) endStructure() } @@ -64,23 +63,25 @@ class GroupKeyManagementClusterGroupInfoMapStruct ( private const val TAG_GROUP_NAME = 3 private const val TAG_FABRIC_INDEX = 254 - fun fromTlv(tag: Tag, tlvReader: TlvReader) : GroupKeyManagementClusterGroupInfoMapStruct { + fun fromTlv(tag: Tag, tlvReader: TlvReader): GroupKeyManagementClusterGroupInfoMapStruct { tlvReader.enterStructure(tag) val groupId = tlvReader.getInt(ContextSpecificTag(TAG_GROUP_ID)) - val endpoints = buildList { - tlvReader.enterList(ContextSpecificTag(TAG_ENDPOINTS)) - while(!tlvReader.isEndOfContainer()) { - add(tlvReader.getInt(AnonymousTag)) - } - tlvReader.exitContainer() - } - val groupName = if (tlvReader.isNextTag(ContextSpecificTag(TAG_GROUP_NAME))) { - Optional.of(tlvReader.getString(ContextSpecificTag(TAG_GROUP_NAME))) - } else { - Optional.empty() - } + val endpoints = + buildList { + tlvReader.enterList(ContextSpecificTag(TAG_ENDPOINTS)) + while (!tlvReader.isEndOfContainer()) { + add(tlvReader.getInt(AnonymousTag)) + } + tlvReader.exitContainer() + } + val groupName = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_GROUP_NAME))) { + Optional.of(tlvReader.getString(ContextSpecificTag(TAG_GROUP_NAME))) + } else { + Optional.empty() + } val fabricIndex = tlvReader.getInt(ContextSpecificTag(TAG_FABRIC_INDEX)) - + tlvReader.exitContainer() return GroupKeyManagementClusterGroupInfoMapStruct(groupId, endpoints, groupName, fabricIndex) 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 8e692ad743b3c1..d565d70233abc2 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 @@ -17,20 +17,17 @@ package chip.devicecontroller.cluster.structs import chip.devicecontroller.cluster.* -import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag -import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -import java.util.Optional - -class GroupKeyManagementClusterGroupKeyMapStruct ( - val groupId: Int, - val groupKeySetID: Int, - val fabricIndex: Int) { - override fun toString(): String = buildString { +class GroupKeyManagementClusterGroupKeyMapStruct( + val groupId: Int, + val groupKeySetID: Int, + val fabricIndex: Int +) { + override fun toString(): String = buildString { append("GroupKeyManagementClusterGroupKeyMapStruct {\n") append("\tgroupId : $groupId\n") append("\tgroupKeySetID : $groupKeySetID\n") @@ -53,12 +50,12 @@ 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 { + 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)) - + tlvReader.exitContainer() return GroupKeyManagementClusterGroupKeyMapStruct(groupId, groupKeySetID, fabricIndex) 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 0af577bdf3cdce..418b6037ae46c9 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 @@ -17,25 +17,22 @@ package chip.devicecontroller.cluster.structs import chip.devicecontroller.cluster.* -import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag -import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -import java.util.Optional - -class GroupKeyManagementClusterGroupKeySetStruct ( - val groupKeySetID: Int, - val groupKeySecurityPolicy: Int, - val epochKey0: ByteArray?, - val epochStartTime0: Long?, - val epochKey1: ByteArray?, - val epochStartTime1: Long?, - val epochKey2: ByteArray?, - val epochStartTime2: Long?) { - override fun toString(): String = buildString { +class GroupKeyManagementClusterGroupKeySetStruct( + val groupKeySetID: Int, + val groupKeySecurityPolicy: Int, + val epochKey0: ByteArray?, + val epochStartTime0: Long?, + val epochKey1: ByteArray?, + val epochStartTime1: Long?, + val epochKey2: ByteArray?, + val epochStartTime2: Long? +) { + override fun toString(): String = buildString { append("GroupKeyManagementClusterGroupKeySetStruct {\n") append("\tgroupKeySetID : $groupKeySetID\n") append("\tgroupKeySecurityPolicy : $groupKeySecurityPolicy\n") @@ -54,35 +51,35 @@ class GroupKeyManagementClusterGroupKeySetStruct ( put(ContextSpecificTag(TAG_GROUP_KEY_SET_I_D), groupKeySetID) put(ContextSpecificTag(TAG_GROUP_KEY_SECURITY_POLICY), groupKeySecurityPolicy) if (epochKey0 != null) { - put(ContextSpecificTag(TAG_EPOCH_KEY0), epochKey0) - } else { - putNull(ContextSpecificTag(TAG_EPOCH_KEY0)) - } + put(ContextSpecificTag(TAG_EPOCH_KEY0), epochKey0) + } else { + putNull(ContextSpecificTag(TAG_EPOCH_KEY0)) + } if (epochStartTime0 != null) { - put(ContextSpecificTag(TAG_EPOCH_START_TIME0), epochStartTime0) - } else { - putNull(ContextSpecificTag(TAG_EPOCH_START_TIME0)) - } + put(ContextSpecificTag(TAG_EPOCH_START_TIME0), epochStartTime0) + } else { + putNull(ContextSpecificTag(TAG_EPOCH_START_TIME0)) + } if (epochKey1 != null) { - put(ContextSpecificTag(TAG_EPOCH_KEY1), epochKey1) - } else { - putNull(ContextSpecificTag(TAG_EPOCH_KEY1)) - } + put(ContextSpecificTag(TAG_EPOCH_KEY1), epochKey1) + } else { + putNull(ContextSpecificTag(TAG_EPOCH_KEY1)) + } if (epochStartTime1 != null) { - put(ContextSpecificTag(TAG_EPOCH_START_TIME1), epochStartTime1) - } else { - putNull(ContextSpecificTag(TAG_EPOCH_START_TIME1)) - } + put(ContextSpecificTag(TAG_EPOCH_START_TIME1), epochStartTime1) + } else { + putNull(ContextSpecificTag(TAG_EPOCH_START_TIME1)) + } if (epochKey2 != null) { - put(ContextSpecificTag(TAG_EPOCH_KEY2), epochKey2) - } else { - putNull(ContextSpecificTag(TAG_EPOCH_KEY2)) - } + put(ContextSpecificTag(TAG_EPOCH_KEY2), epochKey2) + } else { + putNull(ContextSpecificTag(TAG_EPOCH_KEY2)) + } if (epochStartTime2 != null) { - put(ContextSpecificTag(TAG_EPOCH_START_TIME2), epochStartTime2) - } else { - putNull(ContextSpecificTag(TAG_EPOCH_START_TIME2)) - } + put(ContextSpecificTag(TAG_EPOCH_START_TIME2), epochStartTime2) + } else { + putNull(ContextSpecificTag(TAG_EPOCH_START_TIME2)) + } endStructure() } } @@ -97,50 +94,66 @@ class GroupKeyManagementClusterGroupKeySetStruct ( private const val TAG_EPOCH_KEY2 = 6 private const val TAG_EPOCH_START_TIME2 = 7 - fun fromTlv(tag: Tag, tlvReader: TlvReader) : GroupKeyManagementClusterGroupKeySetStruct { + fun fromTlv(tag: Tag, tlvReader: TlvReader): GroupKeyManagementClusterGroupKeySetStruct { tlvReader.enterStructure(tag) val groupKeySetID = tlvReader.getInt(ContextSpecificTag(TAG_GROUP_KEY_SET_I_D)) - val groupKeySecurityPolicy = tlvReader.getInt(ContextSpecificTag(TAG_GROUP_KEY_SECURITY_POLICY)) - val epochKey0 = if (!tlvReader.isNull()) { - tlvReader.getByteArray(ContextSpecificTag(TAG_EPOCH_KEY0)) - } else { - tlvReader.getNull(ContextSpecificTag(TAG_EPOCH_KEY0)) - null - } - val epochStartTime0 = if (!tlvReader.isNull()) { - tlvReader.getLong(ContextSpecificTag(TAG_EPOCH_START_TIME0)) - } else { - tlvReader.getNull(ContextSpecificTag(TAG_EPOCH_START_TIME0)) - null - } - val epochKey1 = if (!tlvReader.isNull()) { - tlvReader.getByteArray(ContextSpecificTag(TAG_EPOCH_KEY1)) - } else { - tlvReader.getNull(ContextSpecificTag(TAG_EPOCH_KEY1)) - null - } - val epochStartTime1 = if (!tlvReader.isNull()) { - tlvReader.getLong(ContextSpecificTag(TAG_EPOCH_START_TIME1)) - } else { - tlvReader.getNull(ContextSpecificTag(TAG_EPOCH_START_TIME1)) - null - } - val epochKey2 = if (!tlvReader.isNull()) { - tlvReader.getByteArray(ContextSpecificTag(TAG_EPOCH_KEY2)) - } else { - tlvReader.getNull(ContextSpecificTag(TAG_EPOCH_KEY2)) - null - } - val epochStartTime2 = if (!tlvReader.isNull()) { - tlvReader.getLong(ContextSpecificTag(TAG_EPOCH_START_TIME2)) - } else { - tlvReader.getNull(ContextSpecificTag(TAG_EPOCH_START_TIME2)) - null - } - + val groupKeySecurityPolicy = + tlvReader.getInt(ContextSpecificTag(TAG_GROUP_KEY_SECURITY_POLICY)) + val epochKey0 = + if (!tlvReader.isNull()) { + tlvReader.getByteArray(ContextSpecificTag(TAG_EPOCH_KEY0)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_EPOCH_KEY0)) + null + } + val epochStartTime0 = + if (!tlvReader.isNull()) { + tlvReader.getLong(ContextSpecificTag(TAG_EPOCH_START_TIME0)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_EPOCH_START_TIME0)) + null + } + val epochKey1 = + if (!tlvReader.isNull()) { + tlvReader.getByteArray(ContextSpecificTag(TAG_EPOCH_KEY1)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_EPOCH_KEY1)) + null + } + val epochStartTime1 = + if (!tlvReader.isNull()) { + tlvReader.getLong(ContextSpecificTag(TAG_EPOCH_START_TIME1)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_EPOCH_START_TIME1)) + null + } + val epochKey2 = + if (!tlvReader.isNull()) { + tlvReader.getByteArray(ContextSpecificTag(TAG_EPOCH_KEY2)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_EPOCH_KEY2)) + null + } + val epochStartTime2 = + if (!tlvReader.isNull()) { + tlvReader.getLong(ContextSpecificTag(TAG_EPOCH_START_TIME2)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_EPOCH_START_TIME2)) + null + } + tlvReader.exitContainer() - return GroupKeyManagementClusterGroupKeySetStruct(groupKeySetID, groupKeySecurityPolicy, epochKey0, epochStartTime0, epochKey1, epochStartTime1, epochKey2, epochStartTime2) + return GroupKeyManagementClusterGroupKeySetStruct( + groupKeySetID, + groupKeySecurityPolicy, + epochKey0, + epochStartTime0, + epochKey1, + epochStartTime1, + epochKey2, + epochStartTime2 + ) } } } 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 9ecba7669d8e6f..a86ba8db2dee0a 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 @@ -17,19 +17,16 @@ package chip.devicecontroller.cluster.structs import chip.devicecontroller.cluster.* -import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag -import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -import java.util.Optional - -class HepaFilterMonitoringClusterReplacementProductStruct ( - val productIdentifierType: Int, - val productIdentifierValue: String) { - override fun toString(): String = buildString { +class HepaFilterMonitoringClusterReplacementProductStruct( + val productIdentifierType: Int, + val productIdentifierValue: String +) { + override fun toString(): String = buildString { append("HepaFilterMonitoringClusterReplacementProductStruct {\n") append("\tproductIdentifierType : $productIdentifierType\n") append("\tproductIdentifierValue : $productIdentifierValue\n") @@ -49,14 +46,21 @@ class HepaFilterMonitoringClusterReplacementProductStruct ( private const val TAG_PRODUCT_IDENTIFIER_TYPE = 0 private const val TAG_PRODUCT_IDENTIFIER_VALUE = 1 - fun fromTlv(tag: Tag, tlvReader: TlvReader) : HepaFilterMonitoringClusterReplacementProductStruct { + fun fromTlv( + tag: Tag, + tlvReader: TlvReader + ): HepaFilterMonitoringClusterReplacementProductStruct { tlvReader.enterStructure(tag) val productIdentifierType = tlvReader.getInt(ContextSpecificTag(TAG_PRODUCT_IDENTIFIER_TYPE)) - val productIdentifierValue = tlvReader.getString(ContextSpecificTag(TAG_PRODUCT_IDENTIFIER_VALUE)) - + val productIdentifierValue = + tlvReader.getString(ContextSpecificTag(TAG_PRODUCT_IDENTIFIER_VALUE)) + tlvReader.exitContainer() - return HepaFilterMonitoringClusterReplacementProductStruct(productIdentifierType, productIdentifierValue) + return HepaFilterMonitoringClusterReplacementProductStruct( + productIdentifierType, + productIdentifierValue + ) } } } 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 ebef1ce2ce74a7..d380689bed016f 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 @@ -17,21 +17,18 @@ package chip.devicecontroller.cluster.structs import chip.devicecontroller.cluster.* -import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag -import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -import java.util.Optional - -class IcdManagementClusterMonitoringRegistrationStruct ( - val checkInNodeID: Long, - val monitoredSubject: Long, - val key: ByteArray, - val fabricIndex: Int) { - override fun toString(): String = buildString { +class IcdManagementClusterMonitoringRegistrationStruct( + val checkInNodeID: Long, + val monitoredSubject: Long, + val key: ByteArray, + val fabricIndex: Int +) { + override fun toString(): String = buildString { append("IcdManagementClusterMonitoringRegistrationStruct {\n") append("\tcheckInNodeID : $checkInNodeID\n") append("\tmonitoredSubject : $monitoredSubject\n") @@ -57,16 +54,21 @@ class IcdManagementClusterMonitoringRegistrationStruct ( private const val TAG_KEY = 3 private const val TAG_FABRIC_INDEX = 254 - fun fromTlv(tag: Tag, tlvReader: TlvReader) : IcdManagementClusterMonitoringRegistrationStruct { + 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)) val key = tlvReader.getByteArray(ContextSpecificTag(TAG_KEY)) val fabricIndex = tlvReader.getInt(ContextSpecificTag(TAG_FABRIC_INDEX)) - + tlvReader.exitContainer() - return IcdManagementClusterMonitoringRegistrationStruct(checkInNodeID, monitoredSubject, key, fabricIndex) + return IcdManagementClusterMonitoringRegistrationStruct( + checkInNodeID, + monitoredSubject, + key, + fabricIndex + ) } } } 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 91f733b2bf8edd..eeab9e95eb7cce 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 @@ -20,17 +20,15 @@ import chip.devicecontroller.cluster.* import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag -import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -import java.util.Optional - -class LaundryWasherModeClusterModeOptionStruct ( - val label: String, - val mode: Int, - val modeTags: List) { - override fun toString(): String = buildString { +class LaundryWasherModeClusterModeOptionStruct( + val label: String, + val mode: Int, + val modeTags: List +) { + override fun toString(): String = buildString { append("LaundryWasherModeClusterModeOptionStruct {\n") append("\tlabel : $label\n") append("\tmode : $mode\n") @@ -57,18 +55,19 @@ class LaundryWasherModeClusterModeOptionStruct ( private const val TAG_MODE = 1 private const val TAG_MODE_TAGS = 2 - fun fromTlv(tag: Tag, tlvReader: TlvReader) : LaundryWasherModeClusterModeOptionStruct { + fun fromTlv(tag: Tag, tlvReader: TlvReader): LaundryWasherModeClusterModeOptionStruct { tlvReader.enterStructure(tag) val label = tlvReader.getString(ContextSpecificTag(TAG_LABEL)) val mode = tlvReader.getInt(ContextSpecificTag(TAG_MODE)) - val modeTags = buildList { - tlvReader.enterList(ContextSpecificTag(TAG_MODE_TAGS)) - while(!tlvReader.isEndOfContainer()) { - add(LaundryWasherModeClusterModeTagStruct.fromTlv(AnonymousTag, tlvReader)) - } - tlvReader.exitContainer() - } - + val modeTags = + buildList { + tlvReader.enterList(ContextSpecificTag(TAG_MODE_TAGS)) + while (!tlvReader.isEndOfContainer()) { + add(LaundryWasherModeClusterModeTagStruct.fromTlv(AnonymousTag, tlvReader)) + } + tlvReader.exitContainer() + } + tlvReader.exitContainer() return LaundryWasherModeClusterModeOptionStruct(label, mode, modeTags) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/LaundryWasherModeClusterModeTagStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/LaundryWasherModeClusterModeTagStruct.kt index 06685de8506c7d..eed09912c26a9c 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 @@ -17,19 +17,14 @@ package chip.devicecontroller.cluster.structs import chip.devicecontroller.cluster.* -import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag -import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter - import java.util.Optional -class LaundryWasherModeClusterModeTagStruct ( - val mfgCode: Optional, - val value: Int) { - override fun toString(): String = buildString { +class LaundryWasherModeClusterModeTagStruct(val mfgCode: Optional, val value: Int) { + override fun toString(): String = buildString { append("LaundryWasherModeClusterModeTagStruct {\n") append("\tmfgCode : $mfgCode\n") append("\tvalue : $value\n") @@ -40,9 +35,9 @@ class LaundryWasherModeClusterModeTagStruct ( tlvWriter.apply { startStructure(tag) if (mfgCode.isPresent) { - val optmfgCode = mfgCode.get() - put(ContextSpecificTag(TAG_MFG_CODE), optmfgCode) - } + val optmfgCode = mfgCode.get() + put(ContextSpecificTag(TAG_MFG_CODE), optmfgCode) + } put(ContextSpecificTag(TAG_VALUE), value) endStructure() } @@ -52,15 +47,16 @@ class LaundryWasherModeClusterModeTagStruct ( private const val TAG_MFG_CODE = 0 private const val TAG_VALUE = 1 - fun fromTlv(tag: Tag, tlvReader: TlvReader) : LaundryWasherModeClusterModeTagStruct { + fun fromTlv(tag: Tag, tlvReader: TlvReader): LaundryWasherModeClusterModeTagStruct { tlvReader.enterStructure(tag) - val mfgCode = if (tlvReader.isNextTag(ContextSpecificTag(TAG_MFG_CODE))) { - Optional.of(tlvReader.getInt(ContextSpecificTag(TAG_MFG_CODE))) - } else { - Optional.empty() - } + val mfgCode = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_MFG_CODE))) { + Optional.of(tlvReader.getInt(ContextSpecificTag(TAG_MFG_CODE))) + } else { + Optional.empty() + } val value = tlvReader.getInt(ContextSpecificTag(TAG_VALUE)) - + tlvReader.exitContainer() return LaundryWasherModeClusterModeTagStruct(mfgCode, value) 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 7be50d0dbc9ad3..514c05d19f6fdf 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 @@ -17,21 +17,18 @@ package chip.devicecontroller.cluster.structs import chip.devicecontroller.cluster.* -import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag -import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -import java.util.Optional - -class MediaInputClusterInputInfoStruct ( - val index: Int, - val inputType: Int, - val name: String, - val description: String) { - override fun toString(): String = buildString { +class MediaInputClusterInputInfoStruct( + val index: Int, + val inputType: Int, + val name: String, + val description: String +) { + override fun toString(): String = buildString { append("MediaInputClusterInputInfoStruct {\n") append("\tindex : $index\n") append("\tinputType : $inputType\n") @@ -57,13 +54,13 @@ class MediaInputClusterInputInfoStruct ( private const val TAG_NAME = 2 private const val TAG_DESCRIPTION = 3 - fun fromTlv(tag: Tag, tlvReader: TlvReader) : MediaInputClusterInputInfoStruct { + 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)) val name = tlvReader.getString(ContextSpecificTag(TAG_NAME)) val description = tlvReader.getString(ContextSpecificTag(TAG_DESCRIPTION)) - + tlvReader.exitContainer() return MediaInputClusterInputInfoStruct(index, inputType, name, description) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/MediaPlaybackClusterPlaybackPositionStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/MediaPlaybackClusterPlaybackPositionStruct.kt index 6b6e8cfcf12403..d452d083a73112 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 @@ -17,19 +17,13 @@ package chip.devicecontroller.cluster.structs import chip.devicecontroller.cluster.* -import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag -import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -import java.util.Optional - -class MediaPlaybackClusterPlaybackPositionStruct ( - val updatedAt: Long, - val position: Long?) { - override fun toString(): String = buildString { +class MediaPlaybackClusterPlaybackPositionStruct(val updatedAt: Long, val position: Long?) { + override fun toString(): String = buildString { append("MediaPlaybackClusterPlaybackPositionStruct {\n") append("\tupdatedAt : $updatedAt\n") append("\tposition : $position\n") @@ -41,10 +35,10 @@ class MediaPlaybackClusterPlaybackPositionStruct ( startStructure(tag) put(ContextSpecificTag(TAG_UPDATED_AT), updatedAt) if (position != null) { - put(ContextSpecificTag(TAG_POSITION), position) - } else { - putNull(ContextSpecificTag(TAG_POSITION)) - } + put(ContextSpecificTag(TAG_POSITION), position) + } else { + putNull(ContextSpecificTag(TAG_POSITION)) + } endStructure() } } @@ -53,16 +47,17 @@ class MediaPlaybackClusterPlaybackPositionStruct ( private const val TAG_UPDATED_AT = 0 private const val TAG_POSITION = 1 - fun fromTlv(tag: Tag, tlvReader: TlvReader) : MediaPlaybackClusterPlaybackPositionStruct { + fun fromTlv(tag: Tag, tlvReader: TlvReader): MediaPlaybackClusterPlaybackPositionStruct { tlvReader.enterStructure(tag) val updatedAt = tlvReader.getLong(ContextSpecificTag(TAG_UPDATED_AT)) - val position = if (!tlvReader.isNull()) { - tlvReader.getLong(ContextSpecificTag(TAG_POSITION)) - } else { - tlvReader.getNull(ContextSpecificTag(TAG_POSITION)) - null - } - + val position = + if (!tlvReader.isNull()) { + tlvReader.getLong(ContextSpecificTag(TAG_POSITION)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_POSITION)) + null + } + tlvReader.exitContainer() return MediaPlaybackClusterPlaybackPositionStruct(updatedAt, position) 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 eacbd43215cc6c..ac95817519112f 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 @@ -20,17 +20,15 @@ import chip.devicecontroller.cluster.* import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag -import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -import java.util.Optional - -class ModeSelectClusterModeOptionStruct ( - val label: String, - val mode: Int, - val semanticTags: List) { - override fun toString(): String = buildString { +class ModeSelectClusterModeOptionStruct( + val label: String, + val mode: Int, + val semanticTags: List +) { + override fun toString(): String = buildString { append("ModeSelectClusterModeOptionStruct {\n") append("\tlabel : $label\n") append("\tmode : $mode\n") @@ -57,18 +55,19 @@ class ModeSelectClusterModeOptionStruct ( private const val TAG_MODE = 1 private const val TAG_SEMANTIC_TAGS = 2 - fun fromTlv(tag: Tag, tlvReader: TlvReader) : ModeSelectClusterModeOptionStruct { + fun fromTlv(tag: Tag, tlvReader: TlvReader): ModeSelectClusterModeOptionStruct { tlvReader.enterStructure(tag) val label = tlvReader.getString(ContextSpecificTag(TAG_LABEL)) val mode = tlvReader.getInt(ContextSpecificTag(TAG_MODE)) - val semanticTags = buildList { - tlvReader.enterList(ContextSpecificTag(TAG_SEMANTIC_TAGS)) - while(!tlvReader.isEndOfContainer()) { - add(ModeSelectClusterSemanticTagStruct.fromTlv(AnonymousTag, tlvReader)) - } - tlvReader.exitContainer() - } - + val semanticTags = + buildList { + tlvReader.enterList(ContextSpecificTag(TAG_SEMANTIC_TAGS)) + while (!tlvReader.isEndOfContainer()) { + add(ModeSelectClusterSemanticTagStruct.fromTlv(AnonymousTag, tlvReader)) + } + tlvReader.exitContainer() + } + tlvReader.exitContainer() return ModeSelectClusterModeOptionStruct(label, mode, semanticTags) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ModeSelectClusterSemanticTagStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ModeSelectClusterSemanticTagStruct.kt index 6e00f596b61ebf..04c893671659d3 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 @@ -17,19 +17,13 @@ package chip.devicecontroller.cluster.structs import chip.devicecontroller.cluster.* -import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag -import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -import java.util.Optional - -class ModeSelectClusterSemanticTagStruct ( - val mfgCode: Int, - val value: Int) { - override fun toString(): String = buildString { +class ModeSelectClusterSemanticTagStruct(val mfgCode: Int, val value: Int) { + override fun toString(): String = buildString { append("ModeSelectClusterSemanticTagStruct {\n") append("\tmfgCode : $mfgCode\n") append("\tvalue : $value\n") @@ -49,11 +43,11 @@ class ModeSelectClusterSemanticTagStruct ( private const val TAG_MFG_CODE = 0 private const val TAG_VALUE = 1 - fun fromTlv(tag: Tag, tlvReader: TlvReader) : ModeSelectClusterSemanticTagStruct { + 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)) - + tlvReader.exitContainer() return ModeSelectClusterSemanticTagStruct(mfgCode, value) 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 9cf40b7e7ce7a3..8b942f2a492dd1 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 @@ -17,19 +17,16 @@ package chip.devicecontroller.cluster.structs import chip.devicecontroller.cluster.* -import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag -import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -import java.util.Optional - -class NetworkCommissioningClusterNetworkInfoStruct ( - val networkID: ByteArray, - val connected: Boolean) { - override fun toString(): String = buildString { +class NetworkCommissioningClusterNetworkInfoStruct( + val networkID: ByteArray, + val connected: Boolean +) { + override fun toString(): String = buildString { append("NetworkCommissioningClusterNetworkInfoStruct {\n") append("\tnetworkID : $networkID\n") append("\tconnected : $connected\n") @@ -49,11 +46,11 @@ class NetworkCommissioningClusterNetworkInfoStruct ( private const val TAG_NETWORK_I_D = 0 private const val TAG_CONNECTED = 1 - fun fromTlv(tag: Tag, tlvReader: TlvReader) : NetworkCommissioningClusterNetworkInfoStruct { + fun fromTlv(tag: Tag, tlvReader: TlvReader): NetworkCommissioningClusterNetworkInfoStruct { tlvReader.enterStructure(tag) val networkID = tlvReader.getByteArray(ContextSpecificTag(TAG_NETWORK_I_D)) val connected = tlvReader.getBoolean(ContextSpecificTag(TAG_CONNECTED)) - + tlvReader.exitContainer() return NetworkCommissioningClusterNetworkInfoStruct(networkID, connected) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/NetworkCommissioningClusterThreadInterfaceScanResultStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/NetworkCommissioningClusterThreadInterfaceScanResultStruct.kt index e8cc5c1941d7d8..76593b32131477 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 @@ -17,25 +17,22 @@ package chip.devicecontroller.cluster.structs import chip.devicecontroller.cluster.* -import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag -import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -import java.util.Optional - -class NetworkCommissioningClusterThreadInterfaceScanResultStruct ( - val panId: Int, - val extendedPanId: Long, - val networkName: String, - val channel: Int, - val version: Int, - val extendedAddress: ByteArray, - val rssi: Int, - val lqi: Int) { - override fun toString(): String = buildString { +class NetworkCommissioningClusterThreadInterfaceScanResultStruct( + val panId: Int, + val extendedPanId: Long, + val networkName: String, + val channel: Int, + val version: Int, + val extendedAddress: ByteArray, + val rssi: Int, + val lqi: Int +) { + override fun toString(): String = buildString { append("NetworkCommissioningClusterThreadInterfaceScanResultStruct {\n") append("\tpanId : $panId\n") append("\textendedPanId : $extendedPanId\n") @@ -73,7 +70,10 @@ class NetworkCommissioningClusterThreadInterfaceScanResultStruct ( private const val TAG_RSSI = 6 private const val TAG_LQI = 7 - fun fromTlv(tag: Tag, tlvReader: TlvReader) : NetworkCommissioningClusterThreadInterfaceScanResultStruct { + fun fromTlv( + tag: Tag, + tlvReader: TlvReader + ): NetworkCommissioningClusterThreadInterfaceScanResultStruct { tlvReader.enterStructure(tag) val panId = tlvReader.getInt(ContextSpecificTag(TAG_PAN_ID)) val extendedPanId = tlvReader.getLong(ContextSpecificTag(TAG_EXTENDED_PAN_ID)) @@ -83,10 +83,19 @@ class NetworkCommissioningClusterThreadInterfaceScanResultStruct ( val extendedAddress = tlvReader.getByteArray(ContextSpecificTag(TAG_EXTENDED_ADDRESS)) val rssi = tlvReader.getInt(ContextSpecificTag(TAG_RSSI)) val lqi = tlvReader.getInt(ContextSpecificTag(TAG_LQI)) - + tlvReader.exitContainer() - return NetworkCommissioningClusterThreadInterfaceScanResultStruct(panId, extendedPanId, networkName, channel, version, extendedAddress, rssi, lqi) + return NetworkCommissioningClusterThreadInterfaceScanResultStruct( + panId, + extendedPanId, + networkName, + channel, + version, + extendedAddress, + rssi, + lqi + ) } } } 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 efcd50f0c17fba..d2cf4bcf5b7cb0 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 @@ -17,23 +17,20 @@ package chip.devicecontroller.cluster.structs import chip.devicecontroller.cluster.* -import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag -import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -import java.util.Optional - -class NetworkCommissioningClusterWiFiInterfaceScanResultStruct ( - val security: Int, - val ssid: ByteArray, - val bssid: ByteArray, - val channel: Int, - val wiFiBand: Int, - val rssi: Int) { - override fun toString(): String = buildString { +class NetworkCommissioningClusterWiFiInterfaceScanResultStruct( + val security: Int, + val ssid: ByteArray, + val bssid: ByteArray, + val channel: Int, + val wiFiBand: Int, + val rssi: Int +) { + override fun toString(): String = buildString { append("NetworkCommissioningClusterWiFiInterfaceScanResultStruct {\n") append("\tsecurity : $security\n") append("\tssid : $ssid\n") @@ -65,7 +62,10 @@ class NetworkCommissioningClusterWiFiInterfaceScanResultStruct ( private const val TAG_WI_FI_BAND = 4 private const val TAG_RSSI = 5 - fun fromTlv(tag: Tag, tlvReader: TlvReader) : NetworkCommissioningClusterWiFiInterfaceScanResultStruct { + fun fromTlv( + tag: Tag, + tlvReader: TlvReader + ): NetworkCommissioningClusterWiFiInterfaceScanResultStruct { tlvReader.enterStructure(tag) val security = tlvReader.getInt(ContextSpecificTag(TAG_SECURITY)) val ssid = tlvReader.getByteArray(ContextSpecificTag(TAG_SSID)) @@ -73,10 +73,17 @@ class NetworkCommissioningClusterWiFiInterfaceScanResultStruct ( val channel = tlvReader.getInt(ContextSpecificTag(TAG_CHANNEL)) val wiFiBand = tlvReader.getInt(ContextSpecificTag(TAG_WI_FI_BAND)) val rssi = tlvReader.getInt(ContextSpecificTag(TAG_RSSI)) - + tlvReader.exitContainer() - return NetworkCommissioningClusterWiFiInterfaceScanResultStruct(security, ssid, bssid, channel, wiFiBand, rssi) + return NetworkCommissioningClusterWiFiInterfaceScanResultStruct( + security, + ssid, + bssid, + channel, + wiFiBand, + rssi + ) } } } 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 620c17f8cd0863..8264e9fa5ee545 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 @@ -17,23 +17,20 @@ package chip.devicecontroller.cluster.structs import chip.devicecontroller.cluster.* -import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag -import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -import java.util.Optional - -class OperationalCredentialsClusterFabricDescriptorStruct ( - val rootPublicKey: ByteArray, - val vendorID: Int, - val fabricID: Long, - val nodeID: Long, - val label: String, - val fabricIndex: Int) { - override fun toString(): String = buildString { +class OperationalCredentialsClusterFabricDescriptorStruct( + val rootPublicKey: ByteArray, + val vendorID: Int, + val fabricID: Long, + val nodeID: Long, + val label: String, + val fabricIndex: Int +) { + override fun toString(): String = buildString { append("OperationalCredentialsClusterFabricDescriptorStruct {\n") append("\trootPublicKey : $rootPublicKey\n") append("\tvendorID : $vendorID\n") @@ -65,7 +62,10 @@ class OperationalCredentialsClusterFabricDescriptorStruct ( private const val TAG_LABEL = 5 private const val TAG_FABRIC_INDEX = 254 - fun fromTlv(tag: Tag, tlvReader: TlvReader) : OperationalCredentialsClusterFabricDescriptorStruct { + fun fromTlv( + tag: Tag, + tlvReader: TlvReader + ): OperationalCredentialsClusterFabricDescriptorStruct { tlvReader.enterStructure(tag) val rootPublicKey = tlvReader.getByteArray(ContextSpecificTag(TAG_ROOT_PUBLIC_KEY)) val vendorID = tlvReader.getInt(ContextSpecificTag(TAG_VENDOR_I_D)) @@ -73,10 +73,17 @@ class OperationalCredentialsClusterFabricDescriptorStruct ( val nodeID = tlvReader.getLong(ContextSpecificTag(TAG_NODE_I_D)) val label = tlvReader.getString(ContextSpecificTag(TAG_LABEL)) val fabricIndex = tlvReader.getInt(ContextSpecificTag(TAG_FABRIC_INDEX)) - + tlvReader.exitContainer() - return OperationalCredentialsClusterFabricDescriptorStruct(rootPublicKey, vendorID, fabricID, nodeID, label, fabricIndex) + return OperationalCredentialsClusterFabricDescriptorStruct( + rootPublicKey, + vendorID, + fabricID, + nodeID, + label, + fabricIndex + ) } } } 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 406bad431f78c9..a05f388d1a5e06 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 @@ -17,20 +17,17 @@ package chip.devicecontroller.cluster.structs import chip.devicecontroller.cluster.* -import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag -import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -import java.util.Optional - -class OperationalCredentialsClusterNOCStruct ( - val noc: ByteArray, - val icac: ByteArray?, - val fabricIndex: Int) { - override fun toString(): String = buildString { +class OperationalCredentialsClusterNOCStruct( + val noc: ByteArray, + val icac: ByteArray?, + val fabricIndex: Int +) { + override fun toString(): String = buildString { append("OperationalCredentialsClusterNOCStruct {\n") append("\tnoc : $noc\n") append("\ticac : $icac\n") @@ -43,10 +40,10 @@ class OperationalCredentialsClusterNOCStruct ( startStructure(tag) put(ContextSpecificTag(TAG_NOC), noc) if (icac != null) { - put(ContextSpecificTag(TAG_ICAC), icac) - } else { - putNull(ContextSpecificTag(TAG_ICAC)) - } + put(ContextSpecificTag(TAG_ICAC), icac) + } else { + putNull(ContextSpecificTag(TAG_ICAC)) + } put(ContextSpecificTag(TAG_FABRIC_INDEX), fabricIndex) endStructure() } @@ -57,17 +54,18 @@ class OperationalCredentialsClusterNOCStruct ( private const val TAG_ICAC = 2 private const val TAG_FABRIC_INDEX = 254 - fun fromTlv(tag: Tag, tlvReader: TlvReader) : OperationalCredentialsClusterNOCStruct { + fun fromTlv(tag: Tag, tlvReader: TlvReader): OperationalCredentialsClusterNOCStruct { tlvReader.enterStructure(tag) val noc = tlvReader.getByteArray(ContextSpecificTag(TAG_NOC)) - val icac = if (!tlvReader.isNull()) { - tlvReader.getByteArray(ContextSpecificTag(TAG_ICAC)) - } else { - tlvReader.getNull(ContextSpecificTag(TAG_ICAC)) - null - } + val icac = + if (!tlvReader.isNull()) { + tlvReader.getByteArray(ContextSpecificTag(TAG_ICAC)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_ICAC)) + null + } val fabricIndex = tlvReader.getInt(ContextSpecificTag(TAG_FABRIC_INDEX)) - + tlvReader.exitContainer() return OperationalCredentialsClusterNOCStruct(noc, icac, fabricIndex) 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 68879d32ff0bd1..cdbccac37fe63f 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 @@ -17,20 +17,18 @@ package chip.devicecontroller.cluster.structs import chip.devicecontroller.cluster.* -import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag -import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter - import java.util.Optional -class OperationalStateClusterErrorStateStruct ( - val errorStateID: Int, - val errorStateLabel: Optional, - val errorStateDetails: Optional) { - override fun toString(): String = buildString { +class OperationalStateClusterErrorStateStruct( + val errorStateID: Int, + val errorStateLabel: Optional, + val errorStateDetails: Optional +) { + override fun toString(): String = buildString { append("OperationalStateClusterErrorStateStruct {\n") append("\terrorStateID : $errorStateID\n") append("\terrorStateLabel : $errorStateLabel\n") @@ -43,13 +41,13 @@ class OperationalStateClusterErrorStateStruct ( startStructure(tag) put(ContextSpecificTag(TAG_ERROR_STATE_I_D), errorStateID) if (errorStateLabel.isPresent) { - val opterrorStateLabel = errorStateLabel.get() - put(ContextSpecificTag(TAG_ERROR_STATE_LABEL), opterrorStateLabel) - } + val opterrorStateLabel = errorStateLabel.get() + put(ContextSpecificTag(TAG_ERROR_STATE_LABEL), opterrorStateLabel) + } if (errorStateDetails.isPresent) { - val opterrorStateDetails = errorStateDetails.get() - put(ContextSpecificTag(TAG_ERROR_STATE_DETAILS), opterrorStateDetails) - } + val opterrorStateDetails = errorStateDetails.get() + put(ContextSpecificTag(TAG_ERROR_STATE_DETAILS), opterrorStateDetails) + } endStructure() } } @@ -59,23 +57,29 @@ 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 { + fun fromTlv(tag: Tag, tlvReader: TlvReader): OperationalStateClusterErrorStateStruct { tlvReader.enterStructure(tag) val errorStateID = tlvReader.getInt(ContextSpecificTag(TAG_ERROR_STATE_I_D)) - val errorStateLabel = if (tlvReader.isNextTag(ContextSpecificTag(TAG_ERROR_STATE_LABEL))) { - Optional.of(tlvReader.getString(ContextSpecificTag(TAG_ERROR_STATE_LABEL))) - } else { - Optional.empty() - } - val errorStateDetails = if (tlvReader.isNextTag(ContextSpecificTag(TAG_ERROR_STATE_DETAILS))) { - Optional.of(tlvReader.getString(ContextSpecificTag(TAG_ERROR_STATE_DETAILS))) - } else { - Optional.empty() - } - + val errorStateLabel = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_ERROR_STATE_LABEL))) { + Optional.of(tlvReader.getString(ContextSpecificTag(TAG_ERROR_STATE_LABEL))) + } else { + Optional.empty() + } + val errorStateDetails = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_ERROR_STATE_DETAILS))) { + Optional.of(tlvReader.getString(ContextSpecificTag(TAG_ERROR_STATE_DETAILS))) + } else { + Optional.empty() + } + tlvReader.exitContainer() - return OperationalStateClusterErrorStateStruct(errorStateID, errorStateLabel, errorStateDetails) + return OperationalStateClusterErrorStateStruct( + errorStateID, + errorStateLabel, + errorStateDetails + ) } } } 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 f66152a1cfb5f1..1c55ac8f8927c4 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 @@ -17,19 +17,17 @@ package chip.devicecontroller.cluster.structs import chip.devicecontroller.cluster.* -import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag -import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter - import java.util.Optional -class OperationalStateClusterOperationalStateStruct ( - val operationalStateID: Int, - val operationalStateLabel: Optional) { - override fun toString(): String = buildString { +class OperationalStateClusterOperationalStateStruct( + val operationalStateID: Int, + val operationalStateLabel: Optional +) { + override fun toString(): String = buildString { append("OperationalStateClusterOperationalStateStruct {\n") append("\toperationalStateID : $operationalStateID\n") append("\toperationalStateLabel : $operationalStateLabel\n") @@ -41,9 +39,9 @@ class OperationalStateClusterOperationalStateStruct ( startStructure(tag) put(ContextSpecificTag(TAG_OPERATIONAL_STATE_I_D), operationalStateID) if (operationalStateLabel.isPresent) { - val optoperationalStateLabel = operationalStateLabel.get() - put(ContextSpecificTag(TAG_OPERATIONAL_STATE_LABEL), optoperationalStateLabel) - } + val optoperationalStateLabel = operationalStateLabel.get() + put(ContextSpecificTag(TAG_OPERATIONAL_STATE_LABEL), optoperationalStateLabel) + } endStructure() } } @@ -52,18 +50,22 @@ 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 { + fun fromTlv(tag: Tag, tlvReader: TlvReader): OperationalStateClusterOperationalStateStruct { tlvReader.enterStructure(tag) val operationalStateID = tlvReader.getInt(ContextSpecificTag(TAG_OPERATIONAL_STATE_I_D)) - val operationalStateLabel = if (tlvReader.isNextTag(ContextSpecificTag(TAG_OPERATIONAL_STATE_LABEL))) { - Optional.of(tlvReader.getString(ContextSpecificTag(TAG_OPERATIONAL_STATE_LABEL))) - } else { - Optional.empty() - } - + val operationalStateLabel = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_OPERATIONAL_STATE_LABEL))) { + Optional.of(tlvReader.getString(ContextSpecificTag(TAG_OPERATIONAL_STATE_LABEL))) + } else { + Optional.empty() + } + tlvReader.exitContainer() - return OperationalStateClusterOperationalStateStruct(operationalStateID, operationalStateLabel) + return OperationalStateClusterOperationalStateStruct( + operationalStateID, + operationalStateLabel + ) } } } 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 f527505ff87b22..17f95d897b258b 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 @@ -17,20 +17,17 @@ package chip.devicecontroller.cluster.structs import chip.devicecontroller.cluster.* -import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag -import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -import java.util.Optional - -class OtaSoftwareUpdateRequestorClusterProviderLocation ( - val providerNodeID: Long, - val endpoint: Int, - val fabricIndex: Int) { - override fun toString(): String = buildString { +class OtaSoftwareUpdateRequestorClusterProviderLocation( + val providerNodeID: Long, + val endpoint: Int, + val fabricIndex: Int +) { + override fun toString(): String = buildString { append("OtaSoftwareUpdateRequestorClusterProviderLocation {\n") append("\tproviderNodeID : $providerNodeID\n") append("\tendpoint : $endpoint\n") @@ -53,15 +50,19 @@ class OtaSoftwareUpdateRequestorClusterProviderLocation ( private const val TAG_ENDPOINT = 2 private const val TAG_FABRIC_INDEX = 254 - fun fromTlv(tag: Tag, tlvReader: TlvReader) : OtaSoftwareUpdateRequestorClusterProviderLocation { + 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)) - + tlvReader.exitContainer() - return OtaSoftwareUpdateRequestorClusterProviderLocation(providerNodeID, endpoint, fabricIndex) + return OtaSoftwareUpdateRequestorClusterProviderLocation( + providerNodeID, + endpoint, + fabricIndex + ) } } } 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 a3e342cf110c49..6172f21498fdb0 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 @@ -20,16 +20,11 @@ import chip.devicecontroller.cluster.* import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag -import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -import java.util.Optional - -class PowerSourceClusterBatChargeFaultChangeType ( - val current: List, - val previous: List) { - override fun toString(): String = buildString { +class PowerSourceClusterBatChargeFaultChangeType(val current: List, val previous: List) { + override fun toString(): String = buildString { append("PowerSourceClusterBatChargeFaultChangeType {\n") append("\tcurrent : $current\n") append("\tprevious : $previous\n") @@ -57,23 +52,25 @@ class PowerSourceClusterBatChargeFaultChangeType ( private const val TAG_CURRENT = 0 private const val TAG_PREVIOUS = 1 - fun fromTlv(tag: Tag, tlvReader: TlvReader) : PowerSourceClusterBatChargeFaultChangeType { + fun fromTlv(tag: Tag, tlvReader: TlvReader): PowerSourceClusterBatChargeFaultChangeType { tlvReader.enterStructure(tag) - val current = buildList { - tlvReader.enterList(ContextSpecificTag(TAG_CURRENT)) - while(!tlvReader.isEndOfContainer()) { - add(tlvReader.getInt(AnonymousTag)) - } - tlvReader.exitContainer() - } - val previous = buildList { - tlvReader.enterList(ContextSpecificTag(TAG_PREVIOUS)) - while(!tlvReader.isEndOfContainer()) { - add(tlvReader.getInt(AnonymousTag)) - } - tlvReader.exitContainer() - } - + val current = + buildList { + tlvReader.enterList(ContextSpecificTag(TAG_CURRENT)) + while (!tlvReader.isEndOfContainer()) { + add(tlvReader.getInt(AnonymousTag)) + } + tlvReader.exitContainer() + } + val previous = + buildList { + tlvReader.enterList(ContextSpecificTag(TAG_PREVIOUS)) + while (!tlvReader.isEndOfContainer()) { + add(tlvReader.getInt(AnonymousTag)) + } + tlvReader.exitContainer() + } + tlvReader.exitContainer() return PowerSourceClusterBatChargeFaultChangeType(current, previous) 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 4feef1564786b2..6ef4a63074b8a2 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 @@ -20,16 +20,11 @@ import chip.devicecontroller.cluster.* import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag -import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -import java.util.Optional - -class PowerSourceClusterBatFaultChangeType ( - val current: List, - val previous: List) { - override fun toString(): String = buildString { +class PowerSourceClusterBatFaultChangeType(val current: List, val previous: List) { + override fun toString(): String = buildString { append("PowerSourceClusterBatFaultChangeType {\n") append("\tcurrent : $current\n") append("\tprevious : $previous\n") @@ -57,23 +52,25 @@ class PowerSourceClusterBatFaultChangeType ( private const val TAG_CURRENT = 0 private const val TAG_PREVIOUS = 1 - fun fromTlv(tag: Tag, tlvReader: TlvReader) : PowerSourceClusterBatFaultChangeType { + fun fromTlv(tag: Tag, tlvReader: TlvReader): PowerSourceClusterBatFaultChangeType { tlvReader.enterStructure(tag) - val current = buildList { - tlvReader.enterList(ContextSpecificTag(TAG_CURRENT)) - while(!tlvReader.isEndOfContainer()) { - add(tlvReader.getInt(AnonymousTag)) - } - tlvReader.exitContainer() - } - val previous = buildList { - tlvReader.enterList(ContextSpecificTag(TAG_PREVIOUS)) - while(!tlvReader.isEndOfContainer()) { - add(tlvReader.getInt(AnonymousTag)) - } - tlvReader.exitContainer() - } - + val current = + buildList { + tlvReader.enterList(ContextSpecificTag(TAG_CURRENT)) + while (!tlvReader.isEndOfContainer()) { + add(tlvReader.getInt(AnonymousTag)) + } + tlvReader.exitContainer() + } + val previous = + buildList { + tlvReader.enterList(ContextSpecificTag(TAG_PREVIOUS)) + while (!tlvReader.isEndOfContainer()) { + add(tlvReader.getInt(AnonymousTag)) + } + tlvReader.exitContainer() + } + tlvReader.exitContainer() return PowerSourceClusterBatFaultChangeType(current, previous) 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 6c99e0befd7e37..86cdc01f28fd41 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 @@ -20,16 +20,11 @@ import chip.devicecontroller.cluster.* import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag -import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -import java.util.Optional - -class PowerSourceClusterWiredFaultChangeType ( - val current: List, - val previous: List) { - override fun toString(): String = buildString { +class PowerSourceClusterWiredFaultChangeType(val current: List, val previous: List) { + override fun toString(): String = buildString { append("PowerSourceClusterWiredFaultChangeType {\n") append("\tcurrent : $current\n") append("\tprevious : $previous\n") @@ -57,23 +52,25 @@ class PowerSourceClusterWiredFaultChangeType ( private const val TAG_CURRENT = 0 private const val TAG_PREVIOUS = 1 - fun fromTlv(tag: Tag, tlvReader: TlvReader) : PowerSourceClusterWiredFaultChangeType { + fun fromTlv(tag: Tag, tlvReader: TlvReader): PowerSourceClusterWiredFaultChangeType { tlvReader.enterStructure(tag) - val current = buildList { - tlvReader.enterList(ContextSpecificTag(TAG_CURRENT)) - while(!tlvReader.isEndOfContainer()) { - add(tlvReader.getInt(AnonymousTag)) - } - tlvReader.exitContainer() - } - val previous = buildList { - tlvReader.enterList(ContextSpecificTag(TAG_PREVIOUS)) - while(!tlvReader.isEndOfContainer()) { - add(tlvReader.getInt(AnonymousTag)) - } - tlvReader.exitContainer() - } - + val current = + buildList { + tlvReader.enterList(ContextSpecificTag(TAG_CURRENT)) + while (!tlvReader.isEndOfContainer()) { + add(tlvReader.getInt(AnonymousTag)) + } + tlvReader.exitContainer() + } + val previous = + buildList { + tlvReader.enterList(ContextSpecificTag(TAG_PREVIOUS)) + while (!tlvReader.isEndOfContainer()) { + add(tlvReader.getInt(AnonymousTag)) + } + tlvReader.exitContainer() + } + tlvReader.exitContainer() return PowerSourceClusterWiredFaultChangeType(current, previous) 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 e3f52fc923d0e9..6632b9581bb508 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 @@ -20,17 +20,15 @@ import chip.devicecontroller.cluster.* import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag -import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -import java.util.Optional - -class RefrigeratorAndTemperatureControlledCabinetModeClusterModeOptionStruct ( - val label: String, - val mode: Int, - val modeTags: List) { - override fun toString(): String = buildString { +class RefrigeratorAndTemperatureControlledCabinetModeClusterModeOptionStruct( + val label: String, + val mode: Int, + val modeTags: List +) { + override fun toString(): String = buildString { append("RefrigeratorAndTemperatureControlledCabinetModeClusterModeOptionStruct {\n") append("\tlabel : $label\n") append("\tmode : $mode\n") @@ -57,21 +55,34 @@ class RefrigeratorAndTemperatureControlledCabinetModeClusterModeOptionStruct ( private const val TAG_MODE = 1 private const val TAG_MODE_TAGS = 2 - fun fromTlv(tag: Tag, tlvReader: TlvReader) : RefrigeratorAndTemperatureControlledCabinetModeClusterModeOptionStruct { + fun fromTlv( + tag: Tag, + tlvReader: TlvReader + ): RefrigeratorAndTemperatureControlledCabinetModeClusterModeOptionStruct { tlvReader.enterStructure(tag) val label = tlvReader.getString(ContextSpecificTag(TAG_LABEL)) val mode = tlvReader.getInt(ContextSpecificTag(TAG_MODE)) - val modeTags = buildList { - tlvReader.enterList(ContextSpecificTag(TAG_MODE_TAGS)) - while(!tlvReader.isEndOfContainer()) { - add(RefrigeratorAndTemperatureControlledCabinetModeClusterModeTagStruct.fromTlv(AnonymousTag, tlvReader)) - } - tlvReader.exitContainer() - } - + val modeTags = + buildList { + tlvReader.enterList(ContextSpecificTag(TAG_MODE_TAGS)) + while (!tlvReader.isEndOfContainer()) { + add( + RefrigeratorAndTemperatureControlledCabinetModeClusterModeTagStruct.fromTlv( + AnonymousTag, + tlvReader + ) + ) + } + tlvReader.exitContainer() + } + tlvReader.exitContainer() - return RefrigeratorAndTemperatureControlledCabinetModeClusterModeOptionStruct(label, mode, modeTags) + return RefrigeratorAndTemperatureControlledCabinetModeClusterModeOptionStruct( + label, + mode, + modeTags + ) } } } 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 7b3fc8ad89ac0a..9f806c52fa6fa2 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 @@ -17,19 +17,17 @@ package chip.devicecontroller.cluster.structs import chip.devicecontroller.cluster.* -import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag -import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter - import java.util.Optional -class RefrigeratorAndTemperatureControlledCabinetModeClusterModeTagStruct ( - val mfgCode: Optional, - val value: Int) { - override fun toString(): String = buildString { +class RefrigeratorAndTemperatureControlledCabinetModeClusterModeTagStruct( + val mfgCode: Optional, + val value: Int +) { + override fun toString(): String = buildString { append("RefrigeratorAndTemperatureControlledCabinetModeClusterModeTagStruct {\n") append("\tmfgCode : $mfgCode\n") append("\tvalue : $value\n") @@ -40,9 +38,9 @@ class RefrigeratorAndTemperatureControlledCabinetModeClusterModeTagStruct ( tlvWriter.apply { startStructure(tag) if (mfgCode.isPresent) { - val optmfgCode = mfgCode.get() - put(ContextSpecificTag(TAG_MFG_CODE), optmfgCode) - } + val optmfgCode = mfgCode.get() + put(ContextSpecificTag(TAG_MFG_CODE), optmfgCode) + } put(ContextSpecificTag(TAG_VALUE), value) endStructure() } @@ -52,15 +50,19 @@ class RefrigeratorAndTemperatureControlledCabinetModeClusterModeTagStruct ( private const val TAG_MFG_CODE = 0 private const val TAG_VALUE = 1 - fun fromTlv(tag: Tag, tlvReader: TlvReader) : RefrigeratorAndTemperatureControlledCabinetModeClusterModeTagStruct { + fun fromTlv( + tag: Tag, + tlvReader: TlvReader + ): RefrigeratorAndTemperatureControlledCabinetModeClusterModeTagStruct { tlvReader.enterStructure(tag) - val mfgCode = if (tlvReader.isNextTag(ContextSpecificTag(TAG_MFG_CODE))) { - Optional.of(tlvReader.getInt(ContextSpecificTag(TAG_MFG_CODE))) - } else { - Optional.empty() - } + val mfgCode = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_MFG_CODE))) { + Optional.of(tlvReader.getInt(ContextSpecificTag(TAG_MFG_CODE))) + } else { + Optional.empty() + } val value = tlvReader.getInt(ContextSpecificTag(TAG_VALUE)) - + tlvReader.exitContainer() return RefrigeratorAndTemperatureControlledCabinetModeClusterModeTagStruct(mfgCode, value) 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 986ef2fbfe7fae..e3f33a1b7dcac5 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 @@ -20,17 +20,15 @@ import chip.devicecontroller.cluster.* import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag -import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -import java.util.Optional - -class RvcCleanModeClusterModeOptionStruct ( - val label: String, - val mode: Int, - val modeTags: List) { - override fun toString(): String = buildString { +class RvcCleanModeClusterModeOptionStruct( + val label: String, + val mode: Int, + val modeTags: List +) { + override fun toString(): String = buildString { append("RvcCleanModeClusterModeOptionStruct {\n") append("\tlabel : $label\n") append("\tmode : $mode\n") @@ -57,18 +55,19 @@ class RvcCleanModeClusterModeOptionStruct ( private const val TAG_MODE = 1 private const val TAG_MODE_TAGS = 2 - fun fromTlv(tag: Tag, tlvReader: TlvReader) : RvcCleanModeClusterModeOptionStruct { + fun fromTlv(tag: Tag, tlvReader: TlvReader): RvcCleanModeClusterModeOptionStruct { tlvReader.enterStructure(tag) val label = tlvReader.getString(ContextSpecificTag(TAG_LABEL)) val mode = tlvReader.getInt(ContextSpecificTag(TAG_MODE)) - val modeTags = buildList { - tlvReader.enterList(ContextSpecificTag(TAG_MODE_TAGS)) - while(!tlvReader.isEndOfContainer()) { - add(RvcCleanModeClusterModeTagStruct.fromTlv(AnonymousTag, tlvReader)) - } - tlvReader.exitContainer() - } - + val modeTags = + buildList { + tlvReader.enterList(ContextSpecificTag(TAG_MODE_TAGS)) + while (!tlvReader.isEndOfContainer()) { + add(RvcCleanModeClusterModeTagStruct.fromTlv(AnonymousTag, tlvReader)) + } + tlvReader.exitContainer() + } + tlvReader.exitContainer() return RvcCleanModeClusterModeOptionStruct(label, mode, modeTags) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/RvcCleanModeClusterModeTagStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/RvcCleanModeClusterModeTagStruct.kt index d1b5786dd5004d..bc7eb7ed818b41 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 @@ -17,19 +17,14 @@ package chip.devicecontroller.cluster.structs import chip.devicecontroller.cluster.* -import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag -import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter - import java.util.Optional -class RvcCleanModeClusterModeTagStruct ( - val mfgCode: Optional, - val value: Int) { - override fun toString(): String = buildString { +class RvcCleanModeClusterModeTagStruct(val mfgCode: Optional, val value: Int) { + override fun toString(): String = buildString { append("RvcCleanModeClusterModeTagStruct {\n") append("\tmfgCode : $mfgCode\n") append("\tvalue : $value\n") @@ -40,9 +35,9 @@ class RvcCleanModeClusterModeTagStruct ( tlvWriter.apply { startStructure(tag) if (mfgCode.isPresent) { - val optmfgCode = mfgCode.get() - put(ContextSpecificTag(TAG_MFG_CODE), optmfgCode) - } + val optmfgCode = mfgCode.get() + put(ContextSpecificTag(TAG_MFG_CODE), optmfgCode) + } put(ContextSpecificTag(TAG_VALUE), value) endStructure() } @@ -52,15 +47,16 @@ class RvcCleanModeClusterModeTagStruct ( private const val TAG_MFG_CODE = 0 private const val TAG_VALUE = 1 - fun fromTlv(tag: Tag, tlvReader: TlvReader) : RvcCleanModeClusterModeTagStruct { + fun fromTlv(tag: Tag, tlvReader: TlvReader): RvcCleanModeClusterModeTagStruct { tlvReader.enterStructure(tag) - val mfgCode = if (tlvReader.isNextTag(ContextSpecificTag(TAG_MFG_CODE))) { - Optional.of(tlvReader.getInt(ContextSpecificTag(TAG_MFG_CODE))) - } else { - Optional.empty() - } + val mfgCode = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_MFG_CODE))) { + Optional.of(tlvReader.getInt(ContextSpecificTag(TAG_MFG_CODE))) + } else { + Optional.empty() + } val value = tlvReader.getInt(ContextSpecificTag(TAG_VALUE)) - + tlvReader.exitContainer() return RvcCleanModeClusterModeTagStruct(mfgCode, value) 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 9416a49dd8d2e1..f6b9b8b14456f0 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 @@ -17,20 +17,18 @@ package chip.devicecontroller.cluster.structs import chip.devicecontroller.cluster.* -import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag -import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter - import java.util.Optional -class RvcOperationalStateClusterErrorStateStruct ( - val errorStateID: Int, - val errorStateLabel: Optional, - val errorStateDetails: Optional) { - override fun toString(): String = buildString { +class RvcOperationalStateClusterErrorStateStruct( + val errorStateID: Int, + val errorStateLabel: Optional, + val errorStateDetails: Optional +) { + override fun toString(): String = buildString { append("RvcOperationalStateClusterErrorStateStruct {\n") append("\terrorStateID : $errorStateID\n") append("\terrorStateLabel : $errorStateLabel\n") @@ -43,13 +41,13 @@ class RvcOperationalStateClusterErrorStateStruct ( startStructure(tag) put(ContextSpecificTag(TAG_ERROR_STATE_I_D), errorStateID) if (errorStateLabel.isPresent) { - val opterrorStateLabel = errorStateLabel.get() - put(ContextSpecificTag(TAG_ERROR_STATE_LABEL), opterrorStateLabel) - } + val opterrorStateLabel = errorStateLabel.get() + put(ContextSpecificTag(TAG_ERROR_STATE_LABEL), opterrorStateLabel) + } if (errorStateDetails.isPresent) { - val opterrorStateDetails = errorStateDetails.get() - put(ContextSpecificTag(TAG_ERROR_STATE_DETAILS), opterrorStateDetails) - } + val opterrorStateDetails = errorStateDetails.get() + put(ContextSpecificTag(TAG_ERROR_STATE_DETAILS), opterrorStateDetails) + } endStructure() } } @@ -59,23 +57,29 @@ 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 { + fun fromTlv(tag: Tag, tlvReader: TlvReader): RvcOperationalStateClusterErrorStateStruct { tlvReader.enterStructure(tag) val errorStateID = tlvReader.getInt(ContextSpecificTag(TAG_ERROR_STATE_I_D)) - val errorStateLabel = if (tlvReader.isNextTag(ContextSpecificTag(TAG_ERROR_STATE_LABEL))) { - Optional.of(tlvReader.getString(ContextSpecificTag(TAG_ERROR_STATE_LABEL))) - } else { - Optional.empty() - } - val errorStateDetails = if (tlvReader.isNextTag(ContextSpecificTag(TAG_ERROR_STATE_DETAILS))) { - Optional.of(tlvReader.getString(ContextSpecificTag(TAG_ERROR_STATE_DETAILS))) - } else { - Optional.empty() - } - + val errorStateLabel = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_ERROR_STATE_LABEL))) { + Optional.of(tlvReader.getString(ContextSpecificTag(TAG_ERROR_STATE_LABEL))) + } else { + Optional.empty() + } + val errorStateDetails = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_ERROR_STATE_DETAILS))) { + Optional.of(tlvReader.getString(ContextSpecificTag(TAG_ERROR_STATE_DETAILS))) + } else { + Optional.empty() + } + tlvReader.exitContainer() - return RvcOperationalStateClusterErrorStateStruct(errorStateID, errorStateLabel, errorStateDetails) + return RvcOperationalStateClusterErrorStateStruct( + errorStateID, + errorStateLabel, + errorStateDetails + ) } } } 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 0ac8e7e362c07d..66f2796d71439f 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 @@ -17,19 +17,17 @@ package chip.devicecontroller.cluster.structs import chip.devicecontroller.cluster.* -import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag -import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter - import java.util.Optional -class RvcOperationalStateClusterOperationalStateStruct ( - val operationalStateID: Int, - val operationalStateLabel: Optional) { - override fun toString(): String = buildString { +class RvcOperationalStateClusterOperationalStateStruct( + val operationalStateID: Int, + val operationalStateLabel: Optional +) { + override fun toString(): String = buildString { append("RvcOperationalStateClusterOperationalStateStruct {\n") append("\toperationalStateID : $operationalStateID\n") append("\toperationalStateLabel : $operationalStateLabel\n") @@ -41,9 +39,9 @@ class RvcOperationalStateClusterOperationalStateStruct ( startStructure(tag) put(ContextSpecificTag(TAG_OPERATIONAL_STATE_I_D), operationalStateID) if (operationalStateLabel.isPresent) { - val optoperationalStateLabel = operationalStateLabel.get() - put(ContextSpecificTag(TAG_OPERATIONAL_STATE_LABEL), optoperationalStateLabel) - } + val optoperationalStateLabel = operationalStateLabel.get() + put(ContextSpecificTag(TAG_OPERATIONAL_STATE_LABEL), optoperationalStateLabel) + } endStructure() } } @@ -52,18 +50,22 @@ 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 { + fun fromTlv(tag: Tag, tlvReader: TlvReader): RvcOperationalStateClusterOperationalStateStruct { tlvReader.enterStructure(tag) val operationalStateID = tlvReader.getInt(ContextSpecificTag(TAG_OPERATIONAL_STATE_I_D)) - val operationalStateLabel = if (tlvReader.isNextTag(ContextSpecificTag(TAG_OPERATIONAL_STATE_LABEL))) { - Optional.of(tlvReader.getString(ContextSpecificTag(TAG_OPERATIONAL_STATE_LABEL))) - } else { - Optional.empty() - } - + val operationalStateLabel = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_OPERATIONAL_STATE_LABEL))) { + Optional.of(tlvReader.getString(ContextSpecificTag(TAG_OPERATIONAL_STATE_LABEL))) + } else { + Optional.empty() + } + tlvReader.exitContainer() - return RvcOperationalStateClusterOperationalStateStruct(operationalStateID, operationalStateLabel) + return RvcOperationalStateClusterOperationalStateStruct( + operationalStateID, + operationalStateLabel + ) } } } 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 6c0fa21b62753c..64b272df8e62c2 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 @@ -20,17 +20,15 @@ import chip.devicecontroller.cluster.* import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag -import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -import java.util.Optional - -class RvcRunModeClusterModeOptionStruct ( - val label: String, - val mode: Int, - val modeTags: List) { - override fun toString(): String = buildString { +class RvcRunModeClusterModeOptionStruct( + val label: String, + val mode: Int, + val modeTags: List +) { + override fun toString(): String = buildString { append("RvcRunModeClusterModeOptionStruct {\n") append("\tlabel : $label\n") append("\tmode : $mode\n") @@ -57,18 +55,19 @@ class RvcRunModeClusterModeOptionStruct ( private const val TAG_MODE = 1 private const val TAG_MODE_TAGS = 2 - fun fromTlv(tag: Tag, tlvReader: TlvReader) : RvcRunModeClusterModeOptionStruct { + fun fromTlv(tag: Tag, tlvReader: TlvReader): RvcRunModeClusterModeOptionStruct { tlvReader.enterStructure(tag) val label = tlvReader.getString(ContextSpecificTag(TAG_LABEL)) val mode = tlvReader.getInt(ContextSpecificTag(TAG_MODE)) - val modeTags = buildList { - tlvReader.enterList(ContextSpecificTag(TAG_MODE_TAGS)) - while(!tlvReader.isEndOfContainer()) { - add(RvcRunModeClusterModeTagStruct.fromTlv(AnonymousTag, tlvReader)) - } - tlvReader.exitContainer() - } - + val modeTags = + buildList { + tlvReader.enterList(ContextSpecificTag(TAG_MODE_TAGS)) + while (!tlvReader.isEndOfContainer()) { + add(RvcRunModeClusterModeTagStruct.fromTlv(AnonymousTag, tlvReader)) + } + tlvReader.exitContainer() + } + tlvReader.exitContainer() return RvcRunModeClusterModeOptionStruct(label, mode, modeTags) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/RvcRunModeClusterModeTagStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/RvcRunModeClusterModeTagStruct.kt index 39077679389f9e..3ad4e9aee5ba6d 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 @@ -17,19 +17,14 @@ package chip.devicecontroller.cluster.structs import chip.devicecontroller.cluster.* -import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag -import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter - import java.util.Optional -class RvcRunModeClusterModeTagStruct ( - val mfgCode: Optional, - val value: Int) { - override fun toString(): String = buildString { +class RvcRunModeClusterModeTagStruct(val mfgCode: Optional, val value: Int) { + override fun toString(): String = buildString { append("RvcRunModeClusterModeTagStruct {\n") append("\tmfgCode : $mfgCode\n") append("\tvalue : $value\n") @@ -40,9 +35,9 @@ class RvcRunModeClusterModeTagStruct ( tlvWriter.apply { startStructure(tag) if (mfgCode.isPresent) { - val optmfgCode = mfgCode.get() - put(ContextSpecificTag(TAG_MFG_CODE), optmfgCode) - } + val optmfgCode = mfgCode.get() + put(ContextSpecificTag(TAG_MFG_CODE), optmfgCode) + } put(ContextSpecificTag(TAG_VALUE), value) endStructure() } @@ -52,15 +47,16 @@ class RvcRunModeClusterModeTagStruct ( private const val TAG_MFG_CODE = 0 private const val TAG_VALUE = 1 - fun fromTlv(tag: Tag, tlvReader: TlvReader) : RvcRunModeClusterModeTagStruct { + fun fromTlv(tag: Tag, tlvReader: TlvReader): RvcRunModeClusterModeTagStruct { tlvReader.enterStructure(tag) - val mfgCode = if (tlvReader.isNextTag(ContextSpecificTag(TAG_MFG_CODE))) { - Optional.of(tlvReader.getInt(ContextSpecificTag(TAG_MFG_CODE))) - } else { - Optional.empty() - } + val mfgCode = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_MFG_CODE))) { + Optional.of(tlvReader.getInt(ContextSpecificTag(TAG_MFG_CODE))) + } else { + Optional.empty() + } val value = tlvReader.getInt(ContextSpecificTag(TAG_VALUE)) - + tlvReader.exitContainer() return RvcRunModeClusterModeTagStruct(mfgCode, value) 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 3376a7d1e849f2..213d87b9137cf5 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 @@ -17,19 +17,13 @@ package chip.devicecontroller.cluster.structs import chip.devicecontroller.cluster.* -import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag -import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -import java.util.Optional - -class ScenesClusterAttributeValuePair ( - val attributeID: Long, - val attributeValue: Long) { - override fun toString(): String = buildString { +class ScenesClusterAttributeValuePair(val attributeID: Long, val attributeValue: Long) { + override fun toString(): String = buildString { append("ScenesClusterAttributeValuePair {\n") append("\tattributeID : $attributeID\n") append("\tattributeValue : $attributeValue\n") @@ -49,11 +43,11 @@ class ScenesClusterAttributeValuePair ( private const val TAG_ATTRIBUTE_I_D = 0 private const val TAG_ATTRIBUTE_VALUE = 1 - fun fromTlv(tag: Tag, tlvReader: TlvReader) : ScenesClusterAttributeValuePair { + 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)) - + tlvReader.exitContainer() return ScenesClusterAttributeValuePair(attributeID, attributeValue) 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 dde3ec639661d9..edc04a2084e2fd 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 @@ -20,16 +20,14 @@ import chip.devicecontroller.cluster.* import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag -import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -import java.util.Optional - -class ScenesClusterExtensionFieldSet ( - val clusterID: Long, - val attributeValueList: List) { - override fun toString(): String = buildString { +class ScenesClusterExtensionFieldSet( + val clusterID: Long, + val attributeValueList: List +) { + override fun toString(): String = buildString { append("ScenesClusterExtensionFieldSet {\n") append("\tclusterID : $clusterID\n") append("\tattributeValueList : $attributeValueList\n") @@ -53,17 +51,18 @@ 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 { + fun fromTlv(tag: Tag, tlvReader: TlvReader): ScenesClusterExtensionFieldSet { tlvReader.enterStructure(tag) val clusterID = tlvReader.getLong(ContextSpecificTag(TAG_CLUSTER_I_D)) - val attributeValueList = buildList { - tlvReader.enterList(ContextSpecificTag(TAG_ATTRIBUTE_VALUE_LIST)) - while(!tlvReader.isEndOfContainer()) { - add(ScenesClusterAttributeValuePair.fromTlv(AnonymousTag, tlvReader)) - } - tlvReader.exitContainer() - } - + val attributeValueList = + buildList { + tlvReader.enterList(ContextSpecificTag(TAG_ATTRIBUTE_VALUE_LIST)) + while (!tlvReader.isEndOfContainer()) { + add(ScenesClusterAttributeValuePair.fromTlv(AnonymousTag, tlvReader)) + } + tlvReader.exitContainer() + } + tlvReader.exitContainer() return ScenesClusterExtensionFieldSet(clusterID, attributeValueList) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/SoftwareDiagnosticsClusterThreadMetricsStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/SoftwareDiagnosticsClusterThreadMetricsStruct.kt index ae6aa79702b58b..5359b9a4b70a2a 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 @@ -17,22 +17,20 @@ package chip.devicecontroller.cluster.structs import chip.devicecontroller.cluster.* -import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag -import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter - import java.util.Optional -class SoftwareDiagnosticsClusterThreadMetricsStruct ( - val id: Long, - val name: Optional, - val stackFreeCurrent: Optional, - val stackFreeMinimum: Optional, - val stackSize: Optional) { - override fun toString(): String = buildString { +class SoftwareDiagnosticsClusterThreadMetricsStruct( + val id: Long, + val name: Optional, + val stackFreeCurrent: Optional, + val stackFreeMinimum: Optional, + val stackSize: Optional +) { + override fun toString(): String = buildString { append("SoftwareDiagnosticsClusterThreadMetricsStruct {\n") append("\tid : $id\n") append("\tname : $name\n") @@ -47,21 +45,21 @@ class SoftwareDiagnosticsClusterThreadMetricsStruct ( startStructure(tag) put(ContextSpecificTag(TAG_ID), id) if (name.isPresent) { - val optname = name.get() - put(ContextSpecificTag(TAG_NAME), optname) - } + val optname = name.get() + put(ContextSpecificTag(TAG_NAME), optname) + } if (stackFreeCurrent.isPresent) { - val optstackFreeCurrent = stackFreeCurrent.get() - put(ContextSpecificTag(TAG_STACK_FREE_CURRENT), optstackFreeCurrent) - } + val optstackFreeCurrent = stackFreeCurrent.get() + put(ContextSpecificTag(TAG_STACK_FREE_CURRENT), optstackFreeCurrent) + } if (stackFreeMinimum.isPresent) { - val optstackFreeMinimum = stackFreeMinimum.get() - put(ContextSpecificTag(TAG_STACK_FREE_MINIMUM), optstackFreeMinimum) - } + val optstackFreeMinimum = stackFreeMinimum.get() + put(ContextSpecificTag(TAG_STACK_FREE_MINIMUM), optstackFreeMinimum) + } if (stackSize.isPresent) { - val optstackSize = stackSize.get() - put(ContextSpecificTag(TAG_STACK_SIZE), optstackSize) - } + val optstackSize = stackSize.get() + put(ContextSpecificTag(TAG_STACK_SIZE), optstackSize) + } endStructure() } } @@ -73,33 +71,43 @@ class SoftwareDiagnosticsClusterThreadMetricsStruct ( private const val TAG_STACK_FREE_MINIMUM = 3 private const val TAG_STACK_SIZE = 4 - fun fromTlv(tag: Tag, tlvReader: TlvReader) : SoftwareDiagnosticsClusterThreadMetricsStruct { + fun fromTlv(tag: Tag, tlvReader: TlvReader): SoftwareDiagnosticsClusterThreadMetricsStruct { tlvReader.enterStructure(tag) val id = tlvReader.getLong(ContextSpecificTag(TAG_ID)) - val name = if (tlvReader.isNextTag(ContextSpecificTag(TAG_NAME))) { - Optional.of(tlvReader.getString(ContextSpecificTag(TAG_NAME))) - } else { - Optional.empty() - } - val stackFreeCurrent = if (tlvReader.isNextTag(ContextSpecificTag(TAG_STACK_FREE_CURRENT))) { - Optional.of(tlvReader.getLong(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))) - } else { - Optional.empty() - } - val stackSize = if (tlvReader.isNextTag(ContextSpecificTag(TAG_STACK_SIZE))) { - Optional.of(tlvReader.getLong(ContextSpecificTag(TAG_STACK_SIZE))) - } else { - Optional.empty() - } - + val name = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_NAME))) { + Optional.of(tlvReader.getString(ContextSpecificTag(TAG_NAME))) + } else { + Optional.empty() + } + val stackFreeCurrent = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_STACK_FREE_CURRENT))) { + Optional.of(tlvReader.getLong(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))) + } else { + Optional.empty() + } + val stackSize = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_STACK_SIZE))) { + Optional.of(tlvReader.getLong(ContextSpecificTag(TAG_STACK_SIZE))) + } else { + Optional.empty() + } + tlvReader.exitContainer() - return SoftwareDiagnosticsClusterThreadMetricsStruct(id, name, stackFreeCurrent, stackFreeMinimum, stackSize) + return SoftwareDiagnosticsClusterThreadMetricsStruct( + id, + name, + stackFreeCurrent, + stackFreeMinimum, + stackSize + ) } } } 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 475ba3c436fac7..403134993beaed 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 @@ -17,19 +17,13 @@ package chip.devicecontroller.cluster.structs import chip.devicecontroller.cluster.* -import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag -import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -import java.util.Optional - -class TargetNavigatorClusterTargetInfoStruct ( - val identifier: Int, - val name: String) { - override fun toString(): String = buildString { +class TargetNavigatorClusterTargetInfoStruct(val identifier: Int, val name: String) { + override fun toString(): String = buildString { append("TargetNavigatorClusterTargetInfoStruct {\n") append("\tidentifier : $identifier\n") append("\tname : $name\n") @@ -49,11 +43,11 @@ class TargetNavigatorClusterTargetInfoStruct ( private const val TAG_IDENTIFIER = 0 private const val TAG_NAME = 1 - fun fromTlv(tag: Tag, tlvReader: TlvReader) : TargetNavigatorClusterTargetInfoStruct { + fun fromTlv(tag: Tag, tlvReader: TlvReader): TargetNavigatorClusterTargetInfoStruct { tlvReader.enterStructure(tag) val identifier = tlvReader.getInt(ContextSpecificTag(TAG_IDENTIFIER)) val name = tlvReader.getString(ContextSpecificTag(TAG_NAME)) - + tlvReader.exitContainer() return TargetNavigatorClusterTargetInfoStruct(identifier, name) 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 f63d1bcf959e9e..cb432fb1e976b4 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 @@ -17,20 +17,17 @@ package chip.devicecontroller.cluster.structs import chip.devicecontroller.cluster.* -import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag -import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -import java.util.Optional - -class ThermostatClusterThermostatScheduleTransition ( - val transitionTime: Int, - val heatSetpoint: Int?, - val coolSetpoint: Int?) { - override fun toString(): String = buildString { +class ThermostatClusterThermostatScheduleTransition( + val transitionTime: Int, + val heatSetpoint: Int?, + val coolSetpoint: Int? +) { + override fun toString(): String = buildString { append("ThermostatClusterThermostatScheduleTransition {\n") append("\ttransitionTime : $transitionTime\n") append("\theatSetpoint : $heatSetpoint\n") @@ -43,15 +40,15 @@ class ThermostatClusterThermostatScheduleTransition ( startStructure(tag) put(ContextSpecificTag(TAG_TRANSITION_TIME), transitionTime) if (heatSetpoint != null) { - put(ContextSpecificTag(TAG_HEAT_SETPOINT), heatSetpoint) - } else { - putNull(ContextSpecificTag(TAG_HEAT_SETPOINT)) - } + put(ContextSpecificTag(TAG_HEAT_SETPOINT), heatSetpoint) + } else { + putNull(ContextSpecificTag(TAG_HEAT_SETPOINT)) + } if (coolSetpoint != null) { - put(ContextSpecificTag(TAG_COOL_SETPOINT), coolSetpoint) - } else { - putNull(ContextSpecificTag(TAG_COOL_SETPOINT)) - } + put(ContextSpecificTag(TAG_COOL_SETPOINT), coolSetpoint) + } else { + putNull(ContextSpecificTag(TAG_COOL_SETPOINT)) + } endStructure() } } @@ -61,25 +58,31 @@ class ThermostatClusterThermostatScheduleTransition ( private const val TAG_HEAT_SETPOINT = 1 private const val TAG_COOL_SETPOINT = 2 - fun fromTlv(tag: Tag, tlvReader: TlvReader) : ThermostatClusterThermostatScheduleTransition { + fun fromTlv(tag: Tag, tlvReader: TlvReader): ThermostatClusterThermostatScheduleTransition { tlvReader.enterStructure(tag) val transitionTime = tlvReader.getInt(ContextSpecificTag(TAG_TRANSITION_TIME)) - val heatSetpoint = if (!tlvReader.isNull()) { - tlvReader.getInt(ContextSpecificTag(TAG_HEAT_SETPOINT)) - } else { - tlvReader.getNull(ContextSpecificTag(TAG_HEAT_SETPOINT)) - null - } - val coolSetpoint = if (!tlvReader.isNull()) { - tlvReader.getInt(ContextSpecificTag(TAG_COOL_SETPOINT)) - } else { - tlvReader.getNull(ContextSpecificTag(TAG_COOL_SETPOINT)) - null - } - + val heatSetpoint = + if (!tlvReader.isNull()) { + tlvReader.getInt(ContextSpecificTag(TAG_HEAT_SETPOINT)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_HEAT_SETPOINT)) + null + } + val coolSetpoint = + if (!tlvReader.isNull()) { + tlvReader.getInt(ContextSpecificTag(TAG_COOL_SETPOINT)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_COOL_SETPOINT)) + null + } + tlvReader.exitContainer() - return ThermostatClusterThermostatScheduleTransition(transitionTime, heatSetpoint, coolSetpoint) + return ThermostatClusterThermostatScheduleTransition( + transitionTime, + heatSetpoint, + coolSetpoint + ) } } } 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 5fbc0d517459c1..4a7066df5d7f25 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 @@ -17,31 +17,28 @@ package chip.devicecontroller.cluster.structs import chip.devicecontroller.cluster.* -import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag -import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -import java.util.Optional - -class ThreadNetworkDiagnosticsClusterNeighborTableStruct ( - val extAddress: Long, - val age: Long, - val rloc16: Int, - val linkFrameCounter: Long, - val mleFrameCounter: Long, - val lqi: Int, - val averageRssi: Int?, - val lastRssi: Int?, - val frameErrorRate: Int, - val messageErrorRate: Int, - val rxOnWhenIdle: Boolean, - val fullThreadDevice: Boolean, - val fullNetworkData: Boolean, - val isChild: Boolean) { - override fun toString(): String = buildString { +class ThreadNetworkDiagnosticsClusterNeighborTableStruct( + val extAddress: Long, + val age: Long, + val rloc16: Int, + val linkFrameCounter: Long, + val mleFrameCounter: Long, + val lqi: Int, + val averageRssi: Int?, + val lastRssi: Int?, + val frameErrorRate: Int, + val messageErrorRate: Int, + val rxOnWhenIdle: Boolean, + val fullThreadDevice: Boolean, + val fullNetworkData: Boolean, + val isChild: Boolean +) { + override fun toString(): String = buildString { append("ThreadNetworkDiagnosticsClusterNeighborTableStruct {\n") append("\textAddress : $extAddress\n") append("\tage : $age\n") @@ -70,15 +67,15 @@ class ThreadNetworkDiagnosticsClusterNeighborTableStruct ( put(ContextSpecificTag(TAG_MLE_FRAME_COUNTER), mleFrameCounter) put(ContextSpecificTag(TAG_LQI), lqi) if (averageRssi != null) { - put(ContextSpecificTag(TAG_AVERAGE_RSSI), averageRssi) - } else { - putNull(ContextSpecificTag(TAG_AVERAGE_RSSI)) - } + put(ContextSpecificTag(TAG_AVERAGE_RSSI), averageRssi) + } else { + putNull(ContextSpecificTag(TAG_AVERAGE_RSSI)) + } if (lastRssi != null) { - put(ContextSpecificTag(TAG_LAST_RSSI), lastRssi) - } else { - putNull(ContextSpecificTag(TAG_LAST_RSSI)) - } + put(ContextSpecificTag(TAG_LAST_RSSI), lastRssi) + } else { + putNull(ContextSpecificTag(TAG_LAST_RSSI)) + } put(ContextSpecificTag(TAG_FRAME_ERROR_RATE), frameErrorRate) put(ContextSpecificTag(TAG_MESSAGE_ERROR_RATE), messageErrorRate) put(ContextSpecificTag(TAG_RX_ON_WHEN_IDLE), rxOnWhenIdle) @@ -105,7 +102,10 @@ class ThreadNetworkDiagnosticsClusterNeighborTableStruct ( private const val TAG_FULL_NETWORK_DATA = 12 private const val TAG_IS_CHILD = 13 - fun fromTlv(tag: Tag, tlvReader: TlvReader) : ThreadNetworkDiagnosticsClusterNeighborTableStruct { + fun fromTlv( + tag: Tag, + tlvReader: TlvReader + ): ThreadNetworkDiagnosticsClusterNeighborTableStruct { tlvReader.enterStructure(tag) val extAddress = tlvReader.getLong(ContextSpecificTag(TAG_EXT_ADDRESS)) val age = tlvReader.getLong(ContextSpecificTag(TAG_AGE)) @@ -113,28 +113,45 @@ class ThreadNetworkDiagnosticsClusterNeighborTableStruct ( 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)) - val averageRssi = if (!tlvReader.isNull()) { - tlvReader.getInt(ContextSpecificTag(TAG_AVERAGE_RSSI)) - } else { - tlvReader.getNull(ContextSpecificTag(TAG_AVERAGE_RSSI)) - null - } - val lastRssi = if (!tlvReader.isNull()) { - tlvReader.getInt(ContextSpecificTag(TAG_LAST_RSSI)) - } else { - tlvReader.getNull(ContextSpecificTag(TAG_LAST_RSSI)) - null - } + val averageRssi = + if (!tlvReader.isNull()) { + tlvReader.getInt(ContextSpecificTag(TAG_AVERAGE_RSSI)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_AVERAGE_RSSI)) + null + } + val lastRssi = + if (!tlvReader.isNull()) { + tlvReader.getInt(ContextSpecificTag(TAG_LAST_RSSI)) + } else { + 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 rxOnWhenIdle = tlvReader.getBoolean(ContextSpecificTag(TAG_RX_ON_WHEN_IDLE)) val fullThreadDevice = tlvReader.getBoolean(ContextSpecificTag(TAG_FULL_THREAD_DEVICE)) val fullNetworkData = tlvReader.getBoolean(ContextSpecificTag(TAG_FULL_NETWORK_DATA)) val isChild = tlvReader.getBoolean(ContextSpecificTag(TAG_IS_CHILD)) - + tlvReader.exitContainer() - return ThreadNetworkDiagnosticsClusterNeighborTableStruct(extAddress, age, rloc16, linkFrameCounter, mleFrameCounter, lqi, averageRssi, lastRssi, frameErrorRate, messageErrorRate, rxOnWhenIdle, fullThreadDevice, fullNetworkData, isChild) + return ThreadNetworkDiagnosticsClusterNeighborTableStruct( + extAddress, + age, + rloc16, + linkFrameCounter, + mleFrameCounter, + lqi, + averageRssi, + lastRssi, + frameErrorRate, + messageErrorRate, + rxOnWhenIdle, + fullThreadDevice, + fullNetworkData, + isChild + ) } } } 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 7276a7f3eccac4..f9764369891073 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 @@ -17,29 +17,26 @@ package chip.devicecontroller.cluster.structs import chip.devicecontroller.cluster.* -import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag -import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -import java.util.Optional - -class ThreadNetworkDiagnosticsClusterOperationalDatasetComponents ( - val activeTimestampPresent: Boolean, - val pendingTimestampPresent: Boolean, - val masterKeyPresent: Boolean, - val networkNamePresent: Boolean, - val extendedPanIdPresent: Boolean, - val meshLocalPrefixPresent: Boolean, - val delayPresent: Boolean, - val panIdPresent: Boolean, - val channelPresent: Boolean, - val pskcPresent: Boolean, - val securityPolicyPresent: Boolean, - val channelMaskPresent: Boolean) { - override fun toString(): String = buildString { +class ThreadNetworkDiagnosticsClusterOperationalDatasetComponents( + val activeTimestampPresent: Boolean, + val pendingTimestampPresent: Boolean, + val masterKeyPresent: Boolean, + val networkNamePresent: Boolean, + val extendedPanIdPresent: Boolean, + val meshLocalPrefixPresent: Boolean, + val delayPresent: Boolean, + val panIdPresent: Boolean, + val channelPresent: Boolean, + val pskcPresent: Boolean, + val securityPolicyPresent: Boolean, + val channelMaskPresent: Boolean +) { + override fun toString(): String = buildString { append("ThreadNetworkDiagnosticsClusterOperationalDatasetComponents {\n") append("\tactiveTimestampPresent : $activeTimestampPresent\n") append("\tpendingTimestampPresent : $pendingTimestampPresent\n") @@ -89,24 +86,45 @@ class ThreadNetworkDiagnosticsClusterOperationalDatasetComponents ( private const val TAG_SECURITY_POLICY_PRESENT = 10 private const val TAG_CHANNEL_MASK_PRESENT = 11 - fun fromTlv(tag: Tag, tlvReader: TlvReader) : ThreadNetworkDiagnosticsClusterOperationalDatasetComponents { + fun fromTlv( + tag: Tag, + tlvReader: TlvReader + ): ThreadNetworkDiagnosticsClusterOperationalDatasetComponents { tlvReader.enterStructure(tag) - val activeTimestampPresent = tlvReader.getBoolean(ContextSpecificTag(TAG_ACTIVE_TIMESTAMP_PRESENT)) - val pendingTimestampPresent = tlvReader.getBoolean(ContextSpecificTag(TAG_PENDING_TIMESTAMP_PRESENT)) + val activeTimestampPresent = + tlvReader.getBoolean(ContextSpecificTag(TAG_ACTIVE_TIMESTAMP_PRESENT)) + val pendingTimestampPresent = + tlvReader.getBoolean(ContextSpecificTag(TAG_PENDING_TIMESTAMP_PRESENT)) val masterKeyPresent = tlvReader.getBoolean(ContextSpecificTag(TAG_MASTER_KEY_PRESENT)) val networkNamePresent = tlvReader.getBoolean(ContextSpecificTag(TAG_NETWORK_NAME_PRESENT)) - val extendedPanIdPresent = tlvReader.getBoolean(ContextSpecificTag(TAG_EXTENDED_PAN_ID_PRESENT)) - val meshLocalPrefixPresent = tlvReader.getBoolean(ContextSpecificTag(TAG_MESH_LOCAL_PREFIX_PRESENT)) + val extendedPanIdPresent = + tlvReader.getBoolean(ContextSpecificTag(TAG_EXTENDED_PAN_ID_PRESENT)) + val meshLocalPrefixPresent = + tlvReader.getBoolean(ContextSpecificTag(TAG_MESH_LOCAL_PREFIX_PRESENT)) val delayPresent = tlvReader.getBoolean(ContextSpecificTag(TAG_DELAY_PRESENT)) val panIdPresent = tlvReader.getBoolean(ContextSpecificTag(TAG_PAN_ID_PRESENT)) val channelPresent = tlvReader.getBoolean(ContextSpecificTag(TAG_CHANNEL_PRESENT)) val pskcPresent = tlvReader.getBoolean(ContextSpecificTag(TAG_PSKC_PRESENT)) - val securityPolicyPresent = tlvReader.getBoolean(ContextSpecificTag(TAG_SECURITY_POLICY_PRESENT)) + val securityPolicyPresent = + tlvReader.getBoolean(ContextSpecificTag(TAG_SECURITY_POLICY_PRESENT)) val channelMaskPresent = tlvReader.getBoolean(ContextSpecificTag(TAG_CHANNEL_MASK_PRESENT)) - + tlvReader.exitContainer() - return ThreadNetworkDiagnosticsClusterOperationalDatasetComponents(activeTimestampPresent, pendingTimestampPresent, masterKeyPresent, networkNamePresent, extendedPanIdPresent, meshLocalPrefixPresent, delayPresent, panIdPresent, channelPresent, pskcPresent, securityPolicyPresent, channelMaskPresent) + return ThreadNetworkDiagnosticsClusterOperationalDatasetComponents( + activeTimestampPresent, + pendingTimestampPresent, + masterKeyPresent, + networkNamePresent, + extendedPanIdPresent, + meshLocalPrefixPresent, + delayPresent, + panIdPresent, + channelPresent, + pskcPresent, + securityPolicyPresent, + channelMaskPresent + ) } } } 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 c204266b42fcf5..8a7c423f84e6ad 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 @@ -17,27 +17,24 @@ package chip.devicecontroller.cluster.structs import chip.devicecontroller.cluster.* -import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag -import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -import java.util.Optional - -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 allocated: Boolean, - val linkEstablished: Boolean) { - override fun toString(): String = buildString { +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 allocated: Boolean, + val linkEstablished: Boolean +) { + override fun toString(): String = buildString { append("ThreadNetworkDiagnosticsClusterRouteTableStruct {\n") append("\textAddress : $extAddress\n") append("\trloc16 : $rloc16\n") @@ -81,7 +78,7 @@ class ThreadNetworkDiagnosticsClusterRouteTableStruct ( private const val TAG_ALLOCATED = 8 private const val TAG_LINK_ESTABLISHED = 9 - fun fromTlv(tag: Tag, tlvReader: TlvReader) : ThreadNetworkDiagnosticsClusterRouteTableStruct { + 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)) @@ -93,10 +90,21 @@ class ThreadNetworkDiagnosticsClusterRouteTableStruct ( val age = tlvReader.getInt(ContextSpecificTag(TAG_AGE)) val allocated = tlvReader.getBoolean(ContextSpecificTag(TAG_ALLOCATED)) val linkEstablished = tlvReader.getBoolean(ContextSpecificTag(TAG_LINK_ESTABLISHED)) - + tlvReader.exitContainer() - return ThreadNetworkDiagnosticsClusterRouteTableStruct(extAddress, rloc16, routerId, nextHop, pathCost, LQIIn, LQIOut, age, allocated, linkEstablished) + return ThreadNetworkDiagnosticsClusterRouteTableStruct( + extAddress, + rloc16, + routerId, + nextHop, + pathCost, + LQIIn, + LQIOut, + age, + allocated, + linkEstablished + ) } } } 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 d12f6e24c345f9..1474db405b9d43 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 @@ -17,19 +17,13 @@ package chip.devicecontroller.cluster.structs import chip.devicecontroller.cluster.* -import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag -import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -import java.util.Optional - -class ThreadNetworkDiagnosticsClusterSecurityPolicy ( - val rotationTime: Int, - val flags: Int) { - override fun toString(): String = buildString { +class ThreadNetworkDiagnosticsClusterSecurityPolicy(val rotationTime: Int, val flags: Int) { + override fun toString(): String = buildString { append("ThreadNetworkDiagnosticsClusterSecurityPolicy {\n") append("\trotationTime : $rotationTime\n") append("\tflags : $flags\n") @@ -49,11 +43,11 @@ class ThreadNetworkDiagnosticsClusterSecurityPolicy ( private const val TAG_ROTATION_TIME = 0 private const val TAG_FLAGS = 1 - fun fromTlv(tag: Tag, tlvReader: TlvReader) : ThreadNetworkDiagnosticsClusterSecurityPolicy { + 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)) - + tlvReader.exitContainer() return ThreadNetworkDiagnosticsClusterSecurityPolicy(rotationTime, flags) 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 be643cca35be70..d770d7a2ac8e03 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 @@ -17,20 +17,17 @@ package chip.devicecontroller.cluster.structs import chip.devicecontroller.cluster.* -import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag -import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -import java.util.Optional - -class TimeSynchronizationClusterDSTOffsetStruct ( - val offset: Long, - val validStarting: Long, - val validUntil: Long?) { - override fun toString(): String = buildString { +class TimeSynchronizationClusterDSTOffsetStruct( + val offset: Long, + val validStarting: Long, + val validUntil: Long? +) { + override fun toString(): String = buildString { append("TimeSynchronizationClusterDSTOffsetStruct {\n") append("\toffset : $offset\n") append("\tvalidStarting : $validStarting\n") @@ -44,10 +41,10 @@ class TimeSynchronizationClusterDSTOffsetStruct ( put(ContextSpecificTag(TAG_OFFSET), offset) put(ContextSpecificTag(TAG_VALID_STARTING), validStarting) if (validUntil != null) { - put(ContextSpecificTag(TAG_VALID_UNTIL), validUntil) - } else { - putNull(ContextSpecificTag(TAG_VALID_UNTIL)) - } + put(ContextSpecificTag(TAG_VALID_UNTIL), validUntil) + } else { + putNull(ContextSpecificTag(TAG_VALID_UNTIL)) + } endStructure() } } @@ -57,17 +54,18 @@ class TimeSynchronizationClusterDSTOffsetStruct ( private const val TAG_VALID_STARTING = 1 private const val TAG_VALID_UNTIL = 2 - fun fromTlv(tag: Tag, tlvReader: TlvReader) : TimeSynchronizationClusterDSTOffsetStruct { + fun fromTlv(tag: Tag, tlvReader: TlvReader): TimeSynchronizationClusterDSTOffsetStruct { tlvReader.enterStructure(tag) val offset = tlvReader.getLong(ContextSpecificTag(TAG_OFFSET)) val validStarting = tlvReader.getLong(ContextSpecificTag(TAG_VALID_STARTING)) - val validUntil = if (!tlvReader.isNull()) { - tlvReader.getLong(ContextSpecificTag(TAG_VALID_UNTIL)) - } else { - tlvReader.getNull(ContextSpecificTag(TAG_VALID_UNTIL)) - null - } - + val validUntil = + if (!tlvReader.isNull()) { + tlvReader.getLong(ContextSpecificTag(TAG_VALID_UNTIL)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_VALID_UNTIL)) + null + } + tlvReader.exitContainer() return TimeSynchronizationClusterDSTOffsetStruct(offset, validStarting, validUntil) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/TimeSynchronizationClusterFabricScopedTrustedTimeSourceStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/TimeSynchronizationClusterFabricScopedTrustedTimeSourceStruct.kt index 8c3acf12fe54e8..7a2e95c671517a 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 @@ -17,19 +17,16 @@ package chip.devicecontroller.cluster.structs import chip.devicecontroller.cluster.* -import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag -import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -import java.util.Optional - -class TimeSynchronizationClusterFabricScopedTrustedTimeSourceStruct ( - val nodeID: Long, - val endpoint: Int) { - override fun toString(): String = buildString { +class TimeSynchronizationClusterFabricScopedTrustedTimeSourceStruct( + val nodeID: Long, + val endpoint: Int +) { + override fun toString(): String = buildString { append("TimeSynchronizationClusterFabricScopedTrustedTimeSourceStruct {\n") append("\tnodeID : $nodeID\n") append("\tendpoint : $endpoint\n") @@ -49,11 +46,14 @@ class TimeSynchronizationClusterFabricScopedTrustedTimeSourceStruct ( private const val TAG_NODE_I_D = 0 private const val TAG_ENDPOINT = 1 - fun fromTlv(tag: Tag, tlvReader: TlvReader) : TimeSynchronizationClusterFabricScopedTrustedTimeSourceStruct { + fun fromTlv( + tag: Tag, + tlvReader: TlvReader + ): TimeSynchronizationClusterFabricScopedTrustedTimeSourceStruct { tlvReader.enterStructure(tag) val nodeID = tlvReader.getLong(ContextSpecificTag(TAG_NODE_I_D)) val endpoint = tlvReader.getInt(ContextSpecificTag(TAG_ENDPOINT)) - + tlvReader.exitContainer() return TimeSynchronizationClusterFabricScopedTrustedTimeSourceStruct(nodeID, endpoint) 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 11bdbff1851eaf..8a256fd7edfefe 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 @@ -17,20 +17,18 @@ package chip.devicecontroller.cluster.structs import chip.devicecontroller.cluster.* -import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag -import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter - import java.util.Optional -class TimeSynchronizationClusterTimeZoneStruct ( - val offset: Long, - val validAt: Long, - val name: Optional) { - override fun toString(): String = buildString { +class TimeSynchronizationClusterTimeZoneStruct( + val offset: Long, + val validAt: Long, + val name: Optional +) { + override fun toString(): String = buildString { append("TimeSynchronizationClusterTimeZoneStruct {\n") append("\toffset : $offset\n") append("\tvalidAt : $validAt\n") @@ -44,9 +42,9 @@ class TimeSynchronizationClusterTimeZoneStruct ( put(ContextSpecificTag(TAG_OFFSET), offset) put(ContextSpecificTag(TAG_VALID_AT), validAt) if (name.isPresent) { - val optname = name.get() - put(ContextSpecificTag(TAG_NAME), optname) - } + val optname = name.get() + put(ContextSpecificTag(TAG_NAME), optname) + } endStructure() } } @@ -56,16 +54,17 @@ class TimeSynchronizationClusterTimeZoneStruct ( private const val TAG_VALID_AT = 1 private const val TAG_NAME = 2 - fun fromTlv(tag: Tag, tlvReader: TlvReader) : TimeSynchronizationClusterTimeZoneStruct { + fun fromTlv(tag: Tag, tlvReader: TlvReader): TimeSynchronizationClusterTimeZoneStruct { tlvReader.enterStructure(tag) val offset = tlvReader.getLong(ContextSpecificTag(TAG_OFFSET)) val validAt = tlvReader.getLong(ContextSpecificTag(TAG_VALID_AT)) - val name = if (tlvReader.isNextTag(ContextSpecificTag(TAG_NAME))) { - Optional.of(tlvReader.getString(ContextSpecificTag(TAG_NAME))) - } else { - Optional.empty() - } - + val name = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_NAME))) { + Optional.of(tlvReader.getString(ContextSpecificTag(TAG_NAME))) + } else { + Optional.empty() + } + tlvReader.exitContainer() return TimeSynchronizationClusterTimeZoneStruct(offset, validAt, name) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/TimeSynchronizationClusterTrustedTimeSourceStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/TimeSynchronizationClusterTrustedTimeSourceStruct.kt index 668f0c1e923143..db50619ad5da53 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 @@ -17,20 +17,17 @@ package chip.devicecontroller.cluster.structs import chip.devicecontroller.cluster.* -import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag -import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -import java.util.Optional - -class TimeSynchronizationClusterTrustedTimeSourceStruct ( - val fabricIndex: Int, - val nodeID: Long, - val endpoint: Int) { - override fun toString(): String = buildString { +class TimeSynchronizationClusterTrustedTimeSourceStruct( + val fabricIndex: Int, + val nodeID: Long, + val endpoint: Int +) { + override fun toString(): String = buildString { append("TimeSynchronizationClusterTrustedTimeSourceStruct {\n") append("\tfabricIndex : $fabricIndex\n") append("\tnodeID : $nodeID\n") @@ -53,12 +50,12 @@ class TimeSynchronizationClusterTrustedTimeSourceStruct ( private const val TAG_NODE_I_D = 1 private const val TAG_ENDPOINT = 2 - fun fromTlv(tag: Tag, tlvReader: TlvReader) : TimeSynchronizationClusterTrustedTimeSourceStruct { + 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)) - + tlvReader.exitContainer() return TimeSynchronizationClusterTrustedTimeSourceStruct(fabricIndex, nodeID, endpoint) 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 ed3e7a0ef74243..bd34e9f5a90c49 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 @@ -20,15 +20,11 @@ import chip.devicecontroller.cluster.* import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag -import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -import java.util.Optional - -class UnitTestingClusterDoubleNestedStructList ( - val a: List) { - override fun toString(): String = buildString { +class UnitTestingClusterDoubleNestedStructList(val a: List) { + override fun toString(): String = buildString { append("UnitTestingClusterDoubleNestedStructList {\n") append("\ta : $a\n") append("}\n") @@ -49,16 +45,17 @@ class UnitTestingClusterDoubleNestedStructList ( companion object { private const val TAG_A = 0 - fun fromTlv(tag: Tag, tlvReader: TlvReader) : UnitTestingClusterDoubleNestedStructList { + fun fromTlv(tag: Tag, tlvReader: TlvReader): UnitTestingClusterDoubleNestedStructList { tlvReader.enterStructure(tag) - val a = buildList { - tlvReader.enterList(ContextSpecificTag(TAG_A)) - while(!tlvReader.isEndOfContainer()) { - add(UnitTestingClusterNestedStructList.fromTlv(AnonymousTag, tlvReader)) - } - tlvReader.exitContainer() - } - + val a = + buildList { + tlvReader.enterList(ContextSpecificTag(TAG_A)) + while (!tlvReader.isEndOfContainer()) { + add(UnitTestingClusterNestedStructList.fromTlv(AnonymousTag, tlvReader)) + } + tlvReader.exitContainer() + } + tlvReader.exitContainer() return UnitTestingClusterDoubleNestedStructList(a) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/UnitTestingClusterNestedStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/UnitTestingClusterNestedStruct.kt index c0de5e08f6886b..7ca3b0b29aab01 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 @@ -17,20 +17,17 @@ package chip.devicecontroller.cluster.structs import chip.devicecontroller.cluster.* -import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag -import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -import java.util.Optional - -class UnitTestingClusterNestedStruct ( - val a: Int, - val b: Boolean, - val c: UnitTestingClusterSimpleStruct) { - override fun toString(): String = buildString { +class UnitTestingClusterNestedStruct( + val a: Int, + val b: Boolean, + val c: UnitTestingClusterSimpleStruct +) { + override fun toString(): String = buildString { append("UnitTestingClusterNestedStruct {\n") append("\ta : $a\n") append("\tb : $b\n") @@ -53,12 +50,12 @@ class UnitTestingClusterNestedStruct ( private const val TAG_B = 1 private const val TAG_C = 2 - fun fromTlv(tag: Tag, tlvReader: TlvReader) : UnitTestingClusterNestedStruct { + fun fromTlv(tag: Tag, tlvReader: TlvReader): UnitTestingClusterNestedStruct { tlvReader.enterStructure(tag) val a = tlvReader.getInt(ContextSpecificTag(TAG_A)) val b = tlvReader.getBoolean(ContextSpecificTag(TAG_B)) val c = UnitTestingClusterSimpleStruct.fromTlv(ContextSpecificTag(TAG_C), tlvReader) - + tlvReader.exitContainer() return UnitTestingClusterNestedStruct(a, b, c) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/UnitTestingClusterNestedStructList.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/UnitTestingClusterNestedStructList.kt index 9b41c3e439e192..b954fe0ec9879b 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 @@ -20,21 +20,19 @@ import chip.devicecontroller.cluster.* import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag -import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -import java.util.Optional - -class UnitTestingClusterNestedStructList ( - val a: Int, - val b: Boolean, - val c: UnitTestingClusterSimpleStruct, - val d: List, - val e: List, - val f: List, - val g: List) { - override fun toString(): String = buildString { +class UnitTestingClusterNestedStructList( + val a: Int, + val b: Boolean, + val c: UnitTestingClusterSimpleStruct, + val d: List, + val e: List, + val f: List, + val g: List +) { + override fun toString(): String = buildString { append("UnitTestingClusterNestedStructList {\n") append("\ta : $a\n") append("\tb : $b\n") @@ -85,40 +83,44 @@ class UnitTestingClusterNestedStructList ( private const val TAG_F = 5 private const val TAG_G = 6 - fun fromTlv(tag: Tag, tlvReader: TlvReader) : UnitTestingClusterNestedStructList { + fun fromTlv(tag: Tag, tlvReader: TlvReader): UnitTestingClusterNestedStructList { tlvReader.enterStructure(tag) val a = tlvReader.getInt(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)) - while(!tlvReader.isEndOfContainer()) { - add(UnitTestingClusterSimpleStruct.fromTlv(AnonymousTag, tlvReader)) - } - tlvReader.exitContainer() - } - val e = buildList { - tlvReader.enterList(ContextSpecificTag(TAG_E)) - while(!tlvReader.isEndOfContainer()) { - add(tlvReader.getLong(AnonymousTag)) - } - tlvReader.exitContainer() - } - val f = buildList { - tlvReader.enterList(ContextSpecificTag(TAG_F)) - while(!tlvReader.isEndOfContainer()) { - add(tlvReader.getByteArray(AnonymousTag)) - } - tlvReader.exitContainer() - } - val g = buildList { - tlvReader.enterList(ContextSpecificTag(TAG_G)) - while(!tlvReader.isEndOfContainer()) { - add(tlvReader.getInt(AnonymousTag)) - } - tlvReader.exitContainer() - } - + val d = + buildList { + tlvReader.enterList(ContextSpecificTag(TAG_D)) + while (!tlvReader.isEndOfContainer()) { + add(UnitTestingClusterSimpleStruct.fromTlv(AnonymousTag, tlvReader)) + } + tlvReader.exitContainer() + } + val e = + buildList { + tlvReader.enterList(ContextSpecificTag(TAG_E)) + while (!tlvReader.isEndOfContainer()) { + add(tlvReader.getLong(AnonymousTag)) + } + tlvReader.exitContainer() + } + val f = + buildList { + tlvReader.enterList(ContextSpecificTag(TAG_F)) + while (!tlvReader.isEndOfContainer()) { + add(tlvReader.getByteArray(AnonymousTag)) + } + tlvReader.exitContainer() + } + val g = + buildList { + tlvReader.enterList(ContextSpecificTag(TAG_G)) + while (!tlvReader.isEndOfContainer()) { + add(tlvReader.getInt(AnonymousTag)) + } + tlvReader.exitContainer() + } + tlvReader.exitContainer() return UnitTestingClusterNestedStructList(a, b, c, d, e, f, g) 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 1533278b6a1fac..08a4b642e69d45 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 @@ -20,26 +20,25 @@ import chip.devicecontroller.cluster.* import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag -import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter - import java.util.Optional -class UnitTestingClusterNullablesAndOptionalsStruct ( - val nullableInt: Int?, - val optionalInt: Optional, - val nullableOptionalInt: Optional?, - val nullableString: String?, - val optionalString: Optional, - val nullableOptionalString: Optional?, - val nullableStruct: UnitTestingClusterSimpleStruct?, - val optionalStruct: Optional, - val nullableOptionalStruct: Optional?, - val nullableList: List?, - val optionalList: Optional>, - val nullableOptionalList: Optional>?) { - override fun toString(): String = buildString { +class UnitTestingClusterNullablesAndOptionalsStruct( + val nullableInt: Int?, + val optionalInt: Optional, + val nullableOptionalInt: Optional?, + val nullableString: String?, + val optionalString: Optional, + val nullableOptionalString: Optional?, + val nullableStruct: UnitTestingClusterSimpleStruct?, + val optionalStruct: Optional, + val nullableOptionalStruct: Optional?, + val nullableList: List?, + val optionalList: Optional>, + val nullableOptionalList: Optional>? +) { + override fun toString(): String = buildString { append("UnitTestingClusterNullablesAndOptionalsStruct {\n") append("\tnullableInt : $nullableInt\n") append("\toptionalInt : $optionalInt\n") @@ -60,85 +59,85 @@ class UnitTestingClusterNullablesAndOptionalsStruct ( tlvWriter.apply { startStructure(tag) if (nullableInt != null) { - put(ContextSpecificTag(TAG_NULLABLE_INT), nullableInt) - } else { - putNull(ContextSpecificTag(TAG_NULLABLE_INT)) - } + put(ContextSpecificTag(TAG_NULLABLE_INT), nullableInt) + } else { + putNull(ContextSpecificTag(TAG_NULLABLE_INT)) + } if (optionalInt.isPresent) { - val optoptionalInt = optionalInt.get() - put(ContextSpecificTag(TAG_OPTIONAL_INT), optoptionalInt) - } + val optoptionalInt = optionalInt.get() + put(ContextSpecificTag(TAG_OPTIONAL_INT), optoptionalInt) + } if (nullableOptionalInt != null) { - if (nullableOptionalInt.isPresent) { - val optnullableOptionalInt = nullableOptionalInt.get() - put(ContextSpecificTag(TAG_NULLABLE_OPTIONAL_INT), optnullableOptionalInt) - } - } else { - putNull(ContextSpecificTag(TAG_NULLABLE_OPTIONAL_INT)) - } + if (nullableOptionalInt.isPresent) { + val optnullableOptionalInt = nullableOptionalInt.get() + put(ContextSpecificTag(TAG_NULLABLE_OPTIONAL_INT), optnullableOptionalInt) + } + } else { + putNull(ContextSpecificTag(TAG_NULLABLE_OPTIONAL_INT)) + } if (nullableString != null) { - put(ContextSpecificTag(TAG_NULLABLE_STRING), nullableString) - } else { - putNull(ContextSpecificTag(TAG_NULLABLE_STRING)) - } + put(ContextSpecificTag(TAG_NULLABLE_STRING), nullableString) + } else { + putNull(ContextSpecificTag(TAG_NULLABLE_STRING)) + } if (optionalString.isPresent) { - val optoptionalString = optionalString.get() - put(ContextSpecificTag(TAG_OPTIONAL_STRING), optoptionalString) - } + val optoptionalString = optionalString.get() + put(ContextSpecificTag(TAG_OPTIONAL_STRING), optoptionalString) + } if (nullableOptionalString != null) { - if (nullableOptionalString.isPresent) { - val optnullableOptionalString = nullableOptionalString.get() - put(ContextSpecificTag(TAG_NULLABLE_OPTIONAL_STRING), optnullableOptionalString) - } - } else { - putNull(ContextSpecificTag(TAG_NULLABLE_OPTIONAL_STRING)) - } + if (nullableOptionalString.isPresent) { + val optnullableOptionalString = nullableOptionalString.get() + put(ContextSpecificTag(TAG_NULLABLE_OPTIONAL_STRING), optnullableOptionalString) + } + } else { + putNull(ContextSpecificTag(TAG_NULLABLE_OPTIONAL_STRING)) + } if (nullableStruct != null) { - nullableStruct.toTlv(ContextSpecificTag(TAG_NULLABLE_STRUCT), this) - } else { - putNull(ContextSpecificTag(TAG_NULLABLE_STRUCT)) - } + nullableStruct.toTlv(ContextSpecificTag(TAG_NULLABLE_STRUCT), this) + } else { + putNull(ContextSpecificTag(TAG_NULLABLE_STRUCT)) + } if (optionalStruct.isPresent) { - val optoptionalStruct = optionalStruct.get() - optoptionalStruct.toTlv(ContextSpecificTag(TAG_OPTIONAL_STRUCT), this) - } + val optoptionalStruct = optionalStruct.get() + optoptionalStruct.toTlv(ContextSpecificTag(TAG_OPTIONAL_STRUCT), this) + } if (nullableOptionalStruct != null) { - if (nullableOptionalStruct.isPresent) { - val optnullableOptionalStruct = nullableOptionalStruct.get() - optnullableOptionalStruct.toTlv(ContextSpecificTag(TAG_NULLABLE_OPTIONAL_STRUCT), this) - } - } else { - putNull(ContextSpecificTag(TAG_NULLABLE_OPTIONAL_STRUCT)) - } + if (nullableOptionalStruct.isPresent) { + val optnullableOptionalStruct = nullableOptionalStruct.get() + optnullableOptionalStruct.toTlv(ContextSpecificTag(TAG_NULLABLE_OPTIONAL_STRUCT), this) + } + } else { + putNull(ContextSpecificTag(TAG_NULLABLE_OPTIONAL_STRUCT)) + } if (nullableList != null) { - startList(ContextSpecificTag(TAG_NULLABLE_LIST)) - for (item in nullableList.iterator()) { - put(AnonymousTag, item) + startList(ContextSpecificTag(TAG_NULLABLE_LIST)) + for (item in nullableList.iterator()) { + put(AnonymousTag, item) + } + endList() + } else { + putNull(ContextSpecificTag(TAG_NULLABLE_LIST)) } - endList() - } else { - putNull(ContextSpecificTag(TAG_NULLABLE_LIST)) - } if (optionalList.isPresent) { - val optoptionalList = optionalList.get() - startList(ContextSpecificTag(TAG_OPTIONAL_LIST)) - for (item in optoptionalList.iterator()) { - put(AnonymousTag, item) + val optoptionalList = optionalList.get() + startList(ContextSpecificTag(TAG_OPTIONAL_LIST)) + for (item in optoptionalList.iterator()) { + put(AnonymousTag, item) + } + endList() } - endList() - } if (nullableOptionalList != null) { - if (nullableOptionalList.isPresent) { - val optnullableOptionalList = nullableOptionalList.get() - startList(ContextSpecificTag(TAG_NULLABLE_OPTIONAL_LIST)) - for (item in optnullableOptionalList.iterator()) { - put(AnonymousTag, item) + if (nullableOptionalList.isPresent) { + val optnullableOptionalList = nullableOptionalList.get() + startList(ContextSpecificTag(TAG_NULLABLE_OPTIONAL_LIST)) + for (item in optnullableOptionalList.iterator()) { + put(AnonymousTag, item) + } + endList() + } + } else { + putNull(ContextSpecificTag(TAG_NULLABLE_OPTIONAL_LIST)) } - endList() - } - } else { - putNull(ContextSpecificTag(TAG_NULLABLE_OPTIONAL_LIST)) - } endStructure() } } @@ -157,114 +156,153 @@ class UnitTestingClusterNullablesAndOptionalsStruct ( private const val TAG_OPTIONAL_LIST = 10 private const val TAG_NULLABLE_OPTIONAL_LIST = 11 - fun fromTlv(tag: Tag, tlvReader: TlvReader) : UnitTestingClusterNullablesAndOptionalsStruct { + fun fromTlv(tag: Tag, tlvReader: TlvReader): UnitTestingClusterNullablesAndOptionalsStruct { tlvReader.enterStructure(tag) - val nullableInt = if (!tlvReader.isNull()) { - tlvReader.getInt(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))) - } 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))) - } else { - Optional.empty() - } - } else { - tlvReader.getNull(ContextSpecificTag(TAG_NULLABLE_OPTIONAL_INT)) - null - } - val nullableString = if (!tlvReader.isNull()) { - tlvReader.getString(ContextSpecificTag(TAG_NULLABLE_STRING)) - } else { - tlvReader.getNull(ContextSpecificTag(TAG_NULLABLE_STRING)) - null - } - val optionalString = if (tlvReader.isNextTag(ContextSpecificTag(TAG_OPTIONAL_STRING))) { - Optional.of(tlvReader.getString(ContextSpecificTag(TAG_OPTIONAL_STRING))) - } else { - Optional.empty() - } - val nullableOptionalString = if (!tlvReader.isNull()) { - if (tlvReader.isNextTag(ContextSpecificTag(TAG_NULLABLE_OPTIONAL_STRING))) { - Optional.of(tlvReader.getString(ContextSpecificTag(TAG_NULLABLE_OPTIONAL_STRING))) - } else { - Optional.empty() - } - } else { - tlvReader.getNull(ContextSpecificTag(TAG_NULLABLE_OPTIONAL_STRING)) - null - } - val nullableStruct = if (!tlvReader.isNull()) { - UnitTestingClusterSimpleStruct.fromTlv(ContextSpecificTag(TAG_NULLABLE_STRUCT), tlvReader) - } else { - tlvReader.getNull(ContextSpecificTag(TAG_NULLABLE_STRUCT)) - null - } - val optionalStruct = if (tlvReader.isNextTag(ContextSpecificTag(TAG_OPTIONAL_STRUCT))) { - Optional.of(UnitTestingClusterSimpleStruct.fromTlv(ContextSpecificTag(TAG_OPTIONAL_STRUCT), tlvReader)) - } else { - Optional.empty() - } - val nullableOptionalStruct = if (!tlvReader.isNull()) { - if (tlvReader.isNextTag(ContextSpecificTag(TAG_NULLABLE_OPTIONAL_STRUCT))) { - Optional.of(UnitTestingClusterSimpleStruct.fromTlv(ContextSpecificTag(TAG_NULLABLE_OPTIONAL_STRUCT), tlvReader)) - } else { - Optional.empty() - } - } else { - tlvReader.getNull(ContextSpecificTag(TAG_NULLABLE_OPTIONAL_STRUCT)) - null - } - val nullableList = if (!tlvReader.isNull()) { - buildList { - tlvReader.enterList(ContextSpecificTag(TAG_NULLABLE_LIST)) - while(!tlvReader.isEndOfContainer()) { - add(tlvReader.getInt(AnonymousTag)) - } - tlvReader.exitContainer() - } - } else { - tlvReader.getNull(ContextSpecificTag(TAG_NULLABLE_LIST)) - null - } - val optionalList = if (tlvReader.isNextTag(ContextSpecificTag(TAG_OPTIONAL_LIST))) { - Optional.of(buildList { - tlvReader.enterList(ContextSpecificTag(TAG_OPTIONAL_LIST)) - while(!tlvReader.isEndOfContainer()) { - add(tlvReader.getInt(AnonymousTag)) - } - tlvReader.exitContainer() - }) - } else { - Optional.empty() - } - val nullableOptionalList = if (!tlvReader.isNull()) { - if (tlvReader.isNextTag(ContextSpecificTag(TAG_NULLABLE_OPTIONAL_LIST))) { - Optional.of(buildList { - tlvReader.enterList(ContextSpecificTag(TAG_NULLABLE_OPTIONAL_LIST)) - while(!tlvReader.isEndOfContainer()) { - add(tlvReader.getInt(AnonymousTag)) - } - tlvReader.exitContainer() - }) - } else { - Optional.empty() - } - } else { - tlvReader.getNull(ContextSpecificTag(TAG_NULLABLE_OPTIONAL_LIST)) - null - } - + val nullableInt = + if (!tlvReader.isNull()) { + tlvReader.getInt(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))) + } 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))) + } else { + Optional.empty() + } + } else { + tlvReader.getNull(ContextSpecificTag(TAG_NULLABLE_OPTIONAL_INT)) + null + } + val nullableString = + if (!tlvReader.isNull()) { + tlvReader.getString(ContextSpecificTag(TAG_NULLABLE_STRING)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_NULLABLE_STRING)) + null + } + val optionalString = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_OPTIONAL_STRING))) { + Optional.of(tlvReader.getString(ContextSpecificTag(TAG_OPTIONAL_STRING))) + } else { + Optional.empty() + } + val nullableOptionalString = + if (!tlvReader.isNull()) { + if (tlvReader.isNextTag(ContextSpecificTag(TAG_NULLABLE_OPTIONAL_STRING))) { + Optional.of(tlvReader.getString(ContextSpecificTag(TAG_NULLABLE_OPTIONAL_STRING))) + } else { + Optional.empty() + } + } else { + tlvReader.getNull(ContextSpecificTag(TAG_NULLABLE_OPTIONAL_STRING)) + null + } + val nullableStruct = + if (!tlvReader.isNull()) { + UnitTestingClusterSimpleStruct.fromTlv(ContextSpecificTag(TAG_NULLABLE_STRUCT), tlvReader) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_NULLABLE_STRUCT)) + null + } + val optionalStruct = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_OPTIONAL_STRUCT))) { + Optional.of( + UnitTestingClusterSimpleStruct.fromTlv( + ContextSpecificTag(TAG_OPTIONAL_STRUCT), + tlvReader + ) + ) + } else { + Optional.empty() + } + val nullableOptionalStruct = + if (!tlvReader.isNull()) { + if (tlvReader.isNextTag(ContextSpecificTag(TAG_NULLABLE_OPTIONAL_STRUCT))) { + Optional.of( + UnitTestingClusterSimpleStruct.fromTlv( + ContextSpecificTag(TAG_NULLABLE_OPTIONAL_STRUCT), + tlvReader + ) + ) + } else { + Optional.empty() + } + } else { + tlvReader.getNull(ContextSpecificTag(TAG_NULLABLE_OPTIONAL_STRUCT)) + null + } + val nullableList = + if (!tlvReader.isNull()) { + buildList { + tlvReader.enterList(ContextSpecificTag(TAG_NULLABLE_LIST)) + while (!tlvReader.isEndOfContainer()) { + add(tlvReader.getInt(AnonymousTag)) + } + tlvReader.exitContainer() + } + } else { + tlvReader.getNull(ContextSpecificTag(TAG_NULLABLE_LIST)) + null + } + val optionalList = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_OPTIONAL_LIST))) { + Optional.of( + buildList { + tlvReader.enterList(ContextSpecificTag(TAG_OPTIONAL_LIST)) + while (!tlvReader.isEndOfContainer()) { + add(tlvReader.getInt(AnonymousTag)) + } + tlvReader.exitContainer() + } + ) + } else { + Optional.empty() + } + val nullableOptionalList = + if (!tlvReader.isNull()) { + if (tlvReader.isNextTag(ContextSpecificTag(TAG_NULLABLE_OPTIONAL_LIST))) { + Optional.of( + buildList { + tlvReader.enterList(ContextSpecificTag(TAG_NULLABLE_OPTIONAL_LIST)) + while (!tlvReader.isEndOfContainer()) { + add(tlvReader.getInt(AnonymousTag)) + } + tlvReader.exitContainer() + } + ) + } else { + Optional.empty() + } + } else { + tlvReader.getNull(ContextSpecificTag(TAG_NULLABLE_OPTIONAL_LIST)) + null + } + tlvReader.exitContainer() - return UnitTestingClusterNullablesAndOptionalsStruct(nullableInt, optionalInt, nullableOptionalInt, nullableString, optionalString, nullableOptionalString, nullableStruct, optionalStruct, nullableOptionalStruct, nullableList, optionalList, nullableOptionalList) + return UnitTestingClusterNullablesAndOptionalsStruct( + nullableInt, + optionalInt, + nullableOptionalInt, + nullableString, + optionalString, + nullableOptionalString, + nullableStruct, + optionalStruct, + nullableOptionalStruct, + nullableList, + optionalList, + nullableOptionalList + ) } } } 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 381016bd583fa5..26bf18a07ed214 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 @@ -17,25 +17,22 @@ package chip.devicecontroller.cluster.structs import chip.devicecontroller.cluster.* -import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag -import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -import java.util.Optional - -class UnitTestingClusterSimpleStruct ( - val a: Int, - val b: Boolean, - val c: Int, - val d: ByteArray, - val e: String, - val f: Int, - val g: Float, - val h: Double) { - override fun toString(): String = buildString { +class UnitTestingClusterSimpleStruct( + val a: Int, + val b: Boolean, + val c: Int, + val d: ByteArray, + val e: String, + val f: Int, + val g: Float, + val h: Double +) { + override fun toString(): String = buildString { append("UnitTestingClusterSimpleStruct {\n") append("\ta : $a\n") append("\tb : $b\n") @@ -73,7 +70,7 @@ class UnitTestingClusterSimpleStruct ( private const val TAG_G = 6 private const val TAG_H = 7 - fun fromTlv(tag: Tag, tlvReader: TlvReader) : UnitTestingClusterSimpleStruct { + fun fromTlv(tag: Tag, tlvReader: TlvReader): UnitTestingClusterSimpleStruct { tlvReader.enterStructure(tag) val a = tlvReader.getInt(ContextSpecificTag(TAG_A)) val b = tlvReader.getBoolean(ContextSpecificTag(TAG_B)) @@ -83,7 +80,7 @@ class UnitTestingClusterSimpleStruct ( val f = tlvReader.getInt(ContextSpecificTag(TAG_F)) val g = tlvReader.getFloat(ContextSpecificTag(TAG_G)) val h = tlvReader.getDouble(ContextSpecificTag(TAG_H)) - + tlvReader.exitContainer() return UnitTestingClusterSimpleStruct(a, b, c, d, e, f, g, h) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/UnitTestingClusterTestFabricScoped.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/UnitTestingClusterTestFabricScoped.kt index 8a7b42ba939ae6..6b7273f3172d5d 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 @@ -20,22 +20,21 @@ import chip.devicecontroller.cluster.* import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag -import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter - import java.util.Optional -class UnitTestingClusterTestFabricScoped ( - val fabricSensitiveInt8u: Int, - val optionalFabricSensitiveInt8u: Optional, - val nullableFabricSensitiveInt8u: Int?, - val nullableOptionalFabricSensitiveInt8u: Optional?, - val fabricSensitiveCharString: String, - val fabricSensitiveStruct: UnitTestingClusterSimpleStruct, - val fabricSensitiveInt8uList: List, - val fabricIndex: Int) { - override fun toString(): String = buildString { +class UnitTestingClusterTestFabricScoped( + val fabricSensitiveInt8u: Int, + val optionalFabricSensitiveInt8u: Optional, + val nullableFabricSensitiveInt8u: Int?, + val nullableOptionalFabricSensitiveInt8u: Optional?, + val fabricSensitiveCharString: String, + val fabricSensitiveStruct: UnitTestingClusterSimpleStruct, + val fabricSensitiveInt8uList: List, + val fabricIndex: Int +) { + override fun toString(): String = buildString { append("UnitTestingClusterTestFabricScoped {\n") append("\tfabricSensitiveInt8u : $fabricSensitiveInt8u\n") append("\toptionalFabricSensitiveInt8u : $optionalFabricSensitiveInt8u\n") @@ -53,22 +52,28 @@ class UnitTestingClusterTestFabricScoped ( startStructure(tag) put(ContextSpecificTag(TAG_FABRIC_SENSITIVE_INT8U), fabricSensitiveInt8u) if (optionalFabricSensitiveInt8u.isPresent) { - val optoptionalFabricSensitiveInt8u = optionalFabricSensitiveInt8u.get() - put(ContextSpecificTag(TAG_OPTIONAL_FABRIC_SENSITIVE_INT8U), optoptionalFabricSensitiveInt8u) - } + val optoptionalFabricSensitiveInt8u = optionalFabricSensitiveInt8u.get() + put( + ContextSpecificTag(TAG_OPTIONAL_FABRIC_SENSITIVE_INT8U), + optoptionalFabricSensitiveInt8u + ) + } if (nullableFabricSensitiveInt8u != null) { - put(ContextSpecificTag(TAG_NULLABLE_FABRIC_SENSITIVE_INT8U), nullableFabricSensitiveInt8u) - } else { - putNull(ContextSpecificTag(TAG_NULLABLE_FABRIC_SENSITIVE_INT8U)) - } + put(ContextSpecificTag(TAG_NULLABLE_FABRIC_SENSITIVE_INT8U), nullableFabricSensitiveInt8u) + } else { + putNull(ContextSpecificTag(TAG_NULLABLE_FABRIC_SENSITIVE_INT8U)) + } if (nullableOptionalFabricSensitiveInt8u != null) { - if (nullableOptionalFabricSensitiveInt8u.isPresent) { - val optnullableOptionalFabricSensitiveInt8u = nullableOptionalFabricSensitiveInt8u.get() - put(ContextSpecificTag(TAG_NULLABLE_OPTIONAL_FABRIC_SENSITIVE_INT8U), optnullableOptionalFabricSensitiveInt8u) - } - } else { - putNull(ContextSpecificTag(TAG_NULLABLE_OPTIONAL_FABRIC_SENSITIVE_INT8U)) - } + if (nullableOptionalFabricSensitiveInt8u.isPresent) { + val optnullableOptionalFabricSensitiveInt8u = nullableOptionalFabricSensitiveInt8u.get() + put( + ContextSpecificTag(TAG_NULLABLE_OPTIONAL_FABRIC_SENSITIVE_INT8U), + optnullableOptionalFabricSensitiveInt8u + ) + } + } else { + putNull(ContextSpecificTag(TAG_NULLABLE_OPTIONAL_FABRIC_SENSITIVE_INT8U)) + } put(ContextSpecificTag(TAG_FABRIC_SENSITIVE_CHAR_STRING), fabricSensitiveCharString) fabricSensitiveStruct.toTlv(ContextSpecificTag(TAG_FABRIC_SENSITIVE_STRUCT), this) startList(ContextSpecificTag(TAG_FABRIC_SENSITIVE_INT8U_LIST)) @@ -91,44 +96,66 @@ 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 { + fun fromTlv(tag: Tag, tlvReader: TlvReader): UnitTestingClusterTestFabricScoped { tlvReader.enterStructure(tag) val fabricSensitiveInt8u = tlvReader.getInt(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))) - } else { - Optional.empty() - } - val nullableFabricSensitiveInt8u = if (!tlvReader.isNull()) { - tlvReader.getInt(ContextSpecificTag(TAG_NULLABLE_FABRIC_SENSITIVE_INT8U)) - } else { - tlvReader.getNull(ContextSpecificTag(TAG_NULLABLE_FABRIC_SENSITIVE_INT8U)) - null - } - val nullableOptionalFabricSensitiveInt8u = if (!tlvReader.isNull()) { - if (tlvReader.isNextTag(ContextSpecificTag(TAG_NULLABLE_OPTIONAL_FABRIC_SENSITIVE_INT8U))) { - Optional.of(tlvReader.getInt(ContextSpecificTag(TAG_NULLABLE_OPTIONAL_FABRIC_SENSITIVE_INT8U))) - } else { - Optional.empty() - } - } else { - tlvReader.getNull(ContextSpecificTag(TAG_NULLABLE_OPTIONAL_FABRIC_SENSITIVE_INT8U)) - null - } - val fabricSensitiveCharString = tlvReader.getString(ContextSpecificTag(TAG_FABRIC_SENSITIVE_CHAR_STRING)) - val fabricSensitiveStruct = UnitTestingClusterSimpleStruct.fromTlv(ContextSpecificTag(TAG_FABRIC_SENSITIVE_STRUCT), tlvReader) - val fabricSensitiveInt8uList = buildList { - tlvReader.enterList(ContextSpecificTag(TAG_FABRIC_SENSITIVE_INT8U_LIST)) - while(!tlvReader.isEndOfContainer()) { - add(tlvReader.getInt(AnonymousTag)) - } - tlvReader.exitContainer() - } + val optionalFabricSensitiveInt8u = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_OPTIONAL_FABRIC_SENSITIVE_INT8U))) { + Optional.of(tlvReader.getInt(ContextSpecificTag(TAG_OPTIONAL_FABRIC_SENSITIVE_INT8U))) + } else { + Optional.empty() + } + val nullableFabricSensitiveInt8u = + if (!tlvReader.isNull()) { + tlvReader.getInt(ContextSpecificTag(TAG_NULLABLE_FABRIC_SENSITIVE_INT8U)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_NULLABLE_FABRIC_SENSITIVE_INT8U)) + null + } + val nullableOptionalFabricSensitiveInt8u = + if (!tlvReader.isNull()) { + if ( + tlvReader.isNextTag(ContextSpecificTag(TAG_NULLABLE_OPTIONAL_FABRIC_SENSITIVE_INT8U)) + ) { + Optional.of( + tlvReader.getInt(ContextSpecificTag(TAG_NULLABLE_OPTIONAL_FABRIC_SENSITIVE_INT8U)) + ) + } else { + Optional.empty() + } + } else { + tlvReader.getNull(ContextSpecificTag(TAG_NULLABLE_OPTIONAL_FABRIC_SENSITIVE_INT8U)) + null + } + val fabricSensitiveCharString = + tlvReader.getString(ContextSpecificTag(TAG_FABRIC_SENSITIVE_CHAR_STRING)) + val fabricSensitiveStruct = + UnitTestingClusterSimpleStruct.fromTlv( + ContextSpecificTag(TAG_FABRIC_SENSITIVE_STRUCT), + tlvReader + ) + val fabricSensitiveInt8uList = + buildList { + tlvReader.enterList(ContextSpecificTag(TAG_FABRIC_SENSITIVE_INT8U_LIST)) + while (!tlvReader.isEndOfContainer()) { + add(tlvReader.getInt(AnonymousTag)) + } + tlvReader.exitContainer() + } val fabricIndex = tlvReader.getInt(ContextSpecificTag(TAG_FABRIC_INDEX)) - + tlvReader.exitContainer() - return UnitTestingClusterTestFabricScoped(fabricSensitiveInt8u, optionalFabricSensitiveInt8u, nullableFabricSensitiveInt8u, nullableOptionalFabricSensitiveInt8u, fabricSensitiveCharString, fabricSensitiveStruct, fabricSensitiveInt8uList, fabricIndex) + return UnitTestingClusterTestFabricScoped( + fabricSensitiveInt8u, + optionalFabricSensitiveInt8u, + nullableFabricSensitiveInt8u, + nullableOptionalFabricSensitiveInt8u, + fabricSensitiveCharString, + fabricSensitiveStruct, + fabricSensitiveInt8uList, + fabricIndex + ) } } } 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 0540f4f11a30cb..6c5df4cb224166 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 @@ -17,19 +17,13 @@ package chip.devicecontroller.cluster.structs import chip.devicecontroller.cluster.* -import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag -import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -import java.util.Optional - -class UnitTestingClusterTestListStructOctet ( - val member1: Long, - val member2: ByteArray) { - override fun toString(): String = buildString { +class UnitTestingClusterTestListStructOctet(val member1: Long, val member2: ByteArray) { + override fun toString(): String = buildString { append("UnitTestingClusterTestListStructOctet {\n") append("\tmember1 : $member1\n") append("\tmember2 : $member2\n") @@ -49,11 +43,11 @@ class UnitTestingClusterTestListStructOctet ( private const val TAG_MEMBER1 = 0 private const val TAG_MEMBER2 = 1 - fun fromTlv(tag: Tag, tlvReader: TlvReader) : UnitTestingClusterTestListStructOctet { + fun fromTlv(tag: Tag, tlvReader: TlvReader): UnitTestingClusterTestListStructOctet { tlvReader.enterStructure(tag) val member1 = tlvReader.getLong(ContextSpecificTag(TAG_MEMBER1)) val member2 = tlvReader.getByteArray(ContextSpecificTag(TAG_MEMBER2)) - + tlvReader.exitContainer() return UnitTestingClusterTestListStructOctet(member1, member2) 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 44a824f2303a2e..d90396f2a010ea 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 @@ -17,19 +17,13 @@ package chip.devicecontroller.cluster.structs import chip.devicecontroller.cluster.* -import chip.tlv.AnonymousTag import chip.tlv.ContextSpecificTag import chip.tlv.Tag -import chip.tlv.TlvParsingException import chip.tlv.TlvReader import chip.tlv.TlvWriter -import java.util.Optional - -class UserLabelClusterLabelStruct ( - val label: String, - val value: String) { - override fun toString(): String = buildString { +class UserLabelClusterLabelStruct(val label: String, val value: String) { + override fun toString(): String = buildString { append("UserLabelClusterLabelStruct {\n") append("\tlabel : $label\n") append("\tvalue : $value\n") @@ -49,11 +43,11 @@ class UserLabelClusterLabelStruct ( private const val TAG_LABEL = 0 private const val TAG_VALUE = 1 - fun fromTlv(tag: Tag, tlvReader: TlvReader) : UserLabelClusterLabelStruct { + fun fromTlv(tag: Tag, tlvReader: TlvReader): UserLabelClusterLabelStruct { tlvReader.enterStructure(tag) val label = tlvReader.getString(ContextSpecificTag(TAG_LABEL)) val value = tlvReader.getString(ContextSpecificTag(TAG_VALUE)) - + tlvReader.exitContainer() return UserLabelClusterLabelStruct(label, value)